]>
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 | ||
45c8116d | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP 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 NM AR 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 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 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 | 873 | --enable-coverage=LEVEL |
fb38008e | 874 | enable compiler's code coverage collection. |
ba479fd2 NN |
875 | Use to measure compiler performance and locate |
876 | unused parts of the compiler. With LEVEL, specify | |
877 | optimization. Values are opt, noopt, | |
878 | default is noopt | |
879 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
880 | --enable-multilib enable library support for multiple ABIs | |
881 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
882 | --enable-threads enable thread usage for target GCC | |
883 | --enable-threads=LIB use LIB thread package for target GCC | |
884 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
885 | the GNU Objective-C runtime | |
886 | --disable-shared don't provide a shared libgcc | |
887 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 888 | --enable-languages=LIST specify which front-ends to build |
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 | |
fb38008e | 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 | 1509 | |
392765bf NN |
1510 | |
1511 | ||
caa55b1e | 1512 | # Determine the target- and build-specific subdirectories |
4665e56c NN |
1513 | # Prefix 'build-' so this never conflicts with target_subdir. |
1514 | build_subdir="build-${build_noncanonical}" | |
1515 | # Not really a subdirectory, but here for completeness. | |
1516 | host_subdir=. | |
1517 | # No prefix. | |
1518 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1519 | |
73458fb7 | 1520 | |
093e61a6 | 1521 | # Set program_transform_name |
13c22933 | 1522 | test "$program_prefix" != NONE && |
ba479fd2 | 1523 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1524 | # Use a double $ so make ignores it. |
1525 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1526 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1527 | # Double any \ or $. echo might interpret backslashes. | |
1528 | # By default was `s,x,x', remove it if useless. | |
1529 | cat <<\_ACEOF >conftest.sed | |
1530 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1531 | _ACEOF | |
1532 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1533 | rm conftest.sed | |
13c22933 JJ |
1534 | |
1535 | ||
34a86c2b NN |
1536 | # Check for bogus environment variables. |
1537 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1538 | # since this would lead to problems installing/building glibc. | |
1539 | # LIBRARY_PATH contains the current directory if one of the following | |
1540 | # is true: | |
1541 | # - one of the terminals (":" and ";") is the first or last sign | |
1542 | # - two terminals occur directly after each other | |
1543 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1544 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1545 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1546 | case ${LIBRARY_PATH} in |
1547 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1548 | library_path_setting="contains current directory" | |
1549 | ;; | |
1550 | *) | |
1551 | library_path_setting="ok" | |
1552 | ;; | |
1553 | esac | |
ba479fd2 NN |
1554 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1555 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1556 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1557 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1558 | *** LIBRARY_PATH shouldn't contain the current directory when |
1559 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1560 | *** and run configure again." >&5 |
1561 | echo "$as_me: error: | |
1562 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1563 | *** building gcc. Please change the environment variable | |
1564 | *** and run configure again." >&2;} | |
1565 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1566 | fi |
1567 | ||
34a86c2b NN |
1568 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1569 | # since this would lead to problems installing/building glibc. | |
1570 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1571 | # is true: | |
1572 | # - one of the terminals (":" and ";") is the first or last sign | |
1573 | # - two terminals occur directly after each other | |
1574 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1575 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1576 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1577 | case ${GCC_EXEC_PREFIX} in |
1578 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1579 | gcc_exec_prefix_setting="contains current directory" | |
1580 | ;; | |
1581 | *) | |
1582 | gcc_exec_prefix_setting="ok" | |
1583 | ;; | |
1584 | esac | |
ba479fd2 NN |
1585 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1586 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1587 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1588 | { { echo "$as_me:$LINENO: error: |
1589 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1590 | *** building gcc. Please change the environment variable | |
1591 | *** and run configure again." >&5 | |
1592 | echo "$as_me: error: | |
cafe096b EC |
1593 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1594 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1595 | *** and run configure again." >&2;} |
1596 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1597 | fi |
1598 | ||
1599 | # ----------- | |
1600 | # Directories | |
1601 | # ----------- | |
1602 | ||
1603 | # Specify the local prefix | |
1604 | local_prefix= | |
ba479fd2 | 1605 | |
34a86c2b NN |
1606 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1607 | if test "${with_local_prefix+set}" = set; then | |
1608 | withval="$with_local_prefix" | |
1609 | case "${withval}" in | |
ba479fd2 NN |
1610 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1611 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1612 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1613 | no) ;; |
1614 | *) local_prefix=$with_local_prefix ;; | |
1615 | esac | |
ba479fd2 | 1616 | fi; |
34a86c2b NN |
1617 | |
1618 | # Default local prefix if it is empty | |
1619 | if test x$local_prefix = x; then | |
1620 | local_prefix=/usr/local | |
1621 | fi | |
1622 | ||
1623 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1624 | # passed in by the toplevel make and thus we'd get different behavior | |
1625 | # depending on where we built the sources. | |
1626 | gcc_gxx_include_dir= | |
1627 | # Specify the g++ header file directory | |
ba479fd2 | 1628 | |
34a86c2b NN |
1629 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1630 | if test "${with_gxx_include_dir+set}" = set; then | |
1631 | withval="$with_gxx_include_dir" | |
1632 | case "${withval}" in | |
ba479fd2 NN |
1633 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1634 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1635 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1636 | no) ;; |
1637 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1638 | esac | |
ba479fd2 | 1639 | fi; |
34a86c2b NN |
1640 | |
1641 | if test x${gcc_gxx_include_dir} = x; then | |
1642 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1643 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1644 | else | |
1645 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
1646 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
1647 | fi | |
1648 | fi | |
1649 | ||
ba479fd2 | 1650 | |
34a86c2b NN |
1651 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1652 | if test "${with_cpp_install_dir+set}" = set; then | |
1653 | withval="$with_cpp_install_dir" | |
1654 | if test x$withval = xyes; then | |
ba479fd2 NN |
1655 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1656 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1657 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1658 | elif test x$withval != xno; then |
1659 | cpp_install_dir=$withval | |
1660 | fi | |
ba479fd2 | 1661 | fi; |
34a86c2b | 1662 | |
51b9ff45 | 1663 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1664 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1665 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1666 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1667 | # just that. |
1668 | ||
03787dfd KC |
1669 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1670 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1671 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1672 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1673 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1674 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1675 | else |
03787dfd | 1676 | generated_files_in_srcdir=no |
ba479fd2 | 1677 | fi; |
51b9ff45 | 1678 | |
03787dfd KC |
1679 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1680 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1681 | ||
1682 | if test "$generated_files_in_srcdir" = "yes"; then | |
1683 | GENINSRC='' | |
03787dfd KC |
1684 | else |
1685 | GENINSRC='#' | |
03787dfd KC |
1686 | fi |
1687 | ||
1688 | ||
34a86c2b NN |
1689 | # ------------------- |
1690 | # Find default linker | |
1691 | # ------------------- | |
1692 | ||
1693 | # With GNU ld | |
ba479fd2 | 1694 | |
34a86c2b NN |
1695 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1696 | if test "${with_gnu_ld+set}" = set; then | |
1697 | withval="$with_gnu_ld" | |
1698 | gnu_ld_flag="$with_gnu_ld" | |
1699 | else | |
1700 | gnu_ld_flag=no | |
ba479fd2 | 1701 | fi; |
6e3f3080 | 1702 | |
63cf211a | 1703 | # With pre-defined ld |
ba479fd2 | 1704 | |
34a86c2b NN |
1705 | # Check whether --with-ld or --without-ld was given. |
1706 | if test "${with_ld+set}" = set; then | |
1707 | withval="$with_ld" | |
1708 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1709 | fi; |
34a86c2b NN |
1710 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1711 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1712 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1713 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1714 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1715 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1716 | gnu_ld_flag=yes | |
1717 | fi | |
ba479fd2 NN |
1718 | |
1719 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1720 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1721 | _ACEOF |
34a86c2b NN |
1722 | |
1723 | fi | |
1724 | ||
ba479fd2 NN |
1725 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1726 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1727 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1728 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1729 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1730 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1731 | else |
ba479fd2 NN |
1732 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1733 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1734 | fi |
1735 | else | |
ba479fd2 NN |
1736 | echo "$as_me:$LINENO: result: no" >&5 |
1737 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1738 | fi |
1739 | ||
d594623a L |
1740 | # With demangler in GNU ld |
1741 | ||
1742 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1743 | if test "${with_demangler_in_ld+set}" = set; then | |
1744 | withval="$with_demangler_in_ld" | |
1745 | demangler_in_ld="$with_demangler_in_ld" | |
1746 | else | |
1747 | demangler_in_ld=no | |
1748 | fi; | |
1749 | ||
34a86c2b NN |
1750 | # ---------------------- |
1751 | # Find default assembler | |
1752 | # ---------------------- | |
1753 | ||
1754 | # With GNU as | |
ba479fd2 | 1755 | |
34a86c2b NN |
1756 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1757 | if test "${with_gnu_as+set}" = set; then | |
1758 | withval="$with_gnu_as" | |
1759 | gas_flag="$with_gnu_as" | |
1760 | else | |
1761 | gas_flag=no | |
ba479fd2 | 1762 | fi; |
34a86c2b NN |
1763 | |
1764 | ||
1765 | # Check whether --with-as or --without-as was given. | |
1766 | if test "${with_as+set}" = set; then | |
1767 | withval="$with_as" | |
1768 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1769 | fi; |
34a86c2b NN |
1770 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1771 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1772 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1773 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1774 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1775 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1776 | gas_flag=yes | |
1777 | fi | |
ba479fd2 NN |
1778 | |
1779 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1780 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1781 | _ACEOF |
34a86c2b NN |
1782 | |
1783 | fi | |
1784 | ||
ba479fd2 NN |
1785 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1786 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1787 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1788 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1789 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1790 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1791 | else |
ba479fd2 NN |
1792 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1793 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1794 | fi |
1795 | else | |
ba479fd2 NN |
1796 | echo "$as_me:$LINENO: result: no" >&5 |
1797 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1798 | fi |
1799 | ||
1800 | # --------------- | |
1801 | # Find C compiler | |
1802 | # --------------- | |
1803 | ||
426ca3ca RO |
1804 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1805 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1806 | # file, even when creating an executable, so an execution test fails. | |
1807 | # Remove possible default executable files to avoid this. | |
1808 | # | |
1809 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1810 | # Autoconf includes it. | |
1811 | rm -f a.out a.exe b.out | |
1812 | ||
34a86c2b | 1813 | # Find the native compiler |
ba479fd2 NN |
1814 | ac_ext=c |
1815 | ac_cpp='$CPP $CPPFLAGS' | |
1816 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1817 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1818 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1819 | if test -n "$ac_tool_prefix"; then | |
1820 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1821 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1822 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1823 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1824 | if test "${ac_cv_prog_CC+set}" = set; then | |
1825 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1826 | else | |
1827 | if test -n "$CC"; then | |
1828 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1829 | else | |
1830 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1831 | for as_dir in $PATH | |
1832 | do | |
1833 | IFS=$as_save_IFS | |
1834 | test -z "$as_dir" && as_dir=. | |
1835 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1836 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1837 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1838 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1839 | break 2 | |
1840 | fi | |
1841 | done | |
1842 | done | |
1843 | ||
1844 | fi | |
1845 | fi | |
1846 | CC=$ac_cv_prog_CC | |
1847 | if test -n "$CC"; then | |
1848 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1849 | echo "${ECHO_T}$CC" >&6 | |
1850 | else | |
1851 | echo "$as_me:$LINENO: result: no" >&5 | |
1852 | echo "${ECHO_T}no" >&6 | |
1853 | fi | |
1854 | ||
1855 | fi | |
1856 | if test -z "$ac_cv_prog_CC"; then | |
1857 | ac_ct_CC=$CC | |
1858 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1859 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1860 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1861 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1862 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1863 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1864 | else | |
1865 | if test -n "$ac_ct_CC"; then | |
1866 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1867 | else | |
1868 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1869 | for as_dir in $PATH | |
1870 | do | |
1871 | IFS=$as_save_IFS | |
1872 | test -z "$as_dir" && as_dir=. | |
1873 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1874 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1875 | ac_cv_prog_ac_ct_CC="gcc" | |
1876 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1877 | break 2 | |
1878 | fi | |
1879 | done | |
1880 | done | |
1881 | ||
1882 | fi | |
1883 | fi | |
1884 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1885 | if test -n "$ac_ct_CC"; then | |
1886 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1887 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1888 | else | |
1889 | echo "$as_me:$LINENO: result: no" >&5 | |
1890 | echo "${ECHO_T}no" >&6 | |
1891 | fi | |
1892 | ||
1893 | CC=$ac_ct_CC | |
1894 | else | |
1895 | CC="$ac_cv_prog_CC" | |
1896 | fi | |
1897 | ||
1898 | if test -z "$CC"; then | |
1899 | if test -n "$ac_tool_prefix"; then | |
1900 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1901 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1902 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1903 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1904 | if test "${ac_cv_prog_CC+set}" = set; then | |
1905 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1906 | else |
1907 | if test -n "$CC"; then | |
1908 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1909 | else | |
ba479fd2 NN |
1910 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1911 | for as_dir in $PATH | |
1912 | do | |
1913 | IFS=$as_save_IFS | |
1914 | test -z "$as_dir" && as_dir=. | |
1915 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1916 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1917 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1918 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1919 | break 2 | |
1920 | fi | |
1921 | done | |
1922 | done | |
1923 | ||
cd9e5e7c MK |
1924 | fi |
1925 | fi | |
ba479fd2 | 1926 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1927 | if test -n "$CC"; then |
ba479fd2 NN |
1928 | echo "$as_me:$LINENO: result: $CC" >&5 |
1929 | echo "${ECHO_T}$CC" >&6 | |
1930 | else | |
1931 | echo "$as_me:$LINENO: result: no" >&5 | |
1932 | echo "${ECHO_T}no" >&6 | |
1933 | fi | |
1934 | ||
1935 | fi | |
1936 | if test -z "$ac_cv_prog_CC"; then | |
1937 | ac_ct_CC=$CC | |
1938 | # Extract the first word of "cc", so it can be a program name with args. | |
1939 | set dummy cc; ac_word=$2 | |
1940 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1941 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1942 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1943 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1944 | else | |
1945 | if test -n "$ac_ct_CC"; then | |
1946 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1947 | else | |
1948 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1949 | for as_dir in $PATH | |
1950 | do | |
1951 | IFS=$as_save_IFS | |
1952 | test -z "$as_dir" && as_dir=. | |
1953 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1954 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1955 | ac_cv_prog_ac_ct_CC="cc" | |
1956 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1957 | break 2 | |
1958 | fi | |
1959 | done | |
1960 | done | |
1961 | ||
1962 | fi | |
1963 | fi | |
1964 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1965 | if test -n "$ac_ct_CC"; then | |
1966 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1967 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1968 | else | |
1969 | echo "$as_me:$LINENO: result: no" >&5 | |
1970 | echo "${ECHO_T}no" >&6 | |
1971 | fi | |
1972 | ||
1973 | CC=$ac_ct_CC | |
cd9e5e7c | 1974 | else |
ba479fd2 | 1975 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1976 | fi |
6e3f3080 | 1977 | |
ba479fd2 | 1978 | fi |
6e3f3080 NN |
1979 | if test -z "$CC"; then |
1980 | # Extract the first word of "cc", so it can be a program name with args. | |
1981 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1982 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1983 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1984 | if test "${ac_cv_prog_CC+set}" = set; then | |
1985 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
1986 | else |
1987 | if test -n "$CC"; then | |
1988 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1989 | else | |
1990 | ac_prog_rejected=no | |
ba479fd2 NN |
1991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1992 | for as_dir in $PATH | |
1993 | do | |
1994 | IFS=$as_save_IFS | |
1995 | test -z "$as_dir" && as_dir=. | |
1996 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1997 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1998 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1999 | ac_prog_rejected=yes | |
2000 | continue | |
2001 | fi | |
2002 | ac_cv_prog_CC="cc" | |
2003 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2004 | break 2 | |
2005 | fi | |
2006 | done | |
2007 | done | |
2008 | ||
6e3f3080 NN |
2009 | if test $ac_prog_rejected = yes; then |
2010 | # We found a bogon in the path, so make sure we never use it. | |
2011 | set dummy $ac_cv_prog_CC | |
2012 | shift | |
ba479fd2 | 2013 | if test $# != 0; then |
6e3f3080 NN |
2014 | # We chose a different compiler from the bogus one. |
2015 | # However, it has the same basename, so the bogon will be chosen | |
2016 | # first if we set CC to just the basename; use the full file name. | |
2017 | shift | |
ba479fd2 | 2018 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2019 | fi |
6e3f3080 NN |
2020 | fi |
2021 | fi | |
2022 | fi | |
ba479fd2 | 2023 | CC=$ac_cv_prog_CC |
6e3f3080 | 2024 | if test -n "$CC"; then |
ba479fd2 NN |
2025 | echo "$as_me:$LINENO: result: $CC" >&5 |
2026 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2027 | else |
ba479fd2 NN |
2028 | echo "$as_me:$LINENO: result: no" >&5 |
2029 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2030 | fi |
6e3f3080 | 2031 | |
ba479fd2 NN |
2032 | fi |
2033 | if test -z "$CC"; then | |
2034 | if test -n "$ac_tool_prefix"; then | |
2035 | for ac_prog in cl | |
2036 | do | |
2037 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2038 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2039 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2040 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2041 | if test "${ac_cv_prog_CC+set}" = set; then | |
2042 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2043 | else |
6e3f3080 NN |
2044 | if test -n "$CC"; then |
2045 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2046 | else | |
ba479fd2 NN |
2047 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2048 | for as_dir in $PATH | |
2049 | do | |
2050 | IFS=$as_save_IFS | |
2051 | test -z "$as_dir" && as_dir=. | |
2052 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2053 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2054 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2055 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2056 | break 2 | |
2057 | fi | |
2058 | done | |
2059 | done | |
2060 | ||
093e61a6 | 2061 | fi |
6e3f3080 | 2062 | fi |
ba479fd2 | 2063 | CC=$ac_cv_prog_CC |
6e3f3080 | 2064 | if test -n "$CC"; then |
ba479fd2 NN |
2065 | echo "$as_me:$LINENO: result: $CC" >&5 |
2066 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2067 | else |
ba479fd2 NN |
2068 | echo "$as_me:$LINENO: result: no" >&5 |
2069 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2070 | fi |
cafe096b | 2071 | |
ba479fd2 NN |
2072 | test -n "$CC" && break |
2073 | done | |
2074 | fi | |
2075 | if test -z "$CC"; then | |
2076 | ac_ct_CC=$CC | |
2077 | for ac_prog in cl | |
2078 | do | |
2079 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2080 | set dummy $ac_prog; ac_word=$2 | |
2081 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2082 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2083 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2084 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2085 | else | |
2086 | if test -n "$ac_ct_CC"; then | |
2087 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2088 | else | |
2089 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2090 | for as_dir in $PATH | |
2091 | do | |
2092 | IFS=$as_save_IFS | |
2093 | test -z "$as_dir" && as_dir=. | |
2094 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2095 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2096 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2097 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2098 | break 2 | |
2099 | fi | |
2100 | done | |
2101 | done | |
6e3f3080 | 2102 | |
ba479fd2 NN |
2103 | fi |
2104 | fi | |
2105 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2106 | if test -n "$ac_ct_CC"; then | |
2107 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2108 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2109 | else | |
2110 | echo "$as_me:$LINENO: result: no" >&5 | |
2111 | echo "${ECHO_T}no" >&6 | |
2112 | fi | |
6e3f3080 | 2113 | |
ba479fd2 NN |
2114 | test -n "$ac_ct_CC" && break |
2115 | done | |
63cf211a | 2116 | |
ba479fd2 NN |
2117 | CC=$ac_ct_CC |
2118 | fi | |
2119 | ||
2120 | fi | |
2121 | ||
2122 | ||
2123 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2124 | See \`config.log' for more details." >&5 | |
2125 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2126 | See \`config.log' for more details." >&2;} | |
2127 | { (exit 1); exit 1; }; } | |
2128 | ||
2129 | # Provide some information about the compiler. | |
2130 | echo "$as_me:$LINENO:" \ | |
2131 | "checking for C compiler version" >&5 | |
2132 | ac_compiler=`set X $ac_compile; echo $2` | |
2133 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2134 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2135 | ac_status=$? | |
2136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2137 | (exit $ac_status); } | |
2138 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2139 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2140 | ac_status=$? | |
2141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2142 | (exit $ac_status); } | |
2143 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2144 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2145 | ac_status=$? | |
2146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2147 | (exit $ac_status); } | |
2148 | ||
2149 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2150 | /* confdefs.h. */ |
2151 | _ACEOF | |
2152 | cat confdefs.h >>conftest.$ac_ext | |
2153 | cat >>conftest.$ac_ext <<_ACEOF | |
2154 | /* end confdefs.h. */ | |
2155 | ||
2156 | int | |
2157 | main () | |
2158 | { | |
63cf211a | 2159 | |
ba479fd2 NN |
2160 | ; |
2161 | return 0; | |
2162 | } | |
2163 | _ACEOF | |
2164 | ac_clean_files_save=$ac_clean_files | |
2165 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2166 | # Try to create an executable without -o first, disregard a.out. | |
2167 | # It will help us diagnose broken compilers, and finding out an intuition | |
2168 | # of exeext. | |
86da66b5 HPN |
2169 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2170 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2171 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2172 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2173 | (eval $ac_link_default) 2>&5 | |
2174 | ac_status=$? | |
2175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2176 | (exit $ac_status); }; then | |
2177 | # Find the output, starting from the most likely. This scheme is | |
2178 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2179 | # resort. | |
2180 | ||
2181 | # Be careful to initialize this variable, since it used to be cached. | |
2182 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2183 | ac_cv_exeext= | |
2184 | # b.out is created by i960 compilers. | |
2185 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2186 | do | |
2187 | test -f "$ac_file" || continue | |
2188 | case $ac_file in | |
2189 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2190 | ;; |
ba479fd2 | 2191 | conftest.$ac_ext ) |
86da66b5 HPN |
2192 | # This is the source file. |
2193 | ;; | |
ba479fd2 | 2194 | [ab].out ) |
86da66b5 HPN |
2195 | # We found the default executable, but exeext='' is most |
2196 | # certainly right. | |
2197 | break;; | |
ba479fd2 | 2198 | *.* ) |
86da66b5 HPN |
2199 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2200 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2201 | # but it would be cool to find out if it's true. Does anybody | |
2202 | # maintain Libtool? --akim. | |
2203 | export ac_cv_exeext | |
2204 | break;; | |
ba479fd2 | 2205 | * ) |
86da66b5 | 2206 | break;; |
ba479fd2 NN |
2207 | esac |
2208 | done | |
2209 | else | |
2210 | echo "$as_me: failed program was:" >&5 | |
2211 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2212 | ||
2213 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2214 | See \`config.log' for more details." >&5 | |
2215 | echo "$as_me: error: C compiler cannot create executables | |
2216 | See \`config.log' for more details." >&2;} | |
2217 | { (exit 77); exit 77; }; } | |
2218 | fi | |
2219 | ||
2220 | ac_exeext=$ac_cv_exeext | |
2221 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2222 | echo "${ECHO_T}$ac_file" >&6 | |
2223 | ||
2224 | # Check the compiler produces executables we can run. If not, either | |
2225 | # the compiler is broken, or we cross compile. | |
2226 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2227 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2228 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2229 | # If not cross compiling, check that we can run a simple program. | |
2230 | if test "$cross_compiling" != yes; then | |
2231 | if { ac_try='./$ac_file' | |
2232 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2233 | (eval $ac_try) 2>&5 | |
2234 | ac_status=$? | |
2235 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2236 | (exit $ac_status); }; }; then | |
2237 | cross_compiling=no | |
6e3f3080 | 2238 | else |
ba479fd2 NN |
2239 | if test "$cross_compiling" = maybe; then |
2240 | cross_compiling=yes | |
2241 | else | |
2242 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2243 | If you meant to cross compile, use \`--host'. | |
2244 | See \`config.log' for more details." >&5 | |
2245 | echo "$as_me: error: cannot run C compiled programs. | |
2246 | If you meant to cross compile, use \`--host'. | |
2247 | See \`config.log' for more details." >&2;} | |
2248 | { (exit 1); exit 1; }; } | |
2249 | fi | |
6e3f3080 NN |
2250 | fi |
2251 | fi | |
ba479fd2 NN |
2252 | echo "$as_me:$LINENO: result: yes" >&5 |
2253 | echo "${ECHO_T}yes" >&6 | |
2254 | ||
2255 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2256 | ac_clean_files=$ac_clean_files_save | |
2257 | # Check the compiler produces executables we can run. If not, either | |
2258 | # the compiler is broken, or we cross compile. | |
2259 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2260 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2261 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2262 | echo "${ECHO_T}$cross_compiling" >&6 | |
2263 | ||
2264 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2265 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2266 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2267 | (eval $ac_link) 2>&5 | |
2268 | ac_status=$? | |
2269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2270 | (exit $ac_status); }; then | |
2271 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2272 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2273 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2274 | # `rm'. | |
2275 | for ac_file in conftest.exe conftest conftest.*; do | |
2276 | test -f "$ac_file" || continue | |
2277 | case $ac_file in | |
2278 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2279 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2280 | export ac_cv_exeext |
2281 | break;; | |
ba479fd2 NN |
2282 | * ) break;; |
2283 | esac | |
2284 | done | |
e9a25f70 | 2285 | else |
ba479fd2 NN |
2286 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2287 | See \`config.log' for more details." >&5 | |
2288 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2289 | See \`config.log' for more details." >&2;} | |
2290 | { (exit 1); exit 1; }; } | |
2291 | fi | |
2292 | ||
2293 | rm -f conftest$ac_cv_exeext | |
2294 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2295 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2296 | ||
2297 | rm -f conftest.$ac_ext | |
2298 | EXEEXT=$ac_cv_exeext | |
2299 | ac_exeext=$EXEEXT | |
2300 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2301 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2302 | if test "${ac_cv_objext+set}" = set; then | |
2303 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2304 | else | |
2305 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2306 | /* confdefs.h. */ |
2307 | _ACEOF | |
2308 | cat confdefs.h >>conftest.$ac_ext | |
2309 | cat >>conftest.$ac_ext <<_ACEOF | |
2310 | /* end confdefs.h. */ | |
2311 | ||
2312 | int | |
2313 | main () | |
2314 | { | |
6e3f3080 | 2315 | |
ba479fd2 NN |
2316 | ; |
2317 | return 0; | |
2318 | } | |
2319 | _ACEOF | |
2320 | rm -f conftest.o conftest.obj | |
2321 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2322 | (eval $ac_compile) 2>&5 | |
2323 | ac_status=$? | |
2324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2325 | (exit $ac_status); }; then | |
2326 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2327 | case $ac_file in | |
2328 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2329 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2330 | break;; | |
2331 | esac | |
2332 | done | |
63cf211a | 2333 | else |
ba479fd2 NN |
2334 | echo "$as_me: failed program was:" >&5 |
2335 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2336 | ||
2337 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2338 | See \`config.log' for more details." >&5 | |
2339 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2340 | See \`config.log' for more details." >&2;} | |
2341 | { (exit 1); exit 1; }; } | |
2342 | fi | |
2343 | ||
2344 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2345 | fi | |
2346 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2347 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2348 | OBJEXT=$ac_cv_objext | |
2349 | ac_objext=$OBJEXT | |
2350 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2351 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2352 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2353 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2354 | else | |
2355 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2356 | /* confdefs.h. */ |
2357 | _ACEOF | |
2358 | cat confdefs.h >>conftest.$ac_ext | |
2359 | cat >>conftest.$ac_ext <<_ACEOF | |
2360 | /* end confdefs.h. */ | |
2361 | ||
2362 | int | |
2363 | main () | |
2364 | { | |
2365 | #ifndef __GNUC__ | |
2366 | choke me | |
2367 | #endif | |
6e3f3080 | 2368 | |
ba479fd2 NN |
2369 | ; |
2370 | return 0; | |
2371 | } | |
2372 | _ACEOF | |
2373 | rm -f conftest.$ac_objext | |
2374 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2375 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2376 | ac_status=$? |
86da66b5 HPN |
2377 | grep -v '^ *+' conftest.er1 >conftest.err |
2378 | rm -f conftest.er1 | |
2379 | cat conftest.err >&5 | |
ba479fd2 NN |
2380 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2381 | (exit $ac_status); } && | |
fb38008e | 2382 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2383 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2384 | (eval $ac_try) 2>&5 | |
2385 | ac_status=$? | |
2386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2387 | (exit $ac_status); }; } && | |
2388 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2390 | (eval $ac_try) 2>&5 | |
2391 | ac_status=$? | |
2392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2393 | (exit $ac_status); }; }; then | |
2394 | ac_compiler_gnu=yes | |
2395 | else | |
2396 | echo "$as_me: failed program was:" >&5 | |
2397 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2398 | ||
2399 | ac_compiler_gnu=no | |
2400 | fi | |
86da66b5 | 2401 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2402 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2403 | ||
2404 | fi | |
2405 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2406 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2407 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2408 | ac_test_CFLAGS=${CFLAGS+set} | |
2409 | ac_save_CFLAGS=$CFLAGS | |
2410 | CFLAGS="-g" | |
2411 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2412 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2413 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2414 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2415 | else | |
2416 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2417 | /* confdefs.h. */ |
2418 | _ACEOF | |
2419 | cat confdefs.h >>conftest.$ac_ext | |
2420 | cat >>conftest.$ac_ext <<_ACEOF | |
2421 | /* end confdefs.h. */ | |
2422 | ||
2423 | int | |
2424 | main () | |
2425 | { | |
2426 | ||
2427 | ; | |
2428 | return 0; | |
2429 | } | |
2430 | _ACEOF | |
2431 | rm -f conftest.$ac_objext | |
2432 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2433 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2434 | ac_status=$? |
86da66b5 HPN |
2435 | grep -v '^ *+' conftest.er1 >conftest.err |
2436 | rm -f conftest.er1 | |
2437 | cat conftest.err >&5 | |
ba479fd2 NN |
2438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2439 | (exit $ac_status); } && | |
fb38008e | 2440 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2442 | (eval $ac_try) 2>&5 | |
2443 | ac_status=$? | |
2444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2445 | (exit $ac_status); }; } && | |
2446 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2447 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2448 | (eval $ac_try) 2>&5 | |
2449 | ac_status=$? | |
2450 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2451 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2452 | ac_cv_prog_cc_g=yes |
2453 | else | |
ba479fd2 NN |
2454 | echo "$as_me: failed program was:" >&5 |
2455 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2456 | |
ba479fd2 | 2457 | ac_cv_prog_cc_g=no |
6e3f3080 | 2458 | fi |
86da66b5 | 2459 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2460 | fi |
2461 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2462 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2463 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2464 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2465 | elif test $ac_cv_prog_cc_g = yes; then |
2466 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2467 | CFLAGS="-g -O2" |
2468 | else | |
cd9e5e7c | 2469 | CFLAGS="-g" |
81814e35 | 2470 | fi |
3723cad9 | 2471 | else |
cd9e5e7c MK |
2472 | if test "$GCC" = yes; then |
2473 | CFLAGS="-O2" | |
2474 | else | |
2475 | CFLAGS= | |
2476 | fi | |
e9a25f70 | 2477 | fi |
ba479fd2 NN |
2478 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2479 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2480 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2481 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2482 | else | |
2483 | ac_cv_prog_cc_stdc=no | |
2484 | ac_save_CC=$CC | |
2485 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2486 | /* confdefs.h. */ |
2487 | _ACEOF | |
2488 | cat confdefs.h >>conftest.$ac_ext | |
2489 | cat >>conftest.$ac_ext <<_ACEOF | |
2490 | /* end confdefs.h. */ | |
2491 | #include <stdarg.h> | |
2492 | #include <stdio.h> | |
2493 | #include <sys/types.h> | |
2494 | #include <sys/stat.h> | |
2495 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2496 | struct buf { int x; }; | |
2497 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2498 | static char *e (p, i) | |
2499 | char **p; | |
2500 | int i; | |
2501 | { | |
2502 | return p[i]; | |
2503 | } | |
2504 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2505 | { | |
2506 | char *s; | |
2507 | va_list v; | |
2508 | va_start (v,p); | |
2509 | s = g (p, va_arg (v,int)); | |
2510 | va_end (v); | |
2511 | return s; | |
2512 | } | |
86da66b5 HPN |
2513 | |
2514 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2515 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2516 | These don't provoke an error unfortunately, instead are silently treated | |
2517 | as 'x'. The following induces an error, until -std1 is added to get | |
2518 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2519 | array size at least. It's necessary to write '\x00'==0 to get something | |
2520 | that's true only with -std1. */ | |
2521 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2522 | ||
ba479fd2 NN |
2523 | int test (int i, double x); |
2524 | struct s1 {int (*f) (int a);}; | |
2525 | struct s2 {int (*f) (double a);}; | |
2526 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2527 | int argc; | |
2528 | char **argv; | |
2529 | int | |
2530 | main () | |
2531 | { | |
2532 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2533 | ; | |
2534 | return 0; | |
2535 | } | |
2536 | _ACEOF | |
2537 | # Don't try gcc -ansi; that turns off useful extensions and | |
2538 | # breaks some systems' header files. | |
2539 | # AIX -qlanglvl=ansi | |
2540 | # Ultrix and OSF/1 -std1 | |
2541 | # HP-UX 10.20 and later -Ae | |
2542 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2543 | # SVR4 -Xc -D__EXTENSIONS__ | |
2544 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2545 | do | |
2546 | CC="$ac_save_CC $ac_arg" | |
2547 | rm -f conftest.$ac_objext | |
2548 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2549 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2550 | ac_status=$? |
86da66b5 HPN |
2551 | grep -v '^ *+' conftest.er1 >conftest.err |
2552 | rm -f conftest.er1 | |
2553 | cat conftest.err >&5 | |
ba479fd2 NN |
2554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2555 | (exit $ac_status); } && | |
fb38008e | 2556 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2557 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2558 | (eval $ac_try) 2>&5 | |
2559 | ac_status=$? | |
2560 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2561 | (exit $ac_status); }; } && | |
2562 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2563 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2564 | (eval $ac_try) 2>&5 | |
2565 | ac_status=$? | |
2566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2567 | (exit $ac_status); }; }; then | |
2568 | ac_cv_prog_cc_stdc=$ac_arg | |
2569 | break | |
2570 | else | |
2571 | echo "$as_me: failed program was:" >&5 | |
2572 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2573 | |
ba479fd2 | 2574 | fi |
86da66b5 | 2575 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2576 | done |
2577 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2578 | CC=$ac_save_CC | |
2579 | ||
2580 | fi | |
2581 | ||
2582 | case "x$ac_cv_prog_cc_stdc" in | |
2583 | x|xno) | |
2584 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2585 | echo "${ECHO_T}none needed" >&6 ;; | |
2586 | *) | |
2587 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2588 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2589 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2590 | esac | |
2591 | ||
2592 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2593 | # in C++ we need to declare it. In case someone uses the same compiler | |
2594 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2595 | # the declaration of exit, since it's the most demanding environment. | |
2596 | cat >conftest.$ac_ext <<_ACEOF | |
2597 | #ifndef __cplusplus | |
2598 | choke me | |
2599 | #endif | |
2600 | _ACEOF | |
2601 | rm -f conftest.$ac_objext | |
2602 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2603 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2604 | ac_status=$? |
86da66b5 HPN |
2605 | grep -v '^ *+' conftest.er1 >conftest.err |
2606 | rm -f conftest.er1 | |
2607 | cat conftest.err >&5 | |
ba479fd2 NN |
2608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2609 | (exit $ac_status); } && | |
fb38008e | 2610 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2611 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2612 | (eval $ac_try) 2>&5 | |
2613 | ac_status=$? | |
2614 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2615 | (exit $ac_status); }; } && | |
2616 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2617 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2618 | (eval $ac_try) 2>&5 | |
2619 | ac_status=$? | |
2620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2621 | (exit $ac_status); }; }; then | |
2622 | for ac_declaration in \ | |
86da66b5 | 2623 | '' \ |
ba479fd2 NN |
2624 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2625 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2626 | 'extern "C" void exit (int) throw ();' \ | |
2627 | 'extern "C" void exit (int);' \ | |
2628 | 'void exit (int);' | |
2629 | do | |
2630 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2631 | /* confdefs.h. */ |
2632 | _ACEOF | |
2633 | cat confdefs.h >>conftest.$ac_ext | |
2634 | cat >>conftest.$ac_ext <<_ACEOF | |
2635 | /* end confdefs.h. */ | |
33e70558 | 2636 | $ac_declaration |
86da66b5 | 2637 | #include <stdlib.h> |
ba479fd2 NN |
2638 | int |
2639 | main () | |
2640 | { | |
2641 | exit (42); | |
2642 | ; | |
2643 | return 0; | |
2644 | } | |
2645 | _ACEOF | |
2646 | rm -f conftest.$ac_objext | |
2647 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2648 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2649 | ac_status=$? |
86da66b5 HPN |
2650 | grep -v '^ *+' conftest.er1 >conftest.err |
2651 | rm -f conftest.er1 | |
2652 | cat conftest.err >&5 | |
ba479fd2 NN |
2653 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2654 | (exit $ac_status); } && | |
fb38008e | 2655 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2656 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2657 | (eval $ac_try) 2>&5 | |
2658 | ac_status=$? | |
2659 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2660 | (exit $ac_status); }; } && | |
2661 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2662 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2663 | (eval $ac_try) 2>&5 | |
2664 | ac_status=$? | |
2665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2666 | (exit $ac_status); }; }; then | |
2667 | : | |
2668 | else | |
2669 | echo "$as_me: failed program was:" >&5 | |
2670 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2671 | ||
2672 | continue | |
2673 | fi | |
86da66b5 | 2674 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2675 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2676 | /* confdefs.h. */ |
2677 | _ACEOF | |
2678 | cat confdefs.h >>conftest.$ac_ext | |
2679 | cat >>conftest.$ac_ext <<_ACEOF | |
2680 | /* end confdefs.h. */ | |
2681 | $ac_declaration | |
2682 | int | |
2683 | main () | |
2684 | { | |
2685 | exit (42); | |
2686 | ; | |
2687 | return 0; | |
2688 | } | |
2689 | _ACEOF | |
2690 | rm -f conftest.$ac_objext | |
2691 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2692 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2693 | ac_status=$? |
86da66b5 HPN |
2694 | grep -v '^ *+' conftest.er1 >conftest.err |
2695 | rm -f conftest.er1 | |
2696 | cat conftest.err >&5 | |
ba479fd2 NN |
2697 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2698 | (exit $ac_status); } && | |
fb38008e | 2699 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
2700 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2701 | (eval $ac_try) 2>&5 | |
2702 | ac_status=$? | |
2703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2704 | (exit $ac_status); }; } && | |
2705 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2706 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2707 | (eval $ac_try) 2>&5 | |
2708 | ac_status=$? | |
2709 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2710 | (exit $ac_status); }; }; then | |
2711 | break | |
3ec83fc2 | 2712 | else |
ba479fd2 NN |
2713 | echo "$as_me: failed program was:" >&5 |
2714 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2715 | ||
6e3f3080 | 2716 | fi |
86da66b5 | 2717 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2718 | done |
2719 | rm -f conftest* | |
2720 | if test -n "$ac_declaration"; then | |
2721 | echo '#ifdef __cplusplus' >>confdefs.h | |
2722 | echo $ac_declaration >>confdefs.h | |
2723 | echo '#endif' >>confdefs.h | |
2724 | fi | |
2725 | ||
3ec83fc2 | 2726 | else |
ba479fd2 NN |
2727 | echo "$as_me: failed program was:" >&5 |
2728 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2729 | ||
2730 | fi | |
86da66b5 | 2731 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2732 | ac_ext=c |
2733 | ac_cpp='$CPP $CPPFLAGS' | |
2734 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2735 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2736 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2737 | ||
2738 | if test "x$CC" != xcc; then | |
2739 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2740 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2741 | else | |
2742 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2743 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2744 | fi | |
2745 | set dummy $CC; ac_cc=`echo $2 | | |
2746 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2747 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2748 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2749 | else | |
2750 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2751 | /* confdefs.h. */ |
2752 | _ACEOF | |
2753 | cat confdefs.h >>conftest.$ac_ext | |
2754 | cat >>conftest.$ac_ext <<_ACEOF | |
2755 | /* end confdefs.h. */ | |
2756 | ||
2757 | int | |
2758 | main () | |
2759 | { | |
2760 | ||
2761 | ; | |
2762 | return 0; | |
2763 | } | |
2764 | _ACEOF | |
3ec83fc2 RH |
2765 | # Make sure it works both with $CC and with simple cc. |
2766 | # We do the test twice because some compilers refuse to overwrite an | |
2767 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2768 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2769 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2770 | (eval $ac_try) 2>&5 | |
2771 | ac_status=$? | |
2772 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2773 | (exit $ac_status); } && | |
2774 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2775 | (eval $ac_try) 2>&5 | |
2776 | ac_status=$? | |
2777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2778 | (exit $ac_status); }; | |
3ec83fc2 RH |
2779 | then |
2780 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2781 | if test "x$CC" != xcc; then | |
2782 | # Test first that cc exists at all. | |
ba479fd2 NN |
2783 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2785 | (eval $ac_try) 2>&5 | |
2786 | ac_status=$? | |
2787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2788 | (exit $ac_status); }; }; then | |
2789 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2790 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2791 | (eval $ac_try) 2>&5 | |
2792 | ac_status=$? | |
2793 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2794 | (exit $ac_status); } && | |
2795 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2796 | (eval $ac_try) 2>&5 | |
2797 | ac_status=$? | |
2798 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2799 | (exit $ac_status); }; | |
3ec83fc2 | 2800 | then |
86da66b5 HPN |
2801 | # cc works too. |
2802 | : | |
3ec83fc2 | 2803 | else |
86da66b5 HPN |
2804 | # cc exists but doesn't like -o. |
2805 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2806 | fi |
2807 | fi | |
2808 | fi | |
2809 | else | |
2810 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2811 | fi | |
2812 | rm -f conftest* | |
2813 | ||
2814 | fi | |
2815 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2816 | echo "$as_me:$LINENO: result: yes" >&5 |
2817 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2818 | else |
ba479fd2 NN |
2819 | echo "$as_me:$LINENO: result: no" >&5 |
2820 | echo "${ECHO_T}no" >&6 | |
2821 | ||
2822 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2823 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2824 | _ACEOF |
3ec83fc2 RH |
2825 | |
2826 | fi | |
2827 | ||
414d23ae HPN |
2828 | # autoconf is lame and doesn't give us any substitution variable for this. |
2829 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2830 | NO_MINUS_C_MINUS_O=yes | |
2831 | else | |
2832 | OUTPUT_OPTION='-o $@' | |
2833 | fi | |
2834 | ||
2835 | ||
2836 | ||
73458fb7 NN |
2837 | # ------------------------- |
2838 | # Check C compiler features | |
2839 | # ------------------------- | |
2840 | ||
ba479fd2 NN |
2841 | ac_ext=c |
2842 | ac_cpp='$CPP $CPPFLAGS' | |
2843 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2844 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2845 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2846 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2847 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2848 | # On Suns, sometimes $CPP names a directory. |
2849 | if test -n "$CPP" && test -d "$CPP"; then | |
2850 | CPP= | |
2851 | fi | |
2852 | if test -z "$CPP"; then | |
ba479fd2 NN |
2853 | if test "${ac_cv_prog_CPP+set}" = set; then |
2854 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2855 | else | |
2856 | # Double quotes because CPP needs to be expanded | |
2857 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2858 | do | |
2859 | ac_preproc_ok=false | |
2860 | for ac_c_preproc_warn_flag in '' yes | |
2861 | do | |
2862 | # Use a header file that comes with gcc, so configuring glibc | |
2863 | # with a fresh cross-compiler works. | |
2864 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2865 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2866 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2867 | # not just through cpp. "Syntax error" is here to catch this case. |
2868 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2869 | /* confdefs.h. */ |
2870 | _ACEOF | |
2871 | cat confdefs.h >>conftest.$ac_ext | |
2872 | cat >>conftest.$ac_ext <<_ACEOF | |
2873 | /* end confdefs.h. */ | |
2874 | #ifdef __STDC__ | |
2875 | # include <limits.h> | |
2876 | #else | |
2877 | # include <assert.h> | |
2878 | #endif | |
86da66b5 | 2879 | Syntax error |
ba479fd2 NN |
2880 | _ACEOF |
2881 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2882 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2883 | ac_status=$? | |
2884 | grep -v '^ *+' conftest.er1 >conftest.err | |
2885 | rm -f conftest.er1 | |
2886 | cat conftest.err >&5 | |
2887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2888 | (exit $ac_status); } >/dev/null; then | |
2889 | if test -s conftest.err; then | |
2890 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2891 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2892 | else |
2893 | ac_cpp_err= | |
2894 | fi | |
2895 | else | |
2896 | ac_cpp_err=yes | |
2897 | fi | |
2898 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2899 | : |
cafe096b | 2900 | else |
ba479fd2 NN |
2901 | echo "$as_me: failed program was:" >&5 |
2902 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2903 | ||
2904 | # Broken: fails on valid input. | |
2905 | continue | |
2906 | fi | |
2907 | rm -f conftest.err conftest.$ac_ext | |
2908 | ||
2909 | # OK, works on sane cases. Now check whether non-existent headers | |
2910 | # can be detected and how. | |
2911 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2912 | /* confdefs.h. */ |
2913 | _ACEOF | |
2914 | cat confdefs.h >>conftest.$ac_ext | |
2915 | cat >>conftest.$ac_ext <<_ACEOF | |
2916 | /* end confdefs.h. */ | |
2917 | #include <ac_nonexistent.h> | |
2918 | _ACEOF | |
2919 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2920 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2921 | ac_status=$? | |
2922 | grep -v '^ *+' conftest.er1 >conftest.err | |
2923 | rm -f conftest.er1 | |
2924 | cat conftest.err >&5 | |
2925 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2926 | (exit $ac_status); } >/dev/null; then | |
2927 | if test -s conftest.err; then | |
2928 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2929 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2930 | else |
2931 | ac_cpp_err= | |
2932 | fi | |
2933 | else | |
2934 | ac_cpp_err=yes | |
2935 | fi | |
2936 | if test -z "$ac_cpp_err"; then | |
2937 | # Broken: success on invalid input. | |
2938 | continue | |
2939 | else | |
2940 | echo "$as_me: failed program was:" >&5 | |
2941 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2942 | ||
2943 | # Passes both tests. | |
2944 | ac_preproc_ok=: | |
2945 | break | |
2946 | fi | |
2947 | rm -f conftest.err conftest.$ac_ext | |
2948 | ||
2949 | done | |
2950 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2951 | rm -f conftest.err conftest.$ac_ext | |
2952 | if $ac_preproc_ok; then | |
2953 | break | |
2954 | fi | |
2955 | ||
2956 | done | |
2957 | ac_cv_prog_CPP=$CPP | |
2958 | ||
2959 | fi | |
2960 | CPP=$ac_cv_prog_CPP | |
2961 | else | |
2962 | ac_cv_prog_CPP=$CPP | |
2963 | fi | |
2964 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2965 | echo "${ECHO_T}$CPP" >&6 | |
2966 | ac_preproc_ok=false | |
2967 | for ac_c_preproc_warn_flag in '' yes | |
2968 | do | |
2969 | # Use a header file that comes with gcc, so configuring glibc | |
2970 | # with a fresh cross-compiler works. | |
2971 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2972 | # <limits.h> exists even on freestanding compilers. | |
2973 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2974 | # not just through cpp. "Syntax error" is here to catch this case. | |
2975 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2976 | /* confdefs.h. */ |
2977 | _ACEOF | |
2978 | cat confdefs.h >>conftest.$ac_ext | |
2979 | cat >>conftest.$ac_ext <<_ACEOF | |
2980 | /* end confdefs.h. */ | |
2981 | #ifdef __STDC__ | |
2982 | # include <limits.h> | |
2983 | #else | |
2984 | # include <assert.h> | |
2985 | #endif | |
86da66b5 | 2986 | Syntax error |
ba479fd2 NN |
2987 | _ACEOF |
2988 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2989 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2990 | ac_status=$? | |
2991 | grep -v '^ *+' conftest.er1 >conftest.err | |
2992 | rm -f conftest.er1 | |
2993 | cat conftest.err >&5 | |
2994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2995 | (exit $ac_status); } >/dev/null; then | |
2996 | if test -s conftest.err; then | |
2997 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2998 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2999 | else |
3000 | ac_cpp_err= | |
3001 | fi | |
3002 | else | |
3003 | ac_cpp_err=yes | |
3004 | fi | |
3005 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3006 | : |
414d23ae | 3007 | else |
ba479fd2 NN |
3008 | echo "$as_me: failed program was:" >&5 |
3009 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3010 | ||
3011 | # Broken: fails on valid input. | |
3012 | continue | |
3013 | fi | |
3014 | rm -f conftest.err conftest.$ac_ext | |
3015 | ||
3016 | # OK, works on sane cases. Now check whether non-existent headers | |
3017 | # can be detected and how. | |
3018 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3019 | /* confdefs.h. */ |
3020 | _ACEOF | |
3021 | cat confdefs.h >>conftest.$ac_ext | |
3022 | cat >>conftest.$ac_ext <<_ACEOF | |
3023 | /* end confdefs.h. */ | |
3024 | #include <ac_nonexistent.h> | |
3025 | _ACEOF | |
3026 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3027 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3028 | ac_status=$? | |
3029 | grep -v '^ *+' conftest.er1 >conftest.err | |
3030 | rm -f conftest.er1 | |
3031 | cat conftest.err >&5 | |
3032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3033 | (exit $ac_status); } >/dev/null; then | |
3034 | if test -s conftest.err; then | |
3035 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3036 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3037 | else |
3038 | ac_cpp_err= | |
3039 | fi | |
6e3f3080 | 3040 | else |
ba479fd2 | 3041 | ac_cpp_err=yes |
63cf211a | 3042 | fi |
ba479fd2 NN |
3043 | if test -z "$ac_cpp_err"; then |
3044 | # Broken: success on invalid input. | |
3045 | continue | |
3046 | else | |
3047 | echo "$as_me: failed program was:" >&5 | |
3048 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3049 | ||
3050 | # Passes both tests. | |
3051 | ac_preproc_ok=: | |
3052 | break | |
63cf211a | 3053 | fi |
ba479fd2 NN |
3054 | rm -f conftest.err conftest.$ac_ext |
3055 | ||
3056 | done | |
3057 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3058 | rm -f conftest.err conftest.$ac_ext | |
3059 | if $ac_preproc_ok; then | |
3060 | : | |
6e3f3080 | 3061 | else |
ba479fd2 NN |
3062 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3063 | See \`config.log' for more details." >&5 | |
3064 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3065 | See \`config.log' for more details." >&2;} | |
3066 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3067 | fi |
3068 | ||
ba479fd2 NN |
3069 | ac_ext=c |
3070 | ac_cpp='$CPP $CPPFLAGS' | |
3071 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3072 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3073 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3074 | ||
b5472e1d | 3075 | |
ba479fd2 NN |
3076 | echo "$as_me:$LINENO: checking for inline" >&5 |
3077 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3078 | if test "${ac_cv_c_inline+set}" = set; then | |
3079 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3080 | else |
3081 | ac_cv_c_inline=no | |
3082 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3083 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3084 | /* confdefs.h. */ |
3085 | _ACEOF | |
3086 | cat confdefs.h >>conftest.$ac_ext | |
3087 | cat >>conftest.$ac_ext <<_ACEOF | |
3088 | /* end confdefs.h. */ | |
3089 | #ifndef __cplusplus | |
3090 | typedef int foo_t; | |
3091 | static $ac_kw foo_t static_foo () {return 0; } | |
3092 | $ac_kw foo_t foo () {return 0; } | |
3093 | #endif | |
414d23ae | 3094 | |
ba479fd2 NN |
3095 | _ACEOF |
3096 | rm -f conftest.$ac_objext | |
3097 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3098 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3099 | ac_status=$? |
86da66b5 HPN |
3100 | grep -v '^ *+' conftest.er1 >conftest.err |
3101 | rm -f conftest.er1 | |
3102 | cat conftest.err >&5 | |
ba479fd2 NN |
3103 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3104 | (exit $ac_status); } && | |
fb38008e | 3105 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3106 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3107 | (eval $ac_try) 2>&5 | |
3108 | ac_status=$? | |
3109 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3110 | (exit $ac_status); }; } && | |
3111 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3112 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3113 | (eval $ac_try) 2>&5 | |
3114 | ac_status=$? | |
3115 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3116 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3117 | ac_cv_c_inline=$ac_kw; break |
3118 | else | |
ba479fd2 NN |
3119 | echo "$as_me: failed program was:" >&5 |
3120 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3121 | ||
414d23ae | 3122 | fi |
86da66b5 | 3123 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3124 | done |
3125 | ||
3126 | fi | |
ba479fd2 NN |
3127 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3128 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3129 | |
3130 | ||
ba479fd2 | 3131 | case $ac_cv_c_inline in |
414d23ae | 3132 | inline | yes) ;; |
86da66b5 HPN |
3133 | *) |
3134 | case $ac_cv_c_inline in | |
3135 | no) ac_val=;; | |
3136 | *) ac_val=$ac_cv_c_inline;; | |
3137 | esac | |
3138 | cat >>confdefs.h <<_ACEOF | |
3139 | #ifndef __cplusplus | |
3140 | #define inline $ac_val | |
3141 | #endif | |
ba479fd2 | 3142 | _ACEOF |
86da66b5 | 3143 | ;; |
414d23ae HPN |
3144 | esac |
3145 | ||
414d23ae | 3146 | |
ba479fd2 NN |
3147 | echo "$as_me:$LINENO: checking for long long int" >&5 |
3148 | echo $ECHO_N "checking for long long int... $ECHO_C" >&6 | |
3149 | if test "${ac_cv_c_long_long+set}" = set; then | |
3150 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3151 | else |
ba479fd2 | 3152 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3153 | /* confdefs.h. */ |
3154 | _ACEOF | |
3155 | cat confdefs.h >>conftest.$ac_ext | |
3156 | cat >>conftest.$ac_ext <<_ACEOF | |
3157 | /* end confdefs.h. */ | |
414d23ae | 3158 | |
ba479fd2 NN |
3159 | int |
3160 | main () | |
3161 | { | |
414d23ae | 3162 | long long int i; |
ba479fd2 NN |
3163 | ; |
3164 | return 0; | |
3165 | } | |
3166 | _ACEOF | |
3167 | rm -f conftest.$ac_objext | |
3168 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3169 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3170 | ac_status=$? |
86da66b5 HPN |
3171 | grep -v '^ *+' conftest.er1 >conftest.err |
3172 | rm -f conftest.er1 | |
3173 | cat conftest.err >&5 | |
ba479fd2 NN |
3174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3175 | (exit $ac_status); } && | |
fb38008e | 3176 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3177 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3178 | (eval $ac_try) 2>&5 | |
3179 | ac_status=$? | |
3180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3181 | (exit $ac_status); }; } && | |
3182 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3183 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3184 | (eval $ac_try) 2>&5 | |
3185 | ac_status=$? | |
3186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3187 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3188 | ac_cv_c_long_long=yes |
3189 | else | |
ba479fd2 NN |
3190 | echo "$as_me: failed program was:" >&5 |
3191 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3192 | ||
3193 | ac_cv_c_long_long=no | |
414d23ae | 3194 | fi |
86da66b5 | 3195 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3196 | fi |
ba479fd2 NN |
3197 | echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 |
3198 | echo "${ECHO_T}$ac_cv_c_long_long" >&6 | |
63cf211a | 3199 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3200 | |
3201 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3202 | #define HAVE_LONG_LONG 1 |
ba479fd2 | 3203 | _ACEOF |
414d23ae HPN |
3204 | |
3205 | fi | |
ba479fd2 NN |
3206 | echo "$as_me:$LINENO: checking for __int64" >&5 |
3207 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
3208 | if test "${ac_cv_c___int64+set}" = set; then | |
3209 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3210 | else | |
3211 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3212 | /* confdefs.h. */ |
3213 | _ACEOF | |
3214 | cat confdefs.h >>conftest.$ac_ext | |
3215 | cat >>conftest.$ac_ext <<_ACEOF | |
3216 | /* end confdefs.h. */ | |
3217 | ||
3218 | int | |
3219 | main () | |
3220 | { | |
414d23ae | 3221 | __int64 i; |
ba479fd2 NN |
3222 | ; |
3223 | return 0; | |
3224 | } | |
3225 | _ACEOF | |
3226 | rm -f conftest.$ac_objext | |
3227 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3228 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3229 | ac_status=$? |
86da66b5 HPN |
3230 | grep -v '^ *+' conftest.er1 >conftest.err |
3231 | rm -f conftest.er1 | |
3232 | cat conftest.err >&5 | |
ba479fd2 NN |
3233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3234 | (exit $ac_status); } && | |
fb38008e | 3235 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3236 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3237 | (eval $ac_try) 2>&5 | |
3238 | ac_status=$? | |
3239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3240 | (exit $ac_status); }; } && | |
3241 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3242 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3243 | (eval $ac_try) 2>&5 | |
3244 | ac_status=$? | |
3245 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3246 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3247 | ac_cv_c___int64=yes |
3248 | else | |
ba479fd2 NN |
3249 | echo "$as_me: failed program was:" >&5 |
3250 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3251 | ||
3252 | ac_cv_c___int64=no | |
414d23ae | 3253 | fi |
86da66b5 | 3254 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3255 | fi |
ba479fd2 NN |
3256 | echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 |
3257 | echo "${ECHO_T}$ac_cv_c___int64" >&6 | |
63cf211a | 3258 | if test $ac_cv_c___int64 = yes; then |
ba479fd2 NN |
3259 | |
3260 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3261 | #define HAVE___INT64 1 |
ba479fd2 | 3262 | _ACEOF |
414d23ae HPN |
3263 | |
3264 | fi | |
3265 | ||
414d23ae HPN |
3266 | |
3267 | # sizeof(char) is 1 by definition. | |
ba479fd2 NN |
3268 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3269 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3270 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3271 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd KG |
3272 | else |
3273 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
ba479fd2 | 3274 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3275 | /* confdefs.h. */ |
3276 | _ACEOF | |
3277 | cat confdefs.h >>conftest.$ac_ext | |
3278 | cat >>conftest.$ac_ext <<_ACEOF | |
3279 | /* end confdefs.h. */ | |
75b6f3fd KG |
3280 | #include "confdefs.h" |
3281 | #include <sys/types.h> | |
3282 | ||
3283 | ||
ba479fd2 NN |
3284 | int |
3285 | main () | |
3286 | { | |
75b6f3fd | 3287 | switch (0) case 0: case (sizeof (void *) == $ac_size):; |
ba479fd2 NN |
3288 | ; |
3289 | return 0; | |
3290 | } | |
3291 | _ACEOF | |
3292 | rm -f conftest.$ac_objext | |
3293 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3294 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3295 | ac_status=$? |
86da66b5 HPN |
3296 | grep -v '^ *+' conftest.er1 >conftest.err |
3297 | rm -f conftest.er1 | |
3298 | cat conftest.err >&5 | |
ba479fd2 NN |
3299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3300 | (exit $ac_status); } && | |
fb38008e | 3301 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3302 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3303 | (eval $ac_try) 2>&5 | |
3304 | ac_status=$? | |
3305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3306 | (exit $ac_status); }; } && | |
3307 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3308 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3309 | (eval $ac_try) 2>&5 | |
3310 | ac_status=$? | |
3311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3312 | (exit $ac_status); }; }; then | |
75b6f3fd KG |
3313 | ac_cv_sizeof_void_p=$ac_size |
3314 | else | |
ba479fd2 NN |
3315 | echo "$as_me: failed program was:" >&5 |
3316 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3317 | ||
75b6f3fd | 3318 | fi |
86da66b5 | 3319 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd KG |
3320 | if test x$ac_cv_sizeof_void_p != x ; then break; fi |
3321 | done | |
3322 | ||
3323 | fi | |
3324 | ||
3325 | if test x$ac_cv_sizeof_void_p = x ; then | |
ba479fd2 NN |
3326 | { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5 |
3327 | echo "$as_me: error: cannot determine a size for void *" >&2;} | |
3328 | { (exit 1); exit 1; }; } | |
75b6f3fd | 3329 | fi |
ba479fd2 NN |
3330 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 |
3331 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3332 | ||
3333 | cat >>confdefs.h <<_ACEOF | |
75b6f3fd | 3334 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
ba479fd2 | 3335 | _ACEOF |
75b6f3fd KG |
3336 | |
3337 | ||
ba479fd2 NN |
3338 | echo "$as_me:$LINENO: checking size of short" >&5 |
3339 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3340 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3341 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3342 | else |
4977bab6 | 3343 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3344 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3345 | /* confdefs.h. */ |
3346 | _ACEOF | |
3347 | cat confdefs.h >>conftest.$ac_ext | |
3348 | cat >>conftest.$ac_ext <<_ACEOF | |
3349 | /* end confdefs.h. */ | |
414d23ae HPN |
3350 | #include "confdefs.h" |
3351 | #include <sys/types.h> | |
3352 | ||
3353 | ||
ba479fd2 NN |
3354 | int |
3355 | main () | |
3356 | { | |
414d23ae | 3357 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
ba479fd2 NN |
3358 | ; |
3359 | return 0; | |
3360 | } | |
3361 | _ACEOF | |
3362 | rm -f conftest.$ac_objext | |
3363 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3364 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3365 | ac_status=$? |
86da66b5 HPN |
3366 | grep -v '^ *+' conftest.er1 >conftest.err |
3367 | rm -f conftest.er1 | |
3368 | cat conftest.err >&5 | |
ba479fd2 NN |
3369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3370 | (exit $ac_status); } && | |
fb38008e | 3371 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3372 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3373 | (eval $ac_try) 2>&5 | |
3374 | ac_status=$? | |
3375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3376 | (exit $ac_status); }; } && | |
3377 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3378 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3379 | (eval $ac_try) 2>&5 | |
3380 | ac_status=$? | |
3381 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3382 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3383 | ac_cv_sizeof_short=$ac_size |
3384 | else | |
ba479fd2 NN |
3385 | echo "$as_me: failed program was:" >&5 |
3386 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3387 | ||
84c041a1 | 3388 | fi |
86da66b5 | 3389 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3390 | if test x$ac_cv_sizeof_short != x ; then break; fi |
3391 | done | |
3392 | ||
84c041a1 | 3393 | fi |
414d23ae HPN |
3394 | |
3395 | if test x$ac_cv_sizeof_short = x ; then | |
ba479fd2 NN |
3396 | { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 |
3397 | echo "$as_me: error: cannot determine a size for short" >&2;} | |
3398 | { (exit 1); exit 1; }; } | |
84c041a1 | 3399 | fi |
ba479fd2 NN |
3400 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 |
3401 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
3402 | ||
3403 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3404 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
ba479fd2 | 3405 | _ACEOF |
84c041a1 | 3406 | |
414d23ae | 3407 | |
ba479fd2 NN |
3408 | echo "$as_me:$LINENO: checking size of int" >&5 |
3409 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
3410 | if test "${ac_cv_sizeof_int+set}" = set; then | |
3411 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3412 | else |
4977bab6 | 3413 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3414 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3415 | /* confdefs.h. */ |
3416 | _ACEOF | |
3417 | cat confdefs.h >>conftest.$ac_ext | |
3418 | cat >>conftest.$ac_ext <<_ACEOF | |
3419 | /* end confdefs.h. */ | |
414d23ae HPN |
3420 | #include "confdefs.h" |
3421 | #include <sys/types.h> | |
3422 | ||
75e93faa | 3423 | |
ba479fd2 NN |
3424 | int |
3425 | main () | |
3426 | { | |
414d23ae | 3427 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
ba479fd2 NN |
3428 | ; |
3429 | return 0; | |
3430 | } | |
3431 | _ACEOF | |
3432 | rm -f conftest.$ac_objext | |
3433 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3434 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3435 | ac_status=$? |
86da66b5 HPN |
3436 | grep -v '^ *+' conftest.er1 >conftest.err |
3437 | rm -f conftest.er1 | |
3438 | cat conftest.err >&5 | |
ba479fd2 NN |
3439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3440 | (exit $ac_status); } && | |
fb38008e | 3441 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3443 | (eval $ac_try) 2>&5 | |
3444 | ac_status=$? | |
3445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3446 | (exit $ac_status); }; } && | |
3447 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3449 | (eval $ac_try) 2>&5 | |
3450 | ac_status=$? | |
3451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3452 | (exit $ac_status); }; }; then | |
414d23ae | 3453 | ac_cv_sizeof_int=$ac_size |
75e93faa | 3454 | else |
ba479fd2 NN |
3455 | echo "$as_me: failed program was:" >&5 |
3456 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3457 | ||
75e93faa | 3458 | fi |
86da66b5 | 3459 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3460 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
3461 | done |
3462 | ||
3463 | fi | |
3464 | ||
414d23ae | 3465 | if test x$ac_cv_sizeof_int = x ; then |
ba479fd2 NN |
3466 | { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 |
3467 | echo "$as_me: error: cannot determine a size for int" >&2;} | |
3468 | { (exit 1); exit 1; }; } | |
414d23ae | 3469 | fi |
ba479fd2 NN |
3470 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 |
3471 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
3472 | ||
3473 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3474 | #define SIZEOF_INT $ac_cv_sizeof_int |
ba479fd2 | 3475 | _ACEOF |
75e93faa | 3476 | |
414d23ae | 3477 | |
ba479fd2 NN |
3478 | echo "$as_me:$LINENO: checking size of long" >&5 |
3479 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
3480 | if test "${ac_cv_sizeof_long+set}" = set; then | |
3481 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3482 | else |
4977bab6 | 3483 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3484 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3485 | /* confdefs.h. */ |
3486 | _ACEOF | |
3487 | cat confdefs.h >>conftest.$ac_ext | |
3488 | cat >>conftest.$ac_ext <<_ACEOF | |
3489 | /* end confdefs.h. */ | |
75e93faa | 3490 | #include "confdefs.h" |
414d23ae HPN |
3491 | #include <sys/types.h> |
3492 | ||
75e93faa | 3493 | |
ba479fd2 NN |
3494 | int |
3495 | main () | |
3496 | { | |
414d23ae | 3497 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
ba479fd2 NN |
3498 | ; |
3499 | return 0; | |
3500 | } | |
3501 | _ACEOF | |
3502 | rm -f conftest.$ac_objext | |
3503 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3504 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3505 | ac_status=$? |
86da66b5 HPN |
3506 | grep -v '^ *+' conftest.er1 >conftest.err |
3507 | rm -f conftest.er1 | |
3508 | cat conftest.err >&5 | |
ba479fd2 NN |
3509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3510 | (exit $ac_status); } && | |
fb38008e | 3511 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3512 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3513 | (eval $ac_try) 2>&5 | |
3514 | ac_status=$? | |
3515 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3516 | (exit $ac_status); }; } && | |
3517 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3519 | (eval $ac_try) 2>&5 | |
3520 | ac_status=$? | |
3521 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3522 | (exit $ac_status); }; }; then | |
414d23ae | 3523 | ac_cv_sizeof_long=$ac_size |
75e93faa | 3524 | else |
ba479fd2 NN |
3525 | echo "$as_me: failed program was:" >&5 |
3526 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3527 | ||
75e93faa | 3528 | fi |
86da66b5 | 3529 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3530 | if test x$ac_cv_sizeof_long != x ; then break; fi |
3531 | done | |
75e93faa | 3532 | |
414d23ae | 3533 | fi |
75e93faa | 3534 | |
414d23ae | 3535 | if test x$ac_cv_sizeof_long = x ; then |
ba479fd2 NN |
3536 | { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 |
3537 | echo "$as_me: error: cannot determine a size for long" >&2;} | |
3538 | { (exit 1); exit 1; }; } | |
75e93faa | 3539 | fi |
ba479fd2 NN |
3540 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 |
3541 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
3542 | ||
3543 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3544 | #define SIZEOF_LONG $ac_cv_sizeof_long |
ba479fd2 | 3545 | _ACEOF |
75e93faa ZW |
3546 | |
3547 | ||
414d23ae | 3548 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3549 | echo "$as_me:$LINENO: checking size of long long" >&5 |
3550 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
3551 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
3552 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
04cabffc | 3553 | else |
4977bab6 | 3554 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3555 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3556 | /* confdefs.h. */ |
3557 | _ACEOF | |
3558 | cat confdefs.h >>conftest.$ac_ext | |
3559 | cat >>conftest.$ac_ext <<_ACEOF | |
3560 | /* end confdefs.h. */ | |
414d23ae HPN |
3561 | #include "confdefs.h" |
3562 | #include <sys/types.h> | |
3563 | ||
04cabffc | 3564 | |
ba479fd2 NN |
3565 | int |
3566 | main () | |
3567 | { | |
414d23ae | 3568 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
ba479fd2 NN |
3569 | ; |
3570 | return 0; | |
3571 | } | |
3572 | _ACEOF | |
3573 | rm -f conftest.$ac_objext | |
3574 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3575 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3576 | ac_status=$? |
86da66b5 HPN |
3577 | grep -v '^ *+' conftest.er1 >conftest.err |
3578 | rm -f conftest.er1 | |
3579 | cat conftest.err >&5 | |
ba479fd2 NN |
3580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3581 | (exit $ac_status); } && | |
fb38008e | 3582 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3583 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3584 | (eval $ac_try) 2>&5 | |
3585 | ac_status=$? | |
3586 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3587 | (exit $ac_status); }; } && | |
3588 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3589 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3590 | (eval $ac_try) 2>&5 | |
3591 | ac_status=$? | |
3592 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3593 | (exit $ac_status); }; }; then | |
414d23ae | 3594 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 3595 | else |
ba479fd2 NN |
3596 | echo "$as_me: failed program was:" >&5 |
3597 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3598 | ||
04cabffc | 3599 | fi |
86da66b5 | 3600 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3601 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
3602 | done | |
3603 | ||
04cabffc KG |
3604 | fi |
3605 | ||
414d23ae | 3606 | if test x$ac_cv_sizeof_long_long = x ; then |
ba479fd2 NN |
3607 | { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5 |
3608 | echo "$as_me: error: cannot determine a size for long long" >&2;} | |
3609 | { (exit 1); exit 1; }; } | |
414d23ae | 3610 | fi |
ba479fd2 NN |
3611 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 |
3612 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
3613 | ||
3614 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3615 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
ba479fd2 | 3616 | _ACEOF |
04cabffc | 3617 | |
04cabffc | 3618 | |
414d23ae HPN |
3619 | fi |
3620 | if test $ac_cv_c___int64 = yes; then | |
ba479fd2 NN |
3621 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
3622 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
3623 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
3624 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3625 | else |
4977bab6 | 3626 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 | 3627 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3628 | /* confdefs.h. */ |
3629 | _ACEOF | |
3630 | cat confdefs.h >>conftest.$ac_ext | |
3631 | cat >>conftest.$ac_ext <<_ACEOF | |
3632 | /* end confdefs.h. */ | |
414d23ae HPN |
3633 | #include "confdefs.h" |
3634 | #include <sys/types.h> | |
3635 | ||
61842080 | 3636 | |
ba479fd2 NN |
3637 | int |
3638 | main () | |
3639 | { | |
414d23ae | 3640 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
ba479fd2 NN |
3641 | ; |
3642 | return 0; | |
3643 | } | |
3644 | _ACEOF | |
3645 | rm -f conftest.$ac_objext | |
3646 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3647 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3648 | ac_status=$? |
86da66b5 HPN |
3649 | grep -v '^ *+' conftest.er1 >conftest.err |
3650 | rm -f conftest.er1 | |
3651 | cat conftest.err >&5 | |
ba479fd2 NN |
3652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3653 | (exit $ac_status); } && | |
fb38008e | 3654 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
3655 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3656 | (eval $ac_try) 2>&5 | |
3657 | ac_status=$? | |
3658 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3659 | (exit $ac_status); }; } && | |
3660 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3661 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3662 | (eval $ac_try) 2>&5 | |
3663 | ac_status=$? | |
3664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3665 | (exit $ac_status); }; }; then | |
414d23ae | 3666 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 3667 | else |
ba479fd2 NN |
3668 | echo "$as_me: failed program was:" >&5 |
3669 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3670 | ||
75e93faa | 3671 | fi |
86da66b5 | 3672 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3673 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
3674 | done | |
3675 | ||
75e93faa ZW |
3676 | fi |
3677 | ||
414d23ae | 3678 | if test x$ac_cv_sizeof___int64 = x ; then |
ba479fd2 NN |
3679 | { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5 |
3680 | echo "$as_me: error: cannot determine a size for __int64" >&2;} | |
3681 | { (exit 1); exit 1; }; } | |
414d23ae | 3682 | fi |
ba479fd2 NN |
3683 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
3684 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
3685 | ||
3686 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3687 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 3688 | _ACEOF |
414d23ae | 3689 | |
cafe096b | 3690 | |
414d23ae HPN |
3691 | fi |
3692 | ||
34a86c2b NN |
3693 | # --------------------- |
3694 | # Warnings and checking | |
3695 | # --------------------- | |
3696 | ||
b5472e1d NN |
3697 | # Check $CC warning features (if it's GCC). |
3698 | # We want to use -pedantic, but we don't want warnings about | |
3699 | # * 'long long' | |
3700 | # * variadic macros | |
3701 | # So, we only use -pedantic if we can disable those warnings. | |
3702 | ||
3703 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
3704 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
3705 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
3706 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3707 | else | |
3708 | save_CFLAGS="$CFLAGS" | |
3709 | CFLAGS="-Wno-long-long" | |
3710 | cat >conftest.$ac_ext <<_ACEOF | |
3711 | /* confdefs.h. */ | |
3712 | _ACEOF | |
3713 | cat confdefs.h >>conftest.$ac_ext | |
3714 | cat >>conftest.$ac_ext <<_ACEOF | |
3715 | /* end confdefs.h. */ | |
3716 | ||
3717 | _ACEOF | |
3718 | rm -f conftest.$ac_objext | |
3719 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3720 | (eval $ac_compile) 2>conftest.er1 | |
3721 | ac_status=$? | |
3722 | grep -v '^ *+' conftest.er1 >conftest.err | |
3723 | rm -f conftest.er1 | |
3724 | cat conftest.err >&5 | |
3725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3726 | (exit $ac_status); } && | |
fb38008e | 3727 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
3728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3729 | (eval $ac_try) 2>&5 | |
3730 | ac_status=$? | |
3731 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3732 | (exit $ac_status); }; } && | |
3733 | { ac_try='test -s conftest.$ac_objext' | |
3734 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3735 | (eval $ac_try) 2>&5 | |
3736 | ac_status=$? | |
3737 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3738 | (exit $ac_status); }; }; then | |
3739 | ac_cv_prog_cc_w_no_long_long=yes | |
3740 | else | |
3741 | echo "$as_me: failed program was:" >&5 | |
3742 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3743 | ||
3744 | ac_cv_prog_cc_w_no_long_long=no | |
3745 | fi | |
3746 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3747 | CFLAGS="$save_CFLAGS" | |
3748 | ||
3749 | fi | |
3750 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
3751 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
3752 | ||
3753 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
3754 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
3755 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
3756 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3757 | else | |
3758 | save_CFLAGS="$CFLAGS" | |
3759 | CFLAGS="-Wno-variadic-macros" | |
3760 | cat >conftest.$ac_ext <<_ACEOF | |
3761 | /* confdefs.h. */ | |
3762 | _ACEOF | |
3763 | cat confdefs.h >>conftest.$ac_ext | |
3764 | cat >>conftest.$ac_ext <<_ACEOF | |
3765 | /* end confdefs.h. */ | |
3766 | ||
3767 | _ACEOF | |
3768 | rm -f conftest.$ac_objext | |
3769 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3770 | (eval $ac_compile) 2>conftest.er1 | |
3771 | ac_status=$? | |
3772 | grep -v '^ *+' conftest.er1 >conftest.err | |
3773 | rm -f conftest.er1 | |
3774 | cat conftest.err >&5 | |
3775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3776 | (exit $ac_status); } && | |
fb38008e | 3777 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
b5472e1d NN |
3778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3779 | (eval $ac_try) 2>&5 | |
3780 | ac_status=$? | |
3781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3782 | (exit $ac_status); }; } && | |
3783 | { ac_try='test -s conftest.$ac_objext' | |
3784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3785 | (eval $ac_try) 2>&5 | |
3786 | ac_status=$? | |
3787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3788 | (exit $ac_status); }; }; then | |
3789 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
3790 | else | |
3791 | echo "$as_me: failed program was:" >&5 | |
3792 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3793 | ||
3794 | ac_cv_prog_cc_w_no_variadic_macros=no | |
3795 | fi | |
3796 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3797 | CFLAGS="$save_CFLAGS" | |
3798 | ||
3799 | fi | |
3800 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
3801 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
3802 | ||
34a86c2b | 3803 | strict1_warn= |
b5472e1d NN |
3804 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
3805 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then | |
3806 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros" | |
34a86c2b NN |
3807 | fi |
3808 | ||
3809 | ||
643d3bd2 NN |
3810 | # Add -Wold-style-definition if it's accepted |
3811 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
3812 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
3813 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
3814 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3815 | else | |
3816 | save_CFLAGS="$CFLAGS" | |
3817 | CFLAGS="-Wold-style-definition" | |
3818 | cat >conftest.$ac_ext <<_ACEOF | |
3819 | /* confdefs.h. */ | |
3820 | _ACEOF | |
3821 | cat confdefs.h >>conftest.$ac_ext | |
3822 | cat >>conftest.$ac_ext <<_ACEOF | |
3823 | /* end confdefs.h. */ | |
3824 | ||
3825 | _ACEOF | |
3826 | rm -f conftest.$ac_objext | |
3827 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3828 | (eval $ac_compile) 2>conftest.er1 | |
3829 | ac_status=$? | |
3830 | grep -v '^ *+' conftest.er1 >conftest.err | |
3831 | rm -f conftest.er1 | |
3832 | cat conftest.err >&5 | |
3833 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3834 | (exit $ac_status); } && | |
fb38008e | 3835 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
643d3bd2 NN |
3836 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3837 | (eval $ac_try) 2>&5 | |
3838 | ac_status=$? | |
3839 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3840 | (exit $ac_status); }; } && | |
3841 | { ac_try='test -s conftest.$ac_objext' | |
3842 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3843 | (eval $ac_try) 2>&5 | |
3844 | ac_status=$? | |
3845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3846 | (exit $ac_status); }; }; then | |
3847 | ac_cv_prog_cc_w_old_style_definition=yes | |
3848 | else | |
3849 | echo "$as_me: failed program was:" >&5 | |
3850 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3851 | ||
3852 | ac_cv_prog_cc_w_old_style_definition=no | |
3853 | fi | |
3854 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3855 | CFLAGS="$save_CFLAGS" | |
3856 | ||
3857 | fi | |
3858 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
3859 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
3860 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
3861 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
3862 | fi | |
3863 | ||
09a9c095 NN |
3864 | # Enable -Werror, period. |
3865 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
3866 | if test "${enable_werror_always+set}" = set; then | |
3867 | enableval="$enable_werror_always" | |
3868 | ||
3869 | else | |
3870 | enable_werror_always=no | |
3871 | fi; | |
3872 | if test x${enable_werror_always} = xyes ; then | |
3873 | strict1_warn="${strict1_warn} -Werror" | |
3874 | WERROR=-Werror | |
3875 | fi | |
3876 | ||
ba479fd2 | 3877 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
3878 | # That's useful for people building cross-compilers, or just running a |
3879 | # quick `make'. | |
3880 | warn_cflags= | |
3881 | if test "x$GCC" = "xyes"; then | |
3882 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
3883 | fi | |
3884 | ||
3885 | ||
dd859b8a KG |
3886 | # Enable -Werror in bootstrap stage2 and later. |
3887 | # Change the default to "no" on release branches. | |
3888 | # Check whether --enable-werror or --disable-werror was given. | |
3889 | if test "${enable_werror+set}" = set; then | |
3890 | enableval="$enable_werror" | |
ba479fd2 | 3891 | |
dd859b8a KG |
3892 | else |
3893 | enable_werror=yes | |
ba479fd2 | 3894 | fi; |
dd859b8a KG |
3895 | if test x$enable_werror = xyes ; then |
3896 | WERROR=-Werror | |
3897 | fi | |
3898 | ||
3899 | ||
414d23ae HPN |
3900 | # Enable expensive internal checks |
3901 | # Check whether --enable-checking or --disable-checking was given. | |
3902 | if test "${enable_checking+set}" = set; then | |
3903 | enableval="$enable_checking" | |
3904 | ac_checking= | |
3905 | ac_tree_checking= | |
3906 | ac_rtl_checking= | |
3907 | ac_rtlflag_checking= | |
3908 | ac_gc_checking= | |
3909 | ac_gc_always_collect= | |
5dfa45d0 | 3910 | ac_fold_checking= |
414d23ae HPN |
3911 | case "${enableval}" in |
3912 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
3913 | ac_rtlflag_checking=1 ;; | |
3914 | no) ;; | |
3915 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
3916 | set fnord $enableval; shift | |
3917 | IFS="$ac_save_IFS" | |
3918 | for check | |
3919 | do | |
3920 | case $check in | |
d2640b91 PE |
3921 | fold) ac_fold_checking=1 ;; |
3922 | gc) ac_gc_checking=1 ;; | |
3923 | gcac) ac_gc_always_collect=1 ;; | |
414d23ae | 3924 | misc) ac_checking=1 ;; |
414d23ae HPN |
3925 | rtlflag) ac_rtlflag_checking=1 ;; |
3926 | rtl) ac_rtl_checking=1 ;; | |
d2640b91 | 3927 | tree) ac_tree_checking=1 ;; |
414d23ae | 3928 | valgrind) ac_checking_valgrind=1 ;; |
ba479fd2 NN |
3929 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
3930 | echo "$as_me: error: unknown check category $check" >&2;} | |
3931 | { (exit 1); exit 1; }; } ;; | |
414d23ae HPN |
3932 | esac |
3933 | done | |
3934 | ;; | |
3935 | esac | |
3936 | ||
75e93faa | 3937 | else |
414d23ae HPN |
3938 | # Enable some checks by default for development versions of GCC |
3939 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
ba479fd2 NN |
3940 | fi; |
3941 | nocommon_flag="" | |
3942 | if test x$ac_checking != x ; then | |
3943 | ||
3944 | cat >>confdefs.h <<\_ACEOF | |
3945 | #define ENABLE_CHECKING 1 | |
3946 | _ACEOF | |
3947 | ||
3948 | nocommon_flag=-fno-common | |
3949 | fi | |
3950 | ||
3951 | if test x$ac_tree_checking != x ; then | |
3952 | ||
3953 | cat >>confdefs.h <<\_ACEOF | |
3954 | #define ENABLE_TREE_CHECKING 1 | |
3955 | _ACEOF | |
3956 | ||
13f05fd0 | 3957 | TREEBROWSER=tree-browser.o |
ba479fd2 | 3958 | fi |
13f05fd0 | 3959 | |
ba479fd2 NN |
3960 | if test x$ac_rtl_checking != x ; then |
3961 | ||
3962 | cat >>confdefs.h <<\_ACEOF | |
3963 | #define ENABLE_RTL_CHECKING 1 | |
3964 | _ACEOF | |
3965 | ||
3966 | fi | |
3967 | if test x$ac_rtlflag_checking != x ; then | |
3968 | ||
3969 | cat >>confdefs.h <<\_ACEOF | |
3970 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
3971 | _ACEOF | |
3972 | ||
3973 | fi | |
3974 | if test x$ac_gc_checking != x ; then | |
3975 | ||
3976 | cat >>confdefs.h <<\_ACEOF | |
3977 | #define ENABLE_GC_CHECKING 1 | |
3978 | _ACEOF | |
3979 | ||
3980 | fi | |
3981 | if test x$ac_gc_always_collect != x ; then | |
3982 | ||
3983 | cat >>confdefs.h <<\_ACEOF | |
3984 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
3985 | _ACEOF | |
3986 | ||
3987 | fi | |
3988 | if test x$ac_fold_checking != x ; then | |
3989 | ||
3990 | cat >>confdefs.h <<\_ACEOF | |
3991 | #define ENABLE_FOLD_CHECKING 1 | |
3992 | _ACEOF | |
3993 | ||
3994 | fi | |
3995 | valgrind_path_defines= | |
3996 | valgrind_command= | |
3997 | ||
3998 | ||
3999 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
4000 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
4001 | if test "${ac_cv_prog_egrep+set}" = set; then | |
4002 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4003 | else | |
4004 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
4005 | then ac_cv_prog_egrep='grep -E' | |
4006 | else ac_cv_prog_egrep='egrep' | |
4007 | fi | |
4008 | fi | |
4009 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
4010 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
4011 | EGREP=$ac_cv_prog_egrep | |
4012 | ||
4013 | ||
4014 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
4015 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
4016 | if test "${ac_cv_header_stdc+set}" = set; then | |
4017 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4018 | else | |
4019 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4020 | /* confdefs.h. */ |
4021 | _ACEOF | |
4022 | cat confdefs.h >>conftest.$ac_ext | |
4023 | cat >>conftest.$ac_ext <<_ACEOF | |
4024 | /* end confdefs.h. */ | |
4025 | #include <stdlib.h> | |
4026 | #include <stdarg.h> | |
4027 | #include <string.h> | |
4028 | #include <float.h> | |
4029 | ||
4030 | int | |
4031 | main () | |
4032 | { | |
4033 | ||
4034 | ; | |
4035 | return 0; | |
4036 | } | |
4037 | _ACEOF | |
4038 | rm -f conftest.$ac_objext | |
4039 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4040 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4041 | ac_status=$? |
86da66b5 HPN |
4042 | grep -v '^ *+' conftest.er1 >conftest.err |
4043 | rm -f conftest.er1 | |
4044 | cat conftest.err >&5 | |
ba479fd2 NN |
4045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4046 | (exit $ac_status); } && | |
fb38008e | 4047 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4049 | (eval $ac_try) 2>&5 | |
4050 | ac_status=$? | |
4051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4052 | (exit $ac_status); }; } && | |
4053 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4054 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4055 | (eval $ac_try) 2>&5 | |
4056 | ac_status=$? | |
4057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4058 | (exit $ac_status); }; }; then | |
4059 | ac_cv_header_stdc=yes | |
4060 | else | |
4061 | echo "$as_me: failed program was:" >&5 | |
4062 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4063 | ||
4064 | ac_cv_header_stdc=no | |
4065 | fi | |
86da66b5 | 4066 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4067 | |
4068 | if test $ac_cv_header_stdc = yes; then | |
4069 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
4070 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4071 | /* confdefs.h. */ |
4072 | _ACEOF | |
4073 | cat confdefs.h >>conftest.$ac_ext | |
4074 | cat >>conftest.$ac_ext <<_ACEOF | |
4075 | /* end confdefs.h. */ | |
4076 | #include <string.h> | |
4077 | ||
4078 | _ACEOF | |
4079 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4080 | $EGREP "memchr" >/dev/null 2>&1; then | |
4081 | : | |
4082 | else | |
4083 | ac_cv_header_stdc=no | |
4084 | fi | |
4085 | rm -f conftest* | |
4086 | ||
4087 | fi | |
4088 | ||
4089 | if test $ac_cv_header_stdc = yes; then | |
4090 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
4091 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4092 | /* confdefs.h. */ |
4093 | _ACEOF | |
4094 | cat confdefs.h >>conftest.$ac_ext | |
4095 | cat >>conftest.$ac_ext <<_ACEOF | |
4096 | /* end confdefs.h. */ | |
4097 | #include <stdlib.h> | |
4098 | ||
4099 | _ACEOF | |
4100 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4101 | $EGREP "free" >/dev/null 2>&1; then | |
4102 | : | |
4103 | else | |
4104 | ac_cv_header_stdc=no | |
4105 | fi | |
4106 | rm -f conftest* | |
4107 | ||
4108 | fi | |
4109 | ||
4110 | if test $ac_cv_header_stdc = yes; then | |
4111 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
4112 | if test "$cross_compiling" = yes; then | |
4113 | : | |
4114 | else | |
4115 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4116 | /* confdefs.h. */ |
4117 | _ACEOF | |
4118 | cat confdefs.h >>conftest.$ac_ext | |
4119 | cat >>conftest.$ac_ext <<_ACEOF | |
4120 | /* end confdefs.h. */ | |
4121 | #include <ctype.h> | |
4122 | #if ((' ' & 0x0FF) == 0x020) | |
4123 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
4124 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
4125 | #else | |
4126 | # define ISLOWER(c) \ | |
86da66b5 HPN |
4127 | (('a' <= (c) && (c) <= 'i') \ |
4128 | || ('j' <= (c) && (c) <= 'r') \ | |
4129 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
4130 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
4131 | #endif | |
4132 | ||
4133 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
4134 | int | |
4135 | main () | |
4136 | { | |
4137 | int i; | |
4138 | for (i = 0; i < 256; i++) | |
4139 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 4140 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
4141 | exit(2); |
4142 | exit (0); | |
4143 | } | |
4144 | _ACEOF | |
4145 | rm -f conftest$ac_exeext | |
4146 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4147 | (eval $ac_link) 2>&5 | |
4148 | ac_status=$? | |
4149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4150 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4151 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4152 | (eval $ac_try) 2>&5 | |
4153 | ac_status=$? | |
4154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4155 | (exit $ac_status); }; }; then | |
4156 | : | |
4157 | else | |
4158 | echo "$as_me: program exited with status $ac_status" >&5 | |
4159 | echo "$as_me: failed program was:" >&5 | |
4160 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4161 | ||
4162 | ( exit $ac_status ) | |
4163 | ac_cv_header_stdc=no | |
63cf211a | 4164 | fi |
86da66b5 | 4165 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4166 | fi |
4167 | fi | |
4168 | fi | |
4169 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4170 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
4171 | if test $ac_cv_header_stdc = yes; then | |
63cf211a | 4172 | |
ba479fd2 NN |
4173 | cat >>confdefs.h <<\_ACEOF |
4174 | #define STDC_HEADERS 1 | |
4175 | _ACEOF | |
75e93faa | 4176 | |
414d23ae | 4177 | fi |
827ae6cf | 4178 | |
ba479fd2 NN |
4179 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4180 | ||
4181 | ||
4182 | ||
827ae6cf | 4183 | |
6e3f3080 NN |
4184 | |
4185 | ||
6e3f3080 | 4186 | |
6e3f3080 | 4187 | |
ba479fd2 NN |
4188 | |
4189 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
86da66b5 | 4190 | inttypes.h stdint.h unistd.h |
ba479fd2 NN |
4191 | do |
4192 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4193 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4194 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4195 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4196 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4197 | else | |
4198 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4199 | /* confdefs.h. */ |
4200 | _ACEOF | |
4201 | cat confdefs.h >>conftest.$ac_ext | |
4202 | cat >>conftest.$ac_ext <<_ACEOF | |
4203 | /* end confdefs.h. */ | |
4204 | $ac_includes_default | |
4205 | ||
4206 | #include <$ac_header> | |
4207 | _ACEOF | |
4208 | rm -f conftest.$ac_objext | |
4209 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4210 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4211 | ac_status=$? |
86da66b5 HPN |
4212 | grep -v '^ *+' conftest.er1 >conftest.err |
4213 | rm -f conftest.er1 | |
4214 | cat conftest.err >&5 | |
ba479fd2 NN |
4215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4216 | (exit $ac_status); } && | |
fb38008e | 4217 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4219 | (eval $ac_try) 2>&5 | |
4220 | ac_status=$? | |
4221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4222 | (exit $ac_status); }; } && | |
4223 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4225 | (eval $ac_try) 2>&5 | |
4226 | ac_status=$? | |
4227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4228 | (exit $ac_status); }; }; then | |
4229 | eval "$as_ac_Header=yes" | |
4230 | else | |
4231 | echo "$as_me: failed program was:" >&5 | |
4232 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4233 | ||
4234 | eval "$as_ac_Header=no" | |
4235 | fi | |
86da66b5 | 4236 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4237 | fi |
4238 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4239 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4240 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4241 | cat >>confdefs.h <<_ACEOF | |
4242 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4243 | _ACEOF | |
6e3f3080 | 4244 | |
63cf211a | 4245 | fi |
6e3f3080 | 4246 | |
ba479fd2 NN |
4247 | done |
4248 | ||
4249 | ||
4250 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4251 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4252 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4253 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4254 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4255 | fi | |
4256 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
4257 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4258 | else | |
4259 | # Is the header compilable? | |
4260 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
4261 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
4262 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4263 | /* confdefs.h. */ |
4264 | _ACEOF | |
4265 | cat confdefs.h >>conftest.$ac_ext | |
4266 | cat >>conftest.$ac_ext <<_ACEOF | |
4267 | /* end confdefs.h. */ | |
4268 | $ac_includes_default | |
63cf211a | 4269 | #include <valgrind.h> |
ba479fd2 NN |
4270 | _ACEOF |
4271 | rm -f conftest.$ac_objext | |
4272 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 4273 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 4274 | ac_status=$? |
86da66b5 HPN |
4275 | grep -v '^ *+' conftest.er1 >conftest.err |
4276 | rm -f conftest.er1 | |
4277 | cat conftest.err >&5 | |
ba479fd2 NN |
4278 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
4279 | (exit $ac_status); } && | |
fb38008e | 4280 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
4281 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4282 | (eval $ac_try) 2>&5 | |
4283 | ac_status=$? | |
4284 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4285 | (exit $ac_status); }; } && | |
4286 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
4287 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4288 | (eval $ac_try) 2>&5 | |
4289 | ac_status=$? | |
4290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4291 | (exit $ac_status); }; }; then | |
4292 | ac_header_compiler=yes | |
4293 | else | |
4294 | echo "$as_me: failed program was:" >&5 | |
4295 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4296 | ||
4297 | ac_header_compiler=no | |
4298 | fi | |
86da66b5 | 4299 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4300 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
4301 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
4302 | ||
4303 | # Is the header present? | |
4304 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
4305 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
4306 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4307 | /* confdefs.h. */ |
4308 | _ACEOF | |
4309 | cat confdefs.h >>conftest.$ac_ext | |
4310 | cat >>conftest.$ac_ext <<_ACEOF | |
4311 | /* end confdefs.h. */ | |
4312 | #include <valgrind.h> | |
4313 | _ACEOF | |
4314 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4315 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4316 | ac_status=$? | |
4317 | grep -v '^ *+' conftest.er1 >conftest.err | |
4318 | rm -f conftest.er1 | |
4319 | cat conftest.err >&5 | |
4320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4321 | (exit $ac_status); } >/dev/null; then | |
4322 | if test -s conftest.err; then | |
4323 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4324 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4325 | else |
4326 | ac_cpp_err= | |
4327 | fi | |
4328 | else | |
4329 | ac_cpp_err=yes | |
4330 | fi | |
4331 | if test -z "$ac_cpp_err"; then | |
4332 | ac_header_preproc=yes | |
4333 | else | |
4334 | echo "$as_me: failed program was:" >&5 | |
4335 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4336 | ||
4337 | ac_header_preproc=no | |
4338 | fi | |
4339 | rm -f conftest.err conftest.$ac_ext | |
4340 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4341 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
4342 | ||
4343 | # So? What about this header? | |
86da66b5 HPN |
4344 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
4345 | yes:no: ) | |
ba479fd2 NN |
4346 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
4347 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
4348 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
4349 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
4350 | ac_header_preproc=yes | |
ba479fd2 | 4351 | ;; |
86da66b5 | 4352 | no:yes:* ) |
ba479fd2 NN |
4353 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
4354 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
4355 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
4356 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
4357 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
4358 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
4359 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
4360 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
4361 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
4362 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
4363 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
4364 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
4365 | ( |
4366 | cat <<\_ASBOX | |
86da66b5 HPN |
4367 | ## ------------------------------------------ ## |
4368 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
4369 | ## ------------------------------------------ ## | |
ba479fd2 NN |
4370 | _ASBOX |
4371 | ) | | |
4372 | sed "s/^/$as_me: WARNING: /" >&2 | |
4373 | ;; | |
4374 | esac | |
4375 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4376 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4377 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4378 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4379 | else | |
4380 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 4381 | fi |
ba479fd2 NN |
4382 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
4383 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4384 | ||
6e3f3080 | 4385 | fi |
ba479fd2 | 4386 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
4387 | have_valgrind_h=yes |
4388 | else | |
ba479fd2 | 4389 | have_valgrind_h=no |
6938ec6c NN |
4390 | fi |
4391 | ||
4392 | ||
ba479fd2 | 4393 | |
414d23ae HPN |
4394 | if test x$ac_checking_valgrind != x ; then |
4395 | # It is certainly possible that there's valgrind but no valgrind.h. | |
4396 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
4397 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
4398 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
4399 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4400 | /* confdefs.h. */ |
4401 | _ACEOF | |
4402 | cat confdefs.h >>conftest.$ac_ext | |
4403 | cat >>conftest.$ac_ext <<_ACEOF | |
4404 | /* end confdefs.h. */ | |
a207b594 | 4405 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
4406 | #ifndef VALGRIND_DISCARD |
4407 | #error VALGRIND_DISCARD not defined | |
4408 | #endif | |
ba479fd2 NN |
4409 | _ACEOF |
4410 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4411 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4412 | ac_status=$? | |
4413 | grep -v '^ *+' conftest.er1 >conftest.err | |
4414 | rm -f conftest.er1 | |
4415 | cat conftest.err >&5 | |
4416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4417 | (exit $ac_status); } >/dev/null; then | |
4418 | if test -s conftest.err; then | |
4419 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4420 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4421 | else |
4422 | ac_cpp_err= | |
4423 | fi | |
4424 | else | |
4425 | ac_cpp_err=yes | |
4426 | fi | |
4427 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
4428 | gcc_cv_header_valgrind_memcheck_h=yes |
4429 | else | |
ba479fd2 NN |
4430 | echo "$as_me: failed program was:" >&5 |
4431 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4432 | ||
a207b594 HPN |
4433 | gcc_cv_header_valgrind_memcheck_h=no |
4434 | fi | |
ba479fd2 NN |
4435 | rm -f conftest.err conftest.$ac_ext |
4436 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
4437 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
4438 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
4439 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
4440 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
4441 | /* confdefs.h. */ |
4442 | _ACEOF | |
4443 | cat confdefs.h >>conftest.$ac_ext | |
4444 | cat >>conftest.$ac_ext <<_ACEOF | |
4445 | /* end confdefs.h. */ | |
a207b594 HPN |
4446 | #include <memcheck.h> |
4447 | #ifndef VALGRIND_DISCARD | |
4448 | #error VALGRIND_DISCARD not defined | |
4449 | #endif | |
ba479fd2 NN |
4450 | _ACEOF |
4451 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4452 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4453 | ac_status=$? | |
4454 | grep -v '^ *+' conftest.er1 >conftest.err | |
4455 | rm -f conftest.er1 | |
4456 | cat conftest.err >&5 | |
4457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4458 | (exit $ac_status); } >/dev/null; then | |
4459 | if test -s conftest.err; then | |
4460 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 4461 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
4462 | else |
4463 | ac_cpp_err= | |
4464 | fi | |
4465 | else | |
4466 | ac_cpp_err=yes | |
4467 | fi | |
4468 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
4469 | gcc_cv_header_memcheck_h=yes |
4470 | else | |
ba479fd2 NN |
4471 | echo "$as_me: failed program was:" >&5 |
4472 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4473 | ||
cafe096b EC |
4474 | gcc_cv_header_memcheck_h=no |
4475 | fi | |
ba479fd2 NN |
4476 | rm -f conftest.err conftest.$ac_ext |
4477 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
4478 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
4479 | ||
56694dd9 ZW |
4480 | # Prepare PATH_SEPARATOR. |
4481 | # The user is always right. | |
4482 | if test "${PATH_SEPARATOR+set}" != set; then | |
4483 | echo "#! /bin/sh" >conf$$.sh | |
4484 | echo "exit 0" >>conf$$.sh | |
4485 | chmod +x conf$$.sh | |
4486 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
4487 | PATH_SEPARATOR=';' | |
4488 | else | |
4489 | PATH_SEPARATOR=: | |
4490 | fi | |
4491 | rm -f conf$$.sh | |
4492 | fi | |
4493 | ||
4494 | # Find out how to test for executable files. Don't use a zero-byte file, | |
4495 | # as systems may use methods other than mode bits to determine executability. | |
4496 | cat >conf$$.file <<_ASEOF | |
4497 | #! /bin/sh | |
4498 | exit 0 | |
4499 | _ASEOF | |
4500 | chmod +x conf$$.file | |
4501 | if test -x conf$$.file >/dev/null 2>&1; then | |
4502 | ac_executable_p="test -x" | |
4503 | else | |
4504 | ac_executable_p="test -f" | |
4505 | fi | |
4506 | rm -f conf$$.file | |
4507 | ||
4508 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 4509 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
4510 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4511 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4512 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
4513 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
4514 | else |
4515 | case "$valgrind_path" in | |
56694dd9 ZW |
4516 | [\\/]* | ?:[\\/]*) |
4517 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
4518 | ;; | |
414d23ae | 4519 | *) |
56694dd9 ZW |
4520 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
4521 | for ac_dir in $PATH; do | |
4522 | IFS="$ac_save_IFS" | |
4523 | test -z "$ac_dir" && ac_dir=. | |
4524 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4525 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
4526 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
4527 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
4528 | break 2 | |
4529 | fi | |
4530 | fi | |
4531 | done | |
4532 | done | |
4533 | IFS="$ac_save_IFS" | |
4534 | ;; | |
414d23ae | 4535 | esac |
75e93faa | 4536 | fi |
414d23ae HPN |
4537 | valgrind_path="$ac_cv_path_valgrind_path" |
4538 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
4539 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
4540 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 4541 | else |
ba479fd2 NN |
4542 | echo "$as_me:$LINENO: result: no" >&5 |
4543 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
4544 | fi |
4545 | ||
a207b594 HPN |
4546 | if test "x$valgrind_path" = "x" \ |
4547 | || (test $have_valgrind_h = no \ | |
4548 | && test $gcc_cv_header_memcheck_h = no \ | |
4549 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
4550 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
4551 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
4552 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
4553 | fi |
4554 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
4555 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
4556 | |
4557 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 4558 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 4559 | _ACEOF |
75e93faa | 4560 | |
a207b594 | 4561 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
4562 | |
4563 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 4564 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 4565 | _ACEOF |
a207b594 HPN |
4566 | |
4567 | fi | |
14011ca4 | 4568 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
4569 | |
4570 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 4571 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 4572 | _ACEOF |
14011ca4 AJ |
4573 | |
4574 | fi | |
414d23ae | 4575 | fi |
75e93faa | 4576 | |
75e93faa ZW |
4577 | |
4578 | ||
74ee1642 PB |
4579 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
4580 | if test "${enable_mapped_location+set}" = set; then | |
4581 | enableval="$enable_mapped_location" | |
4582 | ||
4583 | else | |
4584 | enable_mapped_location=no | |
4585 | fi; | |
4586 | ||
4587 | if test "$enable_mapped_location" = yes ; then | |
4588 | ||
4589 | cat >>confdefs.h <<\_ACEOF | |
4590 | #define USE_MAPPED_LOCATION 1 | |
4591 | _ACEOF | |
4592 | ||
4593 | fi | |
4594 | ||
414d23ae HPN |
4595 | # Enable code coverage collection |
4596 | # Check whether --enable-coverage or --disable-coverage was given. | |
4597 | if test "${enable_coverage+set}" = set; then | |
4598 | enableval="$enable_coverage" | |
4599 | case "${enableval}" in | |
6dd297da NN |
4600 | yes|noopt) |
4601 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
4602 | ;; | |
4603 | opt) | |
4604 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
4605 | ;; | |
4606 | no) | |
4607 | # a.k.a. --disable-coverage | |
4608 | coverage_flags="" | |
4609 | ;; | |
4610 | *) | |
4611 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
4612 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
4613 | { (exit 1); exit 1; }; } | |
6dd297da | 4614 | ;; |
414d23ae | 4615 | esac |
75e93faa | 4616 | else |
414d23ae | 4617 | coverage_flags="" |
ba479fd2 | 4618 | fi; |
5c3bc9fb | 4619 | |
414d23ae | 4620 | |
439a7e54 DN |
4621 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
4622 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
4623 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 4624 | |
439a7e54 DN |
4625 | else |
4626 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 4627 | fi; |
439a7e54 | 4628 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
4629 | |
4630 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 4631 | #define GATHER_STATISTICS 1 |
ba479fd2 | 4632 | _ACEOF |
439a7e54 DN |
4633 | |
4634 | fi | |
4635 | ||
73458fb7 NN |
4636 | # ------------------------------- |
4637 | # Miscenalleous configure options | |
4638 | # ------------------------------- | |
34a86c2b NN |
4639 | |
4640 | # With stabs | |
ba479fd2 | 4641 | |
34a86c2b NN |
4642 | # Check whether --with-stabs or --without-stabs was given. |
4643 | if test "${with_stabs+set}" = set; then | |
4644 | withval="$with_stabs" | |
4645 | stabs="$with_stabs" | |
4646 | else | |
4647 | stabs=no | |
ba479fd2 | 4648 | fi; |
cafe096b | 4649 | |
34a86c2b NN |
4650 | # Determine whether or not multilibs are enabled. |
4651 | # Check whether --enable-multilib or --disable-multilib was given. | |
4652 | if test "${enable_multilib+set}" = set; then | |
4653 | enableval="$enable_multilib" | |
ba479fd2 | 4654 | |
34a86c2b NN |
4655 | else |
4656 | enable_multilib=yes | |
ba479fd2 | 4657 | fi; |
75e93faa | 4658 | |
34a86c2b | 4659 | |
414d23ae HPN |
4660 | # Enable __cxa_atexit for C++. |
4661 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
4662 | if test "${enable___cxa_atexit+set}" = set; then | |
4663 | enableval="$enable___cxa_atexit" | |
75e93faa | 4664 | |
ba479fd2 | 4665 | fi; |
75e93faa | 4666 | |
414d23ae HPN |
4667 | # Enable threads |
4668 | # Pass with no value to take the default | |
4669 | # Pass with a value to specify a thread package | |
4670 | # Check whether --enable-threads or --disable-threads was given. | |
4671 | if test "${enable_threads+set}" = set; then | |
4672 | enableval="$enable_threads" | |
ba479fd2 | 4673 | |
414d23ae HPN |
4674 | else |
4675 | enable_threads='' | |
ba479fd2 | 4676 | fi; |
414d23ae HPN |
4677 | |
4678 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
4679 | if test "${enable_objc_gc+set}" = set; then | |
4680 | enableval="$enable_objc_gc" | |
4681 | if test x$enable_objc_gc = xno; then | |
4682 | objc_boehm_gc='' | |
4683 | else | |
4684 | objc_boehm_gc=1 | |
4685 | fi | |
4686 | else | |
4687 | objc_boehm_gc='' | |
ba479fd2 | 4688 | fi; |
75e93faa ZW |
4689 | |
4690 | ||
414d23ae HPN |
4691 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
4692 | if test "${with_dwarf2+set}" = set; then | |
4693 | withval="$with_dwarf2" | |
4694 | dwarf2="$with_dwarf2" | |
75e93faa | 4695 | else |
414d23ae | 4696 | dwarf2=no |
ba479fd2 | 4697 | fi; |
75e93faa | 4698 | |
414d23ae HPN |
4699 | # Check whether --enable-shared or --disable-shared was given. |
4700 | if test "${enable_shared+set}" = set; then | |
4701 | enableval="$enable_shared" | |
ba479fd2 | 4702 | |
414d23ae HPN |
4703 | case $enable_shared in |
4704 | yes | no) ;; | |
4705 | *) | |
4706 | enable_shared=no | |
4707 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
4708 | for pkg in $enableval; do | |
4709 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
4710 | enable_shared=yes | |
4711 | fi | |
4712 | done | |
4713 | IFS="$ac_save_ifs" | |
4714 | ;; | |
4715 | esac | |
4716 | ||
75e93faa | 4717 | else |
414d23ae | 4718 | enable_shared=yes |
ba479fd2 | 4719 | fi; |
75e93faa | 4720 | |
75e93faa | 4721 | |
75e93faa | 4722 | |
4977bab6 ZW |
4723 | # Check whether --with-sysroot or --without-sysroot was given. |
4724 | if test "${with_sysroot+set}" = set; then | |
4725 | withval="$with_sysroot" | |
ba479fd2 | 4726 | |
4977bab6 | 4727 | case ${with_sysroot} in |
caa55b1e | 4728 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
4729 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
4730 | esac | |
ba479fd2 | 4731 | |
4977bab6 ZW |
4732 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
4733 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
4734 | ||
047d636f DJ |
4735 | if test "x$exec_prefix" = xNONE; then |
4736 | if test "x$prefix" = xNONE; then | |
4737 | test_prefix=/usr/local | |
4738 | else | |
4739 | test_prefix=$prefix | |
4740 | fi | |
4741 | else | |
4742 | test_prefix=$exec_prefix | |
4743 | fi | |
4744 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
4745 | "${test_prefix}"|"${test_prefix}/"*|\ |
4746 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
4747 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
4748 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
4749 | ;; | |
4750 | esac | |
4751 | ||
4977bab6 | 4752 | else |
ba479fd2 | 4753 | |
4977bab6 | 4754 | TARGET_SYSTEM_ROOT= |
db720d9a | 4755 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
4756 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
4757 | ||
ba479fd2 | 4758 | fi; |
4977bab6 ZW |
4759 | |
4760 | ||
4761 | ||
4762 | ||
d1bd0ded | 4763 | # Build with intermodule optimisations |
d1bd0ded GK |
4764 | # Check whether --enable-intermodule or --disable-intermodule was given. |
4765 | if test "${enable_intermodule+set}" = set; then | |
4766 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
4767 | case ${enable_intermodule} in |
4768 | yes) onestep="-onestep";; | |
4769 | *) onestep="";; | |
d1bd0ded | 4770 | esac |
0c46c5c7 KC |
4771 | else |
4772 | onestep="" | |
ba479fd2 | 4773 | fi; |
d1bd0ded GK |
4774 | |
4775 | ||
f3c9f174 NN |
4776 | # Sanity check enable_languages in case someone does not run the toplevel |
4777 | # configure # script. | |
4778 | # Check whether --enable-languages or --disable-languages was given. | |
4779 | if test "${enable_languages+set}" = set; then | |
4780 | enableval="$enable_languages" | |
4781 | case ,${enable_languages}, in | |
4782 | ,,|,yes,) | |
4783 | # go safe -- we cannot be much sure without the toplevel | |
4784 | # configure's | |
4785 | # analysis of which target libs are present and usable | |
4786 | enable_languages=c | |
4787 | ;; | |
4788 | *,all,*) | |
4789 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
4790 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
4791 | { (exit 1); exit 1; }; } | |
4792 | ;; | |
4793 | *,c,*) | |
4794 | ;; | |
4795 | *) | |
4796 | enable_languages=c,${enable_languages} | |
4797 | ;; | |
4798 | esac | |
4799 | else | |
4800 | enable_languages=c | |
4801 | fi; | |
4802 | ||
4803 | subdirs= | |
4804 | for lang in ${srcdir}/*/config-lang.in | |
4805 | do | |
4806 | case $lang in | |
4807 | # The odd quoting in the next line works around | |
4808 | # an apparent bug in bash 1.12 on linux. | |
4809 | ${srcdir}/[*]/config-lang.in) ;; | |
4810 | *) | |
4811 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
4812 | if test "x$lang_alias" = x | |
4813 | then | |
4814 | echo "$lang doesn't set \$language." 1>&2 | |
4815 | exit 1 | |
4816 | fi | |
4817 | case ",$enable_languages," in | |
4818 | *,$lang_alias,*) | |
4819 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;; | |
4820 | esac | |
4821 | ;; | |
4822 | esac | |
4823 | done | |
4824 | ||
4825 | ||
73458fb7 NN |
4826 | # ------------------------- |
4827 | # Checks for other programs | |
4828 | # ------------------------- | |
5b67ad6f | 4829 | |
ba479fd2 NN |
4830 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4831 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 4832 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
4833 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
4834 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 4835 | else |
ba479fd2 | 4836 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 4837 | all: |
ba479fd2 NN |
4838 | @echo 'ac_maketemp="$(MAKE)"' |
4839 | _ACEOF | |
e9a25f70 | 4840 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 4841 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
4842 | if test -n "$ac_maketemp"; then |
4843 | eval ac_cv_prog_make_${ac_make}_set=yes | |
4844 | else | |
4845 | eval ac_cv_prog_make_${ac_make}_set=no | |
4846 | fi | |
ba479fd2 | 4847 | rm -f conftest.make |
e9a25f70 JL |
4848 | fi |
4849 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
4850 | echo "$as_me:$LINENO: result: yes" >&5 |
4851 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
4852 | SET_MAKE= |
4853 | else | |
ba479fd2 NN |
4854 | echo "$as_me:$LINENO: result: no" >&5 |
4855 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
4856 | SET_MAKE="MAKE=${MAKE-make}" |
4857 | fi | |
4858 | ||
4859 | ||
861bb6c1 | 4860 | # Find some useful tools |
ba479fd2 | 4861 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 4862 | do |
ba479fd2 | 4863 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 4864 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
4865 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4866 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4867 | if test "${ac_cv_prog_AWK+set}" = set; then | |
4868 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4869 | else |
4870 | if test -n "$AWK"; then | |
4871 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
4872 | else | |
ba479fd2 NN |
4873 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4874 | for as_dir in $PATH | |
4875 | do | |
4876 | IFS=$as_save_IFS | |
4877 | test -z "$as_dir" && as_dir=. | |
4878 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4879 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4880 | ac_cv_prog_AWK="$ac_prog" | |
4881 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4882 | break 2 | |
4883 | fi | |
4884 | done | |
4885 | done | |
4886 | ||
861bb6c1 JL |
4887 | fi |
4888 | fi | |
ba479fd2 | 4889 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 4890 | if test -n "$AWK"; then |
ba479fd2 NN |
4891 | echo "$as_me:$LINENO: result: $AWK" >&5 |
4892 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 4893 | else |
ba479fd2 NN |
4894 | echo "$as_me:$LINENO: result: no" >&5 |
4895 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
4896 | fi |
4897 | ||
ba479fd2 | 4898 | test -n "$AWK" && break |
861bb6c1 JL |
4899 | done |
4900 | ||
776dc15d | 4901 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
4902 | # Bail out if it's missing. |
4903 | case ${AWK} in | |
ba479fd2 NN |
4904 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
4905 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
4906 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
4907 | esac |
4908 | ||
ba479fd2 NN |
4909 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
4910 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
4911 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
4912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
4913 | else |
4914 | rm -f conftestdata_t | |
4915 | echo >conftestdata_f | |
4916 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
4917 | then | |
4918 | gcc_cv_prog_LN_S="ln -s" | |
4919 | else | |
4920 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4921 | then | |
4922 | gcc_cv_prog_LN_S=ln | |
4923 | else | |
4924 | gcc_cv_prog_LN_S=cp | |
4925 | fi | |
4926 | fi | |
4927 | rm -f conftestdata_f conftestdata_t | |
4928 | ||
4929 | fi | |
4930 | LN_S="$gcc_cv_prog_LN_S" | |
4931 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
4932 | echo "$as_me:$LINENO: result: yes" >&5 |
4933 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
4934 | else |
4935 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
4936 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
4937 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 4938 | else |
ba479fd2 NN |
4939 | echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5 |
4940 | echo "${ECHO_T}no, and neither does ln, so using cp" >&6 | |
0a4b6309 RL |
4941 | fi |
4942 | fi | |
4943 | ||
41e622a8 AP |
4944 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
4945 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
4946 | if test "${acx_cv_prog_LN+set}" = set; then | |
4947 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4948 | else | |
4949 | rm -f conftestdata_t | |
4950 | echo >conftestdata_f | |
4951 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4952 | then | |
4953 | acx_cv_prog_LN=ln | |
4954 | else | |
4955 | acx_cv_prog_LN=no | |
4956 | fi | |
4957 | rm -f conftestdata_f conftestdata_t | |
4958 | ||
4959 | fi | |
4960 | if test $acx_cv_prog_LN = no; then | |
4961 | LN="$LN_S" | |
4962 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
4963 | echo "${ECHO_T}no, using $LN" >&6 | |
4964 | else | |
4965 | LN="$acx_cv_prog_LN" | |
4966 | echo "$as_me:$LINENO: result: yes" >&5 | |
4967 | echo "${ECHO_T}yes" >&6 | |
4968 | fi | |
4969 | ||
ba479fd2 NN |
4970 | if test -n "$ac_tool_prefix"; then |
4971 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4972 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4973 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
4974 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4975 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
4976 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4977 | else |
4978 | if test -n "$RANLIB"; then | |
4979 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4980 | else | |
ba479fd2 NN |
4981 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4982 | for as_dir in $PATH | |
4983 | do | |
4984 | IFS=$as_save_IFS | |
4985 | test -z "$as_dir" && as_dir=. | |
4986 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4987 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4988 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4989 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4990 | break 2 | |
4991 | fi | |
4992 | done | |
4993 | done | |
4994 | ||
6e3f3080 NN |
4995 | fi |
4996 | fi | |
ba479fd2 | 4997 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 4998 | if test -n "$RANLIB"; then |
ba479fd2 NN |
4999 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
5000 | echo "${ECHO_T}$RANLIB" >&6 | |
5001 | else | |
5002 | echo "$as_me:$LINENO: result: no" >&5 | |
5003 | echo "${ECHO_T}no" >&6 | |
5004 | fi | |
5005 | ||
5006 | fi | |
5007 | if test -z "$ac_cv_prog_RANLIB"; then | |
5008 | ac_ct_RANLIB=$RANLIB | |
5009 | # Extract the first word of "ranlib", so it can be a program name with args. | |
5010 | set dummy ranlib; ac_word=$2 | |
5011 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
5012 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5013 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
5014 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5015 | else | |
5016 | if test -n "$ac_ct_RANLIB"; then | |
5017 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
5018 | else | |
5019 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5020 | for as_dir in $PATH | |
5021 | do | |
5022 | IFS=$as_save_IFS | |
5023 | test -z "$as_dir" && as_dir=. | |
5024 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5025 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5026 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
5027 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5028 | break 2 | |
5029 | fi | |
5030 | done | |
5031 | done | |
5032 | ||
5033 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
5034 | fi | |
5035 | fi | |
5036 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
5037 | if test -n "$ac_ct_RANLIB"; then | |
5038 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
5039 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 5040 | else |
ba479fd2 NN |
5041 | echo "$as_me:$LINENO: result: no" >&5 |
5042 | echo "${ECHO_T}no" >&6 | |
5043 | fi | |
5044 | ||
5045 | RANLIB=$ac_ct_RANLIB | |
5046 | else | |
5047 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
5048 | fi |
5049 | ||
343a6100 MM |
5050 | case "${host}" in |
5051 | *-*-darwin*) | |
5052 | # By default, the Darwin ranlib will not treat common symbols as | |
5053 | # definitions when building the archive table of contents. Other | |
5054 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
5055 | # it behave similarly. | |
5056 | ranlib_flags="-c" | |
5057 | ;; | |
5058 | *) | |
5059 | ranlib_flags="" | |
5060 | esac | |
5061 | ||
5062 | ||
0a4b6309 RL |
5063 | # Find a good install program. We prefer a C program (faster), |
5064 | # so one script is as good as another. But avoid the broken or | |
5065 | # incompatible versions: | |
5066 | # SysV /etc/install, /usr/sbin/install | |
5067 | # SunOS /usr/etc/install | |
5068 | # IRIX /sbin/install | |
5069 | # AIX /bin/install | |
5070 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
5071 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
5072 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
5073 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
5074 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 5075 | if test -z "$INSTALL"; then |
ba479fd2 NN |
5076 | if test "${ac_cv_path_install+set}" = set; then |
5077 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
5078 | else |
5079 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
5080 | for ac_dir in $PATH; do | |
5081 | # Account for people who put trailing slashes in PATH elements. | |
5082 | case "$ac_dir/" in | |
5083 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
5084 | *) | |
5085 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
5086 | for ac_prog in ginstall scoinst install; do | |
5087 | if test -f $ac_dir/$ac_prog; then | |
5088 | if test $ac_prog = install && | |
5089 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
5090 | # AIX install. It has an incompatible calling convention. | |
5091 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
5092 | : | |
5093 | else | |
5094 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
5095 | break 2 | |
5096 | fi | |
5097 | fi | |
5098 | done | |
5099 | ;; | |
5100 | esac | |
5101 | done | |
5102 | IFS="$ac_save_IFS" | |
5103 | ||
5104 | fi | |
5105 | if test "${ac_cv_path_install+set}" = set; then | |
5106 | INSTALL="$ac_cv_path_install" | |
5107 | else | |
5108 | # As a last resort, use the slow shell script. We don't cache a | |
5109 | # path for INSTALL within a source directory, because that will | |
5110 | # break other packages using the cache if that directory is | |
5111 | # removed, or if the path is relative. | |
5112 | INSTALL="$ac_install_sh" | |
5113 | fi | |
5114 | fi | |
ba479fd2 NN |
5115 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
5116 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
5117 | |
5118 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
5119 | # It thinks the first close brace ends the variable substitution. | |
5120 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
5121 | ||
5122 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
5123 | ||
861bb6c1 | 5124 | |
3a000df0 | 5125 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
5126 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
5127 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
5128 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
5129 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
5130 | else |
5131 | echo abfoo >t1 | |
5132 | echo cdfoo >t2 | |
269a7343 | 5133 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
5134 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
5135 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 5136 | : |
3a000df0 KC |
5137 | else |
5138 | gcc_cv_prog_cmp_skip=gnucompare | |
5139 | fi | |
269a7343 KG |
5140 | fi |
5141 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
5142 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
5143 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
5144 | : | |
5145 | else | |
5146 | gcc_cv_prog_cmp_skip=fastcompare | |
5147 | fi | |
5148 | fi | |
3a000df0 KC |
5149 | fi |
5150 | rm t1 t2 | |
5151 | ||
5152 | fi | |
ba479fd2 NN |
5153 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
5154 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
5155 | make_compare_target=$gcc_cv_prog_cmp_skip |
5156 | ||
5157 | ||
5158 | ||
73458fb7 NN |
5159 | # See if we have the mktemp command. |
5160 | # Extract the first word of "mktemp", so it can be a program name with args. | |
5161 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
5162 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5163 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5164 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
5165 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5166 | else |
5167 | if test -n "$have_mktemp_command"; then | |
5168 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
5169 | else | |
ba479fd2 NN |
5170 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5171 | for as_dir in $PATH | |
5172 | do | |
5173 | IFS=$as_save_IFS | |
5174 | test -z "$as_dir" && as_dir=. | |
5175 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5176 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5177 | ac_cv_prog_have_mktemp_command="yes" | |
5178 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5179 | break 2 | |
5180 | fi | |
5181 | done | |
5182 | done | |
5183 | ||
73458fb7 NN |
5184 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
5185 | fi | |
5186 | fi | |
ba479fd2 | 5187 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 5188 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
5189 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
5190 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 5191 | else |
ba479fd2 NN |
5192 | echo "$as_me:$LINENO: result: no" >&5 |
5193 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5194 | fi |
5195 | ||
5196 | ||
7c27e184 PB |
5197 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
5198 | ||
5199 | # See if makeinfo has been installed and is modern enough | |
5200 | # that we can use it. | |
5201 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
73458fb7 | 5202 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
5203 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5204 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5205 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
5206 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5207 | else |
5208 | if test -n "$MAKEINFO"; then | |
5209 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
5210 | else | |
ba479fd2 NN |
5211 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5212 | for as_dir in $PATH | |
5213 | do | |
5214 | IFS=$as_save_IFS | |
5215 | test -z "$as_dir" && as_dir=. | |
5216 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5217 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5218 | ac_cv_prog_MAKEINFO="makeinfo" | |
5219 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5220 | break 2 | |
5221 | fi | |
5222 | done | |
5223 | done | |
5224 | ||
73458fb7 NN |
5225 | fi |
5226 | fi | |
ba479fd2 | 5227 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 5228 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
5229 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
5230 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 5231 | else |
ba479fd2 NN |
5232 | echo "$as_me:$LINENO: result: no" >&5 |
5233 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5234 | fi |
5235 | ||
5236 | if test -n "$MAKEINFO"; then | |
5237 | # Found it, now check the version. | |
ba479fd2 NN |
5238 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
5239 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
5240 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
5241 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5242 | else |
5243 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
5244 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
fb38008e | 5245 | echo "configure:5245: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
5246 | case $ac_prog_version in |
5247 | '') gcc_cv_prog_makeinfo_modern=no;; | |
5248 | 4.[2-9]*) | |
5249 | gcc_cv_prog_makeinfo_modern=yes;; | |
5250 | *) gcc_cv_prog_makeinfo_modern=no;; | |
5251 | esac | |
5252 | ||
5253 | fi | |
ba479fd2 NN |
5254 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
5255 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
5256 | else |
5257 | gcc_cv_prog_makeinfo_modern=no | |
5258 | fi | |
5259 | ||
73458fb7 | 5260 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 5261 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
5262 | { echo "$as_me:$LINENO: WARNING: |
5263 | *** Makeinfo is missing or too old. | |
5264 | *** Info documentation will not be built." >&5 | |
5265 | echo "$as_me: WARNING: | |
cafe096b | 5266 | *** Makeinfo is missing or too old. |
ba479fd2 | 5267 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
5268 | BUILD_INFO= |
5269 | else | |
ba479fd2 | 5270 | BUILD_INFO=info |
73458fb7 NN |
5271 | fi |
5272 | ||
7c27e184 | 5273 | |
73458fb7 | 5274 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
5275 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
5276 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 5277 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
5278 | echo "$as_me:$LINENO: result: yes" >&5 |
5279 | echo "${ECHO_T}yes" >&6 | |
5280 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 5281 | else |
ba479fd2 NN |
5282 | echo "$as_me:$LINENO: result: no" >&5 |
5283 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5284 | GENERATED_MANPAGES= |
5285 | fi | |
5286 | ||
7c27e184 | 5287 | |
73458fb7 | 5288 | # How about lex? |
7c27e184 PB |
5289 | for ac_prog in flex |
5290 | do | |
5291 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5292 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
5293 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5294 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5295 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
5296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5297 | else |
5298 | if test -n "$FLEX"; then | |
5299 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
5300 | else | |
ba479fd2 NN |
5301 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5302 | for as_dir in $PATH | |
5303 | do | |
5304 | IFS=$as_save_IFS | |
5305 | test -z "$as_dir" && as_dir=. | |
5306 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5307 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 5308 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
5309 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5310 | break 2 | |
5311 | fi | |
5312 | done | |
5313 | done | |
5314 | ||
73458fb7 NN |
5315 | fi |
5316 | fi | |
ba479fd2 | 5317 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 5318 | if test -n "$FLEX"; then |
ba479fd2 NN |
5319 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
5320 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 5321 | else |
ba479fd2 NN |
5322 | echo "$as_me:$LINENO: result: no" >&5 |
5323 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5324 | fi |
5325 | ||
7c27e184 PB |
5326 | test -n "$FLEX" && break |
5327 | done | |
5328 | test -n "$FLEX" || FLEX="$MISSING flex" | |
5329 | ||
73458fb7 NN |
5330 | |
5331 | # Bison? | |
7c27e184 PB |
5332 | for ac_prog in bison |
5333 | do | |
5334 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
5335 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
5336 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5337 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5338 | if test "${ac_cv_prog_BISON+set}" = set; then | |
5339 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5340 | else |
5341 | if test -n "$BISON"; then | |
5342 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
5343 | else | |
ba479fd2 NN |
5344 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5345 | for as_dir in $PATH | |
5346 | do | |
5347 | IFS=$as_save_IFS | |
5348 | test -z "$as_dir" && as_dir=. | |
5349 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5350 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 5351 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
5352 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
5353 | break 2 | |
5354 | fi | |
5355 | done | |
5356 | done | |
5357 | ||
73458fb7 NN |
5358 | fi |
5359 | fi | |
ba479fd2 | 5360 | BISON=$ac_cv_prog_BISON |
73458fb7 | 5361 | if test -n "$BISON"; then |
ba479fd2 NN |
5362 | echo "$as_me:$LINENO: result: $BISON" >&5 |
5363 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 5364 | else |
ba479fd2 NN |
5365 | echo "$as_me:$LINENO: result: no" >&5 |
5366 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5367 | fi |
5368 | ||
7c27e184 PB |
5369 | test -n "$BISON" && break |
5370 | done | |
5371 | test -n "$BISON" || BISON="$MISSING bison" | |
5372 | ||
5373 | ||
5374 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
5375 | # check for build == host before using them. | |
73458fb7 | 5376 | |
f6a874ac | 5377 | # NM |
414adbdd GK |
5378 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
5379 | && test -d ../binutils ; then | |
f6a874ac JW |
5380 | NM='$(objdir)/../binutils/nm-new' |
5381 | else | |
5382 | # Extract the first word of "nm", so it can be a program name with args. | |
5383 | set dummy nm; ac_word=$2 | |
5384 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
5385 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5386 | if test "${ac_cv_prog_NM+set}" = set; then | |
5387 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5388 | else | |
5389 | if test -n "$NM"; then | |
5390 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
5391 | else | |
5392 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5393 | for as_dir in $PATH | |
5394 | do | |
5395 | IFS=$as_save_IFS | |
5396 | test -z "$as_dir" && as_dir=. | |
5397 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5398 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5399 | ac_cv_prog_NM="nm" | |
5400 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5401 | break 2 | |
5402 | fi | |
5403 | done | |
5404 | done | |
5405 | ||
5406 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
5407 | fi | |
5408 | fi | |
5409 | NM=$ac_cv_prog_NM | |
5410 | if test -n "$NM"; then | |
5411 | echo "$as_me:$LINENO: result: $NM" >&5 | |
5412 | echo "${ECHO_T}$NM" >&6 | |
5413 | else | |
5414 | echo "$as_me:$LINENO: result: no" >&5 | |
5415 | echo "${ECHO_T}no" >&6 | |
5416 | fi | |
5417 | ||
5418 | fi | |
5419 | ||
5420 | # AR | |
414adbdd GK |
5421 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
5422 | && test -d ../binutils ; then | |
f6a874ac JW |
5423 | AR='$(objdir)/../binutils/ar' |
5424 | else | |
5425 | # Extract the first word of "ar", so it can be a program name with args. | |
5426 | set dummy ar; ac_word=$2 | |
5427 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
5428 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5429 | if test "${ac_cv_prog_AR+set}" = set; then | |
5430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5431 | else | |
5432 | if test -n "$AR"; then | |
5433 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
5434 | else | |
5435 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
5436 | for as_dir in $PATH | |
5437 | do | |
5438 | IFS=$as_save_IFS | |
5439 | test -z "$as_dir" && as_dir=. | |
5440 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5441 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5442 | ac_cv_prog_AR="ar" | |
5443 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5444 | break 2 | |
5445 | fi | |
5446 | done | |
5447 | done | |
5448 | ||
5449 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
5450 | fi | |
5451 | fi | |
5452 | AR=$ac_cv_prog_AR | |
5453 | if test -n "$AR"; then | |
5454 | echo "$as_me:$LINENO: result: $AR" >&5 | |
5455 | echo "${ECHO_T}$AR" >&6 | |
5456 | else | |
5457 | echo "$as_me:$LINENO: result: no" >&5 | |
5458 | echo "${ECHO_T}no" >&6 | |
5459 | fi | |
5460 | ||
5461 | fi | |
5462 | ||
5463 | ||
73458fb7 NN |
5464 | # -------------------- |
5465 | # Checks for C headers | |
5466 | # -------------------- | |
5467 | ||
ba479fd2 NN |
5468 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
5469 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
5470 | if test "${gcc_cv_glibc+set}" = set; then | |
5471 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5472 | else | |
5473 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5474 | /* confdefs.h. */ |
5475 | _ACEOF | |
5476 | cat confdefs.h >>conftest.$ac_ext | |
5477 | cat >>conftest.$ac_ext <<_ACEOF | |
5478 | /* end confdefs.h. */ | |
73458fb7 | 5479 | #include <features.h> |
ba479fd2 NN |
5480 | int |
5481 | main () | |
5482 | { | |
73458fb7 NN |
5483 | |
5484 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
5485 | #error Not a GNU C library system | |
5486 | #endif | |
ba479fd2 NN |
5487 | ; |
5488 | return 0; | |
5489 | } | |
5490 | _ACEOF | |
5491 | rm -f conftest.$ac_objext | |
5492 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5493 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5494 | ac_status=$? |
86da66b5 HPN |
5495 | grep -v '^ *+' conftest.er1 >conftest.err |
5496 | rm -f conftest.er1 | |
5497 | cat conftest.err >&5 | |
ba479fd2 NN |
5498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5499 | (exit $ac_status); } && | |
fb38008e | 5500 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5502 | (eval $ac_try) 2>&5 | |
5503 | ac_status=$? | |
5504 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5505 | (exit $ac_status); }; } && | |
5506 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5507 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5508 | (eval $ac_try) 2>&5 | |
5509 | ac_status=$? | |
5510 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5511 | (exit $ac_status); }; }; then | |
73458fb7 NN |
5512 | gcc_cv_glibc=yes |
5513 | else | |
ba479fd2 NN |
5514 | echo "$as_me: failed program was:" >&5 |
5515 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5516 | ||
5517 | gcc_cv_glibc=no | |
73458fb7 | 5518 | fi |
86da66b5 | 5519 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
5520 | fi |
5521 | ||
ba479fd2 NN |
5522 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
5523 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 5524 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
5525 | |
5526 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 5527 | #define _GNU_SOURCE 1 |
ba479fd2 | 5528 | _ACEOF |
73458fb7 NN |
5529 | |
5530 | fi | |
5531 | ||
ca9bc441 NN |
5532 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
5533 | # works later. *sigh* This needs to come before all header checks. | |
5534 | ||
5535 | ac_c_preproc_warn_flag=yes | |
5536 | ||
ba479fd2 NN |
5537 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
5538 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
5539 | if test "${ac_cv_header_stdc+set}" = set; then | |
5540 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5541 | else |
ba479fd2 | 5542 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5543 | /* confdefs.h. */ |
5544 | _ACEOF | |
5545 | cat confdefs.h >>conftest.$ac_ext | |
5546 | cat >>conftest.$ac_ext <<_ACEOF | |
5547 | /* end confdefs.h. */ | |
956d6950 JL |
5548 | #include <stdlib.h> |
5549 | #include <stdarg.h> | |
5550 | #include <string.h> | |
5551 | #include <float.h> | |
ba479fd2 NN |
5552 | |
5553 | int | |
5554 | main () | |
5555 | { | |
5556 | ||
5557 | ; | |
5558 | return 0; | |
5559 | } | |
5560 | _ACEOF | |
5561 | rm -f conftest.$ac_objext | |
5562 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5563 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5564 | ac_status=$? |
86da66b5 HPN |
5565 | grep -v '^ *+' conftest.er1 >conftest.err |
5566 | rm -f conftest.er1 | |
5567 | cat conftest.err >&5 | |
ba479fd2 NN |
5568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5569 | (exit $ac_status); } && | |
fb38008e | 5570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5572 | (eval $ac_try) 2>&5 | |
5573 | ac_status=$? | |
5574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5575 | (exit $ac_status); }; } && | |
5576 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5578 | (eval $ac_try) 2>&5 | |
5579 | ac_status=$? | |
5580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5581 | (exit $ac_status); }; }; then | |
956d6950 JL |
5582 | ac_cv_header_stdc=yes |
5583 | else | |
ba479fd2 NN |
5584 | echo "$as_me: failed program was:" >&5 |
5585 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5586 | ||
5587 | ac_cv_header_stdc=no | |
956d6950 | 5588 | fi |
86da66b5 | 5589 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
5590 | |
5591 | if test $ac_cv_header_stdc = yes; then | |
5592 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 5593 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5594 | /* confdefs.h. */ |
5595 | _ACEOF | |
5596 | cat confdefs.h >>conftest.$ac_ext | |
5597 | cat >>conftest.$ac_ext <<_ACEOF | |
5598 | /* end confdefs.h. */ | |
956d6950 | 5599 | #include <string.h> |
ba479fd2 NN |
5600 | |
5601 | _ACEOF | |
956d6950 | 5602 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5603 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
5604 | : |
5605 | else | |
956d6950 JL |
5606 | ac_cv_header_stdc=no |
5607 | fi | |
5608 | rm -f conftest* | |
5609 | ||
5610 | fi | |
5611 | ||
5612 | if test $ac_cv_header_stdc = yes; then | |
5613 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 5614 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5615 | /* confdefs.h. */ |
5616 | _ACEOF | |
5617 | cat confdefs.h >>conftest.$ac_ext | |
5618 | cat >>conftest.$ac_ext <<_ACEOF | |
5619 | /* end confdefs.h. */ | |
956d6950 | 5620 | #include <stdlib.h> |
ba479fd2 NN |
5621 | |
5622 | _ACEOF | |
956d6950 | 5623 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5624 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
5625 | : |
5626 | else | |
956d6950 JL |
5627 | ac_cv_header_stdc=no |
5628 | fi | |
5629 | rm -f conftest* | |
5630 | ||
5631 | fi | |
5632 | ||
5633 | if test $ac_cv_header_stdc = yes; then | |
5634 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 5635 | if test "$cross_compiling" = yes; then |
956d6950 JL |
5636 | : |
5637 | else | |
ba479fd2 | 5638 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5639 | /* confdefs.h. */ |
5640 | _ACEOF | |
5641 | cat confdefs.h >>conftest.$ac_ext | |
5642 | cat >>conftest.$ac_ext <<_ACEOF | |
5643 | /* end confdefs.h. */ | |
956d6950 | 5644 | #include <ctype.h> |
ba479fd2 NN |
5645 | #if ((' ' & 0x0FF) == 0x020) |
5646 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5647 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5648 | #else | |
5649 | # define ISLOWER(c) \ | |
86da66b5 HPN |
5650 | (('a' <= (c) && (c) <= 'i') \ |
5651 | || ('j' <= (c) && (c) <= 'r') \ | |
5652 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
5653 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
5654 | #endif | |
63cf211a | 5655 | |
ba479fd2 NN |
5656 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
5657 | int | |
5658 | main () | |
5659 | { | |
5660 | int i; | |
5661 | for (i = 0; i < 256; i++) | |
5662 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 5663 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
5664 | exit(2); |
5665 | exit (0); | |
5666 | } | |
5667 | _ACEOF | |
5668 | rm -f conftest$ac_exeext | |
5669 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5670 | (eval $ac_link) 2>&5 | |
5671 | ac_status=$? | |
5672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5673 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5675 | (eval $ac_try) 2>&5 | |
5676 | ac_status=$? | |
5677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5678 | (exit $ac_status); }; }; then | |
956d6950 JL |
5679 | : |
5680 | else | |
ba479fd2 NN |
5681 | echo "$as_me: program exited with status $ac_status" >&5 |
5682 | echo "$as_me: failed program was:" >&5 | |
5683 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5684 | ||
5685 | ( exit $ac_status ) | |
5686 | ac_cv_header_stdc=no | |
956d6950 | 5687 | fi |
86da66b5 | 5688 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5689 | fi |
956d6950 JL |
5690 | fi |
5691 | fi | |
ba479fd2 NN |
5692 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
5693 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 5694 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
5695 | |
5696 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5697 | #define STDC_HEADERS 1 |
ba479fd2 | 5698 | _ACEOF |
956d6950 JL |
5699 | |
5700 | fi | |
5701 | ||
ba479fd2 NN |
5702 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
5703 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
5704 | if test "${ac_cv_header_time+set}" = set; then | |
5705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5706 | else |
ba479fd2 | 5707 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5708 | /* confdefs.h. */ |
5709 | _ACEOF | |
5710 | cat confdefs.h >>conftest.$ac_ext | |
5711 | cat >>conftest.$ac_ext <<_ACEOF | |
5712 | /* end confdefs.h. */ | |
956d6950 JL |
5713 | #include <sys/types.h> |
5714 | #include <sys/time.h> | |
5715 | #include <time.h> | |
ba479fd2 NN |
5716 | |
5717 | int | |
5718 | main () | |
5719 | { | |
5720 | if ((struct tm *) 0) | |
5721 | return 0; | |
5722 | ; | |
5723 | return 0; | |
5724 | } | |
5725 | _ACEOF | |
5726 | rm -f conftest.$ac_objext | |
5727 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5728 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5729 | ac_status=$? |
86da66b5 HPN |
5730 | grep -v '^ *+' conftest.er1 >conftest.err |
5731 | rm -f conftest.er1 | |
5732 | cat conftest.err >&5 | |
ba479fd2 NN |
5733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5734 | (exit $ac_status); } && | |
fb38008e | 5735 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5737 | (eval $ac_try) 2>&5 | |
5738 | ac_status=$? | |
5739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5740 | (exit $ac_status); }; } && | |
5741 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5742 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5743 | (eval $ac_try) 2>&5 | |
5744 | ac_status=$? | |
5745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5746 | (exit $ac_status); }; }; then | |
956d6950 JL |
5747 | ac_cv_header_time=yes |
5748 | else | |
ba479fd2 NN |
5749 | echo "$as_me: failed program was:" >&5 |
5750 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5751 | ||
5752 | ac_cv_header_time=no | |
956d6950 | 5753 | fi |
86da66b5 | 5754 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5755 | fi |
ba479fd2 NN |
5756 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
5757 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 5758 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
5759 | |
5760 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5761 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 5762 | _ACEOF |
956d6950 JL |
5763 | |
5764 | fi | |
5765 | ||
41e622a8 AP |
5766 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
5767 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
5768 | if test "${gcc_cv_header_string+set}" = set; then | |
5769 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5770 | else | |
5771 | cat >conftest.$ac_ext <<_ACEOF | |
5772 | /* confdefs.h. */ | |
5773 | _ACEOF | |
5774 | cat confdefs.h >>conftest.$ac_ext | |
5775 | cat >>conftest.$ac_ext <<_ACEOF | |
5776 | /* end confdefs.h. */ | |
5777 | #include <string.h> | |
5778 | #include <strings.h> | |
5779 | int | |
5780 | main () | |
5781 | { | |
5782 | ||
5783 | ; | |
5784 | return 0; | |
5785 | } | |
5786 | _ACEOF | |
5787 | rm -f conftest.$ac_objext | |
5788 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5789 | (eval $ac_compile) 2>conftest.er1 | |
5790 | ac_status=$? | |
5791 | grep -v '^ *+' conftest.er1 >conftest.err | |
5792 | rm -f conftest.er1 | |
5793 | cat conftest.err >&5 | |
5794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5795 | (exit $ac_status); } && | |
fb38008e | 5796 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
41e622a8 AP |
5797 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5798 | (eval $ac_try) 2>&5 | |
5799 | ac_status=$? | |
5800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5801 | (exit $ac_status); }; } && | |
5802 | { ac_try='test -s conftest.$ac_objext' | |
5803 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5804 | (eval $ac_try) 2>&5 | |
5805 | ac_status=$? | |
5806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5807 | (exit $ac_status); }; }; then | |
5808 | gcc_cv_header_string=yes | |
5809 | else | |
5810 | echo "$as_me: failed program was:" >&5 | |
5811 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5812 | ||
5813 | gcc_cv_header_string=no | |
5814 | fi | |
5815 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5816 | fi | |
5817 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
5818 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
5819 | if test $gcc_cv_header_string = yes; then | |
5820 | ||
5821 | cat >>confdefs.h <<\_ACEOF | |
5822 | #define STRING_WITH_STRINGS 1 | |
5823 | _ACEOF | |
5824 | ||
5825 | fi | |
5826 | ||
ba479fd2 NN |
5827 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
5828 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
5829 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
5830 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 5831 | else |
ba479fd2 | 5832 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5833 | /* confdefs.h. */ |
5834 | _ACEOF | |
5835 | cat confdefs.h >>conftest.$ac_ext | |
5836 | cat >>conftest.$ac_ext <<_ACEOF | |
5837 | /* end confdefs.h. */ | |
e9831ca0 KG |
5838 | #include <sys/types.h> |
5839 | #include <sys/wait.h> | |
5840 | #ifndef WEXITSTATUS | |
ba479fd2 | 5841 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
5842 | #endif |
5843 | #ifndef WIFEXITED | |
ba479fd2 | 5844 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 5845 | #endif |
ba479fd2 NN |
5846 | |
5847 | int | |
5848 | main () | |
5849 | { | |
5850 | int s; | |
5851 | wait (&s); | |
5852 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
5853 | ; | |
5854 | return 0; | |
5855 | } | |
5856 | _ACEOF | |
5857 | rm -f conftest.$ac_objext | |
5858 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5859 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5860 | ac_status=$? |
86da66b5 HPN |
5861 | grep -v '^ *+' conftest.er1 >conftest.err |
5862 | rm -f conftest.er1 | |
5863 | cat conftest.err >&5 | |
ba479fd2 NN |
5864 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5865 | (exit $ac_status); } && | |
fb38008e | 5866 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
5867 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5868 | (eval $ac_try) 2>&5 | |
5869 | ac_status=$? | |
5870 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5871 | (exit $ac_status); }; } && | |
5872 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5873 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5874 | (eval $ac_try) 2>&5 | |
5875 | ac_status=$? | |
5876 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5877 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
5878 | ac_cv_header_sys_wait_h=yes |
5879 | else | |
ba479fd2 NN |
5880 | echo "$as_me: failed program was:" >&5 |
5881 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5882 | ||
5883 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 5884 | fi |
86da66b5 | 5885 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 5886 | fi |
ba479fd2 NN |
5887 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
5888 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 5889 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
5890 | |
5891 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 5892 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 5893 | _ACEOF |
6e3f3080 | 5894 | |
63cf211a | 5895 | fi |
6e3f3080 | 5896 | |
ba479fd2 NN |
5897 | |
5898 | ||
5899 | ||
5900 | ||
5901 | ||
5902 | ||
5903 | ||
5904 | ||
5905 | ||
5906 | ||
5907 | ||
5908 | ||
5909 | ||
5910 | ||
5911 | ||
5912 | ||
5913 | ||
5914 | ||
5915 | ||
5916 | ||
5917 | ||
5918 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \ | |
1072ec3f | 5919 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 5920 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 5921 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 5922 | do |
ba479fd2 | 5923 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 5924 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
5925 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
5926 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5927 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5928 | else |
ca9bc441 | 5929 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5930 | /* confdefs.h. */ |
5931 | _ACEOF | |
5932 | cat confdefs.h >>conftest.$ac_ext | |
5933 | cat >>conftest.$ac_ext <<_ACEOF | |
5934 | /* end confdefs.h. */ | |
5935 | #include <$ac_header> | |
5936 | _ACEOF | |
5937 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5938 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5939 | ac_status=$? | |
5940 | grep -v '^ *+' conftest.er1 >conftest.err | |
5941 | rm -f conftest.er1 | |
5942 | cat conftest.err >&5 | |
5943 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5944 | (exit $ac_status); } >/dev/null; then | |
5945 | if test -s conftest.err; then | |
5946 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 5947 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
5948 | else |
5949 | ac_cpp_err= | |
5950 | fi | |
5951 | else | |
5952 | ac_cpp_err=yes | |
5953 | fi | |
5954 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5955 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
5956 | else |
5957 | echo "$as_me: failed program was:" >&5 | |
5958 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5959 | ||
ca9bc441 | 5960 | eval "$as_ac_Header=no" |
ba479fd2 NN |
5961 | fi |
5962 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5963 | fi |
ba479fd2 NN |
5964 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
5965 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
5966 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
5967 | cat >>confdefs.h <<_ACEOF | |
5968 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5969 | _ACEOF | |
5970 | ||
956d6950 JL |
5971 | fi |
5972 | done | |
5973 | ||
5974 | ||
f24af81b | 5975 | # Check for thread headers. |
ca9bc441 | 5976 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
5977 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
5978 | if test "${ac_cv_header_thread_h+set}" = set; then | |
5979 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5980 | else |
ca9bc441 | 5981 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5982 | /* confdefs.h. */ |
5983 | _ACEOF | |
5984 | cat confdefs.h >>conftest.$ac_ext | |
5985 | cat >>conftest.$ac_ext <<_ACEOF | |
5986 | /* end confdefs.h. */ | |
5987 | #include <thread.h> | |
5988 | _ACEOF | |
5989 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5990 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5991 | ac_status=$? | |
5992 | grep -v '^ *+' conftest.er1 >conftest.err | |
5993 | rm -f conftest.er1 | |
5994 | cat conftest.err >&5 | |
5995 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5996 | (exit $ac_status); } >/dev/null; then | |
5997 | if test -s conftest.err; then | |
5998 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 5999 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6000 | else |
6001 | ac_cpp_err= | |
6002 | fi | |
6003 | else | |
6004 | ac_cpp_err=yes | |
6005 | fi | |
6006 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 6007 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
6008 | else |
6009 | echo "$as_me: failed program was:" >&5 | |
6010 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6011 | ||
ca9bc441 | 6012 | ac_cv_header_thread_h=no |
ba479fd2 NN |
6013 | fi |
6014 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 6015 | fi |
ba479fd2 NN |
6016 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
6017 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 6018 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
6019 | have_thread_h=yes |
6020 | else | |
ba479fd2 | 6021 | have_thread_h= |
f24af81b TT |
6022 | fi |
6023 | ||
ca9bc441 | 6024 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
6025 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
6026 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
6027 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 6028 | else |
ca9bc441 | 6029 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6030 | /* confdefs.h. */ |
6031 | _ACEOF | |
6032 | cat confdefs.h >>conftest.$ac_ext | |
6033 | cat >>conftest.$ac_ext <<_ACEOF | |
6034 | /* end confdefs.h. */ | |
6035 | #include <pthread.h> | |
6036 | _ACEOF | |
6037 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6038 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6039 | ac_status=$? | |
6040 | grep -v '^ *+' conftest.er1 >conftest.err | |
6041 | rm -f conftest.er1 | |
6042 | cat conftest.err >&5 | |
6043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6044 | (exit $ac_status); } >/dev/null; then | |
6045 | if test -s conftest.err; then | |
6046 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6047 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6048 | else |
6049 | ac_cpp_err= | |
6050 | fi | |
6051 | else | |
6052 | ac_cpp_err=yes | |
6053 | fi | |
6054 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 6055 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
6056 | else |
6057 | echo "$as_me: failed program was:" >&5 | |
6058 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6059 | ||
ca9bc441 | 6060 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
6061 | fi |
6062 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 6063 | fi |
ba479fd2 NN |
6064 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
6065 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 6066 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
6067 | have_pthread_h=yes |
6068 | else | |
ba479fd2 | 6069 | have_pthread_h= |
f24af81b TT |
6070 | fi |
6071 | ||
6072 | ||
84c041a1 | 6073 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
6074 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
6075 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
6076 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
6077 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6078 | else | |
6079 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6080 | /* confdefs.h. */ |
6081 | _ACEOF | |
6082 | cat confdefs.h >>conftest.$ac_ext | |
6083 | cat >>conftest.$ac_ext <<_ACEOF | |
6084 | /* end confdefs.h. */ | |
75e93faa ZW |
6085 | #ifdef HAVE_LIMITS_H |
6086 | #include <limits.h> | |
6087 | #endif | |
6088 | #ifdef CHAR_BIT | |
6089 | found | |
6090 | #endif | |
ba479fd2 | 6091 | _ACEOF |
75e93faa | 6092 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 6093 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
6094 | gcc_cv_decl_char_bit=yes |
6095 | else | |
75e93faa ZW |
6096 | gcc_cv_decl_char_bit=no |
6097 | fi | |
6098 | rm -f conftest* | |
6099 | ||
6100 | ||
6101 | fi | |
ba479fd2 NN |
6102 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
6103 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 6104 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
6105 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
6106 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
6107 | if test "${gcc_cv_c_nbby+set}" = set; then | |
6108 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
6109 | else |
6110 | i=8 | |
6111 | gcc_cv_c_nbby= | |
6112 | while test $i -lt 65; do | |
ba479fd2 | 6113 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6114 | /* confdefs.h. */ |
6115 | _ACEOF | |
6116 | cat confdefs.h >>conftest.$ac_ext | |
6117 | cat >>conftest.$ac_ext <<_ACEOF | |
6118 | /* end confdefs.h. */ | |
6119 | ||
6120 | int | |
6121 | main () | |
6122 | { | |
4e70264f ZW |
6123 | switch(0) { |
6124 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
6125 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
6126 | ; } | |
ba479fd2 NN |
6127 | ; |
6128 | return 0; | |
6129 | } | |
6130 | _ACEOF | |
6131 | rm -f conftest.$ac_objext | |
6132 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6133 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6134 | ac_status=$? |
86da66b5 HPN |
6135 | grep -v '^ *+' conftest.er1 >conftest.err |
6136 | rm -f conftest.er1 | |
6137 | cat conftest.err >&5 | |
ba479fd2 NN |
6138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6139 | (exit $ac_status); } && | |
fb38008e | 6140 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6141 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6142 | (eval $ac_try) 2>&5 | |
6143 | ac_status=$? | |
6144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6145 | (exit $ac_status); }; } && | |
6146 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6148 | (eval $ac_try) 2>&5 | |
6149 | ac_status=$? | |
6150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6151 | (exit $ac_status); }; }; then | |
4e70264f | 6152 | gcc_cv_c_nbby=$i; break |
75e93faa | 6153 | else |
ba479fd2 NN |
6154 | echo "$as_me: failed program was:" >&5 |
6155 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6156 | ||
75e93faa | 6157 | fi |
86da66b5 | 6158 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
6159 | i=`expr $i + 1` |
6160 | done | |
6161 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
6162 | ||
6163 | fi | |
ba479fd2 NN |
6164 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
6165 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 6166 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
6167 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
6168 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
6169 | { (exit 1); exit 1; }; } | |
75e93faa | 6170 | else |
ba479fd2 NN |
6171 | |
6172 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 6173 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 6174 | _ACEOF |
75e93faa ZW |
6175 | |
6176 | fi | |
6177 | fi | |
ba479fd2 NN |
6178 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
6179 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
6180 | if test "${ac_cv_c_bigendian+set}" = set; then | |
6181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 6182 | else |
4977bab6 ZW |
6183 | ac_cv_c_bigendian=unknown |
6184 | # See if sys/param.h defines the BYTE_ORDER macro. | |
ba479fd2 | 6185 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6186 | /* confdefs.h. */ |
6187 | _ACEOF | |
6188 | cat confdefs.h >>conftest.$ac_ext | |
6189 | cat >>conftest.$ac_ext <<_ACEOF | |
6190 | /* end confdefs.h. */ | |
4977bab6 ZW |
6191 | #include <sys/types.h> |
6192 | #include <sys/param.h> | |
ba479fd2 NN |
6193 | int |
6194 | main () | |
6195 | { | |
2d6eb5bf | 6196 | |
4977bab6 ZW |
6197 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
6198 | bogus endian macros | |
84c041a1 | 6199 | #endif |
ba479fd2 NN |
6200 | ; |
6201 | return 0; | |
6202 | } | |
6203 | _ACEOF | |
6204 | rm -f conftest.$ac_objext | |
6205 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6206 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6207 | ac_status=$? |
86da66b5 HPN |
6208 | grep -v '^ *+' conftest.er1 >conftest.err |
6209 | rm -f conftest.er1 | |
6210 | cat conftest.err >&5 | |
ba479fd2 NN |
6211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6212 | (exit $ac_status); } && | |
fb38008e | 6213 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6214 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6215 | (eval $ac_try) 2>&5 | |
6216 | ac_status=$? | |
6217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6218 | (exit $ac_status); }; } && | |
6219 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6220 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6221 | (eval $ac_try) 2>&5 | |
6222 | ac_status=$? | |
6223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6224 | (exit $ac_status); }; }; then | |
4977bab6 | 6225 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 6226 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6227 | /* confdefs.h. */ |
6228 | _ACEOF | |
6229 | cat confdefs.h >>conftest.$ac_ext | |
6230 | cat >>conftest.$ac_ext <<_ACEOF | |
6231 | /* end confdefs.h. */ | |
4977bab6 ZW |
6232 | #include <sys/types.h> |
6233 | #include <sys/param.h> | |
ba479fd2 NN |
6234 | int |
6235 | main () | |
6236 | { | |
4977bab6 ZW |
6237 | |
6238 | #if BYTE_ORDER != BIG_ENDIAN | |
6239 | not big endian | |
84c041a1 | 6240 | #endif |
ba479fd2 NN |
6241 | ; |
6242 | return 0; | |
6243 | } | |
6244 | _ACEOF | |
6245 | rm -f conftest.$ac_objext | |
6246 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6247 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6248 | ac_status=$? |
86da66b5 HPN |
6249 | grep -v '^ *+' conftest.er1 >conftest.err |
6250 | rm -f conftest.er1 | |
6251 | cat conftest.err >&5 | |
ba479fd2 NN |
6252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6253 | (exit $ac_status); } && | |
fb38008e | 6254 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6256 | (eval $ac_try) 2>&5 | |
6257 | ac_status=$? | |
6258 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6259 | (exit $ac_status); }; } && | |
6260 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6261 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6262 | (eval $ac_try) 2>&5 | |
6263 | ac_status=$? | |
6264 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6265 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
6266 | ac_cv_c_bigendian=yes |
6267 | else | |
ba479fd2 NN |
6268 | echo "$as_me: failed program was:" >&5 |
6269 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6270 | ||
6271 | ac_cv_c_bigendian=no | |
4977bab6 | 6272 | fi |
86da66b5 | 6273 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 6274 | else |
ba479fd2 NN |
6275 | echo "$as_me: failed program was:" >&5 |
6276 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6277 | ||
4977bab6 | 6278 | fi |
86da66b5 | 6279 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 ZW |
6280 | if test $ac_cv_c_bigendian = unknown; then |
6281 | if test "$cross_compiling" = yes; then | |
ba479fd2 NN |
6282 | echo $ac_n "cross-compiling... " 2>&6 |
6283 | else | |
6284 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6285 | /* confdefs.h. */ |
6286 | _ACEOF | |
6287 | cat confdefs.h >>conftest.$ac_ext | |
6288 | cat >>conftest.$ac_ext <<_ACEOF | |
6289 | /* end confdefs.h. */ | |
4977bab6 ZW |
6290 | main () { |
6291 | /* Are we little or big endian? From Harbison&Steele. */ | |
6292 | union | |
6293 | { | |
6294 | long l; | |
6295 | char c[sizeof (long)]; | |
6296 | } u; | |
6297 | u.l = 1; | |
6298 | exit (u.c[sizeof (long) - 1] == 1); | |
6299 | } | |
ba479fd2 NN |
6300 | _ACEOF |
6301 | rm -f conftest$ac_exeext | |
6302 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6303 | (eval $ac_link) 2>&5 | |
6304 | ac_status=$? | |
6305 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6306 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6307 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6308 | (eval $ac_try) 2>&5 | |
6309 | ac_status=$? | |
6310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6311 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
6312 | ac_cv_c_bigendian=no |
6313 | else | |
ba479fd2 NN |
6314 | echo "$as_me: program exited with status $ac_status" >&5 |
6315 | echo "$as_me: failed program was:" >&5 | |
6316 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6317 | ||
6318 | ( exit $ac_status ) | |
6319 | ac_cv_c_bigendian=yes | |
4977bab6 | 6320 | fi |
86da66b5 | 6321 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 6322 | fi |
4977bab6 ZW |
6323 | fi |
6324 | fi | |
ba479fd2 NN |
6325 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
6326 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
4977bab6 | 6327 | if test $ac_cv_c_bigendian = unknown; then |
ba479fd2 NN |
6328 | echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 |
6329 | echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 | |
2d6eb5bf | 6330 | |
4977bab6 ZW |
6331 | cat >conftest.c <<EOF |
6332 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
6333 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
6334 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
6335 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
6336 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
6337 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
6338 | int main() { _ascii (); _ebcdic (); return 0; } | |
6339 | EOF | |
6340 | if test -f conftest.c ; then | |
3beb1315 | 6341 | if ${CC-cc} ${CFLAGS} -c conftest.c -o conftest.o && test -f conftest.o ; then |
4977bab6 ZW |
6342 | if test `grep -l BIGenDianSyS conftest.o` ; then |
6343 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
6344 | ac_cv_c_bigendian=yes | |
6345 | fi | |
6346 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
6347 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
6348 | if test $ac_cv_c_bigendian = yes ; then | |
6349 | ac_cv_c_bigendian=unknown; | |
6350 | else | |
6351 | ac_cv_c_bigendian=no | |
6352 | fi | |
6353 | fi | |
6354 | echo $ac_n 'guessing bigendian ... ' >&6 | |
6355 | fi | |
6356 | fi | |
ba479fd2 NN |
6357 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
6358 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
84c041a1 | 6359 | fi |
4977bab6 | 6360 | if test $ac_cv_c_bigendian = yes; then |
ba479fd2 NN |
6361 | |
6362 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 6363 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 6364 | _ACEOF |
cafe096b | 6365 | |
ba479fd2 NN |
6366 | |
6367 | cat >>confdefs.h <<\_ACEOF | |
84c041a1 | 6368 | #define HOST_WORDS_BIG_ENDIAN 1 |
ba479fd2 | 6369 | _ACEOF |
84c041a1 | 6370 | |
4977bab6 ZW |
6371 | BYTEORDER=4321 |
6372 | else | |
6373 | BYTEORDER=1234 | |
6374 | fi | |
ba479fd2 NN |
6375 | |
6376 | cat >>confdefs.h <<_ACEOF | |
4977bab6 | 6377 | #define BYTEORDER $BYTEORDER |
ba479fd2 | 6378 | _ACEOF |
4977bab6 ZW |
6379 | |
6380 | if test $ac_cv_c_bigendian = unknown; then | |
3beb1315 HPN |
6381 | { { echo "$as_me:$LINENO: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&5 |
6382 | echo "$as_me: error: unknown endianess - sorry, please pre-set ac_cv_c_bigendian" >&2;} | |
6383 | { (exit 1); exit 1; }; } | |
84c041a1 ZW |
6384 | fi |
6385 | ||
75e93faa | 6386 | |
73458fb7 NN |
6387 | # -------- |
6388 | # UNSORTED | |
6389 | # -------- | |
1e608388 | 6390 | |
73458fb7 NN |
6391 | # Stage specific cflags for build. |
6392 | stage1_cflags= | |
6393 | case $build in | |
6394 | vax-*-*) | |
6395 | if test x$GCC = xyes | |
6396 | then | |
6397 | stage1_cflags="-Wa,-J" | |
6398 | else | |
6399 | stage1_cflags="-J" | |
6400 | fi | |
6401 | ;; | |
6402 | powerpc-*-darwin*) | |
6403 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
6404 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
6405 | # Apple's GCC has bugs in designated initializer handling, so disable | |
6406 | # that too. | |
6407 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
6408 | ;; | |
6409 | esac | |
1e608388 | 6410 | |
1e608388 | 6411 | |
4e70264f ZW |
6412 | # These libraries may be used by collect2. |
6413 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
6414 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
6415 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
6416 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
6417 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
6418 | else |
6419 | save_LIBS="$LIBS" | |
7f2749d4 | 6420 | for libs in '' -lld -lmld \ |
4e70264f ZW |
6421 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
6422 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
6423 | do | |
6424 | LIBS="$libs" | |
ba479fd2 | 6425 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6426 | /* confdefs.h. */ |
6427 | _ACEOF | |
6428 | cat confdefs.h >>conftest.$ac_ext | |
6429 | cat >>conftest.$ac_ext <<_ACEOF | |
6430 | /* end confdefs.h. */ | |
6431 | ||
4e70264f | 6432 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6433 | #ifdef __cplusplus |
6434 | extern "C" | |
6435 | #endif | |
4e70264f | 6436 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6437 | builtin and then its argument prototype would still apply. */ |
6438 | char ldopen (); | |
6439 | int | |
6440 | main () | |
6441 | { | |
6442 | ldopen (); | |
6443 | ; | |
6444 | return 0; | |
6445 | } | |
6446 | _ACEOF | |
6447 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6448 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6449 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6450 | ac_status=$? |
86da66b5 HPN |
6451 | grep -v '^ *+' conftest.er1 >conftest.err |
6452 | rm -f conftest.er1 | |
6453 | cat conftest.err >&5 | |
ba479fd2 NN |
6454 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6455 | (exit $ac_status); } && | |
fb38008e | 6456 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6457 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6458 | (eval $ac_try) 2>&5 | |
6459 | ac_status=$? | |
6460 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6461 | (exit $ac_status); }; } && | |
6462 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6463 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6464 | (eval $ac_try) 2>&5 | |
6465 | ac_status=$? | |
6466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6467 | (exit $ac_status); }; }; then | |
4e70264f ZW |
6468 | gcc_cv_collect2_libs="$libs"; break |
6469 | else | |
ba479fd2 NN |
6470 | echo "$as_me: failed program was:" >&5 |
6471 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6472 | ||
4e70264f | 6473 | fi |
86da66b5 HPN |
6474 | rm -f conftest.err conftest.$ac_objext \ |
6475 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
6476 | done |
6477 | LIBS="$save_LIBS" | |
6478 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
6479 | fi | |
ba479fd2 NN |
6480 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
6481 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
6482 | case $gcc_cv_collect2_libs in |
6483 | "none required") ;; | |
6484 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
6485 | esac | |
6486 | ||
6487 | ||
7f2749d4 RK |
6488 | # When building Ada code on Alpha, we need exc_resume which is usually in |
6489 | # -lexc. So test for it. | |
6490 | save_LIBS="$LIBS" | |
6491 | LIBS= | |
ba479fd2 NN |
6492 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
6493 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
6494 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
6495 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6496 | else | |
6497 | ac_func_search_save_LIBS=$LIBS | |
6498 | ac_cv_search_exc_resume=no | |
6499 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6500 | /* confdefs.h. */ |
6501 | _ACEOF | |
6502 | cat confdefs.h >>conftest.$ac_ext | |
6503 | cat >>conftest.$ac_ext <<_ACEOF | |
6504 | /* end confdefs.h. */ | |
7f2749d4 | 6505 | |
7f2749d4 | 6506 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6507 | #ifdef __cplusplus |
6508 | extern "C" | |
6509 | #endif | |
7f2749d4 | 6510 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6511 | builtin and then its argument prototype would still apply. */ |
6512 | char exc_resume (); | |
6513 | int | |
6514 | main () | |
6515 | { | |
6516 | exc_resume (); | |
6517 | ; | |
6518 | return 0; | |
6519 | } | |
6520 | _ACEOF | |
6521 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6522 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6523 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6524 | ac_status=$? |
86da66b5 HPN |
6525 | grep -v '^ *+' conftest.er1 >conftest.err |
6526 | rm -f conftest.er1 | |
6527 | cat conftest.err >&5 | |
ba479fd2 NN |
6528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6529 | (exit $ac_status); } && | |
fb38008e | 6530 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6531 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6532 | (eval $ac_try) 2>&5 | |
6533 | ac_status=$? | |
6534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6535 | (exit $ac_status); }; } && | |
6536 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6538 | (eval $ac_try) 2>&5 | |
6539 | ac_status=$? | |
6540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6541 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
6542 | ac_cv_search_exc_resume="none required" |
6543 | else | |
ba479fd2 NN |
6544 | echo "$as_me: failed program was:" >&5 |
6545 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6546 | ||
7f2749d4 | 6547 | fi |
86da66b5 HPN |
6548 | rm -f conftest.err conftest.$ac_objext \ |
6549 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6550 | if test "$ac_cv_search_exc_resume" = no; then |
6551 | for ac_lib in exc; do | |
6552 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6553 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6554 | /* confdefs.h. */ |
6555 | _ACEOF | |
6556 | cat confdefs.h >>conftest.$ac_ext | |
6557 | cat >>conftest.$ac_ext <<_ACEOF | |
6558 | /* end confdefs.h. */ | |
6559 | ||
7f2749d4 | 6560 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6561 | #ifdef __cplusplus |
6562 | extern "C" | |
6563 | #endif | |
7f2749d4 | 6564 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6565 | builtin and then its argument prototype would still apply. */ |
6566 | char exc_resume (); | |
6567 | int | |
6568 | main () | |
6569 | { | |
6570 | exc_resume (); | |
6571 | ; | |
6572 | return 0; | |
6573 | } | |
6574 | _ACEOF | |
6575 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6576 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6577 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6578 | ac_status=$? |
86da66b5 HPN |
6579 | grep -v '^ *+' conftest.er1 >conftest.err |
6580 | rm -f conftest.er1 | |
6581 | cat conftest.err >&5 | |
ba479fd2 NN |
6582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6583 | (exit $ac_status); } && | |
fb38008e | 6584 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6585 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6586 | (eval $ac_try) 2>&5 | |
6587 | ac_status=$? | |
6588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6589 | (exit $ac_status); }; } && | |
6590 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6591 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6592 | (eval $ac_try) 2>&5 | |
6593 | ac_status=$? | |
6594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6595 | (exit $ac_status); }; }; then | |
6596 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
6597 | break |
6598 | else | |
ba479fd2 NN |
6599 | echo "$as_me: failed program was:" >&5 |
6600 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6601 | ||
cafe096b | 6602 | fi |
86da66b5 HPN |
6603 | rm -f conftest.err conftest.$ac_objext \ |
6604 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 6605 | done |
6e3f3080 | 6606 | fi |
ba479fd2 NN |
6607 | LIBS=$ac_func_search_save_LIBS |
6608 | fi | |
6609 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
6610 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
6611 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 6612 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 6613 | |
7f2749d4 | 6614 | fi |
ba479fd2 | 6615 | |
7f2749d4 RK |
6616 | GNAT_LIBEXC="$LIBS" |
6617 | LIBS="$save_LIBS" | |
6618 | ||
6619 | ||
62c9aa5f ZW |
6620 | # Some systems put ldexp and frexp in libm instead of libc; assume |
6621 | # they're both in the same place. jcf-dump needs them. | |
6622 | save_LIBS="$LIBS" | |
6623 | LIBS= | |
ba479fd2 NN |
6624 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
6625 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
6626 | if test "${ac_cv_search_ldexp+set}" = set; then | |
6627 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6628 | else | |
6629 | ac_func_search_save_LIBS=$LIBS | |
6630 | ac_cv_search_ldexp=no | |
6631 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6632 | /* confdefs.h. */ |
6633 | _ACEOF | |
6634 | cat confdefs.h >>conftest.$ac_ext | |
6635 | cat >>conftest.$ac_ext <<_ACEOF | |
6636 | /* end confdefs.h. */ | |
62c9aa5f | 6637 | |
62c9aa5f | 6638 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6639 | #ifdef __cplusplus |
6640 | extern "C" | |
6641 | #endif | |
62c9aa5f | 6642 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6643 | builtin and then its argument prototype would still apply. */ |
6644 | char ldexp (); | |
6645 | int | |
6646 | main () | |
6647 | { | |
6648 | ldexp (); | |
6649 | ; | |
6650 | return 0; | |
6651 | } | |
6652 | _ACEOF | |
6653 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6654 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6655 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6656 | ac_status=$? |
86da66b5 HPN |
6657 | grep -v '^ *+' conftest.er1 >conftest.err |
6658 | rm -f conftest.er1 | |
6659 | cat conftest.err >&5 | |
ba479fd2 NN |
6660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6661 | (exit $ac_status); } && | |
fb38008e | 6662 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6663 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6664 | (eval $ac_try) 2>&5 | |
6665 | ac_status=$? | |
6666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6667 | (exit $ac_status); }; } && | |
6668 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6670 | (eval $ac_try) 2>&5 | |
6671 | ac_status=$? | |
6672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6673 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
6674 | ac_cv_search_ldexp="none required" |
6675 | else | |
ba479fd2 NN |
6676 | echo "$as_me: failed program was:" >&5 |
6677 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6678 | ||
62c9aa5f | 6679 | fi |
86da66b5 HPN |
6680 | rm -f conftest.err conftest.$ac_objext \ |
6681 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6682 | if test "$ac_cv_search_ldexp" = no; then |
6683 | for ac_lib in m; do | |
6684 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6685 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6686 | /* confdefs.h. */ |
6687 | _ACEOF | |
6688 | cat confdefs.h >>conftest.$ac_ext | |
6689 | cat >>conftest.$ac_ext <<_ACEOF | |
6690 | /* end confdefs.h. */ | |
6691 | ||
62c9aa5f | 6692 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6693 | #ifdef __cplusplus |
6694 | extern "C" | |
6695 | #endif | |
62c9aa5f | 6696 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6697 | builtin and then its argument prototype would still apply. */ |
6698 | char ldexp (); | |
6699 | int | |
6700 | main () | |
6701 | { | |
6702 | ldexp (); | |
6703 | ; | |
6704 | return 0; | |
6705 | } | |
6706 | _ACEOF | |
6707 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6708 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6709 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6710 | ac_status=$? |
86da66b5 HPN |
6711 | grep -v '^ *+' conftest.er1 >conftest.err |
6712 | rm -f conftest.er1 | |
6713 | cat conftest.err >&5 | |
ba479fd2 NN |
6714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6715 | (exit $ac_status); } && | |
fb38008e | 6716 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6717 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6718 | (eval $ac_try) 2>&5 | |
6719 | ac_status=$? | |
6720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6721 | (exit $ac_status); }; } && | |
6722 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6724 | (eval $ac_try) 2>&5 | |
6725 | ac_status=$? | |
6726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6727 | (exit $ac_status); }; }; then | |
6728 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
6729 | break |
6730 | else | |
ba479fd2 NN |
6731 | echo "$as_me: failed program was:" >&5 |
6732 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6733 | ||
cafe096b | 6734 | fi |
86da66b5 HPN |
6735 | rm -f conftest.err conftest.$ac_objext \ |
6736 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 6737 | done |
6e3f3080 | 6738 | fi |
ba479fd2 NN |
6739 | LIBS=$ac_func_search_save_LIBS |
6740 | fi | |
6741 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
6742 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
6743 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 6744 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 6745 | |
62c9aa5f | 6746 | fi |
ba479fd2 | 6747 | |
62c9aa5f ZW |
6748 | LDEXP_LIB="$LIBS" |
6749 | LIBS="$save_LIBS" | |
6750 | ||
6751 | ||
956d6950 JL |
6752 | # Use <inttypes.h> only if it exists, |
6753 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
6754 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
6755 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
6756 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
6757 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6758 | else | |
6759 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6760 | /* confdefs.h. */ |
6761 | _ACEOF | |
6762 | cat confdefs.h >>conftest.$ac_ext | |
6763 | cat >>conftest.$ac_ext <<_ACEOF | |
6764 | /* end confdefs.h. */ | |
956d6950 JL |
6765 | #include <sys/types.h> |
6766 | #include <inttypes.h> | |
ba479fd2 NN |
6767 | int |
6768 | main () | |
6769 | { | |
956d6950 | 6770 | intmax_t i = -1; |
ba479fd2 NN |
6771 | ; |
6772 | return 0; | |
6773 | } | |
6774 | _ACEOF | |
6775 | rm -f conftest.$ac_objext | |
6776 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6777 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6778 | ac_status=$? |
86da66b5 HPN |
6779 | grep -v '^ *+' conftest.er1 >conftest.err |
6780 | rm -f conftest.er1 | |
6781 | cat conftest.err >&5 | |
ba479fd2 NN |
6782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6783 | (exit $ac_status); } && | |
fb38008e | 6784 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6785 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6786 | (eval $ac_try) 2>&5 | |
6787 | ac_status=$? | |
6788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6789 | (exit $ac_status); }; } && | |
6790 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6792 | (eval $ac_try) 2>&5 | |
6793 | ac_status=$? | |
6794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6795 | (exit $ac_status); }; }; then | |
0056a9b5 | 6796 | gcc_cv_header_inttypes_h=yes |
956d6950 | 6797 | else |
ba479fd2 NN |
6798 | echo "$as_me: failed program was:" >&5 |
6799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6800 | ||
6801 | gcc_cv_header_inttypes_h=no | |
956d6950 | 6802 | fi |
86da66b5 | 6803 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
6804 | fi |
6805 | ||
ba479fd2 NN |
6806 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
6807 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 6808 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
6809 | |
6810 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 6811 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 6812 | _ACEOF |
0056a9b5 KG |
6813 | |
6814 | fi | |
956d6950 | 6815 | |
c149cc37 | 6816 | |
ba479fd2 NN |
6817 | |
6818 | ||
6819 | ||
6820 | ||
6821 | ||
6822 | ||
6823 | ||
6824 | ||
6825 | ||
6826 | ||
6827 | ||
6828 | ||
6829 | ||
6830 | ||
6831 | ||
6832 | ||
6833 | ||
6834 | ||
6835 | ||
6836 | ||
6837 | ||
6838 | ||
6839 | ||
6840 | ||
6841 | ||
6af8c740 KG |
6842 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
6843 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 6844 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
6845 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
6846 | setlocale | |
956d6950 | 6847 | do |
ba479fd2 NN |
6848 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6849 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6850 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6851 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6852 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6853 | else | |
6854 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6855 | /* confdefs.h. */ |
6856 | _ACEOF | |
6857 | cat confdefs.h >>conftest.$ac_ext | |
6858 | cat >>conftest.$ac_ext <<_ACEOF | |
6859 | /* end confdefs.h. */ | |
86da66b5 HPN |
6860 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
6861 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
6862 | #define $ac_func innocuous_$ac_func | |
6863 | ||
956d6950 | 6864 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
6865 | which can conflict with char $ac_func (); below. |
6866 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6867 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 6868 | |
ba479fd2 NN |
6869 | #ifdef __STDC__ |
6870 | # include <limits.h> | |
6871 | #else | |
6872 | # include <assert.h> | |
6873 | #endif | |
86da66b5 HPN |
6874 | |
6875 | #undef $ac_func | |
6876 | ||
6e3f3080 | 6877 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6878 | #ifdef __cplusplus |
6879 | extern "C" | |
6880 | { | |
6881 | #endif | |
6e3f3080 | 6882 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6883 | builtin and then its argument prototype would still apply. */ |
6884 | char $ac_func (); | |
956d6950 JL |
6885 | /* The GNU C library defines this for functions which it implements |
6886 | to always fail with ENOSYS. Some functions are actually named | |
6887 | something starting with __ and the normal name is an alias. */ | |
6888 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6889 | choke me | |
6890 | #else | |
ba479fd2 NN |
6891 | char (*f) () = $ac_func; |
6892 | #endif | |
6893 | #ifdef __cplusplus | |
6894 | } | |
956d6950 JL |
6895 | #endif |
6896 | ||
ba479fd2 NN |
6897 | int |
6898 | main () | |
6899 | { | |
6900 | return f != $ac_func; | |
6901 | ; | |
6902 | return 0; | |
6903 | } | |
6904 | _ACEOF | |
6905 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6906 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 6907 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 6908 | ac_status=$? |
86da66b5 HPN |
6909 | grep -v '^ *+' conftest.er1 >conftest.err |
6910 | rm -f conftest.er1 | |
6911 | cat conftest.err >&5 | |
ba479fd2 NN |
6912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6913 | (exit $ac_status); } && | |
fb38008e | 6914 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
6915 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6916 | (eval $ac_try) 2>&5 | |
6917 | ac_status=$? | |
6918 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6919 | (exit $ac_status); }; } && | |
6920 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
6921 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6922 | (eval $ac_try) 2>&5 | |
6923 | ac_status=$? | |
6924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6925 | (exit $ac_status); }; }; then | |
6926 | eval "$as_ac_var=yes" | |
6927 | else | |
6928 | echo "$as_me: failed program was:" >&5 | |
6929 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6930 | ||
6931 | eval "$as_ac_var=no" | |
6932 | fi | |
86da66b5 HPN |
6933 | rm -f conftest.err conftest.$ac_objext \ |
6934 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
6935 | fi |
6936 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6937 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6938 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6939 | cat >>confdefs.h <<_ACEOF | |
6940 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6941 | _ACEOF | |
956d6950 | 6942 | |
956d6950 JL |
6943 | fi |
6944 | done | |
6945 | ||
6885fc87 | 6946 | |
39f6c4c8 | 6947 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
6948 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
6949 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
6950 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
6951 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
6952 | else |
6953 | if test "$cross_compiling" = yes; then | |
6954 | gcc_cv_func_mbstowcs_works=yes | |
6955 | else | |
ba479fd2 | 6956 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6957 | /* confdefs.h. */ |
6958 | _ACEOF | |
6959 | cat confdefs.h >>conftest.$ac_ext | |
6960 | cat >>conftest.$ac_ext <<_ACEOF | |
6961 | /* end confdefs.h. */ | |
39f6c4c8 KW |
6962 | #include <stdlib.h> |
6963 | int main() | |
6964 | { | |
6965 | mbstowcs(0, "", 0); | |
6966 | return 0; | |
6967 | } | |
ba479fd2 NN |
6968 | _ACEOF |
6969 | rm -f conftest$ac_exeext | |
6970 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6971 | (eval $ac_link) 2>&5 | |
6972 | ac_status=$? | |
6973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6974 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6975 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6976 | (eval $ac_try) 2>&5 | |
6977 | ac_status=$? | |
6978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6979 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
6980 | gcc_cv_func_mbstowcs_works=yes |
6981 | else | |
ba479fd2 NN |
6982 | echo "$as_me: program exited with status $ac_status" >&5 |
6983 | echo "$as_me: failed program was:" >&5 | |
6984 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6985 | ||
6986 | ( exit $ac_status ) | |
6987 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 6988 | fi |
86da66b5 | 6989 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 6990 | fi |
39f6c4c8 | 6991 | fi |
ba479fd2 NN |
6992 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
6993 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 6994 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
6995 | |
6996 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 6997 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 6998 | _ACEOF |
39f6c4c8 KW |
6999 | |
7000 | fi | |
7001 | fi | |
7002 | ||
ba479fd2 NN |
7003 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
7004 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
7005 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
7006 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 7007 | else |
ba479fd2 | 7008 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7009 | /* confdefs.h. */ |
7010 | _ACEOF | |
7011 | cat confdefs.h >>conftest.$ac_ext | |
7012 | cat >>conftest.$ac_ext <<_ACEOF | |
7013 | /* end confdefs.h. */ | |
8b4fc07a NN |
7014 | $ac_includes_default |
7015 | int | |
7016 | main () | |
7017 | { | |
7018 | if ((ssize_t *) 0) | |
7019 | return 0; | |
7020 | if (sizeof (ssize_t)) | |
7021 | return 0; | |
7022 | ; | |
7023 | return 0; | |
7024 | } | |
ba479fd2 | 7025 | _ACEOF |
8b4fc07a NN |
7026 | rm -f conftest.$ac_objext |
7027 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7028 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 7029 | ac_status=$? |
86da66b5 HPN |
7030 | grep -v '^ *+' conftest.er1 >conftest.err |
7031 | rm -f conftest.er1 | |
7032 | cat conftest.err >&5 | |
8b4fc07a NN |
7033 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7034 | (exit $ac_status); } && | |
fb38008e | 7035 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7036 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7037 | (eval $ac_try) 2>&5 | |
7038 | ac_status=$? | |
7039 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7040 | (exit $ac_status); }; } && | |
7041 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
7042 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7043 | (eval $ac_try) 2>&5 | |
7044 | ac_status=$? | |
7045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7046 | (exit $ac_status); }; }; then | |
cb65112a | 7047 | ac_cv_type_ssize_t=yes |
f12bc141 | 7048 | else |
8b4fc07a NN |
7049 | echo "$as_me: failed program was:" >&5 |
7050 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 7051 | |
8b4fc07a NN |
7052 | ac_cv_type_ssize_t=no |
7053 | fi | |
86da66b5 | 7054 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 7055 | fi |
ba479fd2 NN |
7056 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
7057 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
7058 | if test $ac_cv_type_ssize_t = yes; then |
7059 | : | |
7060 | else | |
ba479fd2 | 7061 | |
8b4fc07a | 7062 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 7063 | #define ssize_t int |
ba479fd2 | 7064 | _ACEOF |
f12bc141 ZW |
7065 | |
7066 | fi | |
7067 | ||
0b9d02c6 | 7068 | |
e256b8b6 DA |
7069 | # Try to determine the array type of the second argument of getgroups |
7070 | # for the target system (int or gid_t). | |
ba479fd2 NN |
7071 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
7072 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
7073 | if test "${ac_cv_type_uid_t+set}" = set; then | |
7074 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7075 | else | |
7076 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7077 | /* confdefs.h. */ |
7078 | _ACEOF | |
7079 | cat confdefs.h >>conftest.$ac_ext | |
7080 | cat >>conftest.$ac_ext <<_ACEOF | |
7081 | /* end confdefs.h. */ | |
e256b8b6 | 7082 | #include <sys/types.h> |
ba479fd2 NN |
7083 | |
7084 | _ACEOF | |
e256b8b6 | 7085 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7086 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
7087 | ac_cv_type_uid_t=yes |
7088 | else | |
e256b8b6 DA |
7089 | ac_cv_type_uid_t=no |
7090 | fi | |
7091 | rm -f conftest* | |
7092 | ||
7093 | fi | |
ba479fd2 NN |
7094 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
7095 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 7096 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
7097 | |
7098 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 7099 | #define uid_t int |
ba479fd2 | 7100 | _ACEOF |
cafe096b | 7101 | |
ba479fd2 NN |
7102 | |
7103 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 7104 | #define gid_t int |
ba479fd2 | 7105 | _ACEOF |
e256b8b6 DA |
7106 | |
7107 | fi | |
7108 | ||
ba479fd2 NN |
7109 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
7110 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
7111 | if test "${ac_cv_type_getgroups+set}" = set; then | |
7112 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
7113 | else |
7114 | if test "$cross_compiling" = yes; then | |
7115 | ac_cv_type_getgroups=cross | |
7116 | else | |
ba479fd2 | 7117 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7118 | /* confdefs.h. */ |
7119 | _ACEOF | |
7120 | cat confdefs.h >>conftest.$ac_ext | |
7121 | cat >>conftest.$ac_ext <<_ACEOF | |
7122 | /* end confdefs.h. */ | |
e256b8b6 DA |
7123 | /* Thanks to Mike Rendell for this test. */ |
7124 | #include <sys/types.h> | |
7125 | #define NGID 256 | |
7126 | #undef MAX | |
7127 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
7128 | |
7129 | int | |
7130 | main () | |
e256b8b6 DA |
7131 | { |
7132 | gid_t gidset[NGID]; | |
7133 | int i, n; | |
7134 | union { gid_t gval; long lval; } val; | |
7135 | ||
7136 | val.lval = -1; | |
7137 | for (i = 0; i < NGID; i++) | |
7138 | gidset[i] = val.gval; | |
7139 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 7140 | gidset); |
e256b8b6 DA |
7141 | /* Exit non-zero if getgroups seems to require an array of ints. This |
7142 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
7143 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 7144 | } |
ba479fd2 NN |
7145 | _ACEOF |
7146 | rm -f conftest$ac_exeext | |
7147 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7148 | (eval $ac_link) 2>&5 | |
7149 | ac_status=$? | |
7150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7151 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7152 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7153 | (eval $ac_try) 2>&5 | |
7154 | ac_status=$? | |
7155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7156 | (exit $ac_status); }; }; then | |
7157 | ac_cv_type_getgroups=gid_t | |
63cf211a | 7158 | else |
ba479fd2 NN |
7159 | echo "$as_me: program exited with status $ac_status" >&5 |
7160 | echo "$as_me: failed program was:" >&5 | |
7161 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7162 | ||
7163 | ( exit $ac_status ) | |
7164 | ac_cv_type_getgroups=int | |
e256b8b6 | 7165 | fi |
86da66b5 | 7166 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 7167 | fi |
e256b8b6 | 7168 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 7169 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7170 | /* confdefs.h. */ |
7171 | _ACEOF | |
7172 | cat confdefs.h >>conftest.$ac_ext | |
7173 | cat >>conftest.$ac_ext <<_ACEOF | |
7174 | /* end confdefs.h. */ | |
e256b8b6 | 7175 | #include <unistd.h> |
ba479fd2 NN |
7176 | |
7177 | _ACEOF | |
e256b8b6 | 7178 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7179 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
7180 | ac_cv_type_getgroups=gid_t |
7181 | else | |
e256b8b6 DA |
7182 | ac_cv_type_getgroups=int |
7183 | fi | |
7184 | rm -f conftest* | |
7185 | ||
7186 | fi | |
7187 | fi | |
ba479fd2 NN |
7188 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
7189 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 7190 | |
ba479fd2 | 7191 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 7192 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 7193 | _ACEOF |
e256b8b6 DA |
7194 | |
7195 | ||
7196 | if test "${target}" = "${build}"; then | |
7197 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
7198 | else | |
7199 | case "${target}" in | |
7200 | # This condition may need some tweaking. It should include all | |
7201 | # targets where the array type of the second argument of getgroups | |
7202 | # is int and the type of gid_t is not equivalent to int. | |
7203 | *-*-sunos* | *-*-ultrix*) | |
7204 | TARGET_GETGROUPS_T=int | |
7205 | ;; | |
7206 | *) | |
7207 | TARGET_GETGROUPS_T=gid_t | |
7208 | ;; | |
7209 | esac | |
7210 | fi | |
7211 | ||
7212 | ||
ba479fd2 NN |
7213 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
7214 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
7215 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
7216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7217 | else |
7218 | if test "$cross_compiling" = yes; then | |
7219 | gcc_cv_func_printf_ptr=no | |
7220 | else | |
ba479fd2 | 7221 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7222 | /* confdefs.h. */ |
7223 | _ACEOF | |
7224 | cat confdefs.h >>conftest.$ac_ext | |
7225 | cat >>conftest.$ac_ext <<_ACEOF | |
7226 | /* end confdefs.h. */ | |
0a4b6309 RL |
7227 | #include <stdio.h> |
7228 | ||
86cf1cbd | 7229 | int main() |
0a4b6309 RL |
7230 | { |
7231 | char buf[64]; | |
7232 | char *p = buf, *q = NULL; | |
7233 | sprintf(buf, "%p", p); | |
7234 | sscanf(buf, "%p", &q); | |
86cf1cbd | 7235 | return (p != q); |
0a4b6309 | 7236 | } |
ba479fd2 NN |
7237 | _ACEOF |
7238 | rm -f conftest$ac_exeext | |
7239 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7240 | (eval $ac_link) 2>&5 | |
7241 | ac_status=$? | |
7242 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7243 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7244 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7245 | (eval $ac_try) 2>&5 | |
7246 | ac_status=$? | |
7247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7248 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
7249 | gcc_cv_func_printf_ptr=yes |
7250 | else | |
ba479fd2 NN |
7251 | echo "$as_me: program exited with status $ac_status" >&5 |
7252 | echo "$as_me: failed program was:" >&5 | |
7253 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7254 | ||
7255 | ( exit $ac_status ) | |
7256 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 7257 | fi |
86da66b5 | 7258 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 7259 | fi |
0a4b6309 RL |
7260 | rm -f core core.* *.core |
7261 | fi | |
ba479fd2 NN |
7262 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
7263 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 7264 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
7265 | |
7266 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 7267 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 7268 | _ACEOF |
0a4b6309 RL |
7269 | |
7270 | fi | |
7271 | ||
3b0727a0 MR |
7272 | |
7273 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 | |
7274 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
7275 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
7276 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7277 | else | |
7278 | cat >conftest.$ac_ext <<_ACEOF | |
7279 | /* confdefs.h. */ | |
7280 | _ACEOF | |
7281 | cat confdefs.h >>conftest.$ac_ext | |
7282 | cat >>conftest.$ac_ext <<_ACEOF | |
7283 | /* end confdefs.h. */ | |
7284 | #include <sys/mman.h> | |
7285 | _ACEOF | |
7286 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7287 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7288 | ac_status=$? | |
7289 | grep -v '^ *+' conftest.er1 >conftest.err | |
7290 | rm -f conftest.er1 | |
7291 | cat conftest.err >&5 | |
7292 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7293 | (exit $ac_status); } >/dev/null; then | |
7294 | if test -s conftest.err; then | |
7295 | ac_cpp_err=$ac_c_preproc_warn_flag | |
7296 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
7297 | else | |
7298 | ac_cpp_err= | |
7299 | fi | |
7300 | else | |
7301 | ac_cpp_err=yes | |
7302 | fi | |
7303 | if test -z "$ac_cpp_err"; then | |
7304 | ac_cv_header_sys_mman_h=yes | |
7305 | else | |
7306 | echo "$as_me: failed program was:" >&5 | |
7307 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7308 | ||
7309 | ac_cv_header_sys_mman_h=no | |
7310 | fi | |
7311 | rm -f conftest.err conftest.$ac_ext | |
7312 | fi | |
7313 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
7314 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
7315 | if test $ac_cv_header_sys_mman_h = yes; then | |
7316 | gcc_header_sys_mman_h=yes | |
7317 | else | |
7318 | gcc_header_sys_mman_h=no | |
7319 | fi | |
7320 | ||
7321 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
7322 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
7323 | if test "${ac_cv_func_mmap+set}" = set; then | |
7324 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7325 | else | |
7326 | cat >conftest.$ac_ext <<_ACEOF | |
7327 | /* confdefs.h. */ | |
7328 | _ACEOF | |
7329 | cat confdefs.h >>conftest.$ac_ext | |
7330 | cat >>conftest.$ac_ext <<_ACEOF | |
7331 | /* end confdefs.h. */ | |
7332 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
7333 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
7334 | #define mmap innocuous_mmap | |
7335 | ||
7336 | /* System header to define __stub macros and hopefully few prototypes, | |
7337 | which can conflict with char mmap (); below. | |
7338 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7339 | <limits.h> exists even on freestanding compilers. */ | |
7340 | ||
7341 | #ifdef __STDC__ | |
7342 | # include <limits.h> | |
7343 | #else | |
7344 | # include <assert.h> | |
7345 | #endif | |
7346 | ||
7347 | #undef mmap | |
7348 | ||
7349 | /* Override any gcc2 internal prototype to avoid an error. */ | |
7350 | #ifdef __cplusplus | |
7351 | extern "C" | |
7352 | { | |
7353 | #endif | |
7354 | /* We use char because int might match the return type of a gcc2 | |
7355 | builtin and then its argument prototype would still apply. */ | |
7356 | char mmap (); | |
7357 | /* The GNU C library defines this for functions which it implements | |
7358 | to always fail with ENOSYS. Some functions are actually named | |
7359 | something starting with __ and the normal name is an alias. */ | |
7360 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
7361 | choke me | |
7362 | #else | |
7363 | char (*f) () = mmap; | |
7364 | #endif | |
7365 | #ifdef __cplusplus | |
7366 | } | |
7367 | #endif | |
7368 | ||
7369 | int | |
7370 | main () | |
7371 | { | |
7372 | return f != mmap; | |
7373 | ; | |
7374 | return 0; | |
7375 | } | |
7376 | _ACEOF | |
7377 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7378 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7379 | (eval $ac_link) 2>conftest.er1 | |
7380 | ac_status=$? | |
7381 | grep -v '^ *+' conftest.er1 >conftest.err | |
7382 | rm -f conftest.er1 | |
7383 | cat conftest.err >&5 | |
7384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7385 | (exit $ac_status); } && | |
fb38008e | 7386 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
3b0727a0 MR |
7387 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7388 | (eval $ac_try) 2>&5 | |
7389 | ac_status=$? | |
7390 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7391 | (exit $ac_status); }; } && | |
7392 | { ac_try='test -s conftest$ac_exeext' | |
7393 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7394 | (eval $ac_try) 2>&5 | |
7395 | ac_status=$? | |
7396 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7397 | (exit $ac_status); }; }; then | |
7398 | ac_cv_func_mmap=yes | |
7399 | else | |
7400 | echo "$as_me: failed program was:" >&5 | |
7401 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7402 | ||
7403 | ac_cv_func_mmap=no | |
7404 | fi | |
7405 | rm -f conftest.err conftest.$ac_objext \ | |
7406 | conftest$ac_exeext conftest.$ac_ext | |
7407 | fi | |
7408 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
7409 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
7410 | if test $ac_cv_func_mmap = yes; then | |
7411 | gcc_func_mmap=yes | |
7412 | else | |
7413 | gcc_func_mmap=no | |
7414 | fi | |
7415 | ||
7416 | if test "$gcc_header_sys_mman_h" != yes \ | |
7417 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
7418 | gcc_cv_func_mmap_file=no |
7419 | gcc_cv_func_mmap_dev_zero=no | |
7420 | gcc_cv_func_mmap_anon=no | |
7421 | else | |
ba479fd2 NN |
7422 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
7423 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
7424 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
7425 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 7426 | else |
ba479fd2 | 7427 | # Add a system to this blacklist if |
1072ec3f ZW |
7428 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
7429 | # memory area containing the same data that you'd get if you applied | |
7430 | # read() to the same fd. The only system known to have a problem here | |
7431 | # is VMS, where text files have record structure. | |
7432 | case "$host_os" in | |
ba479fd2 | 7433 | vms* | ultrix*) |
1072ec3f ZW |
7434 | gcc_cv_func_mmap_file=no ;; |
7435 | *) | |
7436 | gcc_cv_func_mmap_file=yes;; | |
7437 | esac | |
7438 | fi | |
ba479fd2 NN |
7439 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
7440 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
7441 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
7442 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
7443 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
7444 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
7445 | else |
7446 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
7447 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
7448 | # zeroed pages with both the following properties: | |
7449 | # 1. If you map N consecutive pages in with one call, and then | |
7450 | # unmap any subset of those pages, the pages that were not | |
7451 | # explicitly unmapped remain accessible. | |
7452 | # 2. If you map two adjacent blocks of memory and then unmap them | |
7453 | # both at once, they must both go away. | |
7454 | # Systems known to be in this category are Windows (all variants), | |
7455 | # VMS, and Darwin. | |
7456 | case "$host_os" in | |
2ce240d3 | 7457 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
7458 | gcc_cv_func_mmap_dev_zero=no ;; |
7459 | *) | |
7460 | gcc_cv_func_mmap_dev_zero=yes;; | |
7461 | esac | |
7462 | fi | |
ba479fd2 NN |
7463 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
7464 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
7465 | |
7466 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
7467 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
7468 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
7469 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
7470 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7471 | else | |
7472 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7473 | /* confdefs.h. */ |
7474 | _ACEOF | |
7475 | cat confdefs.h >>conftest.$ac_ext | |
7476 | cat >>conftest.$ac_ext <<_ACEOF | |
7477 | /* end confdefs.h. */ | |
1072ec3f ZW |
7478 | #include <sys/types.h> |
7479 | #include <sys/mman.h> | |
7480 | #include <unistd.h> | |
7481 | ||
7482 | #ifndef MAP_ANONYMOUS | |
7483 | #define MAP_ANONYMOUS MAP_ANON | |
7484 | #endif | |
7485 | ||
ba479fd2 NN |
7486 | int |
7487 | main () | |
7488 | { | |
1072ec3f | 7489 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
7490 | ; |
7491 | return 0; | |
7492 | } | |
7493 | _ACEOF | |
7494 | rm -f conftest.$ac_objext | |
7495 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7496 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7497 | ac_status=$? |
86da66b5 HPN |
7498 | grep -v '^ *+' conftest.er1 >conftest.err |
7499 | rm -f conftest.er1 | |
7500 | cat conftest.err >&5 | |
ba479fd2 NN |
7501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7502 | (exit $ac_status); } && | |
fb38008e | 7503 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7504 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7505 | (eval $ac_try) 2>&5 | |
7506 | ac_status=$? | |
7507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7508 | (exit $ac_status); }; } && | |
7509 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7511 | (eval $ac_try) 2>&5 | |
7512 | ac_status=$? | |
7513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7514 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
7515 | gcc_cv_decl_map_anon=yes |
7516 | else | |
ba479fd2 NN |
7517 | echo "$as_me: failed program was:" >&5 |
7518 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7519 | ||
7520 | gcc_cv_decl_map_anon=no | |
1072ec3f | 7521 | fi |
86da66b5 | 7522 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 7523 | fi |
ba479fd2 NN |
7524 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
7525 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
7526 | |
7527 | if test $gcc_cv_decl_map_anon = no; then | |
7528 | gcc_cv_func_mmap_anon=no | |
7529 | else | |
ba479fd2 NN |
7530 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
7531 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
7532 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
7533 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
7534 | else |
7535 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
7536 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
7537 | # doesn't give anonymous zeroed pages with the same properties listed | |
7538 | # above for use of /dev/zero. | |
7539 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
7540 | case "$host_os" in | |
7541 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
7542 | gcc_cv_func_mmap_anon=no ;; | |
7543 | *) | |
7544 | gcc_cv_func_mmap_anon=yes;; | |
7545 | esac | |
7546 | fi | |
ba479fd2 NN |
7547 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
7548 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
7549 | fi |
7550 | fi | |
7551 | ||
7552 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
7553 | |
7554 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7555 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 7556 | _ACEOF |
1072ec3f ZW |
7557 | |
7558 | fi | |
7559 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
7560 | |
7561 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7562 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 7563 | _ACEOF |
1072ec3f ZW |
7564 | |
7565 | fi | |
7566 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
7567 | |
7568 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7569 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 7570 | _ACEOF |
1072ec3f ZW |
7571 | |
7572 | fi | |
7573 | ||
b27d2bd5 MK |
7574 | |
7575 | case "${host}" in | |
ee262b6f | 7576 | *-*-*vms*) |
ba479fd2 | 7577 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
7578 | # won't work, and it isn't easily adaptable. It makes more sense to |
7579 | # just force it. | |
7580 | ac_cv_func_vfork_works=yes | |
7581 | ;; | |
b27d2bd5 | 7582 | esac |
ba479fd2 NN |
7583 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
7584 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
7585 | if test "${ac_cv_type_pid_t+set}" = set; then | |
7586 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7587 | else | |
7588 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7589 | /* confdefs.h. */ |
7590 | _ACEOF | |
7591 | cat confdefs.h >>conftest.$ac_ext | |
7592 | cat >>conftest.$ac_ext <<_ACEOF | |
7593 | /* end confdefs.h. */ | |
7594 | $ac_includes_default | |
7595 | int | |
7596 | main () | |
7597 | { | |
7598 | if ((pid_t *) 0) | |
7599 | return 0; | |
7600 | if (sizeof (pid_t)) | |
7601 | return 0; | |
7602 | ; | |
7603 | return 0; | |
7604 | } | |
7605 | _ACEOF | |
7606 | rm -f conftest.$ac_objext | |
7607 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7608 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7609 | ac_status=$? |
86da66b5 HPN |
7610 | grep -v '^ *+' conftest.er1 >conftest.err |
7611 | rm -f conftest.er1 | |
7612 | cat conftest.err >&5 | |
ba479fd2 NN |
7613 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7614 | (exit $ac_status); } && | |
fb38008e | 7615 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7616 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7617 | (eval $ac_try) 2>&5 | |
7618 | ac_status=$? | |
7619 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7620 | (exit $ac_status); }; } && | |
7621 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7622 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7623 | (eval $ac_try) 2>&5 | |
7624 | ac_status=$? | |
7625 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7626 | (exit $ac_status); }; }; then | |
cb65112a | 7627 | ac_cv_type_pid_t=yes |
c375c43b | 7628 | else |
ba479fd2 NN |
7629 | echo "$as_me: failed program was:" >&5 |
7630 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 7631 | |
ba479fd2 NN |
7632 | ac_cv_type_pid_t=no |
7633 | fi | |
86da66b5 | 7634 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 7635 | fi |
ba479fd2 NN |
7636 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
7637 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
7638 | if test $ac_cv_type_pid_t = yes; then | |
7639 | : | |
7640 | else | |
7641 | ||
7642 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 7643 | #define pid_t int |
ba479fd2 | 7644 | _ACEOF |
c375c43b KG |
7645 | |
7646 | fi | |
7647 | ||
ba479fd2 NN |
7648 | |
7649 | ||
7650 | for ac_header in unistd.h vfork.h | |
7651 | do | |
7652 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 7653 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
7654 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
7655 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
7656 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 7657 | else |
ca9bc441 | 7658 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7659 | /* confdefs.h. */ |
7660 | _ACEOF | |
7661 | cat confdefs.h >>conftest.$ac_ext | |
7662 | cat >>conftest.$ac_ext <<_ACEOF | |
7663 | /* end confdefs.h. */ | |
7664 | #include <$ac_header> | |
7665 | _ACEOF | |
7666 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7667 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7668 | ac_status=$? | |
7669 | grep -v '^ *+' conftest.er1 >conftest.err | |
7670 | rm -f conftest.er1 | |
7671 | cat conftest.err >&5 | |
7672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7673 | (exit $ac_status); } >/dev/null; then | |
7674 | if test -s conftest.err; then | |
7675 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 7676 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
7677 | else |
7678 | ac_cpp_err= | |
7679 | fi | |
093e61a6 | 7680 | else |
ba479fd2 NN |
7681 | ac_cpp_err=yes |
7682 | fi | |
7683 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 7684 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
7685 | else |
7686 | echo "$as_me: failed program was:" >&5 | |
7687 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7688 | ||
ca9bc441 | 7689 | eval "$as_ac_Header=no" |
ba479fd2 NN |
7690 | fi |
7691 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 7692 | fi |
ba479fd2 NN |
7693 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7694 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
7695 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
7696 | cat >>confdefs.h <<_ACEOF | |
7697 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7698 | _ACEOF | |
6e3f3080 NN |
7699 | |
7700 | fi | |
ba479fd2 NN |
7701 | done |
7702 | ||
7703 | ||
7704 | ||
7705 | for ac_func in fork vfork | |
7706 | do | |
7707 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7708 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7709 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7710 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7711 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7712 | else | |
7713 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7714 | /* confdefs.h. */ |
7715 | _ACEOF | |
7716 | cat confdefs.h >>conftest.$ac_ext | |
7717 | cat >>conftest.$ac_ext <<_ACEOF | |
7718 | /* end confdefs.h. */ | |
86da66b5 HPN |
7719 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
7720 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
7721 | #define $ac_func innocuous_$ac_func | |
7722 | ||
c375c43b | 7723 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
7724 | which can conflict with char $ac_func (); below. |
7725 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7726 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 7727 | |
ba479fd2 NN |
7728 | #ifdef __STDC__ |
7729 | # include <limits.h> | |
7730 | #else | |
7731 | # include <assert.h> | |
7732 | #endif | |
86da66b5 HPN |
7733 | |
7734 | #undef $ac_func | |
7735 | ||
6e3f3080 | 7736 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
7737 | #ifdef __cplusplus |
7738 | extern "C" | |
7739 | { | |
7740 | #endif | |
6e3f3080 | 7741 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
7742 | builtin and then its argument prototype would still apply. */ |
7743 | char $ac_func (); | |
c375c43b KG |
7744 | /* The GNU C library defines this for functions which it implements |
7745 | to always fail with ENOSYS. Some functions are actually named | |
7746 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 7747 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
7748 | choke me |
7749 | #else | |
ba479fd2 NN |
7750 | char (*f) () = $ac_func; |
7751 | #endif | |
7752 | #ifdef __cplusplus | |
7753 | } | |
c375c43b KG |
7754 | #endif |
7755 | ||
ba479fd2 NN |
7756 | int |
7757 | main () | |
7758 | { | |
7759 | return f != $ac_func; | |
7760 | ; | |
7761 | return 0; | |
7762 | } | |
7763 | _ACEOF | |
7764 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7765 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 7766 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 7767 | ac_status=$? |
86da66b5 HPN |
7768 | grep -v '^ *+' conftest.er1 >conftest.err |
7769 | rm -f conftest.er1 | |
7770 | cat conftest.err >&5 | |
ba479fd2 NN |
7771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7772 | (exit $ac_status); } && | |
fb38008e | 7773 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
7774 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7775 | (eval $ac_try) 2>&5 | |
7776 | ac_status=$? | |
7777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7778 | (exit $ac_status); }; } && | |
7779 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
7780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7781 | (eval $ac_try) 2>&5 | |
7782 | ac_status=$? | |
7783 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7784 | (exit $ac_status); }; }; then | |
7785 | eval "$as_ac_var=yes" | |
7786 | else | |
7787 | echo "$as_me: failed program was:" >&5 | |
7788 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7789 | ||
7790 | eval "$as_ac_var=no" | |
7791 | fi | |
86da66b5 HPN |
7792 | rm -f conftest.err conftest.$ac_objext \ |
7793 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
7794 | fi |
7795 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7796 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7797 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7798 | cat >>confdefs.h <<_ACEOF | |
7799 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7800 | _ACEOF | |
7801 | ||
c375c43b | 7802 | fi |
ba479fd2 | 7803 | done |
c375c43b | 7804 | |
ba479fd2 NN |
7805 | if test "x$ac_cv_func_fork" = xyes; then |
7806 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
7807 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
7808 | if test "${ac_cv_func_fork_works+set}" = set; then | |
7809 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7810 | else |
ba479fd2 NN |
7811 | if test "$cross_compiling" = yes; then |
7812 | ac_cv_func_fork_works=cross | |
7813 | else | |
7814 | cat >conftest.$ac_ext <<_ACEOF | |
7815 | /* By Ruediger Kuhlmann. */ | |
7816 | #include <sys/types.h> | |
7817 | #if HAVE_UNISTD_H | |
7818 | # include <unistd.h> | |
7819 | #endif | |
7820 | /* Some systems only have a dummy stub for fork() */ | |
7821 | int main () | |
7822 | { | |
86da66b5 HPN |
7823 | if (fork() < 0) |
7824 | exit (1); | |
7825 | exit (0); | |
ba479fd2 NN |
7826 | } |
7827 | _ACEOF | |
7828 | rm -f conftest$ac_exeext | |
7829 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7830 | (eval $ac_link) 2>&5 | |
7831 | ac_status=$? | |
7832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7833 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7834 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7835 | (eval $ac_try) 2>&5 | |
7836 | ac_status=$? | |
7837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7838 | (exit $ac_status); }; }; then | |
7839 | ac_cv_func_fork_works=yes | |
7840 | else | |
7841 | echo "$as_me: program exited with status $ac_status" >&5 | |
7842 | echo "$as_me: failed program was:" >&5 | |
7843 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7844 | ||
7845 | ( exit $ac_status ) | |
7846 | ac_cv_func_fork_works=no | |
7847 | fi | |
86da66b5 | 7848 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
7849 | fi |
7850 | fi | |
7851 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
7852 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
7853 | ||
7854 | else | |
7855 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7856 | fi | |
7857 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7858 | case $host in | |
7859 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7860 | # Override, as these systems have only a dummy fork() stub | |
7861 | ac_cv_func_fork_works=no | |
7862 | ;; | |
7863 | *) | |
7864 | ac_cv_func_fork_works=yes | |
7865 | ;; | |
7866 | esac | |
7867 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7868 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 7869 | fi |
c375c43b | 7870 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
7871 | if test "x$ac_cv_func_vfork" = xyes; then |
7872 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
7873 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
7874 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
7875 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7876 | else |
ba479fd2 NN |
7877 | if test "$cross_compiling" = yes; then |
7878 | ac_cv_func_vfork_works=cross | |
7879 | else | |
7880 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7881 | /* confdefs.h. */ |
7882 | _ACEOF | |
7883 | cat confdefs.h >>conftest.$ac_ext | |
7884 | cat >>conftest.$ac_ext <<_ACEOF | |
7885 | /* end confdefs.h. */ | |
c375c43b KG |
7886 | /* Thanks to Paul Eggert for this test. */ |
7887 | #include <stdio.h> | |
ba479fd2 | 7888 | #include <stdlib.h> |
c375c43b KG |
7889 | #include <sys/types.h> |
7890 | #include <sys/stat.h> | |
ba479fd2 NN |
7891 | #include <sys/wait.h> |
7892 | #if HAVE_UNISTD_H | |
7893 | # include <unistd.h> | |
c375c43b | 7894 | #endif |
ba479fd2 NN |
7895 | #if HAVE_VFORK_H |
7896 | # include <vfork.h> | |
c375c43b KG |
7897 | #endif |
7898 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
7899 | argument registers are propagated back to the parent. The compiler |
7900 | is told about this with #include <vfork.h>, but some compilers | |
7901 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7902 | static variable whose address is put into a register that is | |
7903 | clobbered by the vfork. */ | |
7904 | static void | |
c375c43b KG |
7905 | #ifdef __cplusplus |
7906 | sparc_address_test (int arg) | |
ba479fd2 | 7907 | # else |
c375c43b KG |
7908 | sparc_address_test (arg) int arg; |
7909 | #endif | |
7910 | { | |
7911 | static pid_t child; | |
7912 | if (!child) { | |
7913 | child = vfork (); | |
7914 | if (child < 0) { | |
7915 | perror ("vfork"); | |
7916 | _exit(2); | |
7917 | } | |
7918 | if (!child) { | |
7919 | arg = getpid(); | |
7920 | write(-1, "", 0); | |
7921 | _exit (arg); | |
7922 | } | |
7923 | } | |
7924 | } | |
ba479fd2 NN |
7925 | |
7926 | int | |
7927 | main () | |
7928 | { | |
c375c43b KG |
7929 | pid_t parent = getpid (); |
7930 | pid_t child; | |
7931 | ||
ba479fd2 | 7932 | sparc_address_test (0); |
c375c43b KG |
7933 | |
7934 | child = vfork (); | |
7935 | ||
7936 | if (child == 0) { | |
ba479fd2 NN |
7937 | /* Here is another test for sparc vfork register problems. This |
7938 | test uses lots of local variables, at least as many local | |
7939 | variables as main has allocated so far including compiler | |
7940 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7941 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7942 | reuse the register of parent for one of the local variables, | |
7943 | since it will think that parent can't possibly be used any more | |
7944 | in this routine. Assigning to the local variable will thus | |
7945 | munge parent in the parent process. */ | |
c375c43b KG |
7946 | pid_t |
7947 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7948 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7949 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7950 | use the same hardware register for all 8 local variables. */ | |
7951 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7952 | || p != p5 || p != p6 || p != p7) | |
7953 | _exit(1); | |
7954 | ||
ba479fd2 NN |
7955 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
7956 | from child file descriptors. If the child closes a descriptor | |
7957 | before it execs or exits, this munges the parent's descriptor | |
7958 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
7959 | _exit(close(fileno(stdout)) != 0); |
7960 | } else { | |
7961 | int status; | |
7962 | struct stat st; | |
7963 | ||
7964 | while (wait(&status) != child) | |
7965 | ; | |
7966 | exit( | |
7967 | /* Was there some problem with vforking? */ | |
7968 | child < 0 | |
7969 | ||
7970 | /* Did the child fail? (This shouldn't happen.) */ | |
7971 | || status | |
7972 | ||
7973 | /* Did the vfork/compiler bug occur? */ | |
7974 | || parent != getpid() | |
7975 | ||
7976 | /* Did the file descriptor bug occur? */ | |
7977 | || fstat(fileno(stdout), &st) != 0 | |
7978 | ); | |
7979 | } | |
7980 | } | |
ba479fd2 NN |
7981 | _ACEOF |
7982 | rm -f conftest$ac_exeext | |
7983 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7984 | (eval $ac_link) 2>&5 | |
7985 | ac_status=$? | |
7986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7987 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7989 | (eval $ac_try) 2>&5 | |
7990 | ac_status=$? | |
7991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7992 | (exit $ac_status); }; }; then | |
c375c43b KG |
7993 | ac_cv_func_vfork_works=yes |
7994 | else | |
ba479fd2 NN |
7995 | echo "$as_me: program exited with status $ac_status" >&5 |
7996 | echo "$as_me: failed program was:" >&5 | |
7997 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7998 | ||
7999 | ( exit $ac_status ) | |
8000 | ac_cv_func_vfork_works=no | |
cafe096b | 8001 | fi |
86da66b5 | 8002 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 8003 | fi |
ba479fd2 NN |
8004 | fi |
8005 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
8006 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 8007 | |
ba479fd2 NN |
8008 | fi; |
8009 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 8010 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
8011 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
8012 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
8013 | fi |
8014 | ||
ba479fd2 NN |
8015 | if test "x$ac_cv_func_vfork_works" = xyes; then |
8016 | ||
8017 | cat >>confdefs.h <<\_ACEOF | |
8018 | #define HAVE_WORKING_VFORK 1 | |
8019 | _ACEOF | |
8020 | ||
8021 | else | |
8022 | ||
8023 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 8024 | #define vfork fork |
ba479fd2 | 8025 | _ACEOF |
c375c43b KG |
8026 | |
8027 | fi | |
ba479fd2 NN |
8028 | if test "x$ac_cv_func_fork_works" = xyes; then |
8029 | ||
8030 | cat >>confdefs.h <<\_ACEOF | |
8031 | #define HAVE_WORKING_FORK 1 | |
8032 | _ACEOF | |
8033 | ||
8034 | fi | |
8035 | ||
c375c43b | 8036 | |
81bf3d9e | 8037 | |
f91abfce | 8038 | |
b7f2fb96 | 8039 | am_cv_lib_iconv_ldpath= |
ba479fd2 NN |
8040 | |
8041 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
f91abfce TT |
8042 | if test "${with_libiconv_prefix+set}" = set; then |
8043 | withval="$with_libiconv_prefix" | |
ba479fd2 | 8044 | |
f91abfce TT |
8045 | for dir in `echo "$withval" | tr : ' '`; do |
8046 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 8047 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 8048 | done |
ba479fd2 NN |
8049 | |
8050 | fi; | |
f91abfce TT |
8051 | |
8052 | ||
ba479fd2 | 8053 | for ac_header in iconv.h |
eb158727 | 8054 | do |
ba479fd2 | 8055 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 8056 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8057 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8058 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8059 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8060 | else |
ca9bc441 | 8061 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8062 | /* confdefs.h. */ |
8063 | _ACEOF | |
8064 | cat confdefs.h >>conftest.$ac_ext | |
8065 | cat >>conftest.$ac_ext <<_ACEOF | |
8066 | /* end confdefs.h. */ | |
8067 | #include <$ac_header> | |
8068 | _ACEOF | |
8069 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8070 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8071 | ac_status=$? | |
8072 | grep -v '^ *+' conftest.er1 >conftest.err | |
8073 | rm -f conftest.er1 | |
8074 | cat conftest.err >&5 | |
8075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8076 | (exit $ac_status); } >/dev/null; then | |
8077 | if test -s conftest.err; then | |
8078 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8079 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8080 | else |
8081 | ac_cpp_err= | |
8082 | fi | |
8083 | else | |
8084 | ac_cpp_err=yes | |
8085 | fi | |
8086 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 8087 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8088 | else |
8089 | echo "$as_me: failed program was:" >&5 | |
8090 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8091 | ||
ca9bc441 | 8092 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8093 | fi |
8094 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8095 | fi |
ba479fd2 NN |
8096 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8097 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8098 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8099 | cat >>confdefs.h <<_ACEOF | |
8100 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8101 | _ACEOF | |
8102 | ||
eb158727 ZW |
8103 | fi |
8104 | done | |
8105 | ||
8106 | ||
ba479fd2 NN |
8107 | echo "$as_me:$LINENO: checking for iconv" >&5 |
8108 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
8109 | if test "${am_cv_func_iconv+set}" = set; then | |
8110 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 8111 | else |
ba479fd2 | 8112 | |
f91abfce TT |
8113 | am_cv_func_iconv="no, consider installing GNU libiconv" |
8114 | am_cv_lib_iconv=no | |
ba479fd2 | 8115 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8116 | /* confdefs.h. */ |
8117 | _ACEOF | |
8118 | cat confdefs.h >>conftest.$ac_ext | |
8119 | cat >>conftest.$ac_ext <<_ACEOF | |
8120 | /* end confdefs.h. */ | |
f91abfce TT |
8121 | #include <stdlib.h> |
8122 | #include <iconv.h> | |
ba479fd2 NN |
8123 | int |
8124 | main () | |
8125 | { | |
f91abfce TT |
8126 | iconv_t cd = iconv_open("",""); |
8127 | iconv(cd,NULL,NULL,NULL,NULL); | |
8128 | iconv_close(cd); | |
ba479fd2 NN |
8129 | ; |
8130 | return 0; | |
8131 | } | |
8132 | _ACEOF | |
8133 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8134 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8135 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8136 | ac_status=$? |
86da66b5 HPN |
8137 | grep -v '^ *+' conftest.er1 >conftest.err |
8138 | rm -f conftest.er1 | |
8139 | cat conftest.err >&5 | |
ba479fd2 NN |
8140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8141 | (exit $ac_status); } && | |
fb38008e | 8142 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8143 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8144 | (eval $ac_try) 2>&5 | |
8145 | ac_status=$? | |
8146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8147 | (exit $ac_status); }; } && | |
8148 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8150 | (eval $ac_try) 2>&5 | |
8151 | ac_status=$? | |
8152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8153 | (exit $ac_status); }; }; then | |
f91abfce TT |
8154 | am_cv_func_iconv=yes |
8155 | else | |
ba479fd2 NN |
8156 | echo "$as_me: failed program was:" >&5 |
8157 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8158 | ||
f91abfce | 8159 | fi |
86da66b5 HPN |
8160 | rm -f conftest.err conftest.$ac_objext \ |
8161 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
8162 | if test "$am_cv_func_iconv" != yes; then |
8163 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 8164 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
ba479fd2 | 8165 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8166 | /* confdefs.h. */ |
8167 | _ACEOF | |
8168 | cat confdefs.h >>conftest.$ac_ext | |
8169 | cat >>conftest.$ac_ext <<_ACEOF | |
8170 | /* end confdefs.h. */ | |
f91abfce TT |
8171 | #include <stdlib.h> |
8172 | #include <iconv.h> | |
ba479fd2 NN |
8173 | int |
8174 | main () | |
8175 | { | |
f91abfce TT |
8176 | iconv_t cd = iconv_open("",""); |
8177 | iconv(cd,NULL,NULL,NULL,NULL); | |
8178 | iconv_close(cd); | |
ba479fd2 NN |
8179 | ; |
8180 | return 0; | |
8181 | } | |
8182 | _ACEOF | |
8183 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8184 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8185 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8186 | ac_status=$? |
86da66b5 HPN |
8187 | grep -v '^ *+' conftest.er1 >conftest.err |
8188 | rm -f conftest.er1 | |
8189 | cat conftest.err >&5 | |
ba479fd2 NN |
8190 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8191 | (exit $ac_status); } && | |
fb38008e | 8192 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8193 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8194 | (eval $ac_try) 2>&5 | |
8195 | ac_status=$? | |
8196 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8197 | (exit $ac_status); }; } && | |
8198 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8199 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8200 | (eval $ac_try) 2>&5 | |
8201 | ac_status=$? | |
8202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8203 | (exit $ac_status); }; }; then | |
f91abfce TT |
8204 | am_cv_lib_iconv=yes |
8205 | am_cv_func_iconv=yes | |
8206 | else | |
ba479fd2 NN |
8207 | echo "$as_me: failed program was:" >&5 |
8208 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8209 | ||
f91abfce | 8210 | fi |
86da66b5 HPN |
8211 | rm -f conftest.err conftest.$ac_objext \ |
8212 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
8213 | LIBS="$am_save_LIBS" |
8214 | fi | |
6e3f3080 | 8215 | |
ba479fd2 NN |
8216 | fi |
8217 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
8218 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 8219 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
8220 | |
8221 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 8222 | #define HAVE_ICONV 1 |
ba479fd2 | 8223 | _ACEOF |
f91abfce | 8224 | |
ba479fd2 NN |
8225 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
8226 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
8227 | if test "${am_cv_proto_iconv+set}" = set; then | |
8228 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 8229 | else |
ba479fd2 NN |
8230 | |
8231 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8232 | /* confdefs.h. */ |
8233 | _ACEOF | |
8234 | cat confdefs.h >>conftest.$ac_ext | |
8235 | cat >>conftest.$ac_ext <<_ACEOF | |
8236 | /* end confdefs.h. */ | |
f91abfce TT |
8237 | |
8238 | #include <stdlib.h> | |
8239 | #include <iconv.h> | |
8240 | extern | |
8241 | #ifdef __cplusplus | |
8242 | "C" | |
8243 | #endif | |
8244 | #if defined(__STDC__) || defined(__cplusplus) | |
8245 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
8246 | #else | |
8247 | size_t iconv(); | |
8248 | #endif | |
8249 | ||
ba479fd2 NN |
8250 | int |
8251 | main () | |
8252 | { | |
f91abfce | 8253 | |
ba479fd2 NN |
8254 | ; |
8255 | return 0; | |
8256 | } | |
8257 | _ACEOF | |
8258 | rm -f conftest.$ac_objext | |
8259 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8260 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8261 | ac_status=$? |
86da66b5 HPN |
8262 | grep -v '^ *+' conftest.er1 >conftest.err |
8263 | rm -f conftest.er1 | |
8264 | cat conftest.err >&5 | |
ba479fd2 NN |
8265 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8266 | (exit $ac_status); } && | |
fb38008e | 8267 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8268 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8269 | (eval $ac_try) 2>&5 | |
8270 | ac_status=$? | |
8271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8272 | (exit $ac_status); }; } && | |
8273 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8274 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8275 | (eval $ac_try) 2>&5 | |
8276 | ac_status=$? | |
8277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8278 | (exit $ac_status); }; }; then | |
f91abfce TT |
8279 | am_cv_proto_iconv_arg1="" |
8280 | else | |
ba479fd2 NN |
8281 | echo "$as_me: failed program was:" >&5 |
8282 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8283 | ||
8284 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 8285 | fi |
86da66b5 | 8286 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
8287 | 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);" |
8288 | fi | |
8289 | ||
8290 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
8291 | echo "$as_me:$LINENO: result: ${ac_t:- |
8292 | }$am_cv_proto_iconv" >&5 | |
8293 | echo "${ECHO_T}${ac_t:- | |
8294 | }$am_cv_proto_iconv" >&6 | |
8295 | ||
8296 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 8297 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 8298 | _ACEOF |
f91abfce TT |
8299 | |
8300 | fi | |
8301 | LIBICONV= | |
8302 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 8303 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 8304 | fi |
ba479fd2 | 8305 | |
f91abfce | 8306 | |
56694dd9 ZW |
8307 | # Until we have in-tree GNU iconv: |
8308 | LIBICONV_DEP= | |
8309 | ||
8310 | ||
8311 | ||
ba479fd2 NN |
8312 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
8313 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
8314 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
8315 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 8316 | else |
ba479fd2 | 8317 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8318 | /* confdefs.h. */ |
8319 | _ACEOF | |
8320 | cat confdefs.h >>conftest.$ac_ext | |
8321 | cat >>conftest.$ac_ext <<_ACEOF | |
8322 | /* end confdefs.h. */ | |
56694dd9 | 8323 | #include <locale.h> |
ba479fd2 NN |
8324 | int |
8325 | main () | |
8326 | { | |
56694dd9 | 8327 | return LC_MESSAGES |
ba479fd2 NN |
8328 | ; |
8329 | return 0; | |
8330 | } | |
8331 | _ACEOF | |
8332 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8333 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8334 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8335 | ac_status=$? |
86da66b5 HPN |
8336 | grep -v '^ *+' conftest.er1 >conftest.err |
8337 | rm -f conftest.er1 | |
8338 | cat conftest.err >&5 | |
ba479fd2 NN |
8339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8340 | (exit $ac_status); } && | |
fb38008e | 8341 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8343 | (eval $ac_try) 2>&5 | |
8344 | ac_status=$? | |
8345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8346 | (exit $ac_status); }; } && | |
8347 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8349 | (eval $ac_try) 2>&5 | |
8350 | ac_status=$? | |
8351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8352 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
8353 | am_cv_val_LC_MESSAGES=yes |
8354 | else | |
ba479fd2 NN |
8355 | echo "$as_me: failed program was:" >&5 |
8356 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8357 | ||
8358 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 8359 | fi |
86da66b5 HPN |
8360 | rm -f conftest.err conftest.$ac_objext \ |
8361 | conftest$ac_exeext conftest.$ac_ext | |
56694dd9 | 8362 | fi |
ba479fd2 NN |
8363 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
8364 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 8365 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
8366 | |
8367 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 8368 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 8369 | _ACEOF |
56694dd9 ZW |
8370 | |
8371 | fi | |
8372 | ||
f91abfce | 8373 | |
86cf1cbd KG |
8374 | # We will need to find libiberty.h and ansidecl.h |
8375 | saved_CFLAGS="$CFLAGS" | |
8376 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
8377 | |
8378 | ||
8379 | ||
8380 | ||
8381 | ||
8382 | ||
8383 | ||
8384 | ||
8385 | ||
8386 | ||
8387 | ||
8388 | ||
8389 | ||
8390 | ||
8391 | ||
8392 | ||
8393 | ||
8394 | ||
8395 | ||
8396 | ||
8397 | ||
6a257778 | 8398 | |
ad6717df PB |
8399 | |
8400 | ||
8e944909 | 8401 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 8402 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 8403 | fprintf_unlocked strstr errno snprintf vasprintf \ |
6a257778 | 8404 | malloc realloc calloc free basename getopt clock getpagesize |
81bf3d9e | 8405 | do |
ad6717df | 8406 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8407 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8408 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8409 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8410 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8411 | else | |
8412 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8413 | /* confdefs.h. */ |
8414 | _ACEOF | |
8415 | cat confdefs.h >>conftest.$ac_ext | |
8416 | cat >>conftest.$ac_ext <<_ACEOF | |
8417 | /* end confdefs.h. */ | |
7afe8c41 KG |
8418 | #undef $ac_tr_decl |
8419 | #define $ac_tr_decl 1 | |
ba479fd2 | 8420 | |
d02af173 | 8421 | #include "ansidecl.h" |
86cf1cbd | 8422 | #include "system.h" |
f31e826b | 8423 | |
ba479fd2 NN |
8424 | int |
8425 | main () | |
8426 | { | |
86cf1cbd KG |
8427 | #ifndef $ac_func |
8428 | char *(*pfn) = (char *(*)) $ac_func ; | |
8429 | #endif | |
ba479fd2 NN |
8430 | ; |
8431 | return 0; | |
8432 | } | |
8433 | _ACEOF | |
8434 | rm -f conftest.$ac_objext | |
8435 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8436 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8437 | ac_status=$? |
86da66b5 HPN |
8438 | grep -v '^ *+' conftest.er1 >conftest.err |
8439 | rm -f conftest.er1 | |
8440 | cat conftest.err >&5 | |
ba479fd2 NN |
8441 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8442 | (exit $ac_status); } && | |
fb38008e | 8443 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8444 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8445 | (eval $ac_try) 2>&5 | |
8446 | ac_status=$? | |
8447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8448 | (exit $ac_status); }; } && | |
8449 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8450 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8451 | (eval $ac_try) 2>&5 | |
8452 | ac_status=$? | |
8453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8454 | (exit $ac_status); }; }; then | |
f31e826b | 8455 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 8456 | else |
ba479fd2 NN |
8457 | echo "$as_me: failed program was:" >&5 |
8458 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8459 | ||
8460 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 8461 | fi |
86da66b5 | 8462 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
8463 | fi |
8464 | ||
f31e826b | 8465 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
8466 | echo "$as_me:$LINENO: result: yes" >&5 |
8467 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 8468 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8469 | _ACEOF |
8470 | ||
81bf3d9e | 8471 | else |
ba479fd2 NN |
8472 | echo "$as_me:$LINENO: result: no" >&5 |
8473 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 8474 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8475 | _ACEOF |
8476 | ||
81bf3d9e RH |
8477 | fi |
8478 | ||
8479 | done | |
ba479fd2 | 8480 | |
ba479fd2 | 8481 | |
ba479fd2 | 8482 | |
81bf3d9e | 8483 | |
81bf3d9e RH |
8484 | |
8485 | for ac_func in getrlimit setrlimit getrusage | |
8486 | do | |
ad6717df | 8487 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8488 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8489 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8490 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8491 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8492 | else | |
8493 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8494 | /* confdefs.h. */ |
8495 | _ACEOF | |
8496 | cat confdefs.h >>conftest.$ac_ext | |
8497 | cat >>conftest.$ac_ext <<_ACEOF | |
8498 | /* end confdefs.h. */ | |
7afe8c41 KG |
8499 | #undef $ac_tr_decl |
8500 | #define $ac_tr_decl 1 | |
ba479fd2 | 8501 | |
d02af173 | 8502 | #include "ansidecl.h" |
86cf1cbd | 8503 | #include "system.h" |
81bf3d9e RH |
8504 | #ifdef HAVE_SYS_RESOURCE_H |
8505 | #include <sys/resource.h> | |
8506 | #endif | |
8507 | ||
f31e826b | 8508 | |
ba479fd2 NN |
8509 | int |
8510 | main () | |
8511 | { | |
86cf1cbd KG |
8512 | #ifndef $ac_func |
8513 | char *(*pfn) = (char *(*)) $ac_func ; | |
8514 | #endif | |
ba479fd2 NN |
8515 | ; |
8516 | return 0; | |
8517 | } | |
8518 | _ACEOF | |
8519 | rm -f conftest.$ac_objext | |
8520 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8521 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8522 | ac_status=$? |
86da66b5 HPN |
8523 | grep -v '^ *+' conftest.er1 >conftest.err |
8524 | rm -f conftest.er1 | |
8525 | cat conftest.err >&5 | |
ba479fd2 NN |
8526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8527 | (exit $ac_status); } && | |
fb38008e | 8528 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8530 | (eval $ac_try) 2>&5 | |
8531 | ac_status=$? | |
8532 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8533 | (exit $ac_status); }; } && | |
8534 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8536 | (eval $ac_try) 2>&5 | |
8537 | ac_status=$? | |
8538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8539 | (exit $ac_status); }; }; then | |
f31e826b | 8540 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 8541 | else |
ba479fd2 NN |
8542 | echo "$as_me: failed program was:" >&5 |
8543 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8544 | ||
8545 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 8546 | fi |
86da66b5 | 8547 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
8548 | fi |
8549 | ||
f31e826b | 8550 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
8551 | echo "$as_me:$LINENO: result: yes" >&5 |
8552 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 8553 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8554 | _ACEOF |
8555 | ||
81bf3d9e | 8556 | else |
ba479fd2 NN |
8557 | echo "$as_me:$LINENO: result: no" >&5 |
8558 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 8559 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8560 | _ACEOF |
8561 | ||
81bf3d9e RH |
8562 | fi |
8563 | ||
8564 | done | |
86cf1cbd | 8565 | |
81bf3d9e | 8566 | |
ba479fd2 | 8567 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8568 | /* confdefs.h. */ |
8569 | _ACEOF | |
8570 | cat confdefs.h >>conftest.$ac_ext | |
8571 | cat >>conftest.$ac_ext <<_ACEOF | |
8572 | /* end confdefs.h. */ | |
b2522d2b HPN |
8573 | |
8574 | #include "ansidecl.h" | |
8575 | #include "system.h" | |
8576 | #ifdef HAVE_SYS_RESOURCE_H | |
8577 | #include <sys/resource.h> | |
8578 | #endif | |
8579 | ||
ba479fd2 NN |
8580 | int |
8581 | main () | |
8582 | { | |
b2522d2b | 8583 | rlim_t l = 0; |
ba479fd2 NN |
8584 | ; |
8585 | return 0; | |
8586 | } | |
8587 | _ACEOF | |
8588 | rm -f conftest.$ac_objext | |
8589 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8590 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8591 | ac_status=$? |
86da66b5 HPN |
8592 | grep -v '^ *+' conftest.er1 >conftest.err |
8593 | rm -f conftest.er1 | |
8594 | cat conftest.err >&5 | |
ba479fd2 NN |
8595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8596 | (exit $ac_status); } && | |
fb38008e | 8597 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8599 | (eval $ac_try) 2>&5 | |
8600 | ac_status=$? | |
8601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8602 | (exit $ac_status); }; } && | |
8603 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8604 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8605 | (eval $ac_try) 2>&5 | |
8606 | ac_status=$? | |
8607 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8608 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
8609 | : |
8610 | else | |
ba479fd2 NN |
8611 | echo "$as_me: failed program was:" >&5 |
8612 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8613 | ||
8614 | ||
8615 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 8616 | #define rlim_t long |
ba479fd2 | 8617 | _ACEOF |
b2522d2b HPN |
8618 | |
8619 | fi | |
86da66b5 | 8620 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 8621 | |
ad6717df | 8622 | |
351df804 | 8623 | for ac_func in ldgetname |
c1800ec8 | 8624 | do |
ad6717df | 8625 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8626 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8627 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8628 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8629 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8630 | else | |
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 | #undef $ac_tr_decl |
8638 | #define $ac_tr_decl 1 | |
ba479fd2 | 8639 | |
351df804 KG |
8640 | #include "ansidecl.h" |
8641 | #include "system.h" | |
8642 | #ifdef HAVE_LDFCN_H | |
8643 | #include <ldfcn.h> | |
8644 | #endif | |
8645 | ||
8646 | ||
ba479fd2 NN |
8647 | int |
8648 | main () | |
8649 | { | |
351df804 KG |
8650 | #ifndef $ac_func |
8651 | char *(*pfn) = (char *(*)) $ac_func ; | |
8652 | #endif | |
ba479fd2 NN |
8653 | ; |
8654 | return 0; | |
8655 | } | |
8656 | _ACEOF | |
8657 | rm -f conftest.$ac_objext | |
8658 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8659 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8660 | ac_status=$? |
86da66b5 HPN |
8661 | grep -v '^ *+' conftest.er1 >conftest.err |
8662 | rm -f conftest.er1 | |
8663 | cat conftest.err >&5 | |
ba479fd2 NN |
8664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8665 | (exit $ac_status); } && | |
fb38008e | 8666 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8667 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8668 | (eval $ac_try) 2>&5 | |
8669 | ac_status=$? | |
8670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8671 | (exit $ac_status); }; } && | |
8672 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8673 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8674 | (eval $ac_try) 2>&5 | |
8675 | ac_status=$? | |
8676 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8677 | (exit $ac_status); }; }; then | |
351df804 KG |
8678 | eval "gcc_cv_have_decl_$ac_func=yes" |
8679 | else | |
ba479fd2 NN |
8680 | echo "$as_me: failed program was:" >&5 |
8681 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8682 | ||
8683 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 8684 | fi |
86da66b5 | 8685 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
8686 | fi |
8687 | ||
8688 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8689 | echo "$as_me:$LINENO: result: yes" >&5 |
8690 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8691 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8692 | _ACEOF |
8693 | ||
351df804 | 8694 | else |
ba479fd2 NN |
8695 | echo "$as_me:$LINENO: result: no" >&5 |
8696 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8697 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8698 | _ACEOF |
8699 | ||
351df804 KG |
8700 | fi |
8701 | ||
8702 | done | |
ba479fd2 | 8703 | |
351df804 KG |
8704 | |
8705 | ||
8706 | for ac_func in times | |
8707 | do | |
ad6717df | 8708 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
8709 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8710 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8711 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8712 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8713 | else | |
8714 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8715 | /* confdefs.h. */ |
8716 | _ACEOF | |
8717 | cat confdefs.h >>conftest.$ac_ext | |
8718 | cat >>conftest.$ac_ext <<_ACEOF | |
8719 | /* end confdefs.h. */ | |
351df804 KG |
8720 | #undef $ac_tr_decl |
8721 | #define $ac_tr_decl 1 | |
ba479fd2 | 8722 | |
c1800ec8 ZW |
8723 | #include "ansidecl.h" |
8724 | #include "system.h" | |
8725 | #ifdef HAVE_SYS_TIMES_H | |
8726 | #include <sys/times.h> | |
8727 | #endif | |
8728 | ||
8729 | ||
ba479fd2 NN |
8730 | int |
8731 | main () | |
8732 | { | |
c1800ec8 ZW |
8733 | #ifndef $ac_func |
8734 | char *(*pfn) = (char *(*)) $ac_func ; | |
8735 | #endif | |
ba479fd2 NN |
8736 | ; |
8737 | return 0; | |
8738 | } | |
8739 | _ACEOF | |
8740 | rm -f conftest.$ac_objext | |
8741 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8742 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8743 | ac_status=$? |
86da66b5 HPN |
8744 | grep -v '^ *+' conftest.er1 >conftest.err |
8745 | rm -f conftest.er1 | |
8746 | cat conftest.err >&5 | |
ba479fd2 NN |
8747 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8748 | (exit $ac_status); } && | |
fb38008e | 8749 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8750 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8751 | (eval $ac_try) 2>&5 | |
8752 | ac_status=$? | |
8753 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8754 | (exit $ac_status); }; } && | |
8755 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8756 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8757 | (eval $ac_try) 2>&5 | |
8758 | ac_status=$? | |
8759 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8760 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8761 | eval "gcc_cv_have_decl_$ac_func=yes" |
8762 | else | |
ba479fd2 NN |
8763 | echo "$as_me: failed program was:" >&5 |
8764 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8765 | ||
8766 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 8767 | fi |
86da66b5 | 8768 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
8769 | fi |
8770 | ||
8771 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8772 | echo "$as_me:$LINENO: result: yes" >&5 |
8773 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8774 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8775 | _ACEOF |
8776 | ||
c1800ec8 | 8777 | else |
ba479fd2 NN |
8778 | echo "$as_me:$LINENO: result: no" >&5 |
8779 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8780 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8781 | _ACEOF |
8782 | ||
c1800ec8 ZW |
8783 | fi |
8784 | ||
8785 | done | |
c1800ec8 ZW |
8786 | |
8787 | ||
8788 | # More time-related stuff. | |
ba479fd2 NN |
8789 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
8790 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
8791 | if test "${ac_cv_struct_tms+set}" = set; then | |
8792 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8793 | else | |
8794 | ||
8795 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8796 | /* confdefs.h. */ |
8797 | _ACEOF | |
8798 | cat confdefs.h >>conftest.$ac_ext | |
8799 | cat >>conftest.$ac_ext <<_ACEOF | |
8800 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8801 | |
8802 | #include "ansidecl.h" | |
8803 | #include "system.h" | |
8804 | #ifdef HAVE_SYS_TIMES_H | |
8805 | #include <sys/times.h> | |
8806 | #endif | |
8807 | ||
ba479fd2 NN |
8808 | int |
8809 | main () | |
8810 | { | |
c1800ec8 | 8811 | struct tms tms; |
ba479fd2 NN |
8812 | ; |
8813 | return 0; | |
8814 | } | |
8815 | _ACEOF | |
8816 | rm -f conftest.$ac_objext | |
8817 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8818 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8819 | ac_status=$? |
86da66b5 HPN |
8820 | grep -v '^ *+' conftest.er1 >conftest.err |
8821 | rm -f conftest.er1 | |
8822 | cat conftest.err >&5 | |
ba479fd2 NN |
8823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8824 | (exit $ac_status); } && | |
fb38008e | 8825 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8826 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8827 | (eval $ac_try) 2>&5 | |
8828 | ac_status=$? | |
8829 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8830 | (exit $ac_status); }; } && | |
8831 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8832 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8833 | (eval $ac_try) 2>&5 | |
8834 | ac_status=$? | |
8835 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8836 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8837 | ac_cv_struct_tms=yes |
8838 | else | |
ba479fd2 NN |
8839 | echo "$as_me: failed program was:" >&5 |
8840 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8841 | ||
8842 | ac_cv_struct_tms=no | |
c1800ec8 | 8843 | fi |
86da66b5 | 8844 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8845 | fi |
ba479fd2 NN |
8846 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
8847 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 8848 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
8849 | |
8850 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8851 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 8852 | _ACEOF |
c1800ec8 ZW |
8853 | |
8854 | fi | |
8855 | ||
8856 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
8857 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
8858 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
8859 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
8860 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
8861 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8862 | else | |
8863 | ||
8864 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8865 | /* confdefs.h. */ |
8866 | _ACEOF | |
8867 | cat confdefs.h >>conftest.$ac_ext | |
8868 | cat >>conftest.$ac_ext <<_ACEOF | |
8869 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8870 | |
8871 | #include "ansidecl.h" | |
8872 | #include "system.h" | |
8873 | ||
ba479fd2 NN |
8874 | int |
8875 | main () | |
8876 | { | |
c1800ec8 | 8877 | clock_t x; |
ba479fd2 NN |
8878 | ; |
8879 | return 0; | |
8880 | } | |
8881 | _ACEOF | |
8882 | rm -f conftest.$ac_objext | |
8883 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8884 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8885 | ac_status=$? |
86da66b5 HPN |
8886 | grep -v '^ *+' conftest.er1 >conftest.err |
8887 | rm -f conftest.er1 | |
8888 | cat conftest.err >&5 | |
ba479fd2 NN |
8889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8890 | (exit $ac_status); } && | |
fb38008e | 8891 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
8892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8893 | (eval $ac_try) 2>&5 | |
8894 | ac_status=$? | |
8895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8896 | (exit $ac_status); }; } && | |
8897 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8899 | (eval $ac_try) 2>&5 | |
8900 | ac_status=$? | |
8901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8902 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8903 | gcc_cv_type_clock_t=yes |
8904 | else | |
ba479fd2 NN |
8905 | echo "$as_me: failed program was:" >&5 |
8906 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8907 | ||
8908 | gcc_cv_type_clock_t=no | |
c1800ec8 | 8909 | fi |
86da66b5 | 8910 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8911 | fi |
ba479fd2 NN |
8912 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
8913 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 8914 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
8915 | |
8916 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8917 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 8918 | _ACEOF |
c1800ec8 ZW |
8919 | |
8920 | fi | |
8921 | ||
eb70d86d AS |
8922 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
8923 | CFLAGS="$saved_CFLAGS" | |
8924 | ||
07cf4226 DM |
8925 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
8926 | if test "${enable_initfini_array+set}" = set; then | |
8927 | enableval="$enable_initfini_array" | |
ba479fd2 | 8928 | |
07cf4226 | 8929 | else |
ba479fd2 NN |
8930 | |
8931 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
8932 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
8933 | if test "${gcc_cv_initfini_array+set}" = set; then | |
8934 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 8935 | else |
eb70d86d | 8936 | if test "$cross_compiling" = yes; then |
918c4fe4 | 8937 | gcc_cv_initfini_array=no |
eb70d86d | 8938 | else |
ba479fd2 | 8939 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8940 | /* confdefs.h. */ |
8941 | _ACEOF | |
8942 | cat confdefs.h >>conftest.$ac_ext | |
8943 | cat >>conftest.$ac_ext <<_ACEOF | |
8944 | /* end confdefs.h. */ | |
eb70d86d | 8945 | |
07cf4226 DM |
8946 | static int x = -1; |
8947 | int main (void) { return x; } | |
8948 | int foo (void) { x = 0; } | |
8949 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
8950 | _ACEOF |
8951 | rm -f conftest$ac_exeext | |
8952 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8953 | (eval $ac_link) 2>&5 | |
8954 | ac_status=$? | |
8955 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8956 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8957 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8958 | (eval $ac_try) 2>&5 | |
8959 | ac_status=$? | |
8960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8961 | (exit $ac_status); }; }; then | |
918c4fe4 | 8962 | gcc_cv_initfini_array=yes |
eb70d86d | 8963 | else |
ba479fd2 NN |
8964 | echo "$as_me: program exited with status $ac_status" >&5 |
8965 | echo "$as_me: failed program was:" >&5 | |
8966 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8967 | ||
8968 | ( exit $ac_status ) | |
8969 | gcc_cv_initfini_array=no | |
eb70d86d | 8970 | fi |
86da66b5 | 8971 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 8972 | fi |
07cf4226 | 8973 | fi |
ba479fd2 NN |
8974 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
8975 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 8976 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 8977 | |
ba479fd2 | 8978 | fi; |
63cf211a | 8979 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
8980 | |
8981 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 8982 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 8983 | _ACEOF |
07cf4226 | 8984 | |
eb70d86d | 8985 | fi |
81bf3d9e | 8986 | |
ba479fd2 NN |
8987 | # mkdir takes a single argument on some systems. |
8988 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
8989 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
8990 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
8991 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 8992 | else |
ba479fd2 | 8993 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8994 | /* confdefs.h. */ |
8995 | _ACEOF | |
8996 | cat confdefs.h >>conftest.$ac_ext | |
8997 | cat >>conftest.$ac_ext <<_ACEOF | |
8998 | /* end confdefs.h. */ | |
75923b2f MK |
8999 | |
9000 | #include <sys/types.h> | |
9001 | #ifdef HAVE_SYS_STAT_H | |
9002 | # include <sys/stat.h> | |
9003 | #endif | |
9004 | #ifdef HAVE_UNISTD_H | |
9005 | # include <unistd.h> | |
9006 | #endif | |
9007 | #ifdef HAVE_DIRECT_H | |
9008 | # include <direct.h> | |
9009 | #endif | |
ba479fd2 NN |
9010 | int |
9011 | main () | |
9012 | { | |
75923b2f | 9013 | mkdir ("foo", 0); |
ba479fd2 NN |
9014 | ; |
9015 | return 0; | |
9016 | } | |
9017 | _ACEOF | |
9018 | rm -f conftest.$ac_objext | |
9019 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9020 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9021 | ac_status=$? |
86da66b5 HPN |
9022 | grep -v '^ *+' conftest.er1 >conftest.err |
9023 | rm -f conftest.er1 | |
9024 | cat conftest.err >&5 | |
ba479fd2 NN |
9025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9026 | (exit $ac_status); } && | |
fb38008e | 9027 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9028 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9029 | (eval $ac_try) 2>&5 | |
9030 | ac_status=$? | |
9031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9032 | (exit $ac_status); }; } && | |
9033 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9034 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9035 | (eval $ac_try) 2>&5 | |
9036 | ac_status=$? | |
9037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9038 | (exit $ac_status); }; }; then | |
75923b2f MK |
9039 | gcc_cv_mkdir_takes_one_arg=no |
9040 | else | |
ba479fd2 NN |
9041 | echo "$as_me: failed program was:" >&5 |
9042 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9043 | ||
9044 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 9045 | fi |
86da66b5 | 9046 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 9047 | fi |
ba479fd2 NN |
9048 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
9049 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 9050 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
9051 | |
9052 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 9053 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 9054 | _ACEOF |
75923b2f MK |
9055 | |
9056 | fi | |
9057 | ||
9058 | ||
861bb6c1 JL |
9059 | # File extensions |
9060 | manext='.1' | |
9061 | objext='.o' | |
9062 | ||
9063 | ||
9064 | ||
4977bab6 ZW |
9065 | # With Setjmp/Longjmp based exception handling. |
9066 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
9067 | if test "${enable_sjlj_exceptions+set}" = set; then | |
9068 | enableval="$enable_sjlj_exceptions" | |
9069 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 9070 | |
ba479fd2 NN |
9071 | cat >>confdefs.h <<_ACEOF |
9072 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
9073 | _ACEOF | |
4977bab6 | 9074 | |
ba479fd2 | 9075 | fi; |
4977bab6 | 9076 | |
c6c51600 | 9077 | if test x$host = x$target; then |
ba479fd2 NN |
9078 | echo "$as_me:$LINENO: checking for main in -lunwind" >&5 |
9079 | echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6 | |
9080 | if test "${ac_cv_lib_unwind_main+set}" = set; then | |
9081 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4977bab6 | 9082 | else |
ba479fd2 | 9083 | ac_check_lib_save_LIBS=$LIBS |
4977bab6 | 9084 | LIBS="-lunwind $LIBS" |
ba479fd2 | 9085 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9086 | /* confdefs.h. */ |
9087 | _ACEOF | |
9088 | cat confdefs.h >>conftest.$ac_ext | |
9089 | cat >>conftest.$ac_ext <<_ACEOF | |
9090 | /* end confdefs.h. */ | |
4977bab6 | 9091 | |
4977bab6 | 9092 | |
ba479fd2 NN |
9093 | int |
9094 | main () | |
9095 | { | |
9096 | main (); | |
9097 | ; | |
9098 | return 0; | |
9099 | } | |
9100 | _ACEOF | |
9101 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9102 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9103 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9104 | ac_status=$? |
86da66b5 HPN |
9105 | grep -v '^ *+' conftest.er1 >conftest.err |
9106 | rm -f conftest.er1 | |
9107 | cat conftest.err >&5 | |
ba479fd2 NN |
9108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9109 | (exit $ac_status); } && | |
fb38008e | 9110 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9111 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9112 | (eval $ac_try) 2>&5 | |
9113 | ac_status=$? | |
9114 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9115 | (exit $ac_status); }; } && | |
9116 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9117 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9118 | (eval $ac_try) 2>&5 | |
9119 | ac_status=$? | |
9120 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9121 | (exit $ac_status); }; }; then | |
9122 | ac_cv_lib_unwind_main=yes | |
9123 | else | |
9124 | echo "$as_me: failed program was:" >&5 | |
9125 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9126 | ||
9127 | ac_cv_lib_unwind_main=no | |
9128 | fi | |
86da66b5 HPN |
9129 | rm -f conftest.err conftest.$ac_objext \ |
9130 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9131 | LIBS=$ac_check_lib_save_LIBS |
9132 | fi | |
9133 | echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5 | |
9134 | echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6 | |
9135 | if test $ac_cv_lib_unwind_main = yes; then | |
4977bab6 ZW |
9136 | use_libunwind_default=yes |
9137 | else | |
ba479fd2 | 9138 | use_libunwind_default=no |
4977bab6 ZW |
9139 | fi |
9140 | ||
c6c51600 AS |
9141 | else |
9142 | use_libunwind_default=no | |
9143 | fi | |
4977bab6 ZW |
9144 | # Use libunwind based exception handling. |
9145 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
9146 | if test "${enable_libunwind_exceptions+set}" = set; then | |
9147 | enableval="$enable_libunwind_exceptions" | |
9148 | use_libunwind_exceptions=$enableval | |
9149 | else | |
9150 | use_libunwind_exceptions=$use_libunwind_default | |
ba479fd2 | 9151 | fi; |
63cf211a | 9152 | if test x"$use_libunwind_exceptions" = xyes; then |
ba479fd2 NN |
9153 | |
9154 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 9155 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
ba479fd2 | 9156 | _ACEOF |
4977bab6 ZW |
9157 | |
9158 | fi | |
9159 | ||
34a86c2b NN |
9160 | # -------------------------------------------------------- |
9161 | # Build, host, and target specific configuration fragments | |
9162 | # -------------------------------------------------------- | |
9163 | ||
5b28c537 NN |
9164 | # Collect build-machine-specific information. |
9165 | . ${srcdir}/config.build | |
9166 | ||
a89ea0df NN |
9167 | # Collect host-machine-specific information. |
9168 | . ${srcdir}/config.host | |
9169 | ||
ef69da62 | 9170 | target_gtfiles= |
a89ea0df NN |
9171 | |
9172 | # Collect target-machine-specific information. | |
8ad9fb33 | 9173 | . ${srcdir}/config.gcc |
861bb6c1 JL |
9174 | |
9175 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 9176 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
9177 | |
9178 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 9179 | if test x"$tm_file" = x |
861bb6c1 JL |
9180 | then tm_file=$cpu_type/$cpu_type.h; fi |
9181 | ||
6b2adea9 | 9182 | if test x"$extra_headers" = x |
861bb6c1 JL |
9183 | then extra_headers=; fi |
9184 | ||
75bffa71 | 9185 | if test x$md_file = x |
e98e406f | 9186 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 9187 | |
75bffa71 | 9188 | if test x$out_file = x |
861bb6c1 JL |
9189 | then out_file=$cpu_type/$cpu_type.c; fi |
9190 | ||
75bffa71 | 9191 | if test x"$tmake_file" = x |
861bb6c1 JL |
9192 | then tmake_file=$cpu_type/t-$cpu_type |
9193 | fi | |
9194 | ||
90e6a802 | 9195 | if test x"$dwarf2" = xyes |
756ee602 | 9196 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
9197 | fi |
9198 | ||
861bb6c1 | 9199 | # Say what files are being used for the output code and MD file. |
11642c3a | 9200 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
9201 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
9202 | ||
11642c3a | 9203 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
9204 | # about them and drop them. |
9205 | ||
11642c3a ZW |
9206 | bx= |
9207 | for x in $build_xm_file; do | |
9208 | if test -f $srcdir/config/$x | |
9209 | then bx="$bx $x" | |
ba479fd2 NN |
9210 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
9211 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
9212 | fi |
9213 | done | |
9214 | build_xm_file="$bx" | |
9215 | ||
9216 | hx= | |
9217 | for x in $host_xm_file; do | |
9218 | if test -f $srcdir/config/$x | |
9219 | then hx="$hx $x" | |
ba479fd2 NN |
9220 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
9221 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
9222 | fi |
9223 | done | |
9224 | host_xm_file="$hx" | |
9225 | ||
9226 | tx= | |
9227 | for x in $xm_file; do | |
9228 | if test -f $srcdir/config/$x | |
9229 | then tx="$tx $x" | |
ba479fd2 NN |
9230 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
9231 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
9232 | fi |
9233 | done | |
9234 | xm_file="$tx" | |
9235 | ||
861bb6c1 JL |
9236 | count=a |
9237 | for f in $tm_file; do | |
9238 | count=${count}x | |
9239 | done | |
75bffa71 | 9240 | if test $count = ax; then |
861bb6c1 JL |
9241 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
9242 | else | |
9243 | echo "Using the following target machine macro files:" | |
9244 | for f in $tm_file; do | |
9245 | echo " $srcdir/config/$f" | |
9246 | done | |
9247 | fi | |
9248 | ||
4977bab6 | 9249 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
9250 | |
9251 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 9252 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 9253 | _ACEOF |
4977bab6 ZW |
9254 | |
9255 | fi | |
9256 | ||
861bb6c1 JL |
9257 | count=a |
9258 | for f in $host_xm_file; do | |
9259 | count=${count}x | |
9260 | done | |
11642c3a ZW |
9261 | if test $count = a; then |
9262 | : | |
9263 | elif test $count = ax; then | |
861bb6c1 JL |
9264 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
9265 | else | |
9266 | echo "Using the following host machine macro files:" | |
9267 | for f in $host_xm_file; do | |
9268 | echo " $srcdir/config/$f" | |
9269 | done | |
9270 | fi | |
476d9098 | 9271 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 9272 | |
75bffa71 | 9273 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
9274 | count=a |
9275 | for f in $build_xm_file; do | |
9276 | count=${count}x | |
9277 | done | |
11642c3a ZW |
9278 | if test $count = a; then |
9279 | : | |
9280 | elif test $count = ax; then | |
861bb6c1 JL |
9281 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
9282 | else | |
9283 | echo "Using the following build machine macro files:" | |
9284 | for f in $build_xm_file; do | |
9285 | echo " $srcdir/config/$f" | |
9286 | done | |
9287 | fi | |
9288 | fi | |
9289 | ||
8bb915b6 NN |
9290 | # --------- |
9291 | # Threading | |
9292 | # --------- | |
9293 | ||
c2e494a8 | 9294 | # Check if a valid thread package |
615be2cf | 9295 | case ${enable_threads} in |
c2e494a8 NN |
9296 | "" | no) |
9297 | # No threads | |
9298 | target_thread_file='single' | |
9299 | ;; | |
9300 | yes) | |
9301 | # default | |
9302 | target_thread_file='single' | |
9303 | ;; | |
769e49eb NN |
9304 | aix | dce | gnat | irix | posix | rtems | \ |
9305 | single | solaris | vxworks | win32 ) | |
615be2cf | 9306 | target_thread_file=${enable_threads} |
c2e494a8 NN |
9307 | ;; |
9308 | *) | |
615be2cf | 9309 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
9310 | exit 1 |
9311 | ;; | |
9312 | esac | |
9313 | ||
9314 | if test x${thread_file} = x; then | |
9315 | # No thread file set by target-specific clauses in config.gcc, | |
9316 | # so use file chosen by default logic above | |
9317 | thread_file=${target_thread_file} | |
861bb6c1 JL |
9318 | fi |
9319 | ||
8bb915b6 NN |
9320 | # Make gthr-default.h if we have a thread file. |
9321 | gthread_flags= | |
9322 | if test $thread_file != single; then | |
9323 | rm -f gthr-default.h | |
9324 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
9325 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
9326 | fi | |
9327 | ||
9328 | ||
9329 | # -------- | |
9330 | # UNSORTED | |
9331 | # -------- | |
9332 | ||
2121a768 JT |
9333 | if test x$enable___cxa_atexit = xyes || \ |
9334 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
354b7da5 DH |
9335 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 |
9336 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 | |
9337 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
9338 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9339 | else | |
9340 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
9341 | /* confdefs.h. */ |
9342 | _ACEOF | |
9343 | cat confdefs.h >>conftest.$ac_ext | |
9344 | cat >>conftest.$ac_ext <<_ACEOF | |
9345 | /* end confdefs.h. */ | |
86da66b5 HPN |
9346 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
9347 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9348 | #define __cxa_atexit innocuous___cxa_atexit | |
9349 | ||
354b7da5 DH |
9350 | /* System header to define __stub macros and hopefully few prototypes, |
9351 | which can conflict with char __cxa_atexit (); below. | |
9352 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9353 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9354 | |
354b7da5 DH |
9355 | #ifdef __STDC__ |
9356 | # include <limits.h> | |
9357 | #else | |
9358 | # include <assert.h> | |
9359 | #endif | |
86da66b5 HPN |
9360 | |
9361 | #undef __cxa_atexit | |
9362 | ||
354b7da5 DH |
9363 | /* Override any gcc2 internal prototype to avoid an error. */ |
9364 | #ifdef __cplusplus | |
9365 | extern "C" | |
9366 | { | |
9367 | #endif | |
9368 | /* We use char because int might match the return type of a gcc2 | |
9369 | builtin and then its argument prototype would still apply. */ | |
9370 | char __cxa_atexit (); | |
9371 | /* The GNU C library defines this for functions which it implements | |
9372 | to always fail with ENOSYS. Some functions are actually named | |
9373 | something starting with __ and the normal name is an alias. */ | |
9374 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
9375 | choke me | |
9376 | #else | |
9377 | char (*f) () = __cxa_atexit; | |
9378 | #endif | |
9379 | #ifdef __cplusplus | |
9380 | } | |
9381 | #endif | |
9382 | ||
9383 | int | |
9384 | main () | |
9385 | { | |
9386 | return f != __cxa_atexit; | |
9387 | ; | |
9388 | return 0; | |
9389 | } | |
9390 | _ACEOF | |
9391 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9392 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9393 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 9394 | ac_status=$? |
86da66b5 HPN |
9395 | grep -v '^ *+' conftest.er1 >conftest.err |
9396 | rm -f conftest.er1 | |
9397 | cat conftest.err >&5 | |
354b7da5 DH |
9398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9399 | (exit $ac_status); } && | |
fb38008e | 9400 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9402 | (eval $ac_try) 2>&5 | |
9403 | ac_status=$? | |
9404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9405 | (exit $ac_status); }; } && | |
9406 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
9407 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9408 | (eval $ac_try) 2>&5 | |
9409 | ac_status=$? | |
9410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9411 | (exit $ac_status); }; }; then | |
9412 | ac_cv_func___cxa_atexit=yes | |
9413 | else | |
9414 | echo "$as_me: failed program was:" >&5 | |
9415 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9416 | ||
9417 | ac_cv_func___cxa_atexit=no | |
9418 | fi | |
86da66b5 HPN |
9419 | rm -f conftest.err conftest.$ac_objext \ |
9420 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
9421 | fi |
9422 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
9423 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
9424 | if test $ac_cv_func___cxa_atexit = yes; then | |
ba479fd2 NN |
9425 | |
9426 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 9427 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 9428 | _ACEOF |
2121a768 | 9429 | |
354b7da5 DH |
9430 | else |
9431 | echo "__cxa_atexit can't be enabled on this target" | |
9432 | fi | |
9433 | ||
2121a768 JT |
9434 | fi |
9435 | ||
a5381466 | 9436 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
9437 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
9438 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
9439 | |
9440 | ||
9441 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 9442 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 9443 | _ACEOF |
a5381466 ZW |
9444 | |
9445 | fi | |
9446 | ||
b7cb92ad | 9447 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 9448 | # the first file included by config.h. |
4977bab6 | 9449 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 9450 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 9451 | # work to find out the build config parameters. |
75bffa71 | 9452 | if test x$host = x$build |
db81d74a | 9453 | then |
eaf4e618 | 9454 | build_auto=auto-host.h |
06f0b04c | 9455 | FORBUILD=.. |
b7cb92ad JL |
9456 | else |
9457 | # We create a subdir, then run autoconf in the subdir. | |
9458 | # To prevent recursion we set host and build for the new | |
9459 | # invocation of configure to the build for this invocation | |
ba479fd2 | 9460 | # of configure. |
b7cb92ad JL |
9461 | tempdir=build.$$ |
9462 | rm -rf $tempdir | |
9463 | mkdir $tempdir | |
9464 | cd $tempdir | |
9465 | case ${srcdir} in | |
255b8a49 | 9466 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
9467 | *) realsrcdir=../${srcdir};; |
9468 | esac | |
d920e825 L |
9469 | saved_CFLAGS="${CFLAGS}" |
9470 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
9471 | ${realsrcdir}/configure \ | |
33e70558 | 9472 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 9473 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 9474 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
9475 | |
9476 | # We just finished tests for the build machine, so rename | |
9477 | # the file auto-build.h in the gcc directory. | |
9478 | mv auto-host.h ../auto-build.h | |
9479 | cd .. | |
9480 | rm -rf $tempdir | |
eaf4e618 | 9481 | build_auto=auto-build.h |
3b1b059c | 9482 | FORBUILD=../${build_subdir} |
db81d74a RH |
9483 | fi |
9484 | ||
06f0b04c | 9485 | |
eaf4e618 | 9486 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
9487 | tm_p_file="${tm_p_file} tm-preds.h" |
9488 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
9489 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 9490 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
9491 | # put this back in temporarily. |
9492 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 9493 | |
34a86c2b NN |
9494 | # -------- |
9495 | # UNSORTED | |
9496 | # -------- | |
9497 | ||
f1943b77 | 9498 | # Get the version trigger filename from the toplevel |
75bffa71 | 9499 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
9500 | gcc_version_trigger=$with_gcc_version_trigger |
9501 | else | |
9502 | gcc_version_trigger=${srcdir}/version.c | |
9503 | fi | |
022dae81 | 9504 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 9505 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 9506 | |
cc1e60ea | 9507 | # Compile in configure arguments. |
8105825d | 9508 | if test -f configargs.h ; then |
cc1e60ea | 9509 | # Being re-configured. |
022dae81 | 9510 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
9511 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
9512 | else | |
9513 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
9514 | fi | |
eeae7b41 DJ |
9515 | |
9516 | # Double all backslashes and backslash all quotes to turn | |
9517 | # gcc_config_arguments into a C string. | |
9518 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
9519 | $gcc_config_arguments | |
9520 | EOF | |
9521 | gcc_config_arguments_str=`cat conftest.out` | |
9522 | rm -f conftest.out | |
9523 | ||
cc1e60ea JM |
9524 | cat > configargs.h <<EOF |
9525 | /* Generated automatically. */ | |
eeae7b41 | 9526 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 9527 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
9528 | |
9529 | static const struct { | |
9530 | const char *name, *value; | |
9531 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
9532 | EOF |
9533 | ||
ab87f8c8 JL |
9534 | # Internationalization |
9535 | PACKAGE=gcc | |
9536 | VERSION="$gcc_version" | |
861bb6c1 | 9537 | |
c2c36d38 MK |
9538 | cat >>confdefs.h <<_ACEOF |
9539 | #define PACKAGE "$PACKAGE" | |
9540 | _ACEOF | |
9541 | ||
9542 | ||
ab87f8c8 JL |
9543 | |
9544 | ||
56694dd9 ZW |
9545 | # If we haven't got the data from the intl directory, |
9546 | # assume NLS is disabled. | |
ba479fd2 NN |
9547 | USE_NLS=no |
9548 | LIBINTL= | |
9549 | LIBINTL_DEP= | |
9550 | INCINTL= | |
9551 | XGETTEXT= | |
9552 | GMSGFMT= | |
9553 | POSUB= | |
56694dd9 ZW |
9554 | if test -f ../intl/config.intl; then |
9555 | . ../intl/config.intl | |
093e61a6 | 9556 | fi |
ba479fd2 NN |
9557 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
9558 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 9559 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
9560 | echo "$as_me:$LINENO: result: no" >&5 |
9561 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 9562 | else |
ba479fd2 NN |
9563 | echo "$as_me:$LINENO: result: yes" >&5 |
9564 | echo "${ECHO_T}yes" >&6 | |
9565 | ||
9566 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 9567 | #define ENABLE_NLS 1 |
ba479fd2 | 9568 | _ACEOF |
56694dd9 | 9569 | |
093e61a6 | 9570 | |
ba479fd2 NN |
9571 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
9572 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 9573 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 9574 | CATALOGS= |
56694dd9 ZW |
9575 | XLINGUAS= |
9576 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
9577 | # If there aren't any .gmo files the shell will give us the | |
9578 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
9579 | # weeded out. | |
9580 | case "$cat" in *\**) | |
9581 | continue;; | |
9582 | esac | |
9583 | # The quadruple backslash is collapsed to a double backslash | |
9584 | # by the backticks, then collapsed again by the double quotes, | |
9585 | # leaving us with one backslash in the sed expression (right | |
9586 | # before the dot that mustn't act as a wildcard). | |
9587 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
9588 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
9589 | # The user is allowed to set LINGUAS to a list of languages to | |
9590 | # install catalogs for. If it's empty that means "all of them." | |
9591 | if test "x$LINGUAS" = x; then | |
9592 | CATALOGS="$CATALOGS $cat" | |
9593 | XLINGUAS="$XLINGUAS $lang" | |
9594 | else | |
9595 | case "$LINGUAS" in *$lang*) | |
9596 | CATALOGS="$CATALOGS $cat" | |
9597 | XLINGUAS="$XLINGUAS $lang" | |
9598 | ;; | |
9599 | esac | |
9600 | fi | |
9601 | done | |
9602 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
9603 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
9604 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 9605 | fi |
861bb6c1 | 9606 | |
56694dd9 ZW |
9607 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
9608 | # -liconv on the link line twice. | |
9609 | case "$LIBINTL" in *$LIBICONV*) | |
9610 | LIBICONV= ;; | |
9611 | esac | |
dc6746e7 | 9612 | |
56694dd9 ZW |
9613 | # Windows32 Registry support for specifying GCC installation paths. |
9614 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
9615 | if test "${enable_win32_registry+set}" = set; then | |
9616 | enableval="$enable_win32_registry" | |
dc6746e7 | 9617 | |
ba479fd2 | 9618 | fi; |
56694dd9 ZW |
9619 | case $host_os in |
9620 | win32 | pe | cygwin* | mingw32* | uwin*) | |
ba479fd2 NN |
9621 | echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 |
9622 | echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 | |
56694dd9 | 9623 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
9624 | |
9625 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 9626 | #define ENABLE_WIN32_REGISTRY 1 |
ba479fd2 NN |
9627 | _ACEOF |
9628 | ||
9629 | echo "$as_me:$LINENO: result: yes" >&5 | |
9630 | echo "${ECHO_T}yes" >&6 | |
9631 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
9632 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 | |
9633 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
9634 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9635 | else | |
9636 | ac_func_search_save_LIBS=$LIBS | |
9637 | ac_cv_search_RegOpenKeyExA=no | |
9638 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9639 | /* confdefs.h. */ |
9640 | _ACEOF | |
9641 | cat confdefs.h >>conftest.$ac_ext | |
9642 | cat >>conftest.$ac_ext <<_ACEOF | |
9643 | /* end confdefs.h. */ | |
861bb6c1 | 9644 | |
ab87f8c8 | 9645 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9646 | #ifdef __cplusplus |
9647 | extern "C" | |
9648 | #endif | |
ab87f8c8 | 9649 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9650 | builtin and then its argument prototype would still apply. */ |
9651 | char RegOpenKeyExA (); | |
9652 | int | |
9653 | main () | |
9654 | { | |
9655 | RegOpenKeyExA (); | |
9656 | ; | |
9657 | return 0; | |
9658 | } | |
9659 | _ACEOF | |
9660 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9661 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9662 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9663 | ac_status=$? |
86da66b5 HPN |
9664 | grep -v '^ *+' conftest.er1 >conftest.err |
9665 | rm -f conftest.er1 | |
9666 | cat conftest.err >&5 | |
ba479fd2 NN |
9667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9668 | (exit $ac_status); } && | |
fb38008e | 9669 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9670 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9671 | (eval $ac_try) 2>&5 | |
9672 | ac_status=$? | |
9673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9674 | (exit $ac_status); }; } && | |
9675 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9676 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9677 | (eval $ac_try) 2>&5 | |
9678 | ac_status=$? | |
9679 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9680 | (exit $ac_status); }; }; then | |
56694dd9 | 9681 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 9682 | else |
ba479fd2 NN |
9683 | echo "$as_me: failed program was:" >&5 |
9684 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9685 | ||
861bb6c1 | 9686 | fi |
86da66b5 HPN |
9687 | rm -f conftest.err conftest.$ac_objext \ |
9688 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9689 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
9690 | for ac_lib in advapi32; do | |
9691 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9692 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9693 | /* confdefs.h. */ |
9694 | _ACEOF | |
9695 | cat confdefs.h >>conftest.$ac_ext | |
9696 | cat >>conftest.$ac_ext <<_ACEOF | |
9697 | /* end confdefs.h. */ | |
9698 | ||
56694dd9 | 9699 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9700 | #ifdef __cplusplus |
9701 | extern "C" | |
9702 | #endif | |
56694dd9 | 9703 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9704 | builtin and then its argument prototype would still apply. */ |
9705 | char RegOpenKeyExA (); | |
9706 | int | |
9707 | main () | |
9708 | { | |
9709 | RegOpenKeyExA (); | |
9710 | ; | |
9711 | return 0; | |
9712 | } | |
9713 | _ACEOF | |
9714 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9715 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9716 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9717 | ac_status=$? |
86da66b5 HPN |
9718 | grep -v '^ *+' conftest.er1 >conftest.err |
9719 | rm -f conftest.er1 | |
9720 | cat conftest.err >&5 | |
ba479fd2 NN |
9721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9722 | (exit $ac_status); } && | |
fb38008e | 9723 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
86da66b5 HPN |
9724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9725 | (eval $ac_try) 2>&5 | |
9726 | ac_status=$? | |
9727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9728 | (exit $ac_status); }; } && | |
9729 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9730 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9731 | (eval $ac_try) 2>&5 | |
9732 | ac_status=$? | |
9733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9734 | (exit $ac_status); }; }; then | |
9735 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 9736 | break |
861bb6c1 | 9737 | else |
ba479fd2 NN |
9738 | echo "$as_me: failed program was:" >&5 |
9739 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9740 | ||
861bb6c1 | 9741 | fi |
86da66b5 HPN |
9742 | rm -f conftest.err conftest.$ac_objext \ |
9743 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9744 | done |
6e3f3080 | 9745 | fi |
ba479fd2 NN |
9746 | LIBS=$ac_func_search_save_LIBS |
9747 | fi | |
9748 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
9749 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
9750 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 9751 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 9752 | |
ab87f8c8 | 9753 | fi |
ba479fd2 | 9754 | |
cafe096b | 9755 | else |
ba479fd2 NN |
9756 | echo "$as_me:$LINENO: result: no" >&5 |
9757 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 9758 | fi |
ab87f8c8 | 9759 | |
56694dd9 ZW |
9760 | # Check if user specified a different registry key. |
9761 | case "x${enable_win32_registry}" in | |
9762 | x | xyes) | |
9763 | # default. | |
9764 | gcc_cv_win32_registry_key="$VERSION" | |
9765 | ;; | |
9766 | xno) | |
9767 | # no registry lookup. | |
9768 | gcc_cv_win32_registry_key='' | |
9769 | ;; | |
9770 | *) | |
9771 | # user-specified key. | |
9772 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
9773 | ;; | |
9774 | esac | |
ab87f8c8 | 9775 | |
56694dd9 | 9776 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
9777 | echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 |
9778 | echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 | |
9779 | ||
9780 | cat >>confdefs.h <<_ACEOF | |
56694dd9 | 9781 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
ba479fd2 | 9782 | _ACEOF |
cafe096b | 9783 | |
ba479fd2 NN |
9784 | echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 |
9785 | echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 | |
093e61a6 | 9786 | fi |
56694dd9 ZW |
9787 | ;; |
9788 | esac | |
ab87f8c8 | 9789 | |
56694dd9 ZW |
9790 | # Get an absolute path to the GCC top-level source directory |
9791 | holddir=`${PWDCMD-pwd}` | |
9792 | cd $srcdir | |
9793 | topdir=`${PWDCMD-pwd}` | |
9794 | cd $holddir | |
ab87f8c8 | 9795 | |
56694dd9 | 9796 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 9797 | xmake_file= |
c406e779 | 9798 | for f in ${host_xmake_file} |
56694dd9 ZW |
9799 | do |
9800 | if test -f ${srcdir}/config/$f | |
9801 | then | |
2ed26f6b | 9802 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
9803 | fi |
9804 | done | |
093e61a6 | 9805 | |
56694dd9 | 9806 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 9807 | tmake_file_= |
c406e779 | 9808 | for f in ${tmake_file} |
56694dd9 ZW |
9809 | do |
9810 | if test -f ${srcdir}/config/$f | |
9811 | then | |
2ed26f6b | 9812 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
9813 | fi |
9814 | done | |
2ed26f6b | 9815 | tmake_file="${tmake_file_}" |
71a94577 | 9816 | |
56694dd9 | 9817 | symbolic_link='ln -s' |
34a86c2b | 9818 | |
ab87f8c8 JL |
9819 | # If the host doesn't support symlinks, modify CC in |
9820 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
9821 | # Otherwise, we can use "CC=$(CC)". | |
9822 | rm -f symtest.tem | |
9823 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
9824 | then | |
9825 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 9826 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 9827 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 9828 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
9829 | else |
9830 | rm -f symtest.tem | |
9831 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
9832 | then | |
9833 | symbolic_link="cp -p" | |
9834 | else | |
9835 | symbolic_link="cp" | |
9836 | fi | |
9837 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 9838 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 9839 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 9840 | 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 |
9841 | fi |
9842 | rm -f symtest.tem | |
9843 | ||
9844 | out_object_file=`basename $out_file .c`.o | |
9845 | ||
9846 | tm_file_list= | |
e22340b0 | 9847 | tm_include_list= |
ab87f8c8 | 9848 | for f in $tm_file; do |
64ccbc99 | 9849 | case $f in |
d02af173 | 9850 | defaults.h ) |
e22340b0 ZW |
9851 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
9852 | tm_include_list="${tm_include_list} $f" | |
9853 | ;; | |
9854 | * ) | |
9855 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
9856 | tm_include_list="${tm_include_list} config/$f" | |
9857 | ;; | |
64ccbc99 | 9858 | esac |
ab87f8c8 JL |
9859 | done |
9860 | ||
11642c3a | 9861 | tm_p_file_list= |
e22340b0 | 9862 | tm_p_include_list= |
11642c3a | 9863 | for f in $tm_p_file; do |
4977bab6 ZW |
9864 | case $f in |
9865 | tm-preds.h ) | |
e22340b0 ZW |
9866 | tm_p_file_list="${tm_p_file_list} $f" |
9867 | tm_p_include_list="${tm_p_include_list} $f" | |
9868 | ;; | |
9869 | * ) | |
9870 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
9871 | tm_p_include_list="${tm_p_include_list} config/$f" | |
9872 | esac | |
9873 | done | |
9874 | ||
9875 | xm_file_list= | |
9876 | xm_include_list= | |
9877 | for f in $xm_file; do | |
9878 | case $f in | |
9879 | ansidecl.h ) | |
9880 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
9881 | xm_include_list="${xm_include_list} $f" | |
9882 | ;; | |
9883 | auto-host.h ) | |
9884 | xm_file_list="${xm_file_list} $f" | |
9885 | xm_include_list="${xm_include_list} $f" | |
9886 | ;; | |
9887 | * ) | |
9888 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
9889 | xm_include_list="${xm_include_list} config/$f" | |
9890 | ;; | |
4977bab6 | 9891 | esac |
11642c3a ZW |
9892 | done |
9893 | ||
ab87f8c8 | 9894 | host_xm_file_list= |
e22340b0 | 9895 | host_xm_include_list= |
ab87f8c8 | 9896 | for f in $host_xm_file; do |
64ccbc99 | 9897 | case $f in |
d02af173 | 9898 | ansidecl.h ) |
e22340b0 ZW |
9899 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
9900 | host_xm_include_list="${host_xm_include_list} $f" | |
9901 | ;; | |
e2500fed | 9902 | auto-host.h ) |
e22340b0 ZW |
9903 | host_xm_file_list="${host_xm_file_list} $f" |
9904 | host_xm_include_list="${host_xm_include_list} $f" | |
9905 | ;; | |
9906 | * ) | |
9907 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
9908 | host_xm_include_list="${host_xm_include_list} config/$f" | |
9909 | ;; | |
64ccbc99 | 9910 | esac |
ab87f8c8 JL |
9911 | done |
9912 | ||
9913 | build_xm_file_list= | |
9914 | for f in $build_xm_file; do | |
64ccbc99 | 9915 | case $f in |
d02af173 | 9916 | ansidecl.h ) |
e22340b0 ZW |
9917 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
9918 | build_xm_include_list="${build_xm_include_list} $f" | |
9919 | ;; | |
e2500fed | 9920 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
9921 | build_xm_file_list="${build_xm_file_list} $f" |
9922 | build_xm_include_list="${build_xm_include_list} $f" | |
9923 | ;; | |
9924 | * ) | |
9925 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
9926 | build_xm_include_list="${build_xm_include_list} config/$f" | |
9927 | ;; | |
64ccbc99 | 9928 | esac |
ab87f8c8 JL |
9929 | done |
9930 | ||
a078a589 ZW |
9931 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
9932 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
9933 | CROSS= |
9934 | ALL=all.internal | |
9935 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9936 | if test x$host != x$target |
9937 | then | |
a078a589 ZW |
9938 | CROSS="-DCROSS_COMPILE" |
9939 | ALL=all.cross | |
9940 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 9941 | case "$host","$target" in |
3a7e8b87 GK |
9942 | # Darwin crosses can use the host system's libraries and headers, |
9943 | # because of the fat library support. Of course, it must be the | |
9944 | # same version of Darwin on both sides. Allow the user to | |
9945 | # just say --target=foo-darwin without a version number to mean | |
9946 | # "the version on this system". | |
9947 | *-*-darwin*,*-*-darwin*) | |
9948 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
9949 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
9950 | if test $hostos = $targetos -o $targetos = darwin ; then | |
9951 | CROSS= | |
9952 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
9953 | with_headers=yes | |
9954 | fi | |
9955 | ;; | |
9956 | ||
343f59d9 AM |
9957 | i?86-*-*,x86_64-*-* \ |
9958 | | powerpc*-*-*,powerpc64*-*-*) | |
9959 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
9960 | esac | |
7a615b25 AO |
9961 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
9962 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
9963 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9964 | fi |
9965 | ||
b39d221a EC |
9966 | # If this is a cross-compiler that does not |
9967 | # have its own set of headers then define | |
9968 | # inhibit_libc | |
9969 | ||
dc06db20 R |
9970 | # If this is using newlib, without having the headers available now, |
9971 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
9972 | # This prevents libgcc2 from containing any code which requires libc |
9973 | # support. | |
b39d221a | 9974 | inhibit_libc= |
dc06db20 R |
9975 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
9976 | test x$with_newlib = xyes ; } && | |
e50084fa | 9977 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 9978 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
9979 | fi |
9980 | ||
9981 | ||
a078a589 ZW |
9982 | # When building gcc with a cross-compiler, we need to adjust things so |
9983 | # that the generator programs are still built with the native compiler. | |
9984 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
9985 | |
9986 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
9987 | CC_FOR_BUILD='$(CC)' |
9988 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 9989 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
9990 | |
9991 | # Possibly disable fixproto, on a per-target basis. | |
9992 | case ${use_fixproto} in | |
9993 | no) | |
9994 | STMP_FIXPROTO= | |
9995 | ;; | |
9996 | yes) | |
9997 | STMP_FIXPROTO=stmp-fixproto | |
9998 | ;; | |
9999 | esac | |
10000 | ||
a078a589 | 10001 | |
83599948 NS |
10002 | # And these apply if build != host, or we are generating coverage data |
10003 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 10004 | then |
b11e4747 | 10005 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 10006 | |
7a615b25 AO |
10007 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
10008 | STMP_FIXINC= | |
10009 | STMP_FIXPROTO= | |
10010 | fi | |
ab87f8c8 JL |
10011 | fi |
10012 | ||
10013 | # Expand extra_headers to include complete path. | |
10014 | # This substitutes for lots of t-* files. | |
10015 | extra_headers_list= | |
b1ef58c8 NN |
10016 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
10017 | for file in ${extra_headers} ; do | |
10018 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
10019 | done | |
ab87f8c8 | 10020 | |
c38f02df ILT |
10021 | # Define collect2 in Makefile. |
10022 | case $host_can_use_collect2 in | |
10023 | no) collect2= ;; | |
10024 | *) collect2='collect2$(exeext)' ;; | |
10025 | esac | |
10026 | ||
10027 | ||
ab87f8c8 | 10028 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
10029 | case $use_collect2 in |
10030 | no) use_collect2= ;; | |
10031 | "") ;; | |
ba479fd2 | 10032 | *) |
34a86c2b NN |
10033 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
10034 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
10035 | case $host_can_use_collect2 in |
10036 | no) | |
10037 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
10038 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
10039 | { (exit 1); exit 1; }; } | |
10040 | ;; | |
10041 | esac | |
34a86c2b NN |
10042 | ;; |
10043 | esac | |
ab87f8c8 | 10044 | |
8bb915b6 NN |
10045 | # --------------------------- |
10046 | # Assembler & linker features | |
10047 | # --------------------------- | |
10048 | ||
d869a8c4 NN |
10049 | # Identify the assembler which will work hand-in-glove with the newly |
10050 | # built GCC, so that we can examine its features. This is the assembler | |
10051 | # which will be driven by the driver program. | |
10052 | # | |
10053 | # If build != host, and we aren't building gas in-tree, we identify a | |
10054 | # build->target assembler and hope that it will have the same features | |
10055 | # as the host->target assembler we'll be using. | |
ba479fd2 NN |
10056 | echo "$as_me:$LINENO: checking what assembler to use" >&5 |
10057 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b | 10058 | in_tree_gas=no |
ab87f8c8 | 10059 | gcc_cv_as= |
981d4858 JM |
10060 | gcc_cv_gas_major_version= |
10061 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
10062 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
10063 | if test -x "$DEFAULT_ASSEMBLER"; then | |
10064 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
ab87f8c8 JL |
10065 | elif test -x as$host_exeext; then |
10066 | # Build using assembler in the current directory. | |
10067 | gcc_cv_as=./as$host_exeext | |
34a86c2b | 10068 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
10069 | && test -f ../gas/Makefile \ |
10070 | && test x$build = x$host; then | |
10071 | # Single tree build which includes gas. We want to prefer it | |
10072 | # over whatever linker top-level may have detected, since | |
10073 | # we'll use what we're building after installation anyway. | |
ad9c4d9f NN |
10074 | in_tree_gas=yes |
10075 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
10076 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
10077 | $gcc_cv_as_gas_srcdir/configure \ | |
10078 | $gcc_cv_as_gas_srcdir/configure.in \ | |
10079 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
10080 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
10081 | if test x$gcc_cv_gas_version != x; then | |
10082 | break | |
10083 | fi | |
10084 | done | |
10085 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
10086 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
10087 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
10088 | case $gcc_cv_gas_patch_version in |
10089 | "") gcc_cv_gas_patch_version="0" ;; | |
10090 | esac | |
8ada417f ZW |
10091 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
10092 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
10093 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 10094 | |
f9c1196a ZW |
10095 | rm -f as$host_exeext |
10096 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
5408ac6c HPN |
10097 | in_tree_gas_is_elf=no |
10098 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
10099 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
10100 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
10101 | then | |
10102 | in_tree_gas_is_elf=yes | |
10103 | fi | |
08d105fa AO |
10104 | elif test -x "$AS_FOR_TARGET"; then |
10105 | gcc_cv_as="$AS_FOR_TARGET" | |
10106 | elif test -x "$AS" && test x$host = x$target; then | |
10107 | gcc_cv_as="$AS" | |
981d4858 | 10108 | fi |
9e423e6d | 10109 | |
534d0cc0 | 10110 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
10111 | # Search the same directories that the installed compiler will |
10112 | # search. Else we may find the wrong assembler and lose. If we | |
10113 | # do not find a suitable assembler binary, then try the user's | |
10114 | # path. | |
10115 | # | |
10116 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
10117 | # user's path. Unfortunately, there is no good way to get at the | |
10118 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
10119 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
10120 | # to be fixed as part of the make/configure rewrite too. | |
10121 | ||
10122 | if test "x$exec_prefix" = xNONE; then | |
10123 | if test "x$prefix" = xNONE; then | |
10124 | test_prefix=/usr/local | |
10125 | else | |
10126 | test_prefix=$prefix | |
10127 | fi | |
10128 | else | |
10129 | test_prefix=$exec_prefix | |
10130 | fi | |
10131 | ||
10132 | # If the loop below does not find an assembler, then use whatever | |
10133 | # one we can find in the users's path. | |
10134 | # user's path. | |
55a2ea2a AM |
10135 | if test "x$program_prefix" != xNONE; then |
10136 | gcc_cv_as=${program_prefix}as$host_exeext | |
10137 | else | |
9c56033f | 10138 | gcc_cv_as=`echo as | sed "${program_transform_name}"`$host_exeext |
55a2ea2a AM |
10139 | fi |
10140 | ||
19baba0b RO |
10141 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ |
10142 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
caa55b1e NN |
10143 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ |
10144 | /usr/lib/gcc/$target_noncanonical \ | |
10145 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
10146 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
10147 | |
10148 | if test x$host = x$target; then | |
10149 | test_dirs="$test_dirs \ | |
779243f7 JL |
10150 | /usr/libexec \ |
10151 | /usr/ccs/gcc \ | |
10152 | /usr/ccs/bin \ | |
10153 | /udk/usr/ccs/bin \ | |
10154 | /bsd43/usr/lib/cmplrs/cc \ | |
10155 | /usr/cross64/usr/bin \ | |
10156 | /usr/lib/cmplrs/cc \ | |
10157 | /sysv/usr/lib/cmplrs/cc \ | |
10158 | /svr4/usr/lib/cmplrs/cc \ | |
10159 | /usr/bin" | |
55a2ea2a | 10160 | fi |
779243f7 JL |
10161 | |
10162 | for dir in $test_dirs; do | |
55a2ea2a | 10163 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
10164 | gcc_cv_as=$dir/as$host_exeext |
10165 | break; | |
10166 | fi | |
10167 | done | |
9e423e6d | 10168 | fi |
34a86c2b NN |
10169 | case $in_tree_gas in |
10170 | yes) | |
ba479fd2 NN |
10171 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
10172 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
10173 | ;; |
10174 | no) | |
ba479fd2 NN |
10175 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
10176 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
10177 | ;; |
10178 | esac | |
981d4858 | 10179 | |
d869a8c4 NN |
10180 | # Identify the linker which will work hand-in-glove with the newly |
10181 | # built GCC, so that we can examine its features. This is the linker | |
10182 | # which will be driven by the driver program. | |
10183 | # | |
10184 | # If build != host, and we aren't building gas in-tree, we identify a | |
10185 | # build->target linker and hope that it will have the same features | |
10186 | # as the host->target linker we'll be using. | |
ba479fd2 NN |
10187 | echo "$as_me:$LINENO: checking what linker to use" >&5 |
10188 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b | 10189 | in_tree_ld=no |
275b60d6 JJ |
10190 | gcc_cv_ld= |
10191 | gcc_cv_gld_major_version= | |
10192 | gcc_cv_gld_minor_version= | |
10193 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
10194 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
10195 | if test -x "$DEFAULT_LINKER"; then | |
10196 | gcc_cv_ld="$DEFAULT_LINKER" | |
f9c1196a | 10197 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 10198 | # Build using linker in the current directory. |
f9c1196a | 10199 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b | 10200 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
08d105fa AO |
10201 | && test -f ../ld/Makefile \ |
10202 | && test x$build = x$host; then | |
10203 | # Single tree build which includes ld. We want to prefer it | |
10204 | # over whatever linker top-level may have detected, since | |
10205 | # we'll use what we're building after installation anyway. | |
34a86c2b | 10206 | in_tree_ld=yes |
5408ac6c HPN |
10207 | in_tree_ld_is_elf=no |
10208 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
10209 | || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then | |
10210 | in_tree_ld_is_elf=yes | |
10211 | fi | |
275b60d6 JJ |
10212 | 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 |
10213 | do | |
10214 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
10215 | if test x$gcc_cv_gld_version != x; then | |
10216 | break | |
10217 | fi | |
10218 | done | |
10219 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
10220 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
10221 | rm -f collect-ld$host_exeext |
10222 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
10223 | 2>/dev/null | |
08d105fa AO |
10224 | elif test -x "$LD_FOR_TARGET"; then |
10225 | gcc_cv_ld="$LD_FOR_TARGET" | |
10226 | elif test -x "$LD" && test x$host = x$target; then | |
10227 | gcc_cv_ld="$LD" | |
275b60d6 JJ |
10228 | fi |
10229 | ||
534d0cc0 | 10230 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
10231 | # Search the same directories that the installed compiler will |
10232 | # search. Else we may find the wrong linker and lose. If we | |
10233 | # do not find a suitable linker binary, then try the user's | |
10234 | # path. | |
10235 | # | |
10236 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
10237 | # user's path. Unfortunately, there is no good way to get at the | |
10238 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
10239 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
10240 | # to be fixed as part of the make/configure rewrite too. | |
10241 | ||
10242 | if test "x$exec_prefix" = xNONE; then | |
10243 | if test "x$prefix" = xNONE; then | |
10244 | test_prefix=/usr/local | |
10245 | else | |
10246 | test_prefix=$prefix | |
10247 | fi | |
10248 | else | |
10249 | test_prefix=$exec_prefix | |
10250 | fi | |
10251 | ||
10252 | # If the loop below does not find an linker, then use whatever | |
10253 | # one we can find in the users's path. | |
10254 | # user's path. | |
55a2ea2a AM |
10255 | if test "x$program_prefix" != xNONE; then |
10256 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
10257 | else | |
9c56033f | 10258 | gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$host_exeext |
55a2ea2a AM |
10259 | fi |
10260 | ||
19baba0b RO |
10261 | test_dirs="$test_prefix/libexec/gcc/$target_noncanonical/$gcc_version \ |
10262 | $test_prefix/libexec/gcc/$target_noncanonical \ | |
caa55b1e NN |
10263 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ |
10264 | /usr/lib/gcc/$target_noncanonical \ | |
10265 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
10266 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
10267 | |
10268 | if test x$host = x$target; then | |
10269 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
10270 | /usr/libexec \ |
10271 | /usr/ccs/gcc \ | |
10272 | /usr/ccs/bin \ | |
10273 | /udk/usr/ccs/bin \ | |
10274 | /bsd43/usr/lib/cmplrs/cc \ | |
10275 | /usr/cross64/usr/bin \ | |
10276 | /usr/lib/cmplrs/cc \ | |
10277 | /sysv/usr/lib/cmplrs/cc \ | |
10278 | /svr4/usr/lib/cmplrs/cc \ | |
10279 | /usr/bin" | |
55a2ea2a | 10280 | fi |
275b60d6 JJ |
10281 | |
10282 | for dir in $test_dirs; do | |
55a2ea2a | 10283 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
10284 | gcc_cv_ld=$dir/ld$host_exeext |
10285 | break; | |
10286 | fi | |
10287 | done | |
10288 | fi | |
34a86c2b NN |
10289 | case $in_tree_ld in |
10290 | yes) | |
ba479fd2 NN |
10291 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
10292 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
10293 | ;; |
10294 | no) | |
ba479fd2 NN |
10295 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
10296 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
10297 | ;; |
10298 | esac | |
275b60d6 | 10299 | |
981d4858 | 10300 | # Figure out what nm we will be using. |
f9c1196a | 10301 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
ba479fd2 NN |
10302 | echo "$as_me:$LINENO: checking what nm to use" >&5 |
10303 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 10304 | in_tree_nm=no |
981d4858 JM |
10305 | if test -x nm$host_exeext; then |
10306 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
10307 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
10308 | && test -f ../binutils/Makefile; then | |
10309 | # Single tree build which includes binutils. | |
10310 | in_tree_nm=yes | |
10311 | gcc_cv_nm=./nm$host_exeext | |
10312 | rm -f nm$host_exeext | |
10313 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
10314 | elif test "x$program_prefix" != xNONE; then |
10315 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
10316 | else | |
9c56033f | 10317 | gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$host_exeext |
981d4858 | 10318 | fi |
f9c1196a | 10319 | case $in_tree_nm in |
ba479fd2 NN |
10320 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
10321 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
10322 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
10323 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 10324 | esac |
981d4858 | 10325 | |
3cae5780 | 10326 | # Figure out what objdump we will be using. |
ba479fd2 NN |
10327 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
10328 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 10329 | in_tree_objdump=no |
3cae5780 AS |
10330 | if test -x objdump$host_exeext; then |
10331 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
10332 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
10333 | && test -f ../binutils/Makefile; then | |
10334 | # Single tree build which includes binutils. | |
10335 | in_tree_objdump=yes | |
10336 | gcc_cv_objdump=./objdump$host_exeext | |
10337 | rm -f objdump$host_exeext | |
10338 | $symbolic_link ../binutils/objdump$host_exeext \ | |
10339 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
10340 | elif test "x$program_prefix" != xNONE; then |
10341 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
10342 | else | |
f9c1196a | 10343 | gcc_cv_objdump=`echo objdump | \ |
9c56033f | 10344 | sed "${program_transform_name}"`$host_exeext |
3cae5780 | 10345 | fi |
f9c1196a | 10346 | case $in_tree_objdump in |
ba479fd2 NN |
10347 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
10348 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
10349 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
10350 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 10351 | esac |
3cae5780 | 10352 | |
981d4858 | 10353 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
10354 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
10355 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
10356 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
10357 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10358 | else |
10359 | gcc_cv_as_balign_and_p2align=no | |
10360 | if test $in_tree_gas = yes; then | |
10361 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
10362 | then gcc_cv_as_balign_and_p2align=yes | |
10363 | fi | |
10364 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10365 | echo '.balign 4 |
8ada417f | 10366 | .p2align 2' > conftest.s |
ba479fd2 NN |
10367 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10368 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10369 | (eval $ac_try) 2>&5 | |
10370 | ac_status=$? | |
10371 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10372 | (exit $ac_status); }; } | |
8ada417f ZW |
10373 | then |
10374 | gcc_cv_as_balign_and_p2align=yes | |
10375 | else | |
10376 | echo "configure: failed program was" >&5 | |
10377 | cat conftest.s >&5 | |
10378 | fi | |
10379 | rm -f conftest.o conftest.s | |
10380 | fi | |
10381 | fi | |
ba479fd2 NN |
10382 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
10383 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 10384 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
10385 | |
10386 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10387 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 10388 | _ACEOF |
981d4858 | 10389 | |
ad9c4d9f NN |
10390 | fi |
10391 | ||
ba479fd2 NN |
10392 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
10393 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
10394 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
10395 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10396 | else |
10397 | gcc_cv_as_max_skip_p2align=no | |
10398 | if test $in_tree_gas = yes; then | |
10399 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
10400 | then gcc_cv_as_max_skip_p2align=yes | |
10401 | fi | |
10402 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10403 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
10404 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10405 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10406 | (eval $ac_try) 2>&5 | |
10407 | ac_status=$? | |
10408 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10409 | (exit $ac_status); }; } | |
8ada417f ZW |
10410 | then |
10411 | gcc_cv_as_max_skip_p2align=yes | |
10412 | else | |
10413 | echo "configure: failed program was" >&5 | |
10414 | cat conftest.s >&5 | |
10415 | fi | |
10416 | rm -f conftest.o conftest.s | |
10417 | fi | |
ad9c4d9f | 10418 | fi |
ba479fd2 NN |
10419 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
10420 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 10421 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
10422 | |
10423 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 10424 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 10425 | _ACEOF |
9e423e6d | 10426 | |
9e423e6d | 10427 | fi |
ad9c4d9f | 10428 | |
ba479fd2 NN |
10429 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
10430 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
10431 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
10432 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10433 | else |
10434 | gcc_cv_as_subsection_m1=no | |
10435 | if test $in_tree_gas = yes; then | |
10436 | if test $in_tree_gas_is_elf = yes \ | |
10437 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
10438 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 10439 | fi |
8ada417f | 10440 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10441 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
10442 | .subsection -1 |
10443 | conftest_label2: .word 0 | |
8ada417f | 10444 | .previous' > conftest.s |
ba479fd2 NN |
10445 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10447 | (eval $ac_try) 2>&5 | |
10448 | ac_status=$? | |
10449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10450 | (exit $ac_status); }; } | |
8ada417f ZW |
10451 | then |
10452 | if test x$gcc_cv_nm != x; then | |
10453 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
10454 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
10455 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
10456 | then : | |
10457 | else gcc_cv_as_subsection_m1=yes | |
10458 | fi | |
10459 | rm -f conftest.nm1 conftest.nm2 | |
10460 | fi | |
10461 | else | |
10462 | echo "configure: failed program was" >&5 | |
10463 | cat conftest.s >&5 | |
10464 | fi | |
10465 | rm -f conftest.o conftest.s | |
10466 | fi | |
981d4858 | 10467 | fi |
ba479fd2 NN |
10468 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
10469 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 10470 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
10471 | |
10472 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10473 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 10474 | _ACEOF |
981d4858 | 10475 | |
d1accaa3 | 10476 | fi |
ad9c4d9f | 10477 | |
ba479fd2 NN |
10478 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
10479 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
10480 | if test "${gcc_cv_as_weak+set}" = set; then | |
10481 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10482 | else |
10483 | gcc_cv_as_weak=no | |
10484 | if test $in_tree_gas = yes; then | |
10485 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
10486 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 10487 | fi |
8ada417f | 10488 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10489 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
10490 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10492 | (eval $ac_try) 2>&5 | |
10493 | ac_status=$? | |
10494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10495 | (exit $ac_status); }; } | |
8ada417f ZW |
10496 | then |
10497 | gcc_cv_as_weak=yes | |
10498 | else | |
10499 | echo "configure: failed program was" >&5 | |
10500 | cat conftest.s >&5 | |
10501 | fi | |
10502 | rm -f conftest.o conftest.s | |
10503 | fi | |
981d4858 | 10504 | fi |
ba479fd2 NN |
10505 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
10506 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 10507 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
10508 | |
10509 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 10510 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 10511 | _ACEOF |
981d4858 | 10512 | |
12822146 | 10513 | fi |
ad9c4d9f | 10514 | |
8ada417f ZW |
10515 | # .hidden needs to be supported in both the assembler and the linker, |
10516 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
10517 | # This is irritatingly difficult to feature test for; we have to check the | |
10518 | # date string after the version number. If we've got an in-tree | |
10519 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
10520 | # to be safe. | |
10521 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
10522 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
10523 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
10524 | if test "${gcc_cv_as_hidden+set}" = set; then | |
10525 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10526 | else |
10527 | gcc_cv_as_hidden=no | |
10528 | if test $in_tree_gas = yes; then | |
10529 | if test $in_tree_gas_is_elf = yes \ | |
10530 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
10531 | then gcc_cv_as_hidden=yes | |
10532 | fi | |
10533 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10534 | echo ' .hidden foobar |
8ada417f | 10535 | foobar:' > conftest.s |
ba479fd2 NN |
10536 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10538 | (eval $ac_try) 2>&5 | |
10539 | ac_status=$? | |
10540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10541 | (exit $ac_status); }; } | |
8ada417f ZW |
10542 | then |
10543 | gcc_cv_as_hidden=yes | |
10544 | else | |
10545 | echo "configure: failed program was" >&5 | |
10546 | cat conftest.s >&5 | |
10547 | fi | |
10548 | rm -f conftest.o conftest.s | |
10549 | fi | |
10550 | fi | |
ba479fd2 NN |
10551 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
10552 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 10553 | |
ad9c4d9f | 10554 | |
ba479fd2 NN |
10555 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
10556 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
10557 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
10558 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10559 | else |
10560 | if test $in_tree_ld = yes ; then | |
10561 | gcc_cv_ld_hidden=no | |
10562 | 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 \ | |
10563 | && test $in_tree_ld_is_elf = yes; then | |
10564 | gcc_cv_ld_hidden=yes | |
10565 | fi | |
10566 | else | |
10567 | gcc_cv_ld_hidden=yes | |
bace148a | 10568 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
10569 | if echo "$ld_ver" | grep GNU > /dev/null; then |
10570 | ld_vers=`echo $ld_ver | sed -n \ | |
10571 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10572 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10573 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
10574 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
10575 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
10576 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
10577 | 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'` | |
10578 | if test 0"$ld_date" -lt 20020404; then | |
10579 | if test -n "$ld_date"; then | |
10580 | # If there was date string, but was earlier than 2002-04-04, fail | |
10581 | gcc_cv_ld_hidden=no | |
10582 | elif test -z "$ld_vers"; then | |
10583 | # If there was no date string nor ld version number, something is wrong | |
10584 | gcc_cv_ld_hidden=no | |
10585 | else | |
10586 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
10587 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
10588 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
10589 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
10590 | if test "$ld_vers_major" -lt 2; then | |
10591 | gcc_cv_ld_hidden=no | |
10592 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
10593 | gcc_cv_ld_hidden="no" | |
10594 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
10595 | gcc_cv_ld_hidden=no | |
c72931a6 | 10596 | fi |
8ada417f | 10597 | fi |
789b7de5 | 10598 | fi |
8ada417f | 10599 | else |
28690784 | 10600 | case "${target}" in |
b0fd7d27 | 10601 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
10602 | gcc_cv_ld_hidden=yes |
10603 | ;; | |
10604 | *) | |
10605 | gcc_cv_ld_hidden=no | |
10606 | ;; | |
10607 | esac | |
8ada417f ZW |
10608 | fi |
10609 | fi | |
6d07784a | 10610 | fi |
ba479fd2 NN |
10611 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
10612 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 10613 | libgcc_visibility=no |
ad9c4d9f | 10614 | |
8e3940b2 | 10615 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 10616 | libgcc_visibility=yes |
ba479fd2 NN |
10617 | |
10618 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10619 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 10620 | _ACEOF |
ad9c4d9f NN |
10621 | |
10622 | fi | |
10623 | ||
8ada417f | 10624 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
10625 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
10626 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
10627 | if test "${gcc_cv_as_leb128+set}" = set; then | |
10628 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10629 | else |
10630 | gcc_cv_as_leb128=no | |
10631 | if test $in_tree_gas = yes; then | |
10632 | if test $in_tree_gas_is_elf = yes \ | |
10633 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
10634 | then gcc_cv_as_leb128=yes | |
10635 | fi | |
10636 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10637 | echo ' .data |
b7460f24 RH |
10638 | .uleb128 L2 - L1 |
10639 | L1: | |
10640 | .uleb128 1280 | |
10641 | .sleb128 -1010 | |
8ada417f | 10642 | L2:' > conftest.s |
ba479fd2 NN |
10643 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10644 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10645 | (eval $ac_try) 2>&5 | |
10646 | ac_status=$? | |
10647 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10648 | (exit $ac_status); }; } | |
8ada417f ZW |
10649 | then |
10650 | # GAS versions before 2.11 do not support uleb128, | |
10651 | # despite appearing to. | |
10652 | # ??? There exists an elf-specific test that will crash | |
10653 | # the assembler. Perhaps it's better to figure out whether | |
10654 | # arbitrary sections are supported and try the test. | |
bace148a | 10655 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
10656 | if echo "$as_ver" | grep GNU > /dev/null; then |
10657 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
10658 | as_major=`echo $as_ver | sed 's/\..*//'` | |
10659 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
10660 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
10661 | then : | |
10662 | else gcc_cv_as_leb128=yes | |
10663 | fi | |
10664 | fi | |
10665 | else | |
10666 | echo "configure: failed program was" >&5 | |
10667 | cat conftest.s >&5 | |
10668 | fi | |
10669 | rm -f conftest.o conftest.s | |
10670 | fi | |
b7460f24 | 10671 | fi |
ba479fd2 NN |
10672 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
10673 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 10674 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
10675 | |
10676 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 10677 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 10678 | _ACEOF |
b7460f24 RH |
10679 | |
10680 | fi | |
ad9c4d9f | 10681 | |
8ada417f ZW |
10682 | # GAS versions up to and including 2.11.0 may mis-optimize |
10683 | # .eh_frame data. | |
ba479fd2 NN |
10684 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
10685 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
10686 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
10687 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10688 | else |
10689 | gcc_cv_as_eh_frame=no | |
10690 | if test $in_tree_gas = yes; then | |
10691 | if test $in_tree_gas_is_elf = yes \ | |
10692 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10693 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 10694 | fi |
8ada417f | 10695 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10696 | echo ' .text |
c64688ae RH |
10697 | .LFB1: |
10698 | .4byte 0 | |
10699 | .L1: | |
10700 | .4byte 0 | |
10701 | .LFE1: | |
10702 | .section .eh_frame,"aw",@progbits | |
10703 | __FRAME_BEGIN__: | |
10704 | .4byte .LECIE1-.LSCIE1 | |
10705 | .LSCIE1: | |
10706 | .4byte 0x0 | |
10707 | .byte 0x1 | |
10708 | .ascii "z\0" | |
10709 | .byte 0x1 | |
10710 | .byte 0x78 | |
10711 | .byte 0x1a | |
10712 | .byte 0x0 | |
10713 | .byte 0x4 | |
10714 | .4byte 1 | |
10715 | .p2align 1 | |
10716 | .LECIE1: | |
10717 | .LSFDE1: | |
10718 | .4byte .LEFDE1-.LASFDE1 | |
10719 | .LASFDE1: | |
10720 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
10721 | .4byte .LFB1 | |
10722 | .4byte .LFE1-.LFB1 | |
10723 | .byte 0x4 | |
10724 | .4byte .LFE1-.LFB1 | |
10725 | .byte 0x4 | |
10726 | .4byte .L1-.LFB1 | |
8ada417f | 10727 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
10728 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10729 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10730 | (eval $ac_try) 2>&5 | |
10731 | ac_status=$? | |
10732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10733 | (exit $ac_status); }; } | |
8ada417f ZW |
10734 | then |
10735 | cat > conftest.lit <<EOF | |
c64688ae RH |
10736 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
10737 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 10738 | 0020 08000000 04080000 0044 .........D |
01efb963 | 10739 | EOF |
ba479fd2 | 10740 | cat > conftest.big <<EOF |
01efb963 AS |
10741 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
10742 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 10743 | 0020 00000008 04000000 0844 .........D |
c64688ae | 10744 | EOF |
8ada417f ZW |
10745 | # If the assembler didn't choke, and we can objdump, |
10746 | # and we got the correct data, then succeed. | |
10747 | if test x$gcc_cv_objdump != x \ | |
10748 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
10749 | | tail -3 > conftest.got \ | |
10750 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
10751 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
10752 | then | |
10753 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
10754 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
10755 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10756 | (eval $ac_try) 2>&5 | |
10757 | ac_status=$? | |
10758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10759 | (exit $ac_status); }; }; then | |
8ada417f ZW |
10760 | gcc_cv_as_eh_frame=buggy |
10761 | else | |
10762 | # Uh oh, what do we do now? | |
10763 | gcc_cv_as_eh_frame=no | |
10764 | fi | |
10765 | else | |
10766 | echo "configure: failed program was" >&5 | |
10767 | cat conftest.s >&5 | |
10768 | fi | |
10769 | rm -f conftest.o conftest.s | |
10770 | fi | |
c64688ae | 10771 | fi |
ba479fd2 NN |
10772 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
10773 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 10774 | |
6e3f3080 | 10775 | |
63cf211a | 10776 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
10777 | |
10778 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10779 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 10780 | _ACEOF |
ad9c4d9f NN |
10781 | |
10782 | fi | |
10783 | ||
ba479fd2 NN |
10784 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
10785 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
10786 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
10787 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10788 | else |
10789 | gcc_cv_as_shf_merge=no | |
10790 | if test $in_tree_gas = yes; then | |
10791 | if test $in_tree_gas_is_elf = yes \ | |
10792 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10793 | then gcc_cv_as_shf_merge=yes | |
10794 | fi | |
10795 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10796 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
10797 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
10798 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10799 | (eval $ac_try) 2>&5 | |
10800 | ac_status=$? | |
10801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10802 | (exit $ac_status); }; } | |
8ada417f ZW |
10803 | then |
10804 | gcc_cv_as_shf_merge=yes | |
10805 | else | |
10806 | echo "configure: failed program was" >&5 | |
10807 | cat conftest.s >&5 | |
10808 | fi | |
10809 | rm -f conftest.o conftest.s | |
10810 | fi | |
201556f0 | 10811 | fi |
ba479fd2 NN |
10812 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
10813 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 10814 | |
8ad9fb33 | 10815 | |
ba479fd2 | 10816 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 10817 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 10818 | _ACEOF |
201556f0 | 10819 | |
201556f0 | 10820 | |
8ada417f | 10821 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
10822 | conftest_s= |
10823 | tls_first_major= | |
10824 | tls_first_minor= | |
9739c90c | 10825 | tls_as_opt= |
f996902d | 10826 | case "$target" in |
6f9b006d RH |
10827 | alpha*-*-*) |
10828 | conftest_s=' | |
10829 | .section ".tdata","awT",@progbits | |
10830 | foo: .long 25 | |
10831 | .text | |
10832 | ldq $27,__tls_get_addr($29) !literal!1 | |
10833 | lda $16,foo($29) !tlsgd!1 | |
10834 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
10835 | ldq $27,__tls_get_addr($29) !literal!2 | |
10836 | lda $16,foo($29) !tlsldm!2 | |
10837 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
10838 | ldq $1,foo($29) !gotdtprel | |
10839 | ldah $2,foo($29) !dtprelhi | |
10840 | lda $3,foo($2) !dtprello | |
10841 | lda $4,foo($29) !dtprel | |
10842 | ldq $1,foo($29) !gottprel | |
10843 | ldah $2,foo($29) !tprelhi | |
10844 | lda $3,foo($2) !tprello | |
10845 | lda $4,foo($29) !tprel' | |
10846 | tls_first_major=2 | |
10847 | tls_first_minor=13 | |
2f3321ca | 10848 | tls_as_opt=--fatal-warnings |
6f9b006d | 10849 | ;; |
f996902d RH |
10850 | i[34567]86-*-*) |
10851 | conftest_s=' | |
10852 | .section ".tdata","awT",@progbits | |
10853 | foo: .long 25 | |
10854 | .text | |
10855 | movl %gs:0, %eax | |
10856 | leal foo@TLSGD(,%ebx,1), %eax | |
10857 | leal foo@TLSLDM(%ebx), %eax | |
10858 | leal foo@DTPOFF(%eax), %edx | |
10859 | movl foo@GOTTPOFF(%ebx), %eax | |
10860 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
10861 | addl foo@GOTNTPOFF(%ebx), %eax |
10862 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
10863 | movl $foo@TPOFF, %eax |
10864 | subl $foo@TPOFF, %eax | |
10865 | leal foo@NTPOFF(%ecx), %eax' | |
10866 | tls_first_major=2 | |
75d38379 | 10867 | tls_first_minor=14 |
2f3321ca | 10868 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
10869 | ;; |
10870 | x86_64-*-*) | |
10871 | conftest_s=' | |
10872 | .section ".tdata","awT",@progbits | |
10873 | foo: .long 25 | |
10874 | .text | |
10875 | movq %fs:0, %rax | |
10876 | leaq foo@TLSGD(%rip), %rdi | |
10877 | leaq foo@TLSLD(%rip), %rdi | |
10878 | leaq foo@DTPOFF(%rax), %rdx | |
10879 | movq foo@GOTTPOFF(%rip), %rax | |
10880 | movq $foo@TPOFF, %rax' | |
10881 | tls_first_major=2 | |
10882 | tls_first_minor=14 | |
2f3321ca | 10883 | tls_as_opt=--fatal-warnings |
f996902d | 10884 | ;; |
7b6e506e RH |
10885 | ia64-*-*) |
10886 | conftest_s=' | |
10887 | .section ".tdata","awT",@progbits | |
10888 | foo: data8 25 | |
10889 | .text | |
10890 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
10891 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
10892 | addl r18 = @ltoff(@tprel(foo#)), gp | |
10893 | addl r19 = @dtprel(foo#), gp | |
10894 | adds r21 = @dtprel(foo#), r13 | |
10895 | movl r23 = @dtprel(foo#) | |
10896 | addl r20 = @tprel(foo#), gp | |
10897 | adds r22 = @tprel(foo#), r13 | |
10898 | movl r24 = @tprel(foo#)' | |
10899 | tls_first_major=2 | |
10900 | tls_first_minor=13 | |
2f3321ca | 10901 | tls_as_opt=--fatal-warnings |
7b6e506e | 10902 | ;; |
c4501e62 JJ |
10903 | powerpc-*-*) |
10904 | conftest_s=' | |
10905 | .section ".tdata","awT",@progbits | |
10906 | .align 2 | |
10907 | ld0: .space 4 | |
10908 | ld1: .space 4 | |
10909 | x1: .space 4 | |
10910 | x2: .space 4 | |
10911 | x3: .space 4 | |
10912 | .text | |
10913 | addi 3,31,ld0@got@tlsgd | |
10914 | bl __tls_get_addr | |
10915 | addi 3,31,x1@got@tlsld | |
10916 | bl __tls_get_addr | |
10917 | addi 9,3,x1@dtprel | |
10918 | addis 9,3,x2@dtprel@ha | |
10919 | addi 9,9,x2@dtprel@l | |
10920 | lwz 9,x3@got@tprel(31) | |
10921 | add 9,9,x@tls | |
10922 | addi 9,2,x1@tprel | |
10923 | addis 9,2,x2@tprel@ha | |
10924 | addi 9,9,x2@tprel@l' | |
10925 | tls_first_major=2 | |
10926 | tls_first_minor=14 | |
2f3321ca | 10927 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
10928 | ;; |
10929 | powerpc64-*-*) | |
10930 | conftest_s=' | |
10931 | .section ".tdata","awT",@progbits | |
10932 | .align 3 | |
10933 | ld0: .space 8 | |
10934 | ld1: .space 8 | |
10935 | x1: .space 8 | |
10936 | x2: .space 8 | |
10937 | x3: .space 8 | |
10938 | .text | |
10939 | addi 3,2,ld0@got@tlsgd | |
10940 | bl .__tls_get_addr | |
10941 | nop | |
10942 | addi 3,2,ld1@toc | |
10943 | bl .__tls_get_addr | |
10944 | nop | |
10945 | addi 3,2,x1@got@tlsld | |
10946 | bl .__tls_get_addr | |
10947 | nop | |
10948 | addi 9,3,x1@dtprel | |
10949 | bl .__tls_get_addr | |
10950 | nop | |
10951 | addis 9,3,x2@dtprel@ha | |
10952 | addi 9,9,x2@dtprel@l | |
10953 | bl .__tls_get_addr | |
10954 | nop | |
10955 | ld 9,x3@got@dtprel(2) | |
10956 | add 9,9,3 | |
10957 | bl .__tls_get_addr | |
10958 | nop' | |
10959 | tls_first_major=2 | |
10960 | tls_first_minor=14 | |
2f3321ca | 10961 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 10962 | ;; |
fd3cd001 UW |
10963 | s390-*-*) |
10964 | conftest_s=' | |
10965 | .section ".tdata","awT",@progbits | |
10966 | foo: .long 25 | |
10967 | .text | |
10968 | .long foo@TLSGD | |
10969 | .long foo@TLSLDM | |
10970 | .long foo@DTPOFF | |
10971 | .long foo@NTPOFF | |
10972 | .long foo@GOTNTPOFF | |
10973 | .long foo@INDNTPOFF | |
10974 | l %r1,foo@GOTNTPOFF(%r12) | |
10975 | l %r1,0(%r1):tls_load:foo | |
10976 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
10977 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
10978 | tls_first_major=2 | |
10979 | tls_first_minor=14 | |
2f3321ca | 10980 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
10981 | ;; |
10982 | s390x-*-*) | |
10983 | conftest_s=' | |
10984 | .section ".tdata","awT",@progbits | |
10985 | foo: .long 25 | |
10986 | .text | |
10987 | .quad foo@TLSGD | |
10988 | .quad foo@TLSLDM | |
10989 | .quad foo@DTPOFF | |
10990 | .quad foo@NTPOFF | |
10991 | .quad foo@GOTNTPOFF | |
10992 | lg %r1,foo@GOTNTPOFF(%r12) | |
10993 | larl %r1,foo@INDNTPOFF | |
10994 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
10995 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
10996 | tls_first_major=2 | |
10997 | tls_first_minor=14 | |
2f3321ca | 10998 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 10999 | ;; |
9ff13962 KK |
11000 | sh-*-* | sh[34]-*-*) |
11001 | conftest_s=' | |
11002 | .section ".tdata","awT",@progbits | |
11003 | foo: .long 25 | |
11004 | .text | |
11005 | .long foo@TLSGD | |
11006 | .long foo@TLSLDM | |
11007 | .long foo@DTPOFF | |
11008 | .long foo@GOTTPOFF | |
11009 | .long foo@TPOFF' | |
11010 | tls_first_major=2 | |
11011 | tls_first_minor=13 | |
2f3321ca | 11012 | tls_as_opt=--fatal-warnings |
9ff13962 | 11013 | ;; |
5751a10b | 11014 | sparc*-*-*) |
2f3321ca EB |
11015 | case "$target" in |
11016 | sparc*-sun-solaris2.*) | |
11017 | on_solaris=yes | |
11018 | ;; | |
11019 | *) | |
11020 | on_solaris=no | |
11021 | ;; | |
11022 | esac | |
11023 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
11024 | conftest_s=' | |
11025 | .section ".tdata",#alloc,#write,#tls | |
11026 | foo: .long 25 | |
11027 | .text | |
11028 | sethi %tgd_hi22(foo), %o0 | |
11029 | add %o0, %tgd_lo10(foo), %o1 | |
11030 | add %l7, %o1, %o0, %tgd_add(foo) | |
11031 | call __tls_get_addr, %tgd_call(foo) | |
11032 | sethi %tldm_hi22(foo), %l1 | |
11033 | add %l1, %tldm_lo10(foo), %l2 | |
11034 | add %l7, %l2, %o0, %tldm_add(foo) | |
11035 | call __tls_get_addr, %tldm_call(foo) | |
11036 | sethi %tldo_hix22(foo), %l3 | |
11037 | xor %l3, %tldo_lox10(foo), %l4 | |
11038 | add %o0, %l4, %l5, %tldo_add(foo) | |
11039 | sethi %tie_hi22(foo), %o3 | |
11040 | add %o3, %tie_lo10(foo), %o3 | |
11041 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
11042 | add %g7, %o2, %o4, %tie_add(foo) | |
11043 | sethi %tle_hix22(foo), %l1 | |
11044 | xor %l1, %tle_lox10(foo), %o5 | |
11045 | ld [%g7 + %o5], %o1' | |
11046 | tls_first_major=0 | |
11047 | tls_first_minor=0 | |
11048 | else | |
11049 | conftest_s=' | |
5751a10b JJ |
11050 | .section ".tdata","awT",@progbits |
11051 | foo: .long 25 | |
11052 | .text | |
11053 | sethi %tgd_hi22(foo), %o0 | |
11054 | add %o0, %tgd_lo10(foo), %o1 | |
11055 | add %l7, %o1, %o0, %tgd_add(foo) | |
11056 | call __tls_get_addr, %tgd_call(foo) | |
11057 | sethi %tldm_hi22(foo), %l1 | |
11058 | add %l1, %tldm_lo10(foo), %l2 | |
11059 | add %l7, %l2, %o0, %tldm_add(foo) | |
11060 | call __tls_get_addr, %tldm_call(foo) | |
11061 | sethi %tldo_hix22(foo), %l3 | |
11062 | xor %l3, %tldo_lox10(foo), %l4 | |
11063 | add %o0, %l4, %l5, %tldo_add(foo) | |
11064 | sethi %tie_hi22(foo), %o3 | |
11065 | add %o3, %tie_lo10(foo), %o3 | |
11066 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
11067 | add %g7, %o2, %o4, %tie_add(foo) | |
11068 | sethi %tle_hix22(foo), %l1 | |
11069 | xor %l1, %tle_lox10(foo), %o5 | |
11070 | ld [%g7 + %o5], %o1' | |
11071 | tls_first_major=2 | |
11072 | tls_first_minor=14 | |
2f3321ca EB |
11073 | tls_as_opt="-32 --fatal-warnings" |
11074 | fi | |
5751a10b | 11075 | ;; |
f996902d RH |
11076 | esac |
11077 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
11078 | : # If we don't have a check, assume no support. |
11079 | else | |
ba479fd2 NN |
11080 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
11081 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
11082 | if test "${gcc_cv_as_tls+set}" = set; then | |
11083 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11084 | else |
11085 | gcc_cv_as_tls=no | |
11086 | if test $in_tree_gas = yes; then | |
11087 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
11088 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 11089 | fi |
8ada417f | 11090 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11091 | echo "$conftest_s" > conftest.s |
2f3321ca | 11092 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
11093 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11094 | (eval $ac_try) 2>&5 | |
11095 | ac_status=$? | |
11096 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11097 | (exit $ac_status); }; } | |
8ada417f ZW |
11098 | then |
11099 | gcc_cv_as_tls=yes | |
11100 | else | |
11101 | echo "configure: failed program was" >&5 | |
11102 | cat conftest.s >&5 | |
11103 | fi | |
11104 | rm -f conftest.o conftest.s | |
f996902d | 11105 | fi |
f996902d | 11106 | fi |
ba479fd2 NN |
11107 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
11108 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 11109 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
11110 | |
11111 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 11112 | #define HAVE_AS_TLS 1 |
ba479fd2 | 11113 | _ACEOF |
f996902d RH |
11114 | |
11115 | fi | |
8ada417f ZW |
11116 | fi |
11117 | ||
11118 | # Target-specific assembler checks. | |
f996902d | 11119 | |
d594623a L |
11120 | if test x"$demangler_in_ld" = xyes; then |
11121 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
11122 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
11123 | gcc_cv_ld_demangle=no | |
11124 | if test $in_tree_ld = yes; then | |
11125 | 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 \ | |
11126 | gcc_cv_ld_demangle=yes | |
11127 | fi | |
11128 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
11129 | # Check if the GNU linker supports --demangle option | |
11130 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
11131 | gcc_cv_ld_demangle=yes | |
11132 | fi | |
11133 | fi | |
11134 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
11135 | ||
11136 | cat >>confdefs.h <<\_ACEOF | |
11137 | #define HAVE_LD_DEMANGLE 1 | |
11138 | _ACEOF | |
11139 | ||
11140 | fi | |
11141 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
11142 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
11143 | fi | |
11144 | ||
3a37b08e RH |
11145 | case "$target" in |
11146 | # All TARGET_ABI_OSF targets. | |
11147 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
11148 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
11149 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
11150 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
11151 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 11152 | else |
8ada417f ZW |
11153 | gcc_cv_as_alpha_explicit_relocs=no |
11154 | if test $in_tree_gas = yes; then | |
11155 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
11156 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 11157 | fi |
8ada417f | 11158 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11159 | echo ' .set nomacro |
3a37b08e RH |
11160 | .text |
11161 | extbl $3, $2, $3 !lituse_bytoff!1 | |
11162 | ldq $2, a($29) !literal!1 | |
11163 | ldq $4, b($29) !literal!2 | |
11164 | ldq_u $3, 0($2) !lituse_base!1 | |
11165 | ldq $27, f($29) !literal!5 | |
11166 | jsr $26, ($27), f !lituse_jsr!5 | |
11167 | ldah $29, 0($26) !gpdisp!3 | |
11168 | lda $0, c($29) !gprel | |
11169 | ldah $1, d($29) !gprelhigh | |
11170 | lda $1, d($1) !gprellow | |
8ada417f | 11171 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
11172 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11173 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11174 | (eval $ac_try) 2>&5 | |
11175 | ac_status=$? | |
11176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11177 | (exit $ac_status); }; } | |
8ada417f ZW |
11178 | then |
11179 | gcc_cv_as_alpha_explicit_relocs=yes | |
11180 | else | |
11181 | echo "configure: failed program was" >&5 | |
11182 | cat conftest.s >&5 | |
11183 | fi | |
11184 | rm -f conftest.o conftest.s | |
11185 | fi | |
cafe096b | 11186 | fi |
ba479fd2 NN |
11187 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
11188 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 11189 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
11190 | |
11191 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 11192 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 11193 | _ACEOF |
3a37b08e | 11194 | |
86da66b5 HPN |
11195 | fi |
11196 | ;; | |
11197 | ||
11198 | cris-*-*) | |
11199 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
11200 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
11201 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
11202 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11203 | else | |
11204 | gcc_cv_as_cris_no_mul_bug=no | |
11205 | if test $in_tree_gas = yes; then | |
11206 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
11207 | then gcc_cv_as_cris_no_mul_bug=yes | |
11208 | fi | |
11209 | elif test x$gcc_cv_as != x; then | |
11210 | echo '.text' > conftest.s | |
11211 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
11212 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11213 | (eval $ac_try) 2>&5 | |
11214 | ac_status=$? | |
11215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11216 | (exit $ac_status); }; } | |
11217 | then | |
11218 | gcc_cv_as_cris_no_mul_bug=yes | |
11219 | else | |
11220 | echo "configure: failed program was" >&5 | |
11221 | cat conftest.s >&5 | |
11222 | fi | |
11223 | rm -f conftest.o conftest.s | |
11224 | fi | |
11225 | fi | |
11226 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
11227 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
11228 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
11229 | ||
11230 | cat >>confdefs.h <<\_ACEOF | |
11231 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
11232 | _ACEOF | |
11233 | ||
8ada417f | 11234 | fi |
3a37b08e | 11235 | ;; |
8ada417f | 11236 | |
1cb36a98 | 11237 | sparc*-*-*) |
ba479fd2 NN |
11238 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
11239 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
11240 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
11241 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 11242 | else |
8ada417f ZW |
11243 | gcc_cv_as_sparc_register_op=no |
11244 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11245 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
11246 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11247 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11248 | (eval $ac_try) 2>&5 | |
11249 | ac_status=$? | |
11250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11251 | (exit $ac_status); }; } | |
8ada417f ZW |
11252 | then |
11253 | gcc_cv_as_sparc_register_op=yes | |
11254 | else | |
11255 | echo "configure: failed program was" >&5 | |
11256 | cat conftest.s >&5 | |
11257 | fi | |
11258 | rm -f conftest.o conftest.s | |
11259 | fi | |
cafe096b | 11260 | fi |
ba479fd2 NN |
11261 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
11262 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 11263 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
11264 | |
11265 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 11266 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 11267 | _ACEOF |
1cb36a98 | 11268 | |
8ada417f | 11269 | fi |
1cb36a98 | 11270 | |
ba479fd2 NN |
11271 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
11272 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
11273 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
11274 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 11275 | else |
8ada417f ZW |
11276 | gcc_cv_as_sparc_relax=no |
11277 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11278 | echo '.text' > conftest.s |
ba479fd2 NN |
11279 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
11280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11281 | (eval $ac_try) 2>&5 | |
11282 | ac_status=$? | |
11283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11284 | (exit $ac_status); }; } | |
8ada417f ZW |
11285 | then |
11286 | gcc_cv_as_sparc_relax=yes | |
11287 | else | |
11288 | echo "configure: failed program was" >&5 | |
11289 | cat conftest.s >&5 | |
11290 | fi | |
11291 | rm -f conftest.o conftest.s | |
11292 | fi | |
cafe096b | 11293 | fi |
ba479fd2 NN |
11294 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
11295 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 11296 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
11297 | |
11298 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 11299 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 11300 | _ACEOF |
e95b1e6a | 11301 | |
8ada417f | 11302 | fi |
e95b1e6a | 11303 | |
ba479fd2 NN |
11304 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
11305 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
11306 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
11307 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 11308 | else |
8ada417f ZW |
11309 | gcc_cv_as_sparc_ua_pcrel=no |
11310 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11311 | echo '.text |
8ada417f ZW |
11312 | foo: |
11313 | nop | |
11314 | .data | |
11315 | .align 4 | |
11316 | .byte 0 | |
11317 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
11318 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
11319 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11320 | (eval $ac_try) 2>&5 | |
11321 | ac_status=$? | |
11322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11323 | (exit $ac_status); }; } | |
8ada417f ZW |
11324 | then |
11325 | if test x$gcc_cv_ld != x \ | |
11326 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
11327 | gcc_cv_as_sparc_ua_pcrel=yes | |
11328 | fi | |
11329 | rm -f conftest | |
11330 | else | |
11331 | echo "configure: failed program was" >&5 | |
11332 | cat conftest.s >&5 | |
11333 | fi | |
11334 | rm -f conftest.o conftest.s | |
11335 | fi | |
cafe096b | 11336 | fi |
ba479fd2 NN |
11337 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
11338 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 11339 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
11340 | |
11341 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 11342 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 11343 | _ACEOF |
17e9e88c | 11344 | |
17e9e88c | 11345 | |
ba479fd2 NN |
11346 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
11347 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
11348 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
11349 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 11350 | else |
8ada417f ZW |
11351 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
11352 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11353 | echo '.data |
8ada417f ZW |
11354 | .align 4 |
11355 | .byte 0x31 | |
11356 | .uaword %r_disp32(foo) | |
11357 | .byte 0x32, 0x33, 0x34 | |
11358 | .global foo | |
11359 | .hidden foo | |
11360 | foo: | |
11361 | .skip 4' > conftest.s | |
ba479fd2 NN |
11362 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
11363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11364 | (eval $ac_try) 2>&5 | |
11365 | ac_status=$? | |
11366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11367 | (exit $ac_status); }; } | |
8ada417f ZW |
11368 | then |
11369 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
11370 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
11371 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
11372 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
11373 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
11374 | | grep 'DISP32' > /dev/null 2>&1; then | |
11375 | : | |
11376 | else | |
11377 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 11378 | fi |
8ada417f ZW |
11379 | fi |
11380 | rm -f conftest | |
11381 | else | |
11382 | echo "configure: failed program was" >&5 | |
11383 | cat conftest.s >&5 | |
11384 | fi | |
11385 | rm -f conftest.o conftest.s | |
11386 | fi | |
cafe096b | 11387 | fi |
ba479fd2 NN |
11388 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
11389 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 11390 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
11391 | |
11392 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 11393 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 11394 | _ACEOF |
cf7b8b0d | 11395 | |
8ada417f | 11396 | fi |
ba479fd2 | 11397 | |
8ada417f | 11398 | fi # unaligned pcrel relocs |
cf7b8b0d | 11399 | |
ba479fd2 NN |
11400 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
11401 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
11402 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
11403 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 11404 | else |
8ada417f ZW |
11405 | gcc_cv_as_sparc_offsetable_lo10=no |
11406 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11407 | echo '.text |
8ada417f ZW |
11408 | or %g1, %lo(ab) + 12, %g1 |
11409 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
11410 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
11411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11412 | (eval $ac_try) 2>&5 | |
11413 | ac_status=$? | |
11414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11415 | (exit $ac_status); }; } | |
8ada417f ZW |
11416 | then |
11417 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 11418 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f ZW |
11419 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
11420 | gcc_cv_as_offsetable_lo10=yes | |
11421 | fi | |
11422 | else | |
11423 | echo "configure: failed program was" >&5 | |
11424 | cat conftest.s >&5 | |
11425 | fi | |
11426 | rm -f conftest.o conftest.s | |
11427 | fi | |
cafe096b | 11428 | fi |
ba479fd2 NN |
11429 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
11430 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 11431 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
11432 | |
11433 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 11434 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 11435 | _ACEOF |
1cb36a98 | 11436 | |
8ada417f | 11437 | fi |
1cb36a98 RH |
11438 | ;; |
11439 | ||
c307e6dd | 11440 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
11441 | case $target_os in |
11442 | cygwin* | pe | mingw32*) | |
11443 | # Used for DWARF 2 in PE | |
11444 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
11445 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
11446 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
11447 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11448 | else | |
11449 | gcc_cv_as_ix86_pe_secrel32=no | |
11450 | if test $in_tree_gas = yes; then | |
11451 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
11452 | then gcc_cv_as_ix86_pe_secrel32=yes | |
11453 | fi | |
11454 | elif test x$gcc_cv_as != x; then | |
11455 | echo '.text | |
11456 | foo: nop | |
11457 | .data | |
11458 | .secrel32 foo' > conftest.s | |
11459 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
11460 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11461 | (eval $ac_try) 2>&5 | |
11462 | ac_status=$? | |
11463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11464 | (exit $ac_status); }; } | |
11465 | then | |
11466 | if test x$gcc_cv_ld != x \ | |
11467 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
11468 | gcc_cv_as_ix86_pe_secrel32=yes | |
11469 | fi | |
11470 | rm -f conftest | |
11471 | else | |
11472 | echo "configure: failed program was" >&5 | |
11473 | cat conftest.s >&5 | |
11474 | fi | |
11475 | rm -f conftest.o conftest.s | |
11476 | fi | |
11477 | fi | |
11478 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
11479 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
11480 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
11481 | ||
11482 | cat >>confdefs.h <<\_ACEOF | |
11483 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
11484 | _ACEOF | |
11485 | ||
11486 | fi | |
11487 | ;; | |
11488 | esac | |
11489 | ||
ba479fd2 NN |
11490 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
11491 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
11492 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
11493 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11494 | else |
11495 | gcc_cv_as_ix86_filds_fists=no | |
11496 | if test $in_tree_gas = yes; then | |
11497 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
11498 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 11499 | fi |
8ada417f | 11500 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11501 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
11502 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11503 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11504 | (eval $ac_try) 2>&5 | |
11505 | ac_status=$? | |
11506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11507 | (exit $ac_status); }; } | |
8ada417f ZW |
11508 | then |
11509 | gcc_cv_as_ix86_filds_fists=yes | |
11510 | else | |
11511 | echo "configure: failed program was" >&5 | |
11512 | cat conftest.s >&5 | |
981d4858 | 11513 | fi |
8ada417f ZW |
11514 | rm -f conftest.o conftest.s |
11515 | fi | |
11516 | fi | |
ba479fd2 NN |
11517 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
11518 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 11519 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
11520 | |
11521 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 11522 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 11523 | _ACEOF |
ad9c4d9f | 11524 | |
f6f5dff2 RO |
11525 | fi |
11526 | ||
ba479fd2 NN |
11527 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
11528 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
11529 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
11530 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
11531 | else |
11532 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
11533 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11534 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
11535 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11536 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11537 | (eval $ac_try) 2>&5 | |
11538 | ac_status=$? | |
11539 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11540 | (exit $ac_status); }; } | |
f6f5dff2 RO |
11541 | then |
11542 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
11543 | else | |
11544 | echo "configure: failed program was" >&5 | |
11545 | cat conftest.s >&5 | |
11546 | fi | |
11547 | rm -f conftest.o conftest.s | |
11548 | fi | |
11549 | fi | |
ba479fd2 NN |
11550 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
11551 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 11552 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
11553 | |
11554 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 11555 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 11556 | _ACEOF |
f6f5dff2 | 11557 | |
ad9c4d9f NN |
11558 | fi |
11559 | ||
6f3ca281 ZW |
11560 | # This one is used unconditionally by i386.[ch]; it is to be defined |
11561 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
11562 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
11563 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
11564 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
11565 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11566 | else |
11567 | gcc_cv_as_ix86_gotoff_in_data=no | |
11568 | if test $in_tree_gas = yes; then | |
11569 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11570 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
11571 | fi | |
11572 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11573 | echo ' .text |
f88c65f7 RH |
11574 | .L0: |
11575 | nop | |
11576 | .data | |
8ada417f | 11577 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
11578 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11580 | (eval $ac_try) 2>&5 | |
11581 | ac_status=$? | |
11582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11583 | (exit $ac_status); }; } | |
8ada417f ZW |
11584 | then |
11585 | gcc_cv_as_ix86_gotoff_in_data=yes | |
11586 | else | |
11587 | echo "configure: failed program was" >&5 | |
11588 | cat conftest.s >&5 | |
f88c65f7 | 11589 | fi |
8ada417f ZW |
11590 | rm -f conftest.o conftest.s |
11591 | fi | |
11592 | fi | |
ba479fd2 NN |
11593 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
11594 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 11595 | |
6f3ca281 | 11596 | |
ba479fd2 | 11597 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 11598 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 11599 | _ACEOF |
f88c65f7 | 11600 | |
1cb36a98 | 11601 | ;; |
ef1ecf87 RH |
11602 | |
11603 | ia64*-*-*) | |
ba479fd2 NN |
11604 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
11605 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
11606 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
11607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 11608 | else |
8ada417f ZW |
11609 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
11610 | if test $in_tree_gas = yes; then | |
11611 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11612 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 11613 | fi |
8ada417f | 11614 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11615 | echo ' .text |
ef1ecf87 RH |
11616 | addl r15 = @ltoffx(x#), gp |
11617 | ;; | |
cfa9ee99 | 11618 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
11619 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11620 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11621 | (eval $ac_try) 2>&5 | |
11622 | ac_status=$? | |
11623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11624 | (exit $ac_status); }; } | |
8ada417f | 11625 | then |
cfa9ee99 | 11626 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
11627 | else |
11628 | echo "configure: failed program was" >&5 | |
11629 | cat conftest.s >&5 | |
2c4a9cff | 11630 | fi |
8ada417f ZW |
11631 | rm -f conftest.o conftest.s |
11632 | fi | |
11633 | fi | |
ba479fd2 NN |
11634 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
11635 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 11636 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
11637 | |
11638 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 11639 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 11640 | _ACEOF |
8ada417f | 11641 | |
cfa9ee99 | 11642 | fi |
8ada417f | 11643 | |
2c4a9cff | 11644 | ;; |
8ada417f | 11645 | |
2c4a9cff | 11646 | powerpc*-*-*) |
8ada417f | 11647 | case $target in |
6b37db3c DE |
11648 | *-*-aix*) conftest_s=' .csect .text[PR] |
11649 | mfcr 3,128';; | |
11650 | *-*-darwin*) conftest_s=' .text | |
11651 | mfcr r3,128';; | |
11652 | *) conftest_s=' .text | |
11653 | mfcr 3,128';; | |
8ada417f | 11654 | esac |
8ada417f | 11655 | |
ba479fd2 NN |
11656 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
11657 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
11658 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
11659 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 11660 | else |
8ada417f ZW |
11661 | gcc_cv_as_powerpc_mfcrf=no |
11662 | if test $in_tree_gas = yes; then | |
11663 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11664 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 11665 | fi |
8ada417f | 11666 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 11667 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
11668 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11670 | (eval $ac_try) 2>&5 | |
11671 | ac_status=$? | |
11672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11673 | (exit $ac_status); }; } | |
8ada417f ZW |
11674 | then |
11675 | gcc_cv_as_powerpc_mfcrf=yes | |
11676 | else | |
11677 | echo "configure: failed program was" >&5 | |
11678 | cat conftest.s >&5 | |
11679 | fi | |
11680 | rm -f conftest.o conftest.s | |
11681 | fi | |
2c4a9cff | 11682 | fi |
ba479fd2 NN |
11683 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
11684 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 11685 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
11686 | |
11687 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 11688 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 11689 | _ACEOF |
ef1ecf87 | 11690 | |
8ada417f ZW |
11691 | fi |
11692 | ;; | |
11693 | ||
11694 | mips*-*-*) | |
ba479fd2 NN |
11695 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
11696 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
11697 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
11698 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11699 | else |
11700 | gcc_cv_as_mips_explicit_relocs=no | |
11701 | if test $in_tree_gas = yes; then | |
11702 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
11703 | then gcc_cv_as_mips_explicit_relocs=yes | |
11704 | fi | |
11705 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11706 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
11707 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11709 | (eval $ac_try) 2>&5 | |
11710 | ac_status=$? | |
11711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11712 | (exit $ac_status); }; } | |
8ada417f ZW |
11713 | then |
11714 | gcc_cv_as_mips_explicit_relocs=yes | |
11715 | else | |
11716 | echo "configure: failed program was" >&5 | |
11717 | cat conftest.s >&5 | |
ef1ecf87 | 11718 | fi |
8ada417f ZW |
11719 | rm -f conftest.o conftest.s |
11720 | fi | |
11721 | fi | |
ba479fd2 NN |
11722 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
11723 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
11724 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
11725 | if test x$target_cpu_default = x | |
11726 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
11727 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
11728 | fi | |
11729 | fi | |
11730 | ||
82563d35 RS |
11731 | if test x$gas_flag = xyes \ |
11732 | || test x"$host" != x"$build" \ | |
11733 | || test ! -x "$gcc_cv_as" \ | |
11734 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
11735 | : | |
11736 | else | |
11737 | echo "*** This configuration requires the GNU assembler" >&2 | |
11738 | exit 1 | |
11739 | fi | |
ef1ecf87 | 11740 | ;; |
1cb36a98 | 11741 | esac |
9d147085 RH |
11742 | # ??? Not all targets support dwarf2 debug_line, even within a version |
11743 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
11744 | # info to the output file. So, as supported targets are added to gas 2.11, | |
11745 | # add some instruction here to (also) show we expect this might work. | |
11746 | # ??? Once 2.11 is released, probably need to add first known working | |
11747 | # version to the per-target configury. | |
11748 | case "$target" in | |
80486e06 | 11749 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 11750 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 11751 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
11752 | insn="nop" |
11753 | ;; | |
57116d8d | 11754 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
11755 | insn="nop 0" |
11756 | ;; | |
2853bc5a HPN |
11757 | mmix-*-*) |
11758 | insn="swym 0" | |
11759 | ;; | |
8ada417f ZW |
11760 | esac |
11761 | if test x"$insn" != x; then | |
11762 | conftest_s="\ | |
11763 | .file 1 \"conftest.s\" | |
11764 | .loc 1 3 0 | |
11765 | $insn" | |
ba479fd2 NN |
11766 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
11767 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
11768 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
11769 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11770 | else |
11771 | gcc_cv_as_dwarf2_debug_line=no | |
11772 | if test $in_tree_gas = yes; then | |
11773 | if test $in_tree_gas_is_elf = yes \ | |
11774 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11775 | then gcc_cv_as_dwarf2_debug_line=yes | |
11776 | fi | |
11777 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11778 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
11779 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11781 | (eval $ac_try) 2>&5 | |
11782 | ac_status=$? | |
11783 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11784 | (exit $ac_status); }; } | |
8ada417f ZW |
11785 | then |
11786 | # ??? This fails with non-gnu grep. Maybe use objdump? | |
11787 | if grep debug_line conftest.o > /dev/null 2>&1; then | |
11788 | gcc_cv_as_dwarf2_debug_line=yes | |
11789 | fi | |
11790 | else | |
11791 | echo "configure: failed program was" >&5 | |
11792 | cat conftest.s >&5 | |
11793 | fi | |
11794 | rm -f conftest.o conftest.s | |
11795 | fi | |
11796 | fi | |
ba479fd2 NN |
11797 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
11798 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 11799 | |
ad9c4d9f | 11800 | |
8ada417f ZW |
11801 | # The .debug_line file table must be in the exact order that |
11802 | # we specified the files, since these indices are also used | |
11803 | # by DW_AT_decl_file. Approximate this test by testing if | |
11804 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
11805 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
11806 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
11807 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
11808 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11809 | else |
11810 | gcc_cv_as_dwarf2_file_buggy=no | |
11811 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 11812 | echo ' .file 1 "foo.s" |
8ada417f | 11813 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
11814 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
11815 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11816 | (eval $ac_try) 2>&5 | |
11817 | ac_status=$? | |
11818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11819 | (exit $ac_status); }; } | |
8ada417f ZW |
11820 | then |
11821 | gcc_cv_as_dwarf2_file_buggy=yes | |
11822 | else | |
11823 | echo "configure: failed program was" >&5 | |
11824 | cat conftest.s >&5 | |
11825 | fi | |
11826 | rm -f conftest.o conftest.s | |
11827 | fi | |
ad9c4d9f | 11828 | fi |
ba479fd2 NN |
11829 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
11830 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
11831 | |
11832 | ||
11833 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
11834 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
11835 | |
11836 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 11837 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 11838 | _ACEOF |
9d147085 | 11839 | |
8ada417f | 11840 | fi |
ad9c4d9f | 11841 | |
ba479fd2 NN |
11842 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
11843 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
11844 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
11845 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11846 | else |
11847 | gcc_cv_as_gdwarf2_flag=no | |
11848 | if test $in_tree_gas = yes; then | |
11849 | if test $in_tree_gas_is_elf = yes \ | |
11850 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11851 | then gcc_cv_as_gdwarf2_flag=yes | |
11852 | fi | |
11853 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11854 | echo "$insn" > conftest.s |
ba479fd2 NN |
11855 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
11856 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11857 | (eval $ac_try) 2>&5 | |
11858 | ac_status=$? | |
11859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11860 | (exit $ac_status); }; } | |
8ada417f ZW |
11861 | then |
11862 | gcc_cv_as_gdwarf2_flag=yes | |
11863 | else | |
11864 | echo "configure: failed program was" >&5 | |
11865 | cat conftest.s >&5 | |
11866 | fi | |
11867 | rm -f conftest.o conftest.s | |
11868 | fi | |
ad9c4d9f | 11869 | fi |
ba479fd2 NN |
11870 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
11871 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 11872 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
11873 | |
11874 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11875 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 11876 | _ACEOF |
5f0e9ea2 GK |
11877 | |
11878 | fi | |
ad9c4d9f | 11879 | |
ba479fd2 NN |
11880 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
11881 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
11882 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
11883 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11884 | else |
11885 | gcc_cv_as_gstabs_flag=no | |
11886 | if test $in_tree_gas = yes; then | |
11887 | if test $in_tree_gas_is_elf = yes \ | |
11888 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11889 | then gcc_cv_as_gstabs_flag=yes | |
11890 | fi | |
11891 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11892 | echo "$insn" > conftest.s |
ba479fd2 NN |
11893 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
11894 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11895 | (eval $ac_try) 2>&5 | |
11896 | ac_status=$? | |
11897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11898 | (exit $ac_status); }; } | |
8ada417f ZW |
11899 | then |
11900 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
11901 | # and warns about it, but still exits successfully. So check for | |
11902 | # this. | |
ba479fd2 NN |
11903 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
11904 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11905 | (eval $ac_try) 2>&5 | |
11906 | ac_status=$? | |
11907 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11908 | (exit $ac_status); }; } | |
8ada417f ZW |
11909 | then : |
11910 | else gcc_cv_as_gstabs_flag=yes | |
11911 | fi | |
11912 | else | |
11913 | echo "configure: failed program was" >&5 | |
11914 | cat conftest.s >&5 | |
11915 | fi | |
11916 | rm -f conftest.o conftest.s | |
11917 | fi | |
ad9c4d9f | 11918 | fi |
ba479fd2 NN |
11919 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
11920 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 11921 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
11922 | |
11923 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11924 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 11925 | _ACEOF |
5f0e9ea2 GK |
11926 | |
11927 | fi | |
8ada417f | 11928 | fi |
5f0e9ea2 | 11929 | |
ba479fd2 NN |
11930 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
11931 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 11932 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 11933 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11934 | 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 \ |
11935 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
11936 | gcc_cv_ld_ro_rw_mix=read-write |
11937 | fi | |
11938 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
11939 | echo '.section myfoosect, "a"' > conftest1.s |
11940 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 11941 | echo '.byte 1' >> conftest2.s |
90e145da | 11942 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 11943 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
11944 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
11945 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
11946 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 11947 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 11948 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 11949 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 11950 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
11951 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
11952 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
11953 | gcc_cv_ld_ro_rw_mix=read-only | |
11954 | else | |
11955 | gcc_cv_ld_ro_rw_mix=read-write | |
11956 | fi | |
11957 | fi | |
11958 | fi | |
11959 | rm -f conftest.* conftest[123].* | |
11960 | fi | |
11961 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
11962 | |
11963 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 11964 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 11965 | _ACEOF |
96d0f4dc JJ |
11966 | |
11967 | fi | |
ba479fd2 NN |
11968 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
11969 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 11970 | |
ba479fd2 NN |
11971 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
11972 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 11973 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 11974 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11975 | 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 \ |
11976 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
11977 | gcc_cv_ld_eh_frame_hdr=yes |
11978 | fi | |
11979 | elif test x$gcc_cv_ld != x; then | |
11980 | # Check if linker supports --eh-frame-hdr option | |
11981 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
11982 | gcc_cv_ld_eh_frame_hdr=yes | |
11983 | fi | |
11984 | fi | |
11985 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
ba479fd2 NN |
11986 | |
11987 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 11988 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 11989 | _ACEOF |
275b60d6 JJ |
11990 | |
11991 | fi | |
ba479fd2 NN |
11992 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
11993 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 11994 | |
ba479fd2 NN |
11995 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
11996 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
11997 | gcc_cv_ld_pie=no |
11998 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
11999 | 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 \ |
12000 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
12001 | gcc_cv_ld_pie=yes |
12002 | fi | |
12003 | elif test x$gcc_cv_ld != x; then | |
12004 | # Check if linker supports -pie option | |
12005 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
12006 | gcc_cv_ld_pie=yes | |
12007 | fi | |
12008 | fi | |
12009 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
12010 | |
12011 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 12012 | #define HAVE_LD_PIE 1 |
ba479fd2 | 12013 | _ACEOF |
24a4dd31 JJ |
12014 | |
12015 | fi | |
ba479fd2 NN |
12016 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
12017 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 12018 | |
8bb915b6 NN |
12019 | # -------- |
12020 | # UNSORTED | |
12021 | # -------- | |
12022 | ||
765f1bf9 AM |
12023 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
12024 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
12025 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
12026 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12027 | else | |
12028 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
12029 | if test $in_tree_ld = yes ; then |
12030 | 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 \ | |
12031 | && test $in_tree_ld_is_elf = yes; then | |
12032 | gcc_cv_ld_as_needed=yes | |
12033 | fi | |
12034 | elif test x$gcc_cv_ld != x; then | |
12035 | # Check if linker supports --as-needed and --no-as-needed options | |
12036 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
12037 | gcc_cv_ld_as_needed=yes | |
12038 | fi | |
12039 | fi | |
82e923f6 RS |
12040 | |
12041 | fi | |
12042 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
12043 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
12044 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
12045 | ||
12046 | cat >>confdefs.h <<\_ACEOF | |
12047 | #define HAVE_LD_AS_NEEDED 1 | |
12048 | _ACEOF | |
12049 | ||
12050 | fi | |
765f1bf9 | 12051 | |
9fb28a67 | 12052 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 12053 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
12054 | |
12055 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 12056 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 12057 | _ACEOF |
793e9558 PB |
12058 | |
12059 | fi | |
12060 | ||
81bf3d9e | 12061 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 12062 | |
81bf3d9e RH |
12063 | # Check whether --with-gc or --without-gc was given. |
12064 | if test "${with_gc+set}" = set; then | |
12065 | withval="$with_gc" | |
12066 | case "$withval" in | |
59415997 | 12067 | page | zone) |
81bf3d9e RH |
12068 | GGC=ggc-$withval |
12069 | ;; | |
12070 | *) | |
ba479fd2 NN |
12071 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
12072 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
12073 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
12074 | ;; |
12075 | esac | |
12076 | else | |
005537df | 12077 | GGC=ggc-page |
ba479fd2 | 12078 | fi; |
81bf3d9e RH |
12079 | |
12080 | echo "Using $GGC for garbage collection." | |
12081 | ||
3c809ba4 | 12082 | # Use the system's zlib library. |
b8dad04b ZW |
12083 | zlibdir=-L../zlib |
12084 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 12085 | |
3c809ba4 AG |
12086 | # Check whether --with-system-zlib or --without-system-zlib was given. |
12087 | if test "${with_system_zlib+set}" = set; then | |
12088 | withval="$with_system_zlib" | |
12089 | zlibdir= | |
12090 | zlibinc= | |
12091 | ||
ba479fd2 | 12092 | fi; |
3c809ba4 AG |
12093 | |
12094 | ||
12095 | ||
dc6746e7 | 12096 | |
ba479fd2 NN |
12097 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
12098 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
12099 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
12100 | if test "${enable_maintainer_mode+set}" = set; then | |
12101 | enableval="$enable_maintainer_mode" | |
12102 | maintainer_mode=$enableval | |
12103 | else | |
12104 | maintainer_mode=no | |
ba479fd2 | 12105 | fi; |
63cf211a | 12106 | |
ba479fd2 NN |
12107 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
12108 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
12109 | |
12110 | if test "$maintainer_mode" = "yes"; then | |
12111 | MAINT='' | |
12112 | else | |
12113 | MAINT='#' | |
12114 | fi | |
12115 | ||
6de9cd9a DN |
12116 | echo "$as_me:$LINENO: checking whether to use libbanshee for points-to alias analysis" >&5 |
12117 | echo $ECHO_N "checking whether to use libbanshee for points-to alias analysis... $ECHO_C" >&6 | |
12118 | ||
12119 | # Check whether --with-libbanshee or --without-libbanshee was given. | |
12120 | if test "${with_libbanshee+set}" = set; then | |
12121 | withval="$with_libbanshee" | |
12122 | libbanshee="$with_libbanshee" | |
12123 | else | |
12124 | libbanshee=no | |
12125 | fi; | |
12126 | ||
12127 | if test x"$libbanshee" = xyes; then | |
12128 | BANSHEELIB="../libbanshee/points-to/libandersen.a ../libbanshee/engine/libbansheeengine.a ../libbanshee/libcompat/libbansheecompat.a " | |
12129 | BANSHEEINC="-I\$(srcdir)/../libbanshee/libcompat -I\$(srcdir)/../libbanshee -I\$(srcdir)/../libbanshee/points-to" | |
12130 | ANDER="tree-alias-ander.o" | |
12131 | ||
12132 | cat >>confdefs.h <<\_ACEOF | |
12133 | #define HAVE_BANSHEE 1 | |
12134 | _ACEOF | |
12135 | ||
12136 | else | |
12137 | BANSHEELIB="" | |
12138 | BANSHEEINC="" | |
12139 | ANDER="" | |
12140 | fi | |
12141 | echo "$as_me:$LINENO: result: $with_libbanshee" >&5 | |
12142 | echo "${ECHO_T}$with_libbanshee" >&6 | |
12143 | ||
12144 | ||
12145 | ||
12146 | ||
12147 | ||
8bb915b6 NN |
12148 | # -------------- |
12149 | # Language hooks | |
12150 | # -------------- | |
12151 | ||
861bb6c1 JL |
12152 | # Make empty files to contain the specs and options for each language. |
12153 | # Then add #include lines to for a compiler that has specs and/or options. | |
12154 | ||
d7b42618 | 12155 | lang_opt_files= |
861bb6c1 | 12156 | lang_specs_files= |
3103b7db | 12157 | lang_tree_files= |
861bb6c1 JL |
12158 | for subdir in . $subdirs |
12159 | do | |
d7b42618 NB |
12160 | if test -f $srcdir/$subdir/lang.opt; then |
12161 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
12162 | fi | |
75bffa71 | 12163 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 12164 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 12165 | fi |
3103b7db | 12166 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 12167 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 12168 | fi |
861bb6c1 JL |
12169 | done |
12170 | ||
12171 | # These (without "all_") are set in each config-lang.in. | |
12172 | # `language' must be a single word so is spelled singularly. | |
12173 | all_languages= | |
12174 | all_boot_languages= | |
12175 | all_compilers= | |
12176 | all_stagestuff= | |
69f9a345 | 12177 | all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders libada-mk' |
861bb6c1 | 12178 | # List of language makefile fragments. |
2ed26f6b ZW |
12179 | all_lang_makefrags= |
12180 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 12181 | all_lang_makefiles= |
e2500fed | 12182 | # Files for gengtype |
ef69da62 | 12183 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
12184 | # Files for gengtype with language |
12185 | all_gtfiles_files_langs= | |
12186 | all_gtfiles_files_files= | |
861bb6c1 JL |
12187 | |
12188 | # Add the language fragments. | |
12189 | # Languages are added via two mechanisms. Some information must be | |
12190 | # recorded in makefile variables, these are defined in config-lang.in. | |
12191 | # We accumulate them and plug them into the main Makefile. | |
12192 | # The other mechanism is a set of hooks for each of the main targets | |
12193 | # like `clean', `install', etc. | |
12194 | ||
861bb6c1 | 12195 | language_hooks="Make-hooks" |
861bb6c1 | 12196 | |
c406e779 | 12197 | for s in $subdirs |
861bb6c1 | 12198 | do |
861bb6c1 JL |
12199 | language= |
12200 | boot_language= | |
12201 | compilers= | |
12202 | stagestuff= | |
861bb6c1 | 12203 | outputs= |
e2500fed | 12204 | gtfiles= |
861bb6c1 | 12205 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 12206 | if test "x$language" = x |
861bb6c1 JL |
12207 | then |
12208 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
12209 | exit 1 | |
12210 | fi | |
2ed26f6b | 12211 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 12212 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 12213 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 12214 | fi |
861bb6c1 | 12215 | all_languages="$all_languages $language" |
75bffa71 | 12216 | if test "x$boot_language" = xyes |
861bb6c1 JL |
12217 | then |
12218 | all_boot_languages="$all_boot_languages $language" | |
12219 | fi | |
12220 | all_compilers="$all_compilers $compilers" | |
12221 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 12222 | all_outputs="$all_outputs $outputs" |
e2500fed | 12223 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 12224 | for f in $gtfiles |
8ac9d31f | 12225 | do |
8ac9d31f TJ |
12226 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
12227 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 12228 | done |
861bb6c1 JL |
12229 | done |
12230 | ||
8ac9d31f TJ |
12231 | # Pick up gtfiles for c |
12232 | gtfiles= | |
12233 | s="c" | |
12234 | . ${srcdir}/c-config-lang.in | |
12235 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 12236 | for f in $gtfiles |
8ac9d31f | 12237 | do |
8ac9d31f TJ |
12238 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
12239 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
12240 | done |
12241 | ||
cbc59f01 | 12242 | check_languages= |
c406e779 | 12243 | for language in $all_languages |
cbc59f01 | 12244 | do |
cbc59f01 | 12245 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
12246 | done |
12247 | ||
62b81e45 MM |
12248 | # We link each language in with a set of hooks, reached indirectly via |
12249 | # lang.${target}. | |
861bb6c1 JL |
12250 | |
12251 | rm -f Make-hooks | |
12252 | touch Make-hooks | |
65ebbf81 | 12253 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 12254 | install-normal install-common install-man \ |
a541f69d | 12255 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 12256 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 12257 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
12258 | for t in $target_list |
12259 | do | |
12260 | x= | |
c406e779 | 12261 | for lang in $all_languages |
861bb6c1 | 12262 | do |
ab87f8c8 | 12263 | x="$x $lang.$t" |
861bb6c1 JL |
12264 | done |
12265 | echo "lang.$t: $x" >> Make-hooks | |
12266 | done | |
12267 | ||
8bb915b6 NN |
12268 | # -------- |
12269 | # UNSORTED | |
12270 | # -------- | |
12271 | ||
cc06d68c | 12272 | # Create .gdbinit. |
861bb6c1 | 12273 | |
cc06d68c GP |
12274 | echo "dir ." > .gdbinit |
12275 | echo "dir ${srcdir}" >> .gdbinit | |
12276 | if test x$gdb_needs_out_file_path = xyes | |
12277 | then | |
12278 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
12279 | fi | |
12280 | if test "x$subdirs" != x; then | |
12281 | for s in $subdirs | |
12282 | do | |
12283 | echo "dir ${srcdir}/$s" >> .gdbinit | |
12284 | done | |
861bb6c1 | 12285 | fi |
cc06d68c | 12286 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 12287 | |
8f8d3278 NC |
12288 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
12289 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
12290 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
12291 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
12292 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
12293 | # make and thus we'd get different behavior depending on where we built the | |
12294 | # sources. | |
5949a9fc | 12295 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 12296 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 12297 | else |
8f8d3278 NC |
12298 | # An explanation of the sed strings: |
12299 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
12300 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
12301 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 12302 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
12303 | # |
12304 | # (*) Note this pattern overwrites the first character of the string | |
12305 | # with a forward slash if one is not already present. This is not a | |
12306 | # problem because the exact names of the sub-directories concerned is | |
12307 | # unimportant, just the number of them matters. | |
12308 | # | |
12309 | # The practical upshot of these patterns is like this: | |
12310 | # | |
12311 | # prefix exec_prefix result | |
12312 | # ------ ----------- ------ | |
12313 | # /foo /foo/bar ../ | |
12314 | # /foo/ /foo/bar ../ | |
12315 | # /foo /foo/bar/ ../ | |
12316 | # /foo/ /foo/bar/ ../ | |
12317 | # /foo /foo/bar/ugg ../../ | |
12318 | # | |
4c112cda | 12319 | dollar='$$' |
caa55b1e | 12320 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
12321 | fi |
12322 | ||
12323 | ||
2ce3c6c6 | 12324 | |
2bbea3a6 RH |
12325 | # Find a directory in which to install a shared libgcc. |
12326 | ||
12327 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
12328 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
12329 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
12330 | |
12331 | fi; | |
2bbea3a6 RH |
12332 | |
12333 | ||
5b15f277 RH |
12334 | # Check whether --with-slibdir or --without-slibdir was given. |
12335 | if test "${with_slibdir+set}" = set; then | |
12336 | withval="$with_slibdir" | |
12337 | slibdir="$with_slibdir" | |
12338 | else | |
12339 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 12340 | slibdir='$(libsubdir)' |
5b15f277 | 12341 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
12342 | slibdir='$(build_tooldir)/lib' |
12343 | else | |
5b15f277 | 12344 | slibdir='$(libdir)' |
2bbea3a6 | 12345 | fi |
ba479fd2 | 12346 | fi; |
2bbea3a6 RH |
12347 | |
12348 | ||
1e6347d8 | 12349 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
12350 | |
12351 | ||
861bb6c1 JL |
12352 | # Substitute configuration variables |
12353 | ||
12354 | ||
12355 | ||
12356 | ||
12357 | ||
12358 | ||
12359 | ||
12360 | ||
12361 | ||
12362 | ||
12363 | ||
12364 | ||
12365 | ||
12366 | ||
12367 | ||
12368 | ||
12369 | ||
12370 | ||
12371 | ||
12372 | ||
12373 | ||
12374 | ||
12375 | ||
12376 | ||
12377 | ||
12378 | ||
12379 | ||
12380 | ||
12381 | ||
12382 | ||
12383 | ||
12384 | ||
12385 | ||
12386 | ||
12387 | ||
12388 | ||
12389 | ||
12390 | ||
12391 | ||
12392 | ||
12393 | ||
12394 | ||
12395 | ||
12396 | ||
12397 | ||
12398 | ||
9b16d2c4 | 12399 | |
e9a25f70 | 12400 | |
6e26218f | 12401 | |
c8724862 | 12402 | |
e061d1ce | 12403 | |
d8bb17c8 | 12404 | |
11642c3a ZW |
12405 | |
12406 | ||
12407 | ||
12408 | ||
12409 | ||
12410 | ||
12411 | ||
3d9d2476 | 12412 | |
596151e1 | 12413 | |
8ac9d31f TJ |
12414 | |
12415 | ||
12416 | ||
e2500fed | 12417 | |
51b9ff45 | 12418 | |
861bb6c1 | 12419 | |
a541f69d KC |
12420 | # If it doesn't already exist, create document directory |
12421 | echo "checking for the document directory." 1>&2 | |
12422 | if test -d doc ; then | |
12423 | true | |
12424 | else | |
12425 | mkdir doc | |
12426 | fi | |
861bb6c1 | 12427 | |
6e3f3080 NN |
12428 | # Echo link setup. |
12429 | if test x${build} = x${host} ; then | |
12430 | if test x${host} = x${target} ; then | |
12431 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
12432 | else | |
12433 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
12434 | echo " from ${host} to ${target}." 1>&2 | |
12435 | fi | |
12436 | else | |
12437 | if test x${host} = x${target} ; then | |
12438 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
12439 | echo " for ${target}." 1>&2 | |
12440 | else | |
12441 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
12442 | echo " from ${host} to ${target}." 1>&2 | |
12443 | fi | |
12444 | fi | |
12445 | ||
6de9cd9a DN |
12446 | |
12447 | ||
12448 | ||
6e3f3080 NN |
12449 | # Configure the subdirectories |
12450 | # AC_CONFIG_SUBDIRS($subdirs) | |
12451 | ||
12452 | # Create the Makefile | |
12453 | # and configure language subdirectories | |
ba479fd2 | 12454 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
12455 | |
12456 | ||
ba479fd2 | 12457 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 12458 | |
ba479fd2 | 12459 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
12460 | # This file is a shell script that caches the results of configure |
12461 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
12462 | # scripts and configure runs, see configure's option --config-cache. |
12463 | # It is not useful on other systems. If it contains results you don't | |
12464 | # want to keep, you may remove or edit it. | |
6e3f3080 | 12465 | # |
ba479fd2 NN |
12466 | # config.status only pays attention to the cache file if you give it |
12467 | # the --recheck option to rerun configure. | |
6e3f3080 | 12468 | # |
ba479fd2 NN |
12469 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
12470 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
12471 | # following values. | |
12472 | ||
12473 | _ACEOF | |
12474 | ||
6e3f3080 NN |
12475 | # The following way of writing the cache mishandles newlines in values, |
12476 | # but we know of no workaround that is simple, portable, and efficient. | |
12477 | # So, don't put newlines in cache variables' values. | |
12478 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
12479 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
12480 | { |
12481 | (set) 2>&1 | | |
12482 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
12483 | *ac_space=\ *) | |
12484 | # `set' does not quote correctly, so add quotes (double-quote | |
12485 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
12486 | sed -n \ | |
86da66b5 HPN |
12487 | "s/'/'\\\\''/g; |
12488 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
12489 | ;; |
12490 | *) | |
12491 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
12492 | sed -n \ | |
86da66b5 | 12493 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
12494 | ;; |
12495 | esac; | |
12496 | } | | |
12497 | sed ' | |
12498 | t clear | |
12499 | : clear | |
12500 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
12501 | t end | |
12502 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
12503 | : end' >>confcache | |
12504 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 12505 | if test -w $cache_file; then |
ba479fd2 NN |
12506 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
12507 | cat confcache >$cache_file | |
6e3f3080 NN |
12508 | else |
12509 | echo "not updating unwritable cache $cache_file" | |
12510 | fi | |
12511 | fi | |
12512 | rm -f confcache | |
12513 | ||
12514 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
12515 | # Let make expand exec_prefix. | |
12516 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
12517 | ||
ba479fd2 NN |
12518 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
12519 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
12520 | # trailing colons and then remove the whole line if VPATH becomes empty | |
12521 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 12522 | if test "x$srcdir" = x.; then |
86da66b5 | 12523 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
12524 | s/:*\$(srcdir):*/:/; |
12525 | s/:*\${srcdir}:*/:/; | |
12526 | s/:*@srcdir@:*/:/; | |
86da66b5 | 12527 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 12528 | s/:*$//; |
86da66b5 | 12529 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 12530 | }' |
6e3f3080 NN |
12531 | fi |
12532 | ||
63cf211a | 12533 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 12534 | |
ba479fd2 NN |
12535 | ac_libobjs= |
12536 | ac_ltlibobjs= | |
12537 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
12538 | # 1. Remove the extension, and $U if already installed. | |
12539 | ac_i=`echo "$ac_i" | | |
86da66b5 | 12540 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
12541 | # 2. Add them. |
12542 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
12543 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
12544 | done | |
12545 | LIBOBJS=$ac_libobjs | |
63cf211a | 12546 | |
ba479fd2 NN |
12547 | LTLIBOBJS=$ac_ltlibobjs |
12548 | ||
12549 | ||
12550 | ||
12551 | : ${CONFIG_STATUS=./config.status} | |
12552 | ac_clean_files_save=$ac_clean_files | |
12553 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
12554 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
12555 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
12556 | cat >$CONFIG_STATUS <<_ACEOF | |
12557 | #! $SHELL | |
12558 | # Generated by $as_me. | |
6e3f3080 NN |
12559 | # Run this file to recreate the current configuration. |
12560 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 12561 | # configure, is in config.log if it exists. |
6e3f3080 | 12562 | |
ba479fd2 NN |
12563 | debug=false |
12564 | ac_cs_recheck=false | |
12565 | ac_cs_silent=false | |
12566 | SHELL=\${CONFIG_SHELL-$SHELL} | |
12567 | _ACEOF | |
12568 | ||
12569 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12570 | ## --------------------- ## | |
12571 | ## M4sh Initialization. ## | |
12572 | ## --------------------- ## | |
12573 | ||
12574 | # Be Bourne compatible | |
12575 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
12576 | emulate sh | |
12577 | NULLCMD=: | |
12578 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
12579 | # is contrary to our usage. Disable this feature. | |
12580 | alias -g '${1+"$@"}'='"$@"' | |
12581 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
12582 | set -o posix | |
12583 | fi | |
86da66b5 | 12584 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
12585 | |
12586 | # Support unset when possible. | |
86da66b5 | 12587 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
12588 | as_unset=unset |
12589 | else | |
12590 | as_unset=false | |
12591 | fi | |
12592 | ||
12593 | ||
12594 | # Work around bugs in pre-3.0 UWIN ksh. | |
12595 | $as_unset ENV MAIL MAILPATH | |
12596 | PS1='$ ' | |
12597 | PS2='> ' | |
12598 | PS4='+ ' | |
12599 | ||
12600 | # NLS nuisances. | |
12601 | for as_var in \ | |
12602 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
12603 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
12604 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 12605 | do |
86da66b5 | 12606 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
12607 | eval $as_var=C; export $as_var |
12608 | else | |
12609 | $as_unset $as_var | |
12610 | fi | |
6e3f3080 NN |
12611 | done |
12612 | ||
ba479fd2 NN |
12613 | # Required to use basename. |
12614 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
12615 | as_expr=expr | |
12616 | else | |
12617 | as_expr=false | |
12618 | fi | |
6e3f3080 | 12619 | |
ba479fd2 NN |
12620 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
12621 | as_basename=basename | |
12622 | else | |
12623 | as_basename=false | |
12624 | fi | |
6e3f3080 NN |
12625 | |
12626 | ||
ba479fd2 NN |
12627 | # Name of the executable. |
12628 | as_me=`$as_basename "$0" || | |
12629 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
12630 | X"$0" : 'X\(//\)$' \| \ | |
12631 | X"$0" : 'X\(/\)$' \| \ | |
12632 | . : '\(.\)' 2>/dev/null || | |
12633 | echo X/"$0" | | |
12634 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
12635 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
12636 | /^X\/\(\/\).*/{ s//\1/; q; } | |
12637 | s/.*/./; q'` | |
12638 | ||
6e3f3080 | 12639 | |
ba479fd2 NN |
12640 | # PATH needs CR, and LINENO needs CR and PATH. |
12641 | # Avoid depending upon Character Ranges. | |
12642 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
12643 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
12644 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
12645 | as_cr_digits='0123456789' | |
12646 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
12647 | ||
12648 | # The user is always right. | |
12649 | if test "${PATH_SEPARATOR+set}" != set; then | |
12650 | echo "#! /bin/sh" >conf$$.sh | |
12651 | echo "exit 0" >>conf$$.sh | |
12652 | chmod +x conf$$.sh | |
12653 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
12654 | PATH_SEPARATOR=';' | |
6e3f3080 | 12655 | else |
ba479fd2 NN |
12656 | PATH_SEPARATOR=: |
12657 | fi | |
12658 | rm -f conf$$.sh | |
12659 | fi | |
12660 | ||
12661 | ||
12662 | as_lineno_1=$LINENO | |
12663 | as_lineno_2=$LINENO | |
12664 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
12665 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
12666 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
12667 | # Find who we are. Look in the path if we contain no path at all | |
12668 | # relative or not. | |
12669 | case $0 in | |
12670 | *[\\/]* ) as_myself=$0 ;; | |
12671 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12672 | for as_dir in $PATH | |
12673 | do | |
12674 | IFS=$as_save_IFS | |
12675 | test -z "$as_dir" && as_dir=. | |
12676 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
12677 | done | |
12678 | ||
12679 | ;; | |
12680 | esac | |
12681 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
12682 | # in which case we are not to be found in the path. | |
12683 | if test "x$as_myself" = x; then | |
12684 | as_myself=$0 | |
12685 | fi | |
12686 | if test ! -f "$as_myself"; then | |
12687 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
12688 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
12689 | { (exit 1); exit 1; }; } | |
6e3f3080 | 12690 | fi |
ba479fd2 NN |
12691 | case $CONFIG_SHELL in |
12692 | '') | |
12693 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
12694 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
12695 | do | |
12696 | IFS=$as_save_IFS | |
12697 | test -z "$as_dir" && as_dir=. | |
12698 | for as_base in sh bash ksh sh5; do | |
12699 | case $as_dir in | |
12700 | /*) | |
12701 | if ("$as_dir/$as_base" -c ' | |
12702 | as_lineno_1=$LINENO | |
12703 | as_lineno_2=$LINENO | |
12704 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
12705 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
12706 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
12707 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
12708 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
12709 | CONFIG_SHELL=$as_dir/$as_base | |
12710 | export CONFIG_SHELL | |
12711 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
12712 | fi;; | |
12713 | esac | |
12714 | done | |
12715 | done | |
12716 | ;; | |
12717 | esac | |
12718 | ||
12719 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
12720 | # uniformly replaced by the line number. The first 'sed' inserts a | |
12721 | # line-number line before each line; the second 'sed' does the real | |
12722 | # work. The second script uses 'N' to pair each line-number line | |
12723 | # with the numbered line, and appends trailing '-' during | |
12724 | # substitution so that $LINENO is not a special case at line end. | |
12725 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
12726 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
12727 | sed '=' <$as_myself | | |
12728 | sed ' | |
12729 | N | |
12730 | s,$,-, | |
12731 | : loop | |
12732 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
12733 | t loop | |
12734 | s,-$,, | |
12735 | s,^['$as_cr_digits']*\n,, | |
12736 | ' >$as_me.lineno && | |
12737 | chmod +x $as_me.lineno || | |
12738 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
12739 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
12740 | { (exit 1); exit 1; }; } | |
12741 | ||
12742 | # Don't try to exec as it changes $[0], causing all sort of problems | |
12743 | # (the dirname of $[0] is not the place where we might find the | |
12744 | # original and so on. Autoconf is especially sensible to this). | |
12745 | . ./$as_me.lineno | |
12746 | # Exit status is that of the last command. | |
12747 | exit | |
12748 | } | |
12749 | ||
12750 | ||
12751 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
12752 | *c*,-n*) ECHO_N= ECHO_C=' | |
12753 | ' ECHO_T=' ' ;; | |
12754 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
12755 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
12756 | esac | |
12757 | ||
12758 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
12759 | as_expr=expr | |
12760 | else | |
12761 | as_expr=false | |
12762 | fi | |
12763 | ||
12764 | rm -f conf$$ conf$$.exe conf$$.file | |
12765 | echo >conf$$.file | |
12766 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
12767 | # We could just check for DJGPP; but this test a) works b) is more generic | |
12768 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
12769 | if test -f conf$$.exe; then | |
12770 | # Don't use ln at all; we don't have any links | |
12771 | as_ln_s='cp -p' | |
6e3f3080 | 12772 | else |
ba479fd2 | 12773 | as_ln_s='ln -s' |
6e3f3080 | 12774 | fi |
ba479fd2 NN |
12775 | elif ln conf$$.file conf$$ 2>/dev/null; then |
12776 | as_ln_s=ln | |
12777 | else | |
12778 | as_ln_s='cp -p' | |
12779 | fi | |
12780 | rm -f conf$$ conf$$.exe conf$$.file | |
12781 | ||
12782 | if mkdir -p . 2>/dev/null; then | |
12783 | as_mkdir_p=: | |
12784 | else | |
86da66b5 | 12785 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
12786 | as_mkdir_p=false |
12787 | fi | |
12788 | ||
12789 | as_executable_p="test -f" | |
12790 | ||
12791 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 12792 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
12793 | |
12794 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 12795 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
12796 | |
12797 | ||
12798 | # IFS | |
12799 | # We need space, tab and new line, in precisely that order. | |
12800 | as_nl=' | |
12801 | ' | |
12802 | IFS=" $as_nl" | |
12803 | ||
12804 | # CDPATH. | |
12805 | $as_unset CDPATH | |
12806 | ||
12807 | exec 6>&1 | |
12808 | ||
12809 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
12810 | # report actual input values of CONFIG_FILES etc. instead of their | |
12811 | # values after options handling. Logging --version etc. is OK. | |
12812 | exec 5>>config.log | |
12813 | { | |
12814 | echo | |
12815 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
12816 | ## Running $as_me. ## | |
12817 | _ASBOX | |
12818 | } >&5 | |
12819 | cat >&5 <<_CSEOF | |
12820 | ||
12821 | This file was extended by $as_me, which was | |
8ab705be | 12822 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
12823 | |
12824 | CONFIG_FILES = $CONFIG_FILES | |
12825 | CONFIG_HEADERS = $CONFIG_HEADERS | |
12826 | CONFIG_LINKS = $CONFIG_LINKS | |
12827 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
12828 | $ $0 $@ | |
12829 | ||
12830 | _CSEOF | |
12831 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
12832 | echo >&5 | |
12833 | _ACEOF | |
12834 | ||
12835 | # Files that config.status was made for. | |
12836 | if test -n "$ac_config_files"; then | |
12837 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
12838 | fi | |
12839 | ||
12840 | if test -n "$ac_config_headers"; then | |
12841 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
12842 | fi | |
12843 | ||
12844 | if test -n "$ac_config_links"; then | |
12845 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
12846 | fi | |
12847 | ||
12848 | if test -n "$ac_config_commands"; then | |
12849 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
12850 | fi | |
12851 | ||
12852 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12853 | ||
12854 | ac_cs_usage="\ | |
12855 | \`$as_me' instantiates files from templates according to the | |
12856 | current configuration. | |
12857 | ||
12858 | Usage: $0 [OPTIONS] [FILE]... | |
12859 | ||
12860 | -h, --help print this help, then exit | |
12861 | -V, --version print version number, then exit | |
12862 | -q, --quiet do not print progress messages | |
12863 | -d, --debug don't remove temporary files | |
12864 | --recheck update $as_me by reconfiguring in the same conditions | |
12865 | --file=FILE[:TEMPLATE] | |
86da66b5 | 12866 | instantiate the configuration file FILE |
ba479fd2 | 12867 | --header=FILE[:TEMPLATE] |
86da66b5 | 12868 | instantiate the configuration header FILE |
ba479fd2 NN |
12869 | |
12870 | Configuration files: | |
12871 | $config_files | |
12872 | ||
12873 | Configuration headers: | |
12874 | $config_headers | |
12875 | ||
12876 | Configuration commands: | |
12877 | $config_commands | |
12878 | ||
12879 | Report bugs to <bug-autoconf@gnu.org>." | |
12880 | _ACEOF | |
12881 | ||
12882 | cat >>$CONFIG_STATUS <<_ACEOF | |
12883 | ac_cs_version="\\ | |
12884 | config.status | |
8ab705be | 12885 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
12886 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
12887 | ||
86da66b5 | 12888 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
12889 | This config.status script is free software; the Free Software Foundation |
12890 | gives unlimited permission to copy, distribute and modify it." | |
12891 | srcdir=$srcdir | |
12892 | _ACEOF | |
12893 | ||
12894 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12895 | # If no file are specified by the user, then we need to provide default | |
12896 | # value. By we need to know if files were specified by the user. | |
12897 | ac_need_defaults=: | |
12898 | while test $# != 0 | |
12899 | do | |
12900 | case $1 in | |
12901 | --*=*) | |
12902 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
12903 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
12904 | ac_shift=: | |
12905 | ;; | |
12906 | -*) | |
12907 | ac_option=$1 | |
12908 | ac_optarg=$2 | |
12909 | ac_shift=shift | |
12910 | ;; | |
12911 | *) # This is not an option, so the user has probably given explicit | |
12912 | # arguments. | |
12913 | ac_option=$1 | |
12914 | ac_need_defaults=false;; | |
12915 | esac | |
12916 | ||
12917 | case $ac_option in | |
12918 | # Handling of the options. | |
12919 | _ACEOF | |
12920 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12921 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
12922 | ac_cs_recheck=: ;; | |
12923 | --version | --vers* | -V ) | |
12924 | echo "$ac_cs_version"; exit 0 ;; | |
12925 | --he | --h) | |
12926 | # Conflict between --help and --header | |
12927 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
12928 | Try \`$0 --help' for more information." >&5 | |
12929 | echo "$as_me: error: ambiguous option: $1 | |
12930 | Try \`$0 --help' for more information." >&2;} | |
12931 | { (exit 1); exit 1; }; };; | |
12932 | --help | --hel | -h ) | |
12933 | echo "$ac_cs_usage"; exit 0 ;; | |
12934 | --debug | --d* | -d ) | |
12935 | debug=: ;; | |
12936 | --file | --fil | --fi | --f ) | |
12937 | $ac_shift | |
12938 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
12939 | ac_need_defaults=false;; | |
12940 | --header | --heade | --head | --hea ) | |
12941 | $ac_shift | |
12942 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
12943 | ac_need_defaults=false;; | |
12944 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
12945 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
12946 | ac_cs_silent=: ;; | |
12947 | ||
12948 | # This is an error. | |
12949 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
12950 | Try \`$0 --help' for more information." >&5 | |
12951 | echo "$as_me: error: unrecognized option: $1 | |
12952 | Try \`$0 --help' for more information." >&2;} | |
12953 | { (exit 1); exit 1; }; } ;; | |
12954 | ||
12955 | *) ac_config_targets="$ac_config_targets $1" ;; | |
12956 | ||
12957 | esac | |
12958 | shift | |
6e3f3080 | 12959 | done |
ba479fd2 NN |
12960 | |
12961 | ac_configure_extra_args= | |
12962 | ||
12963 | if $ac_cs_silent; then | |
12964 | exec 6>/dev/null | |
12965 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
12966 | fi |
12967 | ||
ba479fd2 NN |
12968 | _ACEOF |
12969 | cat >>$CONFIG_STATUS <<_ACEOF | |
12970 | if \$ac_cs_recheck; then | |
12971 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
12972 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
12973 | fi | |
861bb6c1 | 12974 | |
ba479fd2 NN |
12975 | _ACEOF |
12976 | ||
12977 | cat >>$CONFIG_STATUS <<_ACEOF | |
12978 | # | |
12979 | # INIT-COMMANDS section. | |
12980 | # | |
12981 | ||
12982 | subdirs='$subdirs' | |
12983 | symbolic_link='$symbolic_link' | |
12984 | ||
12985 | ||
12986 | _ACEOF | |
12987 | ||
12988 | ||
12989 | ||
12990 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12991 | for ac_config_target in $ac_config_targets | |
12992 | do | |
12993 | case "$ac_config_target" in | |
12994 | # Handling of arguments. | |
12995 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
12996 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
12997 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
12998 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
12999 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
13000 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 13001 | esac |
ba479fd2 NN |
13002 | done |
13003 | ||
13004 | # If the user did not use the arguments to specify the items to instantiate, | |
13005 | # then the envvar interface is used. Set only those that are not. | |
13006 | # We use the long form for the default assignment because of an extremely | |
13007 | # bizarre bug on SunOS 4.1.3. | |
13008 | if $ac_need_defaults; then | |
13009 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
13010 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
13011 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
13012 | fi | |
13013 | ||
13014 | # Have a temporary directory for convenience. Make it in the build tree | |
13015 | # simply because there is no reason to put it here, and in addition, | |
13016 | # creating and moving files from /tmp can sometimes cause problems. | |
13017 | # Create a temporary directory, and hook for its removal unless debugging. | |
13018 | $debug || | |
13019 | { | |
13020 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
13021 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
13022 | } | |
861bb6c1 | 13023 | |
ba479fd2 | 13024 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 13025 | |
ba479fd2 NN |
13026 | { |
13027 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
13028 | test -n "$tmp" && test -d "$tmp" | |
13029 | } || | |
13030 | { | |
13031 | tmp=./confstat$$-$RANDOM | |
13032 | (umask 077 && mkdir $tmp) | |
13033 | } || | |
13034 | { | |
13035 | echo "$me: cannot create a temporary directory in ." >&2 | |
13036 | { (exit 1); exit 1; } | |
13037 | } | |
13038 | ||
13039 | _ACEOF | |
13040 | ||
13041 | cat >>$CONFIG_STATUS <<_ACEOF | |
13042 | ||
13043 | # | |
13044 | # CONFIG_FILES section. | |
13045 | # | |
13046 | ||
13047 | # No need to generate the scripts if there are no CONFIG_FILES. | |
13048 | # This happens for instance when ./config.status config.h | |
13049 | if test -n "\$CONFIG_FILES"; then | |
13050 | # Protect against being on the right side of a sed subst in config.status. | |
13051 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
13052 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
13053 | s,@SHELL@,$SHELL,;t t | |
13054 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
13055 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
13056 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
13057 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
13058 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
13059 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
13060 | s,@exec_prefix@,$exec_prefix,;t t | |
13061 | s,@prefix@,$prefix,;t t | |
13062 | s,@program_transform_name@,$program_transform_name,;t t | |
13063 | s,@bindir@,$bindir,;t t | |
13064 | s,@sbindir@,$sbindir,;t t | |
13065 | s,@libexecdir@,$libexecdir,;t t | |
13066 | s,@datadir@,$datadir,;t t | |
13067 | s,@sysconfdir@,$sysconfdir,;t t | |
13068 | s,@sharedstatedir@,$sharedstatedir,;t t | |
13069 | s,@localstatedir@,$localstatedir,;t t | |
13070 | s,@libdir@,$libdir,;t t | |
13071 | s,@includedir@,$includedir,;t t | |
13072 | s,@oldincludedir@,$oldincludedir,;t t | |
13073 | s,@infodir@,$infodir,;t t | |
13074 | s,@mandir@,$mandir,;t t | |
13075 | s,@build_alias@,$build_alias,;t t | |
13076 | s,@host_alias@,$host_alias,;t t | |
13077 | s,@target_alias@,$target_alias,;t t | |
13078 | s,@DEFS@,$DEFS,;t t | |
13079 | s,@ECHO_C@,$ECHO_C,;t t | |
13080 | s,@ECHO_N@,$ECHO_N,;t t | |
13081 | s,@ECHO_T@,$ECHO_T,;t t | |
13082 | s,@LIBS@,$LIBS,;t t | |
13083 | s,@build@,$build,;t t | |
13084 | s,@build_cpu@,$build_cpu,;t t | |
13085 | s,@build_vendor@,$build_vendor,;t t | |
13086 | s,@build_os@,$build_os,;t t | |
13087 | s,@host@,$host,;t t | |
13088 | s,@host_cpu@,$host_cpu,;t t | |
13089 | s,@host_vendor@,$host_vendor,;t t | |
13090 | s,@host_os@,$host_os,;t t | |
13091 | s,@target@,$target,;t t | |
13092 | s,@target_cpu@,$target_cpu,;t t | |
13093 | s,@target_vendor@,$target_vendor,;t t | |
13094 | s,@target_os@,$target_os,;t t | |
392765bf | 13095 | s,@target_noncanonical@,$target_noncanonical,;t t |
ba479fd2 NN |
13096 | s,@build_subdir@,$build_subdir,;t t |
13097 | s,@host_subdir@,$host_subdir,;t t | |
13098 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 13099 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
13100 | s,@CC@,$CC,;t t |
13101 | s,@CFLAGS@,$CFLAGS,;t t | |
13102 | s,@LDFLAGS@,$LDFLAGS,;t t | |
13103 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
13104 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
13105 | s,@EXEEXT@,$EXEEXT,;t t | |
13106 | s,@OBJEXT@,$OBJEXT,;t t | |
13107 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
13108 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
13109 | s,@CPP@,$CPP,;t t | |
ba479fd2 NN |
13110 | s,@strict1_warn@,$strict1_warn,;t t |
13111 | s,@warn_cflags@,$warn_cflags,;t t | |
13112 | s,@WERROR@,$WERROR,;t t | |
13113 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 13114 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
13115 | s,@EGREP@,$EGREP,;t t |
13116 | s,@valgrind_path@,$valgrind_path,;t t | |
13117 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
13118 | s,@valgrind_command@,$valgrind_command,;t t | |
13119 | s,@coverage_flags@,$coverage_flags,;t t | |
13120 | s,@enable_multilib@,$enable_multilib,;t t | |
13121 | s,@enable_shared@,$enable_shared,;t t | |
13122 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
13123 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
13124 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
13125 | s,@onestep@,$onestep,;t t | |
13126 | s,@SET_MAKE@,$SET_MAKE,;t t | |
13127 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 13128 | s,@LN_S@,$LN_S,;t t |
41e622a8 | 13129 | s,@LN@,$LN,;t t |
ba479fd2 NN |
13130 | s,@RANLIB@,$RANLIB,;t t |
13131 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 13132 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
13133 | s,@INSTALL@,$INSTALL,;t t |
13134 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
13135 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
13136 | s,@make_compare_target@,$make_compare_target,;t t | |
13137 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
13138 | s,@MAKEINFO@,$MAKEINFO,;t t | |
13139 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
13140 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
13141 | s,@FLEX@,$FLEX,;t t | |
13142 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
13143 | s,@NM@,$NM,;t t |
13144 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
13145 | s,@stage1_cflags@,$stage1_cflags,;t t |
13146 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
13147 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
13148 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
13149 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
13150 | s,@LIBICONV@,$LIBICONV,;t t | |
13151 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t | |
13152 | s,@manext@,$manext,;t t | |
13153 | s,@objext@,$objext,;t t | |
8bb915b6 | 13154 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 NN |
13155 | s,@extra_modes_file@,$extra_modes_file,;t t |
13156 | s,@FORBUILD@,$FORBUILD,;t t | |
13157 | s,@PACKAGE@,$PACKAGE,;t t | |
13158 | s,@VERSION@,$VERSION,;t t | |
13159 | s,@USE_NLS@,$USE_NLS,;t t | |
13160 | s,@LIBINTL@,$LIBINTL,;t t | |
13161 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
13162 | s,@INCINTL@,$INCINTL,;t t | |
13163 | s,@XGETTEXT@,$XGETTEXT,;t t | |
13164 | s,@GMSGFMT@,$GMSGFMT,;t t | |
13165 | s,@POSUB@,$POSUB,;t t | |
13166 | s,@CATALOGS@,$CATALOGS,;t t | |
13167 | s,@CROSS@,$CROSS,;t t | |
13168 | s,@ALL@,$ALL,;t t | |
13169 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
13170 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
13171 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
13172 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
13173 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
13174 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 13175 | s,@collect2@,$collect2,;t t |
ba479fd2 | 13176 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
13177 | s,@GGC@,$GGC,;t t |
13178 | s,@zlibdir@,$zlibdir,;t t | |
13179 | s,@zlibinc@,$zlibinc,;t t | |
13180 | s,@MAINT@,$MAINT,;t t | |
6de9cd9a DN |
13181 | s,@ANDER@,$ANDER,;t t |
13182 | s,@BANSHEEINC@,$BANSHEEINC,;t t | |
13183 | s,@BANSHEELIB@,$BANSHEELIB,;t t | |
ba479fd2 NN |
13184 | s,@gcc_tooldir@,$gcc_tooldir,;t t |
13185 | s,@dollar@,$dollar,;t t | |
13186 | s,@slibdir@,$slibdir,;t t | |
13187 | s,@objdir@,$objdir,;t t | |
13188 | s,@subdirs@,$subdirs,;t t | |
13189 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
13190 | s,@all_boot_languages@,$all_boot_languages,;t t |
13191 | s,@all_compilers@,$all_compilers,;t t | |
13192 | s,@all_gtfiles@,$all_gtfiles,;t t | |
13193 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
13194 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
13195 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
13196 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
13197 | s,@all_languages@,$all_languages,;t t | |
13198 | s,@all_stagestuff@,$all_stagestuff,;t t | |
13199 | s,@build_exeext@,$build_exeext,;t t | |
13200 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
13201 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
13202 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
13203 | s,@build_xm_defines@,$build_xm_defines,;t t | |
13204 | s,@check_languages@,$check_languages,;t t | |
13205 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
13206 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
13207 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
13208 | s,@xmake_file@,$xmake_file,;t t | |
13209 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 13210 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
13211 | s,@extra_headers_list@,$extra_headers_list,;t t |
13212 | s,@extra_objs@,$extra_objs,;t t | |
13213 | s,@extra_parts@,$extra_parts,;t t | |
13214 | s,@extra_passes@,$extra_passes,;t t | |
13215 | s,@extra_programs@,$extra_programs,;t t | |
13216 | s,@float_h_file@,$float_h_file,;t t | |
13217 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
13218 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
13219 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
13220 | s,@gcc_version@,$gcc_version,;t t | |
13221 | s,@gcc_version_full@,$gcc_version_full,;t t | |
13222 | s,@gcc_version_trigger@,$gcc_version_trigger,;t t | |
13223 | s,@host_exeext@,$host_exeext,;t t | |
ba479fd2 NN |
13224 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
13225 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
13226 | s,@host_xm_defines@,$host_xm_defines,;t t | |
13227 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
13228 | s,@install@,$install,;t t | |
13229 | s,@lang_opt_files@,$lang_opt_files,;t t | |
13230 | s,@lang_specs_files@,$lang_specs_files,;t t | |
13231 | s,@lang_tree_files@,$lang_tree_files,;t t | |
13232 | s,@local_prefix@,$local_prefix,;t t | |
13233 | s,@md_file@,$md_file,;t t | |
13234 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
13235 | s,@out_file@,$out_file,;t t | |
13236 | s,@out_object_file@,$out_object_file,;t t | |
13237 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
13238 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
13239 | s,@symbolic_link@,$symbolic_link,;t t | |
13240 | s,@thread_file@,$thread_file,;t t | |
13241 | s,@tm_file_list@,$tm_file_list,;t t | |
13242 | s,@tm_include_list@,$tm_include_list,;t t | |
13243 | s,@tm_defines@,$tm_defines,;t t | |
13244 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
13245 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
13246 | s,@xm_file_list@,$xm_file_list,;t t | |
13247 | s,@xm_include_list@,$xm_include_list,;t t | |
13248 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
13249 | s,@c_target_objs@,$c_target_objs,;t t |
13250 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
13251 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
13252 | s,@GMPLIBS@,$GMPLIBS,;t t |
13253 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
13254 | s,@LIBOBJS@,$LIBOBJS,;t t |
13255 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
13256 | /@language_hooks@/r $language_hooks | |
13257 | s,@language_hooks@,,;t t | |
13258 | CEOF | |
13259 | ||
13260 | _ACEOF | |
13261 | ||
13262 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13263 | # Split the substitutions into bite-sized pieces for seds with | |
13264 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
13265 | ac_max_sed_lines=48 | |
13266 | ac_sed_frag=1 # Number of current file. | |
13267 | ac_beg=1 # First line for current file. | |
13268 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
13269 | ac_more_lines=: | |
13270 | ac_sed_cmds= | |
13271 | while $ac_more_lines; do | |
13272 | if test $ac_beg -gt 1; then | |
13273 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
13274 | else | |
13275 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
13276 | fi | |
13277 | if test ! -s $tmp/subs.frag; then | |
13278 | ac_more_lines=false | |
13279 | else | |
13280 | # The purpose of the label and of the branching condition is to | |
13281 | # speed up the sed processing (if there are no `@' at all, there | |
13282 | # is no need to browse any of the substitutions). | |
13283 | # These are the two extra sed commands mentioned above. | |
13284 | (echo ':t | |
13285 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
13286 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 13287 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 13288 | else |
86da66b5 | 13289 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
13290 | fi |
13291 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
13292 | ac_beg=$ac_end | |
13293 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
13294 | fi | |
13295 | done | |
13296 | if test -z "$ac_sed_cmds"; then | |
13297 | ac_sed_cmds=cat | |
63cf211a | 13298 | fi |
ba479fd2 | 13299 | fi # test -n "$CONFIG_FILES" |
cafe096b | 13300 | |
ba479fd2 NN |
13301 | _ACEOF |
13302 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13303 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
13304 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
13305 | case $ac_file in | |
13306 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
13307 | cat >$tmp/stdin |
13308 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13309 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 13310 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 13311 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 13312 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 13313 | esac |
cafe096b | 13314 | |
ba479fd2 NN |
13315 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
13316 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
13317 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13318 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
13319 | X"$ac_file" : 'X\(//\)$' \| \ | |
13320 | X"$ac_file" : 'X\(/\)' \| \ | |
13321 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13322 | echo X"$ac_file" | |
13323 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13324 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13325 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13326 | /^X\(\/\).*/{ s//\1/; q; } | |
13327 | s/.*/./; q'` | |
13328 | { if $as_mkdir_p; then | |
13329 | mkdir -p "$ac_dir" | |
13330 | else | |
13331 | as_dir="$ac_dir" | |
13332 | as_dirs= | |
13333 | while test ! -d "$as_dir"; do | |
13334 | as_dirs="$as_dir $as_dirs" | |
13335 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13336 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13337 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
13338 | X"$as_dir" : 'X\(//\)$' \| \ | |
13339 | X"$as_dir" : 'X\(/\)' \| \ | |
13340 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13341 | echo X"$as_dir" | |
13342 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13343 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13344 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13345 | /^X\(\/\).*/{ s//\1/; q; } | |
13346 | s/.*/./; q'` | |
13347 | done | |
13348 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13349 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13350 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13351 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 13352 | |
ba479fd2 NN |
13353 | ac_builddir=. |
13354 | ||
13355 | if test "$ac_dir" != .; then | |
13356 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
13357 | # A "../" for each directory in $ac_dir_suffix. | |
13358 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
13359 | else | |
13360 | ac_dir_suffix= ac_top_builddir= | |
13361 | fi | |
13362 | ||
13363 | case $srcdir in | |
13364 | .) # No --srcdir option. We are building in place. | |
13365 | ac_srcdir=. | |
13366 | if test -z "$ac_top_builddir"; then | |
13367 | ac_top_srcdir=. | |
13368 | else | |
13369 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
13370 | fi ;; | |
13371 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
13372 | ac_srcdir=$srcdir$ac_dir_suffix; | |
13373 | ac_top_srcdir=$srcdir ;; | |
13374 | *) # Relative path. | |
13375 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
13376 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
13377 | esac | |
8ab705be KC |
13378 | |
13379 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
13380 | # the directories may not exist. | |
13381 | case `pwd` in | |
13382 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 13383 | *) |
8ab705be KC |
13384 | case "$ac_dir" in |
13385 | .) ac_abs_builddir=`pwd`;; | |
13386 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
13387 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
13388 | esac;; |
13389 | esac | |
8ab705be | 13390 | case $ac_abs_builddir in |
86da66b5 HPN |
13391 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
13392 | *) | |
13393 | case ${ac_top_builddir}. in | |
8ab705be | 13394 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 13395 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 13396 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
13397 | esac;; |
13398 | esac | |
8ab705be | 13399 | case $ac_abs_builddir in |
86da66b5 HPN |
13400 | .) ac_abs_srcdir=$ac_srcdir;; |
13401 | *) | |
13402 | case $ac_srcdir in | |
8ab705be | 13403 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 13404 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 13405 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
13406 | esac;; |
13407 | esac | |
8ab705be | 13408 | case $ac_abs_builddir in |
86da66b5 HPN |
13409 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
13410 | *) | |
13411 | case $ac_top_srcdir in | |
8ab705be | 13412 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 13413 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 13414 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
13415 | esac;; |
13416 | esac | |
ba479fd2 NN |
13417 | |
13418 | ||
13419 | ||
ba479fd2 NN |
13420 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
13421 | # use $as_me), people would be surprised to read: | |
13422 | # /* config.h. Generated by config.status. */ | |
13423 | if test x"$ac_file" = x-; then | |
13424 | configure_input= | |
13425 | else | |
13426 | configure_input="$ac_file. " | |
13427 | fi | |
13428 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 13429 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
13430 | |
13431 | # First look for the input files in the build tree, otherwise in the | |
13432 | # src tree. | |
13433 | ac_file_inputs=`IFS=: | |
13434 | for f in $ac_file_in; do | |
13435 | case $f in | |
13436 | -) echo $tmp/stdin ;; | |
13437 | [\\/$]*) | |
86da66b5 HPN |
13438 | # Absolute (can't be DOS-style, as IFS=:) |
13439 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13440 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13441 | { (exit 1); exit 1; }; } | |
86da66b5 | 13442 | echo "$f";; |
ba479fd2 | 13443 | *) # Relative |
86da66b5 HPN |
13444 | if test -f "$f"; then |
13445 | # Build tree | |
13446 | echo "$f" | |
13447 | elif test -f "$srcdir/$f"; then | |
13448 | # Source tree | |
13449 | echo "$srcdir/$f" | |
13450 | else | |
13451 | # /dev/null tree | |
13452 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13453 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13454 | { (exit 1); exit 1; }; } | |
86da66b5 | 13455 | fi;; |
ba479fd2 NN |
13456 | esac |
13457 | done` || { (exit 1); exit 1; } | |
fb38008e BE |
13458 | |
13459 | if test x"$ac_file" != x-; then | |
13460 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
13461 | echo "$as_me: creating $ac_file" >&6;} | |
13462 | rm -f "$ac_file" | |
13463 | fi | |
ba479fd2 NN |
13464 | _ACEOF |
13465 | cat >>$CONFIG_STATUS <<_ACEOF | |
13466 | sed "$ac_vpsub | |
13467 | $extrasub | |
13468 | _ACEOF | |
13469 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13470 | :t | |
13471 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
13472 | s,@configure_input@,$configure_input,;t t | |
13473 | s,@srcdir@,$ac_srcdir,;t t | |
13474 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
13475 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
13476 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
13477 | s,@builddir@,$ac_builddir,;t t | |
13478 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
13479 | s,@top_builddir@,$ac_top_builddir,;t t | |
13480 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
13481 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
13482 | rm -f $tmp/stdin | |
13483 | if test x"$ac_file" != x-; then | |
13484 | mv $tmp/out $ac_file | |
13485 | else | |
13486 | cat $tmp/out | |
13487 | rm -f $tmp/out | |
13488 | fi | |
13489 | ||
13490 | done | |
13491 | _ACEOF | |
13492 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 13493 | |
ba479fd2 NN |
13494 | # |
13495 | # CONFIG_HEADER section. | |
13496 | # | |
861bb6c1 JL |
13497 | |
13498 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
13499 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
13500 | # | |
13501 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
13502 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
13503 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
13504 | ac_dC=' ' |
13505 | ac_dD=',;t' | |
13506 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 13507 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 13508 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 13509 | ac_uC=' ' |
ba479fd2 NN |
13510 | ac_uD=',;t' |
13511 | ||
13512 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 13513 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
13514 | case $ac_file in |
13515 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
13516 | cat >$tmp/stdin |
13517 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13518 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 13519 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 13520 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 13521 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
13522 | esac |
13523 | ||
ba479fd2 NN |
13524 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
13525 | echo "$as_me: creating $ac_file" >&6;} | |
13526 | ||
13527 | # First look for the input files in the build tree, otherwise in the | |
13528 | # src tree. | |
13529 | ac_file_inputs=`IFS=: | |
13530 | for f in $ac_file_in; do | |
13531 | case $f in | |
13532 | -) echo $tmp/stdin ;; | |
13533 | [\\/$]*) | |
86da66b5 HPN |
13534 | # Absolute (can't be DOS-style, as IFS=:) |
13535 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13536 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13537 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
13538 | # Do quote $f, to prevent DOS paths from being IFS'd. |
13539 | echo "$f";; | |
ba479fd2 | 13540 | *) # Relative |
86da66b5 HPN |
13541 | if test -f "$f"; then |
13542 | # Build tree | |
13543 | echo "$f" | |
13544 | elif test -f "$srcdir/$f"; then | |
13545 | # Source tree | |
13546 | echo "$srcdir/$f" | |
13547 | else | |
13548 | # /dev/null tree | |
13549 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
13550 | echo "$as_me: error: cannot find input file: $f" >&2;} |
13551 | { (exit 1); exit 1; }; } | |
86da66b5 | 13552 | fi;; |
ba479fd2 NN |
13553 | esac |
13554 | done` || { (exit 1); exit 1; } | |
13555 | # Remove the trailing spaces. | |
86da66b5 | 13556 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
13557 | |
13558 | _ACEOF | |
13559 | ||
13560 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
13561 | # `conftest.undefs', that substitutes the proper values into | |
13562 | # config.h.in to produce config.h. The first handles `#define' | |
13563 | # templates, and the second `#undef' templates. | |
13564 | # And first: Protect against being on the right side of a sed subst in | |
13565 | # config.status. Protect against being in an unquoted here document | |
13566 | # in config.status. | |
13567 | rm -f conftest.defines conftest.undefs | |
13568 | # Using a here document instead of a string reduces the quoting nightmare. | |
13569 | # Putting comments in sed scripts is not portable. | |
13570 | # | |
13571 | # `end' is used to avoid that the second main sed command (meant for | |
13572 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
13573 | # See the Autoconf documentation for `clear'. | |
13574 | cat >confdef2sed.sed <<\_ACEOF | |
13575 | s/[\\&,]/\\&/g | |
13576 | s,[\\$`],\\&,g | |
13577 | t clear | |
13578 | : clear | |
86da66b5 | 13579 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 13580 | t end |
86da66b5 | 13581 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
13582 | : end |
13583 | _ACEOF | |
13584 | # If some macros were called several times there might be several times | |
13585 | # the same #defines, which is useless. Nevertheless, we may not want to | |
13586 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
13587 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
13588 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
13589 | rm -f confdef2sed.sed | |
861bb6c1 JL |
13590 | |
13591 | # This sed command replaces #undef with comments. This is necessary, for | |
13592 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
13593 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 13594 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 13595 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
13596 | _ACEOF |
13597 | ||
13598 | # Break up conftest.defines because some shells have a limit on the size | |
13599 | # of here documents, and old seds have small limits too (100 cmds). | |
13600 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 13601 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
13602 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
13603 | echo ' :' >>$CONFIG_STATUS | |
13604 | rm -f conftest.tail | |
13605 | while grep . conftest.defines >/dev/null | |
13606 | do | |
13607 | # Write a limited-size here document to $tmp/defines.sed. | |
13608 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
13609 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 13610 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
13611 | # Work around the forget-to-reset-the-flag bug. |
13612 | echo 't clr' >>$CONFIG_STATUS | |
13613 | echo ': clr' >>$CONFIG_STATUS | |
13614 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
13615 | echo 'CEOF | |
13616 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
13617 | rm -f $tmp/in | |
13618 | mv $tmp/out $tmp/in | |
13619 | ' >>$CONFIG_STATUS | |
13620 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
13621 | rm -f conftest.defines | |
13622 | mv conftest.tail conftest.defines | |
13623 | done | |
13624 | rm -f conftest.defines | |
13625 | echo ' fi # grep' >>$CONFIG_STATUS | |
13626 | echo >>$CONFIG_STATUS | |
861bb6c1 | 13627 | |
ba479fd2 NN |
13628 | # Break up conftest.undefs because some shells have a limit on the size |
13629 | # of here documents, and old seds have small limits too (100 cmds). | |
13630 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 13631 | rm -f conftest.tail |
ba479fd2 | 13632 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 13633 | do |
ba479fd2 NN |
13634 | # Write a limited-size here document to $tmp/undefs.sed. |
13635 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
13636 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 13637 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
13638 | # Work around the forget-to-reset-the-flag bug. |
13639 | echo 't clr' >>$CONFIG_STATUS | |
13640 | echo ': clr' >>$CONFIG_STATUS | |
13641 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 13642 | echo 'CEOF |
ba479fd2 NN |
13643 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
13644 | rm -f $tmp/in | |
13645 | mv $tmp/out $tmp/in | |
13646 | ' >>$CONFIG_STATUS | |
13647 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
13648 | rm -f conftest.undefs | |
13649 | mv conftest.tail conftest.undefs | |
861bb6c1 | 13650 | done |
ba479fd2 NN |
13651 | rm -f conftest.undefs |
13652 | ||
13653 | cat >>$CONFIG_STATUS <<\_ACEOF | |
13654 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
13655 | # use $as_me), people would be surprised to read: | |
13656 | # /* config.h. Generated by config.status. */ | |
13657 | if test x"$ac_file" = x-; then | |
13658 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 13659 | else |
ba479fd2 | 13660 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 13661 | fi |
ba479fd2 NN |
13662 | cat $tmp/in >>$tmp/config.h |
13663 | rm -f $tmp/in | |
13664 | if test x"$ac_file" != x-; then | |
13665 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
13666 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
13667 | echo "$as_me: $ac_file is unchanged" >&6;} | |
13668 | else | |
13669 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
13670 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13671 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
13672 | X"$ac_file" : 'X\(//\)$' \| \ | |
13673 | X"$ac_file" : 'X\(/\)' \| \ | |
13674 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13675 | echo X"$ac_file" | |
13676 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13677 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13678 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13679 | /^X\(\/\).*/{ s//\1/; q; } | |
13680 | s/.*/./; q'` | |
13681 | { if $as_mkdir_p; then | |
13682 | mkdir -p "$ac_dir" | |
13683 | else | |
13684 | as_dir="$ac_dir" | |
13685 | as_dirs= | |
13686 | while test ! -d "$as_dir"; do | |
13687 | as_dirs="$as_dir $as_dirs" | |
13688 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13689 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13690 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
13691 | X"$as_dir" : 'X\(//\)$' \| \ | |
13692 | X"$as_dir" : 'X\(/\)' \| \ | |
13693 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13694 | echo X"$as_dir" | |
13695 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13696 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13697 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13698 | /^X\(\/\).*/{ s//\1/; q; } | |
13699 | s/.*/./; q'` | |
13700 | done | |
13701 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13702 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13703 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13704 | { (exit 1); exit 1; }; }; } | |
63cf211a | 13705 | |
ba479fd2 NN |
13706 | rm -f $ac_file |
13707 | mv $tmp/config.h $ac_file | |
13708 | fi | |
13709 | else | |
13710 | cat $tmp/config.h | |
13711 | rm -f $tmp/config.h | |
13712 | fi | |
13713 | done | |
13714 | _ACEOF | |
13715 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 13716 | |
ba479fd2 NN |
13717 | # |
13718 | # CONFIG_COMMANDS section. | |
13719 | # | |
13720 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
13721 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
13722 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
13723 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
13724 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
13725 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
13726 | X"$ac_dest" : 'X\(//\)$' \| \ | |
13727 | X"$ac_dest" : 'X\(/\)' \| \ | |
13728 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
13729 | echo X"$ac_dest" | |
13730 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13731 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13732 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13733 | /^X\(\/\).*/{ s//\1/; q; } | |
13734 | s/.*/./; q'` | |
86da66b5 HPN |
13735 | { if $as_mkdir_p; then |
13736 | mkdir -p "$ac_dir" | |
13737 | else | |
13738 | as_dir="$ac_dir" | |
13739 | as_dirs= | |
13740 | while test ! -d "$as_dir"; do | |
13741 | as_dirs="$as_dir $as_dirs" | |
13742 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
13743 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
13744 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
13745 | X"$as_dir" : 'X\(//\)$' \| \ | |
13746 | X"$as_dir" : 'X\(/\)' \| \ | |
13747 | . : '\(.\)' 2>/dev/null || | |
13748 | echo X"$as_dir" | | |
13749 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
13750 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
13751 | /^X\(\/\/\)$/{ s//\1/; q; } | |
13752 | /^X\(\/\).*/{ s//\1/; q; } | |
13753 | s/.*/./; q'` | |
13754 | done | |
13755 | test ! -n "$as_dirs" || mkdir $as_dirs | |
13756 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
13757 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
13758 | { (exit 1); exit 1; }; }; } | |
13759 | ||
ba479fd2 NN |
13760 | ac_builddir=. |
13761 | ||
13762 | if test "$ac_dir" != .; then | |
13763 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
13764 | # A "../" for each directory in $ac_dir_suffix. | |
13765 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
13766 | else | |
13767 | ac_dir_suffix= ac_top_builddir= | |
13768 | fi | |
13769 | ||
13770 | case $srcdir in | |
13771 | .) # No --srcdir option. We are building in place. | |
13772 | ac_srcdir=. | |
13773 | if test -z "$ac_top_builddir"; then | |
13774 | ac_top_srcdir=. | |
13775 | else | |
13776 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
13777 | fi ;; | |
13778 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
13779 | ac_srcdir=$srcdir$ac_dir_suffix; | |
13780 | ac_top_srcdir=$srcdir ;; | |
13781 | *) # Relative path. | |
13782 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
13783 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
13784 | esac | |
8ab705be KC |
13785 | |
13786 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
13787 | # the directories may not exist. | |
13788 | case `pwd` in | |
13789 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 13790 | *) |
8ab705be KC |
13791 | case "$ac_dir" in |
13792 | .) ac_abs_builddir=`pwd`;; | |
13793 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
13794 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
13795 | esac;; |
13796 | esac | |
8ab705be | 13797 | case $ac_abs_builddir in |
86da66b5 HPN |
13798 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
13799 | *) | |
13800 | case ${ac_top_builddir}. in | |
8ab705be | 13801 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 13802 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 13803 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
13804 | esac;; |
13805 | esac | |
8ab705be | 13806 | case $ac_abs_builddir in |
86da66b5 HPN |
13807 | .) ac_abs_srcdir=$ac_srcdir;; |
13808 | *) | |
13809 | case $ac_srcdir in | |
8ab705be | 13810 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 13811 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 13812 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
13813 | esac;; |
13814 | esac | |
8ab705be | 13815 | case $ac_abs_builddir in |
86da66b5 HPN |
13816 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
13817 | *) | |
13818 | case $ac_top_srcdir in | |
8ab705be | 13819 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 13820 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 13821 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
13822 | esac;; |
13823 | esac | |
ba479fd2 NN |
13824 | |
13825 | ||
13826 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
13827 | echo "$as_me: executing $ac_dest commands" >&6;} | |
13828 | case $ac_dest in | |
13829 | default ) | |
f1faaabd NN |
13830 | case ${CONFIG_HEADERS} in |
13831 | *auto-host.h:config.in*) | |
13832 | echo > cstamp-h ;; | |
861bb6c1 | 13833 | esac |
2ed26f6b | 13834 | # Make sure all the subdirs exist. |
c406e779 | 13835 | for d in $subdirs |
2ed26f6b | 13836 | do |
2ed26f6b | 13837 | test -d $d || mkdir $d |
2ed26f6b | 13838 | done |
93cf819d BK |
13839 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
13840 | # bootstrapping and the installation procedure can still use | |
13841 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
13842 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
13843 | # This is virtually a duplicate of what happens in configure.lang; we do | |
13844 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 13845 | if test "$symbolic_link" = "ln -s"; then |
c406e779 | 13846 | for d in ${subdirs} fixinc ; do |
1e6347d8 | 13847 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 13848 | cd $d |
6a1b7268 | 13849 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
13850 | do |
13851 | rm -f $t | |
13852 | $symbolic_link ../$t $t 2>/dev/null | |
13853 | done | |
13854 | cd $STARTDIR | |
93cf819d BK |
13855 | done |
13856 | else true ; fi | |
ba479fd2 NN |
13857 | ;; |
13858 | esac | |
13859 | done | |
13860 | _ACEOF | |
cafe096b | 13861 | |
ba479fd2 NN |
13862 | cat >>$CONFIG_STATUS <<\_ACEOF |
13863 | ||
13864 | { (exit 0); exit 0; } | |
13865 | _ACEOF | |
861bb6c1 | 13866 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
13867 | ac_clean_files=$ac_clean_files_save |
13868 | ||
13869 | ||
13870 | # configure is writing to config.log, and then calls config.status. | |
13871 | # config.status does its own redirection, appending to config.log. | |
13872 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
13873 | # by configure, so config.status won't be able to write to it; its | |
13874 | # output is simply discarded. So we exec the FD to /dev/null, | |
13875 | # effectively closing config.log, so it can be properly (re)opened and | |
13876 | # appended to by config.status. When coming back to configure, we | |
13877 | # need to make the FD available again. | |
13878 | if test "$no_create" != yes; then | |
13879 | ac_cs_success=: | |
13880 | ac_config_status_args= | |
13881 | test "$silent" = yes && | |
13882 | ac_config_status_args="$ac_config_status_args --quiet" | |
13883 | exec 5>/dev/null | |
13884 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
13885 | exec 5>>config.log | |
13886 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
13887 | # would make configure fail if this is the last instruction. | |
13888 | $ac_cs_success || { (exit 1); exit 1; } | |
13889 | fi | |
861bb6c1 | 13890 |