]>
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 | ||
41e622a8 | 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 build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP strict1_warn warn_cflags WERROR nocommon_flag TREEBROWSER EGREP 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 stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 libgcc_visibility GGC zlibdir zlibinc MAINT ANDER BANSHEEINC BANSHEELIB 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 gcc_version gcc_version_full gcc_version_trigger 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 symbolic_link 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 target_noncanonical 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. | |
d2640b91 PE |
870 | Categories are: fold,gc,gcac,misc,rtlflag,rtl, |
871 | tree,valgrind; default is gc,misc,rtlflag,tree | |
74ee1642 | 872 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 NN |
873 | --enable-coverage=LEVEL |
874 | enable compiler\'s code coverage collection. | |
875 | Use to measure compiler performance and locate | |
876 | unused parts of the compiler. With LEVEL, specify | |
877 | optimization. Values are opt, noopt, | |
878 | default is noopt | |
879 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
880 | --enable-multilib enable library support for multiple ABIs | |
881 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
882 | --enable-threads enable thread usage for target GCC | |
883 | --enable-threads=LIB use LIB thread package for target GCC | |
884 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
885 | the GNU Objective-C runtime | |
886 | --disable-shared don't provide a shared libgcc | |
887 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 888 | --enable-languages=LIST specify which front-ends to build |
ba479fd2 NN |
889 | --enable-initfini-array use .init_array/.fini_array sections |
890 | --enable-sjlj-exceptions | |
891 | arrange to use setjmp/longjmp exception handling | |
892 | --enable-libunwind-exceptions force use libunwind for exceptions | |
893 | --disable-win32-registry | |
894 | disable lookup of installation paths in the | |
895 | Registry on Windows hosts | |
896 | --enable-win32-registry enable registry lookup (default) | |
897 | --enable-win32-registry=KEY | |
898 | use KEY instead of GCC version as the last portion | |
899 | of the registry key | |
900 | --enable-maintainer-mode | |
901 | enable make rules and dependencies not useful | |
902 | (and sometimes confusing) to the casual installer | |
903 | --enable-version-specific-runtime-libs | |
904 | specify that runtime libraries should be | |
905 | installed in a compiler-specific directory | |
093e61a6 | 906 | |
ba479fd2 NN |
907 | Optional Packages: |
908 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
909 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
910 | --with-local-prefix=DIR specifies directory to put local include | |
911 | --with-gxx-include-dir=DIR | |
912 | specifies directory to put g++ header files | |
913 | --with-cpp-install-dir=DIR | |
914 | install the user visible C preprocessor in DIR | |
915 | (relative to PREFIX) as well as PREFIX/bin | |
916 | --with-gnu-ld arrange to work with GNU ld. | |
917 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 918 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
919 | --with-gnu-as arrange to work with GNU as |
920 | --with-as arrange to use the specified as (full pathname) | |
921 | --with-stabs arrange to use stabs instead of host debug format | |
922 | --with-dwarf2 force the default debug format to be DWARF 2 | |
923 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. | |
924 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib | |
59415997 | 925 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
926 | with the compiler |
927 | --with-system-zlib use installed libz | |
6de9cd9a | 928 | --with-libbanshee enable libbanshee |
ba479fd2 | 929 | --with-slibdir=DIR shared libraries in DIR LIBDIR |
13c22933 | 930 | |
ba479fd2 NN |
931 | Some influential environment variables: |
932 | CC C compiler command | |
933 | CFLAGS C compiler flags | |
934 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
935 | nonstandard directory <lib dir> | |
936 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
937 | headers in a nonstandard directory <include dir> | |
938 | CPP C preprocessor | |
6de9cd9a DN |
939 | GMPLIBS How to link GMP |
940 | GMPINC How to find GMP include files | |
13c22933 | 941 | |
ba479fd2 NN |
942 | Use these variables to override the choices made by `configure' or to help |
943 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 944 | |
ba479fd2 NN |
945 | _ACEOF |
946 | fi | |
6e3f3080 | 947 | |
ba479fd2 NN |
948 | if test "$ac_init_help" = "recursive"; then |
949 | # If there are subdirs, report their specific --help. | |
950 | ac_popdir=`pwd` | |
951 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
952 | test -d $ac_dir || continue | |
953 | ac_builddir=. | |
954 | ||
955 | if test "$ac_dir" != .; then | |
956 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
957 | # A "../" for each directory in $ac_dir_suffix. | |
958 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
959 | else | |
960 | ac_dir_suffix= ac_top_builddir= | |
961 | fi | |
962 | ||
963 | case $srcdir in | |
964 | .) # No --srcdir option. We are building in place. | |
965 | ac_srcdir=. | |
966 | if test -z "$ac_top_builddir"; then | |
967 | ac_top_srcdir=. | |
968 | else | |
969 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
970 | fi ;; | |
971 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
972 | ac_srcdir=$srcdir$ac_dir_suffix; | |
973 | ac_top_srcdir=$srcdir ;; | |
974 | *) # Relative path. | |
975 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
976 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
977 | esac | |
8ab705be KC |
978 | |
979 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
980 | # the directories may not exist. | |
981 | case `pwd` in | |
982 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 983 | *) |
8ab705be KC |
984 | case "$ac_dir" in |
985 | .) ac_abs_builddir=`pwd`;; | |
986 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
987 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
988 | esac;; |
989 | esac | |
8ab705be | 990 | case $ac_abs_builddir in |
86da66b5 HPN |
991 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
992 | *) | |
993 | case ${ac_top_builddir}. in | |
8ab705be | 994 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 995 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 996 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
997 | esac;; |
998 | esac | |
8ab705be | 999 | case $ac_abs_builddir in |
86da66b5 HPN |
1000 | .) ac_abs_srcdir=$ac_srcdir;; |
1001 | *) | |
1002 | case $ac_srcdir in | |
8ab705be | 1003 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1004 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1005 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1006 | esac;; |
1007 | esac | |
8ab705be | 1008 | case $ac_abs_builddir in |
86da66b5 HPN |
1009 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1010 | *) | |
1011 | case $ac_top_srcdir in | |
8ab705be | 1012 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1013 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1014 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1015 | esac;; |
1016 | esac | |
ba479fd2 NN |
1017 | |
1018 | cd $ac_dir | |
1019 | # Check for guested configure; otherwise get Cygnus style configure. | |
1020 | if test -f $ac_srcdir/configure.gnu; then | |
1021 | echo | |
1022 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1023 | elif test -f $ac_srcdir/configure; then | |
1024 | echo | |
1025 | $SHELL $ac_srcdir/configure --help=recursive | |
1026 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1027 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1028 | echo |
1029 | $ac_configure --help | |
1030 | else | |
1031 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1032 | fi | |
d2640b91 | 1033 | cd "$ac_popdir" |
ba479fd2 NN |
1034 | done |
1035 | fi | |
1036 | ||
1037 | test -n "$ac_init_help" && exit 0 | |
1038 | if $ac_init_version; then | |
1039 | cat <<\_ACEOF | |
1040 | ||
86da66b5 | 1041 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1042 | This configure script is free software; the Free Software Foundation |
1043 | gives unlimited permission to copy, distribute and modify it. | |
1044 | _ACEOF | |
1045 | exit 0 | |
1046 | fi | |
1047 | exec 5>config.log | |
1048 | cat >&5 <<_ACEOF | |
1049 | This file contains any messages produced by compilers while | |
1050 | running configure, to aid debugging if configure makes a mistake. | |
1051 | ||
1052 | It was created by $as_me, which was | |
8ab705be | 1053 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1054 | |
1055 | $ $0 $@ | |
1056 | ||
1057 | _ACEOF | |
1058 | { | |
1059 | cat <<_ASUNAME | |
1060 | ## --------- ## | |
1061 | ## Platform. ## | |
1062 | ## --------- ## | |
1063 | ||
1064 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1065 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1066 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1067 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1068 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1069 | ||
1070 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1071 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1072 | ||
1073 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1074 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1075 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1076 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1077 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1078 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1079 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1080 | ||
1081 | _ASUNAME | |
1082 | ||
1083 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1084 | for as_dir in $PATH | |
1085 | do | |
1086 | IFS=$as_save_IFS | |
1087 | test -z "$as_dir" && as_dir=. | |
1088 | echo "PATH: $as_dir" | |
1089 | done | |
1090 | ||
1091 | } >&5 | |
1092 | ||
1093 | cat >&5 <<_ACEOF | |
1094 | ||
1095 | ||
1096 | ## ----------- ## | |
1097 | ## Core tests. ## | |
1098 | ## ----------- ## | |
1099 | ||
1100 | _ACEOF | |
1101 | ||
1102 | ||
1103 | # Keep a trace of the command line. | |
1104 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1105 | # Strip out --silent because we don't want to record it for future runs. | |
1106 | # Also quote any args containing shell meta-characters. | |
1107 | # Make two passes to allow for proper duplicate-argument suppression. | |
1108 | ac_configure_args= | |
1109 | ac_configure_args0= | |
1110 | ac_configure_args1= | |
1111 | ac_sep= | |
1112 | ac_must_keep_next=false | |
1113 | for ac_pass in 1 2 | |
1114 | do | |
1115 | for ac_arg | |
1116 | do | |
1117 | case $ac_arg in | |
1118 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1119 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1120 | | -silent | --silent | --silen | --sile | --sil) | |
1121 | continue ;; | |
1122 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1123 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1124 | esac | |
1125 | case $ac_pass in | |
1126 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1127 | 2) | |
1128 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1129 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1130 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1131 | else |
86da66b5 HPN |
1132 | case $ac_arg in |
1133 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1134 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1135 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1136 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1137 | case "$ac_configure_args0 " in | |
1138 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1139 | esac | |
1140 | ;; | |
1141 | -* ) ac_must_keep_next=true ;; | |
1142 | esac | |
ba479fd2 NN |
1143 | fi |
1144 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1145 | # Get rid of the leading space. | |
1146 | ac_sep=" " | |
1147 | ;; | |
1148 | esac | |
1149 | done | |
1150 | done | |
1151 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1152 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1153 | ||
1154 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1155 | # config.log. We remove comments because anyway the quotes in there | |
1156 | # would cause problems or look ugly. | |
1157 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1158 | # such as our DU 5.0 friend, will then `close' the trap. | |
1159 | trap 'exit_status=$? | |
1160 | # Save into config.log some information that might help in debugging. | |
1161 | { | |
1162 | echo | |
1163 | ||
1164 | cat <<\_ASBOX | |
1165 | ## ---------------- ## | |
1166 | ## Cache variables. ## | |
1167 | ## ---------------- ## | |
1168 | _ASBOX | |
1169 | echo | |
1170 | # The following way of writing the cache mishandles newlines in values, | |
1171 | { | |
1172 | (set) 2>&1 | | |
1173 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1174 | *ac_space=\ *) | |
1175 | sed -n \ | |
86da66b5 HPN |
1176 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1177 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1178 | ;; |
1179 | *) | |
1180 | sed -n \ | |
86da66b5 | 1181 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1182 | ;; |
1183 | esac; | |
1184 | } | |
1185 | echo | |
1186 | ||
1187 | cat <<\_ASBOX | |
1188 | ## ----------------- ## | |
1189 | ## Output variables. ## | |
1190 | ## ----------------- ## | |
1191 | _ASBOX | |
1192 | echo | |
1193 | for ac_var in $ac_subst_vars | |
1194 | do | |
1195 | eval ac_val=$`echo $ac_var` | |
1196 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1197 | done | sort | |
1198 | echo | |
1199 | ||
1200 | if test -n "$ac_subst_files"; then | |
1201 | cat <<\_ASBOX | |
1202 | ## ------------- ## | |
1203 | ## Output files. ## | |
1204 | ## ------------- ## | |
1205 | _ASBOX | |
1206 | echo | |
1207 | for ac_var in $ac_subst_files | |
1208 | do | |
1209 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1210 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1211 | done | sort |
1212 | echo | |
1213 | fi | |
1214 | ||
1215 | if test -s confdefs.h; then | |
1216 | cat <<\_ASBOX | |
1217 | ## ----------- ## | |
1218 | ## confdefs.h. ## | |
1219 | ## ----------- ## | |
1220 | _ASBOX | |
1221 | echo | |
1222 | sed "/^$/d" confdefs.h | sort | |
1223 | echo | |
1224 | fi | |
1225 | test "$ac_signal" != 0 && | |
1226 | echo "$as_me: caught signal $ac_signal" | |
1227 | echo "$as_me: exit $exit_status" | |
1228 | } >&5 | |
86da66b5 | 1229 | rm -f core *.core && |
ba479fd2 NN |
1230 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1231 | exit $exit_status | |
1232 | ' 0 | |
1233 | for ac_signal in 1 2 13 15; do | |
1234 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1235 | done | |
1236 | ac_signal=0 | |
1237 | ||
1238 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1239 | rm -rf conftest* confdefs.h | |
1240 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1241 | echo >confdefs.h | |
1242 | ||
1243 | # Predefined preprocessor variables. | |
1244 | ||
1245 | cat >>confdefs.h <<_ACEOF | |
1246 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1247 | _ACEOF | |
1248 | ||
1249 | ||
1250 | cat >>confdefs.h <<_ACEOF | |
1251 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1252 | _ACEOF | |
1253 | ||
1254 | ||
1255 | cat >>confdefs.h <<_ACEOF | |
1256 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1257 | _ACEOF | |
1258 | ||
1259 | ||
1260 | cat >>confdefs.h <<_ACEOF | |
1261 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1262 | _ACEOF | |
1263 | ||
1264 | ||
1265 | cat >>confdefs.h <<_ACEOF | |
1266 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1267 | _ACEOF | |
1268 | ||
1269 | ||
1270 | # Let the site file select an alternate cache file if it wants to. | |
1271 | # Prefer explicitly selected file to automatically selected ones. | |
1272 | if test -z "$CONFIG_SITE"; then | |
1273 | if test "x$prefix" != xNONE; then | |
1274 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1275 | else | |
1276 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1277 | fi | |
1278 | fi | |
1279 | for ac_site_file in $CONFIG_SITE; do | |
1280 | if test -r "$ac_site_file"; then | |
1281 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1282 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1283 | sed 's/^/| /' "$ac_site_file" >&5 | |
1284 | . "$ac_site_file" | |
1285 | fi | |
1286 | done | |
1287 | ||
1288 | if test -r "$cache_file"; then | |
1289 | # Some versions of bash will fail to source /dev/null (special | |
1290 | # files actually), so we avoid doing that. | |
1291 | if test -f "$cache_file"; then | |
1292 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1293 | echo "$as_me: loading cache $cache_file" >&6;} | |
1294 | case $cache_file in | |
1295 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1296 | *) . ./$cache_file;; | |
1297 | esac | |
1298 | fi | |
1299 | else | |
1300 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1301 | echo "$as_me: creating cache $cache_file" >&6;} | |
1302 | >$cache_file | |
1303 | fi | |
1304 | ||
1305 | # Check that the precious variables saved in the cache have kept the same | |
1306 | # value. | |
1307 | ac_cache_corrupted=false | |
1308 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1309 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1310 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1311 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1312 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1313 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1314 | case $ac_old_set,$ac_new_set in | |
1315 | set,) | |
1316 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1317 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1318 | ac_cache_corrupted=: ;; | |
1319 | ,set) | |
1320 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1321 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1322 | ac_cache_corrupted=: ;; | |
1323 | ,);; | |
1324 | *) | |
1325 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1326 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1327 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1328 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1329 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1330 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1331 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1332 | ac_cache_corrupted=: |
ba479fd2 NN |
1333 | fi;; |
1334 | esac | |
1335 | # Pass precious variables to config.status. | |
1336 | if test "$ac_new_set" = set; then | |
1337 | case $ac_new_val in | |
1338 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1339 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1340 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1341 | esac | |
1342 | case " $ac_configure_args " in | |
1343 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1344 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1345 | esac | |
1346 | fi | |
1347 | done | |
1348 | if $ac_cache_corrupted; then | |
1349 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1350 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1351 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1352 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1353 | { (exit 1); exit 1; }; } | |
1354 | fi | |
1355 | ||
1356 | ac_ext=c | |
1357 | ac_cpp='$CPP $CPPFLAGS' | |
1358 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1359 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1360 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1361 | ||
1362 | ||
1363 | ||
1364 | ||
1365 | ||
1366 | ||
1367 | ||
1368 | ||
1369 | ||
1370 | ||
1371 | ||
1372 | ||
1373 | ||
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
914c5af7 | 1380 | |
ba479fd2 NN |
1381 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1382 | ||
1383 | ||
1384 | # Determine the host, build, and target systems | |
1385 | ac_aux_dir= | |
1386 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1387 | if test -f $ac_dir/install-sh; then | |
1388 | ac_aux_dir=$ac_dir | |
1389 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1390 | break | |
1391 | elif test -f $ac_dir/install.sh; then | |
1392 | ac_aux_dir=$ac_dir | |
1393 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1394 | break | |
1395 | elif test -f $ac_dir/shtool; then | |
1396 | ac_aux_dir=$ac_dir | |
1397 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1398 | break | |
1399 | fi | |
1400 | done | |
1401 | if test -z "$ac_aux_dir"; then | |
1402 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1403 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1404 | { (exit 1); exit 1; }; } | |
1405 | fi | |
1406 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1407 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1408 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1409 | ||
1410 | # Make sure we can run config.sub. | |
1411 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1412 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1413 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1414 | { (exit 1); exit 1; }; } | |
1415 | ||
1416 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1417 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1418 | if test "${ac_cv_build+set}" = set; then | |
1419 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1420 | else | |
1421 | ac_cv_build_alias=$build_alias | |
1422 | test -z "$ac_cv_build_alias" && | |
1423 | ac_cv_build_alias=`$ac_config_guess` | |
1424 | test -z "$ac_cv_build_alias" && | |
1425 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1426 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1427 | { (exit 1); exit 1; }; } | |
1428 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1429 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1430 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1431 | { (exit 1); exit 1; }; } | |
1432 | ||
1433 | fi | |
1434 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1435 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1436 | build=$ac_cv_build | |
1437 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1438 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1439 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1440 | ||
1441 | ||
1442 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1443 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1444 | if test "${ac_cv_host+set}" = set; then | |
1445 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1446 | else | |
1447 | ac_cv_host_alias=$host_alias | |
1448 | test -z "$ac_cv_host_alias" && | |
1449 | ac_cv_host_alias=$ac_cv_build_alias | |
1450 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1451 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1452 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1453 | { (exit 1); exit 1; }; } | |
1454 | ||
1455 | fi | |
1456 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1457 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1458 | host=$ac_cv_host | |
1459 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1460 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1461 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1462 | ||
1463 | ||
1464 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1465 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1466 | if test "${ac_cv_target+set}" = set; then | |
1467 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1468 | else | |
1469 | ac_cv_target_alias=$target_alias | |
1470 | test "x$ac_cv_target_alias" = "x" && | |
1471 | ac_cv_target_alias=$ac_cv_host_alias | |
1472 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1473 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1474 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1475 | { (exit 1); exit 1; }; } | |
1476 | ||
1477 | fi | |
1478 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1479 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1480 | target=$ac_cv_target | |
1481 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1482 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1483 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1484 | ||
1485 | ||
1486 | # The aliases save the names the user supplied, while $host etc. | |
1487 | # will get canonicalized. | |
1488 | test -n "$target_alias" && | |
1489 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1490 | NONENONEs,x,x, && | |
1491 | program_prefix=${target_alias}- | |
1492 | ||
1493 | # Determine the noncanonical target name, for directory use. | |
1494 | case ${build_alias} in | |
1495 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1496 | *) build_noncanonical=${build_alias} ;; |
1497 | esac | |
73458fb7 | 1498 | |
4665e56c NN |
1499 | case ${host_alias} in |
1500 | "") host_noncanonical=${build_noncanonical} ;; | |
1501 | *) host_noncanonical=${host_alias} ;; | |
1502 | esac | |
73458fb7 | 1503 | |
4665e56c NN |
1504 | case ${target_alias} in |
1505 | "") target_noncanonical=${host_noncanonical} ;; | |
1506 | *) target_noncanonical=${target_alias} ;; | |
1507 | esac | |
093e61a6 | 1508 | |
caa55b1e NN |
1509 | |
1510 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1511 | # Prefix 'build-' so this never conflicts with target_subdir. |
1512 | build_subdir="build-${build_noncanonical}" | |
1513 | # Not really a subdirectory, but here for completeness. | |
1514 | host_subdir=. | |
1515 | # No prefix. | |
1516 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1517 | |
73458fb7 | 1518 | |
093e61a6 | 1519 | # Set program_transform_name |
13c22933 | 1520 | test "$program_prefix" != NONE && |
ba479fd2 | 1521 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1522 | # Use a double $ so make ignores it. |
1523 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1524 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1525 | # Double any \ or $. echo might interpret backslashes. | |
1526 | # By default was `s,x,x', remove it if useless. | |
1527 | cat <<\_ACEOF >conftest.sed | |
1528 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1529 | _ACEOF | |
1530 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1531 | rm conftest.sed | |
13c22933 JJ |
1532 | |
1533 | ||
34a86c2b NN |
1534 | # Check for bogus environment variables. |
1535 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1536 | # since this would lead to problems installing/building glibc. | |
1537 | # LIBRARY_PATH contains the current directory if one of the following | |
1538 | # is true: | |
1539 | # - one of the terminals (":" and ";") is the first or last sign | |
1540 | # - two terminals occur directly after each other | |
1541 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1542 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1543 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1544 | case ${LIBRARY_PATH} in |
1545 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1546 | library_path_setting="contains current directory" | |
1547 | ;; | |
1548 | *) | |
1549 | library_path_setting="ok" | |
1550 | ;; | |
1551 | esac | |
ba479fd2 NN |
1552 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1553 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1554 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1555 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1556 | *** LIBRARY_PATH shouldn't contain the current directory when |
1557 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1558 | *** and run configure again." >&5 |
1559 | echo "$as_me: error: | |
1560 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1561 | *** building gcc. Please change the environment variable | |
1562 | *** and run configure again." >&2;} | |
1563 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1564 | fi |
1565 | ||
34a86c2b NN |
1566 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1567 | # since this would lead to problems installing/building glibc. | |
1568 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1569 | # is true: | |
1570 | # - one of the terminals (":" and ";") is the first or last sign | |
1571 | # - two terminals occur directly after each other | |
1572 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1573 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1574 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1575 | case ${GCC_EXEC_PREFIX} in |
1576 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1577 | gcc_exec_prefix_setting="contains current directory" | |
1578 | ;; | |
1579 | *) | |
1580 | gcc_exec_prefix_setting="ok" | |
1581 | ;; | |
1582 | esac | |
ba479fd2 NN |
1583 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1584 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1585 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1586 | { { echo "$as_me:$LINENO: error: |
1587 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1588 | *** building gcc. Please change the environment variable | |
1589 | *** and run configure again." >&5 | |
1590 | echo "$as_me: error: | |
cafe096b EC |
1591 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1592 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1593 | *** and run configure again." >&2;} |
1594 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1595 | fi |
1596 | ||
1597 | # ----------- | |
1598 | # Directories | |
1599 | # ----------- | |
1600 | ||
1601 | # Specify the local prefix | |
1602 | local_prefix= | |
ba479fd2 | 1603 | |
34a86c2b NN |
1604 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1605 | if test "${with_local_prefix+set}" = set; then | |
1606 | withval="$with_local_prefix" | |
1607 | case "${withval}" in | |
ba479fd2 NN |
1608 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1609 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1610 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1611 | no) ;; |
1612 | *) local_prefix=$with_local_prefix ;; | |
1613 | esac | |
ba479fd2 | 1614 | fi; |
34a86c2b NN |
1615 | |
1616 | # Default local prefix if it is empty | |
1617 | if test x$local_prefix = x; then | |
1618 | local_prefix=/usr/local | |
1619 | fi | |
1620 | ||
1621 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1622 | # passed in by the toplevel make and thus we'd get different behavior | |
1623 | # depending on where we built the sources. | |
1624 | gcc_gxx_include_dir= | |
1625 | # Specify the g++ header file directory | |
ba479fd2 | 1626 | |
34a86c2b NN |
1627 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1628 | if test "${with_gxx_include_dir+set}" = set; then | |
1629 | withval="$with_gxx_include_dir" | |
1630 | case "${withval}" in | |
ba479fd2 NN |
1631 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1632 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1633 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1634 | no) ;; |
1635 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1636 | esac | |
ba479fd2 | 1637 | fi; |
34a86c2b NN |
1638 | |
1639 | if test x${gcc_gxx_include_dir} = x; then | |
1640 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1641 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1642 | else | |
1643 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
1644 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
1645 | fi | |
1646 | fi | |
1647 | ||
ba479fd2 | 1648 | |
34a86c2b NN |
1649 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1650 | if test "${with_cpp_install_dir+set}" = set; then | |
1651 | withval="$with_cpp_install_dir" | |
1652 | if test x$withval = xyes; then | |
ba479fd2 NN |
1653 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1654 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1655 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1656 | elif test x$withval != xno; then |
1657 | cpp_install_dir=$withval | |
1658 | fi | |
ba479fd2 | 1659 | fi; |
34a86c2b | 1660 | |
51b9ff45 | 1661 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1662 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1663 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1664 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1665 | # just that. |
1666 | ||
03787dfd KC |
1667 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1668 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1669 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1670 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1671 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1672 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1673 | else |
03787dfd | 1674 | generated_files_in_srcdir=no |
ba479fd2 | 1675 | fi; |
51b9ff45 | 1676 | |
03787dfd KC |
1677 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1678 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1679 | ||
1680 | if test "$generated_files_in_srcdir" = "yes"; then | |
1681 | GENINSRC='' | |
03787dfd KC |
1682 | else |
1683 | GENINSRC='#' | |
03787dfd KC |
1684 | fi |
1685 | ||
1686 | ||
34a86c2b NN |
1687 | # ------------------- |
1688 | # Find default linker | |
1689 | # ------------------- | |
1690 | ||
1691 | # With GNU ld | |
ba479fd2 | 1692 | |
34a86c2b NN |
1693 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1694 | if test "${with_gnu_ld+set}" = set; then | |
1695 | withval="$with_gnu_ld" | |
1696 | gnu_ld_flag="$with_gnu_ld" | |
1697 | else | |
1698 | gnu_ld_flag=no | |
ba479fd2 | 1699 | fi; |
6e3f3080 | 1700 | |
63cf211a | 1701 | # With pre-defined ld |
ba479fd2 | 1702 | |
34a86c2b NN |
1703 | # Check whether --with-ld or --without-ld was given. |
1704 | if test "${with_ld+set}" = set; then | |
1705 | withval="$with_ld" | |
1706 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1707 | fi; |
34a86c2b NN |
1708 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1709 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1710 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1711 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1712 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1713 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1714 | gnu_ld_flag=yes | |
1715 | fi | |
ba479fd2 NN |
1716 | |
1717 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1718 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1719 | _ACEOF |
34a86c2b NN |
1720 | |
1721 | fi | |
1722 | ||
ba479fd2 NN |
1723 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1724 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1725 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1726 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1727 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1728 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1729 | else |
ba479fd2 NN |
1730 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1731 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1732 | fi |
1733 | else | |
ba479fd2 NN |
1734 | echo "$as_me:$LINENO: result: no" >&5 |
1735 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1736 | fi |
1737 | ||
d594623a L |
1738 | # With demangler in GNU ld |
1739 | ||
1740 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1741 | if test "${with_demangler_in_ld+set}" = set; then | |
1742 | withval="$with_demangler_in_ld" | |
1743 | demangler_in_ld="$with_demangler_in_ld" | |
1744 | else | |
1745 | demangler_in_ld=no | |
1746 | fi; | |
1747 | ||
34a86c2b NN |
1748 | # ---------------------- |
1749 | # Find default assembler | |
1750 | # ---------------------- | |
1751 | ||
1752 | # With GNU as | |
ba479fd2 | 1753 | |
34a86c2b NN |
1754 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1755 | if test "${with_gnu_as+set}" = set; then | |
1756 | withval="$with_gnu_as" | |
1757 | gas_flag="$with_gnu_as" | |
1758 | else | |
1759 | gas_flag=no | |
ba479fd2 | 1760 | fi; |
34a86c2b NN |
1761 | |
1762 | ||
1763 | # Check whether --with-as or --without-as was given. | |
1764 | if test "${with_as+set}" = set; then | |
1765 | withval="$with_as" | |
1766 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1767 | fi; |
34a86c2b NN |
1768 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1769 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1770 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1771 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1772 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1773 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1774 | gas_flag=yes | |
1775 | fi | |
ba479fd2 NN |
1776 | |
1777 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1778 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1779 | _ACEOF |
34a86c2b NN |
1780 | |
1781 | fi | |
1782 | ||
ba479fd2 NN |
1783 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1784 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1785 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1786 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1787 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1788 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1789 | else |
ba479fd2 NN |
1790 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1791 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1792 | fi |
1793 | else | |
ba479fd2 NN |
1794 | echo "$as_me:$LINENO: result: no" >&5 |
1795 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1796 | fi |
1797 | ||
1798 | # --------------- | |
1799 | # Find C compiler | |
1800 | # --------------- | |
1801 | ||
426ca3ca RO |
1802 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1803 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1804 | # file, even when creating an executable, so an execution test fails. | |
1805 | # Remove possible default executable files to avoid this. | |
1806 | # | |
1807 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1808 | # Autoconf includes it. | |
1809 | rm -f a.out a.exe b.out | |
1810 | ||
34a86c2b | 1811 | # Find the native compiler |
ba479fd2 NN |
1812 | ac_ext=c |
1813 | ac_cpp='$CPP $CPPFLAGS' | |
1814 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1815 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1816 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1817 | if test -n "$ac_tool_prefix"; then | |
1818 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1819 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1820 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1821 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1822 | if test "${ac_cv_prog_CC+set}" = set; then | |
1823 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1824 | else | |
1825 | if test -n "$CC"; then | |
1826 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1827 | else | |
1828 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1829 | for as_dir in $PATH | |
1830 | do | |
1831 | IFS=$as_save_IFS | |
1832 | test -z "$as_dir" && as_dir=. | |
1833 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1834 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1835 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1836 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1837 | break 2 | |
1838 | fi | |
1839 | done | |
1840 | done | |
1841 | ||
1842 | fi | |
1843 | fi | |
1844 | CC=$ac_cv_prog_CC | |
1845 | if test -n "$CC"; then | |
1846 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1847 | echo "${ECHO_T}$CC" >&6 | |
1848 | else | |
1849 | echo "$as_me:$LINENO: result: no" >&5 | |
1850 | echo "${ECHO_T}no" >&6 | |
1851 | fi | |
1852 | ||
1853 | fi | |
1854 | if test -z "$ac_cv_prog_CC"; then | |
1855 | ac_ct_CC=$CC | |
1856 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1857 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1858 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1859 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1860 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1861 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1862 | else | |
1863 | if test -n "$ac_ct_CC"; then | |
1864 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1865 | else | |
1866 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1867 | for as_dir in $PATH | |
1868 | do | |
1869 | IFS=$as_save_IFS | |
1870 | test -z "$as_dir" && as_dir=. | |
1871 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1872 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1873 | ac_cv_prog_ac_ct_CC="gcc" | |
1874 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1875 | break 2 | |
1876 | fi | |
1877 | done | |
1878 | done | |
1879 | ||
1880 | fi | |
1881 | fi | |
1882 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1883 | if test -n "$ac_ct_CC"; then | |
1884 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1885 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1886 | else | |
1887 | echo "$as_me:$LINENO: result: no" >&5 | |
1888 | echo "${ECHO_T}no" >&6 | |
1889 | fi | |
1890 | ||
1891 | CC=$ac_ct_CC | |
1892 | else | |
1893 | CC="$ac_cv_prog_CC" | |
1894 | fi | |
1895 | ||
1896 | if test -z "$CC"; then | |
1897 | if test -n "$ac_tool_prefix"; then | |
1898 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1899 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1900 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1901 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1902 | if test "${ac_cv_prog_CC+set}" = set; then | |
1903 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1904 | else |
1905 | if test -n "$CC"; then | |
1906 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1907 | else | |
ba479fd2 NN |
1908 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1909 | for as_dir in $PATH | |
1910 | do | |
1911 | IFS=$as_save_IFS | |
1912 | test -z "$as_dir" && as_dir=. | |
1913 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1914 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1915 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1916 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1917 | break 2 | |
1918 | fi | |
1919 | done | |
1920 | done | |
1921 | ||
cd9e5e7c MK |
1922 | fi |
1923 | fi | |
ba479fd2 | 1924 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1925 | if test -n "$CC"; then |
ba479fd2 NN |
1926 | echo "$as_me:$LINENO: result: $CC" >&5 |
1927 | echo "${ECHO_T}$CC" >&6 | |
1928 | else | |
1929 | echo "$as_me:$LINENO: result: no" >&5 | |
1930 | echo "${ECHO_T}no" >&6 | |
1931 | fi | |
1932 | ||
1933 | fi | |
1934 | if test -z "$ac_cv_prog_CC"; then | |
1935 | ac_ct_CC=$CC | |
1936 | # Extract the first word of "cc", so it can be a program name with args. | |
1937 | set dummy cc; ac_word=$2 | |
1938 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1939 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1940 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1941 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1942 | else | |
1943 | if test -n "$ac_ct_CC"; then | |
1944 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1945 | else | |
1946 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1947 | for as_dir in $PATH | |
1948 | do | |
1949 | IFS=$as_save_IFS | |
1950 | test -z "$as_dir" && as_dir=. | |
1951 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1952 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1953 | ac_cv_prog_ac_ct_CC="cc" | |
1954 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1955 | break 2 | |
1956 | fi | |
1957 | done | |
1958 | done | |
1959 | ||
1960 | fi | |
1961 | fi | |
1962 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1963 | if test -n "$ac_ct_CC"; then | |
1964 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1965 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1966 | else | |
1967 | echo "$as_me:$LINENO: result: no" >&5 | |
1968 | echo "${ECHO_T}no" >&6 | |
1969 | fi | |
1970 | ||
1971 | CC=$ac_ct_CC | |
cd9e5e7c | 1972 | else |
ba479fd2 | 1973 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1974 | fi |
6e3f3080 | 1975 | |
ba479fd2 | 1976 | fi |
6e3f3080 NN |
1977 | if test -z "$CC"; then |
1978 | # Extract the first word of "cc", so it can be a program name with args. | |
1979 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1980 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1981 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1982 | if test "${ac_cv_prog_CC+set}" = set; then | |
1983 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
1984 | else |
1985 | if test -n "$CC"; then | |
1986 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1987 | else | |
1988 | ac_prog_rejected=no | |
ba479fd2 NN |
1989 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1990 | for as_dir in $PATH | |
1991 | do | |
1992 | IFS=$as_save_IFS | |
1993 | test -z "$as_dir" && as_dir=. | |
1994 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1995 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1996 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1997 | ac_prog_rejected=yes | |
1998 | continue | |
1999 | fi | |
2000 | ac_cv_prog_CC="cc" | |
2001 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2002 | break 2 | |
2003 | fi | |
2004 | done | |
2005 | done | |
2006 | ||
6e3f3080 NN |
2007 | if test $ac_prog_rejected = yes; then |
2008 | # We found a bogon in the path, so make sure we never use it. | |
2009 | set dummy $ac_cv_prog_CC | |
2010 | shift | |
ba479fd2 | 2011 | if test $# != 0; then |
6e3f3080 NN |
2012 | # We chose a different compiler from the bogus one. |
2013 | # However, it has the same basename, so the bogon will be chosen | |
2014 | # first if we set CC to just the basename; use the full file name. | |
2015 | shift | |
ba479fd2 | 2016 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2017 | fi |
6e3f3080 NN |
2018 | fi |
2019 | fi | |
2020 | fi | |
ba479fd2 | 2021 | CC=$ac_cv_prog_CC |
6e3f3080 | 2022 | if test -n "$CC"; then |
ba479fd2 NN |
2023 | echo "$as_me:$LINENO: result: $CC" >&5 |
2024 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2025 | else |
ba479fd2 NN |
2026 | echo "$as_me:$LINENO: result: no" >&5 |
2027 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2028 | fi |
6e3f3080 | 2029 | |
ba479fd2 NN |
2030 | fi |
2031 | if test -z "$CC"; then | |
2032 | if test -n "$ac_tool_prefix"; then | |
2033 | for ac_prog in cl | |
2034 | do | |
2035 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2036 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2037 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2038 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2039 | if test "${ac_cv_prog_CC+set}" = set; then | |
2040 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2041 | else |
6e3f3080 NN |
2042 | if test -n "$CC"; then |
2043 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2044 | else | |
ba479fd2 NN |
2045 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2046 | for as_dir in $PATH | |
2047 | do | |
2048 | IFS=$as_save_IFS | |
2049 | test -z "$as_dir" && as_dir=. | |
2050 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2051 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2052 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2053 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2054 | break 2 | |
2055 | fi | |
2056 | done | |
2057 | done | |
2058 | ||
093e61a6 | 2059 | fi |
6e3f3080 | 2060 | fi |
ba479fd2 | 2061 | CC=$ac_cv_prog_CC |
6e3f3080 | 2062 | if test -n "$CC"; then |
ba479fd2 NN |
2063 | echo "$as_me:$LINENO: result: $CC" >&5 |
2064 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2065 | else |
ba479fd2 NN |
2066 | echo "$as_me:$LINENO: result: no" >&5 |
2067 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2068 | fi |
cafe096b | 2069 | |
ba479fd2 NN |
2070 | test -n "$CC" && break |
2071 | done | |
2072 | fi | |
2073 | if test -z "$CC"; then | |
2074 | ac_ct_CC=$CC | |
2075 | for ac_prog in cl | |
2076 | do | |
2077 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2078 | set dummy $ac_prog; ac_word=$2 | |
2079 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2080 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2081 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2083 | else | |
2084 | if test -n "$ac_ct_CC"; then | |
2085 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2086 | else | |
2087 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2088 | for as_dir in $PATH | |
2089 | do | |
2090 | IFS=$as_save_IFS | |
2091 | test -z "$as_dir" && as_dir=. | |
2092 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2093 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2094 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2095 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2096 | break 2 | |
2097 | fi | |
2098 | done | |
2099 | done | |
6e3f3080 | 2100 | |
ba479fd2 NN |
2101 | fi |
2102 | fi | |
2103 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2104 | if test -n "$ac_ct_CC"; then | |
2105 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2106 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2107 | else | |
2108 | echo "$as_me:$LINENO: result: no" >&5 | |
2109 | echo "${ECHO_T}no" >&6 | |
2110 | fi | |
6e3f3080 | 2111 | |
ba479fd2 NN |
2112 | test -n "$ac_ct_CC" && break |
2113 | done | |
63cf211a | 2114 | |
ba479fd2 NN |
2115 | CC=$ac_ct_CC |
2116 | fi | |
2117 | ||
2118 | fi | |
2119 | ||
2120 | ||
2121 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2122 | See \`config.log' for more details." >&5 | |
2123 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2124 | See \`config.log' for more details." >&2;} | |
2125 | { (exit 1); exit 1; }; } | |
2126 | ||
2127 | # Provide some information about the compiler. | |
2128 | echo "$as_me:$LINENO:" \ | |
2129 | "checking for C compiler version" >&5 | |
2130 | ac_compiler=`set X $ac_compile; echo $2` | |
2131 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2132 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2133 | ac_status=$? | |
2134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2135 | (exit $ac_status); } | |
2136 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2137 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2138 | ac_status=$? | |
2139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2140 | (exit $ac_status); } | |
2141 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2142 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2143 | ac_status=$? | |
2144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2145 | (exit $ac_status); } | |
2146 | ||
2147 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2148 | /* confdefs.h. */ |
2149 | _ACEOF | |
2150 | cat confdefs.h >>conftest.$ac_ext | |
2151 | cat >>conftest.$ac_ext <<_ACEOF | |
2152 | /* end confdefs.h. */ | |
2153 | ||
2154 | int | |
2155 | main () | |
2156 | { | |
63cf211a | 2157 | |
ba479fd2 NN |
2158 | ; |
2159 | return 0; | |
2160 | } | |
2161 | _ACEOF | |
2162 | ac_clean_files_save=$ac_clean_files | |
2163 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2164 | # Try to create an executable without -o first, disregard a.out. | |
2165 | # It will help us diagnose broken compilers, and finding out an intuition | |
2166 | # of exeext. | |
86da66b5 HPN |
2167 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2168 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2169 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2170 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2171 | (eval $ac_link_default) 2>&5 | |
2172 | ac_status=$? | |
2173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2174 | (exit $ac_status); }; then | |
2175 | # Find the output, starting from the most likely. This scheme is | |
2176 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2177 | # resort. | |
2178 | ||
2179 | # Be careful to initialize this variable, since it used to be cached. | |
2180 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2181 | ac_cv_exeext= | |
2182 | # b.out is created by i960 compilers. | |
2183 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2184 | do | |
2185 | test -f "$ac_file" || continue | |
2186 | case $ac_file in | |
2187 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2188 | ;; |
ba479fd2 | 2189 | conftest.$ac_ext ) |
86da66b5 HPN |
2190 | # This is the source file. |
2191 | ;; | |
ba479fd2 | 2192 | [ab].out ) |
86da66b5 HPN |
2193 | # We found the default executable, but exeext='' is most |
2194 | # certainly right. | |
2195 | break;; | |
ba479fd2 | 2196 | *.* ) |
86da66b5 HPN |
2197 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2198 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2199 | # but it would be cool to find out if it's true. Does anybody | |
2200 | # maintain Libtool? --akim. | |
2201 | export ac_cv_exeext | |
2202 | break;; | |
ba479fd2 | 2203 | * ) |
86da66b5 | 2204 | break;; |
ba479fd2 NN |
2205 | esac |
2206 | done | |
2207 | else | |
2208 | echo "$as_me: failed program was:" >&5 | |
2209 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2210 | ||
2211 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2212 | See \`config.log' for more details." >&5 | |
2213 | echo "$as_me: error: C compiler cannot create executables | |
2214 | See \`config.log' for more details." >&2;} | |
2215 | { (exit 77); exit 77; }; } | |
2216 | fi | |
2217 | ||
2218 | ac_exeext=$ac_cv_exeext | |
2219 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2220 | echo "${ECHO_T}$ac_file" >&6 | |
2221 | ||
2222 | # Check the compiler produces executables we can run. If not, either | |
2223 | # the compiler is broken, or we cross compile. | |
2224 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2225 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2226 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2227 | # If not cross compiling, check that we can run a simple program. | |
2228 | if test "$cross_compiling" != yes; then | |
2229 | if { ac_try='./$ac_file' | |
2230 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2231 | (eval $ac_try) 2>&5 | |
2232 | ac_status=$? | |
2233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2234 | (exit $ac_status); }; }; then | |
2235 | cross_compiling=no | |
6e3f3080 | 2236 | else |
ba479fd2 NN |
2237 | if test "$cross_compiling" = maybe; then |
2238 | cross_compiling=yes | |
2239 | else | |
2240 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2241 | If you meant to cross compile, use \`--host'. | |
2242 | See \`config.log' for more details." >&5 | |
2243 | echo "$as_me: error: cannot run C compiled programs. | |
2244 | If you meant to cross compile, use \`--host'. | |
2245 | See \`config.log' for more details." >&2;} | |
2246 | { (exit 1); exit 1; }; } | |
2247 | fi | |
6e3f3080 NN |
2248 | fi |
2249 | fi | |
ba479fd2 NN |
2250 | echo "$as_me:$LINENO: result: yes" >&5 |
2251 | echo "${ECHO_T}yes" >&6 | |
2252 | ||
2253 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2254 | ac_clean_files=$ac_clean_files_save | |
2255 | # Check the compiler produces executables we can run. If not, either | |
2256 | # the compiler is broken, or we cross compile. | |
2257 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2258 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2259 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2260 | echo "${ECHO_T}$cross_compiling" >&6 | |
2261 | ||
2262 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2263 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2264 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2265 | (eval $ac_link) 2>&5 | |
2266 | ac_status=$? | |
2267 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2268 | (exit $ac_status); }; then | |
2269 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2270 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2271 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2272 | # `rm'. | |
2273 | for ac_file in conftest.exe conftest conftest.*; do | |
2274 | test -f "$ac_file" || continue | |
2275 | case $ac_file in | |
2276 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2277 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2278 | export ac_cv_exeext |
2279 | break;; | |
ba479fd2 NN |
2280 | * ) break;; |
2281 | esac | |
2282 | done | |
e9a25f70 | 2283 | else |
ba479fd2 NN |
2284 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2285 | See \`config.log' for more details." >&5 | |
2286 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2287 | See \`config.log' for more details." >&2;} | |
2288 | { (exit 1); exit 1; }; } | |
2289 | fi | |
2290 | ||
2291 | rm -f conftest$ac_cv_exeext | |
2292 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2293 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2294 | ||
2295 | rm -f conftest.$ac_ext | |
2296 | EXEEXT=$ac_cv_exeext | |
2297 | ac_exeext=$EXEEXT | |
2298 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2299 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2300 | if test "${ac_cv_objext+set}" = set; then | |
2301 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2302 | else | |
2303 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2304 | /* confdefs.h. */ |
2305 | _ACEOF | |
2306 | cat confdefs.h >>conftest.$ac_ext | |
2307 | cat >>conftest.$ac_ext <<_ACEOF | |
2308 | /* end confdefs.h. */ | |
2309 | ||
2310 | int | |
2311 | main () | |
2312 | { | |
6e3f3080 | 2313 | |
ba479fd2 NN |
2314 | ; |
2315 | return 0; | |
2316 | } | |
2317 | _ACEOF | |
2318 | rm -f conftest.o conftest.obj | |
2319 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2320 | (eval $ac_compile) 2>&5 | |
2321 | ac_status=$? | |
2322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2323 | (exit $ac_status); }; then | |
2324 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2325 | case $ac_file in | |
2326 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2327 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2328 | break;; | |
2329 | esac | |
2330 | done | |
63cf211a | 2331 | else |
ba479fd2 NN |
2332 | echo "$as_me: failed program was:" >&5 |
2333 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2334 | ||
2335 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2336 | See \`config.log' for more details." >&5 | |
2337 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2338 | See \`config.log' for more details." >&2;} | |
2339 | { (exit 1); exit 1; }; } | |
2340 | fi | |
2341 | ||
2342 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2343 | fi | |
2344 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2345 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2346 | OBJEXT=$ac_cv_objext | |
2347 | ac_objext=$OBJEXT | |
2348 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2349 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2350 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2351 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2352 | else | |
2353 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2354 | /* confdefs.h. */ |
2355 | _ACEOF | |
2356 | cat confdefs.h >>conftest.$ac_ext | |
2357 | cat >>conftest.$ac_ext <<_ACEOF | |
2358 | /* end confdefs.h. */ | |
2359 | ||
2360 | int | |
2361 | main () | |
2362 | { | |
2363 | #ifndef __GNUC__ | |
2364 | choke me | |
2365 | #endif | |
6e3f3080 | 2366 | |
ba479fd2 NN |
2367 | ; |
2368 | return 0; | |
2369 | } | |
2370 | _ACEOF | |
2371 | rm -f conftest.$ac_objext | |
2372 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2373 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2374 | ac_status=$? |
86da66b5 HPN |
2375 | grep -v '^ *+' conftest.er1 >conftest.err |
2376 | rm -f conftest.er1 | |
2377 | cat conftest.err >&5 | |
ba479fd2 NN |
2378 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2379 | (exit $ac_status); } && | |
d2640b91 | 2380 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2382 | (eval $ac_try) 2>&5 | |
2383 | ac_status=$? | |
2384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2385 | (exit $ac_status); }; } && | |
2386 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2388 | (eval $ac_try) 2>&5 | |
2389 | ac_status=$? | |
2390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2391 | (exit $ac_status); }; }; then | |
2392 | ac_compiler_gnu=yes | |
2393 | else | |
2394 | echo "$as_me: failed program was:" >&5 | |
2395 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2396 | ||
2397 | ac_compiler_gnu=no | |
2398 | fi | |
86da66b5 | 2399 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2400 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2401 | ||
2402 | fi | |
2403 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2404 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2405 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2406 | ac_test_CFLAGS=${CFLAGS+set} | |
2407 | ac_save_CFLAGS=$CFLAGS | |
2408 | CFLAGS="-g" | |
2409 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2410 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2411 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2412 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2413 | else | |
2414 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2415 | /* confdefs.h. */ |
2416 | _ACEOF | |
2417 | cat confdefs.h >>conftest.$ac_ext | |
2418 | cat >>conftest.$ac_ext <<_ACEOF | |
2419 | /* end confdefs.h. */ | |
2420 | ||
2421 | int | |
2422 | main () | |
2423 | { | |
2424 | ||
2425 | ; | |
2426 | return 0; | |
2427 | } | |
2428 | _ACEOF | |
2429 | rm -f conftest.$ac_objext | |
2430 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2431 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2432 | ac_status=$? |
86da66b5 HPN |
2433 | grep -v '^ *+' conftest.er1 >conftest.err |
2434 | rm -f conftest.er1 | |
2435 | cat conftest.err >&5 | |
ba479fd2 NN |
2436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2437 | (exit $ac_status); } && | |
d2640b91 | 2438 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2439 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2440 | (eval $ac_try) 2>&5 | |
2441 | ac_status=$? | |
2442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2443 | (exit $ac_status); }; } && | |
2444 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2445 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2446 | (eval $ac_try) 2>&5 | |
2447 | ac_status=$? | |
2448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2449 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2450 | ac_cv_prog_cc_g=yes |
2451 | else | |
ba479fd2 NN |
2452 | echo "$as_me: failed program was:" >&5 |
2453 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2454 | |
ba479fd2 | 2455 | ac_cv_prog_cc_g=no |
6e3f3080 | 2456 | fi |
86da66b5 | 2457 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2458 | fi |
2459 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2460 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2461 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2462 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2463 | elif test $ac_cv_prog_cc_g = yes; then |
2464 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2465 | CFLAGS="-g -O2" |
2466 | else | |
cd9e5e7c | 2467 | CFLAGS="-g" |
81814e35 | 2468 | fi |
3723cad9 | 2469 | else |
cd9e5e7c MK |
2470 | if test "$GCC" = yes; then |
2471 | CFLAGS="-O2" | |
2472 | else | |
2473 | CFLAGS= | |
2474 | fi | |
e9a25f70 | 2475 | fi |
ba479fd2 NN |
2476 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2477 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2478 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2480 | else | |
2481 | ac_cv_prog_cc_stdc=no | |
2482 | ac_save_CC=$CC | |
2483 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2484 | /* confdefs.h. */ |
2485 | _ACEOF | |
2486 | cat confdefs.h >>conftest.$ac_ext | |
2487 | cat >>conftest.$ac_ext <<_ACEOF | |
2488 | /* end confdefs.h. */ | |
2489 | #include <stdarg.h> | |
2490 | #include <stdio.h> | |
2491 | #include <sys/types.h> | |
2492 | #include <sys/stat.h> | |
2493 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2494 | struct buf { int x; }; | |
2495 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2496 | static char *e (p, i) | |
2497 | char **p; | |
2498 | int i; | |
2499 | { | |
2500 | return p[i]; | |
2501 | } | |
2502 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2503 | { | |
2504 | char *s; | |
2505 | va_list v; | |
2506 | va_start (v,p); | |
2507 | s = g (p, va_arg (v,int)); | |
2508 | va_end (v); | |
2509 | return s; | |
2510 | } | |
86da66b5 HPN |
2511 | |
2512 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2513 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2514 | These don't provoke an error unfortunately, instead are silently treated | |
2515 | as 'x'. The following induces an error, until -std1 is added to get | |
2516 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2517 | array size at least. It's necessary to write '\x00'==0 to get something | |
2518 | that's true only with -std1. */ | |
2519 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2520 | ||
ba479fd2 NN |
2521 | int test (int i, double x); |
2522 | struct s1 {int (*f) (int a);}; | |
2523 | struct s2 {int (*f) (double a);}; | |
2524 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2525 | int argc; | |
2526 | char **argv; | |
2527 | int | |
2528 | main () | |
2529 | { | |
2530 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2531 | ; | |
2532 | return 0; | |
2533 | } | |
2534 | _ACEOF | |
2535 | # Don't try gcc -ansi; that turns off useful extensions and | |
2536 | # breaks some systems' header files. | |
2537 | # AIX -qlanglvl=ansi | |
2538 | # Ultrix and OSF/1 -std1 | |
2539 | # HP-UX 10.20 and later -Ae | |
2540 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2541 | # SVR4 -Xc -D__EXTENSIONS__ | |
2542 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2543 | do | |
2544 | CC="$ac_save_CC $ac_arg" | |
2545 | rm -f conftest.$ac_objext | |
2546 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2547 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2548 | ac_status=$? |
86da66b5 HPN |
2549 | grep -v '^ *+' conftest.er1 >conftest.err |
2550 | rm -f conftest.er1 | |
2551 | cat conftest.err >&5 | |
ba479fd2 NN |
2552 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2553 | (exit $ac_status); } && | |
d2640b91 | 2554 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2555 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2556 | (eval $ac_try) 2>&5 | |
2557 | ac_status=$? | |
2558 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2559 | (exit $ac_status); }; } && | |
2560 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2561 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2562 | (eval $ac_try) 2>&5 | |
2563 | ac_status=$? | |
2564 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2565 | (exit $ac_status); }; }; then | |
2566 | ac_cv_prog_cc_stdc=$ac_arg | |
2567 | break | |
2568 | else | |
2569 | echo "$as_me: failed program was:" >&5 | |
2570 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2571 | |
ba479fd2 | 2572 | fi |
86da66b5 | 2573 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2574 | done |
2575 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2576 | CC=$ac_save_CC | |
2577 | ||
2578 | fi | |
2579 | ||
2580 | case "x$ac_cv_prog_cc_stdc" in | |
2581 | x|xno) | |
2582 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2583 | echo "${ECHO_T}none needed" >&6 ;; | |
2584 | *) | |
2585 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2586 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2587 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2588 | esac | |
2589 | ||
2590 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2591 | # in C++ we need to declare it. In case someone uses the same compiler | |
2592 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2593 | # the declaration of exit, since it's the most demanding environment. | |
2594 | cat >conftest.$ac_ext <<_ACEOF | |
2595 | #ifndef __cplusplus | |
2596 | choke me | |
2597 | #endif | |
2598 | _ACEOF | |
2599 | rm -f conftest.$ac_objext | |
2600 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2601 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2602 | ac_status=$? |
86da66b5 HPN |
2603 | grep -v '^ *+' conftest.er1 >conftest.err |
2604 | rm -f conftest.er1 | |
2605 | cat conftest.err >&5 | |
ba479fd2 NN |
2606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2607 | (exit $ac_status); } && | |
d2640b91 | 2608 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2609 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2610 | (eval $ac_try) 2>&5 | |
2611 | ac_status=$? | |
2612 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2613 | (exit $ac_status); }; } && | |
2614 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2615 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2616 | (eval $ac_try) 2>&5 | |
2617 | ac_status=$? | |
2618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2619 | (exit $ac_status); }; }; then | |
2620 | for ac_declaration in \ | |
86da66b5 | 2621 | '' \ |
ba479fd2 NN |
2622 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2623 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2624 | 'extern "C" void exit (int) throw ();' \ | |
2625 | 'extern "C" void exit (int);' \ | |
2626 | 'void exit (int);' | |
2627 | do | |
2628 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2629 | /* confdefs.h. */ |
2630 | _ACEOF | |
2631 | cat confdefs.h >>conftest.$ac_ext | |
2632 | cat >>conftest.$ac_ext <<_ACEOF | |
2633 | /* end confdefs.h. */ | |
33e70558 | 2634 | $ac_declaration |
86da66b5 | 2635 | #include <stdlib.h> |
ba479fd2 NN |
2636 | int |
2637 | main () | |
2638 | { | |
2639 | exit (42); | |
2640 | ; | |
2641 | return 0; | |
2642 | } | |
2643 | _ACEOF | |
2644 | rm -f conftest.$ac_objext | |
2645 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2646 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2647 | ac_status=$? |
86da66b5 HPN |
2648 | grep -v '^ *+' conftest.er1 >conftest.err |
2649 | rm -f conftest.er1 | |
2650 | cat conftest.err >&5 | |
ba479fd2 NN |
2651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2652 | (exit $ac_status); } && | |
d2640b91 | 2653 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2654 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2655 | (eval $ac_try) 2>&5 | |
2656 | ac_status=$? | |
2657 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2658 | (exit $ac_status); }; } && | |
2659 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2660 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2661 | (eval $ac_try) 2>&5 | |
2662 | ac_status=$? | |
2663 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2664 | (exit $ac_status); }; }; then | |
2665 | : | |
2666 | else | |
2667 | echo "$as_me: failed program was:" >&5 | |
2668 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2669 | ||
2670 | continue | |
2671 | fi | |
86da66b5 | 2672 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2673 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2674 | /* confdefs.h. */ |
2675 | _ACEOF | |
2676 | cat confdefs.h >>conftest.$ac_ext | |
2677 | cat >>conftest.$ac_ext <<_ACEOF | |
2678 | /* end confdefs.h. */ | |
2679 | $ac_declaration | |
2680 | int | |
2681 | main () | |
2682 | { | |
2683 | exit (42); | |
2684 | ; | |
2685 | return 0; | |
2686 | } | |
2687 | _ACEOF | |
2688 | rm -f conftest.$ac_objext | |
2689 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2690 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2691 | ac_status=$? |
86da66b5 HPN |
2692 | grep -v '^ *+' conftest.er1 >conftest.err |
2693 | rm -f conftest.er1 | |
2694 | cat conftest.err >&5 | |
ba479fd2 NN |
2695 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2696 | (exit $ac_status); } && | |
d2640b91 | 2697 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2699 | (eval $ac_try) 2>&5 | |
2700 | ac_status=$? | |
2701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2702 | (exit $ac_status); }; } && | |
2703 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2705 | (eval $ac_try) 2>&5 | |
2706 | ac_status=$? | |
2707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2708 | (exit $ac_status); }; }; then | |
2709 | break | |
3ec83fc2 | 2710 | else |
ba479fd2 NN |
2711 | echo "$as_me: failed program was:" >&5 |
2712 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2713 | ||
6e3f3080 | 2714 | fi |
86da66b5 | 2715 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2716 | done |
2717 | rm -f conftest* | |
2718 | if test -n "$ac_declaration"; then | |
2719 | echo '#ifdef __cplusplus' >>confdefs.h | |
2720 | echo $ac_declaration >>confdefs.h | |
2721 | echo '#endif' >>confdefs.h | |
2722 | fi | |
2723 | ||
3ec83fc2 | 2724 | else |
ba479fd2 NN |
2725 | echo "$as_me: failed program was:" >&5 |
2726 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2727 | ||
2728 | fi | |
86da66b5 | 2729 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2730 | ac_ext=c |
2731 | ac_cpp='$CPP $CPPFLAGS' | |
2732 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2733 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2734 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2735 | ||
2736 | if test "x$CC" != xcc; then | |
2737 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2738 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2739 | else | |
2740 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2741 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2742 | fi | |
2743 | set dummy $CC; ac_cc=`echo $2 | | |
2744 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2745 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2746 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2747 | else | |
2748 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2749 | /* confdefs.h. */ |
2750 | _ACEOF | |
2751 | cat confdefs.h >>conftest.$ac_ext | |
2752 | cat >>conftest.$ac_ext <<_ACEOF | |
2753 | /* end confdefs.h. */ | |
2754 | ||
2755 | int | |
2756 | main () | |
2757 | { | |
2758 | ||
2759 | ; | |
2760 | return 0; | |
2761 | } | |
2762 | _ACEOF | |
3ec83fc2 RH |
2763 | # Make sure it works both with $CC and with simple cc. |
2764 | # We do the test twice because some compilers refuse to overwrite an | |
2765 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2766 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2767 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2768 | (eval $ac_try) 2>&5 | |
2769 | ac_status=$? | |
2770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2771 | (exit $ac_status); } && | |
2772 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2773 | (eval $ac_try) 2>&5 | |
2774 | ac_status=$? | |
2775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2776 | (exit $ac_status); }; | |
3ec83fc2 RH |
2777 | then |
2778 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2779 | if test "x$CC" != xcc; then | |
2780 | # Test first that cc exists at all. | |
ba479fd2 NN |
2781 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2782 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2783 | (eval $ac_try) 2>&5 | |
2784 | ac_status=$? | |
2785 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2786 | (exit $ac_status); }; }; then | |
2787 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2788 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2789 | (eval $ac_try) 2>&5 | |
2790 | ac_status=$? | |
2791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2792 | (exit $ac_status); } && | |
2793 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2794 | (eval $ac_try) 2>&5 | |
2795 | ac_status=$? | |
2796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2797 | (exit $ac_status); }; | |
3ec83fc2 | 2798 | then |
86da66b5 HPN |
2799 | # cc works too. |
2800 | : | |
3ec83fc2 | 2801 | else |
86da66b5 HPN |
2802 | # cc exists but doesn't like -o. |
2803 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2804 | fi |
2805 | fi | |
2806 | fi | |
2807 | else | |
2808 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2809 | fi | |
2810 | rm -f conftest* | |
2811 | ||
2812 | fi | |
2813 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2814 | echo "$as_me:$LINENO: result: yes" >&5 |
2815 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2816 | else |
ba479fd2 NN |
2817 | echo "$as_me:$LINENO: result: no" >&5 |
2818 | echo "${ECHO_T}no" >&6 | |
2819 | ||
2820 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2821 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2822 | _ACEOF |
3ec83fc2 RH |
2823 | |
2824 | fi | |
2825 | ||
414d23ae HPN |
2826 | # autoconf is lame and doesn't give us any substitution variable for this. |
2827 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2828 | NO_MINUS_C_MINUS_O=yes | |
2829 | else | |
2830 | OUTPUT_OPTION='-o $@' | |
2831 | fi | |
2832 | ||
2833 | ||
2834 | ||
73458fb7 NN |
2835 | # ------------------------- |
2836 | # Check C compiler features | |
2837 | # ------------------------- | |
2838 | ||
ba479fd2 NN |
2839 | ac_ext=c |
2840 | ac_cpp='$CPP $CPPFLAGS' | |
2841 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2842 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2843 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2844 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2845 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2846 | # On Suns, sometimes $CPP names a directory. |
2847 | if test -n "$CPP" && test -d "$CPP"; then | |
2848 | CPP= | |
2849 | fi | |
2850 | if test -z "$CPP"; then | |
ba479fd2 NN |
2851 | if test "${ac_cv_prog_CPP+set}" = set; then |
2852 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2853 | else | |
2854 | # Double quotes because CPP needs to be expanded | |
2855 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2856 | do | |
2857 | ac_preproc_ok=false | |
2858 | for ac_c_preproc_warn_flag in '' yes | |
2859 | do | |
2860 | # Use a header file that comes with gcc, so configuring glibc | |
2861 | # with a fresh cross-compiler works. | |
2862 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2863 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2864 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2865 | # not just through cpp. "Syntax error" is here to catch this case. |
2866 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2867 | /* confdefs.h. */ |
2868 | _ACEOF | |
2869 | cat confdefs.h >>conftest.$ac_ext | |
2870 | cat >>conftest.$ac_ext <<_ACEOF | |
2871 | /* end confdefs.h. */ | |
2872 | #ifdef __STDC__ | |
2873 | # include <limits.h> | |
2874 | #else | |
2875 | # include <assert.h> | |
2876 | #endif | |
86da66b5 | 2877 | Syntax error |
ba479fd2 NN |
2878 | _ACEOF |
2879 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2880 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2881 | ac_status=$? | |
2882 | grep -v '^ *+' conftest.er1 >conftest.err | |
2883 | rm -f conftest.er1 | |
2884 | cat conftest.err >&5 | |
2885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2886 | (exit $ac_status); } >/dev/null; then | |
2887 | if test -s conftest.err; then | |
2888 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2889 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2890 | else |
2891 | ac_cpp_err= | |
2892 | fi | |
2893 | else | |
2894 | ac_cpp_err=yes | |
2895 | fi | |
2896 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2897 | : |
cafe096b | 2898 | else |
ba479fd2 NN |
2899 | echo "$as_me: failed program was:" >&5 |
2900 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2901 | ||
2902 | # Broken: fails on valid input. | |
2903 | continue | |
2904 | fi | |
2905 | rm -f conftest.err conftest.$ac_ext | |
2906 | ||
2907 | # OK, works on sane cases. Now check whether non-existent headers | |
2908 | # can be detected and how. | |
2909 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2910 | /* confdefs.h. */ |
2911 | _ACEOF | |
2912 | cat confdefs.h >>conftest.$ac_ext | |
2913 | cat >>conftest.$ac_ext <<_ACEOF | |
2914 | /* end confdefs.h. */ | |
2915 | #include <ac_nonexistent.h> | |
2916 | _ACEOF | |
2917 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2918 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2919 | ac_status=$? | |
2920 | grep -v '^ *+' conftest.er1 >conftest.err | |
2921 | rm -f conftest.er1 | |
2922 | cat conftest.err >&5 | |
2923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2924 | (exit $ac_status); } >/dev/null; then | |
2925 | if test -s conftest.err; then | |
2926 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2927 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2928 | else |
2929 | ac_cpp_err= | |
2930 | fi | |
2931 | else | |
2932 | ac_cpp_err=yes | |
2933 | fi | |
2934 | if test -z "$ac_cpp_err"; then | |
2935 | # Broken: success on invalid input. | |
2936 | continue | |
2937 | else | |
2938 | echo "$as_me: failed program was:" >&5 | |
2939 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2940 | ||
2941 | # Passes both tests. | |
2942 | ac_preproc_ok=: | |
2943 | break | |
2944 | fi | |
2945 | rm -f conftest.err conftest.$ac_ext | |
2946 | ||
2947 | done | |
2948 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2949 | rm -f conftest.err conftest.$ac_ext | |
2950 | if $ac_preproc_ok; then | |
2951 | break | |
2952 | fi | |
2953 | ||
2954 | done | |
2955 | ac_cv_prog_CPP=$CPP | |
2956 | ||
2957 | fi | |
2958 | CPP=$ac_cv_prog_CPP | |
2959 | else | |
2960 | ac_cv_prog_CPP=$CPP | |
2961 | fi | |
2962 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2963 | echo "${ECHO_T}$CPP" >&6 | |
2964 | ac_preproc_ok=false | |
2965 | for ac_c_preproc_warn_flag in '' yes | |
2966 | do | |
2967 | # Use a header file that comes with gcc, so configuring glibc | |
2968 | # with a fresh cross-compiler works. | |
2969 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2970 | # <limits.h> exists even on freestanding compilers. | |
2971 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2972 | # not just through cpp. "Syntax error" is here to catch this case. | |
2973 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2974 | /* confdefs.h. */ |
2975 | _ACEOF | |
2976 | cat confdefs.h >>conftest.$ac_ext | |
2977 | cat >>conftest.$ac_ext <<_ACEOF | |
2978 | /* end confdefs.h. */ | |
2979 | #ifdef __STDC__ | |
2980 | # include <limits.h> | |
2981 | #else | |
2982 | # include <assert.h> | |
2983 | #endif | |
86da66b5 | 2984 | Syntax error |
ba479fd2 NN |
2985 | _ACEOF |
2986 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2987 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2988 | ac_status=$? | |
2989 | grep -v '^ *+' conftest.er1 >conftest.err | |
2990 | rm -f conftest.er1 | |
2991 | cat conftest.err >&5 | |
2992 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2993 | (exit $ac_status); } >/dev/null; then | |
2994 | if test -s conftest.err; then | |
2995 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2996 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2997 | else |
2998 | ac_cpp_err= | |
2999 | fi | |
3000 | else | |
3001 | ac_cpp_err=yes | |
3002 | fi | |
3003 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3004 | : |
414d23ae | 3005 | else |
ba479fd2 NN |
3006 | echo "$as_me: failed program was:" >&5 |
3007 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3008 | ||
3009 | # Broken: fails on valid input. | |
3010 | continue | |
3011 | fi | |
3012 | rm -f conftest.err conftest.$ac_ext | |
3013 | ||
3014 | # OK, works on sane cases. Now check whether non-existent headers | |
3015 | # can be detected and how. | |
3016 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3017 | /* confdefs.h. */ |
3018 | _ACEOF | |
3019 | cat confdefs.h >>conftest.$ac_ext | |
3020 | cat >>conftest.$ac_ext <<_ACEOF | |
3021 | /* end confdefs.h. */ | |
3022 | #include <ac_nonexistent.h> | |
3023 | _ACEOF | |
3024 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3025 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3026 | ac_status=$? | |
3027 | grep -v '^ *+' conftest.er1 >conftest.err | |
3028 | rm -f conftest.er1 | |
3029 | cat conftest.err >&5 | |
3030 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3031 | (exit $ac_status); } >/dev/null; then | |
3032 | if test -s conftest.err; then | |
3033 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3034 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3035 | else |
3036 | ac_cpp_err= | |
3037 | fi | |
6e3f3080 | 3038 | else |
ba479fd2 | 3039 | ac_cpp_err=yes |
63cf211a | 3040 | fi |
ba479fd2 NN |
3041 | if test -z "$ac_cpp_err"; then |
3042 | # Broken: success on invalid input. | |
3043 | continue | |
3044 | else | |
3045 | echo "$as_me: failed program was:" >&5 | |
3046 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3047 | ||
3048 | # Passes both tests. | |
3049 | ac_preproc_ok=: | |
3050 | break | |
63cf211a | 3051 | fi |
ba479fd2 NN |
3052 | rm -f conftest.err conftest.$ac_ext |
3053 | ||
3054 | done | |
3055 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3056 | rm -f conftest.err conftest.$ac_ext | |
3057 | if $ac_preproc_ok; then | |
3058 | : | |
6e3f3080 | 3059 | else |
ba479fd2 NN |
3060 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3061 | See \`config.log' for more details." >&5 | |
3062 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3063 | See \`config.log' for more details." >&2;} | |
3064 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3065 | fi |
3066 | ||
ba479fd2 NN |
3067 | ac_ext=c |
3068 | ac_cpp='$CPP $CPPFLAGS' | |
3069 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3070 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3071 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3072 | ||
b5472e1d | 3073 | |
ba479fd2 NN |
3074 | echo "$as_me:$LINENO: checking for inline" >&5 |
3075 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3076 | if test "${ac_cv_c_inline+set}" = set; then | |
3077 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3078 | else |
3079 | ac_cv_c_inline=no | |
3080 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3081 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3082 | /* confdefs.h. */ |
3083 | _ACEOF | |
3084 | cat confdefs.h >>conftest.$ac_ext | |
3085 | cat >>conftest.$ac_ext <<_ACEOF | |
3086 | /* end confdefs.h. */ | |
3087 | #ifndef __cplusplus | |
3088 | typedef int foo_t; | |
3089 | static $ac_kw foo_t static_foo () {return 0; } | |
3090 | $ac_kw foo_t foo () {return 0; } | |
3091 | #endif | |
414d23ae | 3092 | |
ba479fd2 NN |
3093 | _ACEOF |
3094 | rm -f conftest.$ac_objext | |
3095 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3096 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3097 | ac_status=$? |
86da66b5 HPN |
3098 | grep -v '^ *+' conftest.er1 >conftest.err |
3099 | rm -f conftest.er1 | |
3100 | cat conftest.err >&5 | |
ba479fd2 NN |
3101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3102 | (exit $ac_status); } && | |
d2640b91 | 3103 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3104 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3105 | (eval $ac_try) 2>&5 | |
3106 | ac_status=$? | |
3107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3108 | (exit $ac_status); }; } && | |
3109 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3111 | (eval $ac_try) 2>&5 | |
3112 | ac_status=$? | |
3113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3114 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3115 | ac_cv_c_inline=$ac_kw; break |
3116 | else | |
ba479fd2 NN |
3117 | echo "$as_me: failed program was:" >&5 |
3118 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3119 | ||
414d23ae | 3120 | fi |
86da66b5 | 3121 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3122 | done |
3123 | ||
3124 | fi | |
ba479fd2 NN |
3125 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3126 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3127 | |
3128 | ||
ba479fd2 | 3129 | case $ac_cv_c_inline in |
414d23ae | 3130 | inline | yes) ;; |
86da66b5 HPN |
3131 | *) |
3132 | case $ac_cv_c_inline in | |
3133 | no) ac_val=;; | |
3134 | *) ac_val=$ac_cv_c_inline;; | |
3135 | esac | |
3136 | cat >>confdefs.h <<_ACEOF | |
3137 | #ifndef __cplusplus | |
3138 | #define inline $ac_val | |
3139 | #endif | |
ba479fd2 | 3140 | _ACEOF |
86da66b5 | 3141 | ;; |
414d23ae HPN |
3142 | esac |
3143 | ||
414d23ae | 3144 | |
ba479fd2 NN |
3145 | echo "$as_me:$LINENO: checking for long long int" >&5 |
3146 | echo $ECHO_N "checking for long long int... $ECHO_C" >&6 | |
3147 | if test "${ac_cv_c_long_long+set}" = set; then | |
3148 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3149 | else |
ba479fd2 | 3150 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3151 | /* confdefs.h. */ |
3152 | _ACEOF | |
3153 | cat confdefs.h >>conftest.$ac_ext | |
3154 | cat >>conftest.$ac_ext <<_ACEOF | |
3155 | /* end confdefs.h. */ | |
414d23ae | 3156 | |
ba479fd2 NN |
3157 | int |
3158 | main () | |
3159 | { | |
414d23ae | 3160 | long long int i; |
ba479fd2 NN |
3161 | ; |
3162 | return 0; | |
3163 | } | |
3164 | _ACEOF | |
3165 | rm -f conftest.$ac_objext | |
3166 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3167 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3168 | ac_status=$? |
86da66b5 HPN |
3169 | grep -v '^ *+' conftest.er1 >conftest.err |
3170 | rm -f conftest.er1 | |
3171 | cat conftest.err >&5 | |
ba479fd2 NN |
3172 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3173 | (exit $ac_status); } && | |
d2640b91 | 3174 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3175 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3176 | (eval $ac_try) 2>&5 | |
3177 | ac_status=$? | |
3178 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3179 | (exit $ac_status); }; } && | |
3180 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3182 | (eval $ac_try) 2>&5 | |
3183 | ac_status=$? | |
3184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3185 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3186 | ac_cv_c_long_long=yes |
3187 | else | |
ba479fd2 NN |
3188 | echo "$as_me: failed program was:" >&5 |
3189 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3190 | ||
3191 | ac_cv_c_long_long=no | |
414d23ae | 3192 | fi |
86da66b5 | 3193 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3194 | fi |
ba479fd2 NN |
3195 | echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 |
3196 | echo "${ECHO_T}$ac_cv_c_long_long" >&6 | |
63cf211a | 3197 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3198 | |
3199 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3200 | #define HAVE_LONG_LONG 1 |
ba479fd2 | 3201 | _ACEOF |
414d23ae HPN |
3202 | |
3203 | fi | |
ba479fd2 NN |
3204 | echo "$as_me:$LINENO: checking for __int64" >&5 |
3205 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
3206 | if test "${ac_cv_c___int64+set}" = set; then | |
3207 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3208 | else | |
3209 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3210 | /* confdefs.h. */ |
3211 | _ACEOF | |
3212 | cat confdefs.h >>conftest.$ac_ext | |
3213 | cat >>conftest.$ac_ext <<_ACEOF | |
3214 | /* end confdefs.h. */ | |
3215 | ||
3216 | int | |
3217 | main () | |
3218 | { | |
414d23ae | 3219 | __int64 i; |
ba479fd2 NN |
3220 | ; |
3221 | return 0; | |
3222 | } | |
3223 | _ACEOF | |
3224 | rm -f conftest.$ac_objext | |
3225 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3226 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3227 | ac_status=$? |
86da66b5 HPN |
3228 | grep -v '^ *+' conftest.er1 >conftest.err |
3229 | rm -f conftest.er1 | |
3230 | cat conftest.err >&5 | |
ba479fd2 NN |
3231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3232 | (exit $ac_status); } && | |
d2640b91 | 3233 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3235 | (eval $ac_try) 2>&5 | |
3236 | ac_status=$? | |
3237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3238 | (exit $ac_status); }; } && | |
3239 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3240 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3241 | (eval $ac_try) 2>&5 | |
3242 | ac_status=$? | |
3243 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3244 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3245 | ac_cv_c___int64=yes |
3246 | else | |
ba479fd2 NN |
3247 | echo "$as_me: failed program was:" >&5 |
3248 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3249 | ||
3250 | ac_cv_c___int64=no | |
414d23ae | 3251 | fi |
86da66b5 | 3252 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3253 | fi |
ba479fd2 NN |
3254 | echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 |
3255 | echo "${ECHO_T}$ac_cv_c___int64" >&6 | |
63cf211a | 3256 | if test $ac_cv_c___int64 = yes; then |
ba479fd2 NN |
3257 | |
3258 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3259 | #define HAVE___INT64 1 |
ba479fd2 | 3260 | _ACEOF |
414d23ae HPN |
3261 | |
3262 | fi | |
3263 | ||
414d23ae HPN |
3264 | |
3265 | # sizeof(char) is 1 by definition. | |
ba479fd2 NN |
3266 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3267 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3268 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3269 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd KG |
3270 | else |
3271 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
ba479fd2 | 3272 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3273 | /* confdefs.h. */ |
3274 | _ACEOF | |
3275 | cat confdefs.h >>conftest.$ac_ext | |
3276 | cat >>conftest.$ac_ext <<_ACEOF | |
3277 | /* end confdefs.h. */ | |
75b6f3fd KG |
3278 | #include "confdefs.h" |
3279 | #include <sys/types.h> | |
3280 | ||
3281 | ||
ba479fd2 NN |
3282 | int |
3283 | main () | |
3284 | { | |
75b6f3fd | 3285 | switch (0) case 0: case (sizeof (void *) == $ac_size):; |
ba479fd2 NN |
3286 | ; |
3287 | return 0; | |
3288 | } | |
3289 | _ACEOF | |
3290 | rm -f conftest.$ac_objext | |
3291 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3292 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3293 | ac_status=$? |
86da66b5 HPN |
3294 | grep -v '^ *+' conftest.er1 >conftest.err |
3295 | rm -f conftest.er1 | |
3296 | cat conftest.err >&5 | |
ba479fd2 NN |
3297 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3298 | (exit $ac_status); } && | |
d2640b91 | 3299 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3300 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3301 | (eval $ac_try) 2>&5 | |
3302 | ac_status=$? | |
3303 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3304 | (exit $ac_status); }; } && | |
3305 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3306 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3307 | (eval $ac_try) 2>&5 | |
3308 | ac_status=$? | |
3309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3310 | (exit $ac_status); }; }; then | |
75b6f3fd KG |
3311 | ac_cv_sizeof_void_p=$ac_size |
3312 | else | |
ba479fd2 NN |
3313 | echo "$as_me: failed program was:" >&5 |
3314 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3315 | ||
75b6f3fd | 3316 | fi |
86da66b5 | 3317 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd KG |
3318 | if test x$ac_cv_sizeof_void_p != x ; then break; fi |
3319 | done | |
3320 | ||
3321 | fi | |
3322 | ||
3323 | if test x$ac_cv_sizeof_void_p = x ; then | |
ba479fd2 NN |
3324 | { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5 |
3325 | echo "$as_me: error: cannot determine a size for void *" >&2;} | |
3326 | { (exit 1); exit 1; }; } | |
75b6f3fd | 3327 | fi |
ba479fd2 NN |
3328 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 |
3329 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3330 | ||
3331 | cat >>confdefs.h <<_ACEOF | |
75b6f3fd | 3332 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
ba479fd2 | 3333 | _ACEOF |
75b6f3fd KG |
3334 | |
3335 | ||
ba479fd2 NN |
3336 | echo "$as_me:$LINENO: checking size of short" >&5 |
3337 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3338 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3339 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3340 | else |
4977bab6 | 3341 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3342 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3343 | /* confdefs.h. */ |
3344 | _ACEOF | |
3345 | cat confdefs.h >>conftest.$ac_ext | |
3346 | cat >>conftest.$ac_ext <<_ACEOF | |
3347 | /* end confdefs.h. */ | |
414d23ae HPN |
3348 | #include "confdefs.h" |
3349 | #include <sys/types.h> | |
3350 | ||
3351 | ||
ba479fd2 NN |
3352 | int |
3353 | main () | |
3354 | { | |
414d23ae | 3355 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
ba479fd2 NN |
3356 | ; |
3357 | return 0; | |
3358 | } | |
3359 | _ACEOF | |
3360 | rm -f conftest.$ac_objext | |
3361 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3362 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3363 | ac_status=$? |
86da66b5 HPN |
3364 | grep -v '^ *+' conftest.er1 >conftest.err |
3365 | rm -f conftest.er1 | |
3366 | cat conftest.err >&5 | |
ba479fd2 NN |
3367 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3368 | (exit $ac_status); } && | |
d2640b91 | 3369 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3370 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3371 | (eval $ac_try) 2>&5 | |
3372 | ac_status=$? | |
3373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3374 | (exit $ac_status); }; } && | |
3375 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3377 | (eval $ac_try) 2>&5 | |
3378 | ac_status=$? | |
3379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3380 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3381 | ac_cv_sizeof_short=$ac_size |
3382 | else | |
ba479fd2 NN |
3383 | echo "$as_me: failed program was:" >&5 |
3384 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3385 | ||
84c041a1 | 3386 | fi |
86da66b5 | 3387 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3388 | if test x$ac_cv_sizeof_short != x ; then break; fi |
3389 | done | |
3390 | ||
84c041a1 | 3391 | fi |
414d23ae HPN |
3392 | |
3393 | if test x$ac_cv_sizeof_short = x ; then | |
ba479fd2 NN |
3394 | { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 |
3395 | echo "$as_me: error: cannot determine a size for short" >&2;} | |
3396 | { (exit 1); exit 1; }; } | |
84c041a1 | 3397 | fi |
ba479fd2 NN |
3398 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 |
3399 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
3400 | ||
3401 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3402 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
ba479fd2 | 3403 | _ACEOF |
84c041a1 | 3404 | |
414d23ae | 3405 | |
ba479fd2 NN |
3406 | echo "$as_me:$LINENO: checking size of int" >&5 |
3407 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
3408 | if test "${ac_cv_sizeof_int+set}" = set; then | |
3409 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3410 | else |
4977bab6 | 3411 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3412 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3413 | /* confdefs.h. */ |
3414 | _ACEOF | |
3415 | cat confdefs.h >>conftest.$ac_ext | |
3416 | cat >>conftest.$ac_ext <<_ACEOF | |
3417 | /* end confdefs.h. */ | |
414d23ae HPN |
3418 | #include "confdefs.h" |
3419 | #include <sys/types.h> | |
3420 | ||
75e93faa | 3421 | |
ba479fd2 NN |
3422 | int |
3423 | main () | |
3424 | { | |
414d23ae | 3425 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
ba479fd2 NN |
3426 | ; |
3427 | return 0; | |
3428 | } | |
3429 | _ACEOF | |
3430 | rm -f conftest.$ac_objext | |
3431 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3432 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3433 | ac_status=$? |
86da66b5 HPN |
3434 | grep -v '^ *+' conftest.er1 >conftest.err |
3435 | rm -f conftest.er1 | |
3436 | cat conftest.err >&5 | |
ba479fd2 NN |
3437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3438 | (exit $ac_status); } && | |
d2640b91 | 3439 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3440 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3441 | (eval $ac_try) 2>&5 | |
3442 | ac_status=$? | |
3443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3444 | (exit $ac_status); }; } && | |
3445 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3447 | (eval $ac_try) 2>&5 | |
3448 | ac_status=$? | |
3449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3450 | (exit $ac_status); }; }; then | |
414d23ae | 3451 | ac_cv_sizeof_int=$ac_size |
75e93faa | 3452 | else |
ba479fd2 NN |
3453 | echo "$as_me: failed program was:" >&5 |
3454 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3455 | ||
75e93faa | 3456 | fi |
86da66b5 | 3457 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3458 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
3459 | done |
3460 | ||
3461 | fi | |
3462 | ||
414d23ae | 3463 | if test x$ac_cv_sizeof_int = x ; then |
ba479fd2 NN |
3464 | { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 |
3465 | echo "$as_me: error: cannot determine a size for int" >&2;} | |
3466 | { (exit 1); exit 1; }; } | |
414d23ae | 3467 | fi |
ba479fd2 NN |
3468 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 |
3469 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
3470 | ||
3471 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3472 | #define SIZEOF_INT $ac_cv_sizeof_int |
ba479fd2 | 3473 | _ACEOF |
75e93faa | 3474 | |
414d23ae | 3475 | |
ba479fd2 NN |
3476 | echo "$as_me:$LINENO: checking size of long" >&5 |
3477 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
3478 | if test "${ac_cv_sizeof_long+set}" = set; then | |
3479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3480 | else |
4977bab6 | 3481 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3482 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3483 | /* confdefs.h. */ |
3484 | _ACEOF | |
3485 | cat confdefs.h >>conftest.$ac_ext | |
3486 | cat >>conftest.$ac_ext <<_ACEOF | |
3487 | /* end confdefs.h. */ | |
75e93faa | 3488 | #include "confdefs.h" |
414d23ae HPN |
3489 | #include <sys/types.h> |
3490 | ||
75e93faa | 3491 | |
ba479fd2 NN |
3492 | int |
3493 | main () | |
3494 | { | |
414d23ae | 3495 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
ba479fd2 NN |
3496 | ; |
3497 | return 0; | |
3498 | } | |
3499 | _ACEOF | |
3500 | rm -f conftest.$ac_objext | |
3501 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3502 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3503 | ac_status=$? |
86da66b5 HPN |
3504 | grep -v '^ *+' conftest.er1 >conftest.err |
3505 | rm -f conftest.er1 | |
3506 | cat conftest.err >&5 | |
ba479fd2 NN |
3507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3508 | (exit $ac_status); } && | |
d2640b91 | 3509 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3511 | (eval $ac_try) 2>&5 | |
3512 | ac_status=$? | |
3513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3514 | (exit $ac_status); }; } && | |
3515 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3516 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3517 | (eval $ac_try) 2>&5 | |
3518 | ac_status=$? | |
3519 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3520 | (exit $ac_status); }; }; then | |
414d23ae | 3521 | ac_cv_sizeof_long=$ac_size |
75e93faa | 3522 | else |
ba479fd2 NN |
3523 | echo "$as_me: failed program was:" >&5 |
3524 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3525 | ||
75e93faa | 3526 | fi |
86da66b5 | 3527 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3528 | if test x$ac_cv_sizeof_long != x ; then break; fi |
3529 | done | |
75e93faa | 3530 | |
414d23ae | 3531 | fi |
75e93faa | 3532 | |
414d23ae | 3533 | if test x$ac_cv_sizeof_long = x ; then |
ba479fd2 NN |
3534 | { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 |
3535 | echo "$as_me: error: cannot determine a size for long" >&2;} | |
3536 | { (exit 1); exit 1; }; } | |
75e93faa | 3537 | fi |
ba479fd2 NN |
3538 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 |
3539 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
3540 | ||
3541 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3542 | #define SIZEOF_LONG $ac_cv_sizeof_long |
ba479fd2 | 3543 | _ACEOF |
75e93faa ZW |
3544 | |
3545 | ||
414d23ae | 3546 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3547 | echo "$as_me:$LINENO: checking size of long long" >&5 |
3548 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
3549 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
3550 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
04cabffc | 3551 | else |
4977bab6 | 3552 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3553 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3554 | /* confdefs.h. */ |
3555 | _ACEOF | |
3556 | cat confdefs.h >>conftest.$ac_ext | |
3557 | cat >>conftest.$ac_ext <<_ACEOF | |
3558 | /* end confdefs.h. */ | |
414d23ae HPN |
3559 | #include "confdefs.h" |
3560 | #include <sys/types.h> | |
3561 | ||
04cabffc | 3562 | |
ba479fd2 NN |
3563 | int |
3564 | main () | |
3565 | { | |
414d23ae | 3566 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
ba479fd2 NN |
3567 | ; |
3568 | return 0; | |
3569 | } | |
3570 | _ACEOF | |
3571 | rm -f conftest.$ac_objext | |
3572 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3573 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3574 | ac_status=$? |
86da66b5 HPN |
3575 | grep -v '^ *+' conftest.er1 >conftest.err |
3576 | rm -f conftest.er1 | |
3577 | cat conftest.err >&5 | |
ba479fd2 NN |
3578 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3579 | (exit $ac_status); } && | |
d2640b91 | 3580 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3581 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3582 | (eval $ac_try) 2>&5 | |
3583 | ac_status=$? | |
3584 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3585 | (exit $ac_status); }; } && | |
3586 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3587 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3588 | (eval $ac_try) 2>&5 | |
3589 | ac_status=$? | |
3590 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3591 | (exit $ac_status); }; }; then | |
414d23ae | 3592 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 3593 | else |
ba479fd2 NN |
3594 | echo "$as_me: failed program was:" >&5 |
3595 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3596 | ||
04cabffc | 3597 | fi |
86da66b5 | 3598 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3599 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
3600 | done | |
3601 | ||
04cabffc KG |
3602 | fi |
3603 | ||
414d23ae | 3604 | if test x$ac_cv_sizeof_long_long = x ; then |
ba479fd2 NN |
3605 | { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5 |
3606 | echo "$as_me: error: cannot determine a size for long long" >&2;} | |
3607 | { (exit 1); exit 1; }; } | |
414d23ae | 3608 | fi |
ba479fd2 NN |
3609 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 |
3610 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
3611 | ||
3612 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3613 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
ba479fd2 | 3614 | _ACEOF |
04cabffc | 3615 | |
04cabffc | 3616 | |
414d23ae HPN |
3617 | fi |
3618 | if test $ac_cv_c___int64 = yes; then | |
ba479fd2 NN |
3619 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
3620 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
3621 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
3622 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3623 | else |
4977bab6 | 3624 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3625 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3626 | /* confdefs.h. */ |
3627 | _ACEOF | |
3628 | cat confdefs.h >>conftest.$ac_ext | |
3629 | cat >>conftest.$ac_ext <<_ACEOF | |
3630 | /* end confdefs.h. */ | |
414d23ae HPN |
3631 | #include "confdefs.h" |
3632 | #include <sys/types.h> | |
3633 | ||
61842080 | 3634 | |
ba479fd2 NN |
3635 | int |
3636 | main () | |
3637 | { | |
414d23ae | 3638 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
ba479fd2 NN |
3639 | ; |
3640 | return 0; | |
3641 | } | |
3642 | _ACEOF | |
3643 | rm -f conftest.$ac_objext | |
3644 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3645 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3646 | ac_status=$? |
86da66b5 HPN |
3647 | grep -v '^ *+' conftest.er1 >conftest.err |
3648 | rm -f conftest.er1 | |
3649 | cat conftest.err >&5 | |
ba479fd2 NN |
3650 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3651 | (exit $ac_status); } && | |
d2640b91 | 3652 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3653 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3654 | (eval $ac_try) 2>&5 | |
3655 | ac_status=$? | |
3656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3657 | (exit $ac_status); }; } && | |
3658 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3659 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3660 | (eval $ac_try) 2>&5 | |
3661 | ac_status=$? | |
3662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3663 | (exit $ac_status); }; }; then | |
414d23ae | 3664 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 3665 | else |
ba479fd2 NN |
3666 | echo "$as_me: failed program was:" >&5 |
3667 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3668 | ||
75e93faa | 3669 | fi |
86da66b5 | 3670 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3671 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
3672 | done | |
3673 | ||
75e93faa ZW |
3674 | fi |
3675 | ||
414d23ae | 3676 | if test x$ac_cv_sizeof___int64 = x ; then |
ba479fd2 NN |
3677 | { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5 |
3678 | echo "$as_me: error: cannot determine a size for __int64" >&2;} | |
3679 | { (exit 1); exit 1; }; } | |
414d23ae | 3680 | fi |
ba479fd2 NN |
3681 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
3682 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
3683 | ||
3684 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3685 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 3686 | _ACEOF |
414d23ae | 3687 | |
cafe096b | 3688 | |
414d23ae HPN |
3689 | fi |
3690 | ||
34a86c2b NN |
3691 | # --------------------- |
3692 | # Warnings and checking | |
3693 | # --------------------- | |
3694 | ||
b5472e1d NN |
3695 | # Check $CC warning features (if it's GCC). |
3696 | # We want to use -pedantic, but we don't want warnings about | |
3697 | # * 'long long' | |
3698 | # * variadic macros | |
3699 | # So, we only use -pedantic if we can disable those warnings. | |
3700 | ||
3701 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
3702 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
3703 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
3704 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3705 | else | |
3706 | save_CFLAGS="$CFLAGS" | |
3707 | CFLAGS="-Wno-long-long" | |
3708 | cat >conftest.$ac_ext <<_ACEOF | |
3709 | /* confdefs.h. */ | |
3710 | _ACEOF | |
3711 | cat confdefs.h >>conftest.$ac_ext | |
3712 | cat >>conftest.$ac_ext <<_ACEOF | |
3713 | /* end confdefs.h. */ | |
3714 | ||
3715 | _ACEOF | |
3716 | rm -f conftest.$ac_objext | |
3717 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3718 | (eval $ac_compile) 2>conftest.er1 | |
3719 | ac_status=$? | |
3720 | grep -v '^ *+' conftest.er1 >conftest.err | |
3721 | rm -f conftest.er1 | |
3722 | cat conftest.err >&5 | |
3723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3724 | (exit $ac_status); } && | |
d2640b91 | 3725 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
3726 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3727 | (eval $ac_try) 2>&5 | |
3728 | ac_status=$? | |
3729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3730 | (exit $ac_status); }; } && | |
3731 | { ac_try='test -s conftest.$ac_objext' | |
3732 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3733 | (eval $ac_try) 2>&5 | |
3734 | ac_status=$? | |
3735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3736 | (exit $ac_status); }; }; then | |
3737 | ac_cv_prog_cc_w_no_long_long=yes | |
3738 | else | |
3739 | echo "$as_me: failed program was:" >&5 | |
3740 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3741 | ||
3742 | ac_cv_prog_cc_w_no_long_long=no | |
3743 | fi | |
3744 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3745 | CFLAGS="$save_CFLAGS" | |
3746 | ||
3747 | fi | |
3748 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
3749 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
3750 | ||
3751 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
3752 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
3753 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
3754 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3755 | else | |
3756 | save_CFLAGS="$CFLAGS" | |
3757 | CFLAGS="-Wno-variadic-macros" | |
3758 | cat >conftest.$ac_ext <<_ACEOF | |
3759 | /* confdefs.h. */ | |
3760 | _ACEOF | |
3761 | cat confdefs.h >>conftest.$ac_ext | |
3762 | cat >>conftest.$ac_ext <<_ACEOF | |
3763 | /* end confdefs.h. */ | |
3764 | ||
3765 | _ACEOF | |
3766 | rm -f conftest.$ac_objext | |
3767 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3768 | (eval $ac_compile) 2>conftest.er1 | |
3769 | ac_status=$? | |
3770 | grep -v '^ *+' conftest.er1 >conftest.err | |
3771 | rm -f conftest.er1 | |
3772 | cat conftest.err >&5 | |
3773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3774 | (exit $ac_status); } && | |
d2640b91 | 3775 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
3776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3777 | (eval $ac_try) 2>&5 | |
3778 | ac_status=$? | |
3779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3780 | (exit $ac_status); }; } && | |
3781 | { ac_try='test -s conftest.$ac_objext' | |
3782 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3783 | (eval $ac_try) 2>&5 | |
3784 | ac_status=$? | |
3785 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3786 | (exit $ac_status); }; }; then | |
3787 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
3788 | else | |
3789 | echo "$as_me: failed program was:" >&5 | |
3790 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3791 | ||
3792 | ac_cv_prog_cc_w_no_variadic_macros=no | |
3793 | fi | |
3794 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3795 | CFLAGS="$save_CFLAGS" | |
3796 | ||
3797 | fi | |
3798 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
3799 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
3800 | ||
34a86c2b | 3801 | strict1_warn= |
b5472e1d NN |
3802 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
3803 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then | |
3804 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" | |
34a86c2b NN |
3805 | fi |
3806 | ||
3807 | ||
643d3bd2 NN |
3808 | # Add -Wold-style-definition if it's accepted |
3809 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
3810 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
3811 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
3812 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3813 | else | |
3814 | save_CFLAGS="$CFLAGS" | |
3815 | CFLAGS="-Wold-style-definition" | |
3816 | cat >conftest.$ac_ext <<_ACEOF | |
3817 | /* confdefs.h. */ | |
3818 | _ACEOF | |
3819 | cat confdefs.h >>conftest.$ac_ext | |
3820 | cat >>conftest.$ac_ext <<_ACEOF | |
3821 | /* end confdefs.h. */ | |
3822 | ||
3823 | _ACEOF | |
3824 | rm -f conftest.$ac_objext | |
3825 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3826 | (eval $ac_compile) 2>conftest.er1 | |
3827 | ac_status=$? | |
3828 | grep -v '^ *+' conftest.er1 >conftest.err | |
3829 | rm -f conftest.er1 | |
3830 | cat conftest.err >&5 | |
3831 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3832 | (exit $ac_status); } && | |
d2640b91 | 3833 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
643d3bd2 NN |
3834 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3835 | (eval $ac_try) 2>&5 | |
3836 | ac_status=$? | |
3837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3838 | (exit $ac_status); }; } && | |
3839 | { ac_try='test -s conftest.$ac_objext' | |
3840 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3841 | (eval $ac_try) 2>&5 | |
3842 | ac_status=$? | |
3843 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3844 | (exit $ac_status); }; }; then | |
3845 | ac_cv_prog_cc_w_old_style_definition=yes | |
3846 | else | |
3847 | echo "$as_me: failed program was:" >&5 | |
3848 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3849 | ||
3850 | ac_cv_prog_cc_w_old_style_definition=no | |
3851 | fi | |
3852 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3853 | CFLAGS="$save_CFLAGS" | |
3854 | ||
3855 | fi | |
3856 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
3857 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
3858 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
3859 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
3860 | fi | |
3861 | ||
09a9c095 NN |
3862 | # Enable -Werror, period. |
3863 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
3864 | if test "${enable_werror_always+set}" = set; then | |
3865 | enableval="$enable_werror_always" | |
3866 | ||
3867 | else | |
3868 | enable_werror_always=no | |
3869 | fi; | |
3870 | if test x${enable_werror_always} = xyes ; then | |
3871 | strict1_warn="${strict1_warn} -Werror" | |
3872 | WERROR=-Werror | |
3873 | fi | |
3874 | ||
ba479fd2 | 3875 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
3876 | # That's useful for people building cross-compilers, or just running a |
3877 | # quick `make'. | |
3878 | warn_cflags= | |
3879 | if test "x$GCC" = "xyes"; then | |
3880 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
3881 | fi | |
3882 | ||
3883 | ||
dd859b8a KG |
3884 | # Enable -Werror in bootstrap stage2 and later. |
3885 | # Change the default to "no" on release branches. | |
3886 | # Check whether --enable-werror or --disable-werror was given. | |
3887 | if test "${enable_werror+set}" = set; then | |
3888 | enableval="$enable_werror" | |
ba479fd2 | 3889 | |
dd859b8a KG |
3890 | else |
3891 | enable_werror=yes | |
ba479fd2 | 3892 | fi; |
dd859b8a KG |
3893 | if test x$enable_werror = xyes ; then |
3894 | WERROR=-Werror | |
3895 | fi | |
3896 | ||
3897 | ||
414d23ae HPN |
3898 | # Enable expensive internal checks |
3899 | # Check whether --enable-checking or --disable-checking was given. | |
3900 | if test "${enable_checking+set}" = set; then | |
3901 | enableval="$enable_checking" | |
3902 | ac_checking= | |
3903 | ac_tree_checking= | |
3904 | ac_rtl_checking= | |
3905 | ac_rtlflag_checking= | |
3906 | ac_gc_checking= | |
3907 | ac_gc_always_collect= | |
5dfa45d0 | 3908 | ac_fold_checking= |
414d23ae HPN |
3909 | case "${enableval}" in |
3910 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
3911 | ac_rtlflag_checking=1 ;; | |
3912 | no) ;; | |
3913 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
3914 | set fnord $enableval; shift | |
3915 | IFS="$ac_save_IFS" | |
3916 | for check | |
3917 | do | |
3918 | case $check in | |
d2640b91 PE |
3919 | fold) ac_fold_checking=1 ;; |
3920 | gc) ac_gc_checking=1 ;; | |
3921 | gcac) ac_gc_always_collect=1 ;; | |
414d23ae | 3922 | misc) ac_checking=1 ;; |
414d23ae HPN |
3923 | rtlflag) ac_rtlflag_checking=1 ;; |
3924 | rtl) ac_rtl_checking=1 ;; | |
d2640b91 | 3925 | tree) ac_tree_checking=1 ;; |
414d23ae | 3926 | valgrind) ac_checking_valgrind=1 ;; |
ba479fd2 NN |
3927 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
3928 | echo "$as_me: error: unknown check category $check" >&2;} | |
3929 | { (exit 1); exit 1; }; } ;; | |
414d23ae HPN |
3930 | esac |
3931 | done | |
3932 | ;; | |
3933 | esac | |
3934 | ||
75e93faa | 3935 | else |
414d23ae HPN |
3936 | # Enable some checks by default for development versions of GCC |
3937 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
ba479fd2 NN |
3938 | fi; |
3939 | nocommon_flag="" | |
3940 | if test x$ac_checking != x ; then | |
3941 | ||
3942 | cat >>confdefs.h <<\_ACEOF | |
3943 | #define ENABLE_CHECKING 1 | |
3944 | _ACEOF | |
3945 | ||
3946 | nocommon_flag=-fno-common | |
3947 | fi | |
3948 | ||
3949 | if test x$ac_tree_checking != x ; then | |
3950 | ||
3951 | cat >>confdefs.h <<\_ACEOF | |
3952 | #define ENABLE_TREE_CHECKING 1 | |
3953 | _ACEOF | |
3954 | ||
13f05fd0 | 3955 | TREEBROWSER=tree-browser.o |
ba479fd2 | 3956 | fi |
13f05fd0 | 3957 | |
ba479fd2 NN |
3958 | if test x$ac_rtl_checking != x ; then |
3959 | ||
3960 | cat >>confdefs.h <<\_ACEOF | |
3961 | #define ENABLE_RTL_CHECKING 1 | |
3962 | _ACEOF | |
3963 | ||
3964 | fi | |
3965 | if test x$ac_rtlflag_checking != x ; then | |
3966 | ||
3967 | cat >>confdefs.h <<\_ACEOF | |
3968 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
3969 | _ACEOF | |
3970 | ||
3971 | fi | |
3972 | if test x$ac_gc_checking != x ; then | |
3973 | ||
3974 | cat >>confdefs.h <<\_ACEOF | |
3975 | #define ENABLE_GC_CHECKING 1 | |
3976 | _ACEOF | |
3977 | ||
3978 | fi | |
3979 | if test x$ac_gc_always_collect != x ; then | |
3980 | ||
3981 | cat >>confdefs.h <<\_ACEOF | |
3982 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
3983 | _ACEOF | |
3984 | ||
3985 | fi | |
3986 | if test x$ac_fold_checking != x ; then | |
3987 | ||
3988 | cat >>confdefs.h <<\_ACEOF | |
3989 | #define ENABLE_FOLD_CHECKING 1 | |
3990 | _ACEOF | |
3991 | ||
3992 | fi | |
3993 | valgrind_path_defines= | |
3994 | valgrind_command= | |
3995 | ||
3996 | ||
3997 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3998 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3999 | if test "${ac_cv_prog_egrep+set}" = set; then | |
4000 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4001 | else | |
4002 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
4003 | then ac_cv_prog_egrep='grep -E' | |
4004 | else ac_cv_prog_egrep='egrep' | |
4005 | fi | |
4006 | fi | |
4007 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
4008 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
4009 | EGREP=$ac_cv_prog_egrep | |
4010 | ||
4011 | ||
4012 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
4013 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
4014 | if test "${ac_cv_header_stdc+set}" = set; then | |
4015 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4016 | else | |
4017 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4018 | /* confdefs.h. */ |
4019 | _ACEOF | |
4020 | cat confdefs.h >>conftest.$ac_ext | |
4021 | cat >>conftest.$ac_ext <<_ACEOF | |
4022 | /* end confdefs.h. */ | |
4023 | #include <stdlib.h> | |
4024 | #include <stdarg.h> | |
4025 | #include <string.h> | |
4026 | #include <float.h> | |
4027 | ||
4028 | int | |
4029 | main () | |
4030 | { | |
4031 | ||
4032 | ; | |
4033 | return 0; | |
4034 | } | |
4035 | _ACEOF | |
4036 | rm -f conftest.$ac_objext | |
4037 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4038 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4039 | ac_status=$? |
86da66b5 HPN |
4040 | grep -v '^ *+' conftest.er1 >conftest.err |
4041 | rm -f conftest.er1 | |
4042 | cat conftest.err >&5 | |
ba479fd2 NN |
4043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4044 | (exit $ac_status); } && | |
d2640b91 | 4045 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4046 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4047 | (eval $ac_try) 2>&5 | |
4048 | ac_status=$? | |
4049 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4050 | (exit $ac_status); }; } && | |
4051 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4052 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4053 | (eval $ac_try) 2>&5 | |
4054 | ac_status=$? | |
4055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4056 | (exit $ac_status); }; }; then | |
4057 | ac_cv_header_stdc=yes | |
4058 | else | |
4059 | echo "$as_me: failed program was:" >&5 | |
4060 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4061 | ||
4062 | ac_cv_header_stdc=no | |
4063 | fi | |
86da66b5 | 4064 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4065 | |
4066 | if test $ac_cv_header_stdc = yes; then | |
4067 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4068 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4069 | /* confdefs.h. */ |
4070 | _ACEOF | |
4071 | cat confdefs.h >>conftest.$ac_ext | |
4072 | cat >>conftest.$ac_ext <<_ACEOF | |
4073 | /* end confdefs.h. */ | |
4074 | #include <string.h> | |
4075 | ||
4076 | _ACEOF | |
4077 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4078 | $EGREP "memchr" >/dev/null 2>&1; then | |
4079 | : | |
4080 | else | |
4081 | ac_cv_header_stdc=no | |
4082 | fi | |
4083 | rm -f conftest* | |
4084 | ||
4085 | fi | |
4086 | ||
4087 | if test $ac_cv_header_stdc = yes; then | |
4088 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4089 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4090 | /* confdefs.h. */ |
4091 | _ACEOF | |
4092 | cat confdefs.h >>conftest.$ac_ext | |
4093 | cat >>conftest.$ac_ext <<_ACEOF | |
4094 | /* end confdefs.h. */ | |
4095 | #include <stdlib.h> | |
4096 | ||
4097 | _ACEOF | |
4098 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4099 | $EGREP "free" >/dev/null 2>&1; then | |
4100 | : | |
4101 | else | |
4102 | ac_cv_header_stdc=no | |
4103 | fi | |
4104 | rm -f conftest* | |
4105 | ||
4106 | fi | |
4107 | ||
4108 | if test $ac_cv_header_stdc = yes; then | |
4109 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4110 | if test "$cross_compiling" = yes; then | |
4111 | : | |
4112 | else | |
4113 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4114 | /* confdefs.h. */ |
4115 | _ACEOF | |
4116 | cat confdefs.h >>conftest.$ac_ext | |
4117 | cat >>conftest.$ac_ext <<_ACEOF | |
4118 | /* end confdefs.h. */ | |
4119 | #include <ctype.h> | |
4120 | #if ((' ' & 0x0FF) == 0x020) | |
4121 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4122 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4123 | #else | |
4124 | # define ISLOWER(c) \ | |
86da66b5 HPN |
4125 | (('a' <= (c) && (c) <= 'i') \ |
4126 | || ('j' <= (c) && (c) <= 'r') \ | |
4127 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
4128 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
4129 | #endif | |
4130 | ||
4131 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4132 | int | |
4133 | main () | |
4134 | { | |
4135 | int i; | |
4136 | for (i = 0; i < 256; i++) | |
4137 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 4138 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
4139 | exit(2); |
4140 | exit (0); | |
4141 | } | |
4142 | _ACEOF | |
4143 | rm -f conftest$ac_exeext | |
4144 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4145 | (eval $ac_link) 2>&5 | |
4146 | ac_status=$? | |
4147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4148 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4150 | (eval $ac_try) 2>&5 | |
4151 | ac_status=$? | |
4152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4153 | (exit $ac_status); }; }; then | |
4154 | : | |
4155 | else | |
4156 | echo "$as_me: program exited with status $ac_status" >&5 | |
4157 | echo "$as_me: failed program was:" >&5 | |
4158 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4159 | ||
4160 | ( exit $ac_status ) | |
4161 | ac_cv_header_stdc=no | |
63cf211a | 4162 | fi |
86da66b5 | 4163 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4164 | fi |
4165 | fi | |
4166 | fi | |
4167 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4168 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
4169 | if test $ac_cv_header_stdc = yes; then | |
63cf211a | 4170 | |
ba479fd2 NN |
4171 | cat >>confdefs.h <<\_ACEOF |
4172 | #define STDC_HEADERS 1 | |
4173 | _ACEOF | |
75e93faa | 4174 | |
414d23ae | 4175 | fi |
827ae6cf | 4176 | |
ba479fd2 NN |
4177 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4178 | ||
4179 | ||
4180 | ||
827ae6cf | 4181 | |
6e3f3080 NN |
4182 | |
4183 | ||
6e3f3080 | 4184 | |
6e3f3080 | 4185 | |
ba479fd2 NN |
4186 | |
4187 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
86da66b5 | 4188 | inttypes.h stdint.h unistd.h |
ba479fd2 NN |
4189 | do |
4190 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4191 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4192 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4193 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4194 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4195 | else | |
4196 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4197 | /* confdefs.h. */ |
4198 | _ACEOF | |
4199 | cat confdefs.h >>conftest.$ac_ext | |
4200 | cat >>conftest.$ac_ext <<_ACEOF | |
4201 | /* end confdefs.h. */ | |
4202 | $ac_includes_default | |
4203 | ||
4204 | #include <$ac_header> | |
4205 | _ACEOF | |
4206 | rm -f conftest.$ac_objext | |
4207 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4208 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4209 | ac_status=$? |
86da66b5 HPN |
4210 | grep -v '^ *+' conftest.er1 >conftest.err |
4211 | rm -f conftest.er1 | |
4212 | cat conftest.err >&5 | |
ba479fd2 NN |
4213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4214 | (exit $ac_status); } && | |
d2640b91 | 4215 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4217 | (eval $ac_try) 2>&5 | |
4218 | ac_status=$? | |
4219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4220 | (exit $ac_status); }; } && | |
4221 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4222 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4223 | (eval $ac_try) 2>&5 | |
4224 | ac_status=$? | |
4225 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4226 | (exit $ac_status); }; }; then | |
4227 | eval "$as_ac_Header=yes" | |
4228 | else | |
4229 | echo "$as_me: failed program was:" >&5 | |
4230 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4231 | ||
4232 | eval "$as_ac_Header=no" | |
4233 | fi | |
86da66b5 | 4234 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4235 | fi |
4236 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4237 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4238 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4239 | cat >>confdefs.h <<_ACEOF | |
4240 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4241 | _ACEOF | |
6e3f3080 | 4242 | |
63cf211a | 4243 | fi |
6e3f3080 | 4244 | |
ba479fd2 NN |
4245 | done |
4246 | ||
4247 | ||
4248 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4249 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4250 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4251 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4252 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4253 | fi | |
4254 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
4255 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4256 | else | |
4257 | # Is the header compilable? | |
4258 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
4259 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
4260 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4261 | /* confdefs.h. */ |
4262 | _ACEOF | |
4263 | cat confdefs.h >>conftest.$ac_ext | |
4264 | cat >>conftest.$ac_ext <<_ACEOF | |
4265 | /* end confdefs.h. */ | |
4266 | $ac_includes_default | |
63cf211a | 4267 | #include <valgrind.h> |
ba479fd2 NN |
4268 | _ACEOF |
4269 | rm -f conftest.$ac_objext | |
4270 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4271 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4272 | ac_status=$? |
86da66b5 HPN |
4273 | grep -v '^ *+' conftest.er1 >conftest.err |
4274 | rm -f conftest.er1 | |
4275 | cat conftest.err >&5 | |
ba479fd2 NN |
4276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4277 | (exit $ac_status); } && | |
d2640b91 | 4278 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4280 | (eval $ac_try) 2>&5 | |
4281 | ac_status=$? | |
4282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4283 | (exit $ac_status); }; } && | |
4284 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4286 | (eval $ac_try) 2>&5 | |
4287 | ac_status=$? | |
4288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4289 | (exit $ac_status); }; }; then | |
4290 | ac_header_compiler=yes | |
4291 | else | |
4292 | echo "$as_me: failed program was:" >&5 | |
4293 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4294 | ||
4295 | ac_header_compiler=no | |
4296 | fi | |
86da66b5 | 4297 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4298 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
4299 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
4300 | ||
4301 | # Is the header present? | |
4302 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
4303 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
4304 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4305 | /* confdefs.h. */ |
4306 | _ACEOF | |
4307 | cat confdefs.h >>conftest.$ac_ext | |
4308 | cat >>conftest.$ac_ext <<_ACEOF | |
4309 | /* end confdefs.h. */ | |
4310 | #include <valgrind.h> | |
4311 | _ACEOF | |
4312 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4313 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4314 | ac_status=$? | |
4315 | grep -v '^ *+' conftest.er1 >conftest.err | |
4316 | rm -f conftest.er1 | |
4317 | cat conftest.err >&5 | |
4318 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4319 | (exit $ac_status); } >/dev/null; then | |
4320 | if test -s conftest.err; then | |
4321 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4322 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4323 | else |
4324 | ac_cpp_err= | |
4325 | fi | |
4326 | else | |
4327 | ac_cpp_err=yes | |
4328 | fi | |
4329 | if test -z "$ac_cpp_err"; then | |
4330 | ac_header_preproc=yes | |
4331 | else | |
4332 | echo "$as_me: failed program was:" >&5 | |
4333 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4334 | ||
4335 | ac_header_preproc=no | |
4336 | fi | |
4337 | rm -f conftest.err conftest.$ac_ext | |
4338 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4339 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
4340 | ||
4341 | # So? What about this header? | |
86da66b5 HPN |
4342 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
4343 | yes:no: ) | |
ba479fd2 NN |
4344 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
4345 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
4346 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
4347 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
4348 | ac_header_preproc=yes | |
ba479fd2 | 4349 | ;; |
86da66b5 | 4350 | no:yes:* ) |
ba479fd2 NN |
4351 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
4352 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
4353 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
4354 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
4355 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
4356 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
4357 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
4358 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
4359 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
4360 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
4361 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
4362 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
4363 | ( |
4364 | cat <<\_ASBOX | |
86da66b5 HPN |
4365 | ## ------------------------------------------ ## |
4366 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
4367 | ## ------------------------------------------ ## | |
ba479fd2 NN |
4368 | _ASBOX |
4369 | ) | | |
4370 | sed "s/^/$as_me: WARNING: /" >&2 | |
4371 | ;; | |
4372 | esac | |
4373 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4374 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4375 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4376 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4377 | else | |
4378 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 4379 | fi |
ba479fd2 NN |
4380 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
4381 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4382 | ||
6e3f3080 | 4383 | fi |
ba479fd2 | 4384 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
4385 | have_valgrind_h=yes |
4386 | else | |
ba479fd2 | 4387 | have_valgrind_h=no |
6938ec6c NN |
4388 | fi |
4389 | ||
4390 | ||
ba479fd2 | 4391 | |
414d23ae HPN |
4392 | if test x$ac_checking_valgrind != x ; then |
4393 | # It is certainly possible that there's valgrind but no valgrind.h. | |
4394 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
4395 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
4396 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
4397 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4398 | /* confdefs.h. */ |
4399 | _ACEOF | |
4400 | cat confdefs.h >>conftest.$ac_ext | |
4401 | cat >>conftest.$ac_ext <<_ACEOF | |
4402 | /* end confdefs.h. */ | |
a207b594 | 4403 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
4404 | #ifndef VALGRIND_DISCARD |
4405 | #error VALGRIND_DISCARD not defined | |
4406 | #endif | |
ba479fd2 NN |
4407 | _ACEOF |
4408 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4409 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4410 | ac_status=$? | |
4411 | grep -v '^ *+' conftest.er1 >conftest.err | |
4412 | rm -f conftest.er1 | |
4413 | cat conftest.err >&5 | |
4414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4415 | (exit $ac_status); } >/dev/null; then | |
4416 | if test -s conftest.err; then | |
4417 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4418 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4419 | else |
4420 | ac_cpp_err= | |
4421 | fi | |
4422 | else | |
4423 | ac_cpp_err=yes | |
4424 | fi | |
4425 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
4426 | gcc_cv_header_valgrind_memcheck_h=yes |
4427 | else | |
ba479fd2 NN |
4428 | echo "$as_me: failed program was:" >&5 |
4429 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4430 | ||
a207b594 HPN |
4431 | gcc_cv_header_valgrind_memcheck_h=no |
4432 | fi | |
ba479fd2 NN |
4433 | rm -f conftest.err conftest.$ac_ext |
4434 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
4435 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
4436 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
4437 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
4438 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4439 | /* confdefs.h. */ |
4440 | _ACEOF | |
4441 | cat confdefs.h >>conftest.$ac_ext | |
4442 | cat >>conftest.$ac_ext <<_ACEOF | |
4443 | /* end confdefs.h. */ | |
a207b594 HPN |
4444 | #include <memcheck.h> |
4445 | #ifndef VALGRIND_DISCARD | |
4446 | #error VALGRIND_DISCARD not defined | |
4447 | #endif | |
ba479fd2 NN |
4448 | _ACEOF |
4449 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4450 | (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then | |
4457 | if test -s conftest.err; then | |
4458 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4459 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4460 | else |
4461 | ac_cpp_err= | |
4462 | fi | |
4463 | else | |
4464 | ac_cpp_err=yes | |
4465 | fi | |
4466 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
4467 | gcc_cv_header_memcheck_h=yes |
4468 | else | |
ba479fd2 NN |
4469 | echo "$as_me: failed program was:" >&5 |
4470 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4471 | ||
cafe096b EC |
4472 | gcc_cv_header_memcheck_h=no |
4473 | fi | |
ba479fd2 NN |
4474 | rm -f conftest.err conftest.$ac_ext |
4475 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
4476 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
4477 | ||
56694dd9 ZW |
4478 | # Prepare PATH_SEPARATOR. |
4479 | # The user is always right. | |
4480 | if test "${PATH_SEPARATOR+set}" != set; then | |
4481 | echo "#! /bin/sh" >conf$$.sh | |
4482 | echo "exit 0" >>conf$$.sh | |
4483 | chmod +x conf$$.sh | |
4484 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
4485 | PATH_SEPARATOR=';' | |
4486 | else | |
4487 | PATH_SEPARATOR=: | |
4488 | fi | |
4489 | rm -f conf$$.sh | |
4490 | fi | |
4491 | ||
4492 | # Find out how to test for executable files. Don't use a zero-byte file, | |
4493 | # as systems may use methods other than mode bits to determine executability. | |
4494 | cat >conf$$.file <<_ASEOF | |
4495 | #! /bin/sh | |
4496 | exit 0 | |
4497 | _ASEOF | |
4498 | chmod +x conf$$.file | |
4499 | if test -x conf$$.file >/dev/null 2>&1; then | |
4500 | ac_executable_p="test -x" | |
4501 | else | |
4502 | ac_executable_p="test -f" | |
4503 | fi | |
4504 | rm -f conf$$.file | |
4505 | ||
4506 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 4507 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
4508 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4509 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4510 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
4511 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
4512 | else |
4513 | case "$valgrind_path" in | |
56694dd9 ZW |
4514 | [\\/]* | ?:[\\/]*) |
4515 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
4516 | ;; | |
414d23ae | 4517 | *) |
56694dd9 ZW |
4518 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
4519 | for ac_dir in $PATH; do | |
4520 | IFS="$ac_save_IFS" | |
4521 | test -z "$ac_dir" && ac_dir=. | |
4522 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4523 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
4524 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
4525 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
4526 | break 2 | |
4527 | fi | |
4528 | fi | |
4529 | done | |
4530 | done | |
4531 | IFS="$ac_save_IFS" | |
4532 | ;; | |
414d23ae | 4533 | esac |
75e93faa | 4534 | fi |
414d23ae HPN |
4535 | valgrind_path="$ac_cv_path_valgrind_path" |
4536 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
4537 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
4538 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 4539 | else |
ba479fd2 NN |
4540 | echo "$as_me:$LINENO: result: no" >&5 |
4541 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
4542 | fi |
4543 | ||
a207b594 HPN |
4544 | if test "x$valgrind_path" = "x" \ |
4545 | || (test $have_valgrind_h = no \ | |
4546 | && test $gcc_cv_header_memcheck_h = no \ | |
4547 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
4548 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
4549 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
4550 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
4551 | fi |
4552 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
4553 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
4554 | |
4555 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 4556 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 4557 | _ACEOF |
75e93faa | 4558 | |
a207b594 | 4559 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
4560 | |
4561 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 4562 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 4563 | _ACEOF |
a207b594 HPN |
4564 | |
4565 | fi | |
14011ca4 | 4566 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
4567 | |
4568 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 4569 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 4570 | _ACEOF |
14011ca4 AJ |
4571 | |
4572 | fi | |
414d23ae | 4573 | fi |
75e93faa | 4574 | |
75e93faa ZW |
4575 | |
4576 | ||
74ee1642 PB |
4577 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
4578 | if test "${enable_mapped_location+set}" = set; then | |
4579 | enableval="$enable_mapped_location" | |
4580 | ||
4581 | else | |
4582 | enable_mapped_location=no | |
4583 | fi; | |
4584 | ||
4585 | if test "$enable_mapped_location" = yes ; then | |
4586 | ||
4587 | cat >>confdefs.h <<\_ACEOF | |
4588 | #define USE_MAPPED_LOCATION 1 | |
4589 | _ACEOF | |
4590 | ||
4591 | fi | |
4592 | ||
414d23ae HPN |
4593 | # Enable code coverage collection |
4594 | # Check whether --enable-coverage or --disable-coverage was given. | |
4595 | if test "${enable_coverage+set}" = set; then | |
4596 | enableval="$enable_coverage" | |
4597 | case "${enableval}" in | |
6dd297da NN |
4598 | yes|noopt) |
4599 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
4600 | ;; | |
4601 | opt) | |
4602 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
4603 | ;; | |
4604 | no) | |
4605 | # a.k.a. --disable-coverage | |
4606 | coverage_flags="" | |
4607 | ;; | |
4608 | *) | |
4609 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
4610 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
4611 | { (exit 1); exit 1; }; } | |
6dd297da | 4612 | ;; |
414d23ae | 4613 | esac |
75e93faa | 4614 | else |
414d23ae | 4615 | coverage_flags="" |
ba479fd2 | 4616 | fi; |
5c3bc9fb | 4617 | |
414d23ae | 4618 | |
439a7e54 DN |
4619 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
4620 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
4621 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 4622 | |
439a7e54 DN |
4623 | else |
4624 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 4625 | fi; |
439a7e54 | 4626 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
4627 | |
4628 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 4629 | #define GATHER_STATISTICS 1 |
ba479fd2 | 4630 | _ACEOF |
439a7e54 DN |
4631 | |
4632 | fi | |
4633 | ||
73458fb7 NN |
4634 | # ------------------------------- |
4635 | # Miscenalleous configure options | |
4636 | # ------------------------------- | |
34a86c2b NN |
4637 | |
4638 | # With stabs | |
ba479fd2 | 4639 | |
34a86c2b NN |
4640 | # Check whether --with-stabs or --without-stabs was given. |
4641 | if test "${with_stabs+set}" = set; then | |
4642 | withval="$with_stabs" | |
4643 | stabs="$with_stabs" | |
4644 | else | |
4645 | stabs=no | |
ba479fd2 | 4646 | fi; |
cafe096b | 4647 | |
34a86c2b NN |
4648 | # Determine whether or not multilibs are enabled. |
4649 | # Check whether --enable-multilib or --disable-multilib was given. | |
4650 | if test "${enable_multilib+set}" = set; then | |
4651 | enableval="$enable_multilib" | |
ba479fd2 | 4652 | |
34a86c2b NN |
4653 | else |
4654 | enable_multilib=yes | |
ba479fd2 | 4655 | fi; |
75e93faa | 4656 | |
34a86c2b | 4657 | |
414d23ae HPN |
4658 | # Enable __cxa_atexit for C++. |
4659 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
4660 | if test "${enable___cxa_atexit+set}" = set; then | |
4661 | enableval="$enable___cxa_atexit" | |
75e93faa | 4662 | |
ba479fd2 | 4663 | fi; |
75e93faa | 4664 | |
414d23ae HPN |
4665 | # Enable threads |
4666 | # Pass with no value to take the default | |
4667 | # Pass with a value to specify a thread package | |
4668 | # Check whether --enable-threads or --disable-threads was given. | |
4669 | if test "${enable_threads+set}" = set; then | |
4670 | enableval="$enable_threads" | |
ba479fd2 | 4671 | |
414d23ae HPN |
4672 | else |
4673 | enable_threads='' | |
ba479fd2 | 4674 | fi; |
414d23ae HPN |
4675 | |
4676 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
4677 | if test "${enable_objc_gc+set}" = set; then | |
4678 | enableval="$enable_objc_gc" | |
4679 | if test x$enable_objc_gc = xno; then | |
4680 | objc_boehm_gc='' | |
4681 | else | |
4682 | objc_boehm_gc=1 | |
4683 | fi | |
4684 | else | |
4685 | objc_boehm_gc='' | |
ba479fd2 | 4686 | fi; |
75e93faa ZW |
4687 | |
4688 | ||
414d23ae HPN |
4689 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
4690 | if test "${with_dwarf2+set}" = set; then | |
4691 | withval="$with_dwarf2" | |
4692 | dwarf2="$with_dwarf2" | |
75e93faa | 4693 | else |
414d23ae | 4694 | dwarf2=no |
ba479fd2 | 4695 | fi; |
75e93faa | 4696 | |
414d23ae HPN |
4697 | # Check whether --enable-shared or --disable-shared was given. |
4698 | if test "${enable_shared+set}" = set; then | |
4699 | enableval="$enable_shared" | |
ba479fd2 | 4700 | |
414d23ae HPN |
4701 | case $enable_shared in |
4702 | yes | no) ;; | |
4703 | *) | |
4704 | enable_shared=no | |
4705 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
4706 | for pkg in $enableval; do | |
4707 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
4708 | enable_shared=yes | |
4709 | fi | |
4710 | done | |
4711 | IFS="$ac_save_ifs" | |
4712 | ;; | |
4713 | esac | |
4714 | ||
75e93faa | 4715 | else |
414d23ae | 4716 | enable_shared=yes |
ba479fd2 | 4717 | fi; |
75e93faa | 4718 | |
75e93faa | 4719 | |
75e93faa | 4720 | |
4977bab6 ZW |
4721 | # Check whether --with-sysroot or --without-sysroot was given. |
4722 | if test "${with_sysroot+set}" = set; then | |
4723 | withval="$with_sysroot" | |
ba479fd2 | 4724 | |
4977bab6 | 4725 | case ${with_sysroot} in |
caa55b1e | 4726 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
4727 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
4728 | esac | |
ba479fd2 | 4729 | |
4977bab6 ZW |
4730 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
4731 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
4732 | ||
047d636f DJ |
4733 | if test "x$exec_prefix" = xNONE; then |
4734 | if test "x$prefix" = xNONE; then | |
4735 | test_prefix=/usr/local | |
4736 | else | |
4737 | test_prefix=$prefix | |
4738 | fi | |
4739 | else | |
4740 | test_prefix=$exec_prefix | |
4741 | fi | |
4742 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
4743 | "${test_prefix}"|"${test_prefix}/"*|\ |
4744 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
4745 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
4746 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
4747 | ;; | |
4748 | esac | |
4749 | ||
4977bab6 | 4750 | else |
ba479fd2 | 4751 | |
4977bab6 | 4752 | TARGET_SYSTEM_ROOT= |
db720d9a | 4753 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
4754 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
4755 | ||
ba479fd2 | 4756 | fi; |
4977bab6 ZW |
4757 | |
4758 | ||
4759 | ||
4760 | ||
d1bd0ded | 4761 | # Build with intermodule optimisations |
d1bd0ded GK |
4762 | # Check whether --enable-intermodule or --disable-intermodule was given. |
4763 | if test "${enable_intermodule+set}" = set; then | |
4764 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
4765 | case ${enable_intermodule} in |
4766 | yes) onestep="-onestep";; | |
4767 | *) onestep="";; | |
d1bd0ded | 4768 | esac |
0c46c5c7 KC |
4769 | else |
4770 | onestep="" | |
ba479fd2 | 4771 | fi; |
d1bd0ded GK |
4772 | |
4773 | ||
f3c9f174 NN |
4774 | # Sanity check enable_languages in case someone does not run the toplevel |
4775 | # configure # script. | |
4776 | # Check whether --enable-languages or --disable-languages was given. | |
4777 | if test "${enable_languages+set}" = set; then | |
4778 | enableval="$enable_languages" | |
4779 | case ,${enable_languages}, in | |
4780 | ,,|,yes,) | |
4781 | # go safe -- we cannot be much sure without the toplevel | |
4782 | # configure's | |
4783 | # analysis of which target libs are present and usable | |
4784 | enable_languages=c | |
4785 | ;; | |
4786 | *,all,*) | |
4787 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
4788 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
4789 | { (exit 1); exit 1; }; } | |
4790 | ;; | |
4791 | *,c,*) | |
4792 | ;; | |
4793 | *) | |
4794 | enable_languages=c,${enable_languages} | |
4795 | ;; | |
4796 | esac | |
4797 | else | |
4798 | enable_languages=c | |
4799 | fi; | |
4800 | ||
4801 | subdirs= | |
4802 | for lang in ${srcdir}/*/config-lang.in | |
4803 | do | |
4804 | case $lang in | |
4805 | # The odd quoting in the next line works around | |
4806 | # an apparent bug in bash 1.12 on linux. | |
4807 | ${srcdir}/[*]/config-lang.in) ;; | |
4808 | *) | |
4809 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
4810 | if test "x$lang_alias" = x | |
4811 | then | |
4812 | echo "$lang doesn't set \$language." 1>&2 | |
4813 | exit 1 | |
4814 | fi | |
4815 | case ",$enable_languages," in | |
4816 | *,$lang_alias,*) | |
4817 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
4818 | esac | |
4819 | ;; | |
4820 | esac | |
4821 | done | |
4822 | ||
4823 | ||
73458fb7 NN |
4824 | # ------------------------- |
4825 | # Checks for other programs | |
4826 | # ------------------------- | |
5b67ad6f | 4827 | |
ba479fd2 NN |
4828 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4829 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 4830 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
4831 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
4832 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 4833 | else |
ba479fd2 | 4834 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 4835 | all: |
ba479fd2 NN |
4836 | @echo 'ac_maketemp="$(MAKE)"' |
4837 | _ACEOF | |
e9a25f70 | 4838 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 4839 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
4840 | if test -n "$ac_maketemp"; then |
4841 | eval ac_cv_prog_make_${ac_make}_set=yes | |
4842 | else | |
4843 | eval ac_cv_prog_make_${ac_make}_set=no | |
4844 | fi | |
ba479fd2 | 4845 | rm -f conftest.make |
e9a25f70 JL |
4846 | fi |
4847 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
4848 | echo "$as_me:$LINENO: result: yes" >&5 |
4849 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
4850 | SET_MAKE= |
4851 | else | |
ba479fd2 NN |
4852 | echo "$as_me:$LINENO: result: no" >&5 |
4853 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
4854 | SET_MAKE="MAKE=${MAKE-make}" |
4855 | fi | |
4856 | ||
4857 | ||
861bb6c1 | 4858 | # Find some useful tools |
ba479fd2 | 4859 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 4860 | do |
ba479fd2 | 4861 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 4862 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
4863 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4864 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4865 | if test "${ac_cv_prog_AWK+set}" = set; then | |
4866 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4867 | else |
4868 | if test -n "$AWK"; then | |
4869 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
4870 | else | |
ba479fd2 NN |
4871 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4872 | for as_dir in $PATH | |
4873 | do | |
4874 | IFS=$as_save_IFS | |
4875 | test -z "$as_dir" && as_dir=. | |
4876 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4877 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4878 | ac_cv_prog_AWK="$ac_prog" | |
4879 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4880 | break 2 | |
4881 | fi | |
4882 | done | |
4883 | done | |
4884 | ||
861bb6c1 JL |
4885 | fi |
4886 | fi | |
ba479fd2 | 4887 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 4888 | if test -n "$AWK"; then |
ba479fd2 NN |
4889 | echo "$as_me:$LINENO: result: $AWK" >&5 |
4890 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 4891 | else |
ba479fd2 NN |
4892 | echo "$as_me:$LINENO: result: no" >&5 |
4893 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
4894 | fi |
4895 | ||
ba479fd2 | 4896 | test -n "$AWK" && break |
861bb6c1 JL |
4897 | done |
4898 | ||
776dc15d | 4899 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
4900 | # Bail out if it's missing. |
4901 | case ${AWK} in | |
ba479fd2 NN |
4902 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
4903 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
4904 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
4905 | esac |
4906 | ||
ba479fd2 NN |
4907 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
4908 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
4909 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
4910 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
4911 | else |
4912 | rm -f conftestdata_t | |
4913 | echo >conftestdata_f | |
4914 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
4915 | then | |
4916 | gcc_cv_prog_LN_S="ln -s" | |
4917 | else | |
4918 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4919 | then | |
4920 | gcc_cv_prog_LN_S=ln | |
4921 | else | |
4922 | gcc_cv_prog_LN_S=cp | |
4923 | fi | |
4924 | fi | |
4925 | rm -f conftestdata_f conftestdata_t | |
4926 | ||
4927 | fi | |
4928 | LN_S="$gcc_cv_prog_LN_S" | |
4929 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
4930 | echo "$as_me:$LINENO: result: yes" >&5 |
4931 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
4932 | else |
4933 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
4934 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
4935 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 4936 | else |
ba479fd2 NN |
4937 | echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5 |
4938 | echo "${ECHO_T}no, and neither does ln, so using cp" >&6 | |
0a4b6309 RL |
4939 | fi |
4940 | fi | |
4941 | ||
41e622a8 AP |
4942 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
4943 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
4944 | if test "${acx_cv_prog_LN+set}" = set; then | |
4945 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4946 | else | |
4947 | rm -f conftestdata_t | |
4948 | echo >conftestdata_f | |
4949 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4950 | then | |
4951 | acx_cv_prog_LN=ln | |
4952 | else | |
4953 | acx_cv_prog_LN=no | |
4954 | fi | |
4955 | rm -f conftestdata_f conftestdata_t | |
4956 | ||
4957 | fi | |
4958 | if test $acx_cv_prog_LN = no; then | |
4959 | LN="$LN_S" | |
4960 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
4961 | echo "${ECHO_T}no, using $LN" >&6 | |
4962 | else | |
4963 | LN="$acx_cv_prog_LN" | |
4964 | echo "$as_me:$LINENO: result: yes" >&5 | |
4965 | echo "${ECHO_T}yes" >&6 | |
4966 | fi | |
4967 | ||
ba479fd2 NN |
4968 | if test -n "$ac_tool_prefix"; then |
4969 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4970 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4971 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
4972 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4973 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
4974 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4975 | else |
4976 | if test -n "$RANLIB"; then | |
4977 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4978 | else | |
ba479fd2 NN |
4979 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4980 | for as_dir in $PATH | |
4981 | do | |
4982 | IFS=$as_save_IFS | |
4983 | test -z "$as_dir" && as_dir=. | |
4984 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4985 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4986 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4987 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4988 | break 2 | |
4989 | fi | |
4990 | done | |
4991 | done | |
4992 | ||
6e3f3080 NN |
4993 | fi |
4994 | fi | |
ba479fd2 | 4995 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 4996 | if test -n "$RANLIB"; then |
ba479fd2 NN |
4997 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
4998 | echo "${ECHO_T}$RANLIB" >&6 | |
4999 | else | |
5000 | echo "$as_me:$LINENO: result: no" >&5 | |
5001 | echo "${ECHO_T}no" >&6 | |
5002 | fi | |
5003 | ||
5004 | fi | |
5005 | if test -z "$ac_cv_prog_RANLIB"; then | |
5006 | ac_ct_RANLIB=$RANLIB | |
5007 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5008 | set dummy ranlib; ac_word=$2 | |
5009 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
5010 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5011 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
5012 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5013 | else | |
5014 | if test -n "$ac_ct_RANLIB"; then | |
5015 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5016 | else | |
5017 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5018 | for as_dir in $PATH | |
5019 | do | |
5020 | IFS=$as_save_IFS | |
5021 | test -z "$as_dir" && as_dir=. | |
5022 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5023 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5024 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5025 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5026 | break 2 | |
5027 | fi | |
5028 | done | |
5029 | done | |
5030 | ||
5031 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
5032 | fi | |
5033 | fi | |
5034 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5035 | if test -n "$ac_ct_RANLIB"; then | |
5036 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
5037 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 5038 | else |
ba479fd2 NN |
5039 | echo "$as_me:$LINENO: result: no" >&5 |
5040 | echo "${ECHO_T}no" >&6 | |
5041 | fi | |
5042 | ||
5043 | RANLIB=$ac_ct_RANLIB | |
5044 | else | |
5045 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
5046 | fi |
5047 | ||
343a6100 MM |
5048 | case "${host}" in |
5049 | *-*-darwin*) | |
5050 | # By default, the Darwin ranlib will not treat common symbols as | |
5051 | # definitions when building the archive table of contents. Other | |
5052 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
5053 | # it behave similarly. | |
5054 | ranlib_flags="-c" | |
5055 | ;; | |
5056 | *) | |
5057 | ranlib_flags="" | |
5058 | esac | |
5059 | ||
5060 | ||
0a4b6309 RL |
5061 | # Find a good install program. We prefer a C program (faster), |
5062 | # so one script is as good as another. But avoid the broken or | |
5063 | # incompatible versions: | |
5064 | # SysV /etc/install, /usr/sbin/install | |
5065 | # SunOS /usr/etc/install | |
5066 | # IRIX /sbin/install | |
5067 | # AIX /bin/install | |
5068 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5069 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5070 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
5071 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
5072 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 5073 | if test -z "$INSTALL"; then |
ba479fd2 NN |
5074 | if test "${ac_cv_path_install+set}" = set; then |
5075 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
5076 | else |
5077 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
5078 | for ac_dir in $PATH; do | |
5079 | # Account for people who put trailing slashes in PATH elements. | |
5080 | case "$ac_dir/" in | |
5081 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
5082 | *) | |
5083 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5084 | for ac_prog in ginstall scoinst install; do | |
5085 | if test -f $ac_dir/$ac_prog; then | |
5086 | if test $ac_prog = install && | |
5087 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
5088 | # AIX install. It has an incompatible calling convention. | |
5089 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
5090 | : | |
5091 | else | |
5092 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
5093 | break 2 | |
5094 | fi | |
5095 | fi | |
5096 | done | |
5097 | ;; | |
5098 | esac | |
5099 | done | |
5100 | IFS="$ac_save_IFS" | |
5101 | ||
5102 | fi | |
5103 | if test "${ac_cv_path_install+set}" = set; then | |
5104 | INSTALL="$ac_cv_path_install" | |
5105 | else | |
5106 | # As a last resort, use the slow shell script. We don't cache a | |
5107 | # path for INSTALL within a source directory, because that will | |
5108 | # break other packages using the cache if that directory is | |
5109 | # removed, or if the path is relative. | |
5110 | INSTALL="$ac_install_sh" | |
5111 | fi | |
5112 | fi | |
ba479fd2 NN |
5113 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
5114 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
5115 | |
5116 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5117 | # It thinks the first close brace ends the variable substitution. | |
5118 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5119 | ||
5120 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
5121 | ||
861bb6c1 | 5122 | |
3a000df0 | 5123 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
5124 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
5125 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
5126 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
5127 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
5128 | else |
5129 | echo abfoo >t1 | |
5130 | echo cdfoo >t2 | |
269a7343 | 5131 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
5132 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
5133 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 5134 | : |
3a000df0 KC |
5135 | else |
5136 | gcc_cv_prog_cmp_skip=gnucompare | |
5137 | fi | |
269a7343 KG |
5138 | fi |
5139 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
5140 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
5141 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
5142 | : | |
5143 | else | |
5144 | gcc_cv_prog_cmp_skip=fastcompare | |
5145 | fi | |
5146 | fi | |
3a000df0 KC |
5147 | fi |
5148 | rm t1 t2 | |
5149 | ||
5150 | fi | |
ba479fd2 NN |
5151 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
5152 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
5153 | make_compare_target=$gcc_cv_prog_cmp_skip |
5154 | ||
5155 | ||
5156 | ||
73458fb7 NN |
5157 | # See if we have the mktemp command. |
5158 | # Extract the first word of "mktemp", so it can be a program name with args. | |
5159 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
5160 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5161 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5162 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
5163 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5164 | else |
5165 | if test -n "$have_mktemp_command"; then | |
5166 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
5167 | else | |
ba479fd2 NN |
5168 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5169 | for as_dir in $PATH | |
5170 | do | |
5171 | IFS=$as_save_IFS | |
5172 | test -z "$as_dir" && as_dir=. | |
5173 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5174 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5175 | ac_cv_prog_have_mktemp_command="yes" | |
5176 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5177 | break 2 | |
5178 | fi | |
5179 | done | |
5180 | done | |
5181 | ||
73458fb7 NN |
5182 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
5183 | fi | |
5184 | fi | |
ba479fd2 | 5185 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 5186 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
5187 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
5188 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 5189 | else |
ba479fd2 NN |
5190 | echo "$as_me:$LINENO: result: no" >&5 |
5191 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5192 | fi |
5193 | ||
5194 | ||
5195 | # Do we have a single-tree copy of texinfo? | |
5196 | if test -f $srcdir/../texinfo/Makefile.in; then | |
5197 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
5198 | gcc_cv_prog_makeinfo_modern=yes | |
ba479fd2 NN |
5199 | echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5 |
5200 | echo "${ECHO_T}Using makeinfo from the unified source tree." >&6 | |
73458fb7 NN |
5201 | else |
5202 | # See if makeinfo has been installed and is modern enough | |
5203 | # that we can use it. | |
5204 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
5205 | set dummy makeinfo; ac_word=$2 | |
ba479fd2 NN |
5206 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5207 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5208 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
5209 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5210 | else |
5211 | if test -n "$MAKEINFO"; then | |
5212 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
5213 | else | |
ba479fd2 NN |
5214 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5215 | for as_dir in $PATH | |
5216 | do | |
5217 | IFS=$as_save_IFS | |
5218 | test -z "$as_dir" && as_dir=. | |
5219 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5220 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5221 | ac_cv_prog_MAKEINFO="makeinfo" | |
5222 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5223 | break 2 | |
5224 | fi | |
5225 | done | |
5226 | done | |
5227 | ||
73458fb7 NN |
5228 | fi |
5229 | fi | |
ba479fd2 | 5230 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 5231 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
5232 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
5233 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 5234 | else |
ba479fd2 NN |
5235 | echo "$as_me:$LINENO: result: no" >&5 |
5236 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5237 | fi |
5238 | ||
5239 | if test -n "$MAKEINFO"; then | |
5240 | # Found it, now check the version. | |
ba479fd2 NN |
5241 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
5242 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
5243 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
5244 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5245 | else |
5246 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
5247 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
d2640b91 | 5248 | echo "configure:5248: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
5249 | case $ac_prog_version in |
5250 | '') gcc_cv_prog_makeinfo_modern=no;; | |
5251 | 4.[2-9]*) | |
5252 | gcc_cv_prog_makeinfo_modern=yes;; | |
5253 | *) gcc_cv_prog_makeinfo_modern=no;; | |
5254 | esac | |
5255 | ||
5256 | fi | |
ba479fd2 NN |
5257 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
5258 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
5259 | else |
5260 | gcc_cv_prog_makeinfo_modern=no | |
5261 | fi | |
5262 | ||
5263 | fi | |
5264 | ||
5265 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
ba479fd2 NN |
5266 | { echo "$as_me:$LINENO: WARNING: |
5267 | *** Makeinfo is missing or too old. | |
5268 | *** Info documentation will not be built." >&5 | |
5269 | echo "$as_me: WARNING: | |
cafe096b | 5270 | *** Makeinfo is missing or too old. |
ba479fd2 | 5271 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
5272 | BUILD_INFO= |
5273 | else | |
ba479fd2 | 5274 | BUILD_INFO=info |
73458fb7 NN |
5275 | fi |
5276 | ||
5277 | # Is pod2man recent enough to regenerate manpages? | |
ba479fd2 NN |
5278 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
5279 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 5280 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
5281 | echo "$as_me:$LINENO: result: yes" >&5 |
5282 | echo "${ECHO_T}yes" >&6 | |
5283 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 5284 | else |
ba479fd2 NN |
5285 | echo "$as_me:$LINENO: result: no" >&5 |
5286 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5287 | GENERATED_MANPAGES= |
5288 | fi | |
5289 | ||
5290 | # How about lex? | |
9850f34a | 5291 | if test x${build} = x${host} && test -f $srcdir/../flex/skel.c; then |
73458fb7 NN |
5292 | FLEX='$(objdir)/../flex/flex' |
5293 | else | |
5294 | # Extract the first word of "flex", so it can be a program name with args. | |
5295 | set dummy flex; ac_word=$2 | |
ba479fd2 NN |
5296 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5297 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5298 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
5299 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5300 | else |
5301 | if test -n "$FLEX"; then | |
5302 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
5303 | else | |
ba479fd2 NN |
5304 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5305 | for as_dir in $PATH | |
5306 | do | |
5307 | IFS=$as_save_IFS | |
5308 | test -z "$as_dir" && as_dir=. | |
5309 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5310 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5311 | ac_cv_prog_FLEX="flex" | |
5312 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5313 | break 2 | |
5314 | fi | |
5315 | done | |
5316 | done | |
5317 | ||
73458fb7 NN |
5318 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
5319 | fi | |
5320 | fi | |
ba479fd2 | 5321 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 5322 | if test -n "$FLEX"; then |
ba479fd2 NN |
5323 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
5324 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 5325 | else |
ba479fd2 NN |
5326 | echo "$as_me:$LINENO: result: no" >&5 |
5327 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5328 | fi |
5329 | ||
5330 | fi | |
5331 | ||
5332 | # Bison? | |
5333 | # The -L switch is so bison can find its skeleton file. | |
9850f34a | 5334 | if test x${build} = x${host} && test -f $srcdir/../bison/bison.simple; then |
73458fb7 NN |
5335 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' |
5336 | else | |
5337 | # Extract the first word of "bison", so it can be a program name with args. | |
5338 | set dummy bison; ac_word=$2 | |
ba479fd2 NN |
5339 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5340 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5341 | if test "${ac_cv_prog_BISON+set}" = set; then | |
5342 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5343 | else |
5344 | if test -n "$BISON"; then | |
5345 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
5346 | else | |
ba479fd2 NN |
5347 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5348 | for as_dir in $PATH | |
5349 | do | |
5350 | IFS=$as_save_IFS | |
5351 | test -z "$as_dir" && as_dir=. | |
5352 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5353 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5354 | ac_cv_prog_BISON="bison" | |
5355 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5356 | break 2 | |
5357 | fi | |
5358 | done | |
5359 | done | |
5360 | ||
73458fb7 NN |
5361 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
5362 | fi | |
5363 | fi | |
ba479fd2 | 5364 | BISON=$ac_cv_prog_BISON |
73458fb7 | 5365 | if test -n "$BISON"; then |
ba479fd2 NN |
5366 | echo "$as_me:$LINENO: result: $BISON" >&5 |
5367 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 5368 | else |
ba479fd2 NN |
5369 | echo "$as_me:$LINENO: result: no" >&5 |
5370 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5371 | fi |
5372 | ||
5373 | fi | |
5374 | ||
5375 | # -------------------- | |
5376 | # Checks for C headers | |
5377 | # -------------------- | |
5378 | ||
ba479fd2 NN |
5379 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
5380 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
5381 | if test "${gcc_cv_glibc+set}" = set; then | |
5382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5383 | else | |
5384 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5385 | /* confdefs.h. */ |
5386 | _ACEOF | |
5387 | cat confdefs.h >>conftest.$ac_ext | |
5388 | cat >>conftest.$ac_ext <<_ACEOF | |
5389 | /* end confdefs.h. */ | |
73458fb7 | 5390 | #include <features.h> |
ba479fd2 NN |
5391 | int |
5392 | main () | |
5393 | { | |
73458fb7 NN |
5394 | |
5395 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
5396 | #error Not a GNU C library system | |
5397 | #endif | |
ba479fd2 NN |
5398 | ; |
5399 | return 0; | |
5400 | } | |
5401 | _ACEOF | |
5402 | rm -f conftest.$ac_objext | |
5403 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5404 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5405 | ac_status=$? |
86da66b5 HPN |
5406 | grep -v '^ *+' conftest.er1 >conftest.err |
5407 | rm -f conftest.er1 | |
5408 | cat conftest.err >&5 | |
ba479fd2 NN |
5409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5410 | (exit $ac_status); } && | |
d2640b91 | 5411 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5413 | (eval $ac_try) 2>&5 | |
5414 | ac_status=$? | |
5415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5416 | (exit $ac_status); }; } && | |
5417 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5419 | (eval $ac_try) 2>&5 | |
5420 | ac_status=$? | |
5421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5422 | (exit $ac_status); }; }; then | |
73458fb7 NN |
5423 | gcc_cv_glibc=yes |
5424 | else | |
ba479fd2 NN |
5425 | echo "$as_me: failed program was:" >&5 |
5426 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5427 | ||
5428 | gcc_cv_glibc=no | |
73458fb7 | 5429 | fi |
86da66b5 | 5430 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
5431 | fi |
5432 | ||
ba479fd2 NN |
5433 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
5434 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 5435 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
5436 | |
5437 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 5438 | #define _GNU_SOURCE 1 |
ba479fd2 | 5439 | _ACEOF |
73458fb7 NN |
5440 | |
5441 | fi | |
5442 | ||
ca9bc441 NN |
5443 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
5444 | # works later. *sigh* This needs to come before all header checks. | |
5445 | ||
5446 | ac_c_preproc_warn_flag=yes | |
5447 | ||
ba479fd2 NN |
5448 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
5449 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
5450 | if test "${ac_cv_header_stdc+set}" = set; then | |
5451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5452 | else |
ba479fd2 | 5453 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5454 | /* confdefs.h. */ |
5455 | _ACEOF | |
5456 | cat confdefs.h >>conftest.$ac_ext | |
5457 | cat >>conftest.$ac_ext <<_ACEOF | |
5458 | /* end confdefs.h. */ | |
956d6950 JL |
5459 | #include <stdlib.h> |
5460 | #include <stdarg.h> | |
5461 | #include <string.h> | |
5462 | #include <float.h> | |
ba479fd2 NN |
5463 | |
5464 | int | |
5465 | main () | |
5466 | { | |
5467 | ||
5468 | ; | |
5469 | return 0; | |
5470 | } | |
5471 | _ACEOF | |
5472 | rm -f conftest.$ac_objext | |
5473 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5474 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5475 | ac_status=$? |
86da66b5 HPN |
5476 | grep -v '^ *+' conftest.er1 >conftest.err |
5477 | rm -f conftest.er1 | |
5478 | cat conftest.err >&5 | |
ba479fd2 NN |
5479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5480 | (exit $ac_status); } && | |
d2640b91 | 5481 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5483 | (eval $ac_try) 2>&5 | |
5484 | ac_status=$? | |
5485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5486 | (exit $ac_status); }; } && | |
5487 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5489 | (eval $ac_try) 2>&5 | |
5490 | ac_status=$? | |
5491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5492 | (exit $ac_status); }; }; then | |
956d6950 JL |
5493 | ac_cv_header_stdc=yes |
5494 | else | |
ba479fd2 NN |
5495 | echo "$as_me: failed program was:" >&5 |
5496 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5497 | ||
5498 | ac_cv_header_stdc=no | |
956d6950 | 5499 | fi |
86da66b5 | 5500 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
5501 | |
5502 | if test $ac_cv_header_stdc = yes; then | |
5503 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 5504 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5505 | /* confdefs.h. */ |
5506 | _ACEOF | |
5507 | cat confdefs.h >>conftest.$ac_ext | |
5508 | cat >>conftest.$ac_ext <<_ACEOF | |
5509 | /* end confdefs.h. */ | |
956d6950 | 5510 | #include <string.h> |
ba479fd2 NN |
5511 | |
5512 | _ACEOF | |
956d6950 | 5513 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5514 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
5515 | : |
5516 | else | |
956d6950 JL |
5517 | ac_cv_header_stdc=no |
5518 | fi | |
5519 | rm -f conftest* | |
5520 | ||
5521 | fi | |
5522 | ||
5523 | if test $ac_cv_header_stdc = yes; then | |
5524 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 5525 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5526 | /* confdefs.h. */ |
5527 | _ACEOF | |
5528 | cat confdefs.h >>conftest.$ac_ext | |
5529 | cat >>conftest.$ac_ext <<_ACEOF | |
5530 | /* end confdefs.h. */ | |
956d6950 | 5531 | #include <stdlib.h> |
ba479fd2 NN |
5532 | |
5533 | _ACEOF | |
956d6950 | 5534 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5535 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
5536 | : |
5537 | else | |
956d6950 JL |
5538 | ac_cv_header_stdc=no |
5539 | fi | |
5540 | rm -f conftest* | |
5541 | ||
5542 | fi | |
5543 | ||
5544 | if test $ac_cv_header_stdc = yes; then | |
5545 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 5546 | if test "$cross_compiling" = yes; then |
956d6950 JL |
5547 | : |
5548 | else | |
ba479fd2 | 5549 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5550 | /* confdefs.h. */ |
5551 | _ACEOF | |
5552 | cat confdefs.h >>conftest.$ac_ext | |
5553 | cat >>conftest.$ac_ext <<_ACEOF | |
5554 | /* end confdefs.h. */ | |
956d6950 | 5555 | #include <ctype.h> |
ba479fd2 NN |
5556 | #if ((' ' & 0x0FF) == 0x020) |
5557 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5558 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5559 | #else | |
5560 | # define ISLOWER(c) \ | |
86da66b5 HPN |
5561 | (('a' <= (c) && (c) <= 'i') \ |
5562 | || ('j' <= (c) && (c) <= 'r') \ | |
5563 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
5564 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
5565 | #endif | |
63cf211a | 5566 | |
ba479fd2 NN |
5567 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
5568 | int | |
5569 | main () | |
5570 | { | |
5571 | int i; | |
5572 | for (i = 0; i < 256; i++) | |
5573 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 5574 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
5575 | exit(2); |
5576 | exit (0); | |
5577 | } | |
5578 | _ACEOF | |
5579 | rm -f conftest$ac_exeext | |
5580 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5581 | (eval $ac_link) 2>&5 | |
5582 | ac_status=$? | |
5583 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5584 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5585 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5586 | (eval $ac_try) 2>&5 | |
5587 | ac_status=$? | |
5588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5589 | (exit $ac_status); }; }; then | |
956d6950 JL |
5590 | : |
5591 | else | |
ba479fd2 NN |
5592 | echo "$as_me: program exited with status $ac_status" >&5 |
5593 | echo "$as_me: failed program was:" >&5 | |
5594 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5595 | ||
5596 | ( exit $ac_status ) | |
5597 | ac_cv_header_stdc=no | |
956d6950 | 5598 | fi |
86da66b5 | 5599 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5600 | fi |
956d6950 JL |
5601 | fi |
5602 | fi | |
ba479fd2 NN |
5603 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
5604 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 5605 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
5606 | |
5607 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5608 | #define STDC_HEADERS 1 |
ba479fd2 | 5609 | _ACEOF |
956d6950 JL |
5610 | |
5611 | fi | |
5612 | ||
ba479fd2 NN |
5613 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
5614 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
5615 | if test "${ac_cv_header_time+set}" = set; then | |
5616 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5617 | else |
ba479fd2 | 5618 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5619 | /* confdefs.h. */ |
5620 | _ACEOF | |
5621 | cat confdefs.h >>conftest.$ac_ext | |
5622 | cat >>conftest.$ac_ext <<_ACEOF | |
5623 | /* end confdefs.h. */ | |
956d6950 JL |
5624 | #include <sys/types.h> |
5625 | #include <sys/time.h> | |
5626 | #include <time.h> | |
ba479fd2 NN |
5627 | |
5628 | int | |
5629 | main () | |
5630 | { | |
5631 | if ((struct tm *) 0) | |
5632 | return 0; | |
5633 | ; | |
5634 | return 0; | |
5635 | } | |
5636 | _ACEOF | |
5637 | rm -f conftest.$ac_objext | |
5638 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5639 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5640 | ac_status=$? |
86da66b5 HPN |
5641 | grep -v '^ *+' conftest.er1 >conftest.err |
5642 | rm -f conftest.er1 | |
5643 | cat conftest.err >&5 | |
ba479fd2 NN |
5644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5645 | (exit $ac_status); } && | |
d2640b91 | 5646 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5647 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5648 | (eval $ac_try) 2>&5 | |
5649 | ac_status=$? | |
5650 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5651 | (exit $ac_status); }; } && | |
5652 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5653 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5654 | (eval $ac_try) 2>&5 | |
5655 | ac_status=$? | |
5656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5657 | (exit $ac_status); }; }; then | |
956d6950 JL |
5658 | ac_cv_header_time=yes |
5659 | else | |
ba479fd2 NN |
5660 | echo "$as_me: failed program was:" >&5 |
5661 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5662 | ||
5663 | ac_cv_header_time=no | |
956d6950 | 5664 | fi |
86da66b5 | 5665 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5666 | fi |
ba479fd2 NN |
5667 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
5668 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 5669 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
5670 | |
5671 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5672 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 5673 | _ACEOF |
956d6950 JL |
5674 | |
5675 | fi | |
5676 | ||
41e622a8 AP |
5677 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
5678 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
5679 | if test "${gcc_cv_header_string+set}" = set; then | |
5680 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5681 | else | |
5682 | cat >conftest.$ac_ext <<_ACEOF | |
5683 | /* confdefs.h. */ | |
5684 | _ACEOF | |
5685 | cat confdefs.h >>conftest.$ac_ext | |
5686 | cat >>conftest.$ac_ext <<_ACEOF | |
5687 | /* end confdefs.h. */ | |
5688 | #include <string.h> | |
5689 | #include <strings.h> | |
5690 | int | |
5691 | main () | |
5692 | { | |
5693 | ||
5694 | ; | |
5695 | return 0; | |
5696 | } | |
5697 | _ACEOF | |
5698 | rm -f conftest.$ac_objext | |
5699 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5700 | (eval $ac_compile) 2>conftest.er1 | |
5701 | ac_status=$? | |
5702 | grep -v '^ *+' conftest.er1 >conftest.err | |
5703 | rm -f conftest.er1 | |
5704 | cat conftest.err >&5 | |
5705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5706 | (exit $ac_status); } && | |
d2640b91 | 5707 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41e622a8 AP |
5708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5709 | (eval $ac_try) 2>&5 | |
5710 | ac_status=$? | |
5711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5712 | (exit $ac_status); }; } && | |
5713 | { ac_try='test -s conftest.$ac_objext' | |
5714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5715 | (eval $ac_try) 2>&5 | |
5716 | ac_status=$? | |
5717 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5718 | (exit $ac_status); }; }; then | |
5719 | gcc_cv_header_string=yes | |
5720 | else | |
5721 | echo "$as_me: failed program was:" >&5 | |
5722 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5723 | ||
5724 | gcc_cv_header_string=no | |
5725 | fi | |
5726 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5727 | fi | |
5728 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
5729 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
5730 | if test $gcc_cv_header_string = yes; then | |
5731 | ||
5732 | cat >>confdefs.h <<\_ACEOF | |
5733 | #define STRING_WITH_STRINGS 1 | |
5734 | _ACEOF | |
5735 | ||
5736 | fi | |
5737 | ||
ba479fd2 NN |
5738 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
5739 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
5740 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
5741 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 5742 | else |
ba479fd2 | 5743 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5744 | /* confdefs.h. */ |
5745 | _ACEOF | |
5746 | cat confdefs.h >>conftest.$ac_ext | |
5747 | cat >>conftest.$ac_ext <<_ACEOF | |
5748 | /* end confdefs.h. */ | |
e9831ca0 KG |
5749 | #include <sys/types.h> |
5750 | #include <sys/wait.h> | |
5751 | #ifndef WEXITSTATUS | |
ba479fd2 | 5752 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
5753 | #endif |
5754 | #ifndef WIFEXITED | |
ba479fd2 | 5755 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 5756 | #endif |
ba479fd2 NN |
5757 | |
5758 | int | |
5759 | main () | |
5760 | { | |
5761 | int s; | |
5762 | wait (&s); | |
5763 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
5764 | ; | |
5765 | return 0; | |
5766 | } | |
5767 | _ACEOF | |
5768 | rm -f conftest.$ac_objext | |
5769 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5770 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5771 | ac_status=$? |
86da66b5 HPN |
5772 | grep -v '^ *+' conftest.er1 >conftest.err |
5773 | rm -f conftest.er1 | |
5774 | cat conftest.err >&5 | |
ba479fd2 NN |
5775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5776 | (exit $ac_status); } && | |
d2640b91 | 5777 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5779 | (eval $ac_try) 2>&5 | |
5780 | ac_status=$? | |
5781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5782 | (exit $ac_status); }; } && | |
5783 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5785 | (eval $ac_try) 2>&5 | |
5786 | ac_status=$? | |
5787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5788 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
5789 | ac_cv_header_sys_wait_h=yes |
5790 | else | |
ba479fd2 NN |
5791 | echo "$as_me: failed program was:" >&5 |
5792 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5793 | ||
5794 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 5795 | fi |
86da66b5 | 5796 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 5797 | fi |
ba479fd2 NN |
5798 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
5799 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 5800 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
5801 | |
5802 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 5803 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 5804 | _ACEOF |
6e3f3080 | 5805 | |
63cf211a | 5806 | fi |
6e3f3080 | 5807 | |
ba479fd2 NN |
5808 | |
5809 | ||
5810 | ||
5811 | ||
5812 | ||
5813 | ||
5814 | ||
5815 | ||
5816 | ||
5817 | ||
5818 | ||
5819 | ||
5820 | ||
5821 | ||
5822 | ||
5823 | ||
5824 | ||
5825 | ||
5826 | ||
5827 | ||
5828 | ||
5829 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \ | |
1072ec3f | 5830 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 5831 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 5832 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 5833 | do |
ba479fd2 | 5834 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 5835 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
5836 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
5837 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5838 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5839 | else |
ca9bc441 | 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. */ | |
5846 | #include <$ac_header> | |
5847 | _ACEOF | |
5848 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5849 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5850 | ac_status=$? | |
5851 | grep -v '^ *+' conftest.er1 >conftest.err | |
5852 | rm -f conftest.er1 | |
5853 | cat conftest.err >&5 | |
5854 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5855 | (exit $ac_status); } >/dev/null; then | |
5856 | if test -s conftest.err; then | |
5857 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 5858 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
5859 | else |
5860 | ac_cpp_err= | |
5861 | fi | |
5862 | else | |
5863 | ac_cpp_err=yes | |
5864 | fi | |
5865 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5866 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
5867 | else |
5868 | echo "$as_me: failed program was:" >&5 | |
5869 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5870 | ||
ca9bc441 | 5871 | eval "$as_ac_Header=no" |
ba479fd2 NN |
5872 | fi |
5873 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5874 | fi |
ba479fd2 NN |
5875 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
5876 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
5877 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
5878 | cat >>confdefs.h <<_ACEOF | |
5879 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5880 | _ACEOF | |
5881 | ||
956d6950 JL |
5882 | fi |
5883 | done | |
5884 | ||
5885 | ||
f24af81b | 5886 | # Check for thread headers. |
ca9bc441 | 5887 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
5888 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
5889 | if test "${ac_cv_header_thread_h+set}" = set; then | |
5890 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5891 | else |
ca9bc441 | 5892 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5893 | /* confdefs.h. */ |
5894 | _ACEOF | |
5895 | cat confdefs.h >>conftest.$ac_ext | |
5896 | cat >>conftest.$ac_ext <<_ACEOF | |
5897 | /* end confdefs.h. */ | |
5898 | #include <thread.h> | |
5899 | _ACEOF | |
5900 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5901 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5902 | ac_status=$? | |
5903 | grep -v '^ *+' conftest.er1 >conftest.err | |
5904 | rm -f conftest.er1 | |
5905 | cat conftest.err >&5 | |
5906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5907 | (exit $ac_status); } >/dev/null; then | |
5908 | if test -s conftest.err; then | |
5909 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 5910 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
5911 | else |
5912 | ac_cpp_err= | |
5913 | fi | |
5914 | else | |
5915 | ac_cpp_err=yes | |
5916 | fi | |
5917 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5918 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
5919 | else |
5920 | echo "$as_me: failed program was:" >&5 | |
5921 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5922 | ||
ca9bc441 | 5923 | ac_cv_header_thread_h=no |
ba479fd2 NN |
5924 | fi |
5925 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5926 | fi |
ba479fd2 NN |
5927 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
5928 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 5929 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
5930 | have_thread_h=yes |
5931 | else | |
ba479fd2 | 5932 | have_thread_h= |
f24af81b TT |
5933 | fi |
5934 | ||
ca9bc441 | 5935 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
5936 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
5937 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
5938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 5939 | else |
ca9bc441 | 5940 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5941 | /* confdefs.h. */ |
5942 | _ACEOF | |
5943 | cat confdefs.h >>conftest.$ac_ext | |
5944 | cat >>conftest.$ac_ext <<_ACEOF | |
5945 | /* end confdefs.h. */ | |
5946 | #include <pthread.h> | |
5947 | _ACEOF | |
5948 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5949 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5950 | ac_status=$? | |
5951 | grep -v '^ *+' conftest.er1 >conftest.err | |
5952 | rm -f conftest.er1 | |
5953 | cat conftest.err >&5 | |
5954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5955 | (exit $ac_status); } >/dev/null; then | |
5956 | if test -s conftest.err; then | |
5957 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 5958 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
5959 | else |
5960 | ac_cpp_err= | |
5961 | fi | |
5962 | else | |
5963 | ac_cpp_err=yes | |
5964 | fi | |
5965 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5966 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
5967 | else |
5968 | echo "$as_me: failed program was:" >&5 | |
5969 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5970 | ||
ca9bc441 | 5971 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
5972 | fi |
5973 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5974 | fi |
ba479fd2 NN |
5975 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
5976 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 5977 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
5978 | have_pthread_h=yes |
5979 | else | |
ba479fd2 | 5980 | have_pthread_h= |
f24af81b TT |
5981 | fi |
5982 | ||
5983 | ||
84c041a1 | 5984 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
5985 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
5986 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
5987 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
5988 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5989 | else | |
5990 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5991 | /* confdefs.h. */ |
5992 | _ACEOF | |
5993 | cat confdefs.h >>conftest.$ac_ext | |
5994 | cat >>conftest.$ac_ext <<_ACEOF | |
5995 | /* end confdefs.h. */ | |
75e93faa ZW |
5996 | #ifdef HAVE_LIMITS_H |
5997 | #include <limits.h> | |
5998 | #endif | |
5999 | #ifdef CHAR_BIT | |
6000 | found | |
6001 | #endif | |
ba479fd2 | 6002 | _ACEOF |
75e93faa | 6003 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 6004 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
6005 | gcc_cv_decl_char_bit=yes |
6006 | else | |
75e93faa ZW |
6007 | gcc_cv_decl_char_bit=no |
6008 | fi | |
6009 | rm -f conftest* | |
6010 | ||
6011 | ||
6012 | fi | |
ba479fd2 NN |
6013 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
6014 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 6015 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
6016 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
6017 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
6018 | if test "${gcc_cv_c_nbby+set}" = set; then | |
6019 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
6020 | else |
6021 | i=8 | |
6022 | gcc_cv_c_nbby= | |
6023 | while test $i -lt 65; do | |
ba479fd2 | 6024 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6025 | /* confdefs.h. */ |
6026 | _ACEOF | |
6027 | cat confdefs.h >>conftest.$ac_ext | |
6028 | cat >>conftest.$ac_ext <<_ACEOF | |
6029 | /* end confdefs.h. */ | |
6030 | ||
6031 | int | |
6032 | main () | |
6033 | { | |
4e70264f ZW |
6034 | switch(0) { |
6035 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
6036 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
6037 | ; } | |
ba479fd2 NN |
6038 | ; |
6039 | return 0; | |
6040 | } | |
6041 | _ACEOF | |
6042 | rm -f conftest.$ac_objext | |
6043 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6044 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6045 | ac_status=$? |
86da66b5 HPN |
6046 | grep -v '^ *+' conftest.er1 >conftest.err |
6047 | rm -f conftest.er1 | |
6048 | cat conftest.err >&5 | |
ba479fd2 NN |
6049 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6050 | (exit $ac_status); } && | |
d2640b91 | 6051 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6052 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6053 | (eval $ac_try) 2>&5 | |
6054 | ac_status=$? | |
6055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6056 | (exit $ac_status); }; } && | |
6057 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6058 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6059 | (eval $ac_try) 2>&5 | |
6060 | ac_status=$? | |
6061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6062 | (exit $ac_status); }; }; then | |
4e70264f | 6063 | gcc_cv_c_nbby=$i; break |
75e93faa | 6064 | else |
ba479fd2 NN |
6065 | echo "$as_me: failed program was:" >&5 |
6066 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6067 | ||
75e93faa | 6068 | fi |
86da66b5 | 6069 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
6070 | i=`expr $i + 1` |
6071 | done | |
6072 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
6073 | ||
6074 | fi | |
ba479fd2 NN |
6075 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
6076 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 6077 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
6078 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
6079 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
6080 | { (exit 1); exit 1; }; } | |
75e93faa | 6081 | else |
ba479fd2 NN |
6082 | |
6083 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 6084 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 6085 | _ACEOF |
75e93faa ZW |
6086 | |
6087 | fi | |
6088 | fi | |
ba479fd2 NN |
6089 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
6090 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
6091 | if test "${ac_cv_c_bigendian+set}" = set; then | |
6092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 6093 | else |
4977bab6 ZW |
6094 | ac_cv_c_bigendian=unknown |
6095 | # See if sys/param.h defines the BYTE_ORDER macro. | |
ba479fd2 | 6096 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6097 | /* confdefs.h. */ |
6098 | _ACEOF | |
6099 | cat confdefs.h >>conftest.$ac_ext | |
6100 | cat >>conftest.$ac_ext <<_ACEOF | |
6101 | /* end confdefs.h. */ | |
4977bab6 ZW |
6102 | #include <sys/types.h> |
6103 | #include <sys/param.h> | |
ba479fd2 NN |
6104 | int |
6105 | main () | |
6106 | { | |
2d6eb5bf | 6107 | |
4977bab6 ZW |
6108 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
6109 | bogus endian macros | |
84c041a1 | 6110 | #endif |
ba479fd2 NN |
6111 | ; |
6112 | return 0; | |
6113 | } | |
6114 | _ACEOF | |
6115 | rm -f conftest.$ac_objext | |
6116 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6117 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6118 | ac_status=$? |
86da66b5 HPN |
6119 | grep -v '^ *+' conftest.er1 >conftest.err |
6120 | rm -f conftest.er1 | |
6121 | cat conftest.err >&5 | |
ba479fd2 NN |
6122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6123 | (exit $ac_status); } && | |
d2640b91 | 6124 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6125 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6126 | (eval $ac_try) 2>&5 | |
6127 | ac_status=$? | |
6128 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6129 | (exit $ac_status); }; } && | |
6130 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6131 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6132 | (eval $ac_try) 2>&5 | |
6133 | ac_status=$? | |
6134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6135 | (exit $ac_status); }; }; then | |
4977bab6 | 6136 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 6137 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6138 | /* confdefs.h. */ |
6139 | _ACEOF | |
6140 | cat confdefs.h >>conftest.$ac_ext | |
6141 | cat >>conftest.$ac_ext <<_ACEOF | |
6142 | /* end confdefs.h. */ | |
4977bab6 ZW |
6143 | #include <sys/types.h> |
6144 | #include <sys/param.h> | |
ba479fd2 NN |
6145 | int |
6146 | main () | |
6147 | { | |
4977bab6 ZW |
6148 | |
6149 | #if BYTE_ORDER != BIG_ENDIAN | |
6150 | not big endian | |
84c041a1 | 6151 | #endif |
ba479fd2 NN |
6152 | ; |
6153 | return 0; | |
6154 | } | |
6155 | _ACEOF | |
6156 | rm -f conftest.$ac_objext | |
6157 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6158 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6159 | ac_status=$? |
86da66b5 HPN |
6160 | grep -v '^ *+' conftest.er1 >conftest.err |
6161 | rm -f conftest.er1 | |
6162 | cat conftest.err >&5 | |
ba479fd2 NN |
6163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6164 | (exit $ac_status); } && | |
d2640b91 | 6165 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6167 | (eval $ac_try) 2>&5 | |
6168 | ac_status=$? | |
6169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6170 | (exit $ac_status); }; } && | |
6171 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6173 | (eval $ac_try) 2>&5 | |
6174 | ac_status=$? | |
6175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6176 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
6177 | ac_cv_c_bigendian=yes |
6178 | else | |
ba479fd2 NN |
6179 | echo "$as_me: failed program was:" >&5 |
6180 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6181 | ||
6182 | ac_cv_c_bigendian=no | |
4977bab6 | 6183 | fi |
86da66b5 | 6184 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 6185 | else |
ba479fd2 NN |
6186 | echo "$as_me: failed program was:" >&5 |
6187 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6188 | ||
4977bab6 | 6189 | fi |
86da66b5 | 6190 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 ZW |
6191 | if test $ac_cv_c_bigendian = unknown; then |
6192 | if test "$cross_compiling" = yes; then | |
ba479fd2 NN |
6193 | echo $ac_n "cross-compiling... " 2>&6 |
6194 | else | |
6195 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6196 | /* confdefs.h. */ |
6197 | _ACEOF | |
6198 | cat confdefs.h >>conftest.$ac_ext | |
6199 | cat >>conftest.$ac_ext <<_ACEOF | |
6200 | /* end confdefs.h. */ | |
4977bab6 ZW |
6201 | main () { |
6202 | /* Are we little or big endian? From Harbison&Steele. */ | |
6203 | union | |
6204 | { | |
6205 | long l; | |
6206 | char c[sizeof (long)]; | |
6207 | } u; | |
6208 | u.l = 1; | |
6209 | exit (u.c[sizeof (long) - 1] == 1); | |
6210 | } | |
ba479fd2 NN |
6211 | _ACEOF |
6212 | rm -f conftest$ac_exeext | |
6213 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6214 | (eval $ac_link) 2>&5 | |
6215 | ac_status=$? | |
6216 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6217 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6219 | (eval $ac_try) 2>&5 | |
6220 | ac_status=$? | |
6221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6222 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
6223 | ac_cv_c_bigendian=no |
6224 | else | |
ba479fd2 NN |
6225 | echo "$as_me: program exited with status $ac_status" >&5 |
6226 | echo "$as_me: failed program was:" >&5 | |
6227 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6228 | ||
6229 | ( exit $ac_status ) | |
6230 | ac_cv_c_bigendian=yes | |
4977bab6 | 6231 | fi |
86da66b5 | 6232 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 6233 | fi |
4977bab6 ZW |
6234 | fi |
6235 | fi | |
ba479fd2 NN |
6236 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
6237 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
4977bab6 | 6238 | if test $ac_cv_c_bigendian = unknown; then |
ba479fd2 NN |
6239 | echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 |
6240 | echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 | |
2d6eb5bf | 6241 | |
4977bab6 ZW |
6242 | cat >conftest.c <<EOF |
6243 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
6244 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
6245 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
6246 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
6247 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
6248 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
6249 | int main() { _ascii (); _ebcdic (); return 0; } | |
6250 | EOF | |
6251 | if test -f conftest.c ; then | |
3beb1315 | 6252 | if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then |
4977bab6 ZW |
6253 | if test `grep -l BIGenDianSyS conftest.o` ; then |
6254 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
6255 | ac_cv_c_bigendian=yes | |
6256 | fi | |
6257 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
6258 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
6259 | if test $ac_cv_c_bigendian = yes ; then | |
6260 | ac_cv_c_bigendian=unknown; | |
6261 | else | |
6262 | ac_cv_c_bigendian=no | |
6263 | fi | |
6264 | fi | |
6265 | echo $ac_n 'guessing bigendian ... ' >&6 | |
6266 | fi | |
6267 | fi | |
ba479fd2 NN |
6268 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
6269 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
84c041a1 | 6270 | fi |
4977bab6 | 6271 | if test $ac_cv_c_bigendian = yes; then |
ba479fd2 NN |
6272 | |
6273 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 6274 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 6275 | _ACEOF |
cafe096b | 6276 | |
ba479fd2 NN |
6277 | |
6278 | cat >>confdefs.h <<\_ACEOF | |
84c041a1 | 6279 | #define HOST_WORDS_BIG_ENDIAN 1 |
ba479fd2 | 6280 | _ACEOF |
84c041a1 | 6281 | |
4977bab6 ZW |
6282 | BYTEORDER=4321 |
6283 | else | |
6284 | BYTEORDER=1234 | |
6285 | fi | |
ba479fd2 NN |
6286 | |
6287 | cat >>confdefs.h <<_ACEOF | |
4977bab6 | 6288 | #define BYTEORDER $BYTEORDER |
ba479fd2 | 6289 | _ACEOF |
4977bab6 ZW |
6290 | |
6291 | if test $ac_cv_c_bigendian = unknown; then | |
3beb1315 HPN |
6292 | { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5 |
6293 | echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;} | |
6294 | { (exit 1); exit 1; }; } | |
84c041a1 ZW |
6295 | fi |
6296 | ||
75e93faa | 6297 | |
73458fb7 NN |
6298 | # -------- |
6299 | # UNSORTED | |
6300 | # -------- | |
1e608388 | 6301 | |
73458fb7 NN |
6302 | # Stage specific cflags for build. |
6303 | stage1_cflags= | |
6304 | case $build in | |
6305 | vax-*-*) | |
6306 | if test x$GCC = xyes | |
6307 | then | |
6308 | stage1_cflags="-Wa,-J" | |
6309 | else | |
6310 | stage1_cflags="-J" | |
6311 | fi | |
6312 | ;; | |
6313 | powerpc-*-darwin*) | |
6314 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
6315 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
6316 | # Apple's GCC has bugs in designated initializer handling, so disable | |
6317 | # that too. | |
6318 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
6319 | ;; | |
6320 | esac | |
1e608388 | 6321 | |
1e608388 | 6322 | |
4e70264f ZW |
6323 | # These libraries may be used by collect2. |
6324 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
6325 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
6326 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
6327 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
6328 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
6329 | else |
6330 | save_LIBS="$LIBS" | |
7f2749d4 | 6331 | for libs in '' -lld -lmld \ |
4e70264f ZW |
6332 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
6333 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
6334 | do | |
6335 | LIBS="$libs" | |
ba479fd2 | 6336 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6337 | /* confdefs.h. */ |
6338 | _ACEOF | |
6339 | cat confdefs.h >>conftest.$ac_ext | |
6340 | cat >>conftest.$ac_ext <<_ACEOF | |
6341 | /* end confdefs.h. */ | |
6342 | ||
4e70264f | 6343 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6344 | #ifdef __cplusplus |
6345 | extern "C" | |
6346 | #endif | |
4e70264f | 6347 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6348 | builtin and then its argument prototype would still apply. */ |
6349 | char ldopen (); | |
6350 | int | |
6351 | main () | |
6352 | { | |
6353 | ldopen (); | |
6354 | ; | |
6355 | return 0; | |
6356 | } | |
6357 | _ACEOF | |
6358 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6359 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6360 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6361 | ac_status=$? |
86da66b5 HPN |
6362 | grep -v '^ *+' conftest.er1 >conftest.err |
6363 | rm -f conftest.er1 | |
6364 | cat conftest.err >&5 | |
ba479fd2 NN |
6365 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6366 | (exit $ac_status); } && | |
d2640b91 | 6367 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6368 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6369 | (eval $ac_try) 2>&5 | |
6370 | ac_status=$? | |
6371 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6372 | (exit $ac_status); }; } && | |
6373 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6374 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6375 | (eval $ac_try) 2>&5 | |
6376 | ac_status=$? | |
6377 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6378 | (exit $ac_status); }; }; then | |
4e70264f ZW |
6379 | gcc_cv_collect2_libs="$libs"; break |
6380 | else | |
ba479fd2 NN |
6381 | echo "$as_me: failed program was:" >&5 |
6382 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6383 | ||
4e70264f | 6384 | fi |
86da66b5 HPN |
6385 | rm -f conftest.err conftest.$ac_objext \ |
6386 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
6387 | done |
6388 | LIBS="$save_LIBS" | |
6389 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
6390 | fi | |
ba479fd2 NN |
6391 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
6392 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
6393 | case $gcc_cv_collect2_libs in |
6394 | "none required") ;; | |
6395 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
6396 | esac | |
6397 | ||
6398 | ||
7f2749d4 RK |
6399 | # When building Ada code on Alpha, we need exc_resume which is usually in |
6400 | # -lexc. So test for it. | |
6401 | save_LIBS="$LIBS" | |
6402 | LIBS= | |
ba479fd2 NN |
6403 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
6404 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
6405 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
6406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6407 | else | |
6408 | ac_func_search_save_LIBS=$LIBS | |
6409 | ac_cv_search_exc_resume=no | |
6410 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6411 | /* confdefs.h. */ |
6412 | _ACEOF | |
6413 | cat confdefs.h >>conftest.$ac_ext | |
6414 | cat >>conftest.$ac_ext <<_ACEOF | |
6415 | /* end confdefs.h. */ | |
7f2749d4 | 6416 | |
7f2749d4 | 6417 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6418 | #ifdef __cplusplus |
6419 | extern "C" | |
6420 | #endif | |
7f2749d4 | 6421 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6422 | builtin and then its argument prototype would still apply. */ |
6423 | char exc_resume (); | |
6424 | int | |
6425 | main () | |
6426 | { | |
6427 | exc_resume (); | |
6428 | ; | |
6429 | return 0; | |
6430 | } | |
6431 | _ACEOF | |
6432 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6433 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6434 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6435 | ac_status=$? |
86da66b5 HPN |
6436 | grep -v '^ *+' conftest.er1 >conftest.err |
6437 | rm -f conftest.er1 | |
6438 | cat conftest.err >&5 | |
ba479fd2 NN |
6439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6440 | (exit $ac_status); } && | |
d2640b91 | 6441 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6443 | (eval $ac_try) 2>&5 | |
6444 | ac_status=$? | |
6445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6446 | (exit $ac_status); }; } && | |
6447 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6449 | (eval $ac_try) 2>&5 | |
6450 | ac_status=$? | |
6451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6452 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
6453 | ac_cv_search_exc_resume="none required" |
6454 | else | |
ba479fd2 NN |
6455 | echo "$as_me: failed program was:" >&5 |
6456 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6457 | ||
7f2749d4 | 6458 | fi |
86da66b5 HPN |
6459 | rm -f conftest.err conftest.$ac_objext \ |
6460 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6461 | if test "$ac_cv_search_exc_resume" = no; then |
6462 | for ac_lib in exc; do | |
6463 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6464 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6465 | /* confdefs.h. */ |
6466 | _ACEOF | |
6467 | cat confdefs.h >>conftest.$ac_ext | |
6468 | cat >>conftest.$ac_ext <<_ACEOF | |
6469 | /* end confdefs.h. */ | |
6470 | ||
7f2749d4 | 6471 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6472 | #ifdef __cplusplus |
6473 | extern "C" | |
6474 | #endif | |
7f2749d4 | 6475 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6476 | builtin and then its argument prototype would still apply. */ |
6477 | char exc_resume (); | |
6478 | int | |
6479 | main () | |
6480 | { | |
6481 | exc_resume (); | |
6482 | ; | |
6483 | return 0; | |
6484 | } | |
6485 | _ACEOF | |
6486 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6487 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6488 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6489 | ac_status=$? |
86da66b5 HPN |
6490 | grep -v '^ *+' conftest.er1 >conftest.err |
6491 | rm -f conftest.er1 | |
6492 | cat conftest.err >&5 | |
ba479fd2 NN |
6493 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6494 | (exit $ac_status); } && | |
d2640b91 | 6495 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6497 | (eval $ac_try) 2>&5 | |
6498 | ac_status=$? | |
6499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6500 | (exit $ac_status); }; } && | |
6501 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6503 | (eval $ac_try) 2>&5 | |
6504 | ac_status=$? | |
6505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6506 | (exit $ac_status); }; }; then | |
6507 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
6508 | break |
6509 | else | |
ba479fd2 NN |
6510 | echo "$as_me: failed program was:" >&5 |
6511 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6512 | ||
cafe096b | 6513 | fi |
86da66b5 HPN |
6514 | rm -f conftest.err conftest.$ac_objext \ |
6515 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 6516 | done |
6e3f3080 | 6517 | fi |
ba479fd2 NN |
6518 | LIBS=$ac_func_search_save_LIBS |
6519 | fi | |
6520 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
6521 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
6522 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 6523 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 6524 | |
7f2749d4 | 6525 | fi |
ba479fd2 | 6526 | |
7f2749d4 RK |
6527 | GNAT_LIBEXC="$LIBS" |
6528 | LIBS="$save_LIBS" | |
6529 | ||
6530 | ||
62c9aa5f ZW |
6531 | # Some systems put ldexp and frexp in libm instead of libc; assume |
6532 | # they're both in the same place. jcf-dump needs them. | |
6533 | save_LIBS="$LIBS" | |
6534 | LIBS= | |
ba479fd2 NN |
6535 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
6536 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
6537 | if test "${ac_cv_search_ldexp+set}" = set; then | |
6538 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6539 | else | |
6540 | ac_func_search_save_LIBS=$LIBS | |
6541 | ac_cv_search_ldexp=no | |
6542 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6543 | /* confdefs.h. */ |
6544 | _ACEOF | |
6545 | cat confdefs.h >>conftest.$ac_ext | |
6546 | cat >>conftest.$ac_ext <<_ACEOF | |
6547 | /* end confdefs.h. */ | |
62c9aa5f | 6548 | |
62c9aa5f | 6549 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6550 | #ifdef __cplusplus |
6551 | extern "C" | |
6552 | #endif | |
62c9aa5f | 6553 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6554 | builtin and then its argument prototype would still apply. */ |
6555 | char ldexp (); | |
6556 | int | |
6557 | main () | |
6558 | { | |
6559 | ldexp (); | |
6560 | ; | |
6561 | return 0; | |
6562 | } | |
6563 | _ACEOF | |
6564 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6565 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6566 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6567 | ac_status=$? |
86da66b5 HPN |
6568 | grep -v '^ *+' conftest.er1 >conftest.err |
6569 | rm -f conftest.er1 | |
6570 | cat conftest.err >&5 | |
ba479fd2 NN |
6571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6572 | (exit $ac_status); } && | |
d2640b91 | 6573 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6574 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6575 | (eval $ac_try) 2>&5 | |
6576 | ac_status=$? | |
6577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6578 | (exit $ac_status); }; } && | |
6579 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6580 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6581 | (eval $ac_try) 2>&5 | |
6582 | ac_status=$? | |
6583 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6584 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
6585 | ac_cv_search_ldexp="none required" |
6586 | else | |
ba479fd2 NN |
6587 | echo "$as_me: failed program was:" >&5 |
6588 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6589 | ||
62c9aa5f | 6590 | fi |
86da66b5 HPN |
6591 | rm -f conftest.err conftest.$ac_objext \ |
6592 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6593 | if test "$ac_cv_search_ldexp" = no; then |
6594 | for ac_lib in m; do | |
6595 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6596 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6597 | /* confdefs.h. */ |
6598 | _ACEOF | |
6599 | cat confdefs.h >>conftest.$ac_ext | |
6600 | cat >>conftest.$ac_ext <<_ACEOF | |
6601 | /* end confdefs.h. */ | |
6602 | ||
62c9aa5f | 6603 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6604 | #ifdef __cplusplus |
6605 | extern "C" | |
6606 | #endif | |
62c9aa5f | 6607 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6608 | builtin and then its argument prototype would still apply. */ |
6609 | char ldexp (); | |
6610 | int | |
6611 | main () | |
6612 | { | |
6613 | ldexp (); | |
6614 | ; | |
6615 | return 0; | |
6616 | } | |
6617 | _ACEOF | |
6618 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6619 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6620 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6621 | ac_status=$? |
86da66b5 HPN |
6622 | grep -v '^ *+' conftest.er1 >conftest.err |
6623 | rm -f conftest.er1 | |
6624 | cat conftest.err >&5 | |
ba479fd2 NN |
6625 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6626 | (exit $ac_status); } && | |
d2640b91 | 6627 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6629 | (eval $ac_try) 2>&5 | |
6630 | ac_status=$? | |
6631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6632 | (exit $ac_status); }; } && | |
6633 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6634 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6635 | (eval $ac_try) 2>&5 | |
6636 | ac_status=$? | |
6637 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6638 | (exit $ac_status); }; }; then | |
6639 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
6640 | break |
6641 | else | |
ba479fd2 NN |
6642 | echo "$as_me: failed program was:" >&5 |
6643 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6644 | ||
cafe096b | 6645 | fi |
86da66b5 HPN |
6646 | rm -f conftest.err conftest.$ac_objext \ |
6647 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 6648 | done |
6e3f3080 | 6649 | fi |
ba479fd2 NN |
6650 | LIBS=$ac_func_search_save_LIBS |
6651 | fi | |
6652 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
6653 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
6654 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 6655 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 6656 | |
62c9aa5f | 6657 | fi |
ba479fd2 | 6658 | |
62c9aa5f ZW |
6659 | LDEXP_LIB="$LIBS" |
6660 | LIBS="$save_LIBS" | |
6661 | ||
6662 | ||
956d6950 JL |
6663 | # Use <inttypes.h> only if it exists, |
6664 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
6665 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
6666 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
6667 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
6668 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6669 | else | |
6670 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6671 | /* confdefs.h. */ |
6672 | _ACEOF | |
6673 | cat confdefs.h >>conftest.$ac_ext | |
6674 | cat >>conftest.$ac_ext <<_ACEOF | |
6675 | /* end confdefs.h. */ | |
956d6950 JL |
6676 | #include <sys/types.h> |
6677 | #include <inttypes.h> | |
ba479fd2 NN |
6678 | int |
6679 | main () | |
6680 | { | |
956d6950 | 6681 | intmax_t i = -1; |
ba479fd2 NN |
6682 | ; |
6683 | return 0; | |
6684 | } | |
6685 | _ACEOF | |
6686 | rm -f conftest.$ac_objext | |
6687 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6688 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6689 | ac_status=$? |
86da66b5 HPN |
6690 | grep -v '^ *+' conftest.er1 >conftest.err |
6691 | rm -f conftest.er1 | |
6692 | cat conftest.err >&5 | |
ba479fd2 NN |
6693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6694 | (exit $ac_status); } && | |
d2640b91 | 6695 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6696 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6697 | (eval $ac_try) 2>&5 | |
6698 | ac_status=$? | |
6699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6700 | (exit $ac_status); }; } && | |
6701 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6703 | (eval $ac_try) 2>&5 | |
6704 | ac_status=$? | |
6705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6706 | (exit $ac_status); }; }; then | |
0056a9b5 | 6707 | gcc_cv_header_inttypes_h=yes |
956d6950 | 6708 | else |
ba479fd2 NN |
6709 | echo "$as_me: failed program was:" >&5 |
6710 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6711 | ||
6712 | gcc_cv_header_inttypes_h=no | |
956d6950 | 6713 | fi |
86da66b5 | 6714 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
6715 | fi |
6716 | ||
ba479fd2 NN |
6717 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
6718 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 6719 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
6720 | |
6721 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 6722 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 6723 | _ACEOF |
0056a9b5 KG |
6724 | |
6725 | fi | |
956d6950 | 6726 | |
c149cc37 | 6727 | |
ba479fd2 NN |
6728 | |
6729 | ||
6730 | ||
6731 | ||
6732 | ||
6733 | ||
6734 | ||
6735 | ||
6736 | ||
6737 | ||
6738 | ||
6739 | ||
6740 | ||
6741 | ||
6742 | ||
6743 | ||
6744 | ||
6745 | ||
6746 | ||
6747 | ||
6748 | ||
6749 | ||
6750 | ||
6751 | ||
6752 | ||
6af8c740 KG |
6753 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
6754 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 6755 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
6756 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
6757 | setlocale | |
956d6950 | 6758 | do |
ba479fd2 NN |
6759 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6760 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6761 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6762 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6763 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6764 | else | |
6765 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6766 | /* confdefs.h. */ |
6767 | _ACEOF | |
6768 | cat confdefs.h >>conftest.$ac_ext | |
6769 | cat >>conftest.$ac_ext <<_ACEOF | |
6770 | /* end confdefs.h. */ | |
86da66b5 HPN |
6771 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
6772 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
6773 | #define $ac_func innocuous_$ac_func | |
6774 | ||
956d6950 | 6775 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
6776 | which can conflict with char $ac_func (); below. |
6777 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6778 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 6779 | |
ba479fd2 NN |
6780 | #ifdef __STDC__ |
6781 | # include <limits.h> | |
6782 | #else | |
6783 | # include <assert.h> | |
6784 | #endif | |
86da66b5 HPN |
6785 | |
6786 | #undef $ac_func | |
6787 | ||
6e3f3080 | 6788 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6789 | #ifdef __cplusplus |
6790 | extern "C" | |
6791 | { | |
6792 | #endif | |
6e3f3080 | 6793 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6794 | builtin and then its argument prototype would still apply. */ |
6795 | char $ac_func (); | |
956d6950 JL |
6796 | /* The GNU C library defines this for functions which it implements |
6797 | to always fail with ENOSYS. Some functions are actually named | |
6798 | something starting with __ and the normal name is an alias. */ | |
6799 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6800 | choke me | |
6801 | #else | |
ba479fd2 NN |
6802 | char (*f) () = $ac_func; |
6803 | #endif | |
6804 | #ifdef __cplusplus | |
6805 | } | |
956d6950 JL |
6806 | #endif |
6807 | ||
ba479fd2 NN |
6808 | int |
6809 | main () | |
6810 | { | |
6811 | return f != $ac_func; | |
6812 | ; | |
6813 | return 0; | |
6814 | } | |
6815 | _ACEOF | |
6816 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6817 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6818 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6819 | ac_status=$? |
86da66b5 HPN |
6820 | grep -v '^ *+' conftest.er1 >conftest.err |
6821 | rm -f conftest.er1 | |
6822 | cat conftest.err >&5 | |
ba479fd2 NN |
6823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6824 | (exit $ac_status); } && | |
d2640b91 | 6825 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6826 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6827 | (eval $ac_try) 2>&5 | |
6828 | ac_status=$? | |
6829 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6830 | (exit $ac_status); }; } && | |
6831 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6832 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6833 | (eval $ac_try) 2>&5 | |
6834 | ac_status=$? | |
6835 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6836 | (exit $ac_status); }; }; then | |
6837 | eval "$as_ac_var=yes" | |
6838 | else | |
6839 | echo "$as_me: failed program was:" >&5 | |
6840 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6841 | ||
6842 | eval "$as_ac_var=no" | |
6843 | fi | |
86da66b5 HPN |
6844 | rm -f conftest.err conftest.$ac_objext \ |
6845 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6846 | fi |
6847 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6848 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6849 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6850 | cat >>confdefs.h <<_ACEOF | |
6851 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6852 | _ACEOF | |
956d6950 | 6853 | |
956d6950 JL |
6854 | fi |
6855 | done | |
6856 | ||
6885fc87 | 6857 | |
39f6c4c8 | 6858 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
6859 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
6860 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
6861 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
6862 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
6863 | else |
6864 | if test "$cross_compiling" = yes; then | |
6865 | gcc_cv_func_mbstowcs_works=yes | |
6866 | else | |
ba479fd2 | 6867 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6868 | /* confdefs.h. */ |
6869 | _ACEOF | |
6870 | cat confdefs.h >>conftest.$ac_ext | |
6871 | cat >>conftest.$ac_ext <<_ACEOF | |
6872 | /* end confdefs.h. */ | |
39f6c4c8 KW |
6873 | #include <stdlib.h> |
6874 | int main() | |
6875 | { | |
6876 | mbstowcs(0, "", 0); | |
6877 | return 0; | |
6878 | } | |
ba479fd2 NN |
6879 | _ACEOF |
6880 | rm -f conftest$ac_exeext | |
6881 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6882 | (eval $ac_link) 2>&5 | |
6883 | ac_status=$? | |
6884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6885 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6887 | (eval $ac_try) 2>&5 | |
6888 | ac_status=$? | |
6889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6890 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
6891 | gcc_cv_func_mbstowcs_works=yes |
6892 | else | |
ba479fd2 NN |
6893 | echo "$as_me: program exited with status $ac_status" >&5 |
6894 | echo "$as_me: failed program was:" >&5 | |
6895 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6896 | ||
6897 | ( exit $ac_status ) | |
6898 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 6899 | fi |
86da66b5 | 6900 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 6901 | fi |
39f6c4c8 | 6902 | fi |
ba479fd2 NN |
6903 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
6904 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 6905 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
6906 | |
6907 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 6908 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 6909 | _ACEOF |
39f6c4c8 KW |
6910 | |
6911 | fi | |
6912 | fi | |
6913 | ||
ba479fd2 NN |
6914 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
6915 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
6916 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
6917 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 6918 | else |
ba479fd2 | 6919 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6920 | /* confdefs.h. */ |
6921 | _ACEOF | |
6922 | cat confdefs.h >>conftest.$ac_ext | |
6923 | cat >>conftest.$ac_ext <<_ACEOF | |
6924 | /* end confdefs.h. */ | |
8b4fc07a NN |
6925 | $ac_includes_default |
6926 | int | |
6927 | main () | |
6928 | { | |
6929 | if ((ssize_t *) 0) | |
6930 | return 0; | |
6931 | if (sizeof (ssize_t)) | |
6932 | return 0; | |
6933 | ; | |
6934 | return 0; | |
6935 | } | |
ba479fd2 | 6936 | _ACEOF |
8b4fc07a NN |
6937 | rm -f conftest.$ac_objext |
6938 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6939 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 6940 | ac_status=$? |
86da66b5 HPN |
6941 | grep -v '^ *+' conftest.er1 >conftest.err |
6942 | rm -f conftest.er1 | |
6943 | cat conftest.err >&5 | |
8b4fc07a NN |
6944 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6945 | (exit $ac_status); } && | |
d2640b91 | 6946 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6947 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6948 | (eval $ac_try) 2>&5 | |
6949 | ac_status=$? | |
6950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6951 | (exit $ac_status); }; } && | |
6952 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
6953 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6954 | (eval $ac_try) 2>&5 | |
6955 | ac_status=$? | |
6956 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6957 | (exit $ac_status); }; }; then | |
cb65112a | 6958 | ac_cv_type_ssize_t=yes |
f12bc141 | 6959 | else |
8b4fc07a NN |
6960 | echo "$as_me: failed program was:" >&5 |
6961 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 6962 | |
8b4fc07a NN |
6963 | ac_cv_type_ssize_t=no |
6964 | fi | |
86da66b5 | 6965 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 6966 | fi |
ba479fd2 NN |
6967 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
6968 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
6969 | if test $ac_cv_type_ssize_t = yes; then |
6970 | : | |
6971 | else | |
ba479fd2 | 6972 | |
8b4fc07a | 6973 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 6974 | #define ssize_t int |
ba479fd2 | 6975 | _ACEOF |
f12bc141 ZW |
6976 | |
6977 | fi | |
6978 | ||
0b9d02c6 | 6979 | |
e256b8b6 DA |
6980 | # Try to determine the array type of the second argument of getgroups |
6981 | # for the target system (int or gid_t). | |
ba479fd2 NN |
6982 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
6983 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
6984 | if test "${ac_cv_type_uid_t+set}" = set; then | |
6985 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6986 | else | |
6987 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6988 | /* confdefs.h. */ |
6989 | _ACEOF | |
6990 | cat confdefs.h >>conftest.$ac_ext | |
6991 | cat >>conftest.$ac_ext <<_ACEOF | |
6992 | /* end confdefs.h. */ | |
e256b8b6 | 6993 | #include <sys/types.h> |
ba479fd2 NN |
6994 | |
6995 | _ACEOF | |
e256b8b6 | 6996 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 6997 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
6998 | ac_cv_type_uid_t=yes |
6999 | else | |
e256b8b6 DA |
7000 | ac_cv_type_uid_t=no |
7001 | fi | |
7002 | rm -f conftest* | |
7003 | ||
7004 | fi | |
ba479fd2 NN |
7005 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
7006 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 7007 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
7008 | |
7009 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 7010 | #define uid_t int |
ba479fd2 | 7011 | _ACEOF |
cafe096b | 7012 | |
ba479fd2 NN |
7013 | |
7014 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 7015 | #define gid_t int |
ba479fd2 | 7016 | _ACEOF |
e256b8b6 DA |
7017 | |
7018 | fi | |
7019 | ||
ba479fd2 NN |
7020 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
7021 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
7022 | if test "${ac_cv_type_getgroups+set}" = set; then | |
7023 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
7024 | else |
7025 | if test "$cross_compiling" = yes; then | |
7026 | ac_cv_type_getgroups=cross | |
7027 | else | |
ba479fd2 | 7028 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7029 | /* confdefs.h. */ |
7030 | _ACEOF | |
7031 | cat confdefs.h >>conftest.$ac_ext | |
7032 | cat >>conftest.$ac_ext <<_ACEOF | |
7033 | /* end confdefs.h. */ | |
e256b8b6 DA |
7034 | /* Thanks to Mike Rendell for this test. */ |
7035 | #include <sys/types.h> | |
7036 | #define NGID 256 | |
7037 | #undef MAX | |
7038 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
7039 | |
7040 | int | |
7041 | main () | |
e256b8b6 DA |
7042 | { |
7043 | gid_t gidset[NGID]; | |
7044 | int i, n; | |
7045 | union { gid_t gval; long lval; } val; | |
7046 | ||
7047 | val.lval = -1; | |
7048 | for (i = 0; i < NGID; i++) | |
7049 | gidset[i] = val.gval; | |
7050 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 7051 | gidset); |
e256b8b6 DA |
7052 | /* Exit non-zero if getgroups seems to require an array of ints. This |
7053 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
7054 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 7055 | } |
ba479fd2 NN |
7056 | _ACEOF |
7057 | rm -f conftest$ac_exeext | |
7058 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7059 | (eval $ac_link) 2>&5 | |
7060 | ac_status=$? | |
7061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7062 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7063 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7064 | (eval $ac_try) 2>&5 | |
7065 | ac_status=$? | |
7066 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7067 | (exit $ac_status); }; }; then | |
7068 | ac_cv_type_getgroups=gid_t | |
63cf211a | 7069 | else |
ba479fd2 NN |
7070 | echo "$as_me: program exited with status $ac_status" >&5 |
7071 | echo "$as_me: failed program was:" >&5 | |
7072 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7073 | ||
7074 | ( exit $ac_status ) | |
7075 | ac_cv_type_getgroups=int | |
e256b8b6 | 7076 | fi |
86da66b5 | 7077 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 7078 | fi |
e256b8b6 | 7079 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 7080 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7081 | /* confdefs.h. */ |
7082 | _ACEOF | |
7083 | cat confdefs.h >>conftest.$ac_ext | |
7084 | cat >>conftest.$ac_ext <<_ACEOF | |
7085 | /* end confdefs.h. */ | |
e256b8b6 | 7086 | #include <unistd.h> |
ba479fd2 NN |
7087 | |
7088 | _ACEOF | |
e256b8b6 | 7089 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7090 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
7091 | ac_cv_type_getgroups=gid_t |
7092 | else | |
e256b8b6 DA |
7093 | ac_cv_type_getgroups=int |
7094 | fi | |
7095 | rm -f conftest* | |
7096 | ||
7097 | fi | |
7098 | fi | |
ba479fd2 NN |
7099 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
7100 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 7101 | |
ba479fd2 | 7102 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 7103 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 7104 | _ACEOF |
e256b8b6 DA |
7105 | |
7106 | ||
7107 | if test "${target}" = "${build}"; then | |
7108 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
7109 | else | |
7110 | case "${target}" in | |
7111 | # This condition may need some tweaking. It should include all | |
7112 | # targets where the array type of the second argument of getgroups | |
7113 | # is int and the type of gid_t is not equivalent to int. | |
7114 | *-*-sunos* | *-*-ultrix*) | |
7115 | TARGET_GETGROUPS_T=int | |
7116 | ;; | |
7117 | *) | |
7118 | TARGET_GETGROUPS_T=gid_t | |
7119 | ;; | |
7120 | esac | |
7121 | fi | |
7122 | ||
7123 | ||
ba479fd2 NN |
7124 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
7125 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
7126 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
7127 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7128 | else |
7129 | if test "$cross_compiling" = yes; then | |
7130 | gcc_cv_func_printf_ptr=no | |
7131 | else | |
ba479fd2 | 7132 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7133 | /* confdefs.h. */ |
7134 | _ACEOF | |
7135 | cat confdefs.h >>conftest.$ac_ext | |
7136 | cat >>conftest.$ac_ext <<_ACEOF | |
7137 | /* end confdefs.h. */ | |
0a4b6309 RL |
7138 | #include <stdio.h> |
7139 | ||
86cf1cbd | 7140 | int main() |
0a4b6309 RL |
7141 | { |
7142 | char buf[64]; | |
7143 | char *p = buf, *q = NULL; | |
7144 | sprintf(buf, "%p", p); | |
7145 | sscanf(buf, "%p", &q); | |
86cf1cbd | 7146 | return (p != q); |
0a4b6309 | 7147 | } |
ba479fd2 NN |
7148 | _ACEOF |
7149 | rm -f conftest$ac_exeext | |
7150 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7151 | (eval $ac_link) 2>&5 | |
7152 | ac_status=$? | |
7153 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7154 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7155 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7156 | (eval $ac_try) 2>&5 | |
7157 | ac_status=$? | |
7158 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7159 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
7160 | gcc_cv_func_printf_ptr=yes |
7161 | else | |
ba479fd2 NN |
7162 | echo "$as_me: program exited with status $ac_status" >&5 |
7163 | echo "$as_me: failed program was:" >&5 | |
7164 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7165 | ||
7166 | ( exit $ac_status ) | |
7167 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 7168 | fi |
86da66b5 | 7169 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 7170 | fi |
0a4b6309 RL |
7171 | rm -f core core.* *.core |
7172 | fi | |
ba479fd2 NN |
7173 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
7174 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 7175 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
7176 | |
7177 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 7178 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 7179 | _ACEOF |
0a4b6309 RL |
7180 | |
7181 | fi | |
7182 | ||
1072ec3f ZW |
7183 | if test $ac_cv_header_sys_mman_h != yes \ |
7184 | || test $ac_cv_func_mmap != yes; then | |
7185 | gcc_cv_func_mmap_file=no | |
7186 | gcc_cv_func_mmap_dev_zero=no | |
7187 | gcc_cv_func_mmap_anon=no | |
7188 | else | |
ba479fd2 NN |
7189 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
7190 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
7191 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
7192 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 7193 | else |
ba479fd2 | 7194 | # Add a system to this blacklist if |
1072ec3f ZW |
7195 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
7196 | # memory area containing the same data that you'd get if you applied | |
7197 | # read() to the same fd. The only system known to have a problem here | |
7198 | # is VMS, where text files have record structure. | |
7199 | case "$host_os" in | |
ba479fd2 | 7200 | vms* | ultrix*) |
1072ec3f ZW |
7201 | gcc_cv_func_mmap_file=no ;; |
7202 | *) | |
7203 | gcc_cv_func_mmap_file=yes;; | |
7204 | esac | |
7205 | fi | |
ba479fd2 NN |
7206 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
7207 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
7208 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
7209 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
7210 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
7211 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
7212 | else |
7213 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
7214 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
7215 | # zeroed pages with both the following properties: | |
7216 | # 1. If you map N consecutive pages in with one call, and then | |
7217 | # unmap any subset of those pages, the pages that were not | |
7218 | # explicitly unmapped remain accessible. | |
7219 | # 2. If you map two adjacent blocks of memory and then unmap them | |
7220 | # both at once, they must both go away. | |
7221 | # Systems known to be in this category are Windows (all variants), | |
7222 | # VMS, and Darwin. | |
7223 | case "$host_os" in | |
2ce240d3 | 7224 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
7225 | gcc_cv_func_mmap_dev_zero=no ;; |
7226 | *) | |
7227 | gcc_cv_func_mmap_dev_zero=yes;; | |
7228 | esac | |
7229 | fi | |
ba479fd2 NN |
7230 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
7231 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
7232 | |
7233 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
7234 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
7235 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
7236 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
7237 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7238 | else | |
7239 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7240 | /* confdefs.h. */ |
7241 | _ACEOF | |
7242 | cat confdefs.h >>conftest.$ac_ext | |
7243 | cat >>conftest.$ac_ext <<_ACEOF | |
7244 | /* end confdefs.h. */ | |
1072ec3f ZW |
7245 | #include <sys/types.h> |
7246 | #include <sys/mman.h> | |
7247 | #include <unistd.h> | |
7248 | ||
7249 | #ifndef MAP_ANONYMOUS | |
7250 | #define MAP_ANONYMOUS MAP_ANON | |
7251 | #endif | |
7252 | ||
ba479fd2 NN |
7253 | int |
7254 | main () | |
7255 | { | |
1072ec3f | 7256 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
7257 | ; |
7258 | return 0; | |
7259 | } | |
7260 | _ACEOF | |
7261 | rm -f conftest.$ac_objext | |
7262 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7263 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7264 | ac_status=$? |
86da66b5 HPN |
7265 | grep -v '^ *+' conftest.er1 >conftest.err |
7266 | rm -f conftest.er1 | |
7267 | cat conftest.err >&5 | |
ba479fd2 NN |
7268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7269 | (exit $ac_status); } && | |
d2640b91 | 7270 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7271 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7272 | (eval $ac_try) 2>&5 | |
7273 | ac_status=$? | |
7274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7275 | (exit $ac_status); }; } && | |
7276 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7278 | (eval $ac_try) 2>&5 | |
7279 | ac_status=$? | |
7280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7281 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
7282 | gcc_cv_decl_map_anon=yes |
7283 | else | |
ba479fd2 NN |
7284 | echo "$as_me: failed program was:" >&5 |
7285 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7286 | ||
7287 | gcc_cv_decl_map_anon=no | |
1072ec3f | 7288 | fi |
86da66b5 | 7289 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 7290 | fi |
ba479fd2 NN |
7291 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
7292 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
7293 | |
7294 | if test $gcc_cv_decl_map_anon = no; then | |
7295 | gcc_cv_func_mmap_anon=no | |
7296 | else | |
ba479fd2 NN |
7297 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
7298 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
7299 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
7300 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
7301 | else |
7302 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
7303 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
7304 | # doesn't give anonymous zeroed pages with the same properties listed | |
7305 | # above for use of /dev/zero. | |
7306 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
7307 | case "$host_os" in | |
7308 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
7309 | gcc_cv_func_mmap_anon=no ;; | |
7310 | *) | |
7311 | gcc_cv_func_mmap_anon=yes;; | |
7312 | esac | |
7313 | fi | |
ba479fd2 NN |
7314 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
7315 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
7316 | fi |
7317 | fi | |
7318 | ||
7319 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
7320 | |
7321 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7322 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 7323 | _ACEOF |
1072ec3f ZW |
7324 | |
7325 | fi | |
7326 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
7327 | |
7328 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7329 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 7330 | _ACEOF |
1072ec3f ZW |
7331 | |
7332 | fi | |
7333 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
7334 | |
7335 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7336 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 7337 | _ACEOF |
1072ec3f ZW |
7338 | |
7339 | fi | |
7340 | ||
b27d2bd5 MK |
7341 | |
7342 | case "${host}" in | |
ee262b6f | 7343 | *-*-*vms*) |
ba479fd2 | 7344 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
7345 | # won't work, and it isn't easily adaptable. It makes more sense to |
7346 | # just force it. | |
7347 | ac_cv_func_vfork_works=yes | |
7348 | ;; | |
b27d2bd5 | 7349 | esac |
ba479fd2 NN |
7350 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
7351 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
7352 | if test "${ac_cv_type_pid_t+set}" = set; then | |
7353 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7354 | else | |
7355 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7356 | /* confdefs.h. */ |
7357 | _ACEOF | |
7358 | cat confdefs.h >>conftest.$ac_ext | |
7359 | cat >>conftest.$ac_ext <<_ACEOF | |
7360 | /* end confdefs.h. */ | |
7361 | $ac_includes_default | |
7362 | int | |
7363 | main () | |
7364 | { | |
7365 | if ((pid_t *) 0) | |
7366 | return 0; | |
7367 | if (sizeof (pid_t)) | |
7368 | return 0; | |
7369 | ; | |
7370 | return 0; | |
7371 | } | |
7372 | _ACEOF | |
7373 | rm -f conftest.$ac_objext | |
7374 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7375 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7376 | ac_status=$? |
86da66b5 HPN |
7377 | grep -v '^ *+' conftest.er1 >conftest.err |
7378 | rm -f conftest.er1 | |
7379 | cat conftest.err >&5 | |
ba479fd2 NN |
7380 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7381 | (exit $ac_status); } && | |
d2640b91 | 7382 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7383 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7384 | (eval $ac_try) 2>&5 | |
7385 | ac_status=$? | |
7386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7387 | (exit $ac_status); }; } && | |
7388 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7390 | (eval $ac_try) 2>&5 | |
7391 | ac_status=$? | |
7392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7393 | (exit $ac_status); }; }; then | |
cb65112a | 7394 | ac_cv_type_pid_t=yes |
c375c43b | 7395 | else |
ba479fd2 NN |
7396 | echo "$as_me: failed program was:" >&5 |
7397 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 7398 | |
ba479fd2 NN |
7399 | ac_cv_type_pid_t=no |
7400 | fi | |
86da66b5 | 7401 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 7402 | fi |
ba479fd2 NN |
7403 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
7404 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
7405 | if test $ac_cv_type_pid_t = yes; then | |
7406 | : | |
7407 | else | |
7408 | ||
7409 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 7410 | #define pid_t int |
ba479fd2 | 7411 | _ACEOF |
c375c43b KG |
7412 | |
7413 | fi | |
7414 | ||
ba479fd2 NN |
7415 | |
7416 | ||
7417 | for ac_header in unistd.h vfork.h | |
7418 | do | |
7419 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 7420 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
7421 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
7422 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
7423 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 7424 | else |
ca9bc441 | 7425 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7426 | /* confdefs.h. */ |
7427 | _ACEOF | |
7428 | cat confdefs.h >>conftest.$ac_ext | |
7429 | cat >>conftest.$ac_ext <<_ACEOF | |
7430 | /* end confdefs.h. */ | |
7431 | #include <$ac_header> | |
7432 | _ACEOF | |
7433 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7434 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7435 | ac_status=$? | |
7436 | grep -v '^ *+' conftest.er1 >conftest.err | |
7437 | rm -f conftest.er1 | |
7438 | cat conftest.err >&5 | |
7439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7440 | (exit $ac_status); } >/dev/null; then | |
7441 | if test -s conftest.err; then | |
7442 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 7443 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
7444 | else |
7445 | ac_cpp_err= | |
7446 | fi | |
093e61a6 | 7447 | else |
ba479fd2 NN |
7448 | ac_cpp_err=yes |
7449 | fi | |
7450 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 7451 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
7452 | else |
7453 | echo "$as_me: failed program was:" >&5 | |
7454 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7455 | ||
ca9bc441 | 7456 | eval "$as_ac_Header=no" |
ba479fd2 NN |
7457 | fi |
7458 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 7459 | fi |
ba479fd2 NN |
7460 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7461 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
7462 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
7463 | cat >>confdefs.h <<_ACEOF | |
7464 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7465 | _ACEOF | |
6e3f3080 NN |
7466 | |
7467 | fi | |
ba479fd2 NN |
7468 | done |
7469 | ||
7470 | ||
7471 | ||
7472 | for ac_func in fork vfork | |
7473 | do | |
7474 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7475 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7476 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7477 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7478 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7479 | else | |
7480 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7481 | /* confdefs.h. */ |
7482 | _ACEOF | |
7483 | cat confdefs.h >>conftest.$ac_ext | |
7484 | cat >>conftest.$ac_ext <<_ACEOF | |
7485 | /* end confdefs.h. */ | |
86da66b5 HPN |
7486 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
7487 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
7488 | #define $ac_func innocuous_$ac_func | |
7489 | ||
c375c43b | 7490 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
7491 | which can conflict with char $ac_func (); below. |
7492 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7493 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 7494 | |
ba479fd2 NN |
7495 | #ifdef __STDC__ |
7496 | # include <limits.h> | |
7497 | #else | |
7498 | # include <assert.h> | |
7499 | #endif | |
86da66b5 HPN |
7500 | |
7501 | #undef $ac_func | |
7502 | ||
6e3f3080 | 7503 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
7504 | #ifdef __cplusplus |
7505 | extern "C" | |
7506 | { | |
7507 | #endif | |
6e3f3080 | 7508 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
7509 | builtin and then its argument prototype would still apply. */ |
7510 | char $ac_func (); | |
c375c43b KG |
7511 | /* The GNU C library defines this for functions which it implements |
7512 | to always fail with ENOSYS. Some functions are actually named | |
7513 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 7514 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
7515 | choke me |
7516 | #else | |
ba479fd2 NN |
7517 | char (*f) () = $ac_func; |
7518 | #endif | |
7519 | #ifdef __cplusplus | |
7520 | } | |
c375c43b KG |
7521 | #endif |
7522 | ||
ba479fd2 NN |
7523 | int |
7524 | main () | |
7525 | { | |
7526 | return f != $ac_func; | |
7527 | ; | |
7528 | return 0; | |
7529 | } | |
7530 | _ACEOF | |
7531 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7532 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 7533 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 7534 | ac_status=$? |
86da66b5 HPN |
7535 | grep -v '^ *+' conftest.er1 >conftest.err |
7536 | rm -f conftest.er1 | |
7537 | cat conftest.err >&5 | |
ba479fd2 NN |
7538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7539 | (exit $ac_status); } && | |
d2640b91 | 7540 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7542 | (eval $ac_try) 2>&5 | |
7543 | ac_status=$? | |
7544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7545 | (exit $ac_status); }; } && | |
7546 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
7547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7548 | (eval $ac_try) 2>&5 | |
7549 | ac_status=$? | |
7550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7551 | (exit $ac_status); }; }; then | |
7552 | eval "$as_ac_var=yes" | |
7553 | else | |
7554 | echo "$as_me: failed program was:" >&5 | |
7555 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7556 | ||
7557 | eval "$as_ac_var=no" | |
7558 | fi | |
86da66b5 HPN |
7559 | rm -f conftest.err conftest.$ac_objext \ |
7560 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
7561 | fi |
7562 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7563 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7564 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7565 | cat >>confdefs.h <<_ACEOF | |
7566 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7567 | _ACEOF | |
7568 | ||
c375c43b | 7569 | fi |
ba479fd2 | 7570 | done |
c375c43b | 7571 | |
ba479fd2 NN |
7572 | if test "x$ac_cv_func_fork" = xyes; then |
7573 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
7574 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
7575 | if test "${ac_cv_func_fork_works+set}" = set; then | |
7576 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7577 | else |
ba479fd2 NN |
7578 | if test "$cross_compiling" = yes; then |
7579 | ac_cv_func_fork_works=cross | |
7580 | else | |
7581 | cat >conftest.$ac_ext <<_ACEOF | |
7582 | /* By Ruediger Kuhlmann. */ | |
7583 | #include <sys/types.h> | |
7584 | #if HAVE_UNISTD_H | |
7585 | # include <unistd.h> | |
7586 | #endif | |
7587 | /* Some systems only have a dummy stub for fork() */ | |
7588 | int main () | |
7589 | { | |
86da66b5 HPN |
7590 | if (fork() < 0) |
7591 | exit (1); | |
7592 | exit (0); | |
ba479fd2 NN |
7593 | } |
7594 | _ACEOF | |
7595 | rm -f conftest$ac_exeext | |
7596 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7597 | (eval $ac_link) 2>&5 | |
7598 | ac_status=$? | |
7599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7600 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7601 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7602 | (eval $ac_try) 2>&5 | |
7603 | ac_status=$? | |
7604 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7605 | (exit $ac_status); }; }; then | |
7606 | ac_cv_func_fork_works=yes | |
7607 | else | |
7608 | echo "$as_me: program exited with status $ac_status" >&5 | |
7609 | echo "$as_me: failed program was:" >&5 | |
7610 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7611 | ||
7612 | ( exit $ac_status ) | |
7613 | ac_cv_func_fork_works=no | |
7614 | fi | |
86da66b5 | 7615 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
7616 | fi |
7617 | fi | |
7618 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
7619 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
7620 | ||
7621 | else | |
7622 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7623 | fi | |
7624 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7625 | case $host in | |
7626 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7627 | # Override, as these systems have only a dummy fork() stub | |
7628 | ac_cv_func_fork_works=no | |
7629 | ;; | |
7630 | *) | |
7631 | ac_cv_func_fork_works=yes | |
7632 | ;; | |
7633 | esac | |
7634 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7635 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 7636 | fi |
c375c43b | 7637 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
7638 | if test "x$ac_cv_func_vfork" = xyes; then |
7639 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
7640 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
7641 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
7642 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7643 | else |
ba479fd2 NN |
7644 | if test "$cross_compiling" = yes; then |
7645 | ac_cv_func_vfork_works=cross | |
7646 | else | |
7647 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7648 | /* confdefs.h. */ |
7649 | _ACEOF | |
7650 | cat confdefs.h >>conftest.$ac_ext | |
7651 | cat >>conftest.$ac_ext <<_ACEOF | |
7652 | /* end confdefs.h. */ | |
c375c43b KG |
7653 | /* Thanks to Paul Eggert for this test. */ |
7654 | #include <stdio.h> | |
ba479fd2 | 7655 | #include <stdlib.h> |
c375c43b KG |
7656 | #include <sys/types.h> |
7657 | #include <sys/stat.h> | |
ba479fd2 NN |
7658 | #include <sys/wait.h> |
7659 | #if HAVE_UNISTD_H | |
7660 | # include <unistd.h> | |
c375c43b | 7661 | #endif |
ba479fd2 NN |
7662 | #if HAVE_VFORK_H |
7663 | # include <vfork.h> | |
c375c43b KG |
7664 | #endif |
7665 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
7666 | argument registers are propagated back to the parent. The compiler |
7667 | is told about this with #include <vfork.h>, but some compilers | |
7668 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7669 | static variable whose address is put into a register that is | |
7670 | clobbered by the vfork. */ | |
7671 | static void | |
c375c43b KG |
7672 | #ifdef __cplusplus |
7673 | sparc_address_test (int arg) | |
ba479fd2 | 7674 | # else |
c375c43b KG |
7675 | sparc_address_test (arg) int arg; |
7676 | #endif | |
7677 | { | |
7678 | static pid_t child; | |
7679 | if (!child) { | |
7680 | child = vfork (); | |
7681 | if (child < 0) { | |
7682 | perror ("vfork"); | |
7683 | _exit(2); | |
7684 | } | |
7685 | if (!child) { | |
7686 | arg = getpid(); | |
7687 | write(-1, "", 0); | |
7688 | _exit (arg); | |
7689 | } | |
7690 | } | |
7691 | } | |
ba479fd2 NN |
7692 | |
7693 | int | |
7694 | main () | |
7695 | { | |
c375c43b KG |
7696 | pid_t parent = getpid (); |
7697 | pid_t child; | |
7698 | ||
ba479fd2 | 7699 | sparc_address_test (0); |
c375c43b KG |
7700 | |
7701 | child = vfork (); | |
7702 | ||
7703 | if (child == 0) { | |
ba479fd2 NN |
7704 | /* Here is another test for sparc vfork register problems. This |
7705 | test uses lots of local variables, at least as many local | |
7706 | variables as main has allocated so far including compiler | |
7707 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7708 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7709 | reuse the register of parent for one of the local variables, | |
7710 | since it will think that parent can't possibly be used any more | |
7711 | in this routine. Assigning to the local variable will thus | |
7712 | munge parent in the parent process. */ | |
c375c43b KG |
7713 | pid_t |
7714 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7715 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7716 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7717 | use the same hardware register for all 8 local variables. */ | |
7718 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7719 | || p != p5 || p != p6 || p != p7) | |
7720 | _exit(1); | |
7721 | ||
ba479fd2 NN |
7722 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
7723 | from child file descriptors. If the child closes a descriptor | |
7724 | before it execs or exits, this munges the parent's descriptor | |
7725 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
7726 | _exit(close(fileno(stdout)) != 0); |
7727 | } else { | |
7728 | int status; | |
7729 | struct stat st; | |
7730 | ||
7731 | while (wait(&status) != child) | |
7732 | ; | |
7733 | exit( | |
7734 | /* Was there some problem with vforking? */ | |
7735 | child < 0 | |
7736 | ||
7737 | /* Did the child fail? (This shouldn't happen.) */ | |
7738 | || status | |
7739 | ||
7740 | /* Did the vfork/compiler bug occur? */ | |
7741 | || parent != getpid() | |
7742 | ||
7743 | /* Did the file descriptor bug occur? */ | |
7744 | || fstat(fileno(stdout), &st) != 0 | |
7745 | ); | |
7746 | } | |
7747 | } | |
ba479fd2 NN |
7748 | _ACEOF |
7749 | rm -f conftest$ac_exeext | |
7750 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7751 | (eval $ac_link) 2>&5 | |
7752 | ac_status=$? | |
7753 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7754 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7755 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7756 | (eval $ac_try) 2>&5 | |
7757 | ac_status=$? | |
7758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7759 | (exit $ac_status); }; }; then | |
c375c43b KG |
7760 | ac_cv_func_vfork_works=yes |
7761 | else | |
ba479fd2 NN |
7762 | echo "$as_me: program exited with status $ac_status" >&5 |
7763 | echo "$as_me: failed program was:" >&5 | |
7764 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7765 | ||
7766 | ( exit $ac_status ) | |
7767 | ac_cv_func_vfork_works=no | |
cafe096b | 7768 | fi |
86da66b5 | 7769 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 7770 | fi |
ba479fd2 NN |
7771 | fi |
7772 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
7773 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 7774 | |
ba479fd2 NN |
7775 | fi; |
7776 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 7777 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
7778 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
7779 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
7780 | fi |
7781 | ||
ba479fd2 NN |
7782 | if test "x$ac_cv_func_vfork_works" = xyes; then |
7783 | ||
7784 | cat >>confdefs.h <<\_ACEOF | |
7785 | #define HAVE_WORKING_VFORK 1 | |
7786 | _ACEOF | |
7787 | ||
7788 | else | |
7789 | ||
7790 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 7791 | #define vfork fork |
ba479fd2 | 7792 | _ACEOF |
c375c43b KG |
7793 | |
7794 | fi | |
ba479fd2 NN |
7795 | if test "x$ac_cv_func_fork_works" = xyes; then |
7796 | ||
7797 | cat >>confdefs.h <<\_ACEOF | |
7798 | #define HAVE_WORKING_FORK 1 | |
7799 | _ACEOF | |
7800 | ||
7801 | fi | |
7802 | ||
c375c43b | 7803 | |
81bf3d9e | 7804 | |
f91abfce | 7805 | |
b7f2fb96 | 7806 | am_cv_lib_iconv_ldpath= |
ba479fd2 NN |
7807 | |
7808 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
f91abfce TT |
7809 | if test "${with_libiconv_prefix+set}" = set; then |
7810 | withval="$with_libiconv_prefix" | |
ba479fd2 | 7811 | |
f91abfce TT |
7812 | for dir in `echo "$withval" | tr : ' '`; do |
7813 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 7814 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 7815 | done |
ba479fd2 NN |
7816 | |
7817 | fi; | |
f91abfce TT |
7818 | |
7819 | ||
ba479fd2 | 7820 | for ac_header in iconv.h |
eb158727 | 7821 | do |
ba479fd2 | 7822 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 7823 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
7824 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
7825 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
7826 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 7827 | else |
ca9bc441 | 7828 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7829 | /* confdefs.h. */ |
7830 | _ACEOF | |
7831 | cat confdefs.h >>conftest.$ac_ext | |
7832 | cat >>conftest.$ac_ext <<_ACEOF | |
7833 | /* end confdefs.h. */ | |
7834 | #include <$ac_header> | |
7835 | _ACEOF | |
7836 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7837 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7838 | ac_status=$? | |
7839 | grep -v '^ *+' conftest.er1 >conftest.err | |
7840 | rm -f conftest.er1 | |
7841 | cat conftest.err >&5 | |
7842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7843 | (exit $ac_status); } >/dev/null; then | |
7844 | if test -s conftest.err; then | |
7845 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 7846 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
7847 | else |
7848 | ac_cpp_err= | |
7849 | fi | |
7850 | else | |
7851 | ac_cpp_err=yes | |
7852 | fi | |
7853 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 7854 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
7855 | else |
7856 | echo "$as_me: failed program was:" >&5 | |
7857 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7858 | ||
ca9bc441 | 7859 | eval "$as_ac_Header=no" |
ba479fd2 NN |
7860 | fi |
7861 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 7862 | fi |
ba479fd2 NN |
7863 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7864 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
7865 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
7866 | cat >>confdefs.h <<_ACEOF | |
7867 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7868 | _ACEOF | |
7869 | ||
eb158727 ZW |
7870 | fi |
7871 | done | |
7872 | ||
7873 | ||
ba479fd2 NN |
7874 | echo "$as_me:$LINENO: checking for iconv" >&5 |
7875 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
7876 | if test "${am_cv_func_iconv+set}" = set; then | |
7877 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 7878 | else |
ba479fd2 | 7879 | |
f91abfce TT |
7880 | am_cv_func_iconv="no, consider installing GNU libiconv" |
7881 | am_cv_lib_iconv=no | |
ba479fd2 | 7882 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7883 | /* confdefs.h. */ |
7884 | _ACEOF | |
7885 | cat confdefs.h >>conftest.$ac_ext | |
7886 | cat >>conftest.$ac_ext <<_ACEOF | |
7887 | /* end confdefs.h. */ | |
f91abfce TT |
7888 | #include <stdlib.h> |
7889 | #include <iconv.h> | |
ba479fd2 NN |
7890 | int |
7891 | main () | |
7892 | { | |
f91abfce TT |
7893 | iconv_t cd = iconv_open("",""); |
7894 | iconv(cd,NULL,NULL,NULL,NULL); | |
7895 | iconv_close(cd); | |
ba479fd2 NN |
7896 | ; |
7897 | return 0; | |
7898 | } | |
7899 | _ACEOF | |
7900 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7901 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 7902 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 7903 | ac_status=$? |
86da66b5 HPN |
7904 | grep -v '^ *+' conftest.er1 >conftest.err |
7905 | rm -f conftest.er1 | |
7906 | cat conftest.err >&5 | |
ba479fd2 NN |
7907 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7908 | (exit $ac_status); } && | |
d2640b91 | 7909 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7910 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7911 | (eval $ac_try) 2>&5 | |
7912 | ac_status=$? | |
7913 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7914 | (exit $ac_status); }; } && | |
7915 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
7916 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7917 | (eval $ac_try) 2>&5 | |
7918 | ac_status=$? | |
7919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7920 | (exit $ac_status); }; }; then | |
f91abfce TT |
7921 | am_cv_func_iconv=yes |
7922 | else | |
ba479fd2 NN |
7923 | echo "$as_me: failed program was:" >&5 |
7924 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7925 | ||
f91abfce | 7926 | fi |
86da66b5 HPN |
7927 | rm -f conftest.err conftest.$ac_objext \ |
7928 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
7929 | if test "$am_cv_func_iconv" != yes; then |
7930 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 7931 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
ba479fd2 | 7932 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7933 | /* confdefs.h. */ |
7934 | _ACEOF | |
7935 | cat confdefs.h >>conftest.$ac_ext | |
7936 | cat >>conftest.$ac_ext <<_ACEOF | |
7937 | /* end confdefs.h. */ | |
f91abfce TT |
7938 | #include <stdlib.h> |
7939 | #include <iconv.h> | |
ba479fd2 NN |
7940 | int |
7941 | main () | |
7942 | { | |
f91abfce TT |
7943 | iconv_t cd = iconv_open("",""); |
7944 | iconv(cd,NULL,NULL,NULL,NULL); | |
7945 | iconv_close(cd); | |
ba479fd2 NN |
7946 | ; |
7947 | return 0; | |
7948 | } | |
7949 | _ACEOF | |
7950 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7951 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 7952 | (eval $ac_link) 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); } && | |
d2640b91 | 7959 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7960 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7961 | (eval $ac_try) 2>&5 | |
7962 | ac_status=$? | |
7963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7964 | (exit $ac_status); }; } && | |
7965 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
7966 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7967 | (eval $ac_try) 2>&5 | |
7968 | ac_status=$? | |
7969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7970 | (exit $ac_status); }; }; then | |
f91abfce TT |
7971 | am_cv_lib_iconv=yes |
7972 | am_cv_func_iconv=yes | |
7973 | else | |
ba479fd2 NN |
7974 | echo "$as_me: failed program was:" >&5 |
7975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7976 | ||
f91abfce | 7977 | fi |
86da66b5 HPN |
7978 | rm -f conftest.err conftest.$ac_objext \ |
7979 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
7980 | LIBS="$am_save_LIBS" |
7981 | fi | |
6e3f3080 | 7982 | |
ba479fd2 NN |
7983 | fi |
7984 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
7985 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 7986 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
7987 | |
7988 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 7989 | #define HAVE_ICONV 1 |
ba479fd2 | 7990 | _ACEOF |
f91abfce | 7991 | |
ba479fd2 NN |
7992 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
7993 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
7994 | if test "${am_cv_proto_iconv+set}" = set; then | |
7995 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 7996 | else |
ba479fd2 NN |
7997 | |
7998 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7999 | /* confdefs.h. */ |
8000 | _ACEOF | |
8001 | cat confdefs.h >>conftest.$ac_ext | |
8002 | cat >>conftest.$ac_ext <<_ACEOF | |
8003 | /* end confdefs.h. */ | |
f91abfce TT |
8004 | |
8005 | #include <stdlib.h> | |
8006 | #include <iconv.h> | |
8007 | extern | |
8008 | #ifdef __cplusplus | |
8009 | "C" | |
8010 | #endif | |
8011 | #if defined(__STDC__) || defined(__cplusplus) | |
8012 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8013 | #else | |
8014 | size_t iconv(); | |
8015 | #endif | |
8016 | ||
ba479fd2 NN |
8017 | int |
8018 | main () | |
8019 | { | |
f91abfce | 8020 | |
ba479fd2 NN |
8021 | ; |
8022 | return 0; | |
8023 | } | |
8024 | _ACEOF | |
8025 | rm -f conftest.$ac_objext | |
8026 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8027 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8028 | ac_status=$? |
86da66b5 HPN |
8029 | grep -v '^ *+' conftest.er1 >conftest.err |
8030 | rm -f conftest.er1 | |
8031 | cat conftest.err >&5 | |
ba479fd2 NN |
8032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8033 | (exit $ac_status); } && | |
d2640b91 | 8034 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8035 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8036 | (eval $ac_try) 2>&5 | |
8037 | ac_status=$? | |
8038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8039 | (exit $ac_status); }; } && | |
8040 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8041 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8042 | (eval $ac_try) 2>&5 | |
8043 | ac_status=$? | |
8044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8045 | (exit $ac_status); }; }; then | |
f91abfce TT |
8046 | am_cv_proto_iconv_arg1="" |
8047 | else | |
ba479fd2 NN |
8048 | echo "$as_me: failed program was:" >&5 |
8049 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8050 | ||
8051 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 8052 | fi |
86da66b5 | 8053 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
8054 | 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);" |
8055 | fi | |
8056 | ||
8057 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
8058 | echo "$as_me:$LINENO: result: ${ac_t:- |
8059 | }$am_cv_proto_iconv" >&5 | |
8060 | echo "${ECHO_T}${ac_t:- | |
8061 | }$am_cv_proto_iconv" >&6 | |
8062 | ||
8063 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 8064 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 8065 | _ACEOF |
f91abfce TT |
8066 | |
8067 | fi | |
8068 | LIBICONV= | |
8069 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 8070 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 8071 | fi |
ba479fd2 | 8072 | |
f91abfce | 8073 | |
56694dd9 ZW |
8074 | # Until we have in-tree GNU iconv: |
8075 | LIBICONV_DEP= | |
8076 | ||
8077 | ||
8078 | ||
ba479fd2 NN |
8079 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
8080 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
8081 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
8082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 8083 | else |
ba479fd2 | 8084 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8085 | /* confdefs.h. */ |
8086 | _ACEOF | |
8087 | cat confdefs.h >>conftest.$ac_ext | |
8088 | cat >>conftest.$ac_ext <<_ACEOF | |
8089 | /* end confdefs.h. */ | |
56694dd9 | 8090 | #include <locale.h> |
ba479fd2 NN |
8091 | int |
8092 | main () | |
8093 | { | |
56694dd9 | 8094 | return LC_MESSAGES |
ba479fd2 NN |
8095 | ; |
8096 | return 0; | |
8097 | } | |
8098 | _ACEOF | |
8099 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8100 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8101 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8102 | ac_status=$? |
86da66b5 HPN |
8103 | grep -v '^ *+' conftest.er1 >conftest.err |
8104 | rm -f conftest.er1 | |
8105 | cat conftest.err >&5 | |
ba479fd2 NN |
8106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8107 | (exit $ac_status); } && | |
d2640b91 | 8108 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8109 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8110 | (eval $ac_try) 2>&5 | |
8111 | ac_status=$? | |
8112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8113 | (exit $ac_status); }; } && | |
8114 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8115 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8116 | (eval $ac_try) 2>&5 | |
8117 | ac_status=$? | |
8118 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8119 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
8120 | am_cv_val_LC_MESSAGES=yes |
8121 | else | |
ba479fd2 NN |
8122 | echo "$as_me: failed program was:" >&5 |
8123 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8124 | ||
8125 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 8126 | fi |
86da66b5 HPN |
8127 | rm -f conftest.err conftest.$ac_objext \ |
8128 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 8129 | fi |
ba479fd2 NN |
8130 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
8131 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 8132 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
8133 | |
8134 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 8135 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 8136 | _ACEOF |
56694dd9 ZW |
8137 | |
8138 | fi | |
8139 | ||
f91abfce | 8140 | |
86cf1cbd KG |
8141 | # We will need to find libiberty.h and ansidecl.h |
8142 | saved_CFLAGS="$CFLAGS" | |
8143 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
8144 | |
8145 | ||
8146 | ||
8147 | ||
8148 | ||
8149 | ||
8150 | ||
8151 | ||
8152 | ||
8153 | ||
8154 | ||
8155 | ||
8156 | ||
8157 | ||
8158 | ||
8159 | ||
8160 | ||
8161 | ||
8162 | ||
8163 | ||
8164 | ||
6a257778 | 8165 | |
ad6717df PB |
8166 | |
8167 | ||
8e944909 | 8168 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 8169 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 8170 | fprintf_unlocked strstr errno snprintf vasprintf \ |
6a257778 | 8171 | malloc realloc calloc free basename getopt clock getpagesize |
81bf3d9e | 8172 | do |
ad6717df | 8173 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8174 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8175 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8176 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8177 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8178 | else | |
8179 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8180 | /* confdefs.h. */ |
8181 | _ACEOF | |
8182 | cat confdefs.h >>conftest.$ac_ext | |
8183 | cat >>conftest.$ac_ext <<_ACEOF | |
8184 | /* end confdefs.h. */ | |
7afe8c41 KG |
8185 | #undef $ac_tr_decl |
8186 | #define $ac_tr_decl 1 | |
ba479fd2 | 8187 | |
d02af173 | 8188 | #include "ansidecl.h" |
86cf1cbd | 8189 | #include "system.h" |
f31e826b | 8190 | |
ba479fd2 NN |
8191 | int |
8192 | main () | |
8193 | { | |
86cf1cbd KG |
8194 | #ifndef $ac_func |
8195 | char *(*pfn) = (char *(*)) $ac_func ; | |
8196 | #endif | |
ba479fd2 NN |
8197 | ; |
8198 | return 0; | |
8199 | } | |
8200 | _ACEOF | |
8201 | rm -f conftest.$ac_objext | |
8202 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8203 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8204 | ac_status=$? |
86da66b5 HPN |
8205 | grep -v '^ *+' conftest.er1 >conftest.err |
8206 | rm -f conftest.er1 | |
8207 | cat conftest.err >&5 | |
ba479fd2 NN |
8208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8209 | (exit $ac_status); } && | |
d2640b91 | 8210 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8212 | (eval $ac_try) 2>&5 | |
8213 | ac_status=$? | |
8214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8215 | (exit $ac_status); }; } && | |
8216 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8217 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8218 | (eval $ac_try) 2>&5 | |
8219 | ac_status=$? | |
8220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8221 | (exit $ac_status); }; }; then | |
f31e826b | 8222 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 8223 | else |
ba479fd2 NN |
8224 | echo "$as_me: failed program was:" >&5 |
8225 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8226 | ||
8227 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 8228 | fi |
86da66b5 | 8229 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
8230 | fi |
8231 | ||
f31e826b | 8232 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
8233 | echo "$as_me:$LINENO: result: yes" >&5 |
8234 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 8235 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8236 | _ACEOF |
8237 | ||
81bf3d9e | 8238 | else |
ba479fd2 NN |
8239 | echo "$as_me:$LINENO: result: no" >&5 |
8240 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 8241 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8242 | _ACEOF |
8243 | ||
81bf3d9e RH |
8244 | fi |
8245 | ||
8246 | done | |
ba479fd2 | 8247 | |
ba479fd2 | 8248 | |
ba479fd2 | 8249 | |
81bf3d9e | 8250 | |
81bf3d9e RH |
8251 | |
8252 | for ac_func in getrlimit setrlimit getrusage | |
8253 | do | |
ad6717df | 8254 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8255 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8256 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8257 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8258 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8259 | else | |
8260 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8261 | /* confdefs.h. */ |
8262 | _ACEOF | |
8263 | cat confdefs.h >>conftest.$ac_ext | |
8264 | cat >>conftest.$ac_ext <<_ACEOF | |
8265 | /* end confdefs.h. */ | |
7afe8c41 KG |
8266 | #undef $ac_tr_decl |
8267 | #define $ac_tr_decl 1 | |
ba479fd2 | 8268 | |
d02af173 | 8269 | #include "ansidecl.h" |
86cf1cbd | 8270 | #include "system.h" |
81bf3d9e RH |
8271 | #ifdef HAVE_SYS_RESOURCE_H |
8272 | #include <sys/resource.h> | |
8273 | #endif | |
8274 | ||
f31e826b | 8275 | |
ba479fd2 NN |
8276 | int |
8277 | main () | |
8278 | { | |
86cf1cbd KG |
8279 | #ifndef $ac_func |
8280 | char *(*pfn) = (char *(*)) $ac_func ; | |
8281 | #endif | |
ba479fd2 NN |
8282 | ; |
8283 | return 0; | |
8284 | } | |
8285 | _ACEOF | |
8286 | rm -f conftest.$ac_objext | |
8287 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8288 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8289 | ac_status=$? |
86da66b5 HPN |
8290 | grep -v '^ *+' conftest.er1 >conftest.err |
8291 | rm -f conftest.er1 | |
8292 | cat conftest.err >&5 | |
ba479fd2 NN |
8293 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8294 | (exit $ac_status); } && | |
d2640b91 | 8295 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8296 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8297 | (eval $ac_try) 2>&5 | |
8298 | ac_status=$? | |
8299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8300 | (exit $ac_status); }; } && | |
8301 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8302 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8303 | (eval $ac_try) 2>&5 | |
8304 | ac_status=$? | |
8305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8306 | (exit $ac_status); }; }; then | |
f31e826b | 8307 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 8308 | else |
ba479fd2 NN |
8309 | echo "$as_me: failed program was:" >&5 |
8310 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8311 | ||
8312 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 8313 | fi |
86da66b5 | 8314 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
8315 | fi |
8316 | ||
f31e826b | 8317 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
8318 | echo "$as_me:$LINENO: result: yes" >&5 |
8319 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 8320 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8321 | _ACEOF |
8322 | ||
81bf3d9e | 8323 | else |
ba479fd2 NN |
8324 | echo "$as_me:$LINENO: result: no" >&5 |
8325 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 8326 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8327 | _ACEOF |
8328 | ||
81bf3d9e RH |
8329 | fi |
8330 | ||
8331 | done | |
86cf1cbd | 8332 | |
81bf3d9e | 8333 | |
ba479fd2 | 8334 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8335 | /* confdefs.h. */ |
8336 | _ACEOF | |
8337 | cat confdefs.h >>conftest.$ac_ext | |
8338 | cat >>conftest.$ac_ext <<_ACEOF | |
8339 | /* end confdefs.h. */ | |
b2522d2b HPN |
8340 | |
8341 | #include "ansidecl.h" | |
8342 | #include "system.h" | |
8343 | #ifdef HAVE_SYS_RESOURCE_H | |
8344 | #include <sys/resource.h> | |
8345 | #endif | |
8346 | ||
ba479fd2 NN |
8347 | int |
8348 | main () | |
8349 | { | |
b2522d2b | 8350 | rlim_t l = 0; |
ba479fd2 NN |
8351 | ; |
8352 | return 0; | |
8353 | } | |
8354 | _ACEOF | |
8355 | rm -f conftest.$ac_objext | |
8356 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8357 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8358 | ac_status=$? |
86da66b5 HPN |
8359 | grep -v '^ *+' conftest.er1 >conftest.err |
8360 | rm -f conftest.er1 | |
8361 | cat conftest.err >&5 | |
ba479fd2 NN |
8362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8363 | (exit $ac_status); } && | |
d2640b91 | 8364 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8366 | (eval $ac_try) 2>&5 | |
8367 | ac_status=$? | |
8368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8369 | (exit $ac_status); }; } && | |
8370 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8371 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8372 | (eval $ac_try) 2>&5 | |
8373 | ac_status=$? | |
8374 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8375 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
8376 | : |
8377 | else | |
ba479fd2 NN |
8378 | echo "$as_me: failed program was:" >&5 |
8379 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8380 | ||
8381 | ||
8382 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 8383 | #define rlim_t long |
ba479fd2 | 8384 | _ACEOF |
b2522d2b HPN |
8385 | |
8386 | fi | |
86da66b5 | 8387 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 8388 | |
ad6717df | 8389 | |
351df804 | 8390 | for ac_func in ldgetname |
c1800ec8 | 8391 | do |
ad6717df | 8392 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8393 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8394 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8395 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8396 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8397 | else | |
8398 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8399 | /* confdefs.h. */ |
8400 | _ACEOF | |
8401 | cat confdefs.h >>conftest.$ac_ext | |
8402 | cat >>conftest.$ac_ext <<_ACEOF | |
8403 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8404 | #undef $ac_tr_decl |
8405 | #define $ac_tr_decl 1 | |
ba479fd2 | 8406 | |
351df804 KG |
8407 | #include "ansidecl.h" |
8408 | #include "system.h" | |
8409 | #ifdef HAVE_LDFCN_H | |
8410 | #include <ldfcn.h> | |
8411 | #endif | |
8412 | ||
8413 | ||
ba479fd2 NN |
8414 | int |
8415 | main () | |
8416 | { | |
351df804 KG |
8417 | #ifndef $ac_func |
8418 | char *(*pfn) = (char *(*)) $ac_func ; | |
8419 | #endif | |
ba479fd2 NN |
8420 | ; |
8421 | return 0; | |
8422 | } | |
8423 | _ACEOF | |
8424 | rm -f conftest.$ac_objext | |
8425 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8426 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8427 | ac_status=$? |
86da66b5 HPN |
8428 | grep -v '^ *+' conftest.er1 >conftest.err |
8429 | rm -f conftest.er1 | |
8430 | cat conftest.err >&5 | |
ba479fd2 NN |
8431 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8432 | (exit $ac_status); } && | |
d2640b91 | 8433 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8434 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8435 | (eval $ac_try) 2>&5 | |
8436 | ac_status=$? | |
8437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8438 | (exit $ac_status); }; } && | |
8439 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8440 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8441 | (eval $ac_try) 2>&5 | |
8442 | ac_status=$? | |
8443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8444 | (exit $ac_status); }; }; then | |
351df804 KG |
8445 | eval "gcc_cv_have_decl_$ac_func=yes" |
8446 | else | |
ba479fd2 NN |
8447 | echo "$as_me: failed program was:" >&5 |
8448 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8449 | ||
8450 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 8451 | fi |
86da66b5 | 8452 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
8453 | fi |
8454 | ||
8455 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8456 | echo "$as_me:$LINENO: result: yes" >&5 |
8457 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8458 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8459 | _ACEOF |
8460 | ||
351df804 | 8461 | else |
ba479fd2 NN |
8462 | echo "$as_me:$LINENO: result: no" >&5 |
8463 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8464 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8465 | _ACEOF |
8466 | ||
351df804 KG |
8467 | fi |
8468 | ||
8469 | done | |
ba479fd2 | 8470 | |
351df804 KG |
8471 | |
8472 | ||
8473 | for ac_func in times | |
8474 | do | |
ad6717df | 8475 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8476 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8477 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8478 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8480 | else | |
8481 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8482 | /* confdefs.h. */ |
8483 | _ACEOF | |
8484 | cat confdefs.h >>conftest.$ac_ext | |
8485 | cat >>conftest.$ac_ext <<_ACEOF | |
8486 | /* end confdefs.h. */ | |
351df804 KG |
8487 | #undef $ac_tr_decl |
8488 | #define $ac_tr_decl 1 | |
ba479fd2 | 8489 | |
c1800ec8 ZW |
8490 | #include "ansidecl.h" |
8491 | #include "system.h" | |
8492 | #ifdef HAVE_SYS_TIMES_H | |
8493 | #include <sys/times.h> | |
8494 | #endif | |
8495 | ||
8496 | ||
ba479fd2 NN |
8497 | int |
8498 | main () | |
8499 | { | |
c1800ec8 ZW |
8500 | #ifndef $ac_func |
8501 | char *(*pfn) = (char *(*)) $ac_func ; | |
8502 | #endif | |
ba479fd2 NN |
8503 | ; |
8504 | return 0; | |
8505 | } | |
8506 | _ACEOF | |
8507 | rm -f conftest.$ac_objext | |
8508 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8509 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8510 | ac_status=$? |
86da66b5 HPN |
8511 | grep -v '^ *+' conftest.er1 >conftest.err |
8512 | rm -f conftest.er1 | |
8513 | cat conftest.err >&5 | |
ba479fd2 NN |
8514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8515 | (exit $ac_status); } && | |
d2640b91 | 8516 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8517 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8518 | (eval $ac_try) 2>&5 | |
8519 | ac_status=$? | |
8520 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8521 | (exit $ac_status); }; } && | |
8522 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8523 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8524 | (eval $ac_try) 2>&5 | |
8525 | ac_status=$? | |
8526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8527 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8528 | eval "gcc_cv_have_decl_$ac_func=yes" |
8529 | else | |
ba479fd2 NN |
8530 | echo "$as_me: failed program was:" >&5 |
8531 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8532 | ||
8533 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 8534 | fi |
86da66b5 | 8535 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
8536 | fi |
8537 | ||
8538 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8539 | echo "$as_me:$LINENO: result: yes" >&5 |
8540 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8541 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8542 | _ACEOF |
8543 | ||
c1800ec8 | 8544 | else |
ba479fd2 NN |
8545 | echo "$as_me:$LINENO: result: no" >&5 |
8546 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8547 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8548 | _ACEOF |
8549 | ||
c1800ec8 ZW |
8550 | fi |
8551 | ||
8552 | done | |
c1800ec8 ZW |
8553 | |
8554 | ||
8555 | # More time-related stuff. | |
ba479fd2 NN |
8556 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
8557 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
8558 | if test "${ac_cv_struct_tms+set}" = set; then | |
8559 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8560 | else | |
8561 | ||
8562 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8563 | /* confdefs.h. */ |
8564 | _ACEOF | |
8565 | cat confdefs.h >>conftest.$ac_ext | |
8566 | cat >>conftest.$ac_ext <<_ACEOF | |
8567 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8568 | |
8569 | #include "ansidecl.h" | |
8570 | #include "system.h" | |
8571 | #ifdef HAVE_SYS_TIMES_H | |
8572 | #include <sys/times.h> | |
8573 | #endif | |
8574 | ||
ba479fd2 NN |
8575 | int |
8576 | main () | |
8577 | { | |
c1800ec8 | 8578 | struct tms tms; |
ba479fd2 NN |
8579 | ; |
8580 | return 0; | |
8581 | } | |
8582 | _ACEOF | |
8583 | rm -f conftest.$ac_objext | |
8584 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8585 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8586 | ac_status=$? |
86da66b5 HPN |
8587 | grep -v '^ *+' conftest.er1 >conftest.err |
8588 | rm -f conftest.er1 | |
8589 | cat conftest.err >&5 | |
ba479fd2 NN |
8590 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8591 | (exit $ac_status); } && | |
d2640b91 | 8592 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8593 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8594 | (eval $ac_try) 2>&5 | |
8595 | ac_status=$? | |
8596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8597 | (exit $ac_status); }; } && | |
8598 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
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 | |
c1800ec8 ZW |
8604 | ac_cv_struct_tms=yes |
8605 | else | |
ba479fd2 NN |
8606 | echo "$as_me: failed program was:" >&5 |
8607 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8608 | ||
8609 | ac_cv_struct_tms=no | |
c1800ec8 | 8610 | fi |
86da66b5 | 8611 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8612 | fi |
ba479fd2 NN |
8613 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
8614 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 8615 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
8616 | |
8617 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8618 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 8619 | _ACEOF |
c1800ec8 ZW |
8620 | |
8621 | fi | |
8622 | ||
8623 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
8624 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
8625 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
8626 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
8627 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
8628 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8629 | else | |
8630 | ||
8631 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8632 | /* confdefs.h. */ |
8633 | _ACEOF | |
8634 | cat confdefs.h >>conftest.$ac_ext | |
8635 | cat >>conftest.$ac_ext <<_ACEOF | |
8636 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8637 | |
8638 | #include "ansidecl.h" | |
8639 | #include "system.h" | |
8640 | ||
ba479fd2 NN |
8641 | int |
8642 | main () | |
8643 | { | |
c1800ec8 | 8644 | clock_t x; |
ba479fd2 NN |
8645 | ; |
8646 | return 0; | |
8647 | } | |
8648 | _ACEOF | |
8649 | rm -f conftest.$ac_objext | |
8650 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8651 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8652 | ac_status=$? |
86da66b5 HPN |
8653 | grep -v '^ *+' conftest.er1 >conftest.err |
8654 | rm -f conftest.er1 | |
8655 | cat conftest.err >&5 | |
ba479fd2 NN |
8656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8657 | (exit $ac_status); } && | |
d2640b91 | 8658 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8659 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8660 | (eval $ac_try) 2>&5 | |
8661 | ac_status=$? | |
8662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8663 | (exit $ac_status); }; } && | |
8664 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8666 | (eval $ac_try) 2>&5 | |
8667 | ac_status=$? | |
8668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8669 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8670 | gcc_cv_type_clock_t=yes |
8671 | else | |
ba479fd2 NN |
8672 | echo "$as_me: failed program was:" >&5 |
8673 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8674 | ||
8675 | gcc_cv_type_clock_t=no | |
c1800ec8 | 8676 | fi |
86da66b5 | 8677 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8678 | fi |
ba479fd2 NN |
8679 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
8680 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 8681 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
8682 | |
8683 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8684 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 8685 | _ACEOF |
c1800ec8 ZW |
8686 | |
8687 | fi | |
8688 | ||
eb70d86d AS |
8689 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
8690 | CFLAGS="$saved_CFLAGS" | |
8691 | ||
07cf4226 DM |
8692 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
8693 | if test "${enable_initfini_array+set}" = set; then | |
8694 | enableval="$enable_initfini_array" | |
ba479fd2 | 8695 | |
07cf4226 | 8696 | else |
ba479fd2 NN |
8697 | |
8698 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
8699 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
8700 | if test "${gcc_cv_initfini_array+set}" = set; then | |
8701 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 8702 | else |
eb70d86d | 8703 | if test "$cross_compiling" = yes; then |
918c4fe4 | 8704 | gcc_cv_initfini_array=no |
eb70d86d | 8705 | else |
ba479fd2 | 8706 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8707 | /* confdefs.h. */ |
8708 | _ACEOF | |
8709 | cat confdefs.h >>conftest.$ac_ext | |
8710 | cat >>conftest.$ac_ext <<_ACEOF | |
8711 | /* end confdefs.h. */ | |
eb70d86d | 8712 | |
07cf4226 DM |
8713 | static int x = -1; |
8714 | int main (void) { return x; } | |
8715 | int foo (void) { x = 0; } | |
8716 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
8717 | _ACEOF |
8718 | rm -f conftest$ac_exeext | |
8719 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8720 | (eval $ac_link) 2>&5 | |
8721 | ac_status=$? | |
8722 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8723 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8725 | (eval $ac_try) 2>&5 | |
8726 | ac_status=$? | |
8727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8728 | (exit $ac_status); }; }; then | |
918c4fe4 | 8729 | gcc_cv_initfini_array=yes |
eb70d86d | 8730 | else |
ba479fd2 NN |
8731 | echo "$as_me: program exited with status $ac_status" >&5 |
8732 | echo "$as_me: failed program was:" >&5 | |
8733 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8734 | ||
8735 | ( exit $ac_status ) | |
8736 | gcc_cv_initfini_array=no | |
eb70d86d | 8737 | fi |
86da66b5 | 8738 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 8739 | fi |
07cf4226 | 8740 | fi |
ba479fd2 NN |
8741 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
8742 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 8743 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 8744 | |
ba479fd2 | 8745 | fi; |
63cf211a | 8746 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
8747 | |
8748 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 8749 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 8750 | _ACEOF |
07cf4226 | 8751 | |
eb70d86d | 8752 | fi |
81bf3d9e | 8753 | |
ba479fd2 NN |
8754 | # mkdir takes a single argument on some systems. |
8755 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
8756 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
8757 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
8758 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 8759 | else |
ba479fd2 | 8760 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8761 | /* confdefs.h. */ |
8762 | _ACEOF | |
8763 | cat confdefs.h >>conftest.$ac_ext | |
8764 | cat >>conftest.$ac_ext <<_ACEOF | |
8765 | /* end confdefs.h. */ | |
75923b2f MK |
8766 | |
8767 | #include <sys/types.h> | |
8768 | #ifdef HAVE_SYS_STAT_H | |
8769 | # include <sys/stat.h> | |
8770 | #endif | |
8771 | #ifdef HAVE_UNISTD_H | |
8772 | # include <unistd.h> | |
8773 | #endif | |
8774 | #ifdef HAVE_DIRECT_H | |
8775 | # include <direct.h> | |
8776 | #endif | |
ba479fd2 NN |
8777 | int |
8778 | main () | |
8779 | { | |
75923b2f | 8780 | mkdir ("foo", 0); |
ba479fd2 NN |
8781 | ; |
8782 | return 0; | |
8783 | } | |
8784 | _ACEOF | |
8785 | rm -f conftest.$ac_objext | |
8786 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8787 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8788 | ac_status=$? |
86da66b5 HPN |
8789 | grep -v '^ *+' conftest.er1 >conftest.err |
8790 | rm -f conftest.er1 | |
8791 | cat conftest.err >&5 | |
ba479fd2 NN |
8792 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8793 | (exit $ac_status); } && | |
d2640b91 | 8794 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8795 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8796 | (eval $ac_try) 2>&5 | |
8797 | ac_status=$? | |
8798 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8799 | (exit $ac_status); }; } && | |
8800 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8801 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8802 | (eval $ac_try) 2>&5 | |
8803 | ac_status=$? | |
8804 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8805 | (exit $ac_status); }; }; then | |
75923b2f MK |
8806 | gcc_cv_mkdir_takes_one_arg=no |
8807 | else | |
ba479fd2 NN |
8808 | echo "$as_me: failed program was:" >&5 |
8809 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8810 | ||
8811 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 8812 | fi |
86da66b5 | 8813 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 8814 | fi |
ba479fd2 NN |
8815 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
8816 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 8817 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
8818 | |
8819 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 8820 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 8821 | _ACEOF |
75923b2f MK |
8822 | |
8823 | fi | |
8824 | ||
8825 | ||
861bb6c1 JL |
8826 | # File extensions |
8827 | manext='.1' | |
8828 | objext='.o' | |
8829 | ||
8830 | ||
8831 | ||
4977bab6 ZW |
8832 | # With Setjmp/Longjmp based exception handling. |
8833 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
8834 | if test "${enable_sjlj_exceptions+set}" = set; then | |
8835 | enableval="$enable_sjlj_exceptions" | |
8836 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 8837 | |
ba479fd2 NN |
8838 | cat >>confdefs.h <<_ACEOF |
8839 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
8840 | _ACEOF | |
4977bab6 | 8841 | |
ba479fd2 | 8842 | fi; |
4977bab6 | 8843 | |
c6c51600 | 8844 | if test x$host = x$target; then |
ba479fd2 NN |
8845 | echo "$as_me:$LINENO: checking for main in -lunwind" >&5 |
8846 | echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6 | |
8847 | if test "${ac_cv_lib_unwind_main+set}" = set; then | |
8848 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4977bab6 | 8849 | else |
ba479fd2 | 8850 | ac_check_lib_save_LIBS=$LIBS |
4977bab6 | 8851 | LIBS="-lunwind $LIBS" |
ba479fd2 | 8852 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8853 | /* confdefs.h. */ |
8854 | _ACEOF | |
8855 | cat confdefs.h >>conftest.$ac_ext | |
8856 | cat >>conftest.$ac_ext <<_ACEOF | |
8857 | /* end confdefs.h. */ | |
4977bab6 | 8858 | |
4977bab6 | 8859 | |
ba479fd2 NN |
8860 | int |
8861 | main () | |
8862 | { | |
8863 | main (); | |
8864 | ; | |
8865 | return 0; | |
8866 | } | |
8867 | _ACEOF | |
8868 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8869 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8870 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8871 | ac_status=$? |
86da66b5 HPN |
8872 | grep -v '^ *+' conftest.er1 >conftest.err |
8873 | rm -f conftest.er1 | |
8874 | cat conftest.err >&5 | |
ba479fd2 NN |
8875 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8876 | (exit $ac_status); } && | |
d2640b91 | 8877 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8878 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8879 | (eval $ac_try) 2>&5 | |
8880 | ac_status=$? | |
8881 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8882 | (exit $ac_status); }; } && | |
8883 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8884 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8885 | (eval $ac_try) 2>&5 | |
8886 | ac_status=$? | |
8887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8888 | (exit $ac_status); }; }; then | |
8889 | ac_cv_lib_unwind_main=yes | |
8890 | else | |
8891 | echo "$as_me: failed program was:" >&5 | |
8892 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8893 | ||
8894 | ac_cv_lib_unwind_main=no | |
8895 | fi | |
86da66b5 HPN |
8896 | rm -f conftest.err conftest.$ac_objext \ |
8897 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8898 | LIBS=$ac_check_lib_save_LIBS |
8899 | fi | |
8900 | echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5 | |
8901 | echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6 | |
8902 | if test $ac_cv_lib_unwind_main = yes; then | |
4977bab6 ZW |
8903 | use_libunwind_default=yes |
8904 | else | |
ba479fd2 | 8905 | use_libunwind_default=no |
4977bab6 ZW |
8906 | fi |
8907 | ||
c6c51600 AS |
8908 | else |
8909 | use_libunwind_default=no | |
8910 | fi | |
4977bab6 ZW |
8911 | # Use libunwind based exception handling. |
8912 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
8913 | if test "${enable_libunwind_exceptions+set}" = set; then | |
8914 | enableval="$enable_libunwind_exceptions" | |
8915 | use_libunwind_exceptions=$enableval | |
8916 | else | |
8917 | use_libunwind_exceptions=$use_libunwind_default | |
ba479fd2 | 8918 | fi; |
63cf211a | 8919 | if test x"$use_libunwind_exceptions" = xyes; then |
ba479fd2 NN |
8920 | |
8921 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8922 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
ba479fd2 | 8923 | _ACEOF |
4977bab6 ZW |
8924 | |
8925 | fi | |
8926 | ||
34a86c2b NN |
8927 | # -------------------------------------------------------- |
8928 | # Build, host, and target specific configuration fragments | |
8929 | # -------------------------------------------------------- | |
8930 | ||
5b28c537 NN |
8931 | # Collect build-machine-specific information. |
8932 | . ${srcdir}/config.build | |
8933 | ||
a89ea0df NN |
8934 | # Collect host-machine-specific information. |
8935 | . ${srcdir}/config.host | |
8936 | ||
ef69da62 | 8937 | target_gtfiles= |
a89ea0df NN |
8938 | |
8939 | # Collect target-machine-specific information. | |
8ad9fb33 | 8940 | . ${srcdir}/config.gcc |
861bb6c1 JL |
8941 | |
8942 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 8943 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
8944 | |
8945 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 8946 | if test x"$tm_file" = x |
861bb6c1 JL |
8947 | then tm_file=$cpu_type/$cpu_type.h; fi |
8948 | ||
6b2adea9 | 8949 | if test x"$extra_headers" = x |
861bb6c1 JL |
8950 | then extra_headers=; fi |
8951 | ||
75bffa71 | 8952 | if test x$md_file = x |
e98e406f | 8953 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 8954 | |
75bffa71 | 8955 | if test x$out_file = x |
861bb6c1 JL |
8956 | then out_file=$cpu_type/$cpu_type.c; fi |
8957 | ||
75bffa71 | 8958 | if test x"$tmake_file" = x |
861bb6c1 JL |
8959 | then tmake_file=$cpu_type/t-$cpu_type |
8960 | fi | |
8961 | ||
90e6a802 | 8962 | if test x"$dwarf2" = xyes |
756ee602 | 8963 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
8964 | fi |
8965 | ||
861bb6c1 | 8966 | # Say what files are being used for the output code and MD file. |
11642c3a | 8967 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
8968 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
8969 | ||
11642c3a | 8970 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
8971 | # about them and drop them. |
8972 | ||
11642c3a ZW |
8973 | bx= |
8974 | for x in $build_xm_file; do | |
8975 | if test -f $srcdir/config/$x | |
8976 | then bx="$bx $x" | |
ba479fd2 NN |
8977 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8978 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8979 | fi |
8980 | done | |
8981 | build_xm_file="$bx" | |
8982 | ||
8983 | hx= | |
8984 | for x in $host_xm_file; do | |
8985 | if test -f $srcdir/config/$x | |
8986 | then hx="$hx $x" | |
ba479fd2 NN |
8987 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8988 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8989 | fi |
8990 | done | |
8991 | host_xm_file="$hx" | |
8992 | ||
8993 | tx= | |
8994 | for x in $xm_file; do | |
8995 | if test -f $srcdir/config/$x | |
8996 | then tx="$tx $x" | |
ba479fd2 NN |
8997 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8998 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8999 | fi |
9000 | done | |
9001 | xm_file="$tx" | |
9002 | ||
861bb6c1 JL |
9003 | count=a |
9004 | for f in $tm_file; do | |
9005 | count=${count}x | |
9006 | done | |
75bffa71 | 9007 | if test $count = ax; then |
861bb6c1 JL |
9008 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
9009 | else | |
9010 | echo "Using the following target machine macro files:" | |
9011 | for f in $tm_file; do | |
9012 | echo " $srcdir/config/$f" | |
9013 | done | |
9014 | fi | |
9015 | ||
4977bab6 | 9016 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
9017 | |
9018 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 9019 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 9020 | _ACEOF |
4977bab6 ZW |
9021 | |
9022 | fi | |
9023 | ||
861bb6c1 JL |
9024 | count=a |
9025 | for f in $host_xm_file; do | |
9026 | count=${count}x | |
9027 | done | |
11642c3a ZW |
9028 | if test $count = a; then |
9029 | : | |
9030 | elif test $count = ax; then | |
861bb6c1 JL |
9031 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
9032 | else | |
9033 | echo "Using the following host machine macro files:" | |
9034 | for f in $host_xm_file; do | |
9035 | echo " $srcdir/config/$f" | |
9036 | done | |
9037 | fi | |
476d9098 | 9038 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 9039 | |
75bffa71 | 9040 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
9041 | count=a |
9042 | for f in $build_xm_file; do | |
9043 | count=${count}x | |
9044 | done | |
11642c3a ZW |
9045 | if test $count = a; then |
9046 | : | |
9047 | elif test $count = ax; then | |
861bb6c1 JL |
9048 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
9049 | else | |
9050 | echo "Using the following build machine macro files:" | |
9051 | for f in $build_xm_file; do | |
9052 | echo " $srcdir/config/$f" | |
9053 | done | |
9054 | fi | |
9055 | fi | |
9056 | ||
8bb915b6 NN |
9057 | # --------- |
9058 | # Threading | |
9059 | # --------- | |
9060 | ||
c2e494a8 | 9061 | # Check if a valid thread package |
615be2cf | 9062 | case ${enable_threads} in |
c2e494a8 NN |
9063 | "" | no) |
9064 | # No threads | |
9065 | target_thread_file='single' | |
9066 | ;; | |
9067 | yes) | |
9068 | # default | |
9069 | target_thread_file='single' | |
9070 | ;; | |
769e49eb NN |
9071 | aix | dce | gnat | irix | posix | rtems | \ |
9072 | single | solaris | vxworks | win32 ) | |
615be2cf | 9073 | target_thread_file=${enable_threads} |
c2e494a8 NN |
9074 | ;; |
9075 | *) | |
615be2cf | 9076 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
9077 | exit 1 |
9078 | ;; | |
9079 | esac | |
9080 | ||
9081 | if test x${thread_file} = x; then | |
9082 | # No thread file set by target-specific clauses in config.gcc, | |
9083 | # so use file chosen by default logic above | |
9084 | thread_file=${target_thread_file} | |
861bb6c1 JL |
9085 | fi |
9086 | ||
8bb915b6 NN |
9087 | # Make gthr-default.h if we have a thread file. |
9088 | gthread_flags= | |
9089 | if test $thread_file != single; then | |
9090 | rm -f gthr-default.h | |
9091 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
9092 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
9093 | fi | |
9094 | ||
9095 | ||
9096 | # -------- | |
9097 | # UNSORTED | |
9098 | # -------- | |
9099 | ||
2121a768 JT |
9100 | if test x$enable___cxa_atexit = xyes || \ |
9101 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
354b7da5 DH |
9102 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 |
9103 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 | |
9104 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
9105 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9106 | else | |
9107 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
9108 | /* confdefs.h. */ |
9109 | _ACEOF | |
9110 | cat confdefs.h >>conftest.$ac_ext | |
9111 | cat >>conftest.$ac_ext <<_ACEOF | |
9112 | /* end confdefs.h. */ | |
86da66b5 HPN |
9113 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
9114 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9115 | #define __cxa_atexit innocuous___cxa_atexit | |
9116 | ||
354b7da5 DH |
9117 | /* System header to define __stub macros and hopefully few prototypes, |
9118 | which can conflict with char __cxa_atexit (); below. | |
9119 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9120 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9121 | |
354b7da5 DH |
9122 | #ifdef __STDC__ |
9123 | # include <limits.h> | |
9124 | #else | |
9125 | # include <assert.h> | |
9126 | #endif | |
86da66b5 HPN |
9127 | |
9128 | #undef __cxa_atexit | |
9129 | ||
354b7da5 DH |
9130 | /* Override any gcc2 internal prototype to avoid an error. */ |
9131 | #ifdef __cplusplus | |
9132 | extern "C" | |
9133 | { | |
9134 | #endif | |
9135 | /* We use char because int might match the return type of a gcc2 | |
9136 | builtin and then its argument prototype would still apply. */ | |
9137 | char __cxa_atexit (); | |
9138 | /* The GNU C library defines this for functions which it implements | |
9139 | to always fail with ENOSYS. Some functions are actually named | |
9140 | something starting with __ and the normal name is an alias. */ | |
9141 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
9142 | choke me | |
9143 | #else | |
9144 | char (*f) () = __cxa_atexit; | |
9145 | #endif | |
9146 | #ifdef __cplusplus | |
9147 | } | |
9148 | #endif | |
9149 | ||
9150 | int | |
9151 | main () | |
9152 | { | |
9153 | return f != __cxa_atexit; | |
9154 | ; | |
9155 | return 0; | |
9156 | } | |
9157 | _ACEOF | |
9158 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9159 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9160 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 9161 | ac_status=$? |
86da66b5 HPN |
9162 | grep -v '^ *+' conftest.er1 >conftest.err |
9163 | rm -f conftest.er1 | |
9164 | cat conftest.err >&5 | |
354b7da5 DH |
9165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9166 | (exit $ac_status); } && | |
d2640b91 | 9167 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9168 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9169 | (eval $ac_try) 2>&5 | |
9170 | ac_status=$? | |
9171 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9172 | (exit $ac_status); }; } && | |
9173 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
9174 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9175 | (eval $ac_try) 2>&5 | |
9176 | ac_status=$? | |
9177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9178 | (exit $ac_status); }; }; then | |
9179 | ac_cv_func___cxa_atexit=yes | |
9180 | else | |
9181 | echo "$as_me: failed program was:" >&5 | |
9182 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9183 | ||
9184 | ac_cv_func___cxa_atexit=no | |
9185 | fi | |
86da66b5 HPN |
9186 | rm -f conftest.err conftest.$ac_objext \ |
9187 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
9188 | fi |
9189 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
9190 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
9191 | if test $ac_cv_func___cxa_atexit = yes; then | |
ba479fd2 NN |
9192 | |
9193 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 9194 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 9195 | _ACEOF |
2121a768 | 9196 | |
354b7da5 DH |
9197 | else |
9198 | echo "__cxa_atexit can't be enabled on this target" | |
9199 | fi | |
9200 | ||
2121a768 JT |
9201 | fi |
9202 | ||
a5381466 | 9203 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
9204 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
9205 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
9206 | |
9207 | ||
9208 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 9209 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 9210 | _ACEOF |
a5381466 ZW |
9211 | |
9212 | fi | |
9213 | ||
b7cb92ad | 9214 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 9215 | # the first file included by config.h. |
4977bab6 | 9216 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 9217 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 9218 | # work to find out the build config parameters. |
75bffa71 | 9219 | if test x$host = x$build |
db81d74a | 9220 | then |
eaf4e618 | 9221 | build_auto=auto-host.h |
06f0b04c | 9222 | FORBUILD=.. |
b7cb92ad JL |
9223 | else |
9224 | # We create a subdir, then run autoconf in the subdir. | |
9225 | # To prevent recursion we set host and build for the new | |
9226 | # invocation of configure to the build for this invocation | |
ba479fd2 | 9227 | # of configure. |
b7cb92ad JL |
9228 | tempdir=build.$$ |
9229 | rm -rf $tempdir | |
9230 | mkdir $tempdir | |
9231 | cd $tempdir | |
9232 | case ${srcdir} in | |
255b8a49 | 9233 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
9234 | *) realsrcdir=../${srcdir};; |
9235 | esac | |
d920e825 L |
9236 | saved_CFLAGS="${CFLAGS}" |
9237 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
9238 | ${realsrcdir}/configure \ | |
33e70558 | 9239 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 9240 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 9241 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
9242 | |
9243 | # We just finished tests for the build machine, so rename | |
9244 | # the file auto-build.h in the gcc directory. | |
9245 | mv auto-host.h ../auto-build.h | |
9246 | cd .. | |
9247 | rm -rf $tempdir | |
eaf4e618 | 9248 | build_auto=auto-build.h |
3b1b059c | 9249 | FORBUILD=../${build_subdir} |
db81d74a RH |
9250 | fi |
9251 | ||
06f0b04c | 9252 | |
eaf4e618 | 9253 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
9254 | tm_p_file="${tm_p_file} tm-preds.h" |
9255 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
9256 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 9257 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
9258 | # put this back in temporarily. |
9259 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 9260 | |
34a86c2b NN |
9261 | # -------- |
9262 | # UNSORTED | |
9263 | # -------- | |
9264 | ||
f1943b77 | 9265 | # Get the version trigger filename from the toplevel |
75bffa71 | 9266 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
9267 | gcc_version_trigger=$with_gcc_version_trigger |
9268 | else | |
9269 | gcc_version_trigger=${srcdir}/version.c | |
9270 | fi | |
022dae81 | 9271 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 9272 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 9273 | |
cc1e60ea | 9274 | # Compile in configure arguments. |
8105825d | 9275 | if test -f configargs.h ; then |
cc1e60ea | 9276 | # Being re-configured. |
022dae81 | 9277 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
9278 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
9279 | else | |
9280 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
9281 | fi | |
eeae7b41 DJ |
9282 | |
9283 | # Double all backslashes and backslash all quotes to turn | |
9284 | # gcc_config_arguments into a C string. | |
9285 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
9286 | $gcc_config_arguments | |
9287 | EOF | |
9288 | gcc_config_arguments_str=`cat conftest.out` | |
9289 | rm -f conftest.out | |
9290 | ||
cc1e60ea JM |
9291 | cat > configargs.h <<EOF |
9292 | /* Generated automatically. */ | |
eeae7b41 | 9293 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 9294 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
9295 | |
9296 | static const struct { | |
9297 | const char *name, *value; | |
9298 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
9299 | EOF |
9300 | ||
ab87f8c8 JL |
9301 | # Internationalization |
9302 | PACKAGE=gcc | |
9303 | VERSION="$gcc_version" | |
861bb6c1 | 9304 | |
ab87f8c8 JL |
9305 | |
9306 | ||
56694dd9 ZW |
9307 | # If we haven't got the data from the intl directory, |
9308 | # assume NLS is disabled. | |
ba479fd2 NN |
9309 | USE_NLS=no |
9310 | LIBINTL= | |
9311 | LIBINTL_DEP= | |
9312 | INCINTL= | |
9313 | XGETTEXT= | |
9314 | GMSGFMT= | |
9315 | POSUB= | |
56694dd9 ZW |
9316 | if test -f ../intl/config.intl; then |
9317 | . ../intl/config.intl | |
093e61a6 | 9318 | fi |
ba479fd2 NN |
9319 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
9320 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 9321 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
9322 | echo "$as_me:$LINENO: result: no" >&5 |
9323 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 9324 | else |
ba479fd2 NN |
9325 | echo "$as_me:$LINENO: result: yes" >&5 |
9326 | echo "${ECHO_T}yes" >&6 | |
9327 | ||
9328 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 9329 | #define ENABLE_NLS 1 |
ba479fd2 | 9330 | _ACEOF |
56694dd9 | 9331 | |
093e61a6 | 9332 | |
ba479fd2 NN |
9333 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
9334 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 9335 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 9336 | CATALOGS= |
56694dd9 ZW |
9337 | XLINGUAS= |
9338 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
9339 | # If there aren't any .gmo files the shell will give us the | |
9340 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
9341 | # weeded out. | |
9342 | case "$cat" in *\**) | |
9343 | continue;; | |
9344 | esac | |
9345 | # The quadruple backslash is collapsed to a double backslash | |
9346 | # by the backticks, then collapsed again by the double quotes, | |
9347 | # leaving us with one backslash in the sed expression (right | |
9348 | # before the dot that mustn't act as a wildcard). | |
9349 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
9350 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
9351 | # The user is allowed to set LINGUAS to a list of languages to | |
9352 | # install catalogs for. If it's empty that means "all of them." | |
9353 | if test "x$LINGUAS" = x; then | |
9354 | CATALOGS="$CATALOGS $cat" | |
9355 | XLINGUAS="$XLINGUAS $lang" | |
9356 | else | |
9357 | case "$LINGUAS" in *$lang*) | |
9358 | CATALOGS="$CATALOGS $cat" | |
9359 | XLINGUAS="$XLINGUAS $lang" | |
9360 | ;; | |
9361 | esac | |
9362 | fi | |
9363 | done | |
9364 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
9365 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
9366 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 9367 | fi |
861bb6c1 | 9368 | |
56694dd9 ZW |
9369 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
9370 | # -liconv on the link line twice. | |
9371 | case "$LIBINTL" in *$LIBICONV*) | |
9372 | LIBICONV= ;; | |
9373 | esac | |
dc6746e7 | 9374 | |
56694dd9 ZW |
9375 | # Windows32 Registry support for specifying GCC installation paths. |
9376 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
9377 | if test "${enable_win32_registry+set}" = set; then | |
9378 | enableval="$enable_win32_registry" | |
dc6746e7 | 9379 | |
ba479fd2 | 9380 | fi; |
56694dd9 ZW |
9381 | case $host_os in |
9382 | win32 | pe | cygwin* | mingw32* | uwin*) | |
ba479fd2 NN |
9383 | echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 |
9384 | echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 | |
56694dd9 | 9385 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
9386 | |
9387 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 9388 | #define ENABLE_WIN32_REGISTRY 1 |
ba479fd2 NN |
9389 | _ACEOF |
9390 | ||
9391 | echo "$as_me:$LINENO: result: yes" >&5 | |
9392 | echo "${ECHO_T}yes" >&6 | |
9393 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
9394 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 | |
9395 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
9396 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9397 | else | |
9398 | ac_func_search_save_LIBS=$LIBS | |
9399 | ac_cv_search_RegOpenKeyExA=no | |
9400 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9401 | /* confdefs.h. */ |
9402 | _ACEOF | |
9403 | cat confdefs.h >>conftest.$ac_ext | |
9404 | cat >>conftest.$ac_ext <<_ACEOF | |
9405 | /* end confdefs.h. */ | |
861bb6c1 | 9406 | |
ab87f8c8 | 9407 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9408 | #ifdef __cplusplus |
9409 | extern "C" | |
9410 | #endif | |
ab87f8c8 | 9411 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9412 | builtin and then its argument prototype would still apply. */ |
9413 | char RegOpenKeyExA (); | |
9414 | int | |
9415 | main () | |
9416 | { | |
9417 | RegOpenKeyExA (); | |
9418 | ; | |
9419 | return 0; | |
9420 | } | |
9421 | _ACEOF | |
9422 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9423 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9424 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9425 | ac_status=$? |
86da66b5 HPN |
9426 | grep -v '^ *+' conftest.er1 >conftest.err |
9427 | rm -f conftest.er1 | |
9428 | cat conftest.err >&5 | |
ba479fd2 NN |
9429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9430 | (exit $ac_status); } && | |
d2640b91 | 9431 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9432 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9433 | (eval $ac_try) 2>&5 | |
9434 | ac_status=$? | |
9435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9436 | (exit $ac_status); }; } && | |
9437 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9438 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9439 | (eval $ac_try) 2>&5 | |
9440 | ac_status=$? | |
9441 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9442 | (exit $ac_status); }; }; then | |
56694dd9 | 9443 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 9444 | else |
ba479fd2 NN |
9445 | echo "$as_me: failed program was:" >&5 |
9446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9447 | ||
861bb6c1 | 9448 | fi |
86da66b5 HPN |
9449 | rm -f conftest.err conftest.$ac_objext \ |
9450 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9451 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
9452 | for ac_lib in advapi32; do | |
9453 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9454 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9455 | /* confdefs.h. */ |
9456 | _ACEOF | |
9457 | cat confdefs.h >>conftest.$ac_ext | |
9458 | cat >>conftest.$ac_ext <<_ACEOF | |
9459 | /* end confdefs.h. */ | |
9460 | ||
56694dd9 | 9461 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9462 | #ifdef __cplusplus |
9463 | extern "C" | |
9464 | #endif | |
56694dd9 | 9465 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9466 | builtin and then its argument prototype would still apply. */ |
9467 | char RegOpenKeyExA (); | |
9468 | int | |
9469 | main () | |
9470 | { | |
9471 | RegOpenKeyExA (); | |
9472 | ; | |
9473 | return 0; | |
9474 | } | |
9475 | _ACEOF | |
9476 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9477 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9478 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9479 | ac_status=$? |
86da66b5 HPN |
9480 | grep -v '^ *+' conftest.er1 >conftest.err |
9481 | rm -f conftest.er1 | |
9482 | cat conftest.err >&5 | |
ba479fd2 NN |
9483 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9484 | (exit $ac_status); } && | |
d2640b91 | 9485 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9487 | (eval $ac_try) 2>&5 | |
9488 | ac_status=$? | |
9489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9490 | (exit $ac_status); }; } && | |
9491 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9492 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9493 | (eval $ac_try) 2>&5 | |
9494 | ac_status=$? | |
9495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9496 | (exit $ac_status); }; }; then | |
9497 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 9498 | break |
861bb6c1 | 9499 | else |
ba479fd2 NN |
9500 | echo "$as_me: failed program was:" >&5 |
9501 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9502 | ||
861bb6c1 | 9503 | fi |
86da66b5 HPN |
9504 | rm -f conftest.err conftest.$ac_objext \ |
9505 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9506 | done |
6e3f3080 | 9507 | fi |
ba479fd2 NN |
9508 | LIBS=$ac_func_search_save_LIBS |
9509 | fi | |
9510 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
9511 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
9512 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 9513 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 9514 | |
ab87f8c8 | 9515 | fi |
ba479fd2 | 9516 | |
cafe096b | 9517 | else |
ba479fd2 NN |
9518 | echo "$as_me:$LINENO: result: no" >&5 |
9519 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 9520 | fi |
ab87f8c8 | 9521 | |
56694dd9 ZW |
9522 | # Check if user specified a different registry key. |
9523 | case "x${enable_win32_registry}" in | |
9524 | x | xyes) | |
9525 | # default. | |
9526 | gcc_cv_win32_registry_key="$VERSION" | |
9527 | ;; | |
9528 | xno) | |
9529 | # no registry lookup. | |
9530 | gcc_cv_win32_registry_key='' | |
9531 | ;; | |
9532 | *) | |
9533 | # user-specified key. | |
9534 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
9535 | ;; | |
9536 | esac | |
ab87f8c8 | 9537 | |
56694dd9 | 9538 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
9539 | echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 |
9540 | echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 | |
9541 | ||
9542 | cat >>confdefs.h <<_ACEOF | |
56694dd9 | 9543 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
ba479fd2 | 9544 | _ACEOF |
cafe096b | 9545 | |
ba479fd2 NN |
9546 | echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 |
9547 | echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 | |
093e61a6 | 9548 | fi |
56694dd9 ZW |
9549 | ;; |
9550 | esac | |
ab87f8c8 | 9551 | |
56694dd9 ZW |
9552 | # Get an absolute path to the GCC top-level source directory |
9553 | holddir=`${PWDCMD-pwd}` | |
9554 | cd $srcdir | |
9555 | topdir=`${PWDCMD-pwd}` | |
9556 | cd $holddir | |
ab87f8c8 | 9557 | |
56694dd9 | 9558 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 9559 | xmake_file= |
c406e779 | 9560 | for f in ${host_xmake_file} |
56694dd9 ZW |
9561 | do |
9562 | if test -f ${srcdir}/config/$f | |
9563 | then | |
2ed26f6b | 9564 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
9565 | fi |
9566 | done | |
093e61a6 | 9567 | |
56694dd9 | 9568 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 9569 | tmake_file_= |
c406e779 | 9570 | for f in ${tmake_file} |
56694dd9 ZW |
9571 | do |
9572 | if test -f ${srcdir}/config/$f | |
9573 | then | |
2ed26f6b | 9574 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
9575 | fi |
9576 | done | |
2ed26f6b | 9577 | tmake_file="${tmake_file_}" |
71a94577 | 9578 | |
56694dd9 | 9579 | symbolic_link='ln -s' |
34a86c2b | 9580 | |
ab87f8c8 JL |
9581 | # If the host doesn't support symlinks, modify CC in |
9582 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
9583 | # Otherwise, we can use "CC=$(CC)". | |
9584 | rm -f symtest.tem | |
9585 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
9586 | then | |
9587 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 9588 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 9589 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 9590 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
9591 | else |
9592 | rm -f symtest.tem | |
9593 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
9594 | then | |
9595 | symbolic_link="cp -p" | |
9596 | else | |
9597 | symbolic_link="cp" | |
9598 | fi | |
9599 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 9600 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 9601 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 9602 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" |
ab87f8c8 JL |
9603 | fi |
9604 | rm -f symtest.tem | |
9605 | ||
9606 | out_object_file=`basename $out_file .c`.o | |
9607 | ||
9608 | tm_file_list= | |
e22340b0 | 9609 | tm_include_list= |
ab87f8c8 | 9610 | for f in $tm_file; do |
64ccbc99 | 9611 | case $f in |
d02af173 | 9612 | defaults.h ) |
e22340b0 ZW |
9613 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
9614 | tm_include_list="${tm_include_list} $f" | |
9615 | ;; | |
9616 | * ) | |
9617 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
9618 | tm_include_list="${tm_include_list} config/$f" | |
9619 | ;; | |
64ccbc99 | 9620 | esac |
ab87f8c8 JL |
9621 | done |
9622 | ||
11642c3a | 9623 | tm_p_file_list= |
e22340b0 | 9624 | tm_p_include_list= |
11642c3a | 9625 | for f in $tm_p_file; do |
4977bab6 ZW |
9626 | case $f in |
9627 | tm-preds.h ) | |
e22340b0 ZW |
9628 | tm_p_file_list="${tm_p_file_list} $f" |
9629 | tm_p_include_list="${tm_p_include_list} $f" | |
9630 | ;; | |
9631 | * ) | |
9632 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
9633 | tm_p_include_list="${tm_p_include_list} config/$f" | |
9634 | esac | |
9635 | done | |
9636 | ||
9637 | xm_file_list= | |
9638 | xm_include_list= | |
9639 | for f in $xm_file; do | |
9640 | case $f in | |
9641 | ansidecl.h ) | |
9642 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
9643 | xm_include_list="${xm_include_list} $f" | |
9644 | ;; | |
9645 | auto-host.h ) | |
9646 | xm_file_list="${xm_file_list} $f" | |
9647 | xm_include_list="${xm_include_list} $f" | |
9648 | ;; | |
9649 | * ) | |
9650 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
9651 | xm_include_list="${xm_include_list} config/$f" | |
9652 | ;; | |
4977bab6 | 9653 | esac |
11642c3a ZW |
9654 | done |
9655 | ||
ab87f8c8 | 9656 | host_xm_file_list= |
e22340b0 | 9657 | host_xm_include_list= |
ab87f8c8 | 9658 | for f in $host_xm_file; do |
64ccbc99 | 9659 | case $f in |
d02af173 | 9660 | ansidecl.h ) |
e22340b0 ZW |
9661 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
9662 | host_xm_include_list="${host_xm_include_list} $f" | |
9663 | ;; | |
e2500fed | 9664 | auto-host.h ) |
e22340b0 ZW |
9665 | host_xm_file_list="${host_xm_file_list} $f" |
9666 | host_xm_include_list="${host_xm_include_list} $f" | |
9667 | ;; | |
9668 | * ) | |
9669 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
9670 | host_xm_include_list="${host_xm_include_list} config/$f" | |
9671 | ;; | |
64ccbc99 | 9672 | esac |
ab87f8c8 JL |
9673 | done |
9674 | ||
9675 | build_xm_file_list= | |
9676 | for f in $build_xm_file; do | |
64ccbc99 | 9677 | case $f in |
d02af173 | 9678 | ansidecl.h ) |
e22340b0 ZW |
9679 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
9680 | build_xm_include_list="${build_xm_include_list} $f" | |
9681 | ;; | |
e2500fed | 9682 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
9683 | build_xm_file_list="${build_xm_file_list} $f" |
9684 | build_xm_include_list="${build_xm_include_list} $f" | |
9685 | ;; | |
9686 | * ) | |
9687 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
9688 | build_xm_include_list="${build_xm_include_list} config/$f" | |
9689 | ;; | |
64ccbc99 | 9690 | esac |
ab87f8c8 JL |
9691 | done |
9692 | ||
a078a589 ZW |
9693 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
9694 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
9695 | CROSS= |
9696 | ALL=all.internal | |
9697 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9698 | if test x$host != x$target |
9699 | then | |
a078a589 ZW |
9700 | CROSS="-DCROSS_COMPILE" |
9701 | ALL=all.cross | |
9702 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 9703 | case "$host","$target" in |
3a7e8b87 GK |
9704 | # Darwin crosses can use the host system's libraries and headers, |
9705 | # because of the fat library support. Of course, it must be the | |
9706 | # same version of Darwin on both sides. Allow the user to | |
9707 | # just say --target=foo-darwin without a version number to mean | |
9708 | # "the version on this system". | |
9709 | *-*-darwin*,*-*-darwin*) | |
9710 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
9711 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
9712 | if test $hostos = $targetos -o $targetos = darwin ; then | |
9713 | CROSS= | |
9714 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
9715 | with_headers=yes | |
9716 | fi | |
9717 | ;; | |
9718 | ||
343f59d9 AM |
9719 | i?86-*-*,x86_64-*-* \ |
9720 | | powerpc*-*-*,powerpc64*-*-*) | |
9721 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
9722 | esac | |
7a615b25 AO |
9723 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
9724 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
9725 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9726 | fi |
9727 | ||
b39d221a EC |
9728 | # If this is a cross-compiler that does not |
9729 | # have its own set of headers then define | |
9730 | # inhibit_libc | |
9731 | ||
dc06db20 R |
9732 | # If this is using newlib, without having the headers available now, |
9733 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
9734 | # This prevents libgcc2 from containing any code which requires libc |
9735 | # support. | |
b39d221a | 9736 | inhibit_libc= |
dc06db20 R |
9737 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
9738 | test x$with_newlib = xyes ; } && | |
e50084fa | 9739 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 9740 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
9741 | fi |
9742 | ||
9743 | ||
a078a589 ZW |
9744 | # When building gcc with a cross-compiler, we need to adjust things so |
9745 | # that the generator programs are still built with the native compiler. | |
9746 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
9747 | |
9748 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
9749 | BUILD_PREFIX= |
9750 | BUILD_PREFIX_1=ignore- | |
9751 | CC_FOR_BUILD='$(CC)' | |
9752 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 9753 | |
ba479fd2 | 9754 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
9755 | |
9756 | # Possibly disable fixproto, on a per-target basis. | |
9757 | case ${use_fixproto} in | |
9758 | no) | |
9759 | STMP_FIXPROTO= | |
9760 | ;; | |
9761 | yes) | |
9762 | STMP_FIXPROTO=stmp-fixproto | |
9763 | ;; | |
9764 | esac | |
9765 | ||
a078a589 | 9766 | |
83599948 NS |
9767 | # And these apply if build != host, or we are generating coverage data |
9768 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 9769 | then |
5c35940c NN |
9770 | BUILD_PREFIX=build- |
9771 | BUILD_PREFIX_1=build- | |
b11e4747 | 9772 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 9773 | |
7a615b25 AO |
9774 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
9775 | STMP_FIXINC= | |
9776 | STMP_FIXPROTO= | |
9777 | fi | |
ab87f8c8 JL |
9778 | fi |
9779 | ||
9780 | # Expand extra_headers to include complete path. | |
9781 | # This substitutes for lots of t-* files. | |
9782 | extra_headers_list= | |
b1ef58c8 NN |
9783 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
9784 | for file in ${extra_headers} ; do | |
9785 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
9786 | done | |
ab87f8c8 | 9787 | |
c38f02df ILT |
9788 | # Define collect2 in Makefile. |
9789 | case $host_can_use_collect2 in | |
9790 | no) collect2= ;; | |
9791 | *) collect2='collect2$(exeext)' ;; | |
9792 | esac | |
9793 | ||
9794 | ||
ab87f8c8 | 9795 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
9796 | case $use_collect2 in |
9797 | no) use_collect2= ;; | |
9798 | "") ;; | |
ba479fd2 | 9799 | *) |
34a86c2b NN |
9800 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
9801 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
9802 | case $host_can_use_collect2 in |
9803 | no) | |
9804 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
9805 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
9806 | { (exit 1); exit 1; }; } | |
9807 | ;; | |
9808 | esac | |
34a86c2b NN |
9809 | ;; |
9810 | esac | |
ab87f8c8 | 9811 | |
8bb915b6 NN |
9812 | # --------------------------- |
9813 | # Assembler & linker features | |
9814 | # --------------------------- | |
9815 | ||
d869a8c4 NN |
9816 | # Identify the assembler which will work hand-in-glove with the newly |
9817 | # built GCC, so that we can examine its features. This is the assembler | |
9818 | # which will be driven by the driver program. | |
9819 | # | |
9820 | # If build != host, and we aren't building gas in-tree, we identify a | |
9821 | # build->target assembler and hope that it will have the same features | |
9822 | # as the host->target assembler we'll be using. | |
ba479fd2 NN |
9823 | echo "$as_me:$LINENO: checking what assembler to use" >&5 |
9824 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b | 9825 | in_tree_gas=no |
ab87f8c8 | 9826 | gcc_cv_as= |
981d4858 JM |
9827 | gcc_cv_gas_major_version= |
9828 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
9829 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
9830 | if test -x "$DEFAULT_ASSEMBLER"; then | |
9831 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
ab87f8c8 JL |
9832 | elif test -x as$host_exeext; then |
9833 | # Build using assembler in the current directory. | |
9834 | gcc_cv_as=./as$host_exeext | |
34a86c2b | 9835 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
9836 | && test -f ../gas/Makefile \ |
9837 | && test x$build = x$host; then | |
9838 | # Single tree build which includes gas. We want to prefer it | |
9839 | # over whatever linker top-level may have detected, since | |
9840 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
9841 | in_tree_gas=yes |
9842 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9843 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
9844 | $gcc_cv_as_gas_srcdir/configure \ | |
9845 | $gcc_cv_as_gas_srcdir/configure.in \ | |
9846 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
9847 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
9848 | if test x$gcc_cv_gas_version != x; then | |
9849 | break | |
9850 | fi | |
9851 | done | |
9852 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
9853 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
9854 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
9855 | case $gcc_cv_gas_patch_version in |
9856 | "") gcc_cv_gas_patch_version="0" ;; | |
9857 | esac | |
8ada417f ZW |
9858 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
9859 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
9860 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 9861 | |
f9c1196a ZW |
9862 | rm -f as$host_exeext |
9863 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
5408ac6c HPN |
9864 | in_tree_gas_is_elf=no |
9865 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
9866 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
9867 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
9868 | then | |
9869 | in_tree_gas_is_elf=yes | |
9870 | fi | |
08d105fa AO |
9871 | elif test -x "$AS_FOR_TARGET"; then |
9872 | gcc_cv_as="$AS_FOR_TARGET" | |
9873 | elif test -x "$AS" && test x$host = x$target; then | |
9874 | gcc_cv_as="$AS" | |
981d4858 | 9875 | fi |
9e423e6d | 9876 | |
534d0cc0 | 9877 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
9878 | # Search the same directories that the installed compiler will |
9879 | # search. Else we may find the wrong assembler and lose. If we | |
9880 | # do not find a suitable assembler binary, then try the user's | |
9881 | # path. | |
9882 | # | |
9883 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
9884 | # user's path. Unfortunately, there is no good way to get at the | |
9885 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
9886 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
9887 | # to be fixed as part of the make/configure rewrite too. | |
9888 | ||
9889 | if test "x$exec_prefix" = xNONE; then | |
9890 | if test "x$prefix" = xNONE; then | |
9891 | test_prefix=/usr/local | |
9892 | else | |
9893 | test_prefix=$prefix | |
9894 | fi | |
9895 | else | |
9896 | test_prefix=$exec_prefix | |
9897 | fi | |
9898 | ||
9899 | # If the loop below does not find an assembler, then use whatever | |
9900 | # one we can find in the users's path. | |
9901 | # user's path. | |
55a2ea2a AM |
9902 | if test "x$program_prefix" != xNONE; then |
9903 | gcc_cv_as=${program_prefix}as$host_exeext | |
9904 | else | |
9c56033f | 9905 | gcc_cv_as=`echo as | sed "${program_transform_name}"`$host_exeext |
55a2ea2a AM |
9906 | fi |
9907 | ||
19baba0b RO |
9908 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ |
9909 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
caa55b1e NN |
9910 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ |
9911 | /usr/lib/gcc/$target_noncanonical \ | |
9912 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
9913 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
9914 | |
9915 | if test x$host = x$target; then | |
9916 | test_dirs="$test_dirs \ | |
779243f7 JL |
9917 | /usr/libexec \ |
9918 | /usr/ccs/gcc \ | |
9919 | /usr/ccs/bin \ | |
9920 | /udk/usr/ccs/bin \ | |
9921 | /bsd43/usr/lib/cmplrs/cc \ | |
9922 | /usr/cross64/usr/bin \ | |
9923 | /usr/lib/cmplrs/cc \ | |
9924 | /sysv/usr/lib/cmplrs/cc \ | |
9925 | /svr4/usr/lib/cmplrs/cc \ | |
9926 | /usr/bin" | |
55a2ea2a | 9927 | fi |
779243f7 JL |
9928 | |
9929 | for dir in $test_dirs; do | |
55a2ea2a | 9930 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
9931 | gcc_cv_as=$dir/as$host_exeext |
9932 | break; | |
9933 | fi | |
9934 | done | |
9e423e6d | 9935 | fi |
34a86c2b NN |
9936 | case $in_tree_gas in |
9937 | yes) | |
ba479fd2 NN |
9938 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
9939 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
9940 | ;; |
9941 | no) | |
ba479fd2 NN |
9942 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
9943 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
9944 | ;; |
9945 | esac | |
981d4858 | 9946 | |
d869a8c4 NN |
9947 | # Identify the linker which will work hand-in-glove with the newly |
9948 | # built GCC, so that we can examine its features. This is the linker | |
9949 | # which will be driven by the driver program. | |
9950 | # | |
9951 | # If build != host, and we aren't building gas in-tree, we identify a | |
9952 | # build->target linker and hope that it will have the same features | |
9953 | # as the host->target linker we'll be using. | |
ba479fd2 NN |
9954 | echo "$as_me:$LINENO: checking what linker to use" >&5 |
9955 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b | 9956 | in_tree_ld=no |
275b60d6 JJ |
9957 | gcc_cv_ld= |
9958 | gcc_cv_gld_major_version= | |
9959 | gcc_cv_gld_minor_version= | |
9960 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
9961 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9962 | if test -x "$DEFAULT_LINKER"; then | |
9963 | gcc_cv_ld="$DEFAULT_LINKER" | |
f9c1196a | 9964 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 9965 | # Build using linker in the current directory. |
f9c1196a | 9966 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b | 9967 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
9968 | && test -f ../ld/Makefile \ |
9969 | && test x$build = x$host; then | |
9970 | # Single tree build which includes ld. We want to prefer it | |
9971 | # over whatever linker top-level may have detected, since | |
9972 | # we'll use what we're building after installation anyway. | |
34a86c2b | 9973 | in_tree_ld=yes |
5408ac6c HPN |
9974 | in_tree_ld_is_elf=no |
9975 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
9976 | || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then | |
9977 | in_tree_ld_is_elf=yes | |
9978 | fi | |
275b60d6 JJ |
9979 | 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 |
9980 | do | |
9981 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
9982 | if test x$gcc_cv_gld_version != x; then | |
9983 | break | |
9984 | fi | |
9985 | done | |
9986 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
9987 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
9988 | rm -f collect-ld$host_exeext |
9989 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
9990 | 2>/dev/null | |
08d105fa AO |
9991 | elif test -x "$LD_FOR_TARGET"; then |
9992 | gcc_cv_ld="$LD_FOR_TARGET" | |
9993 | elif test -x "$LD" && test x$host = x$target; then | |
9994 | gcc_cv_ld="$LD" | |
275b60d6 JJ |
9995 | fi |
9996 | ||
534d0cc0 | 9997 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
9998 | # Search the same directories that the installed compiler will |
9999 | # search. Else we may find the wrong linker and lose. If we | |
10000 | # do not find a suitable linker binary, then try the user's | |
10001 | # path. | |
10002 | # | |
10003 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
10004 | # user's path. Unfortunately, there is no good way to get at the | |
10005 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
10006 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
10007 | # to be fixed as part of the make/configure rewrite too. | |
10008 | ||
10009 | if test "x$exec_prefix" = xNONE; then | |
10010 | if test "x$prefix" = xNONE; then | |
10011 | test_prefix=/usr/local | |
10012 | else | |
10013 | test_prefix=$prefix | |
10014 | fi | |
10015 | else | |
10016 | test_prefix=$exec_prefix | |
10017 | fi | |
10018 | ||
10019 | # If the loop below does not find an linker, then use whatever | |
10020 | # one we can find in the users's path. | |
10021 | # user's path. | |
55a2ea2a AM |
10022 | if test "x$program_prefix" != xNONE; then |
10023 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
10024 | else | |
9c56033f | 10025 | gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$host_exeext |
55a2ea2a AM |
10026 | fi |
10027 | ||
19baba0b RO |
10028 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ |
10029 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
caa55b1e NN |
10030 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ |
10031 | /usr/lib/gcc/$target_noncanonical \ | |
10032 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
10033 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
10034 | |
10035 | if test x$host = x$target; then | |
10036 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
10037 | /usr/libexec \ |
10038 | /usr/ccs/gcc \ | |
10039 | /usr/ccs/bin \ | |
10040 | /udk/usr/ccs/bin \ | |
10041 | /bsd43/usr/lib/cmplrs/cc \ | |
10042 | /usr/cross64/usr/bin \ | |
10043 | /usr/lib/cmplrs/cc \ | |
10044 | /sysv/usr/lib/cmplrs/cc \ | |
10045 | /svr4/usr/lib/cmplrs/cc \ | |
10046 | /usr/bin" | |
55a2ea2a | 10047 | fi |
275b60d6 JJ |
10048 | |
10049 | for dir in $test_dirs; do | |
55a2ea2a | 10050 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
10051 | gcc_cv_ld=$dir/ld$host_exeext |
10052 | break; | |
10053 | fi | |
10054 | done | |
10055 | fi | |
34a86c2b NN |
10056 | case $in_tree_ld in |
10057 | yes) | |
ba479fd2 NN |
10058 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
10059 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
10060 | ;; |
10061 | no) | |
ba479fd2 NN |
10062 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
10063 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
10064 | ;; |
10065 | esac | |
275b60d6 | 10066 | |
981d4858 | 10067 | # Figure out what nm we will be using. |
f9c1196a | 10068 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
ba479fd2 NN |
10069 | echo "$as_me:$LINENO: checking what nm to use" >&5 |
10070 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 10071 | in_tree_nm=no |
981d4858 JM |
10072 | if test -x nm$host_exeext; then |
10073 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
10074 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
10075 | && test -f ../binutils/Makefile; then | |
10076 | # Single tree build which includes binutils. | |
10077 | in_tree_nm=yes | |
10078 | gcc_cv_nm=./nm$host_exeext | |
10079 | rm -f nm$host_exeext | |
10080 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
10081 | elif test "x$program_prefix" != xNONE; then |
10082 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
10083 | else | |
9c56033f | 10084 | gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$host_exeext |
981d4858 | 10085 | fi |
f9c1196a | 10086 | case $in_tree_nm in |
ba479fd2 NN |
10087 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
10088 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
10089 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
10090 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 10091 | esac |
981d4858 | 10092 | |
3cae5780 | 10093 | # Figure out what objdump we will be using. |
ba479fd2 NN |
10094 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
10095 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 10096 | in_tree_objdump=no |
3cae5780 AS |
10097 | if test -x objdump$host_exeext; then |
10098 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
10099 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
10100 | && test -f ../binutils/Makefile; then | |
10101 | # Single tree build which includes binutils. | |
10102 | in_tree_objdump=yes | |
10103 | gcc_cv_objdump=./objdump$host_exeext | |
10104 | rm -f objdump$host_exeext | |
10105 | $symbolic_link ../binutils/objdump$host_exeext \ | |
10106 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
10107 | elif test "x$program_prefix" != xNONE; then |
10108 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
10109 | else | |
f9c1196a | 10110 | gcc_cv_objdump=`echo objdump | \ |
9c56033f | 10111 | sed "${program_transform_name}"`$host_exeext |
3cae5780 | 10112 | fi |
f9c1196a | 10113 | case $in_tree_objdump in |
ba479fd2 NN |
10114 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
10115 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
10116 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
10117 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 10118 | esac |
3cae5780 | 10119 | |
981d4858 | 10120 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
10121 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
10122 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
10123 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
10124 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10125 | else |
10126 | gcc_cv_as_balign_and_p2align=no | |
10127 | if test $in_tree_gas = yes; then | |
10128 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
10129 | then gcc_cv_as_balign_and_p2align=yes | |
10130 | fi | |
10131 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10132 | echo '.balign 4 |
8ada417f | 10133 | .p2align 2' > conftest.s |
ba479fd2 NN |
10134 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10135 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10136 | (eval $ac_try) 2>&5 | |
10137 | ac_status=$? | |
10138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10139 | (exit $ac_status); }; } | |
8ada417f ZW |
10140 | then |
10141 | gcc_cv_as_balign_and_p2align=yes | |
10142 | else | |
10143 | echo "configure: failed program was" >&5 | |
10144 | cat conftest.s >&5 | |
10145 | fi | |
10146 | rm -f conftest.o conftest.s | |
10147 | fi | |
10148 | fi | |
ba479fd2 NN |
10149 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
10150 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 10151 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
10152 | |
10153 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10154 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 10155 | _ACEOF |
981d4858 | 10156 | |
ad9c4d9f NN |
10157 | fi |
10158 | ||
ba479fd2 NN |
10159 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
10160 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
10161 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
10162 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10163 | else |
10164 | gcc_cv_as_max_skip_p2align=no | |
10165 | if test $in_tree_gas = yes; then | |
10166 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
10167 | then gcc_cv_as_max_skip_p2align=yes | |
10168 | fi | |
10169 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10170 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
10171 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10173 | (eval $ac_try) 2>&5 | |
10174 | ac_status=$? | |
10175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10176 | (exit $ac_status); }; } | |
8ada417f ZW |
10177 | then |
10178 | gcc_cv_as_max_skip_p2align=yes | |
10179 | else | |
10180 | echo "configure: failed program was" >&5 | |
10181 | cat conftest.s >&5 | |
10182 | fi | |
10183 | rm -f conftest.o conftest.s | |
10184 | fi | |
ad9c4d9f | 10185 | fi |
ba479fd2 NN |
10186 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
10187 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 10188 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
10189 | |
10190 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 10191 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 10192 | _ACEOF |
9e423e6d | 10193 | |
9e423e6d | 10194 | fi |
ad9c4d9f | 10195 | |
ba479fd2 NN |
10196 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
10197 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
10198 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
10199 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10200 | else |
10201 | gcc_cv_as_subsection_m1=no | |
10202 | if test $in_tree_gas = yes; then | |
10203 | if test $in_tree_gas_is_elf = yes \ | |
10204 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
10205 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 10206 | fi |
8ada417f | 10207 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10208 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
10209 | .subsection -1 |
10210 | conftest_label2: .word 0 | |
8ada417f | 10211 | .previous' > conftest.s |
ba479fd2 NN |
10212 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10213 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10214 | (eval $ac_try) 2>&5 | |
10215 | ac_status=$? | |
10216 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10217 | (exit $ac_status); }; } | |
8ada417f ZW |
10218 | then |
10219 | if test x$gcc_cv_nm != x; then | |
10220 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
10221 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
10222 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
10223 | then : | |
10224 | else gcc_cv_as_subsection_m1=yes | |
10225 | fi | |
10226 | rm -f conftest.nm1 conftest.nm2 | |
10227 | fi | |
10228 | else | |
10229 | echo "configure: failed program was" >&5 | |
10230 | cat conftest.s >&5 | |
10231 | fi | |
10232 | rm -f conftest.o conftest.s | |
10233 | fi | |
981d4858 | 10234 | fi |
ba479fd2 NN |
10235 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
10236 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 10237 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
10238 | |
10239 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10240 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 10241 | _ACEOF |
981d4858 | 10242 | |
d1accaa3 | 10243 | fi |
ad9c4d9f | 10244 | |
ba479fd2 NN |
10245 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
10246 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
10247 | if test "${gcc_cv_as_weak+set}" = set; then | |
10248 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10249 | else |
10250 | gcc_cv_as_weak=no | |
10251 | if test $in_tree_gas = yes; then | |
10252 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
10253 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 10254 | fi |
8ada417f | 10255 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10256 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
10257 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10258 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10259 | (eval $ac_try) 2>&5 | |
10260 | ac_status=$? | |
10261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10262 | (exit $ac_status); }; } | |
8ada417f ZW |
10263 | then |
10264 | gcc_cv_as_weak=yes | |
10265 | else | |
10266 | echo "configure: failed program was" >&5 | |
10267 | cat conftest.s >&5 | |
10268 | fi | |
10269 | rm -f conftest.o conftest.s | |
10270 | fi | |
981d4858 | 10271 | fi |
ba479fd2 NN |
10272 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
10273 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 10274 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
10275 | |
10276 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10277 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 10278 | _ACEOF |
981d4858 | 10279 | |
12822146 | 10280 | fi |
ad9c4d9f | 10281 | |
8ada417f ZW |
10282 | # .hidden needs to be supported in both the assembler and the linker, |
10283 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
10284 | # This is irritatingly difficult to feature test for; we have to check the | |
10285 | # date string after the version number. If we've got an in-tree | |
10286 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
10287 | # to be safe. | |
10288 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
10289 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
10290 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
10291 | if test "${gcc_cv_as_hidden+set}" = set; then | |
10292 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10293 | else |
10294 | gcc_cv_as_hidden=no | |
10295 | if test $in_tree_gas = yes; then | |
10296 | if test $in_tree_gas_is_elf = yes \ | |
10297 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
10298 | then gcc_cv_as_hidden=yes | |
10299 | fi | |
10300 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10301 | echo ' .hidden foobar |
8ada417f | 10302 | foobar:' > conftest.s |
ba479fd2 NN |
10303 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10304 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10305 | (eval $ac_try) 2>&5 | |
10306 | ac_status=$? | |
10307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10308 | (exit $ac_status); }; } | |
8ada417f ZW |
10309 | then |
10310 | gcc_cv_as_hidden=yes | |
10311 | else | |
10312 | echo "configure: failed program was" >&5 | |
10313 | cat conftest.s >&5 | |
10314 | fi | |
10315 | rm -f conftest.o conftest.s | |
10316 | fi | |
10317 | fi | |
ba479fd2 NN |
10318 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
10319 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 10320 | |
ad9c4d9f | 10321 | |
ba479fd2 NN |
10322 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
10323 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
10324 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
10325 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10326 | else |
10327 | if test $in_tree_ld = yes ; then | |
10328 | gcc_cv_ld_hidden=no | |
10329 | 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 \ | |
10330 | && test $in_tree_ld_is_elf = yes; then | |
10331 | gcc_cv_ld_hidden=yes | |
10332 | fi | |
10333 | else | |
10334 | gcc_cv_ld_hidden=yes | |
bace148a | 10335 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
10336 | if echo "$ld_ver" | grep GNU > /dev/null; then |
10337 | ld_vers=`echo $ld_ver | sed -n \ | |
10338 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10339 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10340 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10341 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
10342 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
10343 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
10344 | 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'` | |
10345 | if test 0"$ld_date" -lt 20020404; then | |
10346 | if test -n "$ld_date"; then | |
10347 | # If there was date string, but was earlier than 2002-04-04, fail | |
10348 | gcc_cv_ld_hidden=no | |
10349 | elif test -z "$ld_vers"; then | |
10350 | # If there was no date string nor ld version number, something is wrong | |
10351 | gcc_cv_ld_hidden=no | |
10352 | else | |
10353 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
10354 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
10355 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
10356 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
10357 | if test "$ld_vers_major" -lt 2; then | |
10358 | gcc_cv_ld_hidden=no | |
10359 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
10360 | gcc_cv_ld_hidden="no" | |
10361 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
10362 | gcc_cv_ld_hidden=no | |
c72931a6 | 10363 | fi |
8ada417f | 10364 | fi |
789b7de5 | 10365 | fi |
8ada417f | 10366 | else |
28690784 | 10367 | case "${target}" in |
b0fd7d27 | 10368 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
10369 | gcc_cv_ld_hidden=yes |
10370 | ;; | |
10371 | *) | |
10372 | gcc_cv_ld_hidden=no | |
10373 | ;; | |
10374 | esac | |
8ada417f ZW |
10375 | fi |
10376 | fi | |
6d07784a | 10377 | fi |
ba479fd2 NN |
10378 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
10379 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 10380 | libgcc_visibility=no |
ad9c4d9f | 10381 | |
8e3940b2 | 10382 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 10383 | libgcc_visibility=yes |
ba479fd2 NN |
10384 | |
10385 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10386 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 10387 | _ACEOF |
ad9c4d9f NN |
10388 | |
10389 | fi | |
10390 | ||
8ada417f | 10391 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
10392 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
10393 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
10394 | if test "${gcc_cv_as_leb128+set}" = set; then | |
10395 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10396 | else |
10397 | gcc_cv_as_leb128=no | |
10398 | if test $in_tree_gas = yes; then | |
10399 | if test $in_tree_gas_is_elf = yes \ | |
10400 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
10401 | then gcc_cv_as_leb128=yes | |
10402 | fi | |
10403 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10404 | echo ' .data |
b7460f24 RH |
10405 | .uleb128 L2 - L1 |
10406 | L1: | |
10407 | .uleb128 1280 | |
10408 | .sleb128 -1010 | |
8ada417f | 10409 | L2:' > conftest.s |
ba479fd2 NN |
10410 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10412 | (eval $ac_try) 2>&5 | |
10413 | ac_status=$? | |
10414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10415 | (exit $ac_status); }; } | |
8ada417f ZW |
10416 | then |
10417 | # GAS versions before 2.11 do not support uleb128, | |
10418 | # despite appearing to. | |
10419 | # ??? There exists an elf-specific test that will crash | |
10420 | # the assembler. Perhaps it's better to figure out whether | |
10421 | # arbitrary sections are supported and try the test. | |
bace148a | 10422 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
10423 | if echo "$as_ver" | grep GNU > /dev/null; then |
10424 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
10425 | as_major=`echo $as_ver | sed 's/\..*//'` | |
10426 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
10427 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
10428 | then : | |
10429 | else gcc_cv_as_leb128=yes | |
10430 | fi | |
10431 | fi | |
10432 | else | |
10433 | echo "configure: failed program was" >&5 | |
10434 | cat conftest.s >&5 | |
10435 | fi | |
10436 | rm -f conftest.o conftest.s | |
10437 | fi | |
b7460f24 | 10438 | fi |
ba479fd2 NN |
10439 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
10440 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 10441 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
10442 | |
10443 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 10444 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 10445 | _ACEOF |
b7460f24 RH |
10446 | |
10447 | fi | |
ad9c4d9f | 10448 | |
8ada417f ZW |
10449 | # GAS versions up to and including 2.11.0 may mis-optimize |
10450 | # .eh_frame data. | |
ba479fd2 NN |
10451 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
10452 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
10453 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
10454 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10455 | else |
10456 | gcc_cv_as_eh_frame=no | |
10457 | if test $in_tree_gas = yes; then | |
10458 | if test $in_tree_gas_is_elf = yes \ | |
10459 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10460 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 10461 | fi |
8ada417f | 10462 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10463 | echo ' .text |
c64688ae RH |
10464 | .LFB1: |
10465 | .4byte 0 | |
10466 | .L1: | |
10467 | .4byte 0 | |
10468 | .LFE1: | |
10469 | .section .eh_frame,"aw",@progbits | |
10470 | __FRAME_BEGIN__: | |
10471 | .4byte .LECIE1-.LSCIE1 | |
10472 | .LSCIE1: | |
10473 | .4byte 0x0 | |
10474 | .byte 0x1 | |
10475 | .ascii "z\0" | |
10476 | .byte 0x1 | |
10477 | .byte 0x78 | |
10478 | .byte 0x1a | |
10479 | .byte 0x0 | |
10480 | .byte 0x4 | |
10481 | .4byte 1 | |
10482 | .p2align 1 | |
10483 | .LECIE1: | |
10484 | .LSFDE1: | |
10485 | .4byte .LEFDE1-.LASFDE1 | |
10486 | .LASFDE1: | |
10487 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
10488 | .4byte .LFB1 | |
10489 | .4byte .LFE1-.LFB1 | |
10490 | .byte 0x4 | |
10491 | .4byte .LFE1-.LFB1 | |
10492 | .byte 0x4 | |
10493 | .4byte .L1-.LFB1 | |
8ada417f | 10494 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
10495 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10497 | (eval $ac_try) 2>&5 | |
10498 | ac_status=$? | |
10499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10500 | (exit $ac_status); }; } | |
8ada417f ZW |
10501 | then |
10502 | cat > conftest.lit <<EOF | |
c64688ae RH |
10503 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
10504 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 10505 | 0020 08000000 04080000 0044 .........D |
01efb963 | 10506 | EOF |
ba479fd2 | 10507 | cat > conftest.big <<EOF |
01efb963 AS |
10508 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
10509 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 10510 | 0020 00000008 04000000 0844 .........D |
c64688ae | 10511 | EOF |
8ada417f ZW |
10512 | # If the assembler didn't choke, and we can objdump, |
10513 | # and we got the correct data, then succeed. | |
10514 | if test x$gcc_cv_objdump != x \ | |
10515 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
10516 | | tail -3 > conftest.got \ | |
10517 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
10518 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
10519 | then | |
10520 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
10521 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
10522 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10523 | (eval $ac_try) 2>&5 | |
10524 | ac_status=$? | |
10525 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10526 | (exit $ac_status); }; }; then | |
8ada417f ZW |
10527 | gcc_cv_as_eh_frame=buggy |
10528 | else | |
10529 | # Uh oh, what do we do now? | |
10530 | gcc_cv_as_eh_frame=no | |
10531 | fi | |
10532 | else | |
10533 | echo "configure: failed program was" >&5 | |
10534 | cat conftest.s >&5 | |
10535 | fi | |
10536 | rm -f conftest.o conftest.s | |
10537 | fi | |
c64688ae | 10538 | fi |
ba479fd2 NN |
10539 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
10540 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 10541 | |
6e3f3080 | 10542 | |
63cf211a | 10543 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
10544 | |
10545 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10546 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 10547 | _ACEOF |
ad9c4d9f NN |
10548 | |
10549 | fi | |
10550 | ||
ba479fd2 NN |
10551 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
10552 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
10553 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
10554 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10555 | else |
10556 | gcc_cv_as_shf_merge=no | |
10557 | if test $in_tree_gas = yes; then | |
10558 | if test $in_tree_gas_is_elf = yes \ | |
10559 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10560 | then gcc_cv_as_shf_merge=yes | |
10561 | fi | |
10562 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10563 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
10564 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
10565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10566 | (eval $ac_try) 2>&5 | |
10567 | ac_status=$? | |
10568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10569 | (exit $ac_status); }; } | |
8ada417f ZW |
10570 | then |
10571 | gcc_cv_as_shf_merge=yes | |
10572 | else | |
10573 | echo "configure: failed program was" >&5 | |
10574 | cat conftest.s >&5 | |
10575 | fi | |
10576 | rm -f conftest.o conftest.s | |
10577 | fi | |
201556f0 | 10578 | fi |
ba479fd2 NN |
10579 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
10580 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 10581 | |
8ad9fb33 | 10582 | |
ba479fd2 | 10583 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 10584 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 10585 | _ACEOF |
201556f0 | 10586 | |
201556f0 | 10587 | |
8ada417f | 10588 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
10589 | conftest_s= |
10590 | tls_first_major= | |
10591 | tls_first_minor= | |
9739c90c | 10592 | tls_as_opt= |
f996902d | 10593 | case "$target" in |
6f9b006d RH |
10594 | alpha*-*-*) |
10595 | conftest_s=' | |
10596 | .section ".tdata","awT",@progbits | |
10597 | foo: .long 25 | |
10598 | .text | |
10599 | ldq $27,__tls_get_addr($29) !literal!1 | |
10600 | lda $16,foo($29) !tlsgd!1 | |
10601 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
10602 | ldq $27,__tls_get_addr($29) !literal!2 | |
10603 | lda $16,foo($29) !tlsldm!2 | |
10604 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
10605 | ldq $1,foo($29) !gotdtprel | |
10606 | ldah $2,foo($29) !dtprelhi | |
10607 | lda $3,foo($2) !dtprello | |
10608 | lda $4,foo($29) !dtprel | |
10609 | ldq $1,foo($29) !gottprel | |
10610 | ldah $2,foo($29) !tprelhi | |
10611 | lda $3,foo($2) !tprello | |
10612 | lda $4,foo($29) !tprel' | |
10613 | tls_first_major=2 | |
10614 | tls_first_minor=13 | |
2f3321ca | 10615 | tls_as_opt=--fatal-warnings |
6f9b006d | 10616 | ;; |
f996902d RH |
10617 | i[34567]86-*-*) |
10618 | conftest_s=' | |
10619 | .section ".tdata","awT",@progbits | |
10620 | foo: .long 25 | |
10621 | .text | |
10622 | movl %gs:0, %eax | |
10623 | leal foo@TLSGD(,%ebx,1), %eax | |
10624 | leal foo@TLSLDM(%ebx), %eax | |
10625 | leal foo@DTPOFF(%eax), %edx | |
10626 | movl foo@GOTTPOFF(%ebx), %eax | |
10627 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
10628 | addl foo@GOTNTPOFF(%ebx), %eax |
10629 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
10630 | movl $foo@TPOFF, %eax |
10631 | subl $foo@TPOFF, %eax | |
10632 | leal foo@NTPOFF(%ecx), %eax' | |
10633 | tls_first_major=2 | |
75d38379 | 10634 | tls_first_minor=14 |
2f3321ca | 10635 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
10636 | ;; |
10637 | x86_64-*-*) | |
10638 | conftest_s=' | |
10639 | .section ".tdata","awT",@progbits | |
10640 | foo: .long 25 | |
10641 | .text | |
10642 | movq %fs:0, %rax | |
10643 | leaq foo@TLSGD(%rip), %rdi | |
10644 | leaq foo@TLSLD(%rip), %rdi | |
10645 | leaq foo@DTPOFF(%rax), %rdx | |
10646 | movq foo@GOTTPOFF(%rip), %rax | |
10647 | movq $foo@TPOFF, %rax' | |
10648 | tls_first_major=2 | |
10649 | tls_first_minor=14 | |
2f3321ca | 10650 | tls_as_opt=--fatal-warnings |
f996902d | 10651 | ;; |
7b6e506e RH |
10652 | ia64-*-*) |
10653 | conftest_s=' | |
10654 | .section ".tdata","awT",@progbits | |
10655 | foo: data8 25 | |
10656 | .text | |
10657 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
10658 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
10659 | addl r18 = @ltoff(@tprel(foo#)), gp | |
10660 | addl r19 = @dtprel(foo#), gp | |
10661 | adds r21 = @dtprel(foo#), r13 | |
10662 | movl r23 = @dtprel(foo#) | |
10663 | addl r20 = @tprel(foo#), gp | |
10664 | adds r22 = @tprel(foo#), r13 | |
10665 | movl r24 = @tprel(foo#)' | |
10666 | tls_first_major=2 | |
10667 | tls_first_minor=13 | |
2f3321ca | 10668 | tls_as_opt=--fatal-warnings |
7b6e506e | 10669 | ;; |
c4501e62 JJ |
10670 | powerpc-*-*) |
10671 | conftest_s=' | |
10672 | .section ".tdata","awT",@progbits | |
10673 | .align 2 | |
10674 | ld0: .space 4 | |
10675 | ld1: .space 4 | |
10676 | x1: .space 4 | |
10677 | x2: .space 4 | |
10678 | x3: .space 4 | |
10679 | .text | |
10680 | addi 3,31,ld0@got@tlsgd | |
10681 | bl __tls_get_addr | |
10682 | addi 3,31,x1@got@tlsld | |
10683 | bl __tls_get_addr | |
10684 | addi 9,3,x1@dtprel | |
10685 | addis 9,3,x2@dtprel@ha | |
10686 | addi 9,9,x2@dtprel@l | |
10687 | lwz 9,x3@got@tprel(31) | |
10688 | add 9,9,x@tls | |
10689 | addi 9,2,x1@tprel | |
10690 | addis 9,2,x2@tprel@ha | |
10691 | addi 9,9,x2@tprel@l' | |
10692 | tls_first_major=2 | |
10693 | tls_first_minor=14 | |
2f3321ca | 10694 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
10695 | ;; |
10696 | powerpc64-*-*) | |
10697 | conftest_s=' | |
10698 | .section ".tdata","awT",@progbits | |
10699 | .align 3 | |
10700 | ld0: .space 8 | |
10701 | ld1: .space 8 | |
10702 | x1: .space 8 | |
10703 | x2: .space 8 | |
10704 | x3: .space 8 | |
10705 | .text | |
10706 | addi 3,2,ld0@got@tlsgd | |
10707 | bl .__tls_get_addr | |
10708 | nop | |
10709 | addi 3,2,ld1@toc | |
10710 | bl .__tls_get_addr | |
10711 | nop | |
10712 | addi 3,2,x1@got@tlsld | |
10713 | bl .__tls_get_addr | |
10714 | nop | |
10715 | addi 9,3,x1@dtprel | |
10716 | bl .__tls_get_addr | |
10717 | nop | |
10718 | addis 9,3,x2@dtprel@ha | |
10719 | addi 9,9,x2@dtprel@l | |
10720 | bl .__tls_get_addr | |
10721 | nop | |
10722 | ld 9,x3@got@dtprel(2) | |
10723 | add 9,9,3 | |
10724 | bl .__tls_get_addr | |
10725 | nop' | |
10726 | tls_first_major=2 | |
10727 | tls_first_minor=14 | |
2f3321ca | 10728 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 10729 | ;; |
fd3cd001 UW |
10730 | s390-*-*) |
10731 | conftest_s=' | |
10732 | .section ".tdata","awT",@progbits | |
10733 | foo: .long 25 | |
10734 | .text | |
10735 | .long foo@TLSGD | |
10736 | .long foo@TLSLDM | |
10737 | .long foo@DTPOFF | |
10738 | .long foo@NTPOFF | |
10739 | .long foo@GOTNTPOFF | |
10740 | .long foo@INDNTPOFF | |
10741 | l %r1,foo@GOTNTPOFF(%r12) | |
10742 | l %r1,0(%r1):tls_load:foo | |
10743 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
10744 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
10745 | tls_first_major=2 | |
10746 | tls_first_minor=14 | |
2f3321ca | 10747 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
10748 | ;; |
10749 | s390x-*-*) | |
10750 | conftest_s=' | |
10751 | .section ".tdata","awT",@progbits | |
10752 | foo: .long 25 | |
10753 | .text | |
10754 | .quad foo@TLSGD | |
10755 | .quad foo@TLSLDM | |
10756 | .quad foo@DTPOFF | |
10757 | .quad foo@NTPOFF | |
10758 | .quad foo@GOTNTPOFF | |
10759 | lg %r1,foo@GOTNTPOFF(%r12) | |
10760 | larl %r1,foo@INDNTPOFF | |
10761 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
10762 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
10763 | tls_first_major=2 | |
10764 | tls_first_minor=14 | |
2f3321ca | 10765 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 10766 | ;; |
9ff13962 KK |
10767 | sh-*-* | sh[34]-*-*) |
10768 | conftest_s=' | |
10769 | .section ".tdata","awT",@progbits | |
10770 | foo: .long 25 | |
10771 | .text | |
10772 | .long foo@TLSGD | |
10773 | .long foo@TLSLDM | |
10774 | .long foo@DTPOFF | |
10775 | .long foo@GOTTPOFF | |
10776 | .long foo@TPOFF' | |
10777 | tls_first_major=2 | |
10778 | tls_first_minor=13 | |
2f3321ca | 10779 | tls_as_opt=--fatal-warnings |
9ff13962 | 10780 | ;; |
5751a10b | 10781 | sparc*-*-*) |
2f3321ca EB |
10782 | case "$target" in |
10783 | sparc*-sun-solaris2.*) | |
10784 | on_solaris=yes | |
10785 | ;; | |
10786 | *) | |
10787 | on_solaris=no | |
10788 | ;; | |
10789 | esac | |
10790 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
10791 | conftest_s=' | |
10792 | .section ".tdata",#alloc,#write,#tls | |
10793 | foo: .long 25 | |
10794 | .text | |
10795 | sethi %tgd_hi22(foo), %o0 | |
10796 | add %o0, %tgd_lo10(foo), %o1 | |
10797 | add %l7, %o1, %o0, %tgd_add(foo) | |
10798 | call __tls_get_addr, %tgd_call(foo) | |
10799 | sethi %tldm_hi22(foo), %l1 | |
10800 | add %l1, %tldm_lo10(foo), %l2 | |
10801 | add %l7, %l2, %o0, %tldm_add(foo) | |
10802 | call __tls_get_addr, %tldm_call(foo) | |
10803 | sethi %tldo_hix22(foo), %l3 | |
10804 | xor %l3, %tldo_lox10(foo), %l4 | |
10805 | add %o0, %l4, %l5, %tldo_add(foo) | |
10806 | sethi %tie_hi22(foo), %o3 | |
10807 | add %o3, %tie_lo10(foo), %o3 | |
10808 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
10809 | add %g7, %o2, %o4, %tie_add(foo) | |
10810 | sethi %tle_hix22(foo), %l1 | |
10811 | xor %l1, %tle_lox10(foo), %o5 | |
10812 | ld [%g7 + %o5], %o1' | |
10813 | tls_first_major=0 | |
10814 | tls_first_minor=0 | |
10815 | else | |
10816 | conftest_s=' | |
5751a10b JJ |
10817 | .section ".tdata","awT",@progbits |
10818 | foo: .long 25 | |
10819 | .text | |
10820 | sethi %tgd_hi22(foo), %o0 | |
10821 | add %o0, %tgd_lo10(foo), %o1 | |
10822 | add %l7, %o1, %o0, %tgd_add(foo) | |
10823 | call __tls_get_addr, %tgd_call(foo) | |
10824 | sethi %tldm_hi22(foo), %l1 | |
10825 | add %l1, %tldm_lo10(foo), %l2 | |
10826 | add %l7, %l2, %o0, %tldm_add(foo) | |
10827 | call __tls_get_addr, %tldm_call(foo) | |
10828 | sethi %tldo_hix22(foo), %l3 | |
10829 | xor %l3, %tldo_lox10(foo), %l4 | |
10830 | add %o0, %l4, %l5, %tldo_add(foo) | |
10831 | sethi %tie_hi22(foo), %o3 | |
10832 | add %o3, %tie_lo10(foo), %o3 | |
10833 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
10834 | add %g7, %o2, %o4, %tie_add(foo) | |
10835 | sethi %tle_hix22(foo), %l1 | |
10836 | xor %l1, %tle_lox10(foo), %o5 | |
10837 | ld [%g7 + %o5], %o1' | |
10838 | tls_first_major=2 | |
10839 | tls_first_minor=14 | |
2f3321ca EB |
10840 | tls_as_opt="-32 --fatal-warnings" |
10841 | fi | |
5751a10b | 10842 | ;; |
f996902d RH |
10843 | esac |
10844 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
10845 | : # If we don't have a check, assume no support. |
10846 | else | |
ba479fd2 NN |
10847 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
10848 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
10849 | if test "${gcc_cv_as_tls+set}" = set; then | |
10850 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10851 | else |
10852 | gcc_cv_as_tls=no | |
10853 | if test $in_tree_gas = yes; then | |
10854 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
10855 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 10856 | fi |
8ada417f | 10857 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10858 | echo "$conftest_s" > conftest.s |
2f3321ca | 10859 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
10860 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10861 | (eval $ac_try) 2>&5 | |
10862 | ac_status=$? | |
10863 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10864 | (exit $ac_status); }; } | |
8ada417f ZW |
10865 | then |
10866 | gcc_cv_as_tls=yes | |
10867 | else | |
10868 | echo "configure: failed program was" >&5 | |
10869 | cat conftest.s >&5 | |
10870 | fi | |
10871 | rm -f conftest.o conftest.s | |
f996902d | 10872 | fi |
f996902d | 10873 | fi |
ba479fd2 NN |
10874 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
10875 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 10876 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
10877 | |
10878 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 10879 | #define HAVE_AS_TLS 1 |
ba479fd2 | 10880 | _ACEOF |
f996902d RH |
10881 | |
10882 | fi | |
8ada417f ZW |
10883 | fi |
10884 | ||
10885 | # Target-specific assembler checks. | |
f996902d | 10886 | |
d594623a L |
10887 | if test x"$demangler_in_ld" = xyes; then |
10888 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
10889 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
10890 | gcc_cv_ld_demangle=no | |
10891 | if test $in_tree_ld = yes; then | |
10892 | 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 \ | |
10893 | gcc_cv_ld_demangle=yes | |
10894 | fi | |
10895 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
10896 | # Check if the GNU linker supports --demangle option | |
10897 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
10898 | gcc_cv_ld_demangle=yes | |
10899 | fi | |
10900 | fi | |
10901 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
10902 | ||
10903 | cat >>confdefs.h <<\_ACEOF | |
10904 | #define HAVE_LD_DEMANGLE 1 | |
10905 | _ACEOF | |
10906 | ||
10907 | fi | |
10908 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
10909 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
10910 | fi | |
10911 | ||
3a37b08e RH |
10912 | case "$target" in |
10913 | # All TARGET_ABI_OSF targets. | |
10914 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
10915 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
10916 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
10917 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
10918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 10919 | else |
8ada417f ZW |
10920 | gcc_cv_as_alpha_explicit_relocs=no |
10921 | if test $in_tree_gas = yes; then | |
10922 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10923 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 10924 | fi |
8ada417f | 10925 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10926 | echo ' .set nomacro |
3a37b08e RH |
10927 | .text |
10928 | extbl $3, $2, $3 !lituse_bytoff!1 | |
10929 | ldq $2, a($29) !literal!1 | |
10930 | ldq $4, b($29) !literal!2 | |
10931 | ldq_u $3, 0($2) !lituse_base!1 | |
10932 | ldq $27, f($29) !literal!5 | |
10933 | jsr $26, ($27), f !lituse_jsr!5 | |
10934 | ldah $29, 0($26) !gpdisp!3 | |
10935 | lda $0, c($29) !gprel | |
10936 | ldah $1, d($29) !gprelhigh | |
10937 | lda $1, d($1) !gprellow | |
8ada417f | 10938 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
10939 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10940 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10941 | (eval $ac_try) 2>&5 | |
10942 | ac_status=$? | |
10943 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10944 | (exit $ac_status); }; } | |
8ada417f ZW |
10945 | then |
10946 | gcc_cv_as_alpha_explicit_relocs=yes | |
10947 | else | |
10948 | echo "configure: failed program was" >&5 | |
10949 | cat conftest.s >&5 | |
10950 | fi | |
10951 | rm -f conftest.o conftest.s | |
10952 | fi | |
cafe096b | 10953 | fi |
ba479fd2 NN |
10954 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
10955 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 10956 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
10957 | |
10958 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 10959 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 10960 | _ACEOF |
3a37b08e | 10961 | |
86da66b5 HPN |
10962 | fi |
10963 | ;; | |
10964 | ||
10965 | cris-*-*) | |
10966 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
10967 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
10968 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
10969 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10970 | else | |
10971 | gcc_cv_as_cris_no_mul_bug=no | |
10972 | if test $in_tree_gas = yes; then | |
10973 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
10974 | then gcc_cv_as_cris_no_mul_bug=yes | |
10975 | fi | |
10976 | elif test x$gcc_cv_as != x; then | |
10977 | echo '.text' > conftest.s | |
10978 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
10979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10980 | (eval $ac_try) 2>&5 | |
10981 | ac_status=$? | |
10982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10983 | (exit $ac_status); }; } | |
10984 | then | |
10985 | gcc_cv_as_cris_no_mul_bug=yes | |
10986 | else | |
10987 | echo "configure: failed program was" >&5 | |
10988 | cat conftest.s >&5 | |
10989 | fi | |
10990 | rm -f conftest.o conftest.s | |
10991 | fi | |
10992 | fi | |
10993 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
10994 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
10995 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
10996 | ||
10997 | cat >>confdefs.h <<\_ACEOF | |
10998 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
10999 | _ACEOF | |
11000 | ||
8ada417f | 11001 | fi |
3a37b08e | 11002 | ;; |
8ada417f | 11003 | |
1cb36a98 | 11004 | sparc*-*-*) |
ba479fd2 NN |
11005 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
11006 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
11007 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
11008 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 11009 | else |
8ada417f ZW |
11010 | gcc_cv_as_sparc_register_op=no |
11011 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11012 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
11013 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11014 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11015 | (eval $ac_try) 2>&5 | |
11016 | ac_status=$? | |
11017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11018 | (exit $ac_status); }; } | |
8ada417f ZW |
11019 | then |
11020 | gcc_cv_as_sparc_register_op=yes | |
11021 | else | |
11022 | echo "configure: failed program was" >&5 | |
11023 | cat conftest.s >&5 | |
11024 | fi | |
11025 | rm -f conftest.o conftest.s | |
11026 | fi | |
cafe096b | 11027 | fi |
ba479fd2 NN |
11028 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
11029 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 11030 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
11031 | |
11032 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 11033 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 11034 | _ACEOF |
1cb36a98 | 11035 | |
8ada417f | 11036 | fi |
1cb36a98 | 11037 | |
ba479fd2 NN |
11038 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
11039 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
11040 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
11041 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 11042 | else |
8ada417f ZW |
11043 | gcc_cv_as_sparc_relax=no |
11044 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11045 | echo '.text' > conftest.s |
ba479fd2 NN |
11046 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
11047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11048 | (eval $ac_try) 2>&5 | |
11049 | ac_status=$? | |
11050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11051 | (exit $ac_status); }; } | |
8ada417f ZW |
11052 | then |
11053 | gcc_cv_as_sparc_relax=yes | |
11054 | else | |
11055 | echo "configure: failed program was" >&5 | |
11056 | cat conftest.s >&5 | |
11057 | fi | |
11058 | rm -f conftest.o conftest.s | |
11059 | fi | |
cafe096b | 11060 | fi |
ba479fd2 NN |
11061 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
11062 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 11063 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
11064 | |
11065 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 11066 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 11067 | _ACEOF |
e95b1e6a | 11068 | |
8ada417f | 11069 | fi |
e95b1e6a | 11070 | |
ba479fd2 NN |
11071 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
11072 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
11073 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
11074 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 11075 | else |
8ada417f ZW |
11076 | gcc_cv_as_sparc_ua_pcrel=no |
11077 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11078 | echo '.text |
8ada417f ZW |
11079 | foo: |
11080 | nop | |
11081 | .data | |
11082 | .align 4 | |
11083 | .byte 0 | |
11084 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
11085 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
11086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11087 | (eval $ac_try) 2>&5 | |
11088 | ac_status=$? | |
11089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11090 | (exit $ac_status); }; } | |
8ada417f ZW |
11091 | then |
11092 | if test x$gcc_cv_ld != x \ | |
11093 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
11094 | gcc_cv_as_sparc_ua_pcrel=yes | |
11095 | fi | |
11096 | rm -f conftest | |
11097 | else | |
11098 | echo "configure: failed program was" >&5 | |
11099 | cat conftest.s >&5 | |
11100 | fi | |
11101 | rm -f conftest.o conftest.s | |
11102 | fi | |
cafe096b | 11103 | fi |
ba479fd2 NN |
11104 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
11105 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 11106 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
11107 | |
11108 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 11109 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 11110 | _ACEOF |
17e9e88c | 11111 | |
17e9e88c | 11112 | |
ba479fd2 NN |
11113 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
11114 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
11115 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
11116 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 11117 | else |
8ada417f ZW |
11118 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
11119 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11120 | echo '.data |
8ada417f ZW |
11121 | .align 4 |
11122 | .byte 0x31 | |
11123 | .uaword %r_disp32(foo) | |
11124 | .byte 0x32, 0x33, 0x34 | |
11125 | .global foo | |
11126 | .hidden foo | |
11127 | foo: | |
11128 | .skip 4' > conftest.s | |
ba479fd2 NN |
11129 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
11130 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11131 | (eval $ac_try) 2>&5 | |
11132 | ac_status=$? | |
11133 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11134 | (exit $ac_status); }; } | |
8ada417f ZW |
11135 | then |
11136 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
11137 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
11138 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
11139 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
11140 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
11141 | | grep 'DISP32' > /dev/null 2>&1; then | |
11142 | : | |
11143 | else | |
11144 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 11145 | fi |
8ada417f ZW |
11146 | fi |
11147 | rm -f conftest | |
11148 | else | |
11149 | echo "configure: failed program was" >&5 | |
11150 | cat conftest.s >&5 | |
11151 | fi | |
11152 | rm -f conftest.o conftest.s | |
11153 | fi | |
cafe096b | 11154 | fi |
ba479fd2 NN |
11155 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
11156 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 11157 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
11158 | |
11159 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 11160 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 11161 | _ACEOF |
cf7b8b0d | 11162 | |
8ada417f | 11163 | fi |
ba479fd2 | 11164 | |
8ada417f | 11165 | fi # unaligned pcrel relocs |
cf7b8b0d | 11166 | |
ba479fd2 NN |
11167 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
11168 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
11169 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
11170 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 11171 | else |
8ada417f ZW |
11172 | gcc_cv_as_sparc_offsetable_lo10=no |
11173 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11174 | echo '.text |
8ada417f ZW |
11175 | or %g1, %lo(ab) + 12, %g1 |
11176 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
11177 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
11178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11179 | (eval $ac_try) 2>&5 | |
11180 | ac_status=$? | |
11181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11182 | (exit $ac_status); }; } | |
8ada417f ZW |
11183 | then |
11184 | if test x$gcc_cv_objdump != x \ | |
11185 | && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | |
11186 | | grep ' 82106000 82106000' > /dev/null 2>&1; then | |
11187 | gcc_cv_as_offsetable_lo10=yes | |
11188 | fi | |
11189 | else | |
11190 | echo "configure: failed program was" >&5 | |
11191 | cat conftest.s >&5 | |
11192 | fi | |
11193 | rm -f conftest.o conftest.s | |
11194 | fi | |
cafe096b | 11195 | fi |
ba479fd2 NN |
11196 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
11197 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 11198 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
11199 | |
11200 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 11201 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 11202 | _ACEOF |
1cb36a98 | 11203 | |
8ada417f | 11204 | fi |
1cb36a98 RH |
11205 | ;; |
11206 | ||
c307e6dd | 11207 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
11208 | case $target_os in |
11209 | cygwin* | pe | mingw32*) | |
11210 | # Used for DWARF 2 in PE | |
11211 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
11212 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
11213 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
11214 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11215 | else | |
11216 | gcc_cv_as_ix86_pe_secrel32=no | |
11217 | if test $in_tree_gas = yes; then | |
11218 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
11219 | then gcc_cv_as_ix86_pe_secrel32=yes | |
11220 | fi | |
11221 | elif test x$gcc_cv_as != x; then | |
11222 | echo '.text | |
11223 | foo: nop | |
11224 | .data | |
11225 | .secrel32 foo' > conftest.s | |
11226 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
11227 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11228 | (eval $ac_try) 2>&5 | |
11229 | ac_status=$? | |
11230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11231 | (exit $ac_status); }; } | |
11232 | then | |
11233 | if test x$gcc_cv_ld != x \ | |
11234 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
11235 | gcc_cv_as_ix86_pe_secrel32=yes | |
11236 | fi | |
11237 | rm -f conftest | |
11238 | else | |
11239 | echo "configure: failed program was" >&5 | |
11240 | cat conftest.s >&5 | |
11241 | fi | |
11242 | rm -f conftest.o conftest.s | |
11243 | fi | |
11244 | fi | |
11245 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
11246 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
11247 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
11248 | ||
11249 | cat >>confdefs.h <<\_ACEOF | |
11250 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
11251 | _ACEOF | |
11252 | ||
11253 | fi | |
11254 | ;; | |
11255 | esac | |
11256 | ||
ba479fd2 NN |
11257 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
11258 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
11259 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
11260 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11261 | else |
11262 | gcc_cv_as_ix86_filds_fists=no | |
11263 | if test $in_tree_gas = yes; then | |
11264 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
11265 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 11266 | fi |
8ada417f | 11267 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11268 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
11269 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11270 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11271 | (eval $ac_try) 2>&5 | |
11272 | ac_status=$? | |
11273 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11274 | (exit $ac_status); }; } | |
8ada417f ZW |
11275 | then |
11276 | gcc_cv_as_ix86_filds_fists=yes | |
11277 | else | |
11278 | echo "configure: failed program was" >&5 | |
11279 | cat conftest.s >&5 | |
981d4858 | 11280 | fi |
8ada417f ZW |
11281 | rm -f conftest.o conftest.s |
11282 | fi | |
11283 | fi | |
ba479fd2 NN |
11284 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
11285 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 11286 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
11287 | |
11288 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 11289 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 11290 | _ACEOF |
ad9c4d9f | 11291 | |
f6f5dff2 RO |
11292 | fi |
11293 | ||
ba479fd2 NN |
11294 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
11295 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
11296 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
11297 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
11298 | else |
11299 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
11300 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11301 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
11302 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11303 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11304 | (eval $ac_try) 2>&5 | |
11305 | ac_status=$? | |
11306 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11307 | (exit $ac_status); }; } | |
f6f5dff2 RO |
11308 | then |
11309 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
11310 | else | |
11311 | echo "configure: failed program was" >&5 | |
11312 | cat conftest.s >&5 | |
11313 | fi | |
11314 | rm -f conftest.o conftest.s | |
11315 | fi | |
11316 | fi | |
ba479fd2 NN |
11317 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
11318 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 11319 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
11320 | |
11321 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 11322 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 11323 | _ACEOF |
f6f5dff2 | 11324 | |
ad9c4d9f NN |
11325 | fi |
11326 | ||
6f3ca281 ZW |
11327 | # This one is used unconditionally by i386.[ch]; it is to be defined |
11328 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
11329 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
11330 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
11331 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
11332 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11333 | else |
11334 | gcc_cv_as_ix86_gotoff_in_data=no | |
11335 | if test $in_tree_gas = yes; then | |
11336 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11337 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
11338 | fi | |
11339 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11340 | echo ' .text |
f88c65f7 RH |
11341 | .L0: |
11342 | nop | |
11343 | .data | |
8ada417f | 11344 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
11345 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11346 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11347 | (eval $ac_try) 2>&5 | |
11348 | ac_status=$? | |
11349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11350 | (exit $ac_status); }; } | |
8ada417f ZW |
11351 | then |
11352 | gcc_cv_as_ix86_gotoff_in_data=yes | |
11353 | else | |
11354 | echo "configure: failed program was" >&5 | |
11355 | cat conftest.s >&5 | |
f88c65f7 | 11356 | fi |
8ada417f ZW |
11357 | rm -f conftest.o conftest.s |
11358 | fi | |
11359 | fi | |
ba479fd2 NN |
11360 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
11361 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 11362 | |
6f3ca281 | 11363 | |
ba479fd2 | 11364 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 11365 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 11366 | _ACEOF |
f88c65f7 | 11367 | |
1cb36a98 | 11368 | ;; |
ef1ecf87 RH |
11369 | |
11370 | ia64*-*-*) | |
ba479fd2 NN |
11371 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
11372 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
11373 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
11374 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 11375 | else |
8ada417f ZW |
11376 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
11377 | if test $in_tree_gas = yes; then | |
11378 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11379 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 11380 | fi |
8ada417f | 11381 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11382 | echo ' .text |
ef1ecf87 RH |
11383 | addl r15 = @ltoffx(x#), gp |
11384 | ;; | |
cfa9ee99 | 11385 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
11386 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11388 | (eval $ac_try) 2>&5 | |
11389 | ac_status=$? | |
11390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11391 | (exit $ac_status); }; } | |
8ada417f | 11392 | then |
cfa9ee99 | 11393 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
11394 | else |
11395 | echo "configure: failed program was" >&5 | |
11396 | cat conftest.s >&5 | |
2c4a9cff | 11397 | fi |
8ada417f ZW |
11398 | rm -f conftest.o conftest.s |
11399 | fi | |
11400 | fi | |
ba479fd2 NN |
11401 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
11402 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 11403 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
11404 | |
11405 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 11406 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 11407 | _ACEOF |
8ada417f | 11408 | |
cfa9ee99 | 11409 | fi |
8ada417f | 11410 | |
2c4a9cff | 11411 | ;; |
8ada417f | 11412 | |
2c4a9cff | 11413 | powerpc*-*-*) |
8ada417f | 11414 | case $target in |
6b37db3c DE |
11415 | *-*-aix*) conftest_s=' .csect .text[PR] |
11416 | mfcr 3,128';; | |
11417 | *-*-darwin*) conftest_s=' .text | |
11418 | mfcr r3,128';; | |
11419 | *) conftest_s=' .text | |
11420 | mfcr 3,128';; | |
8ada417f | 11421 | esac |
8ada417f | 11422 | |
ba479fd2 NN |
11423 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
11424 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
11425 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
11426 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 11427 | else |
8ada417f ZW |
11428 | gcc_cv_as_powerpc_mfcrf=no |
11429 | if test $in_tree_gas = yes; then | |
11430 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11431 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 11432 | fi |
8ada417f | 11433 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11434 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
11435 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11436 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11437 | (eval $ac_try) 2>&5 | |
11438 | ac_status=$? | |
11439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11440 | (exit $ac_status); }; } | |
8ada417f ZW |
11441 | then |
11442 | gcc_cv_as_powerpc_mfcrf=yes | |
11443 | else | |
11444 | echo "configure: failed program was" >&5 | |
11445 | cat conftest.s >&5 | |
11446 | fi | |
11447 | rm -f conftest.o conftest.s | |
11448 | fi | |
2c4a9cff | 11449 | fi |
ba479fd2 NN |
11450 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
11451 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 11452 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
11453 | |
11454 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 11455 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 11456 | _ACEOF |
ef1ecf87 | 11457 | |
8ada417f ZW |
11458 | fi |
11459 | ;; | |
11460 | ||
11461 | mips*-*-*) | |
ba479fd2 NN |
11462 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
11463 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
11464 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
11465 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11466 | else |
11467 | gcc_cv_as_mips_explicit_relocs=no | |
11468 | if test $in_tree_gas = yes; then | |
11469 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11470 | then gcc_cv_as_mips_explicit_relocs=yes | |
11471 | fi | |
11472 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11473 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
11474 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11475 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11476 | (eval $ac_try) 2>&5 | |
11477 | ac_status=$? | |
11478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11479 | (exit $ac_status); }; } | |
8ada417f ZW |
11480 | then |
11481 | gcc_cv_as_mips_explicit_relocs=yes | |
11482 | else | |
11483 | echo "configure: failed program was" >&5 | |
11484 | cat conftest.s >&5 | |
ef1ecf87 | 11485 | fi |
8ada417f ZW |
11486 | rm -f conftest.o conftest.s |
11487 | fi | |
11488 | fi | |
ba479fd2 NN |
11489 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
11490 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
11491 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
11492 | if test x$target_cpu_default = x | |
11493 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
11494 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
11495 | fi | |
11496 | fi | |
11497 | ||
ef1ecf87 | 11498 | ;; |
1cb36a98 | 11499 | esac |
9d147085 RH |
11500 | # ??? Not all targets support dwarf2 debug_line, even within a version |
11501 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
11502 | # info to the output file. So, as supported targets are added to gas 2.11, | |
11503 | # add some instruction here to (also) show we expect this might work. | |
11504 | # ??? Once 2.11 is released, probably need to add first known working | |
11505 | # version to the per-target configury. | |
11506 | case "$target" in | |
80486e06 | 11507 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 11508 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 11509 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
11510 | insn="nop" |
11511 | ;; | |
57116d8d | 11512 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
11513 | insn="nop 0" |
11514 | ;; | |
2853bc5a HPN |
11515 | mmix-*-*) |
11516 | insn="swym 0" | |
11517 | ;; | |
8ada417f ZW |
11518 | esac |
11519 | if test x"$insn" != x; then | |
11520 | conftest_s="\ | |
11521 | .file 1 \"conftest.s\" | |
11522 | .loc 1 3 0 | |
11523 | $insn" | |
ba479fd2 NN |
11524 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
11525 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
11526 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
11527 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11528 | else |
11529 | gcc_cv_as_dwarf2_debug_line=no | |
11530 | if test $in_tree_gas = yes; then | |
11531 | if test $in_tree_gas_is_elf = yes \ | |
11532 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11533 | then gcc_cv_as_dwarf2_debug_line=yes | |
11534 | fi | |
11535 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11536 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
11537 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11538 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11539 | (eval $ac_try) 2>&5 | |
11540 | ac_status=$? | |
11541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11542 | (exit $ac_status); }; } | |
8ada417f ZW |
11543 | then |
11544 | # ??? This fails with non-gnu grep. Maybe use objdump? | |
11545 | if grep debug_line conftest.o > /dev/null 2>&1; then | |
11546 | gcc_cv_as_dwarf2_debug_line=yes | |
11547 | fi | |
11548 | else | |
11549 | echo "configure: failed program was" >&5 | |
11550 | cat conftest.s >&5 | |
11551 | fi | |
11552 | rm -f conftest.o conftest.s | |
11553 | fi | |
11554 | fi | |
ba479fd2 NN |
11555 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
11556 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 11557 | |
ad9c4d9f | 11558 | |
8ada417f ZW |
11559 | # The .debug_line file table must be in the exact order that |
11560 | # we specified the files, since these indices are also used | |
11561 | # by DW_AT_decl_file. Approximate this test by testing if | |
11562 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
11563 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
11564 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
11565 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
11566 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11567 | else |
11568 | gcc_cv_as_dwarf2_file_buggy=no | |
11569 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11570 | echo ' .file 1 "foo.s" |
8ada417f | 11571 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
11572 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11574 | (eval $ac_try) 2>&5 | |
11575 | ac_status=$? | |
11576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11577 | (exit $ac_status); }; } | |
8ada417f ZW |
11578 | then |
11579 | gcc_cv_as_dwarf2_file_buggy=yes | |
11580 | else | |
11581 | echo "configure: failed program was" >&5 | |
11582 | cat conftest.s >&5 | |
11583 | fi | |
11584 | rm -f conftest.o conftest.s | |
11585 | fi | |
ad9c4d9f | 11586 | fi |
ba479fd2 NN |
11587 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
11588 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
11589 | |
11590 | ||
11591 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
11592 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
11593 | |
11594 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 11595 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 11596 | _ACEOF |
9d147085 | 11597 | |
8ada417f | 11598 | fi |
ad9c4d9f | 11599 | |
ba479fd2 NN |
11600 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
11601 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
11602 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
11603 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11604 | else |
11605 | gcc_cv_as_gdwarf2_flag=no | |
11606 | if test $in_tree_gas = yes; then | |
11607 | if test $in_tree_gas_is_elf = yes \ | |
11608 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11609 | then gcc_cv_as_gdwarf2_flag=yes | |
11610 | fi | |
11611 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11612 | echo "$insn" > conftest.s |
ba479fd2 NN |
11613 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
11614 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11615 | (eval $ac_try) 2>&5 | |
11616 | ac_status=$? | |
11617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11618 | (exit $ac_status); }; } | |
8ada417f ZW |
11619 | then |
11620 | gcc_cv_as_gdwarf2_flag=yes | |
11621 | else | |
11622 | echo "configure: failed program was" >&5 | |
11623 | cat conftest.s >&5 | |
11624 | fi | |
11625 | rm -f conftest.o conftest.s | |
11626 | fi | |
ad9c4d9f | 11627 | fi |
ba479fd2 NN |
11628 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
11629 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 11630 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
11631 | |
11632 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11633 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 11634 | _ACEOF |
5f0e9ea2 GK |
11635 | |
11636 | fi | |
ad9c4d9f | 11637 | |
ba479fd2 NN |
11638 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
11639 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
11640 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
11641 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11642 | else |
11643 | gcc_cv_as_gstabs_flag=no | |
11644 | if test $in_tree_gas = yes; then | |
11645 | if test $in_tree_gas_is_elf = yes \ | |
11646 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11647 | then gcc_cv_as_gstabs_flag=yes | |
11648 | fi | |
11649 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11650 | echo "$insn" > conftest.s |
ba479fd2 NN |
11651 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
11652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11653 | (eval $ac_try) 2>&5 | |
11654 | ac_status=$? | |
11655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11656 | (exit $ac_status); }; } | |
8ada417f ZW |
11657 | then |
11658 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
11659 | # and warns about it, but still exits successfully. So check for | |
11660 | # this. | |
ba479fd2 NN |
11661 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
11662 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11663 | (eval $ac_try) 2>&5 | |
11664 | ac_status=$? | |
11665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11666 | (exit $ac_status); }; } | |
8ada417f ZW |
11667 | then : |
11668 | else gcc_cv_as_gstabs_flag=yes | |
11669 | fi | |
11670 | else | |
11671 | echo "configure: failed program was" >&5 | |
11672 | cat conftest.s >&5 | |
11673 | fi | |
11674 | rm -f conftest.o conftest.s | |
11675 | fi | |
ad9c4d9f | 11676 | fi |
ba479fd2 NN |
11677 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
11678 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 11679 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
11680 | |
11681 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11682 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 11683 | _ACEOF |
5f0e9ea2 GK |
11684 | |
11685 | fi | |
8ada417f | 11686 | fi |
5f0e9ea2 | 11687 | |
ba479fd2 NN |
11688 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
11689 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 11690 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 11691 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11692 | 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 \ |
11693 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
11694 | gcc_cv_ld_ro_rw_mix=read-write |
11695 | fi | |
11696 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
11697 | echo '.section myfoosect, "a"' > conftest1.s |
11698 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 11699 | echo '.byte 1' >> conftest2.s |
90e145da | 11700 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 11701 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
11702 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
11703 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
11704 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 11705 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 11706 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 11707 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 11708 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
11709 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
11710 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
11711 | gcc_cv_ld_ro_rw_mix=read-only | |
11712 | else | |
11713 | gcc_cv_ld_ro_rw_mix=read-write | |
11714 | fi | |
11715 | fi | |
11716 | fi | |
11717 | rm -f conftest.* conftest[123].* | |
11718 | fi | |
11719 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
11720 | |
11721 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 11722 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 11723 | _ACEOF |
96d0f4dc JJ |
11724 | |
11725 | fi | |
ba479fd2 NN |
11726 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
11727 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 11728 | |
ba479fd2 NN |
11729 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
11730 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 11731 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 11732 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11733 | 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 \ |
11734 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
11735 | gcc_cv_ld_eh_frame_hdr=yes |
11736 | fi | |
11737 | elif test x$gcc_cv_ld != x; then | |
11738 | # Check if linker supports --eh-frame-hdr option | |
11739 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
11740 | gcc_cv_ld_eh_frame_hdr=yes | |
11741 | fi | |
11742 | fi | |
11743 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
ba479fd2 NN |
11744 | |
11745 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 11746 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 11747 | _ACEOF |
275b60d6 JJ |
11748 | |
11749 | fi | |
ba479fd2 NN |
11750 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
11751 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 11752 | |
ba479fd2 NN |
11753 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
11754 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
11755 | gcc_cv_ld_pie=no |
11756 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
11757 | 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 \ |
11758 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
11759 | gcc_cv_ld_pie=yes |
11760 | fi | |
11761 | elif test x$gcc_cv_ld != x; then | |
11762 | # Check if linker supports -pie option | |
11763 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
11764 | gcc_cv_ld_pie=yes | |
11765 | fi | |
11766 | fi | |
11767 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
11768 | |
11769 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 11770 | #define HAVE_LD_PIE 1 |
ba479fd2 | 11771 | _ACEOF |
24a4dd31 JJ |
11772 | |
11773 | fi | |
ba479fd2 NN |
11774 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
11775 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 11776 | |
8bb915b6 NN |
11777 | # -------- |
11778 | # UNSORTED | |
11779 | # -------- | |
11780 | ||
765f1bf9 AM |
11781 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
11782 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
11783 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
11784 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11785 | else | |
11786 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
11787 | if test $in_tree_ld = yes ; then |
11788 | 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 \ | |
11789 | && test $in_tree_ld_is_elf = yes; then | |
11790 | gcc_cv_ld_as_needed=yes | |
11791 | fi | |
11792 | elif test x$gcc_cv_ld != x; then | |
11793 | # Check if linker supports --as-needed and --no-as-needed options | |
11794 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
11795 | gcc_cv_ld_as_needed=yes | |
11796 | fi | |
11797 | fi | |
82e923f6 RS |
11798 | |
11799 | fi | |
11800 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
11801 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
11802 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
11803 | ||
11804 | cat >>confdefs.h <<\_ACEOF | |
11805 | #define HAVE_LD_AS_NEEDED 1 | |
11806 | _ACEOF | |
11807 | ||
11808 | fi | |
765f1bf9 | 11809 | |
9fb28a67 | 11810 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 11811 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
11812 | |
11813 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 11814 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 11815 | _ACEOF |
793e9558 PB |
11816 | |
11817 | fi | |
11818 | ||
81bf3d9e | 11819 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 11820 | |
81bf3d9e RH |
11821 | # Check whether --with-gc or --without-gc was given. |
11822 | if test "${with_gc+set}" = set; then | |
11823 | withval="$with_gc" | |
11824 | case "$withval" in | |
59415997 | 11825 | page | zone) |
81bf3d9e RH |
11826 | GGC=ggc-$withval |
11827 | ;; | |
11828 | *) | |
ba479fd2 NN |
11829 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
11830 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
11831 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
11832 | ;; |
11833 | esac | |
11834 | else | |
005537df | 11835 | GGC=ggc-page |
ba479fd2 | 11836 | fi; |
81bf3d9e RH |
11837 | |
11838 | echo "Using $GGC for garbage collection." | |
11839 | ||
3c809ba4 | 11840 | # Use the system's zlib library. |
b8dad04b ZW |
11841 | zlibdir=-L../zlib |
11842 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 11843 | |
3c809ba4 AG |
11844 | # Check whether --with-system-zlib or --without-system-zlib was given. |
11845 | if test "${with_system_zlib+set}" = set; then | |
11846 | withval="$with_system_zlib" | |
11847 | zlibdir= | |
11848 | zlibinc= | |
11849 | ||
ba479fd2 | 11850 | fi; |
3c809ba4 AG |
11851 | |
11852 | ||
11853 | ||
dc6746e7 | 11854 | |
ba479fd2 NN |
11855 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
11856 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
11857 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
11858 | if test "${enable_maintainer_mode+set}" = set; then | |
11859 | enableval="$enable_maintainer_mode" | |
11860 | maintainer_mode=$enableval | |
11861 | else | |
11862 | maintainer_mode=no | |
ba479fd2 | 11863 | fi; |
63cf211a | 11864 | |
ba479fd2 NN |
11865 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
11866 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
11867 | |
11868 | if test "$maintainer_mode" = "yes"; then | |
11869 | MAINT='' | |
11870 | else | |
11871 | MAINT='#' | |
11872 | fi | |
11873 | ||
6de9cd9a DN |
11874 | echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5 |
11875 | echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6 | |
11876 | ||
11877 | # Check whether --with-libbanshee or --without-libbanshee was given. | |
11878 | if test "${with_libbanshee+set}" = set; then | |
11879 | withval="$with_libbanshee" | |
11880 | libbanshee="$with_libbanshee" | |
11881 | else | |
11882 | libbanshee=no | |
11883 | fi; | |
11884 | ||
11885 | if test x"$libbanshee" = xyes; then | |
11886 | BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a " | |
11887 | BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to" | |
11888 | ANDER="tree-alias-ander.o" | |
11889 | ||
11890 | cat >>confdefs.h <<\_ACEOF | |
11891 | #define HAVE_BANSHEE 1 | |
11892 | _ACEOF | |
11893 | ||
11894 | else | |
11895 | BANSHEELIB="" | |
11896 | BANSHEEINC="" | |
11897 | ANDER="" | |
11898 | fi | |
11899 | echo "$as_me:$LINENO: result: $with_libbanshee" >&5 | |
11900 | echo "${ECHO_T}$with_libbanshee" >&6 | |
11901 | ||
11902 | ||
11903 | ||
11904 | ||
11905 | ||
8bb915b6 NN |
11906 | # -------------- |
11907 | # Language hooks | |
11908 | # -------------- | |
11909 | ||
861bb6c1 JL |
11910 | # Make empty files to contain the specs and options for each language. |
11911 | # Then add #include lines to for a compiler that has specs and/or options. | |
11912 | ||
d7b42618 | 11913 | lang_opt_files= |
861bb6c1 | 11914 | lang_specs_files= |
3103b7db | 11915 | lang_tree_files= |
861bb6c1 JL |
11916 | for subdir in . $subdirs |
11917 | do | |
d7b42618 NB |
11918 | if test -f $srcdir/$subdir/lang.opt; then |
11919 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
11920 | fi | |
75bffa71 | 11921 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 11922 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 11923 | fi |
3103b7db | 11924 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 11925 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 11926 | fi |
861bb6c1 JL |
11927 | done |
11928 | ||
11929 | # These (without "all_") are set in each config-lang.in. | |
11930 | # `language' must be a single word so is spelled singularly. | |
11931 | all_languages= | |
11932 | all_boot_languages= | |
11933 | all_compilers= | |
11934 | all_stagestuff= | |
69f9a345 | 11935 | all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk' |
861bb6c1 | 11936 | # List of language makefile fragments. |
2ed26f6b ZW |
11937 | all_lang_makefrags= |
11938 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 11939 | all_lang_makefiles= |
e2500fed | 11940 | # Files for gengtype |
ef69da62 | 11941 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
11942 | # Files for gengtype with language |
11943 | all_gtfiles_files_langs= | |
11944 | all_gtfiles_files_files= | |
861bb6c1 JL |
11945 | |
11946 | # Add the language fragments. | |
11947 | # Languages are added via two mechanisms. Some information must be | |
11948 | # recorded in makefile variables, these are defined in config-lang.in. | |
11949 | # We accumulate them and plug them into the main Makefile. | |
11950 | # The other mechanism is a set of hooks for each of the main targets | |
11951 | # like `clean', `install', etc. | |
11952 | ||
861bb6c1 | 11953 | language_hooks="Make-hooks" |
861bb6c1 | 11954 | |
c406e779 | 11955 | for s in $subdirs |
861bb6c1 | 11956 | do |
861bb6c1 JL |
11957 | language= |
11958 | boot_language= | |
11959 | compilers= | |
11960 | stagestuff= | |
861bb6c1 | 11961 | outputs= |
e2500fed | 11962 | gtfiles= |
861bb6c1 | 11963 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 11964 | if test "x$language" = x |
861bb6c1 JL |
11965 | then |
11966 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
11967 | exit 1 | |
11968 | fi | |
2ed26f6b | 11969 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 11970 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 11971 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 11972 | fi |
861bb6c1 | 11973 | all_languages="$all_languages $language" |
75bffa71 | 11974 | if test "x$boot_language" = xyes |
861bb6c1 JL |
11975 | then |
11976 | all_boot_languages="$all_boot_languages $language" | |
11977 | fi | |
11978 | all_compilers="$all_compilers $compilers" | |
11979 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 11980 | all_outputs="$all_outputs $outputs" |
e2500fed | 11981 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 11982 | for f in $gtfiles |
8ac9d31f | 11983 | do |
8ac9d31f TJ |
11984 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
11985 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 11986 | done |
861bb6c1 JL |
11987 | done |
11988 | ||
8ac9d31f TJ |
11989 | # Pick up gtfiles for c |
11990 | gtfiles= | |
11991 | s="c" | |
11992 | . ${srcdir}/c-config-lang.in | |
11993 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 11994 | for f in $gtfiles |
8ac9d31f | 11995 | do |
8ac9d31f TJ |
11996 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
11997 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
11998 | done |
11999 | ||
cbc59f01 | 12000 | check_languages= |
c406e779 | 12001 | for language in $all_languages |
cbc59f01 | 12002 | do |
cbc59f01 | 12003 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
12004 | done |
12005 | ||
62b81e45 MM |
12006 | # We link each language in with a set of hooks, reached indirectly via |
12007 | # lang.${target}. | |
861bb6c1 JL |
12008 | |
12009 | rm -f Make-hooks | |
12010 | touch Make-hooks | |
65ebbf81 | 12011 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 12012 | install-normal install-common install-man \ |
a541f69d | 12013 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 12014 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 12015 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
12016 | for t in $target_list |
12017 | do | |
12018 | x= | |
c406e779 | 12019 | for lang in $all_languages |
861bb6c1 | 12020 | do |
ab87f8c8 | 12021 | x="$x $lang.$t" |
861bb6c1 JL |
12022 | done |
12023 | echo "lang.$t: $x" >> Make-hooks | |
12024 | done | |
12025 | ||
8bb915b6 NN |
12026 | # -------- |
12027 | # UNSORTED | |
12028 | # -------- | |
12029 | ||
cc06d68c | 12030 | # Create .gdbinit. |
861bb6c1 | 12031 | |
cc06d68c GP |
12032 | echo "dir ." > .gdbinit |
12033 | echo "dir ${srcdir}" >> .gdbinit | |
12034 | if test x$gdb_needs_out_file_path = xyes | |
12035 | then | |
12036 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
12037 | fi | |
12038 | if test "x$subdirs" != x; then | |
12039 | for s in $subdirs | |
12040 | do | |
12041 | echo "dir ${srcdir}/$s" >> .gdbinit | |
12042 | done | |
861bb6c1 | 12043 | fi |
cc06d68c | 12044 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 12045 | |
8f8d3278 NC |
12046 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
12047 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
12048 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
12049 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
12050 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
12051 | # make and thus we'd get different behavior depending on where we built the | |
12052 | # sources. | |
5949a9fc | 12053 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 12054 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 12055 | else |
8f8d3278 NC |
12056 | # An explanation of the sed strings: |
12057 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
12058 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
12059 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 12060 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
12061 | # |
12062 | # (*) Note this pattern overwrites the first character of the string | |
12063 | # with a forward slash if one is not already present. This is not a | |
12064 | # problem because the exact names of the sub-directories concerned is | |
12065 | # unimportant, just the number of them matters. | |
12066 | # | |
12067 | # The practical upshot of these patterns is like this: | |
12068 | # | |
12069 | # prefix exec_prefix result | |
12070 | # ------ ----------- ------ | |
12071 | # /foo /foo/bar ../ | |
12072 | # /foo/ /foo/bar ../ | |
12073 | # /foo /foo/bar/ ../ | |
12074 | # /foo/ /foo/bar/ ../ | |
12075 | # /foo /foo/bar/ugg ../../ | |
12076 | # | |
4c112cda | 12077 | dollar='$$' |
caa55b1e | 12078 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
12079 | fi |
12080 | ||
12081 | ||
2ce3c6c6 | 12082 | |
2bbea3a6 RH |
12083 | # Find a directory in which to install a shared libgcc. |
12084 | ||
12085 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
12086 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
12087 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
12088 | |
12089 | fi; | |
2bbea3a6 RH |
12090 | |
12091 | ||
5b15f277 RH |
12092 | # Check whether --with-slibdir or --without-slibdir was given. |
12093 | if test "${with_slibdir+set}" = set; then | |
12094 | withval="$with_slibdir" | |
12095 | slibdir="$with_slibdir" | |
12096 | else | |
12097 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 12098 | slibdir='$(libsubdir)' |
5b15f277 | 12099 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
12100 | slibdir='$(build_tooldir)/lib' |
12101 | else | |
5b15f277 | 12102 | slibdir='$(libdir)' |
2bbea3a6 | 12103 | fi |
ba479fd2 | 12104 | fi; |
2bbea3a6 RH |
12105 | |
12106 | ||
1e6347d8 | 12107 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
12108 | |
12109 | ||
861bb6c1 JL |
12110 | # Substitute configuration variables |
12111 | ||
12112 | ||
12113 | ||
12114 | ||
12115 | ||
12116 | ||
12117 | ||
12118 | ||
12119 | ||
12120 | ||
12121 | ||
12122 | ||
12123 | ||
12124 | ||
12125 | ||
12126 | ||
12127 | ||
12128 | ||
12129 | ||
12130 | ||
12131 | ||
12132 | ||
12133 | ||
12134 | ||
12135 | ||
12136 | ||
12137 | ||
12138 | ||
12139 | ||
12140 | ||
12141 | ||
12142 | ||
12143 | ||
12144 | ||
12145 | ||
12146 | ||
12147 | ||
12148 | ||
12149 | ||
12150 | ||
12151 | ||
12152 | ||
12153 | ||
12154 | ||
12155 | ||
12156 | ||
9b16d2c4 | 12157 | |
e9a25f70 | 12158 | |
6e26218f | 12159 | |
c8724862 | 12160 | |
e061d1ce | 12161 | |
d8bb17c8 | 12162 | |
11642c3a ZW |
12163 | |
12164 | ||
12165 | ||
12166 | ||
12167 | ||
12168 | ||
12169 | ||
3d9d2476 | 12170 | |
596151e1 | 12171 | |
8ac9d31f TJ |
12172 | |
12173 | ||
12174 | ||
e2500fed | 12175 | |
51b9ff45 KC |
12176 | |
12177 | ||
861bb6c1 | 12178 | |
a541f69d KC |
12179 | # If it doesn't already exist, create document directory |
12180 | echo "checking for the document directory." 1>&2 | |
12181 | if test -d doc ; then | |
12182 | true | |
12183 | else | |
12184 | mkdir doc | |
12185 | fi | |
861bb6c1 | 12186 | |
6e3f3080 NN |
12187 | # Echo link setup. |
12188 | if test x${build} = x${host} ; then | |
12189 | if test x${host} = x${target} ; then | |
12190 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
12191 | else | |
12192 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
12193 | echo " from ${host} to ${target}." 1>&2 | |
12194 | fi | |
12195 | else | |
12196 | if test x${host} = x${target} ; then | |
12197 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
12198 | echo " for ${target}." 1>&2 | |
12199 | else | |
12200 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
12201 | echo " from ${host} to ${target}." 1>&2 | |
12202 | fi | |
12203 | fi | |
12204 | ||
6de9cd9a DN |
12205 | |
12206 | ||
12207 | ||
6e3f3080 NN |
12208 | # Configure the subdirectories |
12209 | # AC_CONFIG_SUBDIRS($subdirs) | |
12210 | ||
12211 | # Create the Makefile | |
12212 | # and configure language subdirectories | |
ba479fd2 | 12213 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
12214 | |
12215 | ||
ba479fd2 | 12216 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 12217 | |
ba479fd2 | 12218 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
12219 | # This file is a shell script that caches the results of configure |
12220 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
12221 | # scripts and configure runs, see configure's option --config-cache. |
12222 | # It is not useful on other systems. If it contains results you don't | |
12223 | # want to keep, you may remove or edit it. | |
6e3f3080 | 12224 | # |
ba479fd2 NN |
12225 | # config.status only pays attention to the cache file if you give it |
12226 | # the --recheck option to rerun configure. | |
6e3f3080 | 12227 | # |
ba479fd2 NN |
12228 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
12229 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
12230 | # following values. | |
12231 | ||
12232 | _ACEOF | |
12233 | ||
6e3f3080 NN |
12234 | # The following way of writing the cache mishandles newlines in values, |
12235 | # but we know of no workaround that is simple, portable, and efficient. | |
12236 | # So, don't put newlines in cache variables' values. | |
12237 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
12238 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
12239 | { |
12240 | (set) 2>&1 | | |
12241 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
12242 | *ac_space=\ *) | |
12243 | # `set' does not quote correctly, so add quotes (double-quote | |
12244 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
12245 | sed -n \ | |
86da66b5 HPN |
12246 | "s/'/'\\\\''/g; |
12247 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
12248 | ;; |
12249 | *) | |
12250 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
12251 | sed -n \ | |
86da66b5 | 12252 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
12253 | ;; |
12254 | esac; | |
12255 | } | | |
12256 | sed ' | |
12257 | t clear | |
12258 | : clear | |
12259 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
12260 | t end | |
12261 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
12262 | : end' >>confcache | |
12263 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 12264 | if test -w $cache_file; then |
ba479fd2 NN |
12265 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
12266 | cat confcache >$cache_file | |
6e3f3080 NN |
12267 | else |
12268 | echo "not updating unwritable cache $cache_file" | |
12269 | fi | |
12270 | fi | |
12271 | rm -f confcache | |
12272 | ||
12273 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
12274 | # Let make expand exec_prefix. | |
12275 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12276 | ||
ba479fd2 NN |
12277 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
12278 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
12279 | # trailing colons and then remove the whole line if VPATH becomes empty | |
12280 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 12281 | if test "x$srcdir" = x.; then |
86da66b5 | 12282 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
12283 | s/:*\$(srcdir):*/:/; |
12284 | s/:*\${srcdir}:*/:/; | |
12285 | s/:*@srcdir@:*/:/; | |
86da66b5 | 12286 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 12287 | s/:*$//; |
86da66b5 | 12288 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 12289 | }' |
6e3f3080 NN |
12290 | fi |
12291 | ||
63cf211a | 12292 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 12293 | |
ba479fd2 NN |
12294 | ac_libobjs= |
12295 | ac_ltlibobjs= | |
12296 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
12297 | # 1. Remove the extension, and $U if already installed. | |
12298 | ac_i=`echo "$ac_i" | | |
86da66b5 | 12299 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
12300 | # 2. Add them. |
12301 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
12302 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
12303 | done | |
12304 | LIBOBJS=$ac_libobjs | |
63cf211a | 12305 | |
ba479fd2 NN |
12306 | LTLIBOBJS=$ac_ltlibobjs |
12307 | ||
12308 | ||
12309 | ||
12310 | : ${CONFIG_STATUS=./config.status} | |
12311 | ac_clean_files_save=$ac_clean_files | |
12312 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
12313 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
12314 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
12315 | cat >$CONFIG_STATUS <<_ACEOF | |
12316 | #! $SHELL | |
12317 | # Generated by $as_me. | |
6e3f3080 NN |
12318 | # Run this file to recreate the current configuration. |
12319 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 12320 | # configure, is in config.log if it exists. |
6e3f3080 | 12321 | |
ba479fd2 NN |
12322 | debug=false |
12323 | ac_cs_recheck=false | |
12324 | ac_cs_silent=false | |
12325 | SHELL=\${CONFIG_SHELL-$SHELL} | |
12326 | _ACEOF | |
12327 | ||
12328 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12329 | ## --------------------- ## | |
12330 | ## M4sh Initialization. ## | |
12331 | ## --------------------- ## | |
12332 | ||
12333 | # Be Bourne compatible | |
12334 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
12335 | emulate sh | |
12336 | NULLCMD=: | |
12337 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
12338 | # is contrary to our usage. Disable this feature. | |
12339 | alias -g '${1+"$@"}'='"$@"' | |
12340 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
12341 | set -o posix | |
12342 | fi | |
86da66b5 | 12343 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
12344 | |
12345 | # Support unset when possible. | |
86da66b5 | 12346 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
12347 | as_unset=unset |
12348 | else | |
12349 | as_unset=false | |
12350 | fi | |
12351 | ||
12352 | ||
12353 | # Work around bugs in pre-3.0 UWIN ksh. | |
12354 | $as_unset ENV MAIL MAILPATH | |
12355 | PS1='$ ' | |
12356 | PS2='> ' | |
12357 | PS4='+ ' | |
12358 | ||
12359 | # NLS nuisances. | |
12360 | for as_var in \ | |
12361 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
12362 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
12363 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 12364 | do |
86da66b5 | 12365 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
12366 | eval $as_var=C; export $as_var |
12367 | else | |
12368 | $as_unset $as_var | |
12369 | fi | |
6e3f3080 NN |
12370 | done |
12371 | ||
ba479fd2 NN |
12372 | # Required to use basename. |
12373 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
12374 | as_expr=expr | |
12375 | else | |
12376 | as_expr=false | |
12377 | fi | |
6e3f3080 | 12378 | |
ba479fd2 NN |
12379 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
12380 | as_basename=basename | |
12381 | else | |
12382 | as_basename=false | |
12383 | fi | |
6e3f3080 NN |
12384 | |
12385 | ||
ba479fd2 NN |
12386 | # Name of the executable. |
12387 | as_me=`$as_basename "$0" || | |
12388 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
12389 | X"$0" : 'X\(//\)$' \| \ | |
12390 | X"$0" : 'X\(/\)$' \| \ | |
12391 | . : '\(.\)' 2>/dev/null || | |
12392 | echo X/"$0" | | |
12393 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
12394 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
12395 | /^X\/\(\/\).*/{ s//\1/; q; } | |
12396 | s/.*/./; q'` | |
12397 | ||
6e3f3080 | 12398 | |
ba479fd2 NN |
12399 | # PATH needs CR, and LINENO needs CR and PATH. |
12400 | # Avoid depending upon Character Ranges. | |
12401 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
12402 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
12403 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
12404 | as_cr_digits='0123456789' | |
12405 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
12406 | ||
12407 | # The user is always right. | |
12408 | if test "${PATH_SEPARATOR+set}" != set; then | |
12409 | echo "#! /bin/sh" >conf$$.sh | |
12410 | echo "exit 0" >>conf$$.sh | |
12411 | chmod +x conf$$.sh | |
12412 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
12413 | PATH_SEPARATOR=';' | |
6e3f3080 | 12414 | else |
ba479fd2 NN |
12415 | PATH_SEPARATOR=: |
12416 | fi | |
12417 | rm -f conf$$.sh | |
12418 | fi | |
12419 | ||
12420 | ||
12421 | as_lineno_1=$LINENO | |
12422 | as_lineno_2=$LINENO | |
12423 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
12424 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
12425 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
12426 | # Find who we are. Look in the path if we contain no path at all | |
12427 | # relative or not. | |
12428 | case $0 in | |
12429 | *[\\/]* ) as_myself=$0 ;; | |
12430 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12431 | for as_dir in $PATH | |
12432 | do | |
12433 | IFS=$as_save_IFS | |
12434 | test -z "$as_dir" && as_dir=. | |
12435 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
12436 | done | |
12437 | ||
12438 | ;; | |
12439 | esac | |
12440 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
12441 | # in which case we are not to be found in the path. | |
12442 | if test "x$as_myself" = x; then | |
12443 | as_myself=$0 | |
12444 | fi | |
12445 | if test ! -f "$as_myself"; then | |
12446 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
12447 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
12448 | { (exit 1); exit 1; }; } | |
6e3f3080 | 12449 | fi |
ba479fd2 NN |
12450 | case $CONFIG_SHELL in |
12451 | '') | |
12452 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12453 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
12454 | do | |
12455 | IFS=$as_save_IFS | |
12456 | test -z "$as_dir" && as_dir=. | |
12457 | for as_base in sh bash ksh sh5; do | |
12458 | case $as_dir in | |
12459 | /*) | |
12460 | if ("$as_dir/$as_base" -c ' | |
12461 | as_lineno_1=$LINENO | |
12462 | as_lineno_2=$LINENO | |
12463 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
12464 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
12465 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
12466 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
12467 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
12468 | CONFIG_SHELL=$as_dir/$as_base | |
12469 | export CONFIG_SHELL | |
12470 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
12471 | fi;; | |
12472 | esac | |
12473 | done | |
12474 | done | |
12475 | ;; | |
12476 | esac | |
12477 | ||
12478 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
12479 | # uniformly replaced by the line number. The first 'sed' inserts a | |
12480 | # line-number line before each line; the second 'sed' does the real | |
12481 | # work. The second script uses 'N' to pair each line-number line | |
12482 | # with the numbered line, and appends trailing '-' during | |
12483 | # substitution so that $LINENO is not a special case at line end. | |
12484 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
12485 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
12486 | sed '=' <$as_myself | | |
12487 | sed ' | |
12488 | N | |
12489 | s,$,-, | |
12490 | : loop | |
12491 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
12492 | t loop | |
12493 | s,-$,, | |
12494 | s,^['$as_cr_digits']*\n,, | |
12495 | ' >$as_me.lineno && | |
12496 | chmod +x $as_me.lineno || | |
12497 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
12498 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
12499 | { (exit 1); exit 1; }; } | |
12500 | ||
12501 | # Don't try to exec as it changes $[0], causing all sort of problems | |
12502 | # (the dirname of $[0] is not the place where we might find the | |
12503 | # original and so on. Autoconf is especially sensible to this). | |
12504 | . ./$as_me.lineno | |
12505 | # Exit status is that of the last command. | |
12506 | exit | |
12507 | } | |
12508 | ||
12509 | ||
12510 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
12511 | *c*,-n*) ECHO_N= ECHO_C=' | |
12512 | ' ECHO_T=' ' ;; | |
12513 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
12514 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
12515 | esac | |
12516 | ||
12517 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
12518 | as_expr=expr | |
12519 | else | |
12520 | as_expr=false | |
12521 | fi | |
12522 | ||
12523 | rm -f conf$$ conf$$.exe conf$$.file | |
12524 | echo >conf$$.file | |
12525 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
12526 | # We could just check for DJGPP; but this test a) works b) is more generic | |
12527 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
12528 | if test -f conf$$.exe; then | |
12529 | # Don't use ln at all; we don't have any links | |
12530 | as_ln_s='cp -p' | |
6e3f3080 | 12531 | else |
ba479fd2 | 12532 | as_ln_s='ln -s' |
6e3f3080 | 12533 | fi |
ba479fd2 NN |
12534 | elif ln conf$$.file conf$$ 2>/dev/null; then |
12535 | as_ln_s=ln | |
12536 | else | |
12537 | as_ln_s='cp -p' | |
12538 | fi | |
12539 | rm -f conf$$ conf$$.exe conf$$.file | |
12540 | ||
12541 | if mkdir -p . 2>/dev/null; then | |
12542 | as_mkdir_p=: | |
12543 | else | |
86da66b5 | 12544 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
12545 | as_mkdir_p=false |
12546 | fi | |
12547 | ||
12548 | as_executable_p="test -f" | |
12549 | ||
12550 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 12551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
12552 | |
12553 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 12554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
12555 | |
12556 | ||
12557 | # IFS | |
12558 | # We need space, tab and new line, in precisely that order. | |
12559 | as_nl=' | |
12560 | ' | |
12561 | IFS=" $as_nl" | |
12562 | ||
12563 | # CDPATH. | |
12564 | $as_unset CDPATH | |
12565 | ||
12566 | exec 6>&1 | |
12567 | ||
12568 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
12569 | # report actual input values of CONFIG_FILES etc. instead of their | |
12570 | # values after options handling. Logging --version etc. is OK. | |
12571 | exec 5>>config.log | |
12572 | { | |
12573 | echo | |
12574 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
12575 | ## Running $as_me. ## | |
12576 | _ASBOX | |
12577 | } >&5 | |
12578 | cat >&5 <<_CSEOF | |
12579 | ||
12580 | This file was extended by $as_me, which was | |
8ab705be | 12581 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
12582 | |
12583 | CONFIG_FILES = $CONFIG_FILES | |
12584 | CONFIG_HEADERS = $CONFIG_HEADERS | |
12585 | CONFIG_LINKS = $CONFIG_LINKS | |
12586 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
12587 | $ $0 $@ | |
12588 | ||
12589 | _CSEOF | |
12590 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
12591 | echo >&5 | |
12592 | _ACEOF | |
12593 | ||
12594 | # Files that config.status was made for. | |
12595 | if test -n "$ac_config_files"; then | |
12596 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
12597 | fi | |
12598 | ||
12599 | if test -n "$ac_config_headers"; then | |
12600 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
12601 | fi | |
12602 | ||
12603 | if test -n "$ac_config_links"; then | |
12604 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
12605 | fi | |
12606 | ||
12607 | if test -n "$ac_config_commands"; then | |
12608 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
12609 | fi | |
12610 | ||
12611 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12612 | ||
12613 | ac_cs_usage="\ | |
12614 | \`$as_me' instantiates files from templates according to the | |
12615 | current configuration. | |
12616 | ||
12617 | Usage: $0 [OPTIONS] [FILE]... | |
12618 | ||
12619 | -h, --help print this help, then exit | |
12620 | -V, --version print version number, then exit | |
12621 | -q, --quiet do not print progress messages | |
12622 | -d, --debug don't remove temporary files | |
12623 | --recheck update $as_me by reconfiguring in the same conditions | |
12624 | --file=FILE[:TEMPLATE] | |
86da66b5 | 12625 | instantiate the configuration file FILE |
ba479fd2 | 12626 | --header=FILE[:TEMPLATE] |
86da66b5 | 12627 | instantiate the configuration header FILE |
ba479fd2 NN |
12628 | |
12629 | Configuration files: | |
12630 | $config_files | |
12631 | ||
12632 | Configuration headers: | |
12633 | $config_headers | |
12634 | ||
12635 | Configuration commands: | |
12636 | $config_commands | |
12637 | ||
12638 | Report bugs to <bug-autoconf@gnu.org>." | |
12639 | _ACEOF | |
12640 | ||
12641 | cat >>$CONFIG_STATUS <<_ACEOF | |
12642 | ac_cs_version="\\ | |
12643 | config.status | |
8ab705be | 12644 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
12645 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
12646 | ||
86da66b5 | 12647 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
12648 | This config.status script is free software; the Free Software Foundation |
12649 | gives unlimited permission to copy, distribute and modify it." | |
12650 | srcdir=$srcdir | |
12651 | _ACEOF | |
12652 | ||
12653 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12654 | # If no file are specified by the user, then we need to provide default | |
12655 | # value. By we need to know if files were specified by the user. | |
12656 | ac_need_defaults=: | |
12657 | while test $# != 0 | |
12658 | do | |
12659 | case $1 in | |
12660 | --*=*) | |
12661 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
12662 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
12663 | ac_shift=: | |
12664 | ;; | |
12665 | -*) | |
12666 | ac_option=$1 | |
12667 | ac_optarg=$2 | |
12668 | ac_shift=shift | |
12669 | ;; | |
12670 | *) # This is not an option, so the user has probably given explicit | |
12671 | # arguments. | |
12672 | ac_option=$1 | |
12673 | ac_need_defaults=false;; | |
12674 | esac | |
12675 | ||
12676 | case $ac_option in | |
12677 | # Handling of the options. | |
12678 | _ACEOF | |
12679 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12680 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
12681 | ac_cs_recheck=: ;; | |
12682 | --version | --vers* | -V ) | |
12683 | echo "$ac_cs_version"; exit 0 ;; | |
12684 | --he | --h) | |
12685 | # Conflict between --help and --header | |
12686 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
12687 | Try \`$0 --help' for more information." >&5 | |
12688 | echo "$as_me: error: ambiguous option: $1 | |
12689 | Try \`$0 --help' for more information." >&2;} | |
12690 | { (exit 1); exit 1; }; };; | |
12691 | --help | --hel | -h ) | |
12692 | echo "$ac_cs_usage"; exit 0 ;; | |
12693 | --debug | --d* | -d ) | |
12694 | debug=: ;; | |
12695 | --file | --fil | --fi | --f ) | |
12696 | $ac_shift | |
12697 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
12698 | ac_need_defaults=false;; | |
12699 | --header | --heade | --head | --hea ) | |
12700 | $ac_shift | |
12701 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
12702 | ac_need_defaults=false;; | |
12703 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
12704 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
12705 | ac_cs_silent=: ;; | |
12706 | ||
12707 | # This is an error. | |
12708 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
12709 | Try \`$0 --help' for more information." >&5 | |
12710 | echo "$as_me: error: unrecognized option: $1 | |
12711 | Try \`$0 --help' for more information." >&2;} | |
12712 | { (exit 1); exit 1; }; } ;; | |
12713 | ||
12714 | *) ac_config_targets="$ac_config_targets $1" ;; | |
12715 | ||
12716 | esac | |
12717 | shift | |
6e3f3080 | 12718 | done |
ba479fd2 NN |
12719 | |
12720 | ac_configure_extra_args= | |
12721 | ||
12722 | if $ac_cs_silent; then | |
12723 | exec 6>/dev/null | |
12724 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
12725 | fi |
12726 | ||
ba479fd2 NN |
12727 | _ACEOF |
12728 | cat >>$CONFIG_STATUS <<_ACEOF | |
12729 | if \$ac_cs_recheck; then | |
12730 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
12731 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
12732 | fi | |
861bb6c1 | 12733 | |
ba479fd2 NN |
12734 | _ACEOF |
12735 | ||
12736 | cat >>$CONFIG_STATUS <<_ACEOF | |
12737 | # | |
12738 | # INIT-COMMANDS section. | |
12739 | # | |
12740 | ||
12741 | subdirs='$subdirs' | |
12742 | symbolic_link='$symbolic_link' | |
12743 | ||
12744 | ||
12745 | _ACEOF | |
12746 | ||
12747 | ||
12748 | ||
12749 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12750 | for ac_config_target in $ac_config_targets | |
12751 | do | |
12752 | case "$ac_config_target" in | |
12753 | # Handling of arguments. | |
12754 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
12755 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
12756 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
12757 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
12758 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
12759 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 12760 | esac |
ba479fd2 NN |
12761 | done |
12762 | ||
12763 | # If the user did not use the arguments to specify the items to instantiate, | |
12764 | # then the envvar interface is used. Set only those that are not. | |
12765 | # We use the long form for the default assignment because of an extremely | |
12766 | # bizarre bug on SunOS 4.1.3. | |
12767 | if $ac_need_defaults; then | |
12768 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
12769 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
12770 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
12771 | fi | |
12772 | ||
12773 | # Have a temporary directory for convenience. Make it in the build tree | |
12774 | # simply because there is no reason to put it here, and in addition, | |
12775 | # creating and moving files from /tmp can sometimes cause problems. | |
12776 | # Create a temporary directory, and hook for its removal unless debugging. | |
12777 | $debug || | |
12778 | { | |
12779 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
12780 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
12781 | } | |
861bb6c1 | 12782 | |
ba479fd2 | 12783 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 12784 | |
ba479fd2 NN |
12785 | { |
12786 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
12787 | test -n "$tmp" && test -d "$tmp" | |
12788 | } || | |
12789 | { | |
12790 | tmp=./confstat$$-$RANDOM | |
12791 | (umask 077 && mkdir $tmp) | |
12792 | } || | |
12793 | { | |
12794 | echo "$me: cannot create a temporary directory in ." >&2 | |
12795 | { (exit 1); exit 1; } | |
12796 | } | |
12797 | ||
12798 | _ACEOF | |
12799 | ||
12800 | cat >>$CONFIG_STATUS <<_ACEOF | |
12801 | ||
12802 | # | |
12803 | # CONFIG_FILES section. | |
12804 | # | |
12805 | ||
12806 | # No need to generate the scripts if there are no CONFIG_FILES. | |
12807 | # This happens for instance when ./config.status config.h | |
12808 | if test -n "\$CONFIG_FILES"; then | |
12809 | # Protect against being on the right side of a sed subst in config.status. | |
12810 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
12811 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
12812 | s,@SHELL@,$SHELL,;t t | |
12813 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
12814 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
12815 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
12816 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
12817 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
12818 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
12819 | s,@exec_prefix@,$exec_prefix,;t t | |
12820 | s,@prefix@,$prefix,;t t | |
12821 | s,@program_transform_name@,$program_transform_name,;t t | |
12822 | s,@bindir@,$bindir,;t t | |
12823 | s,@sbindir@,$sbindir,;t t | |
12824 | s,@libexecdir@,$libexecdir,;t t | |
12825 | s,@datadir@,$datadir,;t t | |
12826 | s,@sysconfdir@,$sysconfdir,;t t | |
12827 | s,@sharedstatedir@,$sharedstatedir,;t t | |
12828 | s,@localstatedir@,$localstatedir,;t t | |
12829 | s,@libdir@,$libdir,;t t | |
12830 | s,@includedir@,$includedir,;t t | |
12831 | s,@oldincludedir@,$oldincludedir,;t t | |
12832 | s,@infodir@,$infodir,;t t | |
12833 | s,@mandir@,$mandir,;t t | |
12834 | s,@build_alias@,$build_alias,;t t | |
12835 | s,@host_alias@,$host_alias,;t t | |
12836 | s,@target_alias@,$target_alias,;t t | |
12837 | s,@DEFS@,$DEFS,;t t | |
12838 | s,@ECHO_C@,$ECHO_C,;t t | |
12839 | s,@ECHO_N@,$ECHO_N,;t t | |
12840 | s,@ECHO_T@,$ECHO_T,;t t | |
12841 | s,@LIBS@,$LIBS,;t t | |
12842 | s,@build@,$build,;t t | |
12843 | s,@build_cpu@,$build_cpu,;t t | |
12844 | s,@build_vendor@,$build_vendor,;t t | |
12845 | s,@build_os@,$build_os,;t t | |
12846 | s,@host@,$host,;t t | |
12847 | s,@host_cpu@,$host_cpu,;t t | |
12848 | s,@host_vendor@,$host_vendor,;t t | |
12849 | s,@host_os@,$host_os,;t t | |
12850 | s,@target@,$target,;t t | |
12851 | s,@target_cpu@,$target_cpu,;t t | |
12852 | s,@target_vendor@,$target_vendor,;t t | |
12853 | s,@target_os@,$target_os,;t t | |
12854 | s,@build_subdir@,$build_subdir,;t t | |
12855 | s,@host_subdir@,$host_subdir,;t t | |
12856 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 12857 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
12858 | s,@CC@,$CC,;t t |
12859 | s,@CFLAGS@,$CFLAGS,;t t | |
12860 | s,@LDFLAGS@,$LDFLAGS,;t t | |
12861 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
12862 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
12863 | s,@EXEEXT@,$EXEEXT,;t t | |
12864 | s,@OBJEXT@,$OBJEXT,;t t | |
12865 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
12866 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
12867 | s,@CPP@,$CPP,;t t | |
ba479fd2 NN |
12868 | s,@strict1_warn@,$strict1_warn,;t t |
12869 | s,@warn_cflags@,$warn_cflags,;t t | |
12870 | s,@WERROR@,$WERROR,;t t | |
12871 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 12872 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
12873 | s,@EGREP@,$EGREP,;t t |
12874 | s,@valgrind_path@,$valgrind_path,;t t | |
12875 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
12876 | s,@valgrind_command@,$valgrind_command,;t t | |
12877 | s,@coverage_flags@,$coverage_flags,;t t | |
12878 | s,@enable_multilib@,$enable_multilib,;t t | |
12879 | s,@enable_shared@,$enable_shared,;t t | |
12880 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
12881 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
12882 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
12883 | s,@onestep@,$onestep,;t t | |
12884 | s,@SET_MAKE@,$SET_MAKE,;t t | |
12885 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 12886 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 12887 | s,@LN@,$LN,;t t |
ba479fd2 NN |
12888 | s,@RANLIB@,$RANLIB,;t t |
12889 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 12890 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
12891 | s,@INSTALL@,$INSTALL,;t t |
12892 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
12893 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
12894 | s,@make_compare_target@,$make_compare_target,;t t | |
12895 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
12896 | s,@MAKEINFO@,$MAKEINFO,;t t | |
12897 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
12898 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
12899 | s,@FLEX@,$FLEX,;t t | |
12900 | s,@BISON@,$BISON,;t t | |
12901 | s,@stage1_cflags@,$stage1_cflags,;t t | |
12902 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
12903 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
12904 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
12905 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
12906 | s,@LIBICONV@,$LIBICONV,;t t | |
12907 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t | |
12908 | s,@manext@,$manext,;t t | |
12909 | s,@objext@,$objext,;t t | |
8bb915b6 | 12910 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 NN |
12911 | s,@extra_modes_file@,$extra_modes_file,;t t |
12912 | s,@FORBUILD@,$FORBUILD,;t t | |
12913 | s,@PACKAGE@,$PACKAGE,;t t | |
12914 | s,@VERSION@,$VERSION,;t t | |
12915 | s,@USE_NLS@,$USE_NLS,;t t | |
12916 | s,@LIBINTL@,$LIBINTL,;t t | |
12917 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
12918 | s,@INCINTL@,$INCINTL,;t t | |
12919 | s,@XGETTEXT@,$XGETTEXT,;t t | |
12920 | s,@GMSGFMT@,$GMSGFMT,;t t | |
12921 | s,@POSUB@,$POSUB,;t t | |
12922 | s,@CATALOGS@,$CATALOGS,;t t | |
12923 | s,@CROSS@,$CROSS,;t t | |
12924 | s,@ALL@,$ALL,;t t | |
12925 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
12926 | s,@inhibit_libc@,$inhibit_libc,;t t | |
12927 | s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t | |
12928 | s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t | |
12929 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t | |
12930 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
12931 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
12932 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 12933 | s,@collect2@,$collect2,;t t |
ba479fd2 | 12934 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
12935 | s,@GGC@,$GGC,;t t |
12936 | s,@zlibdir@,$zlibdir,;t t | |
12937 | s,@zlibinc@,$zlibinc,;t t | |
12938 | s,@MAINT@,$MAINT,;t t | |
6de9cd9a DN |
12939 | s,@ANDER@,$ANDER,;t t |
12940 | s,@BANSHEEINC@,$BANSHEEINC,;t t | |
12941 | s,@BANSHEELIB@,$BANSHEELIB,;t t | |
ba479fd2 NN |
12942 | s,@gcc_tooldir@,$gcc_tooldir,;t t |
12943 | s,@dollar@,$dollar,;t t | |
12944 | s,@slibdir@,$slibdir,;t t | |
12945 | s,@objdir@,$objdir,;t t | |
12946 | s,@subdirs@,$subdirs,;t t | |
12947 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
12948 | s,@all_boot_languages@,$all_boot_languages,;t t |
12949 | s,@all_compilers@,$all_compilers,;t t | |
12950 | s,@all_gtfiles@,$all_gtfiles,;t t | |
12951 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
12952 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
12953 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
12954 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
12955 | s,@all_languages@,$all_languages,;t t | |
12956 | s,@all_stagestuff@,$all_stagestuff,;t t | |
12957 | s,@build_exeext@,$build_exeext,;t t | |
12958 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
12959 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
12960 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
12961 | s,@build_xm_defines@,$build_xm_defines,;t t | |
12962 | s,@check_languages@,$check_languages,;t t | |
12963 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
12964 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
12965 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
12966 | s,@xmake_file@,$xmake_file,;t t | |
12967 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 12968 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
12969 | s,@extra_headers_list@,$extra_headers_list,;t t |
12970 | s,@extra_objs@,$extra_objs,;t t | |
12971 | s,@extra_parts@,$extra_parts,;t t | |
12972 | s,@extra_passes@,$extra_passes,;t t | |
12973 | s,@extra_programs@,$extra_programs,;t t | |
12974 | s,@float_h_file@,$float_h_file,;t t | |
12975 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
12976 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
12977 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
12978 | s,@gcc_version@,$gcc_version,;t t | |
12979 | s,@gcc_version_full@,$gcc_version_full,;t t | |
12980 | s,@gcc_version_trigger@,$gcc_version_trigger,;t t | |
12981 | s,@host_exeext@,$host_exeext,;t t | |
ba479fd2 NN |
12982 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
12983 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
12984 | s,@host_xm_defines@,$host_xm_defines,;t t | |
12985 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
12986 | s,@install@,$install,;t t | |
12987 | s,@lang_opt_files@,$lang_opt_files,;t t | |
12988 | s,@lang_specs_files@,$lang_specs_files,;t t | |
12989 | s,@lang_tree_files@,$lang_tree_files,;t t | |
12990 | s,@local_prefix@,$local_prefix,;t t | |
12991 | s,@md_file@,$md_file,;t t | |
12992 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
12993 | s,@out_file@,$out_file,;t t | |
12994 | s,@out_object_file@,$out_object_file,;t t | |
12995 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
12996 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
12997 | s,@symbolic_link@,$symbolic_link,;t t | |
12998 | s,@thread_file@,$thread_file,;t t | |
12999 | s,@tm_file_list@,$tm_file_list,;t t | |
13000 | s,@tm_include_list@,$tm_include_list,;t t | |
13001 | s,@tm_defines@,$tm_defines,;t t | |
13002 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
13003 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
13004 | s,@xm_file_list@,$xm_file_list,;t t | |
13005 | s,@xm_include_list@,$xm_include_list,;t t | |
13006 | s,@xm_defines@,$xm_defines,;t t | |
13007 | s,@target_noncanonical@,$target_noncanonical,;t t | |
13008 | s,@c_target_objs@,$c_target_objs,;t t | |
13009 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
13010 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
13011 | s,@GMPLIBS@,$GMPLIBS,;t t |
13012 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
13013 | s,@LIBOBJS@,$LIBOBJS,;t t |
13014 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
13015 | /@language_hooks@/r $language_hooks | |
13016 | s,@language_hooks@,,;t t | |
13017 | CEOF | |
13018 | ||
13019 | _ACEOF | |
13020 | ||
13021 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13022 | # Split the substitutions into bite-sized pieces for seds with | |
13023 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
13024 | ac_max_sed_lines=48 | |
13025 | ac_sed_frag=1 # Number of current file. | |
13026 | ac_beg=1 # First line for current file. | |
13027 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
13028 | ac_more_lines=: | |
13029 | ac_sed_cmds= | |
13030 | while $ac_more_lines; do | |
13031 | if test $ac_beg -gt 1; then | |
13032 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
13033 | else | |
13034 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
13035 | fi | |
13036 | if test ! -s $tmp/subs.frag; then | |
13037 | ac_more_lines=false | |
13038 | else | |
13039 | # The purpose of the label and of the branching condition is to | |
13040 | # speed up the sed processing (if there are no `@' at all, there | |
13041 | # is no need to browse any of the substitutions). | |
13042 | # These are the two extra sed commands mentioned above. | |
13043 | (echo ':t | |
13044 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
13045 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 13046 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 13047 | else |
86da66b5 | 13048 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
13049 | fi |
13050 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
13051 | ac_beg=$ac_end | |
13052 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
13053 | fi | |
13054 | done | |
13055 | if test -z "$ac_sed_cmds"; then | |
13056 | ac_sed_cmds=cat | |
63cf211a | 13057 | fi |
ba479fd2 | 13058 | fi # test -n "$CONFIG_FILES" |
cafe096b | 13059 | |
ba479fd2 NN |
13060 | _ACEOF |
13061 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13062 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
13063 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
13064 | case $ac_file in | |
13065 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
13066 | cat >$tmp/stdin |
13067 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13068 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 13069 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 13070 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 13071 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 13072 | esac |
cafe096b | 13073 | |
ba479fd2 NN |
13074 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
13075 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
13076 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13077 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
13078 | X"$ac_file" : 'X\(//\)$' \| \ | |
13079 | X"$ac_file" : 'X\(/\)' \| \ | |
13080 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13081 | echo X"$ac_file" | |
13082 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13083 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13084 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13085 | /^X\(\/\).*/{ s//\1/; q; } | |
13086 | s/.*/./; q'` | |
13087 | { if $as_mkdir_p; then | |
13088 | mkdir -p "$ac_dir" | |
13089 | else | |
13090 | as_dir="$ac_dir" | |
13091 | as_dirs= | |
13092 | while test ! -d "$as_dir"; do | |
13093 | as_dirs="$as_dir $as_dirs" | |
13094 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13095 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13096 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
13097 | X"$as_dir" : 'X\(//\)$' \| \ | |
13098 | X"$as_dir" : 'X\(/\)' \| \ | |
13099 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13100 | echo X"$as_dir" | |
13101 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13102 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13103 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13104 | /^X\(\/\).*/{ s//\1/; q; } | |
13105 | s/.*/./; q'` | |
13106 | done | |
13107 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13108 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13109 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13110 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 13111 | |
ba479fd2 NN |
13112 | ac_builddir=. |
13113 | ||
13114 | if test "$ac_dir" != .; then | |
13115 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
13116 | # A "../" for each directory in $ac_dir_suffix. | |
13117 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
13118 | else | |
13119 | ac_dir_suffix= ac_top_builddir= | |
13120 | fi | |
13121 | ||
13122 | case $srcdir in | |
13123 | .) # No --srcdir option. We are building in place. | |
13124 | ac_srcdir=. | |
13125 | if test -z "$ac_top_builddir"; then | |
13126 | ac_top_srcdir=. | |
13127 | else | |
13128 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
13129 | fi ;; | |
13130 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
13131 | ac_srcdir=$srcdir$ac_dir_suffix; | |
13132 | ac_top_srcdir=$srcdir ;; | |
13133 | *) # Relative path. | |
13134 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
13135 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
13136 | esac | |
8ab705be KC |
13137 | |
13138 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
13139 | # the directories may not exist. | |
13140 | case `pwd` in | |
13141 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 13142 | *) |
8ab705be KC |
13143 | case "$ac_dir" in |
13144 | .) ac_abs_builddir=`pwd`;; | |
13145 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
13146 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
13147 | esac;; |
13148 | esac | |
8ab705be | 13149 | case $ac_abs_builddir in |
86da66b5 HPN |
13150 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
13151 | *) | |
13152 | case ${ac_top_builddir}. in | |
8ab705be | 13153 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 13154 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 13155 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
13156 | esac;; |
13157 | esac | |
8ab705be | 13158 | case $ac_abs_builddir in |
86da66b5 HPN |
13159 | .) ac_abs_srcdir=$ac_srcdir;; |
13160 | *) | |
13161 | case $ac_srcdir in | |
8ab705be | 13162 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 13163 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 13164 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
13165 | esac;; |
13166 | esac | |
8ab705be | 13167 | case $ac_abs_builddir in |
86da66b5 HPN |
13168 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
13169 | *) | |
13170 | case $ac_top_srcdir in | |
8ab705be | 13171 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 13172 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 13173 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
13174 | esac;; |
13175 | esac | |
ba479fd2 NN |
13176 | |
13177 | ||
13178 | ||
ba479fd2 NN |
13179 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
13180 | # use $as_me), people would be surprised to read: | |
13181 | # /* config.h. Generated by config.status. */ | |
13182 | if test x"$ac_file" = x-; then | |
13183 | configure_input= | |
13184 | else | |
13185 | configure_input="$ac_file. " | |
13186 | fi | |
13187 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 13188 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
13189 | |
13190 | # First look for the input files in the build tree, otherwise in the | |
13191 | # src tree. | |
13192 | ac_file_inputs=`IFS=: | |
13193 | for f in $ac_file_in; do | |
13194 | case $f in | |
13195 | -) echo $tmp/stdin ;; | |
13196 | [\\/$]*) | |
86da66b5 HPN |
13197 | # Absolute (can't be DOS-style, as IFS=:) |
13198 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13199 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13200 | { (exit 1); exit 1; }; } | |
86da66b5 | 13201 | echo "$f";; |
ba479fd2 | 13202 | *) # Relative |
86da66b5 HPN |
13203 | if test -f "$f"; then |
13204 | # Build tree | |
13205 | echo "$f" | |
13206 | elif test -f "$srcdir/$f"; then | |
13207 | # Source tree | |
13208 | echo "$srcdir/$f" | |
13209 | else | |
13210 | # /dev/null tree | |
13211 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13212 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13213 | { (exit 1); exit 1; }; } | |
86da66b5 | 13214 | fi;; |
ba479fd2 NN |
13215 | esac |
13216 | done` || { (exit 1); exit 1; } | |
d2640b91 PE |
13217 | |
13218 | if test x"$ac_file" != x-; then | |
13219 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
13220 | echo "$as_me: creating $ac_file" >&6;} | |
13221 | rm -f "$ac_file" | |
13222 | fi | |
ba479fd2 NN |
13223 | _ACEOF |
13224 | cat >>$CONFIG_STATUS <<_ACEOF | |
13225 | sed "$ac_vpsub | |
13226 | $extrasub | |
13227 | _ACEOF | |
13228 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13229 | :t | |
13230 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
13231 | s,@configure_input@,$configure_input,;t t | |
13232 | s,@srcdir@,$ac_srcdir,;t t | |
13233 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
13234 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
13235 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
13236 | s,@builddir@,$ac_builddir,;t t | |
13237 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
13238 | s,@top_builddir@,$ac_top_builddir,;t t | |
13239 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
13240 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
13241 | rm -f $tmp/stdin | |
13242 | if test x"$ac_file" != x-; then | |
13243 | mv $tmp/out $ac_file | |
13244 | else | |
13245 | cat $tmp/out | |
13246 | rm -f $tmp/out | |
13247 | fi | |
13248 | ||
13249 | done | |
13250 | _ACEOF | |
13251 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 13252 | |
ba479fd2 NN |
13253 | # |
13254 | # CONFIG_HEADER section. | |
13255 | # | |
861bb6c1 JL |
13256 | |
13257 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
13258 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
13259 | # | |
13260 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
13261 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
13262 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
13263 | ac_dC=' ' |
13264 | ac_dD=',;t' | |
13265 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 13266 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 13267 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 13268 | ac_uC=' ' |
ba479fd2 NN |
13269 | ac_uD=',;t' |
13270 | ||
13271 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 13272 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
13273 | case $ac_file in |
13274 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
13275 | cat >$tmp/stdin |
13276 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13277 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 13278 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 13279 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 13280 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
13281 | esac |
13282 | ||
ba479fd2 NN |
13283 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
13284 | echo "$as_me: creating $ac_file" >&6;} | |
13285 | ||
13286 | # First look for the input files in the build tree, otherwise in the | |
13287 | # src tree. | |
13288 | ac_file_inputs=`IFS=: | |
13289 | for f in $ac_file_in; do | |
13290 | case $f in | |
13291 | -) echo $tmp/stdin ;; | |
13292 | [\\/$]*) | |
86da66b5 HPN |
13293 | # Absolute (can't be DOS-style, as IFS=:) |
13294 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13295 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13296 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
13297 | # Do quote $f, to prevent DOS paths from being IFS'd. |
13298 | echo "$f";; | |
ba479fd2 | 13299 | *) # Relative |
86da66b5 HPN |
13300 | if test -f "$f"; then |
13301 | # Build tree | |
13302 | echo "$f" | |
13303 | elif test -f "$srcdir/$f"; then | |
13304 | # Source tree | |
13305 | echo "$srcdir/$f" | |
13306 | else | |
13307 | # /dev/null tree | |
13308 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13309 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13310 | { (exit 1); exit 1; }; } | |
86da66b5 | 13311 | fi;; |
ba479fd2 NN |
13312 | esac |
13313 | done` || { (exit 1); exit 1; } | |
13314 | # Remove the trailing spaces. | |
86da66b5 | 13315 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
13316 | |
13317 | _ACEOF | |
13318 | ||
13319 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
13320 | # `conftest.undefs', that substitutes the proper values into | |
13321 | # config.h.in to produce config.h. The first handles `#define' | |
13322 | # templates, and the second `#undef' templates. | |
13323 | # And first: Protect against being on the right side of a sed subst in | |
13324 | # config.status. Protect against being in an unquoted here document | |
13325 | # in config.status. | |
13326 | rm -f conftest.defines conftest.undefs | |
13327 | # Using a here document instead of a string reduces the quoting nightmare. | |
13328 | # Putting comments in sed scripts is not portable. | |
13329 | # | |
13330 | # `end' is used to avoid that the second main sed command (meant for | |
13331 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
13332 | # See the Autoconf documentation for `clear'. | |
13333 | cat >confdef2sed.sed <<\_ACEOF | |
13334 | s/[\\&,]/\\&/g | |
13335 | s,[\\$`],\\&,g | |
13336 | t clear | |
13337 | : clear | |
86da66b5 | 13338 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 13339 | t end |
86da66b5 | 13340 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
13341 | : end |
13342 | _ACEOF | |
13343 | # If some macros were called several times there might be several times | |
13344 | # the same #defines, which is useless. Nevertheless, we may not want to | |
13345 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
13346 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
13347 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
13348 | rm -f confdef2sed.sed | |
861bb6c1 JL |
13349 | |
13350 | # This sed command replaces #undef with comments. This is necessary, for | |
13351 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
13352 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 13353 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 13354 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
13355 | _ACEOF |
13356 | ||
13357 | # Break up conftest.defines because some shells have a limit on the size | |
13358 | # of here documents, and old seds have small limits too (100 cmds). | |
13359 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 13360 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
13361 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
13362 | echo ' :' >>$CONFIG_STATUS | |
13363 | rm -f conftest.tail | |
13364 | while grep . conftest.defines >/dev/null | |
13365 | do | |
13366 | # Write a limited-size here document to $tmp/defines.sed. | |
13367 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
13368 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 13369 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
13370 | # Work around the forget-to-reset-the-flag bug. |
13371 | echo 't clr' >>$CONFIG_STATUS | |
13372 | echo ': clr' >>$CONFIG_STATUS | |
13373 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
13374 | echo 'CEOF | |
13375 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
13376 | rm -f $tmp/in | |
13377 | mv $tmp/out $tmp/in | |
13378 | ' >>$CONFIG_STATUS | |
13379 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
13380 | rm -f conftest.defines | |
13381 | mv conftest.tail conftest.defines | |
13382 | done | |
13383 | rm -f conftest.defines | |
13384 | echo ' fi # grep' >>$CONFIG_STATUS | |
13385 | echo >>$CONFIG_STATUS | |
861bb6c1 | 13386 | |
ba479fd2 NN |
13387 | # Break up conftest.undefs because some shells have a limit on the size |
13388 | # of here documents, and old seds have small limits too (100 cmds). | |
13389 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 13390 | rm -f conftest.tail |
ba479fd2 | 13391 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 13392 | do |
ba479fd2 NN |
13393 | # Write a limited-size here document to $tmp/undefs.sed. |
13394 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
13395 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 13396 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
13397 | # Work around the forget-to-reset-the-flag bug. |
13398 | echo 't clr' >>$CONFIG_STATUS | |
13399 | echo ': clr' >>$CONFIG_STATUS | |
13400 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 13401 | echo 'CEOF |
ba479fd2 NN |
13402 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
13403 | rm -f $tmp/in | |
13404 | mv $tmp/out $tmp/in | |
13405 | ' >>$CONFIG_STATUS | |
13406 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
13407 | rm -f conftest.undefs | |
13408 | mv conftest.tail conftest.undefs | |
861bb6c1 | 13409 | done |
ba479fd2 NN |
13410 | rm -f conftest.undefs |
13411 | ||
13412 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13413 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
13414 | # use $as_me), people would be surprised to read: | |
13415 | # /* config.h. Generated by config.status. */ | |
13416 | if test x"$ac_file" = x-; then | |
13417 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 13418 | else |
ba479fd2 | 13419 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 13420 | fi |
ba479fd2 NN |
13421 | cat $tmp/in >>$tmp/config.h |
13422 | rm -f $tmp/in | |
13423 | if test x"$ac_file" != x-; then | |
13424 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
13425 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
13426 | echo "$as_me: $ac_file is unchanged" >&6;} | |
13427 | else | |
13428 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
13429 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13430 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
13431 | X"$ac_file" : 'X\(//\)$' \| \ | |
13432 | X"$ac_file" : 'X\(/\)' \| \ | |
13433 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13434 | echo X"$ac_file" | |
13435 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13436 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13437 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13438 | /^X\(\/\).*/{ s//\1/; q; } | |
13439 | s/.*/./; q'` | |
13440 | { if $as_mkdir_p; then | |
13441 | mkdir -p "$ac_dir" | |
13442 | else | |
13443 | as_dir="$ac_dir" | |
13444 | as_dirs= | |
13445 | while test ! -d "$as_dir"; do | |
13446 | as_dirs="$as_dir $as_dirs" | |
13447 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13448 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13449 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
13450 | X"$as_dir" : 'X\(//\)$' \| \ | |
13451 | X"$as_dir" : 'X\(/\)' \| \ | |
13452 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13453 | echo X"$as_dir" | |
13454 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13455 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13456 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13457 | /^X\(\/\).*/{ s//\1/; q; } | |
13458 | s/.*/./; q'` | |
13459 | done | |
13460 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13461 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13462 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13463 | { (exit 1); exit 1; }; }; } | |
63cf211a | 13464 | |
ba479fd2 NN |
13465 | rm -f $ac_file |
13466 | mv $tmp/config.h $ac_file | |
13467 | fi | |
13468 | else | |
13469 | cat $tmp/config.h | |
13470 | rm -f $tmp/config.h | |
13471 | fi | |
13472 | done | |
13473 | _ACEOF | |
13474 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 13475 | |
ba479fd2 NN |
13476 | # |
13477 | # CONFIG_COMMANDS section. | |
13478 | # | |
13479 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
13480 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
13481 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13482 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
13483 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13484 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
13485 | X"$ac_dest" : 'X\(//\)$' \| \ | |
13486 | X"$ac_dest" : 'X\(/\)' \| \ | |
13487 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13488 | echo X"$ac_dest" | |
13489 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13490 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13491 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13492 | /^X\(\/\).*/{ s//\1/; q; } | |
13493 | s/.*/./; q'` | |
86da66b5 HPN |
13494 | { if $as_mkdir_p; then |
13495 | mkdir -p "$ac_dir" | |
13496 | else | |
13497 | as_dir="$ac_dir" | |
13498 | as_dirs= | |
13499 | while test ! -d "$as_dir"; do | |
13500 | as_dirs="$as_dir $as_dirs" | |
13501 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13502 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
13503 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
13504 | X"$as_dir" : 'X\(//\)$' \| \ | |
13505 | X"$as_dir" : 'X\(/\)' \| \ | |
13506 | . : '\(.\)' 2>/dev/null || | |
13507 | echo X"$as_dir" | | |
13508 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13509 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13510 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13511 | /^X\(\/\).*/{ s//\1/; q; } | |
13512 | s/.*/./; q'` | |
13513 | done | |
13514 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13515 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13516 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13517 | { (exit 1); exit 1; }; }; } | |
13518 | ||
ba479fd2 NN |
13519 | ac_builddir=. |
13520 | ||
13521 | if test "$ac_dir" != .; then | |
13522 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
13523 | # A "../" for each directory in $ac_dir_suffix. | |
13524 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
13525 | else | |
13526 | ac_dir_suffix= ac_top_builddir= | |
13527 | fi | |
13528 | ||
13529 | case $srcdir in | |
13530 | .) # No --srcdir option. We are building in place. | |
13531 | ac_srcdir=. | |
13532 | if test -z "$ac_top_builddir"; then | |
13533 | ac_top_srcdir=. | |
13534 | else | |
13535 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
13536 | fi ;; | |
13537 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
13538 | ac_srcdir=$srcdir$ac_dir_suffix; | |
13539 | ac_top_srcdir=$srcdir ;; | |
13540 | *) # Relative path. | |
13541 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
13542 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
13543 | esac | |
8ab705be KC |
13544 | |
13545 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
13546 | # the directories may not exist. | |
13547 | case `pwd` in | |
13548 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 13549 | *) |
8ab705be KC |
13550 | case "$ac_dir" in |
13551 | .) ac_abs_builddir=`pwd`;; | |
13552 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
13553 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
13554 | esac;; |
13555 | esac | |
8ab705be | 13556 | case $ac_abs_builddir in |
86da66b5 HPN |
13557 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
13558 | *) | |
13559 | case ${ac_top_builddir}. in | |
8ab705be | 13560 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 13561 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 13562 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
13563 | esac;; |
13564 | esac | |
8ab705be | 13565 | case $ac_abs_builddir in |
86da66b5 HPN |
13566 | .) ac_abs_srcdir=$ac_srcdir;; |
13567 | *) | |
13568 | case $ac_srcdir in | |
8ab705be | 13569 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 13570 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 13571 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
13572 | esac;; |
13573 | esac | |
8ab705be | 13574 | case $ac_abs_builddir in |
86da66b5 HPN |
13575 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
13576 | *) | |
13577 | case $ac_top_srcdir in | |
8ab705be | 13578 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 13579 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 13580 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
13581 | esac;; |
13582 | esac | |
ba479fd2 NN |
13583 | |
13584 | ||
13585 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
13586 | echo "$as_me: executing $ac_dest commands" >&6;} | |
13587 | case $ac_dest in | |
13588 | default ) | |
f1faaabd NN |
13589 | case ${CONFIG_HEADERS} in |
13590 | *auto-host.h:config.in*) | |
13591 | echo > cstamp-h ;; | |
861bb6c1 | 13592 | esac |
2ed26f6b | 13593 | # Make sure all the subdirs exist. |
c406e779 | 13594 | for d in $subdirs |
2ed26f6b | 13595 | do |
2ed26f6b | 13596 | test -d $d || mkdir $d |
2ed26f6b | 13597 | done |
93cf819d BK |
13598 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
13599 | # bootstrapping and the installation procedure can still use | |
13600 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
13601 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
13602 | # This is virtually a duplicate of what happens in configure.lang; we do | |
13603 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 13604 | if test "$symbolic_link" = "ln -s"; then |
c406e779 | 13605 | for d in ${subdirs} fixinc ; do |
1e6347d8 | 13606 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 13607 | cd $d |
6a1b7268 | 13608 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
13609 | do |
13610 | rm -f $t | |
13611 | $symbolic_link ../$t $t 2>/dev/null | |
13612 | done | |
13613 | cd $STARTDIR | |
93cf819d BK |
13614 | done |
13615 | else true ; fi | |
ba479fd2 NN |
13616 | ;; |
13617 | esac | |
13618 | done | |
13619 | _ACEOF | |
cafe096b | 13620 | |
ba479fd2 NN |
13621 | cat >>$CONFIG_STATUS <<\_ACEOF |
13622 | ||
13623 | { (exit 0); exit 0; } | |
13624 | _ACEOF | |
861bb6c1 | 13625 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
13626 | ac_clean_files=$ac_clean_files_save |
13627 | ||
13628 | ||
13629 | # configure is writing to config.log, and then calls config.status. | |
13630 | # config.status does its own redirection, appending to config.log. | |
13631 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
13632 | # by configure, so config.status won't be able to write to it; its | |
13633 | # output is simply discarded. So we exec the FD to /dev/null, | |
13634 | # effectively closing config.log, so it can be properly (re)opened and | |
13635 | # appended to by config.status. When coming back to configure, we | |
13636 | # need to make the FD available again. | |
13637 | if test "$no_create" != yes; then | |
13638 | ac_cs_success=: | |
13639 | ac_config_status_args= | |
13640 | test "$silent" = yes && | |
13641 | ac_config_status_args="$ac_config_status_args --quiet" | |
13642 | exec 5>/dev/null | |
13643 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
13644 | exec 5>>config.log | |
13645 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
13646 | # would make configure fail if this is the last instruction. | |
13647 | $ac_cs_success || { (exit 1); exit 1; } | |
13648 | fi | |
861bb6c1 | 13649 |