]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
ba479fd2 | 3 | # Generated by GNU Autoconf 2.57. |
861bb6c1 | 4 | # |
ba479fd2 NN |
5 | # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 |
6 | # Free Software Foundation, Inc. | |
861bb6c1 JL |
7 | # This configure script is free software; the Free Software Foundation |
8 | # gives unlimited permission to copy, distribute and modify it. | |
ba479fd2 NN |
9 | ## --------------------- ## |
10 | ## M4sh Initialization. ## | |
11 | ## --------------------- ## | |
12 | ||
13 | # Be Bourne compatible | |
14 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
15 | emulate sh | |
16 | NULLCMD=: | |
17 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
18 | # is contrary to our usage. Disable this feature. | |
19 | alias -g '${1+"$@"}'='"$@"' | |
20 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
21 | set -o posix | |
22 | fi | |
23 | ||
24 | # Support unset when possible. | |
25 | if (FOO=FOO; unset FOO) >/dev/null 2>&1; then | |
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 | |
44 | if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then | |
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 | |
221 | as_mkdir_p=false | |
222 | fi | |
223 | ||
224 | as_executable_p="test -f" | |
225 | ||
226 | # Sed expression to map a string onto a valid CPP name. | |
227 | as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" | |
228 | ||
229 | # Sed expression to map a string onto a valid variable name. | |
230 | as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" | |
231 | ||
232 | ||
233 | # IFS | |
234 | # We need space, tab and new line, in precisely that order. | |
235 | as_nl=' | |
236 | ' | |
237 | IFS=" $as_nl" | |
238 | ||
239 | # CDPATH. | |
240 | $as_unset CDPATH | |
241 | ||
242 | ||
243 | # Name of the host. | |
244 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
245 | # so uname gets run too. | |
246 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
247 | ||
248 | exec 6>&1 | |
249 | ||
250 | # | |
251 | # Initializations. | |
252 | # | |
861bb6c1 | 253 | ac_default_prefix=/usr/local |
ba479fd2 NN |
254 | ac_config_libobj_dir=. |
255 | cross_compiling=no | |
256 | subdirs= | |
257 | MFLAGS= | |
258 | MAKEFLAGS= | |
259 | SHELL=${CONFIG_SHELL-/bin/sh} | |
260 | ||
261 | # Maximum number of lines to put in a shell here document. | |
262 | # This variable seems obsolete. It should probably be removed, and | |
263 | # only ac_max_sed_lines should be used. | |
264 | : ${ac_max_here_lines=38} | |
265 | ||
266 | # Identity of this package. | |
267 | PACKAGE_NAME= | |
268 | PACKAGE_TARNAME= | |
269 | PACKAGE_VERSION= | |
270 | PACKAGE_STRING= | |
271 | PACKAGE_BUGREPORT= | |
272 | ||
273 | ac_unique_file="tree.c" | |
274 | # Factoring default headers for most tests. | |
275 | ac_includes_default="\ | |
276 | #include <stdio.h> | |
277 | #if HAVE_SYS_TYPES_H | |
278 | # include <sys/types.h> | |
279 | #endif | |
280 | #if HAVE_SYS_STAT_H | |
281 | # include <sys/stat.h> | |
282 | #endif | |
283 | #if STDC_HEADERS | |
284 | # include <stdlib.h> | |
285 | # include <stddef.h> | |
286 | #else | |
287 | # if HAVE_STDLIB_H | |
288 | # include <stdlib.h> | |
289 | # endif | |
290 | #endif | |
291 | #if HAVE_STRING_H | |
292 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
293 | # include <memory.h> | |
294 | # endif | |
295 | # include <string.h> | |
296 | #endif | |
297 | #if HAVE_STRINGS_H | |
298 | # include <strings.h> | |
299 | #endif | |
300 | #if HAVE_INTTYPES_H | |
301 | # include <inttypes.h> | |
302 | #else | |
303 | # if HAVE_STDINT_H | |
304 | # include <stdint.h> | |
305 | # endif | |
306 | #endif | |
307 | #if HAVE_UNISTD_H | |
308 | # include <unistd.h> | |
309 | #endif" | |
310 | ||
03787dfd | 311 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP GNATBIND ac_ct_GNATBIND strict1_warn warn_cflags WERROR nocommon_flag 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 LN_S RANLIB ac_ct_RANLIB INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LIBICONV_DEP manext objext extra_modes_file FORBUILD PACKAGE VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS CROSS ALL SYSTEM_HEADER_DIR inhibit_libc BUILD_PREFIX BUILD_PREFIX_1 CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO libgcc_visibility gthread_flags GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir docobjdir 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_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_extra_gcc_objs host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure symbolic_link thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines target_noncanonical c_target_objs cxx_target_objs target_cpu_default LIBOBJS LTLIBOBJS' |
ba479fd2 | 312 | ac_subst_files='language_hooks' |
861bb6c1 JL |
313 | |
314 | # Initialize some variables set by options. | |
ba479fd2 NN |
315 | ac_init_help= |
316 | ac_init_version=false | |
861bb6c1 JL |
317 | # The variables have the same names as the options, with |
318 | # dashes changed to underlines. | |
ba479fd2 | 319 | cache_file=/dev/null |
861bb6c1 | 320 | exec_prefix=NONE |
861bb6c1 | 321 | no_create= |
861bb6c1 JL |
322 | no_recursion= |
323 | prefix=NONE | |
324 | program_prefix=NONE | |
325 | program_suffix=NONE | |
326 | program_transform_name=s,x,x, | |
327 | silent= | |
328 | site= | |
329 | srcdir= | |
861bb6c1 JL |
330 | verbose= |
331 | x_includes=NONE | |
332 | x_libraries=NONE | |
ba479fd2 NN |
333 | |
334 | # Installation directory options. | |
335 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
336 | # and all the variables that are supposed to be based on exec_prefix | |
337 | # by default will actually change. | |
338 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
861bb6c1 JL |
339 | bindir='${exec_prefix}/bin' |
340 | sbindir='${exec_prefix}/sbin' | |
341 | libexecdir='${exec_prefix}/libexec' | |
342 | datadir='${prefix}/share' | |
343 | sysconfdir='${prefix}/etc' | |
344 | sharedstatedir='${prefix}/com' | |
345 | localstatedir='${prefix}/var' | |
346 | libdir='${exec_prefix}/lib' | |
347 | includedir='${prefix}/include' | |
348 | oldincludedir='/usr/include' | |
349 | infodir='${prefix}/info' | |
350 | mandir='${prefix}/man' | |
351 | ||
861bb6c1 JL |
352 | ac_prev= |
353 | for ac_option | |
354 | do | |
861bb6c1 JL |
355 | # If the previous option needs an argument, assign it. |
356 | if test -n "$ac_prev"; then | |
357 | eval "$ac_prev=\$ac_option" | |
358 | ac_prev= | |
359 | continue | |
360 | fi | |
361 | ||
ba479fd2 | 362 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
363 | |
364 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
365 | ||
ba479fd2 | 366 | case $ac_option in |
861bb6c1 JL |
367 | |
368 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
369 | ac_prev=bindir ;; | |
370 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 371 | bindir=$ac_optarg ;; |
861bb6c1 JL |
372 | |
373 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 374 | ac_prev=build_alias ;; |
861bb6c1 | 375 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 376 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
377 | |
378 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
379 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
380 | ac_prev=cache_file ;; | |
381 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
382 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
383 | cache_file=$ac_optarg ;; |
384 | ||
385 | --config-cache | -C) | |
386 | cache_file=config.cache ;; | |
861bb6c1 JL |
387 | |
388 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
389 | ac_prev=datadir ;; | |
390 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
391 | | --da=*) | |
ba479fd2 | 392 | datadir=$ac_optarg ;; |
861bb6c1 JL |
393 | |
394 | -disable-* | --disable-*) | |
ba479fd2 | 395 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 396 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
397 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
398 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
399 | { (exit 1); exit 1; }; } | |
400 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
401 | eval "enable_$ac_feature=no" ;; | |
861bb6c1 JL |
402 | |
403 | -enable-* | --enable-*) | |
ba479fd2 | 404 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 405 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
406 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
407 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
408 | { (exit 1); exit 1; }; } | |
409 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
410 | case $ac_option in | |
411 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
412 | *) ac_optarg=yes ;; |
413 | esac | |
ba479fd2 | 414 | eval "enable_$ac_feature='$ac_optarg'" ;; |
861bb6c1 JL |
415 | |
416 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
417 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
418 | | --exec | --exe | --ex) | |
419 | ac_prev=exec_prefix ;; | |
420 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
421 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
422 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 423 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
424 | |
425 | -gas | --gas | --ga | --g) | |
426 | # Obsolete; use --with-gas. | |
427 | with_gas=yes ;; | |
428 | ||
ba479fd2 NN |
429 | -help | --help | --hel | --he | -h) |
430 | ac_init_help=long ;; | |
431 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
432 | ac_init_help=recursive ;; | |
433 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
434 | ac_init_help=short ;; | |
861bb6c1 JL |
435 | |
436 | -host | --host | --hos | --ho) | |
ba479fd2 | 437 | ac_prev=host_alias ;; |
861bb6c1 | 438 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 439 | host_alias=$ac_optarg ;; |
861bb6c1 JL |
440 | |
441 | -includedir | --includedir | --includedi | --included | --include \ | |
442 | | --includ | --inclu | --incl | --inc) | |
443 | ac_prev=includedir ;; | |
444 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
445 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 446 | includedir=$ac_optarg ;; |
861bb6c1 JL |
447 | |
448 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
449 | ac_prev=infodir ;; | |
450 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 451 | infodir=$ac_optarg ;; |
861bb6c1 JL |
452 | |
453 | -libdir | --libdir | --libdi | --libd) | |
454 | ac_prev=libdir ;; | |
455 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 456 | libdir=$ac_optarg ;; |
861bb6c1 JL |
457 | |
458 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
459 | | --libexe | --libex | --libe) | |
460 | ac_prev=libexecdir ;; | |
461 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
462 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 463 | libexecdir=$ac_optarg ;; |
861bb6c1 JL |
464 | |
465 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
466 | | --localstate | --localstat | --localsta | --localst \ | |
467 | | --locals | --local | --loca | --loc | --lo) | |
468 | ac_prev=localstatedir ;; | |
469 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
470 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
471 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
ba479fd2 | 472 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
473 | |
474 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
475 | ac_prev=mandir ;; | |
476 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 477 | mandir=$ac_optarg ;; |
861bb6c1 JL |
478 | |
479 | -nfp | --nfp | --nf) | |
480 | # Obsolete; use --without-fp. | |
481 | with_fp=no ;; | |
482 | ||
483 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 484 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
485 | no_create=yes ;; |
486 | ||
487 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
488 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
489 | no_recursion=yes ;; | |
490 | ||
491 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
492 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
493 | | --oldin | --oldi | --old | --ol | --o) | |
494 | ac_prev=oldincludedir ;; | |
495 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
496 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
497 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 498 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
499 | |
500 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
501 | ac_prev=prefix ;; | |
502 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 503 | prefix=$ac_optarg ;; |
861bb6c1 JL |
504 | |
505 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
506 | | --program-pre | --program-pr | --program-p) | |
507 | ac_prev=program_prefix ;; | |
508 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
509 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 510 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
511 | |
512 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
513 | | --program-suf | --program-su | --program-s) | |
514 | ac_prev=program_suffix ;; | |
515 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
516 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 517 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
518 | |
519 | -program-transform-name | --program-transform-name \ | |
520 | | --program-transform-nam | --program-transform-na \ | |
521 | | --program-transform-n | --program-transform- \ | |
522 | | --program-transform | --program-transfor \ | |
523 | | --program-transfo | --program-transf \ | |
524 | | --program-trans | --program-tran \ | |
525 | | --progr-tra | --program-tr | --program-t) | |
526 | ac_prev=program_transform_name ;; | |
527 | -program-transform-name=* | --program-transform-name=* \ | |
528 | | --program-transform-nam=* | --program-transform-na=* \ | |
529 | | --program-transform-n=* | --program-transform-=* \ | |
530 | | --program-transform=* | --program-transfor=* \ | |
531 | | --program-transfo=* | --program-transf=* \ | |
532 | | --program-trans=* | --program-tran=* \ | |
533 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 534 | program_transform_name=$ac_optarg ;; |
861bb6c1 JL |
535 | |
536 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
537 | | -silent | --silent | --silen | --sile | --sil) | |
538 | silent=yes ;; | |
539 | ||
540 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
541 | ac_prev=sbindir ;; | |
542 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
543 | | --sbi=* | --sb=*) | |
ba479fd2 | 544 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
545 | |
546 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
547 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
548 | | --sharedst | --shareds | --shared | --share | --shar \ | |
549 | | --sha | --sh) | |
550 | ac_prev=sharedstatedir ;; | |
551 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
552 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
553 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
554 | | --sha=* | --sh=*) | |
ba479fd2 | 555 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
556 | |
557 | -site | --site | --sit) | |
558 | ac_prev=site ;; | |
559 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 560 | site=$ac_optarg ;; |
861bb6c1 JL |
561 | |
562 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
563 | ac_prev=srcdir ;; | |
564 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 565 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
566 | |
567 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
568 | | --syscon | --sysco | --sysc | --sys | --sy) | |
569 | ac_prev=sysconfdir ;; | |
570 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
571 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 572 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
573 | |
574 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 575 | ac_prev=target_alias ;; |
861bb6c1 | 576 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 577 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
578 | |
579 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
580 | verbose=yes ;; | |
581 | ||
ba479fd2 NN |
582 | -version | --version | --versio | --versi | --vers | -V) |
583 | ac_init_version=: ;; | |
861bb6c1 JL |
584 | |
585 | -with-* | --with-*) | |
ba479fd2 | 586 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 587 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
588 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
589 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
590 | { (exit 1); exit 1; }; } | |
861bb6c1 | 591 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
ba479fd2 NN |
592 | case $ac_option in |
593 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
594 | *) ac_optarg=yes ;; |
595 | esac | |
ba479fd2 | 596 | eval "with_$ac_package='$ac_optarg'" ;; |
861bb6c1 JL |
597 | |
598 | -without-* | --without-*) | |
ba479fd2 | 599 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 600 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
601 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
602 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
603 | { (exit 1); exit 1; }; } | |
604 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
605 | eval "with_$ac_package=no" ;; | |
861bb6c1 JL |
606 | |
607 | --x) | |
608 | # Obsolete; use --with-x. | |
609 | with_x=yes ;; | |
610 | ||
611 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
612 | | --x-incl | --x-inc | --x-in | --x-i) | |
613 | ac_prev=x_includes ;; | |
614 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
615 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 616 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
617 | |
618 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
619 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
620 | ac_prev=x_libraries ;; | |
621 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
622 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 623 | x_libraries=$ac_optarg ;; |
861bb6c1 | 624 | |
ba479fd2 NN |
625 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
626 | Try \`$0 --help' for more information." >&2 | |
627 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
628 | ;; |
629 | ||
ba479fd2 NN |
630 | *=*) |
631 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
632 | # Reject names that are not valid shell variable names. | |
633 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
634 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
635 | { (exit 1); exit 1; }; } | |
636 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
637 | eval "$ac_envvar='$ac_optarg'" | |
638 | export $ac_envvar ;; | |
639 | ||
861bb6c1 | 640 | *) |
ba479fd2 NN |
641 | # FIXME: should be removed in autoconf 3.0. |
642 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
643 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
644 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
645 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
646 | ;; |
647 | ||
648 | esac | |
649 | done | |
650 | ||
651 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
652 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
653 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
654 | { (exit 1); exit 1; }; } | |
63cf211a | 655 | fi |
63cf211a | 656 | |
ba479fd2 NN |
657 | # Be sure to have absolute paths. |
658 | for ac_var in exec_prefix prefix | |
659 | do | |
660 | eval ac_val=$`echo $ac_var` | |
661 | case $ac_val in | |
662 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
663 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
664 | { (exit 1); exit 1; }; };; | |
665 | esac | |
666 | done | |
093e61a6 | 667 | |
ba479fd2 NN |
668 | # Be sure to have absolute paths. |
669 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
670 | localstatedir libdir includedir oldincludedir infodir mandir | |
861bb6c1 | 671 | do |
ba479fd2 NN |
672 | eval ac_val=$`echo $ac_var` |
673 | case $ac_val in | |
674 | [\\/$]* | ?:[\\/]* ) ;; | |
675 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
676 | { (exit 1); exit 1; }; };; | |
861bb6c1 JL |
677 | esac |
678 | done | |
679 | ||
ba479fd2 NN |
680 | # There might be people who depend on the old broken behavior: `$host' |
681 | # used to hold the argument of --host etc. | |
682 | # FIXME: To remove some day. | |
683 | build=$build_alias | |
684 | host=$host_alias | |
685 | target=$target_alias | |
686 | ||
687 | # FIXME: To remove some day. | |
688 | if test "x$host_alias" != x; then | |
689 | if test "x$build_alias" = x; then | |
690 | cross_compiling=maybe | |
691 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
692 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
693 | elif test "x$build_alias" != "x$host_alias"; then | |
694 | cross_compiling=yes | |
695 | fi | |
696 | fi | |
6e3f3080 | 697 | |
ba479fd2 NN |
698 | ac_tool_prefix= |
699 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
700 | ||
701 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 702 | |
861bb6c1 JL |
703 | |
704 | # Find the source files, if location was not specified. | |
705 | if test -z "$srcdir"; then | |
706 | ac_srcdir_defaulted=yes | |
707 | # Try the directory containing this script, then its parent. | |
ba479fd2 NN |
708 | ac_confdir=`(dirname "$0") 2>/dev/null || |
709 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
710 | X"$0" : 'X\(//\)[^/]' \| \ | |
711 | X"$0" : 'X\(//\)$' \| \ | |
712 | X"$0" : 'X\(/\)' \| \ | |
713 | . : '\(.\)' 2>/dev/null || | |
714 | echo X"$0" | | |
715 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
716 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
717 | /^X\(\/\/\)$/{ s//\1/; q; } | |
718 | /^X\(\/\).*/{ s//\1/; q; } | |
719 | s/.*/./; q'` | |
861bb6c1 JL |
720 | srcdir=$ac_confdir |
721 | if test ! -r $srcdir/$ac_unique_file; then | |
722 | srcdir=.. | |
723 | fi | |
724 | else | |
725 | ac_srcdir_defaulted=no | |
726 | fi | |
727 | if test ! -r $srcdir/$ac_unique_file; then | |
728 | if test "$ac_srcdir_defaulted" = yes; then | |
ba479fd2 NN |
729 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
730 | { (exit 1); exit 1; }; } | |
63cf211a | 731 | else |
ba479fd2 NN |
732 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
733 | { (exit 1); exit 1; }; } | |
63cf211a NN |
734 | fi |
735 | fi | |
ba479fd2 NN |
736 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
737 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
738 | { (exit 1); exit 1; }; } | |
739 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
740 | ac_env_build_alias_set=${build_alias+set} | |
741 | ac_env_build_alias_value=$build_alias | |
742 | ac_cv_env_build_alias_set=${build_alias+set} | |
743 | ac_cv_env_build_alias_value=$build_alias | |
744 | ac_env_host_alias_set=${host_alias+set} | |
745 | ac_env_host_alias_value=$host_alias | |
746 | ac_cv_env_host_alias_set=${host_alias+set} | |
747 | ac_cv_env_host_alias_value=$host_alias | |
748 | ac_env_target_alias_set=${target_alias+set} | |
749 | ac_env_target_alias_value=$target_alias | |
750 | ac_cv_env_target_alias_set=${target_alias+set} | |
751 | ac_cv_env_target_alias_value=$target_alias | |
752 | ac_env_CC_set=${CC+set} | |
753 | ac_env_CC_value=$CC | |
754 | ac_cv_env_CC_set=${CC+set} | |
755 | ac_cv_env_CC_value=$CC | |
756 | ac_env_CFLAGS_set=${CFLAGS+set} | |
757 | ac_env_CFLAGS_value=$CFLAGS | |
758 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
759 | ac_cv_env_CFLAGS_value=$CFLAGS | |
760 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
761 | ac_env_LDFLAGS_value=$LDFLAGS | |
762 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
763 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
764 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
765 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
766 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
767 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
768 | ac_env_CPP_set=${CPP+set} | |
769 | ac_env_CPP_value=$CPP | |
770 | ac_cv_env_CPP_set=${CPP+set} | |
771 | ac_cv_env_CPP_value=$CPP | |
63cf211a | 772 | |
ba479fd2 NN |
773 | # |
774 | # Report the --help message. | |
775 | # | |
776 | if test "$ac_init_help" = "long"; then | |
777 | # Omit some internal or obsolete options to make the list less imposing. | |
778 | # This message is too long to be a string in the A/UX 3.1 sh. | |
779 | cat <<_ACEOF | |
780 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 781 | |
ba479fd2 | 782 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 783 | |
ba479fd2 NN |
784 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
785 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 786 | |
ba479fd2 | 787 | Defaults for the options are specified in brackets. |
861bb6c1 | 788 | |
ba479fd2 NN |
789 | Configuration: |
790 | -h, --help display this help and exit | |
791 | --help=short display options specific to this package | |
792 | --help=recursive display the short help of all the included packages | |
793 | -V, --version display version information and exit | |
794 | -q, --quiet, --silent do not print \`checking...' messages | |
795 | --cache-file=FILE cache test results in FILE [disabled] | |
796 | -C, --config-cache alias for \`--cache-file=config.cache' | |
797 | -n, --no-create do not create output files | |
798 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
799 | ||
800 | _ACEOF | |
801 | ||
802 | cat <<_ACEOF | |
803 | Installation directories: | |
804 | --prefix=PREFIX install architecture-independent files in PREFIX | |
805 | [$ac_default_prefix] | |
806 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
807 | [PREFIX] | |
861bb6c1 | 808 | |
ba479fd2 NN |
809 | By default, \`make install' will install all the files in |
810 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
811 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
812 | for instance \`--prefix=\$HOME'. | |
13c22933 | 813 | |
ba479fd2 | 814 | For better control, use the options below. |
13c22933 | 815 | |
ba479fd2 NN |
816 | Fine tuning of the installation directories: |
817 | --bindir=DIR user executables [EPREFIX/bin] | |
818 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
819 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
820 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
821 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
822 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
823 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
824 | --libdir=DIR object code libraries [EPREFIX/lib] | |
825 | --includedir=DIR C header files [PREFIX/include] | |
826 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
827 | --infodir=DIR info documentation [PREFIX/info] | |
828 | --mandir=DIR man documentation [PREFIX/man] | |
829 | _ACEOF | |
13c22933 | 830 | |
ba479fd2 | 831 | cat <<\_ACEOF |
13c22933 | 832 | |
ba479fd2 NN |
833 | Program names: |
834 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
835 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
836 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 837 | |
ba479fd2 NN |
838 | System types: |
839 | --build=BUILD configure for building on BUILD [guessed] | |
840 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
841 | --target=TARGET configure for building compilers for TARGET [HOST] | |
842 | _ACEOF | |
13c22933 JJ |
843 | fi |
844 | ||
ba479fd2 | 845 | if test -n "$ac_init_help"; then |
13c22933 | 846 | |
ba479fd2 | 847 | cat <<\_ACEOF |
13c22933 | 848 | |
ba479fd2 NN |
849 | Optional Features: |
850 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
851 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
852 | --enable-generated-files-in-srcdir |
853 | put copies of generated files in source dir | |
854 | intended for creating source tarballs for users | |
855 | without texinfo bison or flex. | |
ba479fd2 NN |
856 | --enable-werror enable -Werror in bootstrap stage2 and later |
857 | --enable-checking=LIST | |
858 | enable expensive run-time checks. With LIST, | |
859 | enable only specific categories of checks. | |
860 | Categories are: misc,tree,rtl,rtlflag,gc,gcac,fold; | |
861 | default is misc,tree,gc,rtlflag | |
862 | --enable-coverage=LEVEL | |
863 | enable compiler\'s code coverage collection. | |
864 | Use to measure compiler performance and locate | |
865 | unused parts of the compiler. With LEVEL, specify | |
866 | optimization. Values are opt, noopt, | |
867 | default is noopt | |
868 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
869 | --enable-multilib enable library support for multiple ABIs | |
870 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
871 | --enable-threads enable thread usage for target GCC | |
872 | --enable-threads=LIB use LIB thread package for target GCC | |
873 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
874 | the GNU Objective-C runtime | |
875 | --disable-shared don't provide a shared libgcc | |
876 | --enable-intermodule build the compiler in one step | |
877 | --enable-initfini-array use .init_array/.fini_array sections | |
878 | --enable-sjlj-exceptions | |
879 | arrange to use setjmp/longjmp exception handling | |
880 | --enable-libunwind-exceptions force use libunwind for exceptions | |
881 | --disable-win32-registry | |
882 | disable lookup of installation paths in the | |
883 | Registry on Windows hosts | |
884 | --enable-win32-registry enable registry lookup (default) | |
885 | --enable-win32-registry=KEY | |
886 | use KEY instead of GCC version as the last portion | |
887 | of the registry key | |
888 | --enable-maintainer-mode | |
889 | enable make rules and dependencies not useful | |
890 | (and sometimes confusing) to the casual installer | |
891 | --enable-version-specific-runtime-libs | |
892 | specify that runtime libraries should be | |
893 | installed in a compiler-specific directory | |
093e61a6 | 894 | |
ba479fd2 NN |
895 | Optional Packages: |
896 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
897 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
898 | --with-local-prefix=DIR specifies directory to put local include | |
899 | --with-gxx-include-dir=DIR | |
900 | specifies directory to put g++ header files | |
901 | --with-cpp-install-dir=DIR | |
902 | install the user visible C preprocessor in DIR | |
903 | (relative to PREFIX) as well as PREFIX/bin | |
904 | --with-gnu-ld arrange to work with GNU ld. | |
905 | --with-ld arrange to use the specified ld (full pathname) | |
906 | --with-gnu-as arrange to work with GNU as | |
907 | --with-as arrange to use the specified as (full pathname) | |
908 | --with-stabs arrange to use stabs instead of host debug format | |
909 | --with-dwarf2 force the default debug format to be DWARF 2 | |
910 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. | |
911 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib | |
59415997 | 912 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
913 | with the compiler |
914 | --with-system-zlib use installed libz | |
915 | --with-slibdir=DIR shared libraries in DIR LIBDIR | |
13c22933 | 916 | |
ba479fd2 NN |
917 | Some influential environment variables: |
918 | CC C compiler command | |
919 | CFLAGS C compiler flags | |
920 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
921 | nonstandard directory <lib dir> | |
922 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
923 | headers in a nonstandard directory <include dir> | |
924 | CPP C preprocessor | |
13c22933 | 925 | |
ba479fd2 NN |
926 | Use these variables to override the choices made by `configure' or to help |
927 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 928 | |
ba479fd2 NN |
929 | _ACEOF |
930 | fi | |
6e3f3080 | 931 | |
ba479fd2 NN |
932 | if test "$ac_init_help" = "recursive"; then |
933 | # If there are subdirs, report their specific --help. | |
934 | ac_popdir=`pwd` | |
935 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
936 | test -d $ac_dir || continue | |
937 | ac_builddir=. | |
938 | ||
939 | if test "$ac_dir" != .; then | |
940 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
941 | # A "../" for each directory in $ac_dir_suffix. | |
942 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
943 | else | |
944 | ac_dir_suffix= ac_top_builddir= | |
945 | fi | |
946 | ||
947 | case $srcdir in | |
948 | .) # No --srcdir option. We are building in place. | |
949 | ac_srcdir=. | |
950 | if test -z "$ac_top_builddir"; then | |
951 | ac_top_srcdir=. | |
952 | else | |
953 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
954 | fi ;; | |
955 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
956 | ac_srcdir=$srcdir$ac_dir_suffix; | |
957 | ac_top_srcdir=$srcdir ;; | |
958 | *) # Relative path. | |
959 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
960 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
961 | esac | |
962 | # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be | |
963 | # absolute. | |
964 | ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` | |
965 | ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` | |
966 | ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` | |
967 | ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` | |
968 | ||
969 | cd $ac_dir | |
970 | # Check for guested configure; otherwise get Cygnus style configure. | |
971 | if test -f $ac_srcdir/configure.gnu; then | |
972 | echo | |
973 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
974 | elif test -f $ac_srcdir/configure; then | |
975 | echo | |
976 | $SHELL $ac_srcdir/configure --help=recursive | |
977 | elif test -f $ac_srcdir/configure.ac || | |
978 | test -f $ac_srcdir/configure.in; then | |
979 | echo | |
980 | $ac_configure --help | |
981 | else | |
982 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
983 | fi | |
a6a5e4c9 | 984 | cd $ac_popdir |
ba479fd2 NN |
985 | done |
986 | fi | |
987 | ||
988 | test -n "$ac_init_help" && exit 0 | |
989 | if $ac_init_version; then | |
990 | cat <<\_ACEOF | |
991 | ||
992 | Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 | |
993 | Free Software Foundation, Inc. | |
994 | This configure script is free software; the Free Software Foundation | |
995 | gives unlimited permission to copy, distribute and modify it. | |
996 | _ACEOF | |
997 | exit 0 | |
998 | fi | |
999 | exec 5>config.log | |
1000 | cat >&5 <<_ACEOF | |
1001 | This file contains any messages produced by compilers while | |
1002 | running configure, to aid debugging if configure makes a mistake. | |
1003 | ||
1004 | It was created by $as_me, which was | |
1005 | generated by GNU Autoconf 2.57. Invocation command line was | |
1006 | ||
1007 | $ $0 $@ | |
1008 | ||
1009 | _ACEOF | |
1010 | { | |
1011 | cat <<_ASUNAME | |
1012 | ## --------- ## | |
1013 | ## Platform. ## | |
1014 | ## --------- ## | |
1015 | ||
1016 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1017 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1018 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1019 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1020 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1021 | ||
1022 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1023 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1024 | ||
1025 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1026 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1027 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1028 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1029 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1030 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1031 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1032 | ||
1033 | _ASUNAME | |
1034 | ||
1035 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1036 | for as_dir in $PATH | |
1037 | do | |
1038 | IFS=$as_save_IFS | |
1039 | test -z "$as_dir" && as_dir=. | |
1040 | echo "PATH: $as_dir" | |
1041 | done | |
1042 | ||
1043 | } >&5 | |
1044 | ||
1045 | cat >&5 <<_ACEOF | |
1046 | ||
1047 | ||
1048 | ## ----------- ## | |
1049 | ## Core tests. ## | |
1050 | ## ----------- ## | |
1051 | ||
1052 | _ACEOF | |
1053 | ||
1054 | ||
1055 | # Keep a trace of the command line. | |
1056 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1057 | # Strip out --silent because we don't want to record it for future runs. | |
1058 | # Also quote any args containing shell meta-characters. | |
1059 | # Make two passes to allow for proper duplicate-argument suppression. | |
1060 | ac_configure_args= | |
1061 | ac_configure_args0= | |
1062 | ac_configure_args1= | |
1063 | ac_sep= | |
1064 | ac_must_keep_next=false | |
1065 | for ac_pass in 1 2 | |
1066 | do | |
1067 | for ac_arg | |
1068 | do | |
1069 | case $ac_arg in | |
1070 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1071 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1072 | | -silent | --silent | --silen | --sile | --sil) | |
1073 | continue ;; | |
1074 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1075 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1076 | esac | |
1077 | case $ac_pass in | |
1078 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1079 | 2) | |
1080 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1081 | if test $ac_must_keep_next = true; then | |
1082 | ac_must_keep_next=false # Got value, back to normal. | |
1083 | else | |
1084 | case $ac_arg in | |
1085 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1086 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1087 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1088 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1089 | case "$ac_configure_args0 " in | |
1090 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1091 | esac | |
1092 | ;; | |
1093 | -* ) ac_must_keep_next=true ;; | |
1094 | esac | |
1095 | fi | |
1096 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1097 | # Get rid of the leading space. | |
1098 | ac_sep=" " | |
1099 | ;; | |
1100 | esac | |
1101 | done | |
1102 | done | |
1103 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1104 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1105 | ||
1106 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1107 | # config.log. We remove comments because anyway the quotes in there | |
1108 | # would cause problems or look ugly. | |
1109 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1110 | # such as our DU 5.0 friend, will then `close' the trap. | |
1111 | trap 'exit_status=$? | |
1112 | # Save into config.log some information that might help in debugging. | |
1113 | { | |
1114 | echo | |
1115 | ||
1116 | cat <<\_ASBOX | |
1117 | ## ---------------- ## | |
1118 | ## Cache variables. ## | |
1119 | ## ---------------- ## | |
1120 | _ASBOX | |
1121 | echo | |
1122 | # The following way of writing the cache mishandles newlines in values, | |
1123 | { | |
1124 | (set) 2>&1 | | |
1125 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1126 | *ac_space=\ *) | |
1127 | sed -n \ | |
1128 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; | |
1129 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
1130 | ;; | |
1131 | *) | |
1132 | sed -n \ | |
1133 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
1134 | ;; | |
1135 | esac; | |
1136 | } | |
1137 | echo | |
1138 | ||
1139 | cat <<\_ASBOX | |
1140 | ## ----------------- ## | |
1141 | ## Output variables. ## | |
1142 | ## ----------------- ## | |
1143 | _ASBOX | |
1144 | echo | |
1145 | for ac_var in $ac_subst_vars | |
1146 | do | |
1147 | eval ac_val=$`echo $ac_var` | |
1148 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1149 | done | sort | |
1150 | echo | |
1151 | ||
1152 | if test -n "$ac_subst_files"; then | |
1153 | cat <<\_ASBOX | |
1154 | ## ------------- ## | |
1155 | ## Output files. ## | |
1156 | ## ------------- ## | |
1157 | _ASBOX | |
1158 | echo | |
1159 | for ac_var in $ac_subst_files | |
1160 | do | |
1161 | eval ac_val=$`echo $ac_var` | |
1162 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1163 | done | sort | |
1164 | echo | |
1165 | fi | |
1166 | ||
1167 | if test -s confdefs.h; then | |
1168 | cat <<\_ASBOX | |
1169 | ## ----------- ## | |
1170 | ## confdefs.h. ## | |
1171 | ## ----------- ## | |
1172 | _ASBOX | |
1173 | echo | |
1174 | sed "/^$/d" confdefs.h | sort | |
1175 | echo | |
1176 | fi | |
1177 | test "$ac_signal" != 0 && | |
1178 | echo "$as_me: caught signal $ac_signal" | |
1179 | echo "$as_me: exit $exit_status" | |
1180 | } >&5 | |
a6a5e4c9 | 1181 | rm -f core core.* *.core && |
ba479fd2 NN |
1182 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1183 | exit $exit_status | |
1184 | ' 0 | |
1185 | for ac_signal in 1 2 13 15; do | |
1186 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1187 | done | |
1188 | ac_signal=0 | |
1189 | ||
1190 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1191 | rm -rf conftest* confdefs.h | |
1192 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1193 | echo >confdefs.h | |
1194 | ||
1195 | # Predefined preprocessor variables. | |
1196 | ||
1197 | cat >>confdefs.h <<_ACEOF | |
1198 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1199 | _ACEOF | |
1200 | ||
1201 | ||
1202 | cat >>confdefs.h <<_ACEOF | |
1203 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1204 | _ACEOF | |
1205 | ||
1206 | ||
1207 | cat >>confdefs.h <<_ACEOF | |
1208 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1209 | _ACEOF | |
1210 | ||
1211 | ||
1212 | cat >>confdefs.h <<_ACEOF | |
1213 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1214 | _ACEOF | |
1215 | ||
1216 | ||
1217 | cat >>confdefs.h <<_ACEOF | |
1218 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1219 | _ACEOF | |
1220 | ||
1221 | ||
1222 | # Let the site file select an alternate cache file if it wants to. | |
1223 | # Prefer explicitly selected file to automatically selected ones. | |
1224 | if test -z "$CONFIG_SITE"; then | |
1225 | if test "x$prefix" != xNONE; then | |
1226 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1227 | else | |
1228 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1229 | fi | |
1230 | fi | |
1231 | for ac_site_file in $CONFIG_SITE; do | |
1232 | if test -r "$ac_site_file"; then | |
1233 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1234 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1235 | sed 's/^/| /' "$ac_site_file" >&5 | |
1236 | . "$ac_site_file" | |
1237 | fi | |
1238 | done | |
1239 | ||
1240 | if test -r "$cache_file"; then | |
1241 | # Some versions of bash will fail to source /dev/null (special | |
1242 | # files actually), so we avoid doing that. | |
1243 | if test -f "$cache_file"; then | |
1244 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1245 | echo "$as_me: loading cache $cache_file" >&6;} | |
1246 | case $cache_file in | |
1247 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1248 | *) . ./$cache_file;; | |
1249 | esac | |
1250 | fi | |
1251 | else | |
1252 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1253 | echo "$as_me: creating cache $cache_file" >&6;} | |
1254 | >$cache_file | |
1255 | fi | |
1256 | ||
1257 | # Check that the precious variables saved in the cache have kept the same | |
1258 | # value. | |
1259 | ac_cache_corrupted=false | |
1260 | for ac_var in `(set) 2>&1 | | |
1261 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do | |
1262 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
1263 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1264 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1265 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1266 | case $ac_old_set,$ac_new_set in | |
1267 | set,) | |
1268 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1269 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1270 | ac_cache_corrupted=: ;; | |
1271 | ,set) | |
1272 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1273 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1274 | ac_cache_corrupted=: ;; | |
1275 | ,);; | |
1276 | *) | |
1277 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
1278 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 | |
1279 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
1280 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 | |
1281 | echo "$as_me: former value: $ac_old_val" >&2;} | |
1282 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 | |
1283 | echo "$as_me: current value: $ac_new_val" >&2;} | |
1284 | ac_cache_corrupted=: | |
1285 | fi;; | |
1286 | esac | |
1287 | # Pass precious variables to config.status. | |
1288 | if test "$ac_new_set" = set; then | |
1289 | case $ac_new_val in | |
1290 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1291 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1292 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1293 | esac | |
1294 | case " $ac_configure_args " in | |
1295 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1296 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1297 | esac | |
1298 | fi | |
1299 | done | |
1300 | if $ac_cache_corrupted; then | |
1301 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1302 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1303 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1304 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1305 | { (exit 1); exit 1; }; } | |
1306 | fi | |
1307 | ||
1308 | ac_ext=c | |
1309 | ac_cpp='$CPP $CPPFLAGS' | |
1310 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1311 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1312 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1313 | ||
1314 | ||
1315 | ||
1316 | ||
1317 | ||
1318 | ||
1319 | ||
1320 | ||
1321 | ||
1322 | ||
1323 | ||
1324 | ||
1325 | ||
1326 | ||
1327 | ||
1328 | ||
1329 | ||
1330 | ||
1331 | ||
914c5af7 | 1332 | |
ba479fd2 NN |
1333 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1334 | ||
1335 | ||
1336 | # Determine the host, build, and target systems | |
1337 | ac_aux_dir= | |
1338 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1339 | if test -f $ac_dir/install-sh; then | |
1340 | ac_aux_dir=$ac_dir | |
1341 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1342 | break | |
1343 | elif test -f $ac_dir/install.sh; then | |
1344 | ac_aux_dir=$ac_dir | |
1345 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1346 | break | |
1347 | elif test -f $ac_dir/shtool; then | |
1348 | ac_aux_dir=$ac_dir | |
1349 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1350 | break | |
1351 | fi | |
1352 | done | |
1353 | if test -z "$ac_aux_dir"; then | |
1354 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1355 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1356 | { (exit 1); exit 1; }; } | |
1357 | fi | |
1358 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1359 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1360 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1361 | ||
1362 | # Make sure we can run config.sub. | |
1363 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1364 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1365 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1366 | { (exit 1); exit 1; }; } | |
1367 | ||
1368 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1369 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1370 | if test "${ac_cv_build+set}" = set; then | |
1371 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1372 | else | |
1373 | ac_cv_build_alias=$build_alias | |
1374 | test -z "$ac_cv_build_alias" && | |
1375 | ac_cv_build_alias=`$ac_config_guess` | |
1376 | test -z "$ac_cv_build_alias" && | |
1377 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1378 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1379 | { (exit 1); exit 1; }; } | |
1380 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1381 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1382 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1383 | { (exit 1); exit 1; }; } | |
1384 | ||
1385 | fi | |
1386 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1387 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1388 | build=$ac_cv_build | |
1389 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1390 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1391 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1392 | ||
1393 | ||
1394 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1395 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1396 | if test "${ac_cv_host+set}" = set; then | |
1397 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1398 | else | |
1399 | ac_cv_host_alias=$host_alias | |
1400 | test -z "$ac_cv_host_alias" && | |
1401 | ac_cv_host_alias=$ac_cv_build_alias | |
1402 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1403 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1404 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1405 | { (exit 1); exit 1; }; } | |
1406 | ||
1407 | fi | |
1408 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1409 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1410 | host=$ac_cv_host | |
1411 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1412 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1413 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1414 | ||
1415 | ||
1416 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1417 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1418 | if test "${ac_cv_target+set}" = set; then | |
1419 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1420 | else | |
1421 | ac_cv_target_alias=$target_alias | |
1422 | test "x$ac_cv_target_alias" = "x" && | |
1423 | ac_cv_target_alias=$ac_cv_host_alias | |
1424 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1425 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1426 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1427 | { (exit 1); exit 1; }; } | |
1428 | ||
1429 | fi | |
1430 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1431 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1432 | target=$ac_cv_target | |
1433 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1434 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1435 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1436 | ||
1437 | ||
1438 | # The aliases save the names the user supplied, while $host etc. | |
1439 | # will get canonicalized. | |
1440 | test -n "$target_alias" && | |
1441 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1442 | NONENONEs,x,x, && | |
1443 | program_prefix=${target_alias}- | |
1444 | ||
1445 | # Determine the noncanonical target name, for directory use. | |
1446 | case ${build_alias} in | |
1447 | "") build_noncanonical=${build} ;; | |
6e3f3080 NN |
1448 | *) build_noncanonical=${build_alias} ;; |
1449 | esac | |
73458fb7 | 1450 | |
4665e56c NN |
1451 | case ${host_alias} in |
1452 | "") host_noncanonical=${build_noncanonical} ;; | |
1453 | *) host_noncanonical=${host_alias} ;; | |
1454 | esac | |
73458fb7 | 1455 | |
4665e56c NN |
1456 | case ${target_alias} in |
1457 | "") target_noncanonical=${host_noncanonical} ;; | |
1458 | *) target_noncanonical=${target_alias} ;; | |
1459 | esac | |
093e61a6 | 1460 | |
caa55b1e NN |
1461 | |
1462 | # Determine the target- and build-specific subdirectories | |
4665e56c NN |
1463 | # Prefix 'build-' so this never conflicts with target_subdir. |
1464 | build_subdir="build-${build_noncanonical}" | |
1465 | # Not really a subdirectory, but here for completeness. | |
1466 | host_subdir=. | |
1467 | # No prefix. | |
1468 | target_subdir=${target_noncanonical} | |
ba479fd2 | 1469 | |
73458fb7 | 1470 | |
093e61a6 | 1471 | # Set program_transform_name |
13c22933 | 1472 | test "$program_prefix" != NONE && |
ba479fd2 | 1473 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1474 | # Use a double $ so make ignores it. |
1475 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1476 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1477 | # Double any \ or $. echo might interpret backslashes. | |
1478 | # By default was `s,x,x', remove it if useless. | |
1479 | cat <<\_ACEOF >conftest.sed | |
1480 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1481 | _ACEOF | |
1482 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1483 | rm conftest.sed | |
13c22933 JJ |
1484 | |
1485 | ||
34a86c2b NN |
1486 | # Check for bogus environment variables. |
1487 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1488 | # since this would lead to problems installing/building glibc. | |
1489 | # LIBRARY_PATH contains the current directory if one of the following | |
1490 | # is true: | |
1491 | # - one of the terminals (":" and ";") is the first or last sign | |
1492 | # - two terminals occur directly after each other | |
1493 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1494 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1495 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1496 | case ${LIBRARY_PATH} in |
1497 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1498 | library_path_setting="contains current directory" | |
1499 | ;; | |
1500 | *) | |
1501 | library_path_setting="ok" | |
1502 | ;; | |
1503 | esac | |
ba479fd2 NN |
1504 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1505 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1506 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1507 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1508 | *** LIBRARY_PATH shouldn't contain the current directory when |
1509 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1510 | *** and run configure again." >&5 |
1511 | echo "$as_me: error: | |
1512 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1513 | *** building gcc. Please change the environment variable | |
1514 | *** and run configure again." >&2;} | |
1515 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1516 | fi |
1517 | ||
34a86c2b NN |
1518 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1519 | # since this would lead to problems installing/building glibc. | |
1520 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1521 | # is true: | |
1522 | # - one of the terminals (":" and ";") is the first or last sign | |
1523 | # - two terminals occur directly after each other | |
1524 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1525 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1526 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1527 | case ${GCC_EXEC_PREFIX} in |
1528 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1529 | gcc_exec_prefix_setting="contains current directory" | |
1530 | ;; | |
1531 | *) | |
1532 | gcc_exec_prefix_setting="ok" | |
1533 | ;; | |
1534 | esac | |
ba479fd2 NN |
1535 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1536 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1537 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1538 | { { echo "$as_me:$LINENO: error: |
1539 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1540 | *** building gcc. Please change the environment variable | |
1541 | *** and run configure again." >&5 | |
1542 | echo "$as_me: error: | |
cafe096b EC |
1543 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1544 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1545 | *** and run configure again." >&2;} |
1546 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1547 | fi |
1548 | ||
1549 | # ----------- | |
1550 | # Directories | |
1551 | # ----------- | |
1552 | ||
1553 | # Specify the local prefix | |
1554 | local_prefix= | |
ba479fd2 | 1555 | |
34a86c2b NN |
1556 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1557 | if test "${with_local_prefix+set}" = set; then | |
1558 | withval="$with_local_prefix" | |
1559 | case "${withval}" in | |
ba479fd2 NN |
1560 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1561 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1562 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1563 | no) ;; |
1564 | *) local_prefix=$with_local_prefix ;; | |
1565 | esac | |
ba479fd2 | 1566 | fi; |
34a86c2b NN |
1567 | |
1568 | # Default local prefix if it is empty | |
1569 | if test x$local_prefix = x; then | |
1570 | local_prefix=/usr/local | |
1571 | fi | |
1572 | ||
1573 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1574 | # passed in by the toplevel make and thus we'd get different behavior | |
1575 | # depending on where we built the sources. | |
1576 | gcc_gxx_include_dir= | |
1577 | # Specify the g++ header file directory | |
ba479fd2 | 1578 | |
34a86c2b NN |
1579 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1580 | if test "${with_gxx_include_dir+set}" = set; then | |
1581 | withval="$with_gxx_include_dir" | |
1582 | case "${withval}" in | |
ba479fd2 NN |
1583 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1584 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1585 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1586 | no) ;; |
1587 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1588 | esac | |
ba479fd2 | 1589 | fi; |
34a86c2b NN |
1590 | |
1591 | if test x${gcc_gxx_include_dir} = x; then | |
1592 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1593 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1594 | else | |
1595 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
1596 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
1597 | fi | |
1598 | fi | |
1599 | ||
ba479fd2 | 1600 | |
34a86c2b NN |
1601 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1602 | if test "${with_cpp_install_dir+set}" = set; then | |
1603 | withval="$with_cpp_install_dir" | |
1604 | if test x$withval = xyes; then | |
ba479fd2 NN |
1605 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1606 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1607 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1608 | elif test x$withval != xno; then |
1609 | cpp_install_dir=$withval | |
1610 | fi | |
ba479fd2 | 1611 | fi; |
34a86c2b | 1612 | |
51b9ff45 | 1613 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1614 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1615 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1616 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1617 | # just that. |
1618 | ||
03787dfd KC |
1619 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1620 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1621 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1622 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1623 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1624 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1625 | else |
03787dfd | 1626 | generated_files_in_srcdir=no |
ba479fd2 | 1627 | fi; |
51b9ff45 | 1628 | |
03787dfd KC |
1629 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1630 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1631 | ||
1632 | if test "$generated_files_in_srcdir" = "yes"; then | |
1633 | GENINSRC='' | |
1634 | docobjdir='$(srcdir)/doc' | |
1635 | else | |
1636 | GENINSRC='#' | |
1637 | docobjdir='$(objdir)/doc' | |
1638 | fi | |
1639 | ||
1640 | ||
34a86c2b NN |
1641 | # ------------------- |
1642 | # Find default linker | |
1643 | # ------------------- | |
1644 | ||
1645 | # With GNU ld | |
ba479fd2 | 1646 | |
34a86c2b NN |
1647 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1648 | if test "${with_gnu_ld+set}" = set; then | |
1649 | withval="$with_gnu_ld" | |
1650 | gnu_ld_flag="$with_gnu_ld" | |
1651 | else | |
1652 | gnu_ld_flag=no | |
ba479fd2 | 1653 | fi; |
6e3f3080 | 1654 | |
63cf211a | 1655 | # With pre-defined ld |
ba479fd2 | 1656 | |
34a86c2b NN |
1657 | # Check whether --with-ld or --without-ld was given. |
1658 | if test "${with_ld+set}" = set; then | |
1659 | withval="$with_ld" | |
1660 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1661 | fi; |
34a86c2b NN |
1662 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1663 | if test ! -x "$DEFAULT_LINKER"; then | |
ba479fd2 NN |
1664 | { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1665 | echo "$as_me: WARNING: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
34a86c2b NN |
1666 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1667 | gnu_ld_flag=yes | |
1668 | fi | |
ba479fd2 NN |
1669 | |
1670 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1671 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1672 | _ACEOF |
34a86c2b NN |
1673 | |
1674 | fi | |
1675 | ||
ba479fd2 NN |
1676 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1677 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1678 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1679 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1680 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1681 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1682 | else |
ba479fd2 NN |
1683 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1684 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1685 | fi |
1686 | else | |
ba479fd2 NN |
1687 | echo "$as_me:$LINENO: result: no" >&5 |
1688 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1689 | fi |
1690 | ||
1691 | # ---------------------- | |
1692 | # Find default assembler | |
1693 | # ---------------------- | |
1694 | ||
1695 | # With GNU as | |
ba479fd2 | 1696 | |
34a86c2b NN |
1697 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1698 | if test "${with_gnu_as+set}" = set; then | |
1699 | withval="$with_gnu_as" | |
1700 | gas_flag="$with_gnu_as" | |
1701 | else | |
1702 | gas_flag=no | |
ba479fd2 | 1703 | fi; |
34a86c2b NN |
1704 | |
1705 | ||
1706 | # Check whether --with-as or --without-as was given. | |
1707 | if test "${with_as+set}" = set; then | |
1708 | withval="$with_as" | |
1709 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1710 | fi; |
34a86c2b NN |
1711 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1712 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
ba479fd2 NN |
1713 | { echo "$as_me:$LINENO: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1714 | echo "$as_me: WARNING: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
34a86c2b NN |
1715 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1716 | gas_flag=yes | |
1717 | fi | |
ba479fd2 NN |
1718 | |
1719 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1720 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1721 | _ACEOF |
34a86c2b NN |
1722 | |
1723 | fi | |
1724 | ||
ba479fd2 NN |
1725 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1726 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1727 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1728 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1729 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1730 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1731 | else |
ba479fd2 NN |
1732 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1733 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&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 | ||
1740 | # --------------- | |
1741 | # Find C compiler | |
1742 | # --------------- | |
1743 | ||
1744 | # Find the native compiler | |
ba479fd2 NN |
1745 | ac_ext=c |
1746 | ac_cpp='$CPP $CPPFLAGS' | |
1747 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1748 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1749 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1750 | if test -n "$ac_tool_prefix"; then | |
1751 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1752 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1753 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1754 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1755 | if test "${ac_cv_prog_CC+set}" = set; then | |
1756 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1757 | else | |
1758 | if test -n "$CC"; then | |
1759 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1760 | else | |
1761 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1762 | for as_dir in $PATH | |
1763 | do | |
1764 | IFS=$as_save_IFS | |
1765 | test -z "$as_dir" && as_dir=. | |
1766 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1767 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1768 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1769 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1770 | break 2 | |
1771 | fi | |
1772 | done | |
1773 | done | |
1774 | ||
1775 | fi | |
1776 | fi | |
1777 | CC=$ac_cv_prog_CC | |
1778 | if test -n "$CC"; then | |
1779 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1780 | echo "${ECHO_T}$CC" >&6 | |
1781 | else | |
1782 | echo "$as_me:$LINENO: result: no" >&5 | |
1783 | echo "${ECHO_T}no" >&6 | |
1784 | fi | |
1785 | ||
1786 | fi | |
1787 | if test -z "$ac_cv_prog_CC"; then | |
1788 | ac_ct_CC=$CC | |
1789 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1790 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1791 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1792 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1793 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1794 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1795 | else | |
1796 | if test -n "$ac_ct_CC"; then | |
1797 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1798 | else | |
1799 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1800 | for as_dir in $PATH | |
1801 | do | |
1802 | IFS=$as_save_IFS | |
1803 | test -z "$as_dir" && as_dir=. | |
1804 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1805 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1806 | ac_cv_prog_ac_ct_CC="gcc" | |
1807 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1808 | break 2 | |
1809 | fi | |
1810 | done | |
1811 | done | |
1812 | ||
1813 | fi | |
1814 | fi | |
1815 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1816 | if test -n "$ac_ct_CC"; then | |
1817 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1818 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1819 | else | |
1820 | echo "$as_me:$LINENO: result: no" >&5 | |
1821 | echo "${ECHO_T}no" >&6 | |
1822 | fi | |
1823 | ||
1824 | CC=$ac_ct_CC | |
1825 | else | |
1826 | CC="$ac_cv_prog_CC" | |
1827 | fi | |
1828 | ||
1829 | if test -z "$CC"; then | |
1830 | if test -n "$ac_tool_prefix"; then | |
1831 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1832 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1833 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1834 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1835 | if test "${ac_cv_prog_CC+set}" = set; then | |
1836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1837 | else |
1838 | if test -n "$CC"; then | |
1839 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1840 | else | |
ba479fd2 NN |
1841 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1842 | for as_dir in $PATH | |
1843 | do | |
1844 | IFS=$as_save_IFS | |
1845 | test -z "$as_dir" && as_dir=. | |
1846 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1847 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1848 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1849 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1850 | break 2 | |
1851 | fi | |
1852 | done | |
1853 | done | |
1854 | ||
cd9e5e7c MK |
1855 | fi |
1856 | fi | |
ba479fd2 | 1857 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1858 | if test -n "$CC"; then |
ba479fd2 NN |
1859 | echo "$as_me:$LINENO: result: $CC" >&5 |
1860 | echo "${ECHO_T}$CC" >&6 | |
1861 | else | |
1862 | echo "$as_me:$LINENO: result: no" >&5 | |
1863 | echo "${ECHO_T}no" >&6 | |
1864 | fi | |
1865 | ||
1866 | fi | |
1867 | if test -z "$ac_cv_prog_CC"; then | |
1868 | ac_ct_CC=$CC | |
1869 | # Extract the first word of "cc", so it can be a program name with args. | |
1870 | set dummy cc; ac_word=$2 | |
1871 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1872 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1873 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1874 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1875 | else | |
1876 | if test -n "$ac_ct_CC"; then | |
1877 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1878 | else | |
1879 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1880 | for as_dir in $PATH | |
1881 | do | |
1882 | IFS=$as_save_IFS | |
1883 | test -z "$as_dir" && as_dir=. | |
1884 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1885 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1886 | ac_cv_prog_ac_ct_CC="cc" | |
1887 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1888 | break 2 | |
1889 | fi | |
1890 | done | |
1891 | done | |
1892 | ||
1893 | fi | |
1894 | fi | |
1895 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1896 | if test -n "$ac_ct_CC"; then | |
1897 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1898 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1899 | else | |
1900 | echo "$as_me:$LINENO: result: no" >&5 | |
1901 | echo "${ECHO_T}no" >&6 | |
1902 | fi | |
1903 | ||
1904 | CC=$ac_ct_CC | |
cd9e5e7c | 1905 | else |
ba479fd2 | 1906 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1907 | fi |
6e3f3080 | 1908 | |
ba479fd2 | 1909 | fi |
6e3f3080 NN |
1910 | if test -z "$CC"; then |
1911 | # Extract the first word of "cc", so it can be a program name with args. | |
1912 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
1913 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1914 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1915 | if test "${ac_cv_prog_CC+set}" = set; then | |
1916 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
1917 | else |
1918 | if test -n "$CC"; then | |
1919 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1920 | else | |
1921 | ac_prog_rejected=no | |
ba479fd2 NN |
1922 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1923 | for as_dir in $PATH | |
1924 | do | |
1925 | IFS=$as_save_IFS | |
1926 | test -z "$as_dir" && as_dir=. | |
1927 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1928 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1929 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1930 | ac_prog_rejected=yes | |
1931 | continue | |
1932 | fi | |
1933 | ac_cv_prog_CC="cc" | |
1934 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1935 | break 2 | |
1936 | fi | |
1937 | done | |
1938 | done | |
1939 | ||
6e3f3080 NN |
1940 | if test $ac_prog_rejected = yes; then |
1941 | # We found a bogon in the path, so make sure we never use it. | |
1942 | set dummy $ac_cv_prog_CC | |
1943 | shift | |
ba479fd2 | 1944 | if test $# != 0; then |
6e3f3080 NN |
1945 | # We chose a different compiler from the bogus one. |
1946 | # However, it has the same basename, so the bogon will be chosen | |
1947 | # first if we set CC to just the basename; use the full file name. | |
1948 | shift | |
ba479fd2 | 1949 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 1950 | fi |
6e3f3080 NN |
1951 | fi |
1952 | fi | |
1953 | fi | |
ba479fd2 | 1954 | CC=$ac_cv_prog_CC |
6e3f3080 | 1955 | if test -n "$CC"; then |
ba479fd2 NN |
1956 | echo "$as_me:$LINENO: result: $CC" >&5 |
1957 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 1958 | else |
ba479fd2 NN |
1959 | echo "$as_me:$LINENO: result: no" >&5 |
1960 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 1961 | fi |
6e3f3080 | 1962 | |
ba479fd2 NN |
1963 | fi |
1964 | if test -z "$CC"; then | |
1965 | if test -n "$ac_tool_prefix"; then | |
1966 | for ac_prog in cl | |
1967 | do | |
1968 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
1969 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
1970 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1971 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1972 | if test "${ac_cv_prog_CC+set}" = set; then | |
1973 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 1974 | else |
6e3f3080 NN |
1975 | if test -n "$CC"; then |
1976 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1977 | else | |
ba479fd2 NN |
1978 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1979 | for as_dir in $PATH | |
1980 | do | |
1981 | IFS=$as_save_IFS | |
1982 | test -z "$as_dir" && as_dir=. | |
1983 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1984 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1985 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
1986 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1987 | break 2 | |
1988 | fi | |
1989 | done | |
1990 | done | |
1991 | ||
093e61a6 | 1992 | fi |
6e3f3080 | 1993 | fi |
ba479fd2 | 1994 | CC=$ac_cv_prog_CC |
6e3f3080 | 1995 | if test -n "$CC"; then |
ba479fd2 NN |
1996 | echo "$as_me:$LINENO: result: $CC" >&5 |
1997 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 1998 | else |
ba479fd2 NN |
1999 | echo "$as_me:$LINENO: result: no" >&5 |
2000 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2001 | fi |
cafe096b | 2002 | |
ba479fd2 NN |
2003 | test -n "$CC" && break |
2004 | done | |
2005 | fi | |
2006 | if test -z "$CC"; then | |
2007 | ac_ct_CC=$CC | |
2008 | for ac_prog in cl | |
2009 | do | |
2010 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2011 | set dummy $ac_prog; ac_word=$2 | |
2012 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2013 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2014 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2015 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2016 | else | |
2017 | if test -n "$ac_ct_CC"; then | |
2018 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2019 | else | |
2020 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2021 | for as_dir in $PATH | |
2022 | do | |
2023 | IFS=$as_save_IFS | |
2024 | test -z "$as_dir" && as_dir=. | |
2025 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2026 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2027 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2028 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2029 | break 2 | |
2030 | fi | |
2031 | done | |
2032 | done | |
6e3f3080 | 2033 | |
ba479fd2 NN |
2034 | fi |
2035 | fi | |
2036 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2037 | if test -n "$ac_ct_CC"; then | |
2038 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2039 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2040 | else | |
2041 | echo "$as_me:$LINENO: result: no" >&5 | |
2042 | echo "${ECHO_T}no" >&6 | |
2043 | fi | |
6e3f3080 | 2044 | |
ba479fd2 NN |
2045 | test -n "$ac_ct_CC" && break |
2046 | done | |
63cf211a | 2047 | |
ba479fd2 NN |
2048 | CC=$ac_ct_CC |
2049 | fi | |
2050 | ||
2051 | fi | |
2052 | ||
2053 | ||
2054 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2055 | See \`config.log' for more details." >&5 | |
2056 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2057 | See \`config.log' for more details." >&2;} | |
2058 | { (exit 1); exit 1; }; } | |
2059 | ||
2060 | # Provide some information about the compiler. | |
2061 | echo "$as_me:$LINENO:" \ | |
2062 | "checking for C compiler version" >&5 | |
2063 | ac_compiler=`set X $ac_compile; echo $2` | |
2064 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2065 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2066 | ac_status=$? | |
2067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2068 | (exit $ac_status); } | |
2069 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2070 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2071 | ac_status=$? | |
2072 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2073 | (exit $ac_status); } | |
2074 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2075 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2076 | ac_status=$? | |
2077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2078 | (exit $ac_status); } | |
2079 | ||
2080 | cat >conftest.$ac_ext <<_ACEOF | |
2081 | #line $LINENO "configure" | |
2082 | /* confdefs.h. */ | |
2083 | _ACEOF | |
2084 | cat confdefs.h >>conftest.$ac_ext | |
2085 | cat >>conftest.$ac_ext <<_ACEOF | |
2086 | /* end confdefs.h. */ | |
2087 | ||
2088 | int | |
2089 | main () | |
2090 | { | |
63cf211a | 2091 | |
ba479fd2 NN |
2092 | ; |
2093 | return 0; | |
2094 | } | |
2095 | _ACEOF | |
2096 | ac_clean_files_save=$ac_clean_files | |
2097 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2098 | # Try to create an executable without -o first, disregard a.out. | |
2099 | # It will help us diagnose broken compilers, and finding out an intuition | |
2100 | # of exeext. | |
2101 | echo "$as_me:$LINENO: checking for C compiler default output" >&5 | |
2102 | echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 | |
2103 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
2104 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2105 | (eval $ac_link_default) 2>&5 | |
2106 | ac_status=$? | |
2107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2108 | (exit $ac_status); }; then | |
2109 | # Find the output, starting from the most likely. This scheme is | |
2110 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2111 | # resort. | |
2112 | ||
2113 | # Be careful to initialize this variable, since it used to be cached. | |
2114 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2115 | ac_cv_exeext= | |
2116 | # b.out is created by i960 compilers. | |
2117 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2118 | do | |
2119 | test -f "$ac_file" || continue | |
2120 | case $ac_file in | |
2121 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
2122 | ;; | |
2123 | conftest.$ac_ext ) | |
2124 | # This is the source file. | |
2125 | ;; | |
2126 | [ab].out ) | |
2127 | # We found the default executable, but exeext='' is most | |
2128 | # certainly right. | |
2129 | break;; | |
2130 | *.* ) | |
2131 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2132 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2133 | # but it would be cool to find out if it's true. Does anybody | |
2134 | # maintain Libtool? --akim. | |
2135 | export ac_cv_exeext | |
2136 | break;; | |
2137 | * ) | |
2138 | break;; | |
2139 | esac | |
2140 | done | |
2141 | else | |
2142 | echo "$as_me: failed program was:" >&5 | |
2143 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2144 | ||
2145 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2146 | See \`config.log' for more details." >&5 | |
2147 | echo "$as_me: error: C compiler cannot create executables | |
2148 | See \`config.log' for more details." >&2;} | |
2149 | { (exit 77); exit 77; }; } | |
2150 | fi | |
2151 | ||
2152 | ac_exeext=$ac_cv_exeext | |
2153 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2154 | echo "${ECHO_T}$ac_file" >&6 | |
2155 | ||
2156 | # Check the compiler produces executables we can run. If not, either | |
2157 | # the compiler is broken, or we cross compile. | |
2158 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2159 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2160 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2161 | # If not cross compiling, check that we can run a simple program. | |
2162 | if test "$cross_compiling" != yes; then | |
2163 | if { ac_try='./$ac_file' | |
2164 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2165 | (eval $ac_try) 2>&5 | |
2166 | ac_status=$? | |
2167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2168 | (exit $ac_status); }; }; then | |
2169 | cross_compiling=no | |
6e3f3080 | 2170 | else |
ba479fd2 NN |
2171 | if test "$cross_compiling" = maybe; then |
2172 | cross_compiling=yes | |
2173 | else | |
2174 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2175 | If you meant to cross compile, use \`--host'. | |
2176 | See \`config.log' for more details." >&5 | |
2177 | echo "$as_me: error: cannot run C compiled programs. | |
2178 | If you meant to cross compile, use \`--host'. | |
2179 | See \`config.log' for more details." >&2;} | |
2180 | { (exit 1); exit 1; }; } | |
2181 | fi | |
6e3f3080 NN |
2182 | fi |
2183 | fi | |
ba479fd2 NN |
2184 | echo "$as_me:$LINENO: result: yes" >&5 |
2185 | echo "${ECHO_T}yes" >&6 | |
2186 | ||
2187 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2188 | ac_clean_files=$ac_clean_files_save | |
2189 | # Check the compiler produces executables we can run. If not, either | |
2190 | # the compiler is broken, or we cross compile. | |
2191 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2192 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2193 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2194 | echo "${ECHO_T}$cross_compiling" >&6 | |
2195 | ||
2196 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2197 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2198 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2199 | (eval $ac_link) 2>&5 | |
2200 | ac_status=$? | |
2201 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2202 | (exit $ac_status); }; then | |
2203 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2204 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2205 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2206 | # `rm'. | |
2207 | for ac_file in conftest.exe conftest conftest.*; do | |
2208 | test -f "$ac_file" || continue | |
2209 | case $ac_file in | |
2210 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2211 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2212 | export ac_cv_exeext | |
2213 | break;; | |
2214 | * ) break;; | |
2215 | esac | |
2216 | done | |
e9a25f70 | 2217 | else |
ba479fd2 NN |
2218 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2219 | See \`config.log' for more details." >&5 | |
2220 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2221 | See \`config.log' for more details." >&2;} | |
2222 | { (exit 1); exit 1; }; } | |
2223 | fi | |
2224 | ||
2225 | rm -f conftest$ac_cv_exeext | |
2226 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2227 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2228 | ||
2229 | rm -f conftest.$ac_ext | |
2230 | EXEEXT=$ac_cv_exeext | |
2231 | ac_exeext=$EXEEXT | |
2232 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2233 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2234 | if test "${ac_cv_objext+set}" = set; then | |
2235 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2236 | else | |
2237 | cat >conftest.$ac_ext <<_ACEOF | |
2238 | #line $LINENO "configure" | |
2239 | /* confdefs.h. */ | |
2240 | _ACEOF | |
2241 | cat confdefs.h >>conftest.$ac_ext | |
2242 | cat >>conftest.$ac_ext <<_ACEOF | |
2243 | /* end confdefs.h. */ | |
2244 | ||
2245 | int | |
2246 | main () | |
2247 | { | |
6e3f3080 | 2248 | |
ba479fd2 NN |
2249 | ; |
2250 | return 0; | |
2251 | } | |
2252 | _ACEOF | |
2253 | rm -f conftest.o conftest.obj | |
2254 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2255 | (eval $ac_compile) 2>&5 | |
2256 | ac_status=$? | |
2257 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2258 | (exit $ac_status); }; then | |
2259 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2260 | case $ac_file in | |
2261 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2262 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2263 | break;; | |
2264 | esac | |
2265 | done | |
63cf211a | 2266 | else |
ba479fd2 NN |
2267 | echo "$as_me: failed program was:" >&5 |
2268 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2269 | ||
2270 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2271 | See \`config.log' for more details." >&5 | |
2272 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2273 | See \`config.log' for more details." >&2;} | |
2274 | { (exit 1); exit 1; }; } | |
2275 | fi | |
2276 | ||
2277 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2278 | fi | |
2279 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2280 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2281 | OBJEXT=$ac_cv_objext | |
2282 | ac_objext=$OBJEXT | |
2283 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2284 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2285 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2286 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2287 | else | |
2288 | cat >conftest.$ac_ext <<_ACEOF | |
2289 | #line $LINENO "configure" | |
2290 | /* confdefs.h. */ | |
2291 | _ACEOF | |
2292 | cat confdefs.h >>conftest.$ac_ext | |
2293 | cat >>conftest.$ac_ext <<_ACEOF | |
2294 | /* end confdefs.h. */ | |
2295 | ||
2296 | int | |
2297 | main () | |
2298 | { | |
2299 | #ifndef __GNUC__ | |
2300 | choke me | |
2301 | #endif | |
6e3f3080 | 2302 | |
ba479fd2 NN |
2303 | ; |
2304 | return 0; | |
2305 | } | |
2306 | _ACEOF | |
2307 | rm -f conftest.$ac_objext | |
2308 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2309 | (eval $ac_compile) 2>&5 | |
2310 | ac_status=$? | |
2311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2312 | (exit $ac_status); } && | |
2313 | { ac_try='test -s conftest.$ac_objext' | |
2314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2315 | (eval $ac_try) 2>&5 | |
2316 | ac_status=$? | |
2317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2318 | (exit $ac_status); }; }; then | |
2319 | ac_compiler_gnu=yes | |
2320 | else | |
2321 | echo "$as_me: failed program was:" >&5 | |
2322 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2323 | ||
2324 | ac_compiler_gnu=no | |
2325 | fi | |
2326 | rm -f conftest.$ac_objext conftest.$ac_ext | |
2327 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
2328 | ||
2329 | fi | |
2330 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2331 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2332 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2333 | ac_test_CFLAGS=${CFLAGS+set} | |
2334 | ac_save_CFLAGS=$CFLAGS | |
2335 | CFLAGS="-g" | |
2336 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2337 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2338 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2339 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2340 | else | |
2341 | cat >conftest.$ac_ext <<_ACEOF | |
2342 | #line $LINENO "configure" | |
2343 | /* confdefs.h. */ | |
2344 | _ACEOF | |
2345 | cat confdefs.h >>conftest.$ac_ext | |
2346 | cat >>conftest.$ac_ext <<_ACEOF | |
2347 | /* end confdefs.h. */ | |
2348 | ||
2349 | int | |
2350 | main () | |
2351 | { | |
2352 | ||
2353 | ; | |
2354 | return 0; | |
2355 | } | |
2356 | _ACEOF | |
2357 | rm -f conftest.$ac_objext | |
2358 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2359 | (eval $ac_compile) 2>&5 | |
2360 | ac_status=$? | |
2361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2362 | (exit $ac_status); } && | |
2363 | { ac_try='test -s conftest.$ac_objext' | |
2364 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2365 | (eval $ac_try) 2>&5 | |
2366 | ac_status=$? | |
2367 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2368 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2369 | ac_cv_prog_cc_g=yes |
2370 | else | |
ba479fd2 NN |
2371 | echo "$as_me: failed program was:" >&5 |
2372 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2373 | |
ba479fd2 | 2374 | ac_cv_prog_cc_g=no |
6e3f3080 | 2375 | fi |
ba479fd2 NN |
2376 | rm -f conftest.$ac_objext conftest.$ac_ext |
2377 | fi | |
2378 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2379 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2380 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2381 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2382 | elif test $ac_cv_prog_cc_g = yes; then |
2383 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2384 | CFLAGS="-g -O2" |
2385 | else | |
cd9e5e7c | 2386 | CFLAGS="-g" |
81814e35 | 2387 | fi |
3723cad9 | 2388 | else |
cd9e5e7c MK |
2389 | if test "$GCC" = yes; then |
2390 | CFLAGS="-O2" | |
2391 | else | |
2392 | CFLAGS= | |
2393 | fi | |
e9a25f70 | 2394 | fi |
ba479fd2 NN |
2395 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2396 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2397 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2398 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2399 | else | |
2400 | ac_cv_prog_cc_stdc=no | |
2401 | ac_save_CC=$CC | |
2402 | cat >conftest.$ac_ext <<_ACEOF | |
2403 | #line $LINENO "configure" | |
2404 | /* confdefs.h. */ | |
2405 | _ACEOF | |
2406 | cat confdefs.h >>conftest.$ac_ext | |
2407 | cat >>conftest.$ac_ext <<_ACEOF | |
2408 | /* end confdefs.h. */ | |
2409 | #include <stdarg.h> | |
2410 | #include <stdio.h> | |
2411 | #include <sys/types.h> | |
2412 | #include <sys/stat.h> | |
2413 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2414 | struct buf { int x; }; | |
2415 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2416 | static char *e (p, i) | |
2417 | char **p; | |
2418 | int i; | |
2419 | { | |
2420 | return p[i]; | |
2421 | } | |
2422 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2423 | { | |
2424 | char *s; | |
2425 | va_list v; | |
2426 | va_start (v,p); | |
2427 | s = g (p, va_arg (v,int)); | |
2428 | va_end (v); | |
2429 | return s; | |
2430 | } | |
2431 | int test (int i, double x); | |
2432 | struct s1 {int (*f) (int a);}; | |
2433 | struct s2 {int (*f) (double a);}; | |
2434 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2435 | int argc; | |
2436 | char **argv; | |
2437 | int | |
2438 | main () | |
2439 | { | |
2440 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2441 | ; | |
2442 | return 0; | |
2443 | } | |
2444 | _ACEOF | |
2445 | # Don't try gcc -ansi; that turns off useful extensions and | |
2446 | # breaks some systems' header files. | |
2447 | # AIX -qlanglvl=ansi | |
2448 | # Ultrix and OSF/1 -std1 | |
2449 | # HP-UX 10.20 and later -Ae | |
2450 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2451 | # SVR4 -Xc -D__EXTENSIONS__ | |
2452 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2453 | do | |
2454 | CC="$ac_save_CC $ac_arg" | |
2455 | rm -f conftest.$ac_objext | |
2456 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2457 | (eval $ac_compile) 2>&5 | |
2458 | ac_status=$? | |
2459 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2460 | (exit $ac_status); } && | |
2461 | { ac_try='test -s conftest.$ac_objext' | |
2462 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2463 | (eval $ac_try) 2>&5 | |
2464 | ac_status=$? | |
2465 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2466 | (exit $ac_status); }; }; then | |
2467 | ac_cv_prog_cc_stdc=$ac_arg | |
2468 | break | |
2469 | else | |
2470 | echo "$as_me: failed program was:" >&5 | |
2471 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2472 | |
ba479fd2 NN |
2473 | fi |
2474 | rm -f conftest.$ac_objext | |
2475 | done | |
2476 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2477 | CC=$ac_save_CC | |
2478 | ||
2479 | fi | |
2480 | ||
2481 | case "x$ac_cv_prog_cc_stdc" in | |
2482 | x|xno) | |
2483 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2484 | echo "${ECHO_T}none needed" >&6 ;; | |
2485 | *) | |
2486 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2487 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2488 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2489 | esac | |
2490 | ||
2491 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2492 | # in C++ we need to declare it. In case someone uses the same compiler | |
2493 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2494 | # the declaration of exit, since it's the most demanding environment. | |
2495 | cat >conftest.$ac_ext <<_ACEOF | |
2496 | #ifndef __cplusplus | |
2497 | choke me | |
2498 | #endif | |
2499 | _ACEOF | |
2500 | rm -f conftest.$ac_objext | |
2501 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2502 | (eval $ac_compile) 2>&5 | |
2503 | ac_status=$? | |
2504 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2505 | (exit $ac_status); } && | |
2506 | { ac_try='test -s conftest.$ac_objext' | |
2507 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2508 | (eval $ac_try) 2>&5 | |
2509 | ac_status=$? | |
2510 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2511 | (exit $ac_status); }; }; then | |
2512 | for ac_declaration in \ | |
a6a5e4c9 KC |
2513 | ''\ |
2514 | '#include <stdlib.h>' \ | |
ba479fd2 NN |
2515 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2516 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2517 | 'extern "C" void exit (int) throw ();' \ | |
2518 | 'extern "C" void exit (int);' \ | |
2519 | 'void exit (int);' | |
2520 | do | |
2521 | cat >conftest.$ac_ext <<_ACEOF | |
2522 | #line $LINENO "configure" | |
2523 | /* confdefs.h. */ | |
2524 | _ACEOF | |
2525 | cat confdefs.h >>conftest.$ac_ext | |
2526 | cat >>conftest.$ac_ext <<_ACEOF | |
2527 | /* end confdefs.h. */ | |
ba479fd2 | 2528 | #include <stdlib.h> |
a6a5e4c9 | 2529 | $ac_declaration |
ba479fd2 NN |
2530 | int |
2531 | main () | |
2532 | { | |
2533 | exit (42); | |
2534 | ; | |
2535 | return 0; | |
2536 | } | |
2537 | _ACEOF | |
2538 | rm -f conftest.$ac_objext | |
2539 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2540 | (eval $ac_compile) 2>&5 | |
2541 | ac_status=$? | |
2542 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2543 | (exit $ac_status); } && | |
2544 | { ac_try='test -s conftest.$ac_objext' | |
2545 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2546 | (eval $ac_try) 2>&5 | |
2547 | ac_status=$? | |
2548 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2549 | (exit $ac_status); }; }; then | |
2550 | : | |
2551 | else | |
2552 | echo "$as_me: failed program was:" >&5 | |
2553 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2554 | ||
2555 | continue | |
2556 | fi | |
2557 | rm -f conftest.$ac_objext conftest.$ac_ext | |
2558 | cat >conftest.$ac_ext <<_ACEOF | |
2559 | #line $LINENO "configure" | |
2560 | /* confdefs.h. */ | |
2561 | _ACEOF | |
2562 | cat confdefs.h >>conftest.$ac_ext | |
2563 | cat >>conftest.$ac_ext <<_ACEOF | |
2564 | /* end confdefs.h. */ | |
2565 | $ac_declaration | |
2566 | int | |
2567 | main () | |
2568 | { | |
2569 | exit (42); | |
2570 | ; | |
2571 | return 0; | |
2572 | } | |
2573 | _ACEOF | |
2574 | rm -f conftest.$ac_objext | |
2575 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2576 | (eval $ac_compile) 2>&5 | |
2577 | ac_status=$? | |
2578 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2579 | (exit $ac_status); } && | |
2580 | { ac_try='test -s conftest.$ac_objext' | |
2581 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2582 | (eval $ac_try) 2>&5 | |
2583 | ac_status=$? | |
2584 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2585 | (exit $ac_status); }; }; then | |
2586 | break | |
3ec83fc2 | 2587 | else |
ba479fd2 NN |
2588 | echo "$as_me: failed program was:" >&5 |
2589 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2590 | ||
6e3f3080 | 2591 | fi |
ba479fd2 NN |
2592 | rm -f conftest.$ac_objext conftest.$ac_ext |
2593 | done | |
2594 | rm -f conftest* | |
2595 | if test -n "$ac_declaration"; then | |
2596 | echo '#ifdef __cplusplus' >>confdefs.h | |
2597 | echo $ac_declaration >>confdefs.h | |
2598 | echo '#endif' >>confdefs.h | |
2599 | fi | |
2600 | ||
3ec83fc2 | 2601 | else |
ba479fd2 NN |
2602 | echo "$as_me: failed program was:" >&5 |
2603 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2604 | ||
2605 | fi | |
2606 | rm -f conftest.$ac_objext conftest.$ac_ext | |
2607 | ac_ext=c | |
2608 | ac_cpp='$CPP $CPPFLAGS' | |
2609 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2610 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2611 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2612 | ||
2613 | if test "x$CC" != xcc; then | |
2614 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2615 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2616 | else | |
2617 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2618 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2619 | fi | |
2620 | set dummy $CC; ac_cc=`echo $2 | | |
2621 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2622 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2623 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2624 | else | |
2625 | cat >conftest.$ac_ext <<_ACEOF | |
2626 | #line $LINENO "configure" | |
2627 | /* confdefs.h. */ | |
2628 | _ACEOF | |
2629 | cat confdefs.h >>conftest.$ac_ext | |
2630 | cat >>conftest.$ac_ext <<_ACEOF | |
2631 | /* end confdefs.h. */ | |
2632 | ||
2633 | int | |
2634 | main () | |
2635 | { | |
2636 | ||
2637 | ; | |
2638 | return 0; | |
2639 | } | |
2640 | _ACEOF | |
3ec83fc2 RH |
2641 | # Make sure it works both with $CC and with simple cc. |
2642 | # We do the test twice because some compilers refuse to overwrite an | |
2643 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2644 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2645 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2646 | (eval $ac_try) 2>&5 | |
2647 | ac_status=$? | |
2648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2649 | (exit $ac_status); } && | |
2650 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2651 | (eval $ac_try) 2>&5 | |
2652 | ac_status=$? | |
2653 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2654 | (exit $ac_status); }; | |
3ec83fc2 RH |
2655 | then |
2656 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2657 | if test "x$CC" != xcc; then | |
2658 | # Test first that cc exists at all. | |
ba479fd2 NN |
2659 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2660 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2661 | (eval $ac_try) 2>&5 | |
2662 | ac_status=$? | |
2663 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2664 | (exit $ac_status); }; }; then | |
2665 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2666 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2667 | (eval $ac_try) 2>&5 | |
2668 | ac_status=$? | |
2669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2670 | (exit $ac_status); } && | |
2671 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2672 | (eval $ac_try) 2>&5 | |
2673 | ac_status=$? | |
2674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2675 | (exit $ac_status); }; | |
3ec83fc2 | 2676 | then |
e1366e0c NN |
2677 | # cc works too. |
2678 | : | |
3ec83fc2 | 2679 | else |
e1366e0c NN |
2680 | # cc exists but doesn't like -o. |
2681 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2682 | fi |
2683 | fi | |
2684 | fi | |
2685 | else | |
2686 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2687 | fi | |
2688 | rm -f conftest* | |
2689 | ||
2690 | fi | |
2691 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2692 | echo "$as_me:$LINENO: result: yes" >&5 |
2693 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2694 | else |
ba479fd2 NN |
2695 | echo "$as_me:$LINENO: result: no" >&5 |
2696 | echo "${ECHO_T}no" >&6 | |
2697 | ||
2698 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2699 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2700 | _ACEOF |
3ec83fc2 RH |
2701 | |
2702 | fi | |
2703 | ||
414d23ae HPN |
2704 | # autoconf is lame and doesn't give us any substitution variable for this. |
2705 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2706 | NO_MINUS_C_MINUS_O=yes | |
2707 | else | |
2708 | OUTPUT_OPTION='-o $@' | |
2709 | fi | |
2710 | ||
2711 | ||
2712 | ||
73458fb7 NN |
2713 | # ------------------------- |
2714 | # Check C compiler features | |
2715 | # ------------------------- | |
2716 | ||
ba479fd2 NN |
2717 | |
2718 | echo "$as_me:$LINENO: checking whether ${CC-cc} accepts -Wno-long-long" >&5 | |
2719 | echo $ECHO_N "checking whether ${CC-cc} accepts -Wno-long-long... $ECHO_C" >&6 | |
2720 | if test "${ac_cv_prog_cc_no_long_long+set}" = set; then | |
2721 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
2722 | else |
2723 | save_CFLAGS="$CFLAGS" | |
2724 | CFLAGS="-Wno-long-long" | |
ba479fd2 NN |
2725 | cat >conftest.$ac_ext <<_ACEOF |
2726 | #line $LINENO "configure" | |
2727 | /* confdefs.h. */ | |
2728 | _ACEOF | |
2729 | cat confdefs.h >>conftest.$ac_ext | |
2730 | cat >>conftest.$ac_ext <<_ACEOF | |
2731 | /* end confdefs.h. */ | |
2732 | ||
2733 | int | |
2734 | main () | |
2735 | { | |
63cf211a | 2736 | |
ba479fd2 NN |
2737 | ; |
2738 | return 0; | |
2739 | } | |
2740 | _ACEOF | |
2741 | rm -f conftest.$ac_objext | |
2742 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2743 | (eval $ac_compile) 2>&5 | |
2744 | ac_status=$? | |
2745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2746 | (exit $ac_status); } && | |
2747 | { ac_try='test -s conftest.$ac_objext' | |
2748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2749 | (eval $ac_try) 2>&5 | |
2750 | ac_status=$? | |
2751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2752 | (exit $ac_status); }; }; then | |
34a86c2b | 2753 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 2754 | else |
ba479fd2 NN |
2755 | echo "$as_me: failed program was:" >&5 |
2756 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2757 | ||
2758 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 2759 | fi |
ba479fd2 | 2760 | rm -f conftest.$ac_objext conftest.$ac_ext |
34a86c2b | 2761 | CFLAGS="$save_CFLAGS" |
75e93faa | 2762 | fi |
ba479fd2 NN |
2763 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_no_long_long" >&5 |
2764 | echo "${ECHO_T}$ac_cv_prog_cc_no_long_long" >&6 | |
75e93faa | 2765 | |
ba479fd2 NN |
2766 | ac_ext=c |
2767 | ac_cpp='$CPP $CPPFLAGS' | |
2768 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2769 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2770 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2771 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2772 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2773 | # On Suns, sometimes $CPP names a directory. |
2774 | if test -n "$CPP" && test -d "$CPP"; then | |
2775 | CPP= | |
2776 | fi | |
2777 | if test -z "$CPP"; then | |
ba479fd2 NN |
2778 | if test "${ac_cv_prog_CPP+set}" = set; then |
2779 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2780 | else | |
2781 | # Double quotes because CPP needs to be expanded | |
2782 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2783 | do | |
2784 | ac_preproc_ok=false | |
2785 | for ac_c_preproc_warn_flag in '' yes | |
2786 | do | |
2787 | # Use a header file that comes with gcc, so configuring glibc | |
2788 | # with a fresh cross-compiler works. | |
2789 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2790 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2791 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2792 | # not just through cpp. "Syntax error" is here to catch this case. |
2793 | cat >conftest.$ac_ext <<_ACEOF | |
2794 | #line $LINENO "configure" | |
2795 | /* confdefs.h. */ | |
2796 | _ACEOF | |
2797 | cat confdefs.h >>conftest.$ac_ext | |
2798 | cat >>conftest.$ac_ext <<_ACEOF | |
2799 | /* end confdefs.h. */ | |
2800 | #ifdef __STDC__ | |
2801 | # include <limits.h> | |
2802 | #else | |
2803 | # include <assert.h> | |
2804 | #endif | |
2805 | Syntax error | |
2806 | _ACEOF | |
2807 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2808 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2809 | ac_status=$? | |
2810 | grep -v '^ *+' conftest.er1 >conftest.err | |
2811 | rm -f conftest.er1 | |
2812 | cat conftest.err >&5 | |
2813 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2814 | (exit $ac_status); } >/dev/null; then | |
2815 | if test -s conftest.err; then | |
2816 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2817 | else | |
2818 | ac_cpp_err= | |
2819 | fi | |
2820 | else | |
2821 | ac_cpp_err=yes | |
2822 | fi | |
2823 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2824 | : |
cafe096b | 2825 | else |
ba479fd2 NN |
2826 | echo "$as_me: failed program was:" >&5 |
2827 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2828 | ||
2829 | # Broken: fails on valid input. | |
2830 | continue | |
2831 | fi | |
2832 | rm -f conftest.err conftest.$ac_ext | |
2833 | ||
2834 | # OK, works on sane cases. Now check whether non-existent headers | |
2835 | # can be detected and how. | |
2836 | cat >conftest.$ac_ext <<_ACEOF | |
2837 | #line $LINENO "configure" | |
2838 | /* confdefs.h. */ | |
2839 | _ACEOF | |
2840 | cat confdefs.h >>conftest.$ac_ext | |
2841 | cat >>conftest.$ac_ext <<_ACEOF | |
2842 | /* end confdefs.h. */ | |
2843 | #include <ac_nonexistent.h> | |
2844 | _ACEOF | |
2845 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2846 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2847 | ac_status=$? | |
2848 | grep -v '^ *+' conftest.er1 >conftest.err | |
2849 | rm -f conftest.er1 | |
2850 | cat conftest.err >&5 | |
2851 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2852 | (exit $ac_status); } >/dev/null; then | |
2853 | if test -s conftest.err; then | |
2854 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2855 | else | |
2856 | ac_cpp_err= | |
2857 | fi | |
2858 | else | |
2859 | ac_cpp_err=yes | |
2860 | fi | |
2861 | if test -z "$ac_cpp_err"; then | |
2862 | # Broken: success on invalid input. | |
2863 | continue | |
2864 | else | |
2865 | echo "$as_me: failed program was:" >&5 | |
2866 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2867 | ||
2868 | # Passes both tests. | |
2869 | ac_preproc_ok=: | |
2870 | break | |
2871 | fi | |
2872 | rm -f conftest.err conftest.$ac_ext | |
2873 | ||
2874 | done | |
2875 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2876 | rm -f conftest.err conftest.$ac_ext | |
2877 | if $ac_preproc_ok; then | |
2878 | break | |
2879 | fi | |
2880 | ||
2881 | done | |
2882 | ac_cv_prog_CPP=$CPP | |
2883 | ||
2884 | fi | |
2885 | CPP=$ac_cv_prog_CPP | |
2886 | else | |
2887 | ac_cv_prog_CPP=$CPP | |
2888 | fi | |
2889 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
2890 | echo "${ECHO_T}$CPP" >&6 | |
2891 | ac_preproc_ok=false | |
2892 | for ac_c_preproc_warn_flag in '' yes | |
2893 | do | |
2894 | # Use a header file that comes with gcc, so configuring glibc | |
2895 | # with a fresh cross-compiler works. | |
2896 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2897 | # <limits.h> exists even on freestanding compilers. | |
2898 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2899 | # not just through cpp. "Syntax error" is here to catch this case. | |
2900 | cat >conftest.$ac_ext <<_ACEOF | |
2901 | #line $LINENO "configure" | |
2902 | /* confdefs.h. */ | |
2903 | _ACEOF | |
2904 | cat confdefs.h >>conftest.$ac_ext | |
2905 | cat >>conftest.$ac_ext <<_ACEOF | |
2906 | /* end confdefs.h. */ | |
2907 | #ifdef __STDC__ | |
2908 | # include <limits.h> | |
2909 | #else | |
2910 | # include <assert.h> | |
2911 | #endif | |
2912 | Syntax error | |
2913 | _ACEOF | |
2914 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2915 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2916 | ac_status=$? | |
2917 | grep -v '^ *+' conftest.er1 >conftest.err | |
2918 | rm -f conftest.er1 | |
2919 | cat conftest.err >&5 | |
2920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2921 | (exit $ac_status); } >/dev/null; then | |
2922 | if test -s conftest.err; then | |
2923 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2924 | else | |
2925 | ac_cpp_err= | |
2926 | fi | |
2927 | else | |
2928 | ac_cpp_err=yes | |
2929 | fi | |
2930 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 2931 | : |
414d23ae | 2932 | else |
ba479fd2 NN |
2933 | echo "$as_me: failed program was:" >&5 |
2934 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2935 | ||
2936 | # Broken: fails on valid input. | |
2937 | continue | |
2938 | fi | |
2939 | rm -f conftest.err conftest.$ac_ext | |
2940 | ||
2941 | # OK, works on sane cases. Now check whether non-existent headers | |
2942 | # can be detected and how. | |
2943 | cat >conftest.$ac_ext <<_ACEOF | |
2944 | #line $LINENO "configure" | |
2945 | /* confdefs.h. */ | |
2946 | _ACEOF | |
2947 | cat confdefs.h >>conftest.$ac_ext | |
2948 | cat >>conftest.$ac_ext <<_ACEOF | |
2949 | /* end confdefs.h. */ | |
2950 | #include <ac_nonexistent.h> | |
2951 | _ACEOF | |
2952 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2953 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2954 | ac_status=$? | |
2955 | grep -v '^ *+' conftest.er1 >conftest.err | |
2956 | rm -f conftest.er1 | |
2957 | cat conftest.err >&5 | |
2958 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2959 | (exit $ac_status); } >/dev/null; then | |
2960 | if test -s conftest.err; then | |
2961 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2962 | else | |
2963 | ac_cpp_err= | |
2964 | fi | |
6e3f3080 | 2965 | else |
ba479fd2 | 2966 | ac_cpp_err=yes |
63cf211a | 2967 | fi |
ba479fd2 NN |
2968 | if test -z "$ac_cpp_err"; then |
2969 | # Broken: success on invalid input. | |
2970 | continue | |
2971 | else | |
2972 | echo "$as_me: failed program was:" >&5 | |
2973 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2974 | ||
2975 | # Passes both tests. | |
2976 | ac_preproc_ok=: | |
2977 | break | |
63cf211a | 2978 | fi |
ba479fd2 NN |
2979 | rm -f conftest.err conftest.$ac_ext |
2980 | ||
2981 | done | |
2982 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2983 | rm -f conftest.err conftest.$ac_ext | |
2984 | if $ac_preproc_ok; then | |
2985 | : | |
6e3f3080 | 2986 | else |
ba479fd2 NN |
2987 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
2988 | See \`config.log' for more details." >&5 | |
2989 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
2990 | See \`config.log' for more details." >&2;} | |
2991 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
2992 | fi |
2993 | ||
ba479fd2 NN |
2994 | ac_ext=c |
2995 | ac_cpp='$CPP $CPPFLAGS' | |
2996 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2997 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2998 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2999 | ||
3000 | echo "$as_me:$LINENO: checking for inline" >&5 | |
3001 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3002 | if test "${ac_cv_c_inline+set}" = set; then | |
3003 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3004 | else |
3005 | ac_cv_c_inline=no | |
3006 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 NN |
3007 | cat >conftest.$ac_ext <<_ACEOF |
3008 | #line $LINENO "configure" | |
3009 | /* confdefs.h. */ | |
3010 | _ACEOF | |
3011 | cat confdefs.h >>conftest.$ac_ext | |
3012 | cat >>conftest.$ac_ext <<_ACEOF | |
3013 | /* end confdefs.h. */ | |
3014 | #ifndef __cplusplus | |
3015 | typedef int foo_t; | |
3016 | static $ac_kw foo_t static_foo () {return 0; } | |
3017 | $ac_kw foo_t foo () {return 0; } | |
3018 | #endif | |
414d23ae | 3019 | |
ba479fd2 NN |
3020 | _ACEOF |
3021 | rm -f conftest.$ac_objext | |
3022 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3023 | (eval $ac_compile) 2>&5 | |
3024 | ac_status=$? | |
3025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3026 | (exit $ac_status); } && | |
3027 | { ac_try='test -s conftest.$ac_objext' | |
3028 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3029 | (eval $ac_try) 2>&5 | |
3030 | ac_status=$? | |
3031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3032 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3033 | ac_cv_c_inline=$ac_kw; break |
3034 | else | |
ba479fd2 NN |
3035 | echo "$as_me: failed program was:" >&5 |
3036 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3037 | ||
414d23ae | 3038 | fi |
ba479fd2 | 3039 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3040 | done |
3041 | ||
3042 | fi | |
ba479fd2 NN |
3043 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3044 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
3045 | case $ac_cv_c_inline in | |
414d23ae | 3046 | inline | yes) ;; |
ba479fd2 NN |
3047 | no) |
3048 | cat >>confdefs.h <<\_ACEOF | |
3049 | #define inline | |
3050 | _ACEOF | |
e1366e0c | 3051 | ;; |
ba479fd2 | 3052 | *) cat >>confdefs.h <<_ACEOF |
e1366e0c | 3053 | #define inline $ac_cv_c_inline |
ba479fd2 | 3054 | _ACEOF |
e1366e0c | 3055 | ;; |
414d23ae HPN |
3056 | esac |
3057 | ||
414d23ae | 3058 | |
ba479fd2 NN |
3059 | echo "$as_me:$LINENO: checking for long long int" >&5 |
3060 | echo $ECHO_N "checking for long long int... $ECHO_C" >&6 | |
3061 | if test "${ac_cv_c_long_long+set}" = set; then | |
3062 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3063 | else |
ba479fd2 NN |
3064 | cat >conftest.$ac_ext <<_ACEOF |
3065 | #line $LINENO "configure" | |
3066 | /* confdefs.h. */ | |
3067 | _ACEOF | |
3068 | cat confdefs.h >>conftest.$ac_ext | |
3069 | cat >>conftest.$ac_ext <<_ACEOF | |
3070 | /* end confdefs.h. */ | |
414d23ae | 3071 | |
ba479fd2 NN |
3072 | int |
3073 | main () | |
3074 | { | |
414d23ae | 3075 | long long int i; |
ba479fd2 NN |
3076 | ; |
3077 | return 0; | |
3078 | } | |
3079 | _ACEOF | |
3080 | rm -f conftest.$ac_objext | |
3081 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3082 | (eval $ac_compile) 2>&5 | |
3083 | ac_status=$? | |
3084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3085 | (exit $ac_status); } && | |
3086 | { ac_try='test -s conftest.$ac_objext' | |
3087 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3088 | (eval $ac_try) 2>&5 | |
3089 | ac_status=$? | |
3090 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3091 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3092 | ac_cv_c_long_long=yes |
3093 | else | |
ba479fd2 NN |
3094 | echo "$as_me: failed program was:" >&5 |
3095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3096 | ||
3097 | ac_cv_c_long_long=no | |
414d23ae | 3098 | fi |
ba479fd2 | 3099 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3100 | fi |
ba479fd2 NN |
3101 | echo "$as_me:$LINENO: result: $ac_cv_c_long_long" >&5 |
3102 | echo "${ECHO_T}$ac_cv_c_long_long" >&6 | |
63cf211a | 3103 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3104 | |
3105 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3106 | #define HAVE_LONG_LONG 1 |
ba479fd2 | 3107 | _ACEOF |
414d23ae HPN |
3108 | |
3109 | fi | |
ba479fd2 NN |
3110 | echo "$as_me:$LINENO: checking for __int64" >&5 |
3111 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
3112 | if test "${ac_cv_c___int64+set}" = set; then | |
3113 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3114 | else | |
3115 | cat >conftest.$ac_ext <<_ACEOF | |
3116 | #line $LINENO "configure" | |
3117 | /* confdefs.h. */ | |
3118 | _ACEOF | |
3119 | cat confdefs.h >>conftest.$ac_ext | |
3120 | cat >>conftest.$ac_ext <<_ACEOF | |
3121 | /* end confdefs.h. */ | |
3122 | ||
3123 | int | |
3124 | main () | |
3125 | { | |
414d23ae | 3126 | __int64 i; |
ba479fd2 NN |
3127 | ; |
3128 | return 0; | |
3129 | } | |
3130 | _ACEOF | |
3131 | rm -f conftest.$ac_objext | |
3132 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3133 | (eval $ac_compile) 2>&5 | |
3134 | ac_status=$? | |
3135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3136 | (exit $ac_status); } && | |
3137 | { ac_try='test -s conftest.$ac_objext' | |
3138 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3139 | (eval $ac_try) 2>&5 | |
3140 | ac_status=$? | |
3141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3142 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3143 | ac_cv_c___int64=yes |
3144 | else | |
ba479fd2 NN |
3145 | echo "$as_me: failed program was:" >&5 |
3146 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3147 | ||
3148 | ac_cv_c___int64=no | |
414d23ae | 3149 | fi |
ba479fd2 | 3150 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3151 | fi |
ba479fd2 NN |
3152 | echo "$as_me:$LINENO: result: $ac_cv_c___int64" >&5 |
3153 | echo "${ECHO_T}$ac_cv_c___int64" >&6 | |
63cf211a | 3154 | if test $ac_cv_c___int64 = yes; then |
ba479fd2 NN |
3155 | |
3156 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3157 | #define HAVE___INT64 1 |
ba479fd2 | 3158 | _ACEOF |
414d23ae HPN |
3159 | |
3160 | fi | |
3161 | ||
ba479fd2 NN |
3162 | echo "$as_me:$LINENO: checking for built-in _Bool" >&5 |
3163 | echo $ECHO_N "checking for built-in _Bool... $ECHO_C" >&6 | |
3164 | if test "${gcc_cv_c__bool+set}" = set; then | |
3165 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3166 | else | |
3167 | cat >conftest.$ac_ext <<_ACEOF | |
3168 | #line $LINENO "configure" | |
3169 | /* confdefs.h. */ | |
3170 | _ACEOF | |
3171 | cat confdefs.h >>conftest.$ac_ext | |
3172 | cat >>conftest.$ac_ext <<_ACEOF | |
3173 | /* end confdefs.h. */ | |
3174 | ||
3175 | int | |
3176 | main () | |
3177 | { | |
414d23ae | 3178 | _Bool foo; |
ba479fd2 NN |
3179 | ; |
3180 | return 0; | |
3181 | } | |
3182 | _ACEOF | |
3183 | rm -f conftest.$ac_objext | |
3184 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3185 | (eval $ac_compile) 2>&5 | |
3186 | ac_status=$? | |
3187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3188 | (exit $ac_status); } && | |
3189 | { ac_try='test -s conftest.$ac_objext' | |
3190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3191 | (eval $ac_try) 2>&5 | |
3192 | ac_status=$? | |
3193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3194 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3195 | gcc_cv_c__bool=yes |
3196 | else | |
ba479fd2 NN |
3197 | echo "$as_me: failed program was:" >&5 |
3198 | sed 's/^/| /' conftest.$ac_ext >&5 | |
cafe096b | 3199 | |
ba479fd2 | 3200 | gcc_cv_c__bool=no |
6e3f3080 | 3201 | fi |
ba479fd2 | 3202 | rm -f conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 3203 | |
ba479fd2 NN |
3204 | fi |
3205 | echo "$as_me:$LINENO: result: $gcc_cv_c__bool" >&5 | |
3206 | echo "${ECHO_T}$gcc_cv_c__bool" >&6 | |
63cf211a | 3207 | if test $gcc_cv_c__bool = yes; then |
ba479fd2 NN |
3208 | |
3209 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 3210 | #define HAVE__BOOL 1 |
ba479fd2 | 3211 | _ACEOF |
414d23ae HPN |
3212 | |
3213 | fi | |
3214 | ||
3215 | ||
3216 | # sizeof(char) is 1 by definition. | |
ba479fd2 NN |
3217 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3218 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3219 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3220 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd KG |
3221 | else |
3222 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. | |
ba479fd2 NN |
3223 | cat >conftest.$ac_ext <<_ACEOF |
3224 | #line $LINENO "configure" | |
3225 | /* confdefs.h. */ | |
3226 | _ACEOF | |
3227 | cat confdefs.h >>conftest.$ac_ext | |
3228 | cat >>conftest.$ac_ext <<_ACEOF | |
3229 | /* end confdefs.h. */ | |
75b6f3fd KG |
3230 | #include "confdefs.h" |
3231 | #include <sys/types.h> | |
3232 | ||
3233 | ||
ba479fd2 NN |
3234 | int |
3235 | main () | |
3236 | { | |
75b6f3fd | 3237 | switch (0) case 0: case (sizeof (void *) == $ac_size):; |
ba479fd2 NN |
3238 | ; |
3239 | return 0; | |
3240 | } | |
3241 | _ACEOF | |
3242 | rm -f conftest.$ac_objext | |
3243 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3244 | (eval $ac_compile) 2>&5 | |
3245 | ac_status=$? | |
3246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3247 | (exit $ac_status); } && | |
3248 | { ac_try='test -s conftest.$ac_objext' | |
3249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3250 | (eval $ac_try) 2>&5 | |
3251 | ac_status=$? | |
3252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3253 | (exit $ac_status); }; }; then | |
75b6f3fd KG |
3254 | ac_cv_sizeof_void_p=$ac_size |
3255 | else | |
ba479fd2 NN |
3256 | echo "$as_me: failed program was:" >&5 |
3257 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3258 | ||
75b6f3fd | 3259 | fi |
ba479fd2 | 3260 | rm -f conftest.$ac_objext conftest.$ac_ext |
75b6f3fd KG |
3261 | if test x$ac_cv_sizeof_void_p != x ; then break; fi |
3262 | done | |
3263 | ||
3264 | fi | |
3265 | ||
3266 | if test x$ac_cv_sizeof_void_p = x ; then | |
ba479fd2 NN |
3267 | { { echo "$as_me:$LINENO: error: cannot determine a size for void *" >&5 |
3268 | echo "$as_me: error: cannot determine a size for void *" >&2;} | |
3269 | { (exit 1); exit 1; }; } | |
75b6f3fd | 3270 | fi |
ba479fd2 NN |
3271 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 |
3272 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3273 | ||
3274 | cat >>confdefs.h <<_ACEOF | |
75b6f3fd | 3275 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
ba479fd2 | 3276 | _ACEOF |
75b6f3fd KG |
3277 | |
3278 | ||
ba479fd2 NN |
3279 | echo "$as_me:$LINENO: checking size of short" >&5 |
3280 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3281 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3282 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae | 3283 | else |
4977bab6 | 3284 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 NN |
3285 | cat >conftest.$ac_ext <<_ACEOF |
3286 | #line $LINENO "configure" | |
3287 | /* confdefs.h. */ | |
3288 | _ACEOF | |
3289 | cat confdefs.h >>conftest.$ac_ext | |
3290 | cat >>conftest.$ac_ext <<_ACEOF | |
3291 | /* end confdefs.h. */ | |
414d23ae HPN |
3292 | #include "confdefs.h" |
3293 | #include <sys/types.h> | |
3294 | ||
3295 | ||
ba479fd2 NN |
3296 | int |
3297 | main () | |
3298 | { | |
414d23ae | 3299 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
ba479fd2 NN |
3300 | ; |
3301 | return 0; | |
3302 | } | |
3303 | _ACEOF | |
3304 | rm -f conftest.$ac_objext | |
3305 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3306 | (eval $ac_compile) 2>&5 | |
3307 | ac_status=$? | |
3308 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3309 | (exit $ac_status); } && | |
3310 | { ac_try='test -s conftest.$ac_objext' | |
3311 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3312 | (eval $ac_try) 2>&5 | |
3313 | ac_status=$? | |
3314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3315 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3316 | ac_cv_sizeof_short=$ac_size |
3317 | else | |
ba479fd2 NN |
3318 | echo "$as_me: failed program was:" >&5 |
3319 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3320 | ||
84c041a1 | 3321 | fi |
ba479fd2 | 3322 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3323 | if test x$ac_cv_sizeof_short != x ; then break; fi |
3324 | done | |
3325 | ||
84c041a1 | 3326 | fi |
414d23ae HPN |
3327 | |
3328 | if test x$ac_cv_sizeof_short = x ; then | |
ba479fd2 NN |
3329 | { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 |
3330 | echo "$as_me: error: cannot determine a size for short" >&2;} | |
3331 | { (exit 1); exit 1; }; } | |
84c041a1 | 3332 | fi |
ba479fd2 NN |
3333 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 |
3334 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
3335 | ||
3336 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3337 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
ba479fd2 | 3338 | _ACEOF |
84c041a1 | 3339 | |
414d23ae | 3340 | |
ba479fd2 NN |
3341 | echo "$as_me:$LINENO: checking size of int" >&5 |
3342 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
3343 | if test "${ac_cv_sizeof_int+set}" = set; then | |
3344 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3345 | else |
4977bab6 | 3346 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 NN |
3347 | cat >conftest.$ac_ext <<_ACEOF |
3348 | #line $LINENO "configure" | |
3349 | /* confdefs.h. */ | |
3350 | _ACEOF | |
3351 | cat confdefs.h >>conftest.$ac_ext | |
3352 | cat >>conftest.$ac_ext <<_ACEOF | |
3353 | /* end confdefs.h. */ | |
414d23ae HPN |
3354 | #include "confdefs.h" |
3355 | #include <sys/types.h> | |
3356 | ||
75e93faa | 3357 | |
ba479fd2 NN |
3358 | int |
3359 | main () | |
3360 | { | |
414d23ae | 3361 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
ba479fd2 NN |
3362 | ; |
3363 | return 0; | |
3364 | } | |
3365 | _ACEOF | |
3366 | rm -f conftest.$ac_objext | |
3367 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3368 | (eval $ac_compile) 2>&5 | |
3369 | ac_status=$? | |
3370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3371 | (exit $ac_status); } && | |
3372 | { ac_try='test -s conftest.$ac_objext' | |
3373 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3374 | (eval $ac_try) 2>&5 | |
3375 | ac_status=$? | |
3376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3377 | (exit $ac_status); }; }; then | |
414d23ae | 3378 | ac_cv_sizeof_int=$ac_size |
75e93faa | 3379 | else |
ba479fd2 NN |
3380 | echo "$as_me: failed program was:" >&5 |
3381 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3382 | ||
75e93faa | 3383 | fi |
ba479fd2 | 3384 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae | 3385 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
3386 | done |
3387 | ||
3388 | fi | |
3389 | ||
414d23ae | 3390 | if test x$ac_cv_sizeof_int = x ; then |
ba479fd2 NN |
3391 | { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 |
3392 | echo "$as_me: error: cannot determine a size for int" >&2;} | |
3393 | { (exit 1); exit 1; }; } | |
414d23ae | 3394 | fi |
ba479fd2 NN |
3395 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 |
3396 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
3397 | ||
3398 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3399 | #define SIZEOF_INT $ac_cv_sizeof_int |
ba479fd2 | 3400 | _ACEOF |
75e93faa | 3401 | |
414d23ae | 3402 | |
ba479fd2 NN |
3403 | echo "$as_me:$LINENO: checking size of long" >&5 |
3404 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
3405 | if test "${ac_cv_sizeof_long+set}" = set; then | |
3406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3407 | else |
4977bab6 | 3408 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 NN |
3409 | cat >conftest.$ac_ext <<_ACEOF |
3410 | #line $LINENO "configure" | |
3411 | /* confdefs.h. */ | |
3412 | _ACEOF | |
3413 | cat confdefs.h >>conftest.$ac_ext | |
3414 | cat >>conftest.$ac_ext <<_ACEOF | |
3415 | /* end confdefs.h. */ | |
75e93faa | 3416 | #include "confdefs.h" |
414d23ae HPN |
3417 | #include <sys/types.h> |
3418 | ||
75e93faa | 3419 | |
ba479fd2 NN |
3420 | int |
3421 | main () | |
3422 | { | |
414d23ae | 3423 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
ba479fd2 NN |
3424 | ; |
3425 | return 0; | |
3426 | } | |
3427 | _ACEOF | |
3428 | rm -f conftest.$ac_objext | |
3429 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3430 | (eval $ac_compile) 2>&5 | |
3431 | ac_status=$? | |
3432 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3433 | (exit $ac_status); } && | |
3434 | { ac_try='test -s conftest.$ac_objext' | |
3435 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3436 | (eval $ac_try) 2>&5 | |
3437 | ac_status=$? | |
3438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3439 | (exit $ac_status); }; }; then | |
414d23ae | 3440 | ac_cv_sizeof_long=$ac_size |
75e93faa | 3441 | else |
ba479fd2 NN |
3442 | echo "$as_me: failed program was:" >&5 |
3443 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3444 | ||
75e93faa | 3445 | fi |
ba479fd2 | 3446 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3447 | if test x$ac_cv_sizeof_long != x ; then break; fi |
3448 | done | |
75e93faa | 3449 | |
414d23ae | 3450 | fi |
75e93faa | 3451 | |
414d23ae | 3452 | if test x$ac_cv_sizeof_long = x ; then |
ba479fd2 NN |
3453 | { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 |
3454 | echo "$as_me: error: cannot determine a size for long" >&2;} | |
3455 | { (exit 1); exit 1; }; } | |
75e93faa | 3456 | fi |
ba479fd2 NN |
3457 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 |
3458 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
3459 | ||
3460 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3461 | #define SIZEOF_LONG $ac_cv_sizeof_long |
ba479fd2 | 3462 | _ACEOF |
75e93faa ZW |
3463 | |
3464 | ||
414d23ae | 3465 | if test $ac_cv_c_long_long = yes; then |
ba479fd2 NN |
3466 | echo "$as_me:$LINENO: checking size of long long" >&5 |
3467 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
3468 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
3469 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
04cabffc | 3470 | else |
4977bab6 | 3471 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 NN |
3472 | cat >conftest.$ac_ext <<_ACEOF |
3473 | #line $LINENO "configure" | |
3474 | /* confdefs.h. */ | |
3475 | _ACEOF | |
3476 | cat confdefs.h >>conftest.$ac_ext | |
3477 | cat >>conftest.$ac_ext <<_ACEOF | |
3478 | /* end confdefs.h. */ | |
414d23ae HPN |
3479 | #include "confdefs.h" |
3480 | #include <sys/types.h> | |
3481 | ||
04cabffc | 3482 | |
ba479fd2 NN |
3483 | int |
3484 | main () | |
3485 | { | |
414d23ae | 3486 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
ba479fd2 NN |
3487 | ; |
3488 | return 0; | |
3489 | } | |
3490 | _ACEOF | |
3491 | rm -f conftest.$ac_objext | |
3492 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3493 | (eval $ac_compile) 2>&5 | |
3494 | ac_status=$? | |
3495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3496 | (exit $ac_status); } && | |
3497 | { ac_try='test -s conftest.$ac_objext' | |
3498 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3499 | (eval $ac_try) 2>&5 | |
3500 | ac_status=$? | |
3501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3502 | (exit $ac_status); }; }; then | |
414d23ae | 3503 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 3504 | else |
ba479fd2 NN |
3505 | echo "$as_me: failed program was:" >&5 |
3506 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3507 | ||
04cabffc | 3508 | fi |
ba479fd2 | 3509 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3510 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
3511 | done | |
3512 | ||
04cabffc KG |
3513 | fi |
3514 | ||
414d23ae | 3515 | if test x$ac_cv_sizeof_long_long = x ; then |
ba479fd2 NN |
3516 | { { echo "$as_me:$LINENO: error: cannot determine a size for long long" >&5 |
3517 | echo "$as_me: error: cannot determine a size for long long" >&2;} | |
3518 | { (exit 1); exit 1; }; } | |
414d23ae | 3519 | fi |
ba479fd2 NN |
3520 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 |
3521 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
3522 | ||
3523 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3524 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
ba479fd2 | 3525 | _ACEOF |
04cabffc | 3526 | |
04cabffc | 3527 | |
414d23ae HPN |
3528 | fi |
3529 | if test $ac_cv_c___int64 = yes; then | |
ba479fd2 NN |
3530 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
3531 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
3532 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
3533 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa | 3534 | else |
4977bab6 | 3535 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
ba479fd2 NN |
3536 | cat >conftest.$ac_ext <<_ACEOF |
3537 | #line $LINENO "configure" | |
3538 | /* confdefs.h. */ | |
3539 | _ACEOF | |
3540 | cat confdefs.h >>conftest.$ac_ext | |
3541 | cat >>conftest.$ac_ext <<_ACEOF | |
3542 | /* end confdefs.h. */ | |
414d23ae HPN |
3543 | #include "confdefs.h" |
3544 | #include <sys/types.h> | |
3545 | ||
61842080 | 3546 | |
ba479fd2 NN |
3547 | int |
3548 | main () | |
3549 | { | |
414d23ae | 3550 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
ba479fd2 NN |
3551 | ; |
3552 | return 0; | |
3553 | } | |
3554 | _ACEOF | |
3555 | rm -f conftest.$ac_objext | |
3556 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3557 | (eval $ac_compile) 2>&5 | |
3558 | ac_status=$? | |
3559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3560 | (exit $ac_status); } && | |
3561 | { ac_try='test -s conftest.$ac_objext' | |
3562 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3563 | (eval $ac_try) 2>&5 | |
3564 | ac_status=$? | |
3565 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3566 | (exit $ac_status); }; }; then | |
414d23ae | 3567 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 3568 | else |
ba479fd2 NN |
3569 | echo "$as_me: failed program was:" >&5 |
3570 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3571 | ||
75e93faa | 3572 | fi |
ba479fd2 | 3573 | rm -f conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3574 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
3575 | done | |
3576 | ||
75e93faa ZW |
3577 | fi |
3578 | ||
414d23ae | 3579 | if test x$ac_cv_sizeof___int64 = x ; then |
ba479fd2 NN |
3580 | { { echo "$as_me:$LINENO: error: cannot determine a size for __int64" >&5 |
3581 | echo "$as_me: error: cannot determine a size for __int64" >&2;} | |
3582 | { (exit 1); exit 1; }; } | |
414d23ae | 3583 | fi |
ba479fd2 NN |
3584 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
3585 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
3586 | ||
3587 | cat >>confdefs.h <<_ACEOF | |
414d23ae | 3588 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 3589 | _ACEOF |
414d23ae | 3590 | |
cafe096b | 3591 | |
414d23ae HPN |
3592 | fi |
3593 | ||
34a86c2b NN |
3594 | # ----------------- |
3595 | # Find Ada compiler | |
3596 | # ----------------- | |
3597 | ||
3598 | # See if GNAT has been installed | |
34a86c2b NN |
3599 | |
3600 | ||
e0520fa7 | 3601 | |
ba479fd2 NN |
3602 | if test -n "$ac_tool_prefix"; then |
3603 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. | |
34a86c2b | 3604 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
ba479fd2 NN |
3605 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
3606 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3607 | if test "${ac_cv_prog_GNATBIND+set}" = set; then | |
3608 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
34a86c2b NN |
3609 | else |
3610 | if test -n "$GNATBIND"; then | |
3611 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
3612 | else | |
ba479fd2 NN |
3613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3614 | for as_dir in $PATH | |
3615 | do | |
3616 | IFS=$as_save_IFS | |
3617 | test -z "$as_dir" && as_dir=. | |
3618 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3619 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3620 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
3621 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3622 | break 2 | |
3623 | fi | |
3624 | done | |
3625 | done | |
3626 | ||
34a86c2b NN |
3627 | fi |
3628 | fi | |
ba479fd2 | 3629 | GNATBIND=$ac_cv_prog_GNATBIND |
34a86c2b | 3630 | if test -n "$GNATBIND"; then |
ba479fd2 NN |
3631 | echo "$as_me:$LINENO: result: $GNATBIND" >&5 |
3632 | echo "${ECHO_T}$GNATBIND" >&6 | |
34a86c2b | 3633 | else |
ba479fd2 NN |
3634 | echo "$as_me:$LINENO: result: no" >&5 |
3635 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
3636 | fi |
3637 | ||
ba479fd2 | 3638 | fi |
34a86c2b | 3639 | if test -z "$ac_cv_prog_GNATBIND"; then |
ba479fd2 | 3640 | ac_ct_GNATBIND=$GNATBIND |
34a86c2b NN |
3641 | # Extract the first word of "gnatbind", so it can be a program name with args. |
3642 | set dummy gnatbind; ac_word=$2 | |
ba479fd2 NN |
3643 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
3644 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3645 | if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then | |
3646 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
34a86c2b | 3647 | else |
ba479fd2 NN |
3648 | if test -n "$ac_ct_GNATBIND"; then |
3649 | ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # Let the user override the test. | |
34a86c2b | 3650 | else |
ba479fd2 NN |
3651 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
3652 | for as_dir in $PATH | |
3653 | do | |
3654 | IFS=$as_save_IFS | |
3655 | test -z "$as_dir" && as_dir=. | |
3656 | for ac_exec_ext in '' $ac_executable_extensions; do | |
3657 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3658 | ac_cv_prog_ac_ct_GNATBIND="gnatbind" | |
3659 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3660 | break 2 | |
3661 | fi | |
3662 | done | |
3663 | done | |
3664 | ||
3665 | test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no" | |
34a86c2b NN |
3666 | fi |
3667 | fi | |
ba479fd2 NN |
3668 | ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND |
3669 | if test -n "$ac_ct_GNATBIND"; then | |
3670 | echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5 | |
3671 | echo "${ECHO_T}$ac_ct_GNATBIND" >&6 | |
34a86c2b | 3672 | else |
ba479fd2 NN |
3673 | echo "$as_me:$LINENO: result: no" >&5 |
3674 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
3675 | fi |
3676 | ||
ba479fd2 | 3677 | GNATBIND=$ac_ct_GNATBIND |
34a86c2b | 3678 | else |
ba479fd2 | 3679 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b NN |
3680 | fi |
3681 | ||
ba479fd2 NN |
3682 | echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5 |
3683 | echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6 | |
3684 | if test "${gcc_cv_cc_supports_ada+set}" = set; then | |
3685 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
34a86c2b NN |
3686 | else |
3687 | cat >conftest.adb <<EOF | |
3688 | procedure conftest is begin null; end conftest; | |
3689 | EOF | |
e0520fa7 NN |
3690 | gcc_cv_cc_supports_ada=no |
3691 | # There is a bug in old released versions of GCC which causes the | |
3692 | # driver to exit successfully when the appropriate language module | |
3693 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
3694 | # Therefore we must check for the error message as well as an | |
3695 | # unsuccessful exit. | |
3696 | errors=`(${CC} -c conftest.adb) 2>&1 || echo failure` | |
3697 | if test x"$errors" = x; then | |
3698 | gcc_cv_cc_supports_ada=yes | |
3699 | break | |
3700 | fi | |
34a86c2b NN |
3701 | rm -f conftest.* |
3702 | fi | |
ba479fd2 NN |
3703 | echo "$as_me:$LINENO: result: $gcc_cv_cc_supports_ada" >&5 |
3704 | echo "${ECHO_T}$gcc_cv_cc_supports_ada" >&6 | |
34a86c2b | 3705 | |
e0520fa7 | 3706 | if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then |
34a86c2b NN |
3707 | have_gnat=yes |
3708 | else | |
3709 | have_gnat=no | |
3710 | fi | |
3711 | ||
3712 | ||
34a86c2b NN |
3713 | # --------------------- |
3714 | # Warnings and checking | |
3715 | # --------------------- | |
3716 | ||
3717 | strict1_warn= | |
f73ccc50 | 3718 | if test $ac_cv_prog_cc_no_long_long = yes ; then |
34a86c2b NN |
3719 | strict1_warn="-pedantic -Wno-long-long" |
3720 | fi | |
3721 | ||
3722 | ||
ba479fd2 | 3723 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
3724 | # That's useful for people building cross-compilers, or just running a |
3725 | # quick `make'. | |
3726 | warn_cflags= | |
3727 | if test "x$GCC" = "xyes"; then | |
3728 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
3729 | fi | |
3730 | ||
3731 | ||
dd859b8a KG |
3732 | # Enable -Werror in bootstrap stage2 and later. |
3733 | # Change the default to "no" on release branches. | |
3734 | # Check whether --enable-werror or --disable-werror was given. | |
3735 | if test "${enable_werror+set}" = set; then | |
3736 | enableval="$enable_werror" | |
ba479fd2 | 3737 | |
dd859b8a KG |
3738 | else |
3739 | enable_werror=yes | |
ba479fd2 | 3740 | fi; |
dd859b8a KG |
3741 | if test x$enable_werror = xyes ; then |
3742 | WERROR=-Werror | |
3743 | fi | |
3744 | ||
3745 | ||
414d23ae HPN |
3746 | # Enable expensive internal checks |
3747 | # Check whether --enable-checking or --disable-checking was given. | |
3748 | if test "${enable_checking+set}" = set; then | |
3749 | enableval="$enable_checking" | |
3750 | ac_checking= | |
3751 | ac_tree_checking= | |
3752 | ac_rtl_checking= | |
3753 | ac_rtlflag_checking= | |
3754 | ac_gc_checking= | |
3755 | ac_gc_always_collect= | |
5dfa45d0 | 3756 | ac_fold_checking= |
414d23ae HPN |
3757 | case "${enableval}" in |
3758 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
3759 | ac_rtlflag_checking=1 ;; | |
3760 | no) ;; | |
3761 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
3762 | set fnord $enableval; shift | |
3763 | IFS="$ac_save_IFS" | |
3764 | for check | |
3765 | do | |
3766 | case $check in | |
3767 | misc) ac_checking=1 ;; | |
3768 | tree) ac_tree_checking=1 ;; | |
3769 | rtlflag) ac_rtlflag_checking=1 ;; | |
3770 | rtl) ac_rtl_checking=1 ;; | |
3771 | gc) ac_gc_checking=1 ;; | |
3772 | gcac) ac_gc_always_collect=1 ;; | |
5dfa45d0 | 3773 | fold) ac_fold_checking=1 ;; |
414d23ae | 3774 | valgrind) ac_checking_valgrind=1 ;; |
ba479fd2 NN |
3775 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
3776 | echo "$as_me: error: unknown check category $check" >&2;} | |
3777 | { (exit 1); exit 1; }; } ;; | |
414d23ae HPN |
3778 | esac |
3779 | done | |
3780 | ;; | |
3781 | esac | |
3782 | ||
75e93faa | 3783 | else |
414d23ae HPN |
3784 | # Enable some checks by default for development versions of GCC |
3785 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
ba479fd2 NN |
3786 | fi; |
3787 | nocommon_flag="" | |
3788 | if test x$ac_checking != x ; then | |
3789 | ||
3790 | cat >>confdefs.h <<\_ACEOF | |
3791 | #define ENABLE_CHECKING 1 | |
3792 | _ACEOF | |
3793 | ||
3794 | nocommon_flag=-fno-common | |
3795 | fi | |
3796 | ||
3797 | if test x$ac_tree_checking != x ; then | |
3798 | ||
3799 | cat >>confdefs.h <<\_ACEOF | |
3800 | #define ENABLE_TREE_CHECKING 1 | |
3801 | _ACEOF | |
3802 | ||
3803 | fi | |
3804 | if test x$ac_rtl_checking != x ; then | |
3805 | ||
3806 | cat >>confdefs.h <<\_ACEOF | |
3807 | #define ENABLE_RTL_CHECKING 1 | |
3808 | _ACEOF | |
3809 | ||
3810 | fi | |
3811 | if test x$ac_rtlflag_checking != x ; then | |
3812 | ||
3813 | cat >>confdefs.h <<\_ACEOF | |
3814 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
3815 | _ACEOF | |
3816 | ||
3817 | fi | |
3818 | if test x$ac_gc_checking != x ; then | |
3819 | ||
3820 | cat >>confdefs.h <<\_ACEOF | |
3821 | #define ENABLE_GC_CHECKING 1 | |
3822 | _ACEOF | |
3823 | ||
3824 | fi | |
3825 | if test x$ac_gc_always_collect != x ; then | |
3826 | ||
3827 | cat >>confdefs.h <<\_ACEOF | |
3828 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
3829 | _ACEOF | |
3830 | ||
3831 | fi | |
3832 | if test x$ac_fold_checking != x ; then | |
3833 | ||
3834 | cat >>confdefs.h <<\_ACEOF | |
3835 | #define ENABLE_FOLD_CHECKING 1 | |
3836 | _ACEOF | |
3837 | ||
3838 | fi | |
3839 | valgrind_path_defines= | |
3840 | valgrind_command= | |
3841 | ||
3842 | ||
3843 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3844 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3845 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3846 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3847 | else | |
3848 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3849 | then ac_cv_prog_egrep='grep -E' | |
3850 | else ac_cv_prog_egrep='egrep' | |
3851 | fi | |
3852 | fi | |
3853 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3854 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3855 | EGREP=$ac_cv_prog_egrep | |
3856 | ||
3857 | ||
3858 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3859 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3860 | if test "${ac_cv_header_stdc+set}" = set; then | |
3861 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3862 | else | |
3863 | cat >conftest.$ac_ext <<_ACEOF | |
3864 | #line $LINENO "configure" | |
3865 | /* confdefs.h. */ | |
3866 | _ACEOF | |
3867 | cat confdefs.h >>conftest.$ac_ext | |
3868 | cat >>conftest.$ac_ext <<_ACEOF | |
3869 | /* end confdefs.h. */ | |
3870 | #include <stdlib.h> | |
3871 | #include <stdarg.h> | |
3872 | #include <string.h> | |
3873 | #include <float.h> | |
3874 | ||
3875 | int | |
3876 | main () | |
3877 | { | |
3878 | ||
3879 | ; | |
3880 | return 0; | |
3881 | } | |
3882 | _ACEOF | |
3883 | rm -f conftest.$ac_objext | |
3884 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3885 | (eval $ac_compile) 2>&5 | |
3886 | ac_status=$? | |
3887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3888 | (exit $ac_status); } && | |
3889 | { ac_try='test -s conftest.$ac_objext' | |
3890 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3891 | (eval $ac_try) 2>&5 | |
3892 | ac_status=$? | |
3893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3894 | (exit $ac_status); }; }; then | |
3895 | ac_cv_header_stdc=yes | |
3896 | else | |
3897 | echo "$as_me: failed program was:" >&5 | |
3898 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3899 | ||
3900 | ac_cv_header_stdc=no | |
3901 | fi | |
3902 | rm -f conftest.$ac_objext conftest.$ac_ext | |
3903 | ||
3904 | if test $ac_cv_header_stdc = yes; then | |
3905 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3906 | cat >conftest.$ac_ext <<_ACEOF | |
3907 | #line $LINENO "configure" | |
3908 | /* confdefs.h. */ | |
3909 | _ACEOF | |
3910 | cat confdefs.h >>conftest.$ac_ext | |
3911 | cat >>conftest.$ac_ext <<_ACEOF | |
3912 | /* end confdefs.h. */ | |
3913 | #include <string.h> | |
3914 | ||
3915 | _ACEOF | |
3916 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3917 | $EGREP "memchr" >/dev/null 2>&1; then | |
3918 | : | |
3919 | else | |
3920 | ac_cv_header_stdc=no | |
3921 | fi | |
3922 | rm -f conftest* | |
3923 | ||
3924 | fi | |
3925 | ||
3926 | if test $ac_cv_header_stdc = yes; then | |
3927 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3928 | cat >conftest.$ac_ext <<_ACEOF | |
3929 | #line $LINENO "configure" | |
3930 | /* confdefs.h. */ | |
3931 | _ACEOF | |
3932 | cat confdefs.h >>conftest.$ac_ext | |
3933 | cat >>conftest.$ac_ext <<_ACEOF | |
3934 | /* end confdefs.h. */ | |
3935 | #include <stdlib.h> | |
3936 | ||
3937 | _ACEOF | |
3938 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3939 | $EGREP "free" >/dev/null 2>&1; then | |
3940 | : | |
3941 | else | |
3942 | ac_cv_header_stdc=no | |
3943 | fi | |
3944 | rm -f conftest* | |
3945 | ||
3946 | fi | |
3947 | ||
3948 | if test $ac_cv_header_stdc = yes; then | |
3949 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3950 | if test "$cross_compiling" = yes; then | |
3951 | : | |
3952 | else | |
3953 | cat >conftest.$ac_ext <<_ACEOF | |
3954 | #line $LINENO "configure" | |
3955 | /* confdefs.h. */ | |
3956 | _ACEOF | |
3957 | cat confdefs.h >>conftest.$ac_ext | |
3958 | cat >>conftest.$ac_ext <<_ACEOF | |
3959 | /* end confdefs.h. */ | |
3960 | #include <ctype.h> | |
3961 | #if ((' ' & 0x0FF) == 0x020) | |
3962 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3963 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3964 | #else | |
3965 | # define ISLOWER(c) \ | |
3966 | (('a' <= (c) && (c) <= 'i') \ | |
3967 | || ('j' <= (c) && (c) <= 'r') \ | |
3968 | || ('s' <= (c) && (c) <= 'z')) | |
3969 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3970 | #endif | |
3971 | ||
3972 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3973 | int | |
3974 | main () | |
3975 | { | |
3976 | int i; | |
3977 | for (i = 0; i < 256; i++) | |
3978 | if (XOR (islower (i), ISLOWER (i)) | |
3979 | || toupper (i) != TOUPPER (i)) | |
3980 | exit(2); | |
3981 | exit (0); | |
3982 | } | |
3983 | _ACEOF | |
3984 | rm -f conftest$ac_exeext | |
3985 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3986 | (eval $ac_link) 2>&5 | |
3987 | ac_status=$? | |
3988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3989 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3990 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3991 | (eval $ac_try) 2>&5 | |
3992 | ac_status=$? | |
3993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3994 | (exit $ac_status); }; }; then | |
3995 | : | |
3996 | else | |
3997 | echo "$as_me: program exited with status $ac_status" >&5 | |
3998 | echo "$as_me: failed program was:" >&5 | |
3999 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4000 | ||
4001 | ( exit $ac_status ) | |
4002 | ac_cv_header_stdc=no | |
63cf211a | 4003 | fi |
a6a5e4c9 | 4004 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
4005 | fi |
4006 | fi | |
4007 | fi | |
4008 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
4009 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
4010 | if test $ac_cv_header_stdc = yes; then | |
63cf211a | 4011 | |
ba479fd2 NN |
4012 | cat >>confdefs.h <<\_ACEOF |
4013 | #define STDC_HEADERS 1 | |
4014 | _ACEOF | |
75e93faa | 4015 | |
414d23ae | 4016 | fi |
827ae6cf | 4017 | |
ba479fd2 NN |
4018 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
4019 | ||
4020 | ||
4021 | ||
827ae6cf | 4022 | |
6e3f3080 NN |
4023 | |
4024 | ||
6e3f3080 | 4025 | |
6e3f3080 | 4026 | |
ba479fd2 NN |
4027 | |
4028 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4029 | inttypes.h stdint.h unistd.h | |
4030 | do | |
4031 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4032 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4033 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4034 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4035 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4036 | else | |
4037 | cat >conftest.$ac_ext <<_ACEOF | |
4038 | #line $LINENO "configure" | |
4039 | /* confdefs.h. */ | |
4040 | _ACEOF | |
4041 | cat confdefs.h >>conftest.$ac_ext | |
4042 | cat >>conftest.$ac_ext <<_ACEOF | |
4043 | /* end confdefs.h. */ | |
4044 | $ac_includes_default | |
4045 | ||
4046 | #include <$ac_header> | |
4047 | _ACEOF | |
4048 | rm -f conftest.$ac_objext | |
4049 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4050 | (eval $ac_compile) 2>&5 | |
4051 | ac_status=$? | |
4052 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4053 | (exit $ac_status); } && | |
4054 | { ac_try='test -s conftest.$ac_objext' | |
4055 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4056 | (eval $ac_try) 2>&5 | |
4057 | ac_status=$? | |
4058 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4059 | (exit $ac_status); }; }; then | |
4060 | eval "$as_ac_Header=yes" | |
4061 | else | |
4062 | echo "$as_me: failed program was:" >&5 | |
4063 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4064 | ||
4065 | eval "$as_ac_Header=no" | |
4066 | fi | |
4067 | rm -f conftest.$ac_objext conftest.$ac_ext | |
4068 | fi | |
4069 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4070 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4071 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4072 | cat >>confdefs.h <<_ACEOF | |
4073 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4074 | _ACEOF | |
6e3f3080 | 4075 | |
63cf211a | 4076 | fi |
6e3f3080 | 4077 | |
ba479fd2 NN |
4078 | done |
4079 | ||
4080 | ||
4081 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4082 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4083 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4084 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4085 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4086 | fi | |
4087 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
4088 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4089 | else | |
4090 | # Is the header compilable? | |
4091 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
4092 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
4093 | cat >conftest.$ac_ext <<_ACEOF | |
4094 | #line $LINENO "configure" | |
4095 | /* confdefs.h. */ | |
4096 | _ACEOF | |
4097 | cat confdefs.h >>conftest.$ac_ext | |
4098 | cat >>conftest.$ac_ext <<_ACEOF | |
4099 | /* end confdefs.h. */ | |
4100 | $ac_includes_default | |
63cf211a | 4101 | #include <valgrind.h> |
ba479fd2 NN |
4102 | _ACEOF |
4103 | rm -f conftest.$ac_objext | |
4104 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4105 | (eval $ac_compile) 2>&5 | |
4106 | ac_status=$? | |
4107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4108 | (exit $ac_status); } && | |
4109 | { ac_try='test -s conftest.$ac_objext' | |
4110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4111 | (eval $ac_try) 2>&5 | |
4112 | ac_status=$? | |
4113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4114 | (exit $ac_status); }; }; then | |
4115 | ac_header_compiler=yes | |
4116 | else | |
4117 | echo "$as_me: failed program was:" >&5 | |
4118 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4119 | ||
4120 | ac_header_compiler=no | |
4121 | fi | |
4122 | rm -f conftest.$ac_objext conftest.$ac_ext | |
4123 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
4124 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
4125 | ||
4126 | # Is the header present? | |
4127 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
4128 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
4129 | cat >conftest.$ac_ext <<_ACEOF | |
4130 | #line $LINENO "configure" | |
4131 | /* confdefs.h. */ | |
4132 | _ACEOF | |
4133 | cat confdefs.h >>conftest.$ac_ext | |
4134 | cat >>conftest.$ac_ext <<_ACEOF | |
4135 | /* end confdefs.h. */ | |
4136 | #include <valgrind.h> | |
4137 | _ACEOF | |
4138 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4139 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4140 | ac_status=$? | |
4141 | grep -v '^ *+' conftest.er1 >conftest.err | |
4142 | rm -f conftest.er1 | |
4143 | cat conftest.err >&5 | |
4144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4145 | (exit $ac_status); } >/dev/null; then | |
4146 | if test -s conftest.err; then | |
4147 | ac_cpp_err=$ac_c_preproc_warn_flag | |
4148 | else | |
4149 | ac_cpp_err= | |
4150 | fi | |
4151 | else | |
4152 | ac_cpp_err=yes | |
4153 | fi | |
4154 | if test -z "$ac_cpp_err"; then | |
4155 | ac_header_preproc=yes | |
4156 | else | |
4157 | echo "$as_me: failed program was:" >&5 | |
4158 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4159 | ||
4160 | ac_header_preproc=no | |
4161 | fi | |
4162 | rm -f conftest.err conftest.$ac_ext | |
4163 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4164 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
4165 | ||
4166 | # So? What about this header? | |
4167 | case $ac_header_compiler:$ac_header_preproc in | |
4168 | yes:no ) | |
4169 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 | |
4170 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
4171 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 | |
4172 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
4173 | ( | |
4174 | cat <<\_ASBOX | |
4175 | ## ------------------------------------ ## | |
4176 | ## Report this to bug-autoconf@gnu.org. ## | |
4177 | ## ------------------------------------ ## | |
4178 | _ASBOX | |
4179 | ) | | |
4180 | sed "s/^/$as_me: WARNING: /" >&2 | |
4181 | ;; | |
4182 | no:yes ) | |
4183 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 | |
4184 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
4185 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 | |
4186 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
4187 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 | |
4188 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
4189 | ( | |
4190 | cat <<\_ASBOX | |
4191 | ## ------------------------------------ ## | |
4192 | ## Report this to bug-autoconf@gnu.org. ## | |
4193 | ## ------------------------------------ ## | |
4194 | _ASBOX | |
4195 | ) | | |
4196 | sed "s/^/$as_me: WARNING: /" >&2 | |
4197 | ;; | |
4198 | esac | |
4199 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
4200 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
4201 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
4202 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4203 | else | |
4204 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 4205 | fi |
ba479fd2 NN |
4206 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
4207 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
4208 | ||
6e3f3080 | 4209 | fi |
ba479fd2 | 4210 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
4211 | have_valgrind_h=yes |
4212 | else | |
ba479fd2 | 4213 | have_valgrind_h=no |
6938ec6c NN |
4214 | fi |
4215 | ||
4216 | ||
ba479fd2 | 4217 | |
414d23ae HPN |
4218 | if test x$ac_checking_valgrind != x ; then |
4219 | # It is certainly possible that there's valgrind but no valgrind.h. | |
4220 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
4221 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
4222 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
4223 | cat >conftest.$ac_ext <<_ACEOF | |
4224 | #line $LINENO "configure" | |
4225 | /* confdefs.h. */ | |
4226 | _ACEOF | |
4227 | cat confdefs.h >>conftest.$ac_ext | |
4228 | cat >>conftest.$ac_ext <<_ACEOF | |
4229 | /* end confdefs.h. */ | |
a207b594 | 4230 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
4231 | #ifndef VALGRIND_DISCARD |
4232 | #error VALGRIND_DISCARD not defined | |
4233 | #endif | |
ba479fd2 NN |
4234 | _ACEOF |
4235 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4236 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4237 | ac_status=$? | |
4238 | grep -v '^ *+' conftest.er1 >conftest.err | |
4239 | rm -f conftest.er1 | |
4240 | cat conftest.err >&5 | |
4241 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4242 | (exit $ac_status); } >/dev/null; then | |
4243 | if test -s conftest.err; then | |
4244 | ac_cpp_err=$ac_c_preproc_warn_flag | |
4245 | else | |
4246 | ac_cpp_err= | |
4247 | fi | |
4248 | else | |
4249 | ac_cpp_err=yes | |
4250 | fi | |
4251 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
4252 | gcc_cv_header_valgrind_memcheck_h=yes |
4253 | else | |
ba479fd2 NN |
4254 | echo "$as_me: failed program was:" >&5 |
4255 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4256 | ||
a207b594 HPN |
4257 | gcc_cv_header_valgrind_memcheck_h=no |
4258 | fi | |
ba479fd2 NN |
4259 | rm -f conftest.err conftest.$ac_ext |
4260 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
4261 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
4262 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
4263 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
4264 | cat >conftest.$ac_ext <<_ACEOF | |
4265 | #line $LINENO "configure" | |
4266 | /* confdefs.h. */ | |
4267 | _ACEOF | |
4268 | cat confdefs.h >>conftest.$ac_ext | |
4269 | cat >>conftest.$ac_ext <<_ACEOF | |
4270 | /* end confdefs.h. */ | |
a207b594 HPN |
4271 | #include <memcheck.h> |
4272 | #ifndef VALGRIND_DISCARD | |
4273 | #error VALGRIND_DISCARD not defined | |
4274 | #endif | |
ba479fd2 NN |
4275 | _ACEOF |
4276 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4277 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4278 | ac_status=$? | |
4279 | grep -v '^ *+' conftest.er1 >conftest.err | |
4280 | rm -f conftest.er1 | |
4281 | cat conftest.err >&5 | |
4282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4283 | (exit $ac_status); } >/dev/null; then | |
4284 | if test -s conftest.err; then | |
4285 | ac_cpp_err=$ac_c_preproc_warn_flag | |
4286 | else | |
4287 | ac_cpp_err= | |
4288 | fi | |
4289 | else | |
4290 | ac_cpp_err=yes | |
4291 | fi | |
4292 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
4293 | gcc_cv_header_memcheck_h=yes |
4294 | else | |
ba479fd2 NN |
4295 | echo "$as_me: failed program was:" >&5 |
4296 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4297 | ||
cafe096b EC |
4298 | gcc_cv_header_memcheck_h=no |
4299 | fi | |
ba479fd2 NN |
4300 | rm -f conftest.err conftest.$ac_ext |
4301 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
4302 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
4303 | ||
56694dd9 ZW |
4304 | # Prepare PATH_SEPARATOR. |
4305 | # The user is always right. | |
4306 | if test "${PATH_SEPARATOR+set}" != set; then | |
4307 | echo "#! /bin/sh" >conf$$.sh | |
4308 | echo "exit 0" >>conf$$.sh | |
4309 | chmod +x conf$$.sh | |
4310 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
4311 | PATH_SEPARATOR=';' | |
4312 | else | |
4313 | PATH_SEPARATOR=: | |
4314 | fi | |
4315 | rm -f conf$$.sh | |
4316 | fi | |
4317 | ||
4318 | # Find out how to test for executable files. Don't use a zero-byte file, | |
4319 | # as systems may use methods other than mode bits to determine executability. | |
4320 | cat >conf$$.file <<_ASEOF | |
4321 | #! /bin/sh | |
4322 | exit 0 | |
4323 | _ASEOF | |
4324 | chmod +x conf$$.file | |
4325 | if test -x conf$$.file >/dev/null 2>&1; then | |
4326 | ac_executable_p="test -x" | |
4327 | else | |
4328 | ac_executable_p="test -f" | |
4329 | fi | |
4330 | rm -f conf$$.file | |
4331 | ||
4332 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 4333 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
4334 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4335 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4336 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
4337 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
4338 | else |
4339 | case "$valgrind_path" in | |
56694dd9 ZW |
4340 | [\\/]* | ?:[\\/]*) |
4341 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
4342 | ;; | |
414d23ae | 4343 | *) |
56694dd9 ZW |
4344 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
4345 | for ac_dir in $PATH; do | |
4346 | IFS="$ac_save_IFS" | |
4347 | test -z "$ac_dir" && ac_dir=. | |
4348 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4349 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
4350 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
4351 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
4352 | break 2 | |
4353 | fi | |
4354 | fi | |
4355 | done | |
4356 | done | |
4357 | IFS="$ac_save_IFS" | |
4358 | ;; | |
414d23ae | 4359 | esac |
75e93faa | 4360 | fi |
414d23ae HPN |
4361 | valgrind_path="$ac_cv_path_valgrind_path" |
4362 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
4363 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
4364 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 4365 | else |
ba479fd2 NN |
4366 | echo "$as_me:$LINENO: result: no" >&5 |
4367 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
4368 | fi |
4369 | ||
a207b594 HPN |
4370 | if test "x$valgrind_path" = "x" \ |
4371 | || (test $have_valgrind_h = no \ | |
4372 | && test $gcc_cv_header_memcheck_h = no \ | |
4373 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
4374 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
4375 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
4376 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
4377 | fi |
4378 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
4379 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
4380 | |
4381 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 4382 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 4383 | _ACEOF |
75e93faa | 4384 | |
a207b594 | 4385 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
4386 | |
4387 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 4388 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 4389 | _ACEOF |
a207b594 HPN |
4390 | |
4391 | fi | |
14011ca4 | 4392 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
4393 | |
4394 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 4395 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 4396 | _ACEOF |
14011ca4 AJ |
4397 | |
4398 | fi | |
414d23ae | 4399 | fi |
75e93faa | 4400 | |
75e93faa ZW |
4401 | |
4402 | ||
414d23ae HPN |
4403 | # Enable code coverage collection |
4404 | # Check whether --enable-coverage or --disable-coverage was given. | |
4405 | if test "${enable_coverage+set}" = set; then | |
4406 | enableval="$enable_coverage" | |
4407 | case "${enableval}" in | |
4408 | yes|noopt) | |
e61a2eb7 | 4409 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" |
414d23ae HPN |
4410 | ;; |
4411 | opt) | |
e61a2eb7 | 4412 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" |
414d23ae HPN |
4413 | ;; |
4414 | *) | |
ba479fd2 NN |
4415 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 |
4416 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} | |
4417 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
4418 | ;; |
4419 | esac | |
75e93faa | 4420 | else |
414d23ae | 4421 | coverage_flags="" |
ba479fd2 | 4422 | fi; |
5c3bc9fb | 4423 | |
414d23ae | 4424 | |
439a7e54 DN |
4425 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
4426 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
4427 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 4428 | |
439a7e54 DN |
4429 | else |
4430 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 4431 | fi; |
439a7e54 | 4432 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
4433 | |
4434 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 4435 | #define GATHER_STATISTICS 1 |
ba479fd2 | 4436 | _ACEOF |
439a7e54 DN |
4437 | |
4438 | fi | |
4439 | ||
73458fb7 NN |
4440 | # ------------------------------- |
4441 | # Miscenalleous configure options | |
4442 | # ------------------------------- | |
34a86c2b NN |
4443 | |
4444 | # With stabs | |
ba479fd2 | 4445 | |
34a86c2b NN |
4446 | # Check whether --with-stabs or --without-stabs was given. |
4447 | if test "${with_stabs+set}" = set; then | |
4448 | withval="$with_stabs" | |
4449 | stabs="$with_stabs" | |
4450 | else | |
4451 | stabs=no | |
ba479fd2 | 4452 | fi; |
cafe096b | 4453 | |
34a86c2b NN |
4454 | # Determine whether or not multilibs are enabled. |
4455 | # Check whether --enable-multilib or --disable-multilib was given. | |
4456 | if test "${enable_multilib+set}" = set; then | |
4457 | enableval="$enable_multilib" | |
ba479fd2 | 4458 | |
34a86c2b NN |
4459 | else |
4460 | enable_multilib=yes | |
ba479fd2 | 4461 | fi; |
75e93faa | 4462 | |
34a86c2b | 4463 | |
414d23ae HPN |
4464 | # Enable __cxa_atexit for C++. |
4465 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
4466 | if test "${enable___cxa_atexit+set}" = set; then | |
4467 | enableval="$enable___cxa_atexit" | |
75e93faa | 4468 | |
ba479fd2 | 4469 | fi; |
75e93faa | 4470 | |
414d23ae HPN |
4471 | # Enable threads |
4472 | # Pass with no value to take the default | |
4473 | # Pass with a value to specify a thread package | |
4474 | # Check whether --enable-threads or --disable-threads was given. | |
4475 | if test "${enable_threads+set}" = set; then | |
4476 | enableval="$enable_threads" | |
ba479fd2 | 4477 | |
414d23ae HPN |
4478 | else |
4479 | enable_threads='' | |
ba479fd2 | 4480 | fi; |
c2e494a8 | 4481 | # Save in case it gets overwritten in config.gcc |
414d23ae | 4482 | enable_threads_flag=$enable_threads |
414d23ae HPN |
4483 | |
4484 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
4485 | if test "${enable_objc_gc+set}" = set; then | |
4486 | enableval="$enable_objc_gc" | |
4487 | if test x$enable_objc_gc = xno; then | |
4488 | objc_boehm_gc='' | |
4489 | else | |
4490 | objc_boehm_gc=1 | |
4491 | fi | |
4492 | else | |
4493 | objc_boehm_gc='' | |
ba479fd2 | 4494 | fi; |
75e93faa ZW |
4495 | |
4496 | ||
414d23ae HPN |
4497 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
4498 | if test "${with_dwarf2+set}" = set; then | |
4499 | withval="$with_dwarf2" | |
4500 | dwarf2="$with_dwarf2" | |
75e93faa | 4501 | else |
414d23ae | 4502 | dwarf2=no |
ba479fd2 | 4503 | fi; |
75e93faa | 4504 | |
414d23ae HPN |
4505 | # Check whether --enable-shared or --disable-shared was given. |
4506 | if test "${enable_shared+set}" = set; then | |
4507 | enableval="$enable_shared" | |
ba479fd2 | 4508 | |
414d23ae HPN |
4509 | case $enable_shared in |
4510 | yes | no) ;; | |
4511 | *) | |
4512 | enable_shared=no | |
4513 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
4514 | for pkg in $enableval; do | |
4515 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
4516 | enable_shared=yes | |
4517 | fi | |
4518 | done | |
4519 | IFS="$ac_save_ifs" | |
4520 | ;; | |
4521 | esac | |
4522 | ||
75e93faa | 4523 | else |
414d23ae | 4524 | enable_shared=yes |
ba479fd2 | 4525 | fi; |
75e93faa | 4526 | |
75e93faa | 4527 | |
75e93faa | 4528 | |
4977bab6 ZW |
4529 | # Check whether --with-sysroot or --without-sysroot was given. |
4530 | if test "${with_sysroot+set}" = set; then | |
4531 | withval="$with_sysroot" | |
ba479fd2 | 4532 | |
4977bab6 | 4533 | case ${with_sysroot} in |
caa55b1e | 4534 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
4535 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
4536 | esac | |
ba479fd2 | 4537 | |
4977bab6 ZW |
4538 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
4539 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
4540 | ||
047d636f DJ |
4541 | if test "x$exec_prefix" = xNONE; then |
4542 | if test "x$prefix" = xNONE; then | |
4543 | test_prefix=/usr/local | |
4544 | else | |
4545 | test_prefix=$prefix | |
4546 | fi | |
4547 | else | |
4548 | test_prefix=$exec_prefix | |
4549 | fi | |
4550 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
4551 | "${test_prefix}"|"${test_prefix}/"*|\ |
4552 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
4553 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
4554 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
4555 | ;; | |
4556 | esac | |
4557 | ||
4977bab6 | 4558 | else |
ba479fd2 | 4559 | |
4977bab6 | 4560 | TARGET_SYSTEM_ROOT= |
db720d9a | 4561 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
4562 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
4563 | ||
ba479fd2 | 4564 | fi; |
4977bab6 ZW |
4565 | |
4566 | ||
4567 | ||
4568 | ||
d1bd0ded | 4569 | # Build with intermodule optimisations |
d1bd0ded GK |
4570 | # Check whether --enable-intermodule or --disable-intermodule was given. |
4571 | if test "${enable_intermodule+set}" = set; then | |
4572 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
4573 | case ${enable_intermodule} in |
4574 | yes) onestep="-onestep";; | |
4575 | *) onestep="";; | |
d1bd0ded | 4576 | esac |
0c46c5c7 KC |
4577 | else |
4578 | onestep="" | |
ba479fd2 | 4579 | fi; |
d1bd0ded GK |
4580 | |
4581 | ||
73458fb7 NN |
4582 | # ------------------------- |
4583 | # Checks for other programs | |
4584 | # ------------------------- | |
5b67ad6f | 4585 | |
ba479fd2 NN |
4586 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
4587 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
4588 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` | |
4589 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then | |
4590 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 4591 | else |
ba479fd2 | 4592 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 4593 | all: |
ba479fd2 NN |
4594 | @echo 'ac_maketemp="$(MAKE)"' |
4595 | _ACEOF | |
e9a25f70 | 4596 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 4597 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
4598 | if test -n "$ac_maketemp"; then |
4599 | eval ac_cv_prog_make_${ac_make}_set=yes | |
4600 | else | |
4601 | eval ac_cv_prog_make_${ac_make}_set=no | |
4602 | fi | |
ba479fd2 | 4603 | rm -f conftest.make |
e9a25f70 JL |
4604 | fi |
4605 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
4606 | echo "$as_me:$LINENO: result: yes" >&5 |
4607 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
4608 | SET_MAKE= |
4609 | else | |
ba479fd2 NN |
4610 | echo "$as_me:$LINENO: result: no" >&5 |
4611 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
4612 | SET_MAKE="MAKE=${MAKE-make}" |
4613 | fi | |
4614 | ||
4615 | ||
861bb6c1 | 4616 | # Find some useful tools |
ba479fd2 | 4617 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 4618 | do |
ba479fd2 | 4619 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 4620 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
4621 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4622 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4623 | if test "${ac_cv_prog_AWK+set}" = set; then | |
4624 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4625 | else |
4626 | if test -n "$AWK"; then | |
4627 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
4628 | else | |
ba479fd2 NN |
4629 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4630 | for as_dir in $PATH | |
4631 | do | |
4632 | IFS=$as_save_IFS | |
4633 | test -z "$as_dir" && as_dir=. | |
4634 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4635 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4636 | ac_cv_prog_AWK="$ac_prog" | |
4637 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4638 | break 2 | |
4639 | fi | |
4640 | done | |
4641 | done | |
4642 | ||
861bb6c1 JL |
4643 | fi |
4644 | fi | |
ba479fd2 | 4645 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 4646 | if test -n "$AWK"; then |
ba479fd2 NN |
4647 | echo "$as_me:$LINENO: result: $AWK" >&5 |
4648 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 4649 | else |
ba479fd2 NN |
4650 | echo "$as_me:$LINENO: result: no" >&5 |
4651 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
4652 | fi |
4653 | ||
ba479fd2 | 4654 | test -n "$AWK" && break |
861bb6c1 JL |
4655 | done |
4656 | ||
2c4902b9 NN |
4657 | # We need awk to run opts.sh (to create options.c and options.h). |
4658 | # Bail out if it's missing. | |
4659 | case ${AWK} in | |
ba479fd2 NN |
4660 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
4661 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
4662 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
4663 | esac |
4664 | ||
ba479fd2 NN |
4665 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
4666 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
4667 | if test "${gcc_cv_prog_LN+set}" = set; then | |
4668 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
4669 | else |
4670 | rm -f conftestdata_t | |
4671 | echo >conftestdata_f | |
4672 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4673 | then | |
4674 | gcc_cv_prog_LN="ln" | |
4675 | else | |
4676 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
4677 | then | |
4678 | gcc_cv_prog_LN="ln -s" | |
4679 | else | |
4680 | gcc_cv_prog_LN=cp | |
4681 | fi | |
4682 | fi | |
4683 | rm -f conftestdata_f conftestdata_t | |
4684 | ||
4685 | fi | |
4686 | LN="$gcc_cv_prog_LN" | |
4687 | if test "$gcc_cv_prog_LN" = "ln"; then | |
ba479fd2 NN |
4688 | echo "$as_me:$LINENO: result: yes" >&5 |
4689 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
4690 | else |
4691 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
ba479fd2 NN |
4692 | echo "$as_me:$LINENO: result: no, using ln -s" >&5 |
4693 | echo "${ECHO_T}no, using ln -s" >&6 | |
0a4b6309 | 4694 | else |
ba479fd2 NN |
4695 | echo "$as_me:$LINENO: result: no, and neither does ln -s, so using cp" >&5 |
4696 | echo "${ECHO_T}no, and neither does ln -s, so using cp" >&6 | |
0a4b6309 RL |
4697 | fi |
4698 | fi | |
4699 | ||
ba479fd2 NN |
4700 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
4701 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
4702 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
4703 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
4704 | else |
4705 | rm -f conftestdata_t | |
4706 | echo >conftestdata_f | |
4707 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
4708 | then | |
4709 | gcc_cv_prog_LN_S="ln -s" | |
4710 | else | |
4711 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
4712 | then | |
4713 | gcc_cv_prog_LN_S=ln | |
4714 | else | |
4715 | gcc_cv_prog_LN_S=cp | |
4716 | fi | |
4717 | fi | |
4718 | rm -f conftestdata_f conftestdata_t | |
4719 | ||
4720 | fi | |
4721 | LN_S="$gcc_cv_prog_LN_S" | |
4722 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
4723 | echo "$as_me:$LINENO: result: yes" >&5 |
4724 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
4725 | else |
4726 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
4727 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
4728 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 4729 | else |
ba479fd2 NN |
4730 | echo "$as_me:$LINENO: result: no, and neither does ln, so using cp" >&5 |
4731 | echo "${ECHO_T}no, and neither does ln, so using cp" >&6 | |
0a4b6309 RL |
4732 | fi |
4733 | fi | |
4734 | ||
ba479fd2 NN |
4735 | if test -n "$ac_tool_prefix"; then |
4736 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
4737 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
4738 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
4739 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4740 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
4741 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
4742 | else |
4743 | if test -n "$RANLIB"; then | |
4744 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
4745 | else | |
ba479fd2 NN |
4746 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4747 | for as_dir in $PATH | |
4748 | do | |
4749 | IFS=$as_save_IFS | |
4750 | test -z "$as_dir" && as_dir=. | |
4751 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4752 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4753 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
4754 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4755 | break 2 | |
4756 | fi | |
4757 | done | |
4758 | done | |
4759 | ||
6e3f3080 NN |
4760 | fi |
4761 | fi | |
ba479fd2 | 4762 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 4763 | if test -n "$RANLIB"; then |
ba479fd2 NN |
4764 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
4765 | echo "${ECHO_T}$RANLIB" >&6 | |
4766 | else | |
4767 | echo "$as_me:$LINENO: result: no" >&5 | |
4768 | echo "${ECHO_T}no" >&6 | |
4769 | fi | |
4770 | ||
4771 | fi | |
4772 | if test -z "$ac_cv_prog_RANLIB"; then | |
4773 | ac_ct_RANLIB=$RANLIB | |
4774 | # Extract the first word of "ranlib", so it can be a program name with args. | |
4775 | set dummy ranlib; ac_word=$2 | |
4776 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
4777 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4778 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
4779 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4780 | else | |
4781 | if test -n "$ac_ct_RANLIB"; then | |
4782 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
4783 | else | |
4784 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
4785 | for as_dir in $PATH | |
4786 | do | |
4787 | IFS=$as_save_IFS | |
4788 | test -z "$as_dir" && as_dir=. | |
4789 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4790 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4791 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
4792 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4793 | break 2 | |
4794 | fi | |
4795 | done | |
4796 | done | |
4797 | ||
4798 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
4799 | fi | |
4800 | fi | |
4801 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
4802 | if test -n "$ac_ct_RANLIB"; then | |
4803 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
4804 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 4805 | else |
ba479fd2 NN |
4806 | echo "$as_me:$LINENO: result: no" >&5 |
4807 | echo "${ECHO_T}no" >&6 | |
4808 | fi | |
4809 | ||
4810 | RANLIB=$ac_ct_RANLIB | |
4811 | else | |
4812 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
4813 | fi |
4814 | ||
0a4b6309 RL |
4815 | # Find a good install program. We prefer a C program (faster), |
4816 | # so one script is as good as another. But avoid the broken or | |
4817 | # incompatible versions: | |
4818 | # SysV /etc/install, /usr/sbin/install | |
4819 | # SunOS /usr/etc/install | |
4820 | # IRIX /sbin/install | |
4821 | # AIX /bin/install | |
4822 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
4823 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
4824 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
4825 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
4826 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 4827 | if test -z "$INSTALL"; then |
ba479fd2 NN |
4828 | if test "${ac_cv_path_install+set}" = set; then |
4829 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
4830 | else |
4831 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
4832 | for ac_dir in $PATH; do | |
4833 | # Account for people who put trailing slashes in PATH elements. | |
4834 | case "$ac_dir/" in | |
4835 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
4836 | *) | |
4837 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
4838 | for ac_prog in ginstall scoinst install; do | |
4839 | if test -f $ac_dir/$ac_prog; then | |
4840 | if test $ac_prog = install && | |
4841 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
4842 | # AIX install. It has an incompatible calling convention. | |
4843 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
4844 | : | |
4845 | else | |
4846 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
4847 | break 2 | |
4848 | fi | |
4849 | fi | |
4850 | done | |
4851 | ;; | |
4852 | esac | |
4853 | done | |
4854 | IFS="$ac_save_IFS" | |
4855 | ||
4856 | fi | |
4857 | if test "${ac_cv_path_install+set}" = set; then | |
4858 | INSTALL="$ac_cv_path_install" | |
4859 | else | |
4860 | # As a last resort, use the slow shell script. We don't cache a | |
4861 | # path for INSTALL within a source directory, because that will | |
4862 | # break other packages using the cache if that directory is | |
4863 | # removed, or if the path is relative. | |
4864 | INSTALL="$ac_install_sh" | |
4865 | fi | |
4866 | fi | |
ba479fd2 NN |
4867 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
4868 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
4869 | |
4870 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
4871 | # It thinks the first close brace ends the variable substitution. | |
4872 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
4873 | ||
4874 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
4875 | ||
861bb6c1 | 4876 | |
3a000df0 | 4877 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
4878 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
4879 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
4880 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
4881 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
4882 | else |
4883 | echo abfoo >t1 | |
4884 | echo cdfoo >t2 | |
269a7343 | 4885 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
4886 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
4887 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 4888 | : |
3a000df0 KC |
4889 | else |
4890 | gcc_cv_prog_cmp_skip=gnucompare | |
4891 | fi | |
269a7343 KG |
4892 | fi |
4893 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
4894 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
4895 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
4896 | : | |
4897 | else | |
4898 | gcc_cv_prog_cmp_skip=fastcompare | |
4899 | fi | |
4900 | fi | |
3a000df0 KC |
4901 | fi |
4902 | rm t1 t2 | |
4903 | ||
4904 | fi | |
ba479fd2 NN |
4905 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
4906 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
4907 | make_compare_target=$gcc_cv_prog_cmp_skip |
4908 | ||
4909 | ||
4910 | ||
73458fb7 NN |
4911 | # See if we have the mktemp command. |
4912 | # Extract the first word of "mktemp", so it can be a program name with args. | |
4913 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
4914 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4915 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4916 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
4917 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
4918 | else |
4919 | if test -n "$have_mktemp_command"; then | |
4920 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
4921 | else | |
ba479fd2 NN |
4922 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4923 | for as_dir in $PATH | |
4924 | do | |
4925 | IFS=$as_save_IFS | |
4926 | test -z "$as_dir" && as_dir=. | |
4927 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4928 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4929 | ac_cv_prog_have_mktemp_command="yes" | |
4930 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4931 | break 2 | |
4932 | fi | |
4933 | done | |
4934 | done | |
4935 | ||
73458fb7 NN |
4936 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
4937 | fi | |
4938 | fi | |
ba479fd2 | 4939 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 4940 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
4941 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
4942 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 4943 | else |
ba479fd2 NN |
4944 | echo "$as_me:$LINENO: result: no" >&5 |
4945 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
4946 | fi |
4947 | ||
4948 | ||
4949 | # Do we have a single-tree copy of texinfo? | |
4950 | if test -f $srcdir/../texinfo/Makefile.in; then | |
4951 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
4952 | gcc_cv_prog_makeinfo_modern=yes | |
ba479fd2 NN |
4953 | echo "$as_me:$LINENO: result: Using makeinfo from the unified source tree." >&5 |
4954 | echo "${ECHO_T}Using makeinfo from the unified source tree." >&6 | |
73458fb7 NN |
4955 | else |
4956 | # See if makeinfo has been installed and is modern enough | |
4957 | # that we can use it. | |
4958 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
4959 | set dummy makeinfo; ac_word=$2 | |
ba479fd2 NN |
4960 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
4961 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
4962 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
4963 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
4964 | else |
4965 | if test -n "$MAKEINFO"; then | |
4966 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
4967 | else | |
ba479fd2 NN |
4968 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
4969 | for as_dir in $PATH | |
4970 | do | |
4971 | IFS=$as_save_IFS | |
4972 | test -z "$as_dir" && as_dir=. | |
4973 | for ac_exec_ext in '' $ac_executable_extensions; do | |
4974 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
4975 | ac_cv_prog_MAKEINFO="makeinfo" | |
4976 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
4977 | break 2 | |
4978 | fi | |
4979 | done | |
4980 | done | |
4981 | ||
73458fb7 NN |
4982 | fi |
4983 | fi | |
ba479fd2 | 4984 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 4985 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
4986 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
4987 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 4988 | else |
ba479fd2 NN |
4989 | echo "$as_me:$LINENO: result: no" >&5 |
4990 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
4991 | fi |
4992 | ||
4993 | if test -n "$MAKEINFO"; then | |
4994 | # Found it, now check the version. | |
ba479fd2 NN |
4995 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
4996 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
4997 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
4998 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
4999 | else |
5000 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
5001 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
03787dfd | 5002 | echo "configure:5002: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
5003 | case $ac_prog_version in |
5004 | '') gcc_cv_prog_makeinfo_modern=no;; | |
5005 | 4.[2-9]*) | |
5006 | gcc_cv_prog_makeinfo_modern=yes;; | |
5007 | *) gcc_cv_prog_makeinfo_modern=no;; | |
5008 | esac | |
5009 | ||
5010 | fi | |
ba479fd2 NN |
5011 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
5012 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
5013 | else |
5014 | gcc_cv_prog_makeinfo_modern=no | |
5015 | fi | |
5016 | ||
5017 | fi | |
5018 | ||
5019 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
ba479fd2 NN |
5020 | { echo "$as_me:$LINENO: WARNING: |
5021 | *** Makeinfo is missing or too old. | |
5022 | *** Info documentation will not be built." >&5 | |
5023 | echo "$as_me: WARNING: | |
cafe096b | 5024 | *** Makeinfo is missing or too old. |
ba479fd2 | 5025 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
5026 | BUILD_INFO= |
5027 | else | |
ba479fd2 | 5028 | BUILD_INFO=info |
73458fb7 NN |
5029 | fi |
5030 | ||
5031 | # Is pod2man recent enough to regenerate manpages? | |
ba479fd2 NN |
5032 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
5033 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 5034 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
5035 | echo "$as_me:$LINENO: result: yes" >&5 |
5036 | echo "${ECHO_T}yes" >&6 | |
5037 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 5038 | else |
ba479fd2 NN |
5039 | echo "$as_me:$LINENO: result: no" >&5 |
5040 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5041 | GENERATED_MANPAGES= |
5042 | fi | |
5043 | ||
5044 | # How about lex? | |
5045 | if test -f $srcdir/../flex/skel.c; then | |
5046 | FLEX='$(objdir)/../flex/flex' | |
5047 | else | |
5048 | # Extract the first word of "flex", so it can be a program name with args. | |
5049 | set dummy flex; ac_word=$2 | |
ba479fd2 NN |
5050 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5051 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5052 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
5053 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5054 | else |
5055 | if test -n "$FLEX"; then | |
5056 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
5057 | else | |
ba479fd2 NN |
5058 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5059 | for as_dir in $PATH | |
5060 | do | |
5061 | IFS=$as_save_IFS | |
5062 | test -z "$as_dir" && as_dir=. | |
5063 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5064 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5065 | ac_cv_prog_FLEX="flex" | |
5066 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5067 | break 2 | |
5068 | fi | |
5069 | done | |
5070 | done | |
5071 | ||
73458fb7 NN |
5072 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
5073 | fi | |
5074 | fi | |
ba479fd2 | 5075 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 5076 | if test -n "$FLEX"; then |
ba479fd2 NN |
5077 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
5078 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 5079 | else |
ba479fd2 NN |
5080 | echo "$as_me:$LINENO: result: no" >&5 |
5081 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5082 | fi |
5083 | ||
5084 | fi | |
5085 | ||
5086 | # Bison? | |
5087 | # The -L switch is so bison can find its skeleton file. | |
5088 | if test -f $srcdir/../bison/bison.simple; then | |
5089 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
5090 | else | |
5091 | # Extract the first word of "bison", so it can be a program name with args. | |
5092 | set dummy bison; ac_word=$2 | |
ba479fd2 NN |
5093 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
5094 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
5095 | if test "${ac_cv_prog_BISON+set}" = set; then | |
5096 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
5097 | else |
5098 | if test -n "$BISON"; then | |
5099 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
5100 | else | |
ba479fd2 NN |
5101 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
5102 | for as_dir in $PATH | |
5103 | do | |
5104 | IFS=$as_save_IFS | |
5105 | test -z "$as_dir" && as_dir=. | |
5106 | for ac_exec_ext in '' $ac_executable_extensions; do | |
5107 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
5108 | ac_cv_prog_BISON="bison" | |
5109 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
5110 | break 2 | |
5111 | fi | |
5112 | done | |
5113 | done | |
5114 | ||
73458fb7 NN |
5115 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
5116 | fi | |
5117 | fi | |
ba479fd2 | 5118 | BISON=$ac_cv_prog_BISON |
73458fb7 | 5119 | if test -n "$BISON"; then |
ba479fd2 NN |
5120 | echo "$as_me:$LINENO: result: $BISON" >&5 |
5121 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 5122 | else |
ba479fd2 NN |
5123 | echo "$as_me:$LINENO: result: no" >&5 |
5124 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
5125 | fi |
5126 | ||
5127 | fi | |
5128 | ||
5129 | # -------------------- | |
5130 | # Checks for C headers | |
5131 | # -------------------- | |
5132 | ||
ba479fd2 NN |
5133 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
5134 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
5135 | if test "${gcc_cv_glibc+set}" = set; then | |
5136 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5137 | else | |
5138 | cat >conftest.$ac_ext <<_ACEOF | |
5139 | #line $LINENO "configure" | |
5140 | /* confdefs.h. */ | |
5141 | _ACEOF | |
5142 | cat confdefs.h >>conftest.$ac_ext | |
5143 | cat >>conftest.$ac_ext <<_ACEOF | |
5144 | /* end confdefs.h. */ | |
73458fb7 | 5145 | #include <features.h> |
ba479fd2 NN |
5146 | int |
5147 | main () | |
5148 | { | |
73458fb7 NN |
5149 | |
5150 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
5151 | #error Not a GNU C library system | |
5152 | #endif | |
ba479fd2 NN |
5153 | ; |
5154 | return 0; | |
5155 | } | |
5156 | _ACEOF | |
5157 | rm -f conftest.$ac_objext | |
5158 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5159 | (eval $ac_compile) 2>&5 | |
5160 | ac_status=$? | |
5161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5162 | (exit $ac_status); } && | |
5163 | { ac_try='test -s conftest.$ac_objext' | |
5164 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5165 | (eval $ac_try) 2>&5 | |
5166 | ac_status=$? | |
5167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5168 | (exit $ac_status); }; }; then | |
73458fb7 NN |
5169 | gcc_cv_glibc=yes |
5170 | else | |
ba479fd2 NN |
5171 | echo "$as_me: failed program was:" >&5 |
5172 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5173 | ||
5174 | gcc_cv_glibc=no | |
73458fb7 | 5175 | fi |
ba479fd2 | 5176 | rm -f conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
5177 | fi |
5178 | ||
ba479fd2 NN |
5179 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
5180 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 5181 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
5182 | |
5183 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 5184 | #define _GNU_SOURCE 1 |
ba479fd2 | 5185 | _ACEOF |
73458fb7 NN |
5186 | |
5187 | fi | |
5188 | ||
ca9bc441 NN |
5189 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
5190 | # works later. *sigh* This needs to come before all header checks. | |
5191 | ||
5192 | ac_c_preproc_warn_flag=yes | |
5193 | ||
ba479fd2 NN |
5194 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
5195 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
5196 | if test "${ac_cv_header_stdc+set}" = set; then | |
5197 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5198 | else |
ba479fd2 NN |
5199 | cat >conftest.$ac_ext <<_ACEOF |
5200 | #line $LINENO "configure" | |
5201 | /* confdefs.h. */ | |
5202 | _ACEOF | |
5203 | cat confdefs.h >>conftest.$ac_ext | |
5204 | cat >>conftest.$ac_ext <<_ACEOF | |
5205 | /* end confdefs.h. */ | |
956d6950 JL |
5206 | #include <stdlib.h> |
5207 | #include <stdarg.h> | |
5208 | #include <string.h> | |
5209 | #include <float.h> | |
ba479fd2 NN |
5210 | |
5211 | int | |
5212 | main () | |
5213 | { | |
5214 | ||
5215 | ; | |
5216 | return 0; | |
5217 | } | |
5218 | _ACEOF | |
5219 | rm -f conftest.$ac_objext | |
5220 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5221 | (eval $ac_compile) 2>&5 | |
5222 | ac_status=$? | |
5223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5224 | (exit $ac_status); } && | |
5225 | { ac_try='test -s conftest.$ac_objext' | |
5226 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5227 | (eval $ac_try) 2>&5 | |
5228 | ac_status=$? | |
5229 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5230 | (exit $ac_status); }; }; then | |
956d6950 JL |
5231 | ac_cv_header_stdc=yes |
5232 | else | |
ba479fd2 NN |
5233 | echo "$as_me: failed program was:" >&5 |
5234 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5235 | ||
5236 | ac_cv_header_stdc=no | |
956d6950 | 5237 | fi |
ba479fd2 | 5238 | rm -f conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
5239 | |
5240 | if test $ac_cv_header_stdc = yes; then | |
5241 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 NN |
5242 | cat >conftest.$ac_ext <<_ACEOF |
5243 | #line $LINENO "configure" | |
5244 | /* confdefs.h. */ | |
5245 | _ACEOF | |
5246 | cat confdefs.h >>conftest.$ac_ext | |
5247 | cat >>conftest.$ac_ext <<_ACEOF | |
5248 | /* end confdefs.h. */ | |
956d6950 | 5249 | #include <string.h> |
ba479fd2 NN |
5250 | |
5251 | _ACEOF | |
956d6950 | 5252 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5253 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
5254 | : |
5255 | else | |
956d6950 JL |
5256 | ac_cv_header_stdc=no |
5257 | fi | |
5258 | rm -f conftest* | |
5259 | ||
5260 | fi | |
5261 | ||
5262 | if test $ac_cv_header_stdc = yes; then | |
5263 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 NN |
5264 | cat >conftest.$ac_ext <<_ACEOF |
5265 | #line $LINENO "configure" | |
5266 | /* confdefs.h. */ | |
5267 | _ACEOF | |
5268 | cat confdefs.h >>conftest.$ac_ext | |
5269 | cat >>conftest.$ac_ext <<_ACEOF | |
5270 | /* end confdefs.h. */ | |
956d6950 | 5271 | #include <stdlib.h> |
ba479fd2 NN |
5272 | |
5273 | _ACEOF | |
956d6950 | 5274 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5275 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
5276 | : |
5277 | else | |
956d6950 JL |
5278 | ac_cv_header_stdc=no |
5279 | fi | |
5280 | rm -f conftest* | |
5281 | ||
5282 | fi | |
5283 | ||
5284 | if test $ac_cv_header_stdc = yes; then | |
5285 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 5286 | if test "$cross_compiling" = yes; then |
956d6950 JL |
5287 | : |
5288 | else | |
ba479fd2 NN |
5289 | cat >conftest.$ac_ext <<_ACEOF |
5290 | #line $LINENO "configure" | |
5291 | /* confdefs.h. */ | |
5292 | _ACEOF | |
5293 | cat confdefs.h >>conftest.$ac_ext | |
5294 | cat >>conftest.$ac_ext <<_ACEOF | |
5295 | /* end confdefs.h. */ | |
956d6950 | 5296 | #include <ctype.h> |
ba479fd2 NN |
5297 | #if ((' ' & 0x0FF) == 0x020) |
5298 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
5299 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
5300 | #else | |
5301 | # define ISLOWER(c) \ | |
5302 | (('a' <= (c) && (c) <= 'i') \ | |
5303 | || ('j' <= (c) && (c) <= 'r') \ | |
5304 | || ('s' <= (c) && (c) <= 'z')) | |
5305 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
5306 | #endif | |
63cf211a | 5307 | |
ba479fd2 NN |
5308 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
5309 | int | |
5310 | main () | |
5311 | { | |
5312 | int i; | |
5313 | for (i = 0; i < 256; i++) | |
5314 | if (XOR (islower (i), ISLOWER (i)) | |
5315 | || toupper (i) != TOUPPER (i)) | |
5316 | exit(2); | |
5317 | exit (0); | |
5318 | } | |
5319 | _ACEOF | |
5320 | rm -f conftest$ac_exeext | |
5321 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5322 | (eval $ac_link) 2>&5 | |
5323 | ac_status=$? | |
5324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5325 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5326 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5327 | (eval $ac_try) 2>&5 | |
5328 | ac_status=$? | |
5329 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5330 | (exit $ac_status); }; }; then | |
956d6950 JL |
5331 | : |
5332 | else | |
ba479fd2 NN |
5333 | echo "$as_me: program exited with status $ac_status" >&5 |
5334 | echo "$as_me: failed program was:" >&5 | |
5335 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5336 | ||
5337 | ( exit $ac_status ) | |
5338 | ac_cv_header_stdc=no | |
956d6950 | 5339 | fi |
a6a5e4c9 | 5340 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5341 | fi |
956d6950 JL |
5342 | fi |
5343 | fi | |
ba479fd2 NN |
5344 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
5345 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 5346 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
5347 | |
5348 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5349 | #define STDC_HEADERS 1 |
ba479fd2 | 5350 | _ACEOF |
956d6950 JL |
5351 | |
5352 | fi | |
5353 | ||
ba479fd2 NN |
5354 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
5355 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
5356 | if test "${ac_cv_header_time+set}" = set; then | |
5357 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 5358 | else |
ba479fd2 NN |
5359 | cat >conftest.$ac_ext <<_ACEOF |
5360 | #line $LINENO "configure" | |
5361 | /* confdefs.h. */ | |
5362 | _ACEOF | |
5363 | cat confdefs.h >>conftest.$ac_ext | |
5364 | cat >>conftest.$ac_ext <<_ACEOF | |
5365 | /* end confdefs.h. */ | |
956d6950 JL |
5366 | #include <sys/types.h> |
5367 | #include <sys/time.h> | |
5368 | #include <time.h> | |
ba479fd2 NN |
5369 | |
5370 | int | |
5371 | main () | |
5372 | { | |
5373 | if ((struct tm *) 0) | |
5374 | return 0; | |
5375 | ; | |
5376 | return 0; | |
5377 | } | |
5378 | _ACEOF | |
5379 | rm -f conftest.$ac_objext | |
5380 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5381 | (eval $ac_compile) 2>&5 | |
5382 | ac_status=$? | |
5383 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5384 | (exit $ac_status); } && | |
5385 | { ac_try='test -s conftest.$ac_objext' | |
5386 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5387 | (eval $ac_try) 2>&5 | |
5388 | ac_status=$? | |
5389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5390 | (exit $ac_status); }; }; then | |
956d6950 JL |
5391 | ac_cv_header_time=yes |
5392 | else | |
ba479fd2 NN |
5393 | echo "$as_me: failed program was:" >&5 |
5394 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5395 | ||
5396 | ac_cv_header_time=no | |
956d6950 | 5397 | fi |
ba479fd2 | 5398 | rm -f conftest.$ac_objext conftest.$ac_ext |
956d6950 | 5399 | fi |
ba479fd2 NN |
5400 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
5401 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 5402 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
5403 | |
5404 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 5405 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 5406 | _ACEOF |
956d6950 JL |
5407 | |
5408 | fi | |
5409 | ||
ba479fd2 NN |
5410 | echo "$as_me:$LINENO: checking for working stdbool.h" >&5 |
5411 | echo $ECHO_N "checking for working stdbool.h... $ECHO_C" >&6 | |
5412 | if test "${ac_cv_header_stdbool_h+set}" = set; then | |
5413 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
827ae6cf | 5414 | else |
ba479fd2 NN |
5415 | cat >conftest.$ac_ext <<_ACEOF |
5416 | #line $LINENO "configure" | |
5417 | /* confdefs.h. */ | |
5418 | _ACEOF | |
5419 | cat confdefs.h >>conftest.$ac_ext | |
5420 | cat >>conftest.$ac_ext <<_ACEOF | |
5421 | /* end confdefs.h. */ | |
827ae6cf | 5422 | #include <stdbool.h> |
ba479fd2 NN |
5423 | int |
5424 | main () | |
5425 | { | |
827ae6cf | 5426 | bool foo = false; |
ba479fd2 NN |
5427 | ; |
5428 | return 0; | |
5429 | } | |
5430 | _ACEOF | |
5431 | rm -f conftest.$ac_objext | |
5432 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5433 | (eval $ac_compile) 2>&5 | |
5434 | ac_status=$? | |
5435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5436 | (exit $ac_status); } && | |
5437 | { ac_try='test -s conftest.$ac_objext' | |
5438 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5439 | (eval $ac_try) 2>&5 | |
5440 | ac_status=$? | |
5441 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5442 | (exit $ac_status); }; }; then | |
827ae6cf RO |
5443 | ac_cv_header_stdbool_h=yes |
5444 | else | |
ba479fd2 NN |
5445 | echo "$as_me: failed program was:" >&5 |
5446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5447 | ||
5448 | ac_cv_header_stdbool_h=no | |
827ae6cf | 5449 | fi |
ba479fd2 | 5450 | rm -f conftest.$ac_objext conftest.$ac_ext |
827ae6cf | 5451 | fi |
ba479fd2 NN |
5452 | echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 |
5453 | echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 | |
63cf211a | 5454 | if test $ac_cv_header_stdbool_h = yes; then |
ba479fd2 NN |
5455 | |
5456 | cat >>confdefs.h <<\_ACEOF | |
827ae6cf | 5457 | #define HAVE_STDBOOL_H 1 |
ba479fd2 | 5458 | _ACEOF |
827ae6cf RO |
5459 | |
5460 | fi | |
5461 | ||
ba479fd2 NN |
5462 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
5463 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
5464 | if test "${gcc_cv_header_string+set}" = set; then | |
5465 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 | 5466 | else |
ba479fd2 NN |
5467 | cat >conftest.$ac_ext <<_ACEOF |
5468 | #line $LINENO "configure" | |
5469 | /* confdefs.h. */ | |
5470 | _ACEOF | |
5471 | cat confdefs.h >>conftest.$ac_ext | |
5472 | cat >>conftest.$ac_ext <<_ACEOF | |
5473 | /* end confdefs.h. */ | |
0a4b6309 RL |
5474 | #include <string.h> |
5475 | #include <strings.h> | |
ba479fd2 NN |
5476 | int |
5477 | main () | |
5478 | { | |
0a4b6309 | 5479 | |
ba479fd2 NN |
5480 | ; |
5481 | return 0; | |
5482 | } | |
5483 | _ACEOF | |
5484 | rm -f conftest.$ac_objext | |
5485 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5486 | (eval $ac_compile) 2>&5 | |
5487 | ac_status=$? | |
5488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5489 | (exit $ac_status); } && | |
5490 | { ac_try='test -s conftest.$ac_objext' | |
5491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5492 | (eval $ac_try) 2>&5 | |
5493 | ac_status=$? | |
5494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5495 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
5496 | gcc_cv_header_string=yes |
5497 | else | |
ba479fd2 NN |
5498 | echo "$as_me: failed program was:" >&5 |
5499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5500 | ||
5501 | gcc_cv_header_string=no | |
0a4b6309 | 5502 | fi |
ba479fd2 | 5503 | rm -f conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 5504 | fi |
ba479fd2 NN |
5505 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 |
5506 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
63cf211a | 5507 | if test $gcc_cv_header_string = yes; then |
ba479fd2 NN |
5508 | |
5509 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 5510 | #define STRING_WITH_STRINGS 1 |
ba479fd2 | 5511 | _ACEOF |
0a4b6309 RL |
5512 | |
5513 | fi | |
5514 | ||
ba479fd2 NN |
5515 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
5516 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
5517 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
5518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 5519 | else |
ba479fd2 NN |
5520 | cat >conftest.$ac_ext <<_ACEOF |
5521 | #line $LINENO "configure" | |
5522 | /* confdefs.h. */ | |
5523 | _ACEOF | |
5524 | cat confdefs.h >>conftest.$ac_ext | |
5525 | cat >>conftest.$ac_ext <<_ACEOF | |
5526 | /* end confdefs.h. */ | |
e9831ca0 KG |
5527 | #include <sys/types.h> |
5528 | #include <sys/wait.h> | |
5529 | #ifndef WEXITSTATUS | |
ba479fd2 | 5530 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
5531 | #endif |
5532 | #ifndef WIFEXITED | |
ba479fd2 | 5533 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 5534 | #endif |
ba479fd2 NN |
5535 | |
5536 | int | |
5537 | main () | |
5538 | { | |
5539 | int s; | |
5540 | wait (&s); | |
5541 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
5542 | ; | |
5543 | return 0; | |
5544 | } | |
5545 | _ACEOF | |
5546 | rm -f conftest.$ac_objext | |
5547 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5548 | (eval $ac_compile) 2>&5 | |
5549 | ac_status=$? | |
5550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5551 | (exit $ac_status); } && | |
5552 | { ac_try='test -s conftest.$ac_objext' | |
5553 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5554 | (eval $ac_try) 2>&5 | |
5555 | ac_status=$? | |
5556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5557 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
5558 | ac_cv_header_sys_wait_h=yes |
5559 | else | |
ba479fd2 NN |
5560 | echo "$as_me: failed program was:" >&5 |
5561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5562 | ||
5563 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 5564 | fi |
ba479fd2 | 5565 | rm -f conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 5566 | fi |
ba479fd2 NN |
5567 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
5568 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 5569 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
5570 | |
5571 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 5572 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 5573 | _ACEOF |
6e3f3080 | 5574 | |
63cf211a | 5575 | fi |
6e3f3080 | 5576 | |
ba479fd2 NN |
5577 | |
5578 | ||
5579 | ||
5580 | ||
5581 | ||
5582 | ||
5583 | ||
5584 | ||
5585 | ||
5586 | ||
5587 | ||
5588 | ||
5589 | ||
5590 | ||
5591 | ||
5592 | ||
5593 | ||
5594 | ||
5595 | ||
5596 | ||
5597 | ||
5598 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h \ | |
1072ec3f | 5599 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 5600 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 5601 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 5602 | do |
ba479fd2 | 5603 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 5604 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
5605 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
5606 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5608 | else |
ca9bc441 | 5609 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5610 | #line $LINENO "configure" |
5611 | /* confdefs.h. */ | |
5612 | _ACEOF | |
5613 | cat confdefs.h >>conftest.$ac_ext | |
5614 | cat >>conftest.$ac_ext <<_ACEOF | |
5615 | /* end confdefs.h. */ | |
5616 | #include <$ac_header> | |
5617 | _ACEOF | |
5618 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5619 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5620 | ac_status=$? | |
5621 | grep -v '^ *+' conftest.er1 >conftest.err | |
5622 | rm -f conftest.er1 | |
5623 | cat conftest.err >&5 | |
5624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5625 | (exit $ac_status); } >/dev/null; then | |
5626 | if test -s conftest.err; then | |
5627 | ac_cpp_err=$ac_c_preproc_warn_flag | |
5628 | else | |
5629 | ac_cpp_err= | |
5630 | fi | |
5631 | else | |
5632 | ac_cpp_err=yes | |
5633 | fi | |
5634 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5635 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
5636 | else |
5637 | echo "$as_me: failed program was:" >&5 | |
5638 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5639 | ||
ca9bc441 | 5640 | eval "$as_ac_Header=no" |
ba479fd2 NN |
5641 | fi |
5642 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5643 | fi |
ba479fd2 NN |
5644 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
5645 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
5646 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
5647 | cat >>confdefs.h <<_ACEOF | |
5648 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5649 | _ACEOF | |
5650 | ||
956d6950 JL |
5651 | fi |
5652 | done | |
5653 | ||
5654 | ||
f24af81b | 5655 | # Check for thread headers. |
ca9bc441 | 5656 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
5657 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
5658 | if test "${ac_cv_header_thread_h+set}" = set; then | |
5659 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 5660 | else |
ca9bc441 | 5661 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5662 | #line $LINENO "configure" |
5663 | /* confdefs.h. */ | |
5664 | _ACEOF | |
5665 | cat confdefs.h >>conftest.$ac_ext | |
5666 | cat >>conftest.$ac_ext <<_ACEOF | |
5667 | /* end confdefs.h. */ | |
5668 | #include <thread.h> | |
5669 | _ACEOF | |
5670 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5671 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5672 | ac_status=$? | |
5673 | grep -v '^ *+' conftest.er1 >conftest.err | |
5674 | rm -f conftest.er1 | |
5675 | cat conftest.err >&5 | |
5676 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5677 | (exit $ac_status); } >/dev/null; then | |
5678 | if test -s conftest.err; then | |
5679 | ac_cpp_err=$ac_c_preproc_warn_flag | |
5680 | else | |
5681 | ac_cpp_err= | |
5682 | fi | |
5683 | else | |
5684 | ac_cpp_err=yes | |
5685 | fi | |
5686 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5687 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
5688 | else |
5689 | echo "$as_me: failed program was:" >&5 | |
5690 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5691 | ||
ca9bc441 | 5692 | ac_cv_header_thread_h=no |
ba479fd2 NN |
5693 | fi |
5694 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5695 | fi |
ba479fd2 NN |
5696 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
5697 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 5698 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
5699 | have_thread_h=yes |
5700 | else | |
ba479fd2 | 5701 | have_thread_h= |
f24af81b TT |
5702 | fi |
5703 | ||
ca9bc441 | 5704 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
5705 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
5706 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
5707 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f24af81b | 5708 | else |
ca9bc441 | 5709 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5710 | #line $LINENO "configure" |
5711 | /* confdefs.h. */ | |
5712 | _ACEOF | |
5713 | cat confdefs.h >>conftest.$ac_ext | |
5714 | cat >>conftest.$ac_ext <<_ACEOF | |
5715 | /* end confdefs.h. */ | |
5716 | #include <pthread.h> | |
5717 | _ACEOF | |
5718 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5719 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5720 | ac_status=$? | |
5721 | grep -v '^ *+' conftest.er1 >conftest.err | |
5722 | rm -f conftest.er1 | |
5723 | cat conftest.err >&5 | |
5724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5725 | (exit $ac_status); } >/dev/null; then | |
5726 | if test -s conftest.err; then | |
5727 | ac_cpp_err=$ac_c_preproc_warn_flag | |
5728 | else | |
5729 | ac_cpp_err= | |
5730 | fi | |
5731 | else | |
5732 | ac_cpp_err=yes | |
5733 | fi | |
5734 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 5735 | ac_cv_header_pthread_h=yes |
ba479fd2 NN |
5736 | else |
5737 | echo "$as_me: failed program was:" >&5 | |
5738 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5739 | ||
ca9bc441 | 5740 | ac_cv_header_pthread_h=no |
ba479fd2 NN |
5741 | fi |
5742 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 5743 | fi |
ba479fd2 NN |
5744 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
5745 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 5746 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
5747 | have_pthread_h=yes |
5748 | else | |
ba479fd2 | 5749 | have_pthread_h= |
f24af81b TT |
5750 | fi |
5751 | ||
5752 | ||
84c041a1 | 5753 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
5754 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
5755 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
5756 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
5757 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5758 | else | |
5759 | cat >conftest.$ac_ext <<_ACEOF | |
5760 | #line $LINENO "configure" | |
5761 | /* confdefs.h. */ | |
5762 | _ACEOF | |
5763 | cat confdefs.h >>conftest.$ac_ext | |
5764 | cat >>conftest.$ac_ext <<_ACEOF | |
5765 | /* end confdefs.h. */ | |
75e93faa ZW |
5766 | #ifdef HAVE_LIMITS_H |
5767 | #include <limits.h> | |
5768 | #endif | |
5769 | #ifdef CHAR_BIT | |
5770 | found | |
5771 | #endif | |
ba479fd2 | 5772 | _ACEOF |
75e93faa | 5773 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 5774 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
5775 | gcc_cv_decl_char_bit=yes |
5776 | else | |
75e93faa ZW |
5777 | gcc_cv_decl_char_bit=no |
5778 | fi | |
5779 | rm -f conftest* | |
5780 | ||
5781 | ||
5782 | fi | |
ba479fd2 NN |
5783 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
5784 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 5785 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
5786 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
5787 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
5788 | if test "${gcc_cv_c_nbby+set}" = set; then | |
5789 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
5790 | else |
5791 | i=8 | |
5792 | gcc_cv_c_nbby= | |
5793 | while test $i -lt 65; do | |
ba479fd2 NN |
5794 | cat >conftest.$ac_ext <<_ACEOF |
5795 | #line $LINENO "configure" | |
5796 | /* confdefs.h. */ | |
5797 | _ACEOF | |
5798 | cat confdefs.h >>conftest.$ac_ext | |
5799 | cat >>conftest.$ac_ext <<_ACEOF | |
5800 | /* end confdefs.h. */ | |
5801 | ||
5802 | int | |
5803 | main () | |
5804 | { | |
4e70264f ZW |
5805 | switch(0) { |
5806 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
5807 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
5808 | ; } | |
ba479fd2 NN |
5809 | ; |
5810 | return 0; | |
5811 | } | |
5812 | _ACEOF | |
5813 | rm -f conftest.$ac_objext | |
5814 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5815 | (eval $ac_compile) 2>&5 | |
5816 | ac_status=$? | |
5817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5818 | (exit $ac_status); } && | |
5819 | { ac_try='test -s conftest.$ac_objext' | |
5820 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5821 | (eval $ac_try) 2>&5 | |
5822 | ac_status=$? | |
5823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5824 | (exit $ac_status); }; }; then | |
4e70264f | 5825 | gcc_cv_c_nbby=$i; break |
75e93faa | 5826 | else |
ba479fd2 NN |
5827 | echo "$as_me: failed program was:" >&5 |
5828 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5829 | ||
75e93faa | 5830 | fi |
ba479fd2 | 5831 | rm -f conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
5832 | i=`expr $i + 1` |
5833 | done | |
5834 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
5835 | ||
5836 | fi | |
ba479fd2 NN |
5837 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
5838 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 5839 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
5840 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
5841 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
5842 | { (exit 1); exit 1; }; } | |
75e93faa | 5843 | else |
ba479fd2 NN |
5844 | |
5845 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 5846 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 5847 | _ACEOF |
75e93faa ZW |
5848 | |
5849 | fi | |
5850 | fi | |
ba479fd2 NN |
5851 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
5852 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
5853 | if test "${ac_cv_c_bigendian+set}" = set; then | |
5854 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 5855 | else |
4977bab6 ZW |
5856 | ac_cv_c_bigendian=unknown |
5857 | # See if sys/param.h defines the BYTE_ORDER macro. | |
ba479fd2 NN |
5858 | cat >conftest.$ac_ext <<_ACEOF |
5859 | #line $LINENO "configure" | |
5860 | /* confdefs.h. */ | |
5861 | _ACEOF | |
5862 | cat confdefs.h >>conftest.$ac_ext | |
5863 | cat >>conftest.$ac_ext <<_ACEOF | |
5864 | /* end confdefs.h. */ | |
4977bab6 ZW |
5865 | #include <sys/types.h> |
5866 | #include <sys/param.h> | |
ba479fd2 NN |
5867 | int |
5868 | main () | |
5869 | { | |
2d6eb5bf | 5870 | |
4977bab6 ZW |
5871 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
5872 | bogus endian macros | |
84c041a1 | 5873 | #endif |
ba479fd2 NN |
5874 | ; |
5875 | return 0; | |
5876 | } | |
5877 | _ACEOF | |
5878 | rm -f conftest.$ac_objext | |
5879 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5880 | (eval $ac_compile) 2>&5 | |
5881 | ac_status=$? | |
5882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5883 | (exit $ac_status); } && | |
5884 | { ac_try='test -s conftest.$ac_objext' | |
5885 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5886 | (eval $ac_try) 2>&5 | |
5887 | ac_status=$? | |
5888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5889 | (exit $ac_status); }; }; then | |
4977bab6 | 5890 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 NN |
5891 | cat >conftest.$ac_ext <<_ACEOF |
5892 | #line $LINENO "configure" | |
5893 | /* confdefs.h. */ | |
5894 | _ACEOF | |
5895 | cat confdefs.h >>conftest.$ac_ext | |
5896 | cat >>conftest.$ac_ext <<_ACEOF | |
5897 | /* end confdefs.h. */ | |
4977bab6 ZW |
5898 | #include <sys/types.h> |
5899 | #include <sys/param.h> | |
ba479fd2 NN |
5900 | int |
5901 | main () | |
5902 | { | |
4977bab6 ZW |
5903 | |
5904 | #if BYTE_ORDER != BIG_ENDIAN | |
5905 | not big endian | |
84c041a1 | 5906 | #endif |
ba479fd2 NN |
5907 | ; |
5908 | return 0; | |
5909 | } | |
5910 | _ACEOF | |
5911 | rm -f conftest.$ac_objext | |
5912 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5913 | (eval $ac_compile) 2>&5 | |
5914 | ac_status=$? | |
5915 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5916 | (exit $ac_status); } && | |
5917 | { ac_try='test -s conftest.$ac_objext' | |
5918 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5919 | (eval $ac_try) 2>&5 | |
5920 | ac_status=$? | |
5921 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5922 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
5923 | ac_cv_c_bigendian=yes |
5924 | else | |
ba479fd2 NN |
5925 | echo "$as_me: failed program was:" >&5 |
5926 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5927 | ||
5928 | ac_cv_c_bigendian=no | |
4977bab6 | 5929 | fi |
ba479fd2 | 5930 | rm -f conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 5931 | else |
ba479fd2 NN |
5932 | echo "$as_me: failed program was:" >&5 |
5933 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5934 | ||
4977bab6 | 5935 | fi |
ba479fd2 | 5936 | rm -f conftest.$ac_objext conftest.$ac_ext |
4977bab6 ZW |
5937 | if test $ac_cv_c_bigendian = unknown; then |
5938 | if test "$cross_compiling" = yes; then | |
ba479fd2 NN |
5939 | echo $ac_n "cross-compiling... " 2>&6 |
5940 | else | |
5941 | cat >conftest.$ac_ext <<_ACEOF | |
5942 | #line $LINENO "configure" | |
5943 | /* confdefs.h. */ | |
5944 | _ACEOF | |
5945 | cat confdefs.h >>conftest.$ac_ext | |
5946 | cat >>conftest.$ac_ext <<_ACEOF | |
5947 | /* end confdefs.h. */ | |
4977bab6 ZW |
5948 | main () { |
5949 | /* Are we little or big endian? From Harbison&Steele. */ | |
5950 | union | |
5951 | { | |
5952 | long l; | |
5953 | char c[sizeof (long)]; | |
5954 | } u; | |
5955 | u.l = 1; | |
5956 | exit (u.c[sizeof (long) - 1] == 1); | |
5957 | } | |
ba479fd2 NN |
5958 | _ACEOF |
5959 | rm -f conftest$ac_exeext | |
5960 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5961 | (eval $ac_link) 2>&5 | |
5962 | ac_status=$? | |
5963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5964 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5965 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5966 | (eval $ac_try) 2>&5 | |
5967 | ac_status=$? | |
5968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5969 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
5970 | ac_cv_c_bigendian=no |
5971 | else | |
ba479fd2 NN |
5972 | echo "$as_me: program exited with status $ac_status" >&5 |
5973 | echo "$as_me: failed program was:" >&5 | |
5974 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5975 | ||
5976 | ( exit $ac_status ) | |
5977 | ac_cv_c_bigendian=yes | |
4977bab6 | 5978 | fi |
a6a5e4c9 | 5979 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 5980 | fi |
4977bab6 ZW |
5981 | fi |
5982 | fi | |
ba479fd2 NN |
5983 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
5984 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
4977bab6 | 5985 | if test $ac_cv_c_bigendian = unknown; then |
ba479fd2 NN |
5986 | echo "$as_me:$LINENO: checking to probe for byte ordering" >&5 |
5987 | echo $ECHO_N "checking to probe for byte ordering... $ECHO_C" >&6 | |
2d6eb5bf | 5988 | |
4977bab6 ZW |
5989 | cat >conftest.c <<EOF |
5990 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
5991 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
5992 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
5993 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
5994 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
5995 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
5996 | int main() { _ascii (); _ebcdic (); return 0; } | |
5997 | EOF | |
5998 | if test -f conftest.c ; then | |
5999 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
6000 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
6001 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
6002 | ac_cv_c_bigendian=yes | |
6003 | fi | |
6004 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
6005 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
6006 | if test $ac_cv_c_bigendian = yes ; then | |
6007 | ac_cv_c_bigendian=unknown; | |
6008 | else | |
6009 | ac_cv_c_bigendian=no | |
6010 | fi | |
6011 | fi | |
6012 | echo $ac_n 'guessing bigendian ... ' >&6 | |
6013 | fi | |
6014 | fi | |
ba479fd2 NN |
6015 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
6016 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
84c041a1 | 6017 | fi |
4977bab6 | 6018 | if test $ac_cv_c_bigendian = yes; then |
ba479fd2 NN |
6019 | |
6020 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 6021 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 6022 | _ACEOF |
cafe096b | 6023 | |
ba479fd2 NN |
6024 | |
6025 | cat >>confdefs.h <<\_ACEOF | |
84c041a1 | 6026 | #define HOST_WORDS_BIG_ENDIAN 1 |
ba479fd2 | 6027 | _ACEOF |
84c041a1 | 6028 | |
4977bab6 ZW |
6029 | BYTEORDER=4321 |
6030 | else | |
6031 | BYTEORDER=1234 | |
6032 | fi | |
ba479fd2 NN |
6033 | |
6034 | cat >>confdefs.h <<_ACEOF | |
4977bab6 | 6035 | #define BYTEORDER $BYTEORDER |
ba479fd2 | 6036 | _ACEOF |
4977bab6 ZW |
6037 | |
6038 | if test $ac_cv_c_bigendian = unknown; then | |
ba479fd2 NN |
6039 | { { echo "$as_me:$LINENO: error: unknown endianess - sorry" >&5 |
6040 | echo "$as_me: error: unknown endianess - sorry" >&2;} | |
6041 | { (exit please pre-set ac_cv_c_bigendian); exit please pre-set ac_cv_c_bigendian; }; } | |
84c041a1 ZW |
6042 | fi |
6043 | ||
75e93faa | 6044 | |
73458fb7 NN |
6045 | # -------- |
6046 | # UNSORTED | |
6047 | # -------- | |
1e608388 | 6048 | |
73458fb7 NN |
6049 | # Stage specific cflags for build. |
6050 | stage1_cflags= | |
6051 | case $build in | |
6052 | vax-*-*) | |
6053 | if test x$GCC = xyes | |
6054 | then | |
6055 | stage1_cflags="-Wa,-J" | |
6056 | else | |
6057 | stage1_cflags="-J" | |
6058 | fi | |
6059 | ;; | |
6060 | powerpc-*-darwin*) | |
6061 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
6062 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
6063 | # Apple's GCC has bugs in designated initializer handling, so disable | |
6064 | # that too. | |
6065 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
6066 | ;; | |
6067 | esac | |
1e608388 | 6068 | |
1e608388 | 6069 | |
4e70264f ZW |
6070 | # These libraries may be used by collect2. |
6071 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
6072 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
6073 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
6074 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
6075 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
6076 | else |
6077 | save_LIBS="$LIBS" | |
7f2749d4 | 6078 | for libs in '' -lld -lmld \ |
4e70264f ZW |
6079 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
6080 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
6081 | do | |
6082 | LIBS="$libs" | |
ba479fd2 NN |
6083 | cat >conftest.$ac_ext <<_ACEOF |
6084 | #line $LINENO "configure" | |
6085 | /* confdefs.h. */ | |
6086 | _ACEOF | |
6087 | cat confdefs.h >>conftest.$ac_ext | |
6088 | cat >>conftest.$ac_ext <<_ACEOF | |
6089 | /* end confdefs.h. */ | |
6090 | ||
4e70264f | 6091 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6092 | #ifdef __cplusplus |
6093 | extern "C" | |
6094 | #endif | |
4e70264f | 6095 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6096 | builtin and then its argument prototype would still apply. */ |
6097 | char ldopen (); | |
6098 | int | |
6099 | main () | |
6100 | { | |
6101 | ldopen (); | |
6102 | ; | |
6103 | return 0; | |
6104 | } | |
6105 | _ACEOF | |
6106 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6107 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6108 | (eval $ac_link) 2>&5 | |
6109 | ac_status=$? | |
6110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6111 | (exit $ac_status); } && | |
6112 | { ac_try='test -s conftest$ac_exeext' | |
6113 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6114 | (eval $ac_try) 2>&5 | |
6115 | ac_status=$? | |
6116 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6117 | (exit $ac_status); }; }; then | |
4e70264f ZW |
6118 | gcc_cv_collect2_libs="$libs"; break |
6119 | else | |
ba479fd2 NN |
6120 | echo "$as_me: failed program was:" >&5 |
6121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6122 | ||
4e70264f | 6123 | fi |
ba479fd2 | 6124 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
4e70264f ZW |
6125 | done |
6126 | LIBS="$save_LIBS" | |
6127 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
6128 | fi | |
ba479fd2 NN |
6129 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
6130 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
6131 | case $gcc_cv_collect2_libs in |
6132 | "none required") ;; | |
6133 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
6134 | esac | |
6135 | ||
6136 | ||
7f2749d4 RK |
6137 | # When building Ada code on Alpha, we need exc_resume which is usually in |
6138 | # -lexc. So test for it. | |
6139 | save_LIBS="$LIBS" | |
6140 | LIBS= | |
ba479fd2 NN |
6141 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
6142 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
6143 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
6144 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6145 | else | |
6146 | ac_func_search_save_LIBS=$LIBS | |
6147 | ac_cv_search_exc_resume=no | |
6148 | cat >conftest.$ac_ext <<_ACEOF | |
6149 | #line $LINENO "configure" | |
6150 | /* confdefs.h. */ | |
6151 | _ACEOF | |
6152 | cat confdefs.h >>conftest.$ac_ext | |
6153 | cat >>conftest.$ac_ext <<_ACEOF | |
6154 | /* end confdefs.h. */ | |
7f2749d4 | 6155 | |
7f2749d4 | 6156 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6157 | #ifdef __cplusplus |
6158 | extern "C" | |
6159 | #endif | |
7f2749d4 | 6160 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6161 | builtin and then its argument prototype would still apply. */ |
6162 | char exc_resume (); | |
6163 | int | |
6164 | main () | |
6165 | { | |
6166 | exc_resume (); | |
6167 | ; | |
6168 | return 0; | |
6169 | } | |
6170 | _ACEOF | |
6171 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6172 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6173 | (eval $ac_link) 2>&5 | |
6174 | ac_status=$? | |
6175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6176 | (exit $ac_status); } && | |
6177 | { ac_try='test -s conftest$ac_exeext' | |
6178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6179 | (eval $ac_try) 2>&5 | |
6180 | ac_status=$? | |
6181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6182 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
6183 | ac_cv_search_exc_resume="none required" |
6184 | else | |
ba479fd2 NN |
6185 | echo "$as_me: failed program was:" >&5 |
6186 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6187 | ||
7f2749d4 | 6188 | fi |
ba479fd2 NN |
6189 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
6190 | if test "$ac_cv_search_exc_resume" = no; then | |
6191 | for ac_lib in exc; do | |
6192 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6193 | cat >conftest.$ac_ext <<_ACEOF | |
6194 | #line $LINENO "configure" | |
6195 | /* confdefs.h. */ | |
6196 | _ACEOF | |
6197 | cat confdefs.h >>conftest.$ac_ext | |
6198 | cat >>conftest.$ac_ext <<_ACEOF | |
6199 | /* end confdefs.h. */ | |
6200 | ||
7f2749d4 | 6201 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6202 | #ifdef __cplusplus |
6203 | extern "C" | |
6204 | #endif | |
7f2749d4 | 6205 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6206 | builtin and then its argument prototype would still apply. */ |
6207 | char exc_resume (); | |
6208 | int | |
6209 | main () | |
6210 | { | |
6211 | exc_resume (); | |
6212 | ; | |
6213 | return 0; | |
6214 | } | |
6215 | _ACEOF | |
6216 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6217 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6218 | (eval $ac_link) 2>&5 | |
6219 | ac_status=$? | |
6220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6221 | (exit $ac_status); } && | |
6222 | { ac_try='test -s conftest$ac_exeext' | |
6223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6224 | (eval $ac_try) 2>&5 | |
6225 | ac_status=$? | |
6226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6227 | (exit $ac_status); }; }; then | |
6228 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
6229 | break |
6230 | else | |
ba479fd2 NN |
6231 | echo "$as_me: failed program was:" >&5 |
6232 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6233 | ||
cafe096b | 6234 | fi |
ba479fd2 NN |
6235 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
6236 | done | |
6e3f3080 | 6237 | fi |
ba479fd2 NN |
6238 | LIBS=$ac_func_search_save_LIBS |
6239 | fi | |
6240 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
6241 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
6242 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 6243 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 6244 | |
7f2749d4 | 6245 | fi |
ba479fd2 | 6246 | |
7f2749d4 RK |
6247 | GNAT_LIBEXC="$LIBS" |
6248 | LIBS="$save_LIBS" | |
6249 | ||
6250 | ||
62c9aa5f ZW |
6251 | # Some systems put ldexp and frexp in libm instead of libc; assume |
6252 | # they're both in the same place. jcf-dump needs them. | |
6253 | save_LIBS="$LIBS" | |
6254 | LIBS= | |
ba479fd2 NN |
6255 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
6256 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
6257 | if test "${ac_cv_search_ldexp+set}" = set; then | |
6258 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6259 | else | |
6260 | ac_func_search_save_LIBS=$LIBS | |
6261 | ac_cv_search_ldexp=no | |
6262 | cat >conftest.$ac_ext <<_ACEOF | |
6263 | #line $LINENO "configure" | |
6264 | /* confdefs.h. */ | |
6265 | _ACEOF | |
6266 | cat confdefs.h >>conftest.$ac_ext | |
6267 | cat >>conftest.$ac_ext <<_ACEOF | |
6268 | /* end confdefs.h. */ | |
62c9aa5f | 6269 | |
62c9aa5f | 6270 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6271 | #ifdef __cplusplus |
6272 | extern "C" | |
6273 | #endif | |
62c9aa5f | 6274 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6275 | builtin and then its argument prototype would still apply. */ |
6276 | char ldexp (); | |
6277 | int | |
6278 | main () | |
6279 | { | |
6280 | ldexp (); | |
6281 | ; | |
6282 | return 0; | |
6283 | } | |
6284 | _ACEOF | |
6285 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6286 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6287 | (eval $ac_link) 2>&5 | |
6288 | ac_status=$? | |
6289 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6290 | (exit $ac_status); } && | |
6291 | { ac_try='test -s conftest$ac_exeext' | |
6292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6293 | (eval $ac_try) 2>&5 | |
6294 | ac_status=$? | |
6295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6296 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
6297 | ac_cv_search_ldexp="none required" |
6298 | else | |
ba479fd2 NN |
6299 | echo "$as_me: failed program was:" >&5 |
6300 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6301 | ||
62c9aa5f | 6302 | fi |
ba479fd2 NN |
6303 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
6304 | if test "$ac_cv_search_ldexp" = no; then | |
6305 | for ac_lib in m; do | |
6306 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
6307 | cat >conftest.$ac_ext <<_ACEOF | |
6308 | #line $LINENO "configure" | |
6309 | /* confdefs.h. */ | |
6310 | _ACEOF | |
6311 | cat confdefs.h >>conftest.$ac_ext | |
6312 | cat >>conftest.$ac_ext <<_ACEOF | |
6313 | /* end confdefs.h. */ | |
6314 | ||
62c9aa5f | 6315 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6316 | #ifdef __cplusplus |
6317 | extern "C" | |
6318 | #endif | |
62c9aa5f | 6319 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6320 | builtin and then its argument prototype would still apply. */ |
6321 | char ldexp (); | |
6322 | int | |
6323 | main () | |
6324 | { | |
6325 | ldexp (); | |
6326 | ; | |
6327 | return 0; | |
6328 | } | |
6329 | _ACEOF | |
6330 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6331 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6332 | (eval $ac_link) 2>&5 | |
6333 | ac_status=$? | |
6334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6335 | (exit $ac_status); } && | |
6336 | { ac_try='test -s conftest$ac_exeext' | |
6337 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6338 | (eval $ac_try) 2>&5 | |
6339 | ac_status=$? | |
6340 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6341 | (exit $ac_status); }; }; then | |
6342 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
6343 | break |
6344 | else | |
ba479fd2 NN |
6345 | echo "$as_me: failed program was:" >&5 |
6346 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6347 | ||
cafe096b | 6348 | fi |
ba479fd2 NN |
6349 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
6350 | done | |
6e3f3080 | 6351 | fi |
ba479fd2 NN |
6352 | LIBS=$ac_func_search_save_LIBS |
6353 | fi | |
6354 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
6355 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
6356 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 6357 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 6358 | |
62c9aa5f | 6359 | fi |
ba479fd2 | 6360 | |
62c9aa5f ZW |
6361 | LDEXP_LIB="$LIBS" |
6362 | LIBS="$save_LIBS" | |
6363 | ||
6364 | ||
956d6950 JL |
6365 | # Use <inttypes.h> only if it exists, |
6366 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
6367 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
6368 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
6369 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
6370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6371 | else | |
6372 | cat >conftest.$ac_ext <<_ACEOF | |
6373 | #line $LINENO "configure" | |
6374 | /* confdefs.h. */ | |
6375 | _ACEOF | |
6376 | cat confdefs.h >>conftest.$ac_ext | |
6377 | cat >>conftest.$ac_ext <<_ACEOF | |
6378 | /* end confdefs.h. */ | |
956d6950 JL |
6379 | #include <sys/types.h> |
6380 | #include <inttypes.h> | |
ba479fd2 NN |
6381 | int |
6382 | main () | |
6383 | { | |
956d6950 | 6384 | intmax_t i = -1; |
ba479fd2 NN |
6385 | ; |
6386 | return 0; | |
6387 | } | |
6388 | _ACEOF | |
6389 | rm -f conftest.$ac_objext | |
6390 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6391 | (eval $ac_compile) 2>&5 | |
6392 | ac_status=$? | |
6393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6394 | (exit $ac_status); } && | |
6395 | { ac_try='test -s conftest.$ac_objext' | |
6396 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6397 | (eval $ac_try) 2>&5 | |
6398 | ac_status=$? | |
6399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6400 | (exit $ac_status); }; }; then | |
0056a9b5 | 6401 | gcc_cv_header_inttypes_h=yes |
956d6950 | 6402 | else |
ba479fd2 NN |
6403 | echo "$as_me: failed program was:" >&5 |
6404 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6405 | ||
6406 | gcc_cv_header_inttypes_h=no | |
956d6950 | 6407 | fi |
ba479fd2 | 6408 | rm -f conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
6409 | fi |
6410 | ||
ba479fd2 NN |
6411 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
6412 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 6413 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
6414 | |
6415 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 6416 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 6417 | _ACEOF |
0056a9b5 KG |
6418 | |
6419 | fi | |
956d6950 | 6420 | |
c149cc37 | 6421 | |
ba479fd2 NN |
6422 | |
6423 | ||
6424 | ||
6425 | ||
6426 | ||
6427 | ||
6428 | ||
6429 | ||
6430 | ||
6431 | ||
6432 | ||
6433 | ||
6434 | ||
6435 | ||
6436 | ||
6437 | ||
6438 | ||
6439 | ||
6440 | ||
6441 | ||
6442 | ||
6443 | ||
6444 | ||
6445 | ||
6446 | ||
6af8c740 KG |
6447 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
6448 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
4e87a651 | 6449 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \ |
56694dd9 ZW |
6450 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore \ |
6451 | setlocale | |
956d6950 | 6452 | do |
ba479fd2 NN |
6453 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
6454 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6455 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6456 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6457 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6458 | else | |
6459 | cat >conftest.$ac_ext <<_ACEOF | |
6460 | #line $LINENO "configure" | |
6461 | /* confdefs.h. */ | |
6462 | _ACEOF | |
6463 | cat confdefs.h >>conftest.$ac_ext | |
6464 | cat >>conftest.$ac_ext <<_ACEOF | |
6465 | /* end confdefs.h. */ | |
956d6950 | 6466 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
6467 | which can conflict with char $ac_func (); below. |
6468 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6469 | <limits.h> exists even on freestanding compilers. */ | |
6470 | #ifdef __STDC__ | |
6471 | # include <limits.h> | |
6472 | #else | |
6473 | # include <assert.h> | |
6474 | #endif | |
6e3f3080 | 6475 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
6476 | #ifdef __cplusplus |
6477 | extern "C" | |
6478 | { | |
6479 | #endif | |
6e3f3080 | 6480 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
6481 | builtin and then its argument prototype would still apply. */ |
6482 | char $ac_func (); | |
956d6950 JL |
6483 | /* The GNU C library defines this for functions which it implements |
6484 | to always fail with ENOSYS. Some functions are actually named | |
6485 | something starting with __ and the normal name is an alias. */ | |
6486 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6487 | choke me | |
6488 | #else | |
ba479fd2 NN |
6489 | char (*f) () = $ac_func; |
6490 | #endif | |
6491 | #ifdef __cplusplus | |
6492 | } | |
956d6950 JL |
6493 | #endif |
6494 | ||
ba479fd2 NN |
6495 | int |
6496 | main () | |
6497 | { | |
6498 | return f != $ac_func; | |
6499 | ; | |
6500 | return 0; | |
6501 | } | |
6502 | _ACEOF | |
6503 | rm -f conftest.$ac_objext conftest$ac_exeext | |
6504 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6505 | (eval $ac_link) 2>&5 | |
6506 | ac_status=$? | |
6507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6508 | (exit $ac_status); } && | |
6509 | { ac_try='test -s conftest$ac_exeext' | |
6510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6511 | (eval $ac_try) 2>&5 | |
6512 | ac_status=$? | |
6513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6514 | (exit $ac_status); }; }; then | |
6515 | eval "$as_ac_var=yes" | |
6516 | else | |
6517 | echo "$as_me: failed program was:" >&5 | |
6518 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6519 | ||
6520 | eval "$as_ac_var=no" | |
6521 | fi | |
6522 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext | |
6523 | fi | |
6524 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6525 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6526 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6527 | cat >>confdefs.h <<_ACEOF | |
6528 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6529 | _ACEOF | |
956d6950 | 6530 | |
956d6950 JL |
6531 | fi |
6532 | done | |
6533 | ||
6885fc87 | 6534 | |
39f6c4c8 | 6535 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
6536 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
6537 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
6538 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
6539 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
6540 | else |
6541 | if test "$cross_compiling" = yes; then | |
6542 | gcc_cv_func_mbstowcs_works=yes | |
6543 | else | |
ba479fd2 NN |
6544 | cat >conftest.$ac_ext <<_ACEOF |
6545 | #line $LINENO "configure" | |
6546 | /* confdefs.h. */ | |
6547 | _ACEOF | |
6548 | cat confdefs.h >>conftest.$ac_ext | |
6549 | cat >>conftest.$ac_ext <<_ACEOF | |
6550 | /* end confdefs.h. */ | |
39f6c4c8 KW |
6551 | #include <stdlib.h> |
6552 | int main() | |
6553 | { | |
6554 | mbstowcs(0, "", 0); | |
6555 | return 0; | |
6556 | } | |
ba479fd2 NN |
6557 | _ACEOF |
6558 | rm -f conftest$ac_exeext | |
6559 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6560 | (eval $ac_link) 2>&5 | |
6561 | ac_status=$? | |
6562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6563 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6564 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6565 | (eval $ac_try) 2>&5 | |
6566 | ac_status=$? | |
6567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6568 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
6569 | gcc_cv_func_mbstowcs_works=yes |
6570 | else | |
ba479fd2 NN |
6571 | echo "$as_me: program exited with status $ac_status" >&5 |
6572 | echo "$as_me: failed program was:" >&5 | |
6573 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6574 | ||
6575 | ( exit $ac_status ) | |
6576 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 6577 | fi |
a6a5e4c9 | 6578 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 6579 | fi |
39f6c4c8 | 6580 | fi |
ba479fd2 NN |
6581 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
6582 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 6583 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
6584 | |
6585 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 6586 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 6587 | _ACEOF |
39f6c4c8 KW |
6588 | |
6589 | fi | |
6590 | fi | |
6591 | ||
ba479fd2 NN |
6592 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
6593 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
6594 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
6595 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 6596 | else |
ba479fd2 NN |
6597 | cat >conftest.$ac_ext <<_ACEOF |
6598 | #line $LINENO "configure" | |
6599 | /* confdefs.h. */ | |
6600 | _ACEOF | |
6601 | cat confdefs.h >>conftest.$ac_ext | |
6602 | cat >>conftest.$ac_ext <<_ACEOF | |
6603 | /* end confdefs.h. */ | |
8b4fc07a NN |
6604 | $ac_includes_default |
6605 | int | |
6606 | main () | |
6607 | { | |
6608 | if ((ssize_t *) 0) | |
6609 | return 0; | |
6610 | if (sizeof (ssize_t)) | |
6611 | return 0; | |
6612 | ; | |
6613 | return 0; | |
6614 | } | |
ba479fd2 | 6615 | _ACEOF |
8b4fc07a NN |
6616 | rm -f conftest.$ac_objext |
6617 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6618 | (eval $ac_compile) 2>&5 | |
6619 | ac_status=$? | |
6620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6621 | (exit $ac_status); } && | |
6622 | { ac_try='test -s conftest.$ac_objext' | |
6623 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6624 | (eval $ac_try) 2>&5 | |
6625 | ac_status=$? | |
6626 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6627 | (exit $ac_status); }; }; then | |
cb65112a | 6628 | ac_cv_type_ssize_t=yes |
f12bc141 | 6629 | else |
8b4fc07a NN |
6630 | echo "$as_me: failed program was:" >&5 |
6631 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 6632 | |
8b4fc07a NN |
6633 | ac_cv_type_ssize_t=no |
6634 | fi | |
6635 | rm -f conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 6636 | fi |
ba479fd2 NN |
6637 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
6638 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
6639 | if test $ac_cv_type_ssize_t = yes; then |
6640 | : | |
6641 | else | |
ba479fd2 | 6642 | |
8b4fc07a | 6643 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 6644 | #define ssize_t int |
ba479fd2 | 6645 | _ACEOF |
f12bc141 ZW |
6646 | |
6647 | fi | |
6648 | ||
0b9d02c6 | 6649 | |
e256b8b6 DA |
6650 | # Try to determine the array type of the second argument of getgroups |
6651 | # for the target system (int or gid_t). | |
ba479fd2 NN |
6652 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
6653 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
6654 | if test "${ac_cv_type_uid_t+set}" = set; then | |
6655 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6656 | else | |
6657 | cat >conftest.$ac_ext <<_ACEOF | |
6658 | #line $LINENO "configure" | |
6659 | /* confdefs.h. */ | |
6660 | _ACEOF | |
6661 | cat confdefs.h >>conftest.$ac_ext | |
6662 | cat >>conftest.$ac_ext <<_ACEOF | |
6663 | /* end confdefs.h. */ | |
e256b8b6 | 6664 | #include <sys/types.h> |
ba479fd2 NN |
6665 | |
6666 | _ACEOF | |
e256b8b6 | 6667 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 6668 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
6669 | ac_cv_type_uid_t=yes |
6670 | else | |
e256b8b6 DA |
6671 | ac_cv_type_uid_t=no |
6672 | fi | |
6673 | rm -f conftest* | |
6674 | ||
6675 | fi | |
ba479fd2 NN |
6676 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
6677 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 6678 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
6679 | |
6680 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 6681 | #define uid_t int |
ba479fd2 | 6682 | _ACEOF |
cafe096b | 6683 | |
ba479fd2 NN |
6684 | |
6685 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 6686 | #define gid_t int |
ba479fd2 | 6687 | _ACEOF |
e256b8b6 DA |
6688 | |
6689 | fi | |
6690 | ||
ba479fd2 NN |
6691 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
6692 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
6693 | if test "${ac_cv_type_getgroups+set}" = set; then | |
6694 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
6695 | else |
6696 | if test "$cross_compiling" = yes; then | |
6697 | ac_cv_type_getgroups=cross | |
6698 | else | |
ba479fd2 NN |
6699 | cat >conftest.$ac_ext <<_ACEOF |
6700 | #line $LINENO "configure" | |
6701 | /* confdefs.h. */ | |
6702 | _ACEOF | |
6703 | cat confdefs.h >>conftest.$ac_ext | |
6704 | cat >>conftest.$ac_ext <<_ACEOF | |
6705 | /* end confdefs.h. */ | |
e256b8b6 DA |
6706 | /* Thanks to Mike Rendell for this test. */ |
6707 | #include <sys/types.h> | |
6708 | #define NGID 256 | |
6709 | #undef MAX | |
6710 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
6711 | |
6712 | int | |
6713 | main () | |
e256b8b6 DA |
6714 | { |
6715 | gid_t gidset[NGID]; | |
6716 | int i, n; | |
6717 | union { gid_t gval; long lval; } val; | |
6718 | ||
6719 | val.lval = -1; | |
6720 | for (i = 0; i < NGID; i++) | |
6721 | gidset[i] = val.gval; | |
6722 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
e1366e0c | 6723 | gidset); |
e256b8b6 DA |
6724 | /* Exit non-zero if getgroups seems to require an array of ints. This |
6725 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
6726 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 6727 | } |
ba479fd2 NN |
6728 | _ACEOF |
6729 | rm -f conftest$ac_exeext | |
6730 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6731 | (eval $ac_link) 2>&5 | |
6732 | ac_status=$? | |
6733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6734 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6736 | (eval $ac_try) 2>&5 | |
6737 | ac_status=$? | |
6738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6739 | (exit $ac_status); }; }; then | |
6740 | ac_cv_type_getgroups=gid_t | |
63cf211a | 6741 | else |
ba479fd2 NN |
6742 | echo "$as_me: program exited with status $ac_status" >&5 |
6743 | echo "$as_me: failed program was:" >&5 | |
6744 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6745 | ||
6746 | ( exit $ac_status ) | |
6747 | ac_cv_type_getgroups=int | |
e256b8b6 | 6748 | fi |
a6a5e4c9 | 6749 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 6750 | fi |
e256b8b6 | 6751 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 NN |
6752 | cat >conftest.$ac_ext <<_ACEOF |
6753 | #line $LINENO "configure" | |
6754 | /* confdefs.h. */ | |
6755 | _ACEOF | |
6756 | cat confdefs.h >>conftest.$ac_ext | |
6757 | cat >>conftest.$ac_ext <<_ACEOF | |
6758 | /* end confdefs.h. */ | |
e256b8b6 | 6759 | #include <unistd.h> |
ba479fd2 NN |
6760 | |
6761 | _ACEOF | |
e256b8b6 | 6762 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 6763 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
6764 | ac_cv_type_getgroups=gid_t |
6765 | else | |
e256b8b6 DA |
6766 | ac_cv_type_getgroups=int |
6767 | fi | |
6768 | rm -f conftest* | |
6769 | ||
6770 | fi | |
6771 | fi | |
ba479fd2 NN |
6772 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
6773 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 6774 | |
ba479fd2 | 6775 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 6776 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 6777 | _ACEOF |
e256b8b6 DA |
6778 | |
6779 | ||
6780 | if test "${target}" = "${build}"; then | |
6781 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
6782 | else | |
6783 | case "${target}" in | |
6784 | # This condition may need some tweaking. It should include all | |
6785 | # targets where the array type of the second argument of getgroups | |
6786 | # is int and the type of gid_t is not equivalent to int. | |
6787 | *-*-sunos* | *-*-ultrix*) | |
6788 | TARGET_GETGROUPS_T=int | |
6789 | ;; | |
6790 | *) | |
6791 | TARGET_GETGROUPS_T=gid_t | |
6792 | ;; | |
6793 | esac | |
6794 | fi | |
6795 | ||
6796 | ||
ba479fd2 NN |
6797 | echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5 |
6798 | echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6 | |
6799 | if test "${gcc_cv_func_printf_ptr+set}" = set; then | |
6800 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
6801 | else |
6802 | if test "$cross_compiling" = yes; then | |
6803 | gcc_cv_func_printf_ptr=no | |
6804 | else | |
ba479fd2 NN |
6805 | cat >conftest.$ac_ext <<_ACEOF |
6806 | #line $LINENO "configure" | |
6807 | /* confdefs.h. */ | |
6808 | _ACEOF | |
6809 | cat confdefs.h >>conftest.$ac_ext | |
6810 | cat >>conftest.$ac_ext <<_ACEOF | |
6811 | /* end confdefs.h. */ | |
0a4b6309 RL |
6812 | #include <stdio.h> |
6813 | ||
86cf1cbd | 6814 | int main() |
0a4b6309 RL |
6815 | { |
6816 | char buf[64]; | |
6817 | char *p = buf, *q = NULL; | |
6818 | sprintf(buf, "%p", p); | |
6819 | sscanf(buf, "%p", &q); | |
86cf1cbd | 6820 | return (p != q); |
0a4b6309 | 6821 | } |
ba479fd2 NN |
6822 | _ACEOF |
6823 | rm -f conftest$ac_exeext | |
6824 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6825 | (eval $ac_link) 2>&5 | |
6826 | ac_status=$? | |
6827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6828 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6830 | (eval $ac_try) 2>&5 | |
6831 | ac_status=$? | |
6832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6833 | (exit $ac_status); }; }; then | |
0a4b6309 RL |
6834 | gcc_cv_func_printf_ptr=yes |
6835 | else | |
ba479fd2 NN |
6836 | echo "$as_me: program exited with status $ac_status" >&5 |
6837 | echo "$as_me: failed program was:" >&5 | |
6838 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6839 | ||
6840 | ( exit $ac_status ) | |
6841 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 6842 | fi |
a6a5e4c9 | 6843 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
0a4b6309 | 6844 | fi |
0a4b6309 RL |
6845 | rm -f core core.* *.core |
6846 | fi | |
ba479fd2 NN |
6847 | echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5 |
6848 | echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6 | |
63cf211a | 6849 | if test $gcc_cv_func_printf_ptr = yes ; then |
ba479fd2 NN |
6850 | |
6851 | cat >>confdefs.h <<\_ACEOF | |
0a4b6309 | 6852 | #define HAVE_PRINTF_PTR 1 |
ba479fd2 | 6853 | _ACEOF |
0a4b6309 RL |
6854 | |
6855 | fi | |
6856 | ||
1072ec3f ZW |
6857 | if test $ac_cv_header_sys_mman_h != yes \ |
6858 | || test $ac_cv_func_mmap != yes; then | |
6859 | gcc_cv_func_mmap_file=no | |
6860 | gcc_cv_func_mmap_dev_zero=no | |
6861 | gcc_cv_func_mmap_anon=no | |
6862 | else | |
ba479fd2 NN |
6863 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
6864 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
6865 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
6866 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 6867 | else |
ba479fd2 | 6868 | # Add a system to this blacklist if |
1072ec3f ZW |
6869 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
6870 | # memory area containing the same data that you'd get if you applied | |
6871 | # read() to the same fd. The only system known to have a problem here | |
6872 | # is VMS, where text files have record structure. | |
6873 | case "$host_os" in | |
ba479fd2 | 6874 | vms* | ultrix*) |
1072ec3f ZW |
6875 | gcc_cv_func_mmap_file=no ;; |
6876 | *) | |
6877 | gcc_cv_func_mmap_file=yes;; | |
6878 | esac | |
6879 | fi | |
ba479fd2 NN |
6880 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
6881 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
6882 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
6883 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
6884 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
6885 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
6886 | else |
6887 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
6888 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
6889 | # zeroed pages with both the following properties: | |
6890 | # 1. If you map N consecutive pages in with one call, and then | |
6891 | # unmap any subset of those pages, the pages that were not | |
6892 | # explicitly unmapped remain accessible. | |
6893 | # 2. If you map two adjacent blocks of memory and then unmap them | |
6894 | # both at once, they must both go away. | |
6895 | # Systems known to be in this category are Windows (all variants), | |
6896 | # VMS, and Darwin. | |
6897 | case "$host_os" in | |
2ce240d3 | 6898 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
6899 | gcc_cv_func_mmap_dev_zero=no ;; |
6900 | *) | |
6901 | gcc_cv_func_mmap_dev_zero=yes;; | |
6902 | esac | |
6903 | fi | |
ba479fd2 NN |
6904 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
6905 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
6906 | |
6907 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
6908 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
6909 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
6910 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
6911 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6912 | else | |
6913 | cat >conftest.$ac_ext <<_ACEOF | |
6914 | #line $LINENO "configure" | |
6915 | /* confdefs.h. */ | |
6916 | _ACEOF | |
6917 | cat confdefs.h >>conftest.$ac_ext | |
6918 | cat >>conftest.$ac_ext <<_ACEOF | |
6919 | /* end confdefs.h. */ | |
1072ec3f ZW |
6920 | #include <sys/types.h> |
6921 | #include <sys/mman.h> | |
6922 | #include <unistd.h> | |
6923 | ||
6924 | #ifndef MAP_ANONYMOUS | |
6925 | #define MAP_ANONYMOUS MAP_ANON | |
6926 | #endif | |
6927 | ||
ba479fd2 NN |
6928 | int |
6929 | main () | |
6930 | { | |
1072ec3f | 6931 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
6932 | ; |
6933 | return 0; | |
6934 | } | |
6935 | _ACEOF | |
6936 | rm -f conftest.$ac_objext | |
6937 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6938 | (eval $ac_compile) 2>&5 | |
6939 | ac_status=$? | |
6940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6941 | (exit $ac_status); } && | |
6942 | { ac_try='test -s conftest.$ac_objext' | |
6943 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6944 | (eval $ac_try) 2>&5 | |
6945 | ac_status=$? | |
6946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6947 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
6948 | gcc_cv_decl_map_anon=yes |
6949 | else | |
ba479fd2 NN |
6950 | echo "$as_me: failed program was:" >&5 |
6951 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6952 | ||
6953 | gcc_cv_decl_map_anon=no | |
1072ec3f | 6954 | fi |
ba479fd2 | 6955 | rm -f conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 6956 | fi |
ba479fd2 NN |
6957 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
6958 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
6959 | |
6960 | if test $gcc_cv_decl_map_anon = no; then | |
6961 | gcc_cv_func_mmap_anon=no | |
6962 | else | |
ba479fd2 NN |
6963 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
6964 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
6965 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
6966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
6967 | else |
6968 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
6969 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
6970 | # doesn't give anonymous zeroed pages with the same properties listed | |
6971 | # above for use of /dev/zero. | |
6972 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
6973 | case "$host_os" in | |
6974 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
6975 | gcc_cv_func_mmap_anon=no ;; | |
6976 | *) | |
6977 | gcc_cv_func_mmap_anon=yes;; | |
6978 | esac | |
6979 | fi | |
ba479fd2 NN |
6980 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
6981 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
6982 | fi |
6983 | fi | |
6984 | ||
6985 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
6986 | |
6987 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 6988 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 6989 | _ACEOF |
1072ec3f ZW |
6990 | |
6991 | fi | |
6992 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
6993 | |
6994 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 6995 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 6996 | _ACEOF |
1072ec3f ZW |
6997 | |
6998 | fi | |
6999 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
7000 | |
7001 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 7002 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 7003 | _ACEOF |
1072ec3f ZW |
7004 | |
7005 | fi | |
7006 | ||
b27d2bd5 MK |
7007 | |
7008 | case "${host}" in | |
ee262b6f | 7009 | *-*-*vms*) |
ba479fd2 | 7010 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
7011 | # won't work, and it isn't easily adaptable. It makes more sense to |
7012 | # just force it. | |
7013 | ac_cv_func_vfork_works=yes | |
7014 | ;; | |
b27d2bd5 | 7015 | esac |
ba479fd2 NN |
7016 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
7017 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
7018 | if test "${ac_cv_type_pid_t+set}" = set; then | |
7019 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7020 | else | |
7021 | cat >conftest.$ac_ext <<_ACEOF | |
7022 | #line $LINENO "configure" | |
7023 | /* confdefs.h. */ | |
7024 | _ACEOF | |
7025 | cat confdefs.h >>conftest.$ac_ext | |
7026 | cat >>conftest.$ac_ext <<_ACEOF | |
7027 | /* end confdefs.h. */ | |
7028 | $ac_includes_default | |
7029 | int | |
7030 | main () | |
7031 | { | |
7032 | if ((pid_t *) 0) | |
7033 | return 0; | |
7034 | if (sizeof (pid_t)) | |
7035 | return 0; | |
7036 | ; | |
7037 | return 0; | |
7038 | } | |
7039 | _ACEOF | |
7040 | rm -f conftest.$ac_objext | |
7041 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7042 | (eval $ac_compile) 2>&5 | |
7043 | ac_status=$? | |
7044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7045 | (exit $ac_status); } && | |
7046 | { ac_try='test -s conftest.$ac_objext' | |
7047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7048 | (eval $ac_try) 2>&5 | |
7049 | ac_status=$? | |
7050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7051 | (exit $ac_status); }; }; then | |
cb65112a | 7052 | ac_cv_type_pid_t=yes |
c375c43b | 7053 | else |
ba479fd2 NN |
7054 | echo "$as_me: failed program was:" >&5 |
7055 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 7056 | |
ba479fd2 NN |
7057 | ac_cv_type_pid_t=no |
7058 | fi | |
7059 | rm -f conftest.$ac_objext conftest.$ac_ext | |
63cf211a | 7060 | fi |
ba479fd2 NN |
7061 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
7062 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
7063 | if test $ac_cv_type_pid_t = yes; then | |
7064 | : | |
7065 | else | |
7066 | ||
7067 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 7068 | #define pid_t int |
ba479fd2 | 7069 | _ACEOF |
c375c43b KG |
7070 | |
7071 | fi | |
7072 | ||
ba479fd2 NN |
7073 | |
7074 | ||
7075 | for ac_header in unistd.h vfork.h | |
7076 | do | |
7077 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
ca9bc441 | 7078 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
7079 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
7080 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
7081 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 7082 | else |
ca9bc441 | 7083 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7084 | #line $LINENO "configure" |
7085 | /* confdefs.h. */ | |
7086 | _ACEOF | |
7087 | cat confdefs.h >>conftest.$ac_ext | |
7088 | cat >>conftest.$ac_ext <<_ACEOF | |
7089 | /* end confdefs.h. */ | |
7090 | #include <$ac_header> | |
7091 | _ACEOF | |
7092 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7093 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7094 | ac_status=$? | |
7095 | grep -v '^ *+' conftest.er1 >conftest.err | |
7096 | rm -f conftest.er1 | |
7097 | cat conftest.err >&5 | |
7098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7099 | (exit $ac_status); } >/dev/null; then | |
7100 | if test -s conftest.err; then | |
7101 | ac_cpp_err=$ac_c_preproc_warn_flag | |
7102 | else | |
7103 | ac_cpp_err= | |
7104 | fi | |
093e61a6 | 7105 | else |
ba479fd2 NN |
7106 | ac_cpp_err=yes |
7107 | fi | |
7108 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 7109 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
7110 | else |
7111 | echo "$as_me: failed program was:" >&5 | |
7112 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7113 | ||
ca9bc441 | 7114 | eval "$as_ac_Header=no" |
ba479fd2 NN |
7115 | fi |
7116 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 7117 | fi |
ba479fd2 NN |
7118 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7119 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
7120 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
7121 | cat >>confdefs.h <<_ACEOF | |
7122 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7123 | _ACEOF | |
6e3f3080 NN |
7124 | |
7125 | fi | |
ba479fd2 NN |
7126 | done |
7127 | ||
7128 | ||
7129 | ||
7130 | for ac_func in fork vfork | |
7131 | do | |
7132 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
7133 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
7134 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
7135 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
7136 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7137 | else | |
7138 | cat >conftest.$ac_ext <<_ACEOF | |
7139 | #line $LINENO "configure" | |
7140 | /* confdefs.h. */ | |
7141 | _ACEOF | |
7142 | cat confdefs.h >>conftest.$ac_ext | |
7143 | cat >>conftest.$ac_ext <<_ACEOF | |
7144 | /* end confdefs.h. */ | |
c375c43b | 7145 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
7146 | which can conflict with char $ac_func (); below. |
7147 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
7148 | <limits.h> exists even on freestanding compilers. */ | |
7149 | #ifdef __STDC__ | |
7150 | # include <limits.h> | |
7151 | #else | |
7152 | # include <assert.h> | |
7153 | #endif | |
6e3f3080 | 7154 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
7155 | #ifdef __cplusplus |
7156 | extern "C" | |
7157 | { | |
7158 | #endif | |
6e3f3080 | 7159 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
7160 | builtin and then its argument prototype would still apply. */ |
7161 | char $ac_func (); | |
c375c43b KG |
7162 | /* The GNU C library defines this for functions which it implements |
7163 | to always fail with ENOSYS. Some functions are actually named | |
7164 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 7165 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
7166 | choke me |
7167 | #else | |
ba479fd2 NN |
7168 | char (*f) () = $ac_func; |
7169 | #endif | |
7170 | #ifdef __cplusplus | |
7171 | } | |
c375c43b KG |
7172 | #endif |
7173 | ||
ba479fd2 NN |
7174 | int |
7175 | main () | |
7176 | { | |
7177 | return f != $ac_func; | |
7178 | ; | |
7179 | return 0; | |
7180 | } | |
7181 | _ACEOF | |
7182 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7183 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7184 | (eval $ac_link) 2>&5 | |
7185 | ac_status=$? | |
7186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7187 | (exit $ac_status); } && | |
7188 | { ac_try='test -s conftest$ac_exeext' | |
7189 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7190 | (eval $ac_try) 2>&5 | |
7191 | ac_status=$? | |
7192 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7193 | (exit $ac_status); }; }; then | |
7194 | eval "$as_ac_var=yes" | |
7195 | else | |
7196 | echo "$as_me: failed program was:" >&5 | |
7197 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7198 | ||
7199 | eval "$as_ac_var=no" | |
7200 | fi | |
7201 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext | |
7202 | fi | |
7203 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
7204 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
7205 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
7206 | cat >>confdefs.h <<_ACEOF | |
7207 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
7208 | _ACEOF | |
7209 | ||
c375c43b | 7210 | fi |
ba479fd2 | 7211 | done |
c375c43b | 7212 | |
ba479fd2 NN |
7213 | if test "x$ac_cv_func_fork" = xyes; then |
7214 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
7215 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
7216 | if test "${ac_cv_func_fork_works+set}" = set; then | |
7217 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7218 | else |
ba479fd2 NN |
7219 | if test "$cross_compiling" = yes; then |
7220 | ac_cv_func_fork_works=cross | |
7221 | else | |
7222 | cat >conftest.$ac_ext <<_ACEOF | |
7223 | /* By Ruediger Kuhlmann. */ | |
7224 | #include <sys/types.h> | |
7225 | #if HAVE_UNISTD_H | |
7226 | # include <unistd.h> | |
7227 | #endif | |
7228 | /* Some systems only have a dummy stub for fork() */ | |
7229 | int main () | |
7230 | { | |
7231 | if (fork() < 0) | |
7232 | exit (1); | |
7233 | exit (0); | |
7234 | } | |
7235 | _ACEOF | |
7236 | rm -f conftest$ac_exeext | |
7237 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7238 | (eval $ac_link) 2>&5 | |
7239 | ac_status=$? | |
7240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7241 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7242 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7243 | (eval $ac_try) 2>&5 | |
7244 | ac_status=$? | |
7245 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7246 | (exit $ac_status); }; }; then | |
7247 | ac_cv_func_fork_works=yes | |
7248 | else | |
7249 | echo "$as_me: program exited with status $ac_status" >&5 | |
7250 | echo "$as_me: failed program was:" >&5 | |
7251 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7252 | ||
7253 | ( exit $ac_status ) | |
7254 | ac_cv_func_fork_works=no | |
7255 | fi | |
a6a5e4c9 | 7256 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
7257 | fi |
7258 | fi | |
7259 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
7260 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
7261 | ||
7262 | else | |
7263 | ac_cv_func_fork_works=$ac_cv_func_fork | |
7264 | fi | |
7265 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7266 | case $host in | |
7267 | *-*-amigaos* | *-*-msdosdjgpp*) | |
7268 | # Override, as these systems have only a dummy fork() stub | |
7269 | ac_cv_func_fork_works=no | |
7270 | ;; | |
7271 | *) | |
7272 | ac_cv_func_fork_works=yes | |
7273 | ;; | |
7274 | esac | |
7275 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
7276 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 7277 | fi |
c375c43b | 7278 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
7279 | if test "x$ac_cv_func_vfork" = xyes; then |
7280 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
7281 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
7282 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
7283 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 7284 | else |
ba479fd2 NN |
7285 | if test "$cross_compiling" = yes; then |
7286 | ac_cv_func_vfork_works=cross | |
7287 | else | |
7288 | cat >conftest.$ac_ext <<_ACEOF | |
7289 | #line $LINENO "configure" | |
7290 | /* confdefs.h. */ | |
7291 | _ACEOF | |
7292 | cat confdefs.h >>conftest.$ac_ext | |
7293 | cat >>conftest.$ac_ext <<_ACEOF | |
7294 | /* end confdefs.h. */ | |
c375c43b KG |
7295 | /* Thanks to Paul Eggert for this test. */ |
7296 | #include <stdio.h> | |
ba479fd2 | 7297 | #include <stdlib.h> |
c375c43b KG |
7298 | #include <sys/types.h> |
7299 | #include <sys/stat.h> | |
ba479fd2 NN |
7300 | #include <sys/wait.h> |
7301 | #if HAVE_UNISTD_H | |
7302 | # include <unistd.h> | |
c375c43b | 7303 | #endif |
ba479fd2 NN |
7304 | #if HAVE_VFORK_H |
7305 | # include <vfork.h> | |
c375c43b KG |
7306 | #endif |
7307 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
7308 | argument registers are propagated back to the parent. The compiler |
7309 | is told about this with #include <vfork.h>, but some compilers | |
7310 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
7311 | static variable whose address is put into a register that is | |
7312 | clobbered by the vfork. */ | |
7313 | static void | |
c375c43b KG |
7314 | #ifdef __cplusplus |
7315 | sparc_address_test (int arg) | |
ba479fd2 | 7316 | # else |
c375c43b KG |
7317 | sparc_address_test (arg) int arg; |
7318 | #endif | |
7319 | { | |
7320 | static pid_t child; | |
7321 | if (!child) { | |
7322 | child = vfork (); | |
7323 | if (child < 0) { | |
7324 | perror ("vfork"); | |
7325 | _exit(2); | |
7326 | } | |
7327 | if (!child) { | |
7328 | arg = getpid(); | |
7329 | write(-1, "", 0); | |
7330 | _exit (arg); | |
7331 | } | |
7332 | } | |
7333 | } | |
ba479fd2 NN |
7334 | |
7335 | int | |
7336 | main () | |
7337 | { | |
c375c43b KG |
7338 | pid_t parent = getpid (); |
7339 | pid_t child; | |
7340 | ||
ba479fd2 | 7341 | sparc_address_test (0); |
c375c43b KG |
7342 | |
7343 | child = vfork (); | |
7344 | ||
7345 | if (child == 0) { | |
ba479fd2 NN |
7346 | /* Here is another test for sparc vfork register problems. This |
7347 | test uses lots of local variables, at least as many local | |
7348 | variables as main has allocated so far including compiler | |
7349 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
7350 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
7351 | reuse the register of parent for one of the local variables, | |
7352 | since it will think that parent can't possibly be used any more | |
7353 | in this routine. Assigning to the local variable will thus | |
7354 | munge parent in the parent process. */ | |
c375c43b KG |
7355 | pid_t |
7356 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
7357 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
7358 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
7359 | use the same hardware register for all 8 local variables. */ | |
7360 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
7361 | || p != p5 || p != p6 || p != p7) | |
7362 | _exit(1); | |
7363 | ||
ba479fd2 NN |
7364 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
7365 | from child file descriptors. If the child closes a descriptor | |
7366 | before it execs or exits, this munges the parent's descriptor | |
7367 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
7368 | _exit(close(fileno(stdout)) != 0); |
7369 | } else { | |
7370 | int status; | |
7371 | struct stat st; | |
7372 | ||
7373 | while (wait(&status) != child) | |
7374 | ; | |
7375 | exit( | |
7376 | /* Was there some problem with vforking? */ | |
7377 | child < 0 | |
7378 | ||
7379 | /* Did the child fail? (This shouldn't happen.) */ | |
7380 | || status | |
7381 | ||
7382 | /* Did the vfork/compiler bug occur? */ | |
7383 | || parent != getpid() | |
7384 | ||
7385 | /* Did the file descriptor bug occur? */ | |
7386 | || fstat(fileno(stdout), &st) != 0 | |
7387 | ); | |
7388 | } | |
7389 | } | |
ba479fd2 NN |
7390 | _ACEOF |
7391 | rm -f conftest$ac_exeext | |
7392 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7393 | (eval $ac_link) 2>&5 | |
7394 | ac_status=$? | |
7395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7396 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
7397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7398 | (eval $ac_try) 2>&5 | |
7399 | ac_status=$? | |
7400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7401 | (exit $ac_status); }; }; then | |
c375c43b KG |
7402 | ac_cv_func_vfork_works=yes |
7403 | else | |
ba479fd2 NN |
7404 | echo "$as_me: program exited with status $ac_status" >&5 |
7405 | echo "$as_me: failed program was:" >&5 | |
7406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7407 | ||
7408 | ( exit $ac_status ) | |
7409 | ac_cv_func_vfork_works=no | |
cafe096b | 7410 | fi |
a6a5e4c9 | 7411 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 7412 | fi |
ba479fd2 NN |
7413 | fi |
7414 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
7415 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 7416 | |
ba479fd2 NN |
7417 | fi; |
7418 | if test "x$ac_cv_func_fork_works" = xcross; then | |
7419 | ac_cv_func_vfork_works=ac_cv_func_vfork | |
7420 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 | |
7421 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
7422 | fi |
7423 | ||
ba479fd2 NN |
7424 | if test "x$ac_cv_func_vfork_works" = xyes; then |
7425 | ||
7426 | cat >>confdefs.h <<\_ACEOF | |
7427 | #define HAVE_WORKING_VFORK 1 | |
7428 | _ACEOF | |
7429 | ||
7430 | else | |
7431 | ||
7432 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 7433 | #define vfork fork |
ba479fd2 | 7434 | _ACEOF |
c375c43b KG |
7435 | |
7436 | fi | |
ba479fd2 NN |
7437 | if test "x$ac_cv_func_fork_works" = xyes; then |
7438 | ||
7439 | cat >>confdefs.h <<\_ACEOF | |
7440 | #define HAVE_WORKING_FORK 1 | |
7441 | _ACEOF | |
7442 | ||
7443 | fi | |
7444 | ||
c375c43b | 7445 | |
81bf3d9e | 7446 | |
f91abfce | 7447 | |
b7f2fb96 | 7448 | am_cv_lib_iconv_ldpath= |
ba479fd2 NN |
7449 | |
7450 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
f91abfce TT |
7451 | if test "${with_libiconv_prefix+set}" = set; then |
7452 | withval="$with_libiconv_prefix" | |
ba479fd2 | 7453 | |
f91abfce TT |
7454 | for dir in `echo "$withval" | tr : ' '`; do |
7455 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 7456 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 7457 | done |
ba479fd2 NN |
7458 | |
7459 | fi; | |
f91abfce TT |
7460 | |
7461 | ||
ba479fd2 | 7462 | for ac_header in iconv.h |
eb158727 | 7463 | do |
ba479fd2 | 7464 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
ca9bc441 | 7465 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
7466 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
7467 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
7468 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 7469 | else |
ca9bc441 | 7470 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7471 | #line $LINENO "configure" |
7472 | /* confdefs.h. */ | |
7473 | _ACEOF | |
7474 | cat confdefs.h >>conftest.$ac_ext | |
7475 | cat >>conftest.$ac_ext <<_ACEOF | |
7476 | /* end confdefs.h. */ | |
7477 | #include <$ac_header> | |
7478 | _ACEOF | |
7479 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
7480 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
7481 | ac_status=$? | |
7482 | grep -v '^ *+' conftest.er1 >conftest.err | |
7483 | rm -f conftest.er1 | |
7484 | cat conftest.err >&5 | |
7485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7486 | (exit $ac_status); } >/dev/null; then | |
7487 | if test -s conftest.err; then | |
7488 | ac_cpp_err=$ac_c_preproc_warn_flag | |
7489 | else | |
7490 | ac_cpp_err= | |
7491 | fi | |
7492 | else | |
7493 | ac_cpp_err=yes | |
7494 | fi | |
7495 | if test -z "$ac_cpp_err"; then | |
ca9bc441 | 7496 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
7497 | else |
7498 | echo "$as_me: failed program was:" >&5 | |
7499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7500 | ||
ca9bc441 | 7501 | eval "$as_ac_Header=no" |
ba479fd2 NN |
7502 | fi |
7503 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 7504 | fi |
ba479fd2 NN |
7505 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
7506 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
7507 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
7508 | cat >>confdefs.h <<_ACEOF | |
7509 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
7510 | _ACEOF | |
7511 | ||
eb158727 ZW |
7512 | fi |
7513 | done | |
7514 | ||
7515 | ||
ba479fd2 NN |
7516 | echo "$as_me:$LINENO: checking for iconv" >&5 |
7517 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
7518 | if test "${am_cv_func_iconv+set}" = set; then | |
7519 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 7520 | else |
ba479fd2 | 7521 | |
f91abfce TT |
7522 | am_cv_func_iconv="no, consider installing GNU libiconv" |
7523 | am_cv_lib_iconv=no | |
ba479fd2 NN |
7524 | cat >conftest.$ac_ext <<_ACEOF |
7525 | #line $LINENO "configure" | |
7526 | /* confdefs.h. */ | |
7527 | _ACEOF | |
7528 | cat confdefs.h >>conftest.$ac_ext | |
7529 | cat >>conftest.$ac_ext <<_ACEOF | |
7530 | /* end confdefs.h. */ | |
f91abfce TT |
7531 | #include <stdlib.h> |
7532 | #include <iconv.h> | |
ba479fd2 NN |
7533 | int |
7534 | main () | |
7535 | { | |
f91abfce TT |
7536 | iconv_t cd = iconv_open("",""); |
7537 | iconv(cd,NULL,NULL,NULL,NULL); | |
7538 | iconv_close(cd); | |
ba479fd2 NN |
7539 | ; |
7540 | return 0; | |
7541 | } | |
7542 | _ACEOF | |
7543 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7544 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7545 | (eval $ac_link) 2>&5 | |
7546 | ac_status=$? | |
7547 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7548 | (exit $ac_status); } && | |
7549 | { ac_try='test -s conftest$ac_exeext' | |
7550 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7551 | (eval $ac_try) 2>&5 | |
7552 | ac_status=$? | |
7553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7554 | (exit $ac_status); }; }; then | |
f91abfce TT |
7555 | am_cv_func_iconv=yes |
7556 | else | |
ba479fd2 NN |
7557 | echo "$as_me: failed program was:" >&5 |
7558 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7559 | ||
f91abfce | 7560 | fi |
ba479fd2 | 7561 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
7562 | if test "$am_cv_func_iconv" != yes; then |
7563 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 7564 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
ba479fd2 NN |
7565 | cat >conftest.$ac_ext <<_ACEOF |
7566 | #line $LINENO "configure" | |
7567 | /* confdefs.h. */ | |
7568 | _ACEOF | |
7569 | cat confdefs.h >>conftest.$ac_ext | |
7570 | cat >>conftest.$ac_ext <<_ACEOF | |
7571 | /* end confdefs.h. */ | |
f91abfce TT |
7572 | #include <stdlib.h> |
7573 | #include <iconv.h> | |
ba479fd2 NN |
7574 | int |
7575 | main () | |
7576 | { | |
f91abfce TT |
7577 | iconv_t cd = iconv_open("",""); |
7578 | iconv(cd,NULL,NULL,NULL,NULL); | |
7579 | iconv_close(cd); | |
ba479fd2 NN |
7580 | ; |
7581 | return 0; | |
7582 | } | |
7583 | _ACEOF | |
7584 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7585 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7586 | (eval $ac_link) 2>&5 | |
7587 | ac_status=$? | |
7588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7589 | (exit $ac_status); } && | |
7590 | { ac_try='test -s conftest$ac_exeext' | |
7591 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7592 | (eval $ac_try) 2>&5 | |
7593 | ac_status=$? | |
7594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7595 | (exit $ac_status); }; }; then | |
f91abfce TT |
7596 | am_cv_lib_iconv=yes |
7597 | am_cv_func_iconv=yes | |
7598 | else | |
ba479fd2 NN |
7599 | echo "$as_me: failed program was:" >&5 |
7600 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7601 | ||
f91abfce | 7602 | fi |
ba479fd2 | 7603 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
7604 | LIBS="$am_save_LIBS" |
7605 | fi | |
6e3f3080 | 7606 | |
ba479fd2 NN |
7607 | fi |
7608 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
7609 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 7610 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
7611 | |
7612 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 7613 | #define HAVE_ICONV 1 |
ba479fd2 | 7614 | _ACEOF |
f91abfce | 7615 | |
ba479fd2 NN |
7616 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
7617 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
7618 | if test "${am_cv_proto_iconv+set}" = set; then | |
7619 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 7620 | else |
ba479fd2 NN |
7621 | |
7622 | cat >conftest.$ac_ext <<_ACEOF | |
7623 | #line $LINENO "configure" | |
7624 | /* confdefs.h. */ | |
7625 | _ACEOF | |
7626 | cat confdefs.h >>conftest.$ac_ext | |
7627 | cat >>conftest.$ac_ext <<_ACEOF | |
7628 | /* end confdefs.h. */ | |
f91abfce TT |
7629 | |
7630 | #include <stdlib.h> | |
7631 | #include <iconv.h> | |
7632 | extern | |
7633 | #ifdef __cplusplus | |
7634 | "C" | |
7635 | #endif | |
7636 | #if defined(__STDC__) || defined(__cplusplus) | |
7637 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
7638 | #else | |
7639 | size_t iconv(); | |
7640 | #endif | |
7641 | ||
ba479fd2 NN |
7642 | int |
7643 | main () | |
7644 | { | |
f91abfce | 7645 | |
ba479fd2 NN |
7646 | ; |
7647 | return 0; | |
7648 | } | |
7649 | _ACEOF | |
7650 | rm -f conftest.$ac_objext | |
7651 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7652 | (eval $ac_compile) 2>&5 | |
7653 | ac_status=$? | |
7654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7655 | (exit $ac_status); } && | |
7656 | { ac_try='test -s conftest.$ac_objext' | |
7657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7658 | (eval $ac_try) 2>&5 | |
7659 | ac_status=$? | |
7660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7661 | (exit $ac_status); }; }; then | |
f91abfce TT |
7662 | am_cv_proto_iconv_arg1="" |
7663 | else | |
ba479fd2 NN |
7664 | echo "$as_me: failed program was:" >&5 |
7665 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7666 | ||
7667 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 7668 | fi |
ba479fd2 | 7669 | rm -f conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
7670 | 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);" |
7671 | fi | |
7672 | ||
7673 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
7674 | echo "$as_me:$LINENO: result: ${ac_t:- |
7675 | }$am_cv_proto_iconv" >&5 | |
7676 | echo "${ECHO_T}${ac_t:- | |
7677 | }$am_cv_proto_iconv" >&6 | |
7678 | ||
7679 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 7680 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 7681 | _ACEOF |
f91abfce TT |
7682 | |
7683 | fi | |
7684 | LIBICONV= | |
7685 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 7686 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 7687 | fi |
ba479fd2 | 7688 | |
f91abfce | 7689 | |
56694dd9 ZW |
7690 | # Until we have in-tree GNU iconv: |
7691 | LIBICONV_DEP= | |
7692 | ||
7693 | ||
7694 | ||
ba479fd2 NN |
7695 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
7696 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
7697 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
7698 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
56694dd9 | 7699 | else |
ba479fd2 NN |
7700 | cat >conftest.$ac_ext <<_ACEOF |
7701 | #line $LINENO "configure" | |
7702 | /* confdefs.h. */ | |
7703 | _ACEOF | |
7704 | cat confdefs.h >>conftest.$ac_ext | |
7705 | cat >>conftest.$ac_ext <<_ACEOF | |
7706 | /* end confdefs.h. */ | |
56694dd9 | 7707 | #include <locale.h> |
ba479fd2 NN |
7708 | int |
7709 | main () | |
7710 | { | |
56694dd9 | 7711 | return LC_MESSAGES |
ba479fd2 NN |
7712 | ; |
7713 | return 0; | |
7714 | } | |
7715 | _ACEOF | |
7716 | rm -f conftest.$ac_objext conftest$ac_exeext | |
7717 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
7718 | (eval $ac_link) 2>&5 | |
7719 | ac_status=$? | |
7720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7721 | (exit $ac_status); } && | |
7722 | { ac_try='test -s conftest$ac_exeext' | |
7723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7724 | (eval $ac_try) 2>&5 | |
7725 | ac_status=$? | |
7726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7727 | (exit $ac_status); }; }; then | |
56694dd9 ZW |
7728 | am_cv_val_LC_MESSAGES=yes |
7729 | else | |
ba479fd2 NN |
7730 | echo "$as_me: failed program was:" >&5 |
7731 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7732 | ||
7733 | am_cv_val_LC_MESSAGES=no | |
56694dd9 | 7734 | fi |
ba479fd2 | 7735 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
56694dd9 | 7736 | fi |
ba479fd2 NN |
7737 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
7738 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
63cf211a | 7739 | if test $am_cv_val_LC_MESSAGES = yes; then |
ba479fd2 NN |
7740 | |
7741 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 7742 | #define HAVE_LC_MESSAGES 1 |
ba479fd2 | 7743 | _ACEOF |
56694dd9 ZW |
7744 | |
7745 | fi | |
7746 | ||
f91abfce | 7747 | |
86cf1cbd KG |
7748 | # We will need to find libiberty.h and ansidecl.h |
7749 | saved_CFLAGS="$CFLAGS" | |
7750 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 7751 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 7752 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
236ce4b2 | 7753 | fprintf_unlocked strstr errno snprintf vasprintf \ |
c1800ec8 | 7754 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 7755 | do |
f31e826b | 7756 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
ba479fd2 NN |
7757 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
7758 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
7759 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
7760 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7761 | else | |
7762 | cat >conftest.$ac_ext <<_ACEOF | |
7763 | #line $LINENO "configure" | |
7764 | /* confdefs.h. */ | |
7765 | _ACEOF | |
7766 | cat confdefs.h >>conftest.$ac_ext | |
7767 | cat >>conftest.$ac_ext <<_ACEOF | |
7768 | /* end confdefs.h. */ | |
7afe8c41 KG |
7769 | #undef $ac_tr_decl |
7770 | #define $ac_tr_decl 1 | |
ba479fd2 | 7771 | |
d02af173 | 7772 | #include "ansidecl.h" |
86cf1cbd | 7773 | #include "system.h" |
f31e826b | 7774 | |
ba479fd2 NN |
7775 | int |
7776 | main () | |
7777 | { | |
86cf1cbd KG |
7778 | #ifndef $ac_func |
7779 | char *(*pfn) = (char *(*)) $ac_func ; | |
7780 | #endif | |
ba479fd2 NN |
7781 | ; |
7782 | return 0; | |
7783 | } | |
7784 | _ACEOF | |
7785 | rm -f conftest.$ac_objext | |
7786 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7787 | (eval $ac_compile) 2>&5 | |
7788 | ac_status=$? | |
7789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7790 | (exit $ac_status); } && | |
7791 | { ac_try='test -s conftest.$ac_objext' | |
7792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7793 | (eval $ac_try) 2>&5 | |
7794 | ac_status=$? | |
7795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7796 | (exit $ac_status); }; }; then | |
f31e826b | 7797 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 7798 | else |
ba479fd2 NN |
7799 | echo "$as_me: failed program was:" >&5 |
7800 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7801 | ||
7802 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 7803 | fi |
ba479fd2 | 7804 | rm -f conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
7805 | fi |
7806 | ||
f31e826b | 7807 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
7808 | echo "$as_me:$LINENO: result: yes" >&5 |
7809 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 7810 | #define $ac_tr_decl 1 |
ba479fd2 NN |
7811 | _ACEOF |
7812 | ||
81bf3d9e | 7813 | else |
ba479fd2 NN |
7814 | echo "$as_me:$LINENO: result: no" >&5 |
7815 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 7816 | #define $ac_tr_decl 0 |
ba479fd2 NN |
7817 | _ACEOF |
7818 | ||
81bf3d9e RH |
7819 | fi |
7820 | ||
7821 | done | |
86cf1cbd | 7822 | if test x = y ; then |
ba479fd2 NN |
7823 | |
7824 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7825 | #define HAVE_DECL_GETENV 1 |
ba479fd2 NN |
7826 | _ACEOF |
7827 | ||
7828 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7829 | #define HAVE_DECL_ATOL 1 |
ba479fd2 NN |
7830 | _ACEOF |
7831 | ||
7832 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7833 | #define HAVE_DECL_SBRK 1 |
ba479fd2 NN |
7834 | _ACEOF |
7835 | ||
7836 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7837 | #define HAVE_DECL_ABORT 1 |
ba479fd2 NN |
7838 | _ACEOF |
7839 | ||
7840 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7841 | #define HAVE_DECL_ATOF 1 |
ba479fd2 NN |
7842 | _ACEOF |
7843 | ||
7844 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7845 | #define HAVE_DECL_GETCWD 1 |
ba479fd2 NN |
7846 | _ACEOF |
7847 | ||
7848 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7849 | #define HAVE_DECL_GETWD 1 |
ba479fd2 | 7850 | _ACEOF |
86cf1cbd | 7851 | \ |
ba479fd2 NN |
7852 | |
7853 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7854 | #define HAVE_DECL_STRSIGNAL 1 |
ba479fd2 NN |
7855 | _ACEOF |
7856 | ||
7857 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7858 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
ba479fd2 NN |
7859 | _ACEOF |
7860 | ||
7861 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7862 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
ba479fd2 NN |
7863 | _ACEOF |
7864 | ||
7865 | cat >>confdefs.h <<\_ACEOF | |
3b681e9d | 7866 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
ba479fd2 | 7867 | _ACEOF |
3b681e9d | 7868 | \ |
ba479fd2 NN |
7869 | |
7870 | cat >>confdefs.h <<\_ACEOF | |
3b681e9d | 7871 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
ba479fd2 NN |
7872 | _ACEOF |
7873 | ||
7874 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7875 | #define HAVE_DECL_STRSTR 1 |
ba479fd2 NN |
7876 | _ACEOF |
7877 | ||
7878 | cat >>confdefs.h <<\_ACEOF | |
6c889b67 | 7879 | #define HAVE_DECL_ERRNO 1 |
ba479fd2 NN |
7880 | _ACEOF |
7881 | ||
7882 | cat >>confdefs.h <<\_ACEOF | |
236ce4b2 | 7883 | #define HAVE_DECL_SNPRINTF 1 |
ba479fd2 NN |
7884 | _ACEOF |
7885 | ||
7886 | cat >>confdefs.h <<\_ACEOF | |
a7475ab1 | 7887 | #define HAVE_DECL_VASPRINTF 1 |
ba479fd2 | 7888 | _ACEOF |
86cf1cbd | 7889 | \ |
ba479fd2 NN |
7890 | |
7891 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7892 | #define HAVE_DECL_MALLOC 1 |
ba479fd2 NN |
7893 | _ACEOF |
7894 | ||
7895 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7896 | #define HAVE_DECL_REALLOC 1 |
ba479fd2 NN |
7897 | _ACEOF |
7898 | ||
7899 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7900 | #define HAVE_DECL_CALLOC 1 |
ba479fd2 NN |
7901 | _ACEOF |
7902 | ||
7903 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7904 | #define HAVE_DECL_FREE 1 |
ba479fd2 NN |
7905 | _ACEOF |
7906 | ||
7907 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7908 | #define HAVE_DECL_BASENAME 1 |
ba479fd2 NN |
7909 | _ACEOF |
7910 | ||
7911 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7912 | #define HAVE_DECL_GETOPT 1 |
ba479fd2 NN |
7913 | _ACEOF |
7914 | ||
7915 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 7916 | #define HAVE_DECL_CLOCK 1 |
ba479fd2 | 7917 | _ACEOF |
81bf3d9e RH |
7918 | fi |
7919 | ||
81bf3d9e RH |
7920 | |
7921 | for ac_func in getrlimit setrlimit getrusage | |
7922 | do | |
f31e826b | 7923 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
ba479fd2 NN |
7924 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
7925 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
7926 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
7927 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7928 | else | |
7929 | cat >conftest.$ac_ext <<_ACEOF | |
7930 | #line $LINENO "configure" | |
7931 | /* confdefs.h. */ | |
7932 | _ACEOF | |
7933 | cat confdefs.h >>conftest.$ac_ext | |
7934 | cat >>conftest.$ac_ext <<_ACEOF | |
7935 | /* end confdefs.h. */ | |
7afe8c41 KG |
7936 | #undef $ac_tr_decl |
7937 | #define $ac_tr_decl 1 | |
ba479fd2 | 7938 | |
d02af173 | 7939 | #include "ansidecl.h" |
86cf1cbd | 7940 | #include "system.h" |
81bf3d9e RH |
7941 | #ifdef HAVE_SYS_RESOURCE_H |
7942 | #include <sys/resource.h> | |
7943 | #endif | |
7944 | ||
f31e826b | 7945 | |
ba479fd2 NN |
7946 | int |
7947 | main () | |
7948 | { | |
86cf1cbd KG |
7949 | #ifndef $ac_func |
7950 | char *(*pfn) = (char *(*)) $ac_func ; | |
7951 | #endif | |
ba479fd2 NN |
7952 | ; |
7953 | return 0; | |
7954 | } | |
7955 | _ACEOF | |
7956 | rm -f conftest.$ac_objext | |
7957 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
7958 | (eval $ac_compile) 2>&5 | |
7959 | ac_status=$? | |
7960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7961 | (exit $ac_status); } && | |
7962 | { ac_try='test -s conftest.$ac_objext' | |
7963 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7964 | (eval $ac_try) 2>&5 | |
7965 | ac_status=$? | |
7966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7967 | (exit $ac_status); }; }; then | |
f31e826b | 7968 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 7969 | else |
ba479fd2 NN |
7970 | echo "$as_me: failed program was:" >&5 |
7971 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7972 | ||
7973 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 7974 | fi |
ba479fd2 | 7975 | rm -f conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
7976 | fi |
7977 | ||
f31e826b | 7978 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
7979 | echo "$as_me:$LINENO: result: yes" >&5 |
7980 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 7981 | #define $ac_tr_decl 1 |
ba479fd2 NN |
7982 | _ACEOF |
7983 | ||
81bf3d9e | 7984 | else |
ba479fd2 NN |
7985 | echo "$as_me:$LINENO: result: no" >&5 |
7986 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 7987 | #define $ac_tr_decl 0 |
ba479fd2 NN |
7988 | _ACEOF |
7989 | ||
81bf3d9e RH |
7990 | fi |
7991 | ||
7992 | done | |
86cf1cbd | 7993 | if test x = y ; then |
ba479fd2 NN |
7994 | |
7995 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 7996 | #define HAVE_DECL_GETRLIMIT 1 |
ba479fd2 NN |
7997 | _ACEOF |
7998 | ||
7999 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 8000 | #define HAVE_DECL_SETRLIMIT 1 |
ba479fd2 NN |
8001 | _ACEOF |
8002 | ||
8003 | cat >>confdefs.h <<\_ACEOF | |
f31e826b | 8004 | #define HAVE_DECL_GETRUSAGE 1 |
ba479fd2 | 8005 | _ACEOF |
86cf1cbd KG |
8006 | fi |
8007 | ||
81bf3d9e | 8008 | |
ba479fd2 NN |
8009 | cat >conftest.$ac_ext <<_ACEOF |
8010 | #line $LINENO "configure" | |
8011 | /* confdefs.h. */ | |
8012 | _ACEOF | |
8013 | cat confdefs.h >>conftest.$ac_ext | |
8014 | cat >>conftest.$ac_ext <<_ACEOF | |
8015 | /* end confdefs.h. */ | |
b2522d2b HPN |
8016 | |
8017 | #include "ansidecl.h" | |
8018 | #include "system.h" | |
8019 | #ifdef HAVE_SYS_RESOURCE_H | |
8020 | #include <sys/resource.h> | |
8021 | #endif | |
8022 | ||
ba479fd2 NN |
8023 | int |
8024 | main () | |
8025 | { | |
b2522d2b | 8026 | rlim_t l = 0; |
ba479fd2 NN |
8027 | ; |
8028 | return 0; | |
8029 | } | |
8030 | _ACEOF | |
8031 | rm -f conftest.$ac_objext | |
8032 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8033 | (eval $ac_compile) 2>&5 | |
8034 | ac_status=$? | |
8035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8036 | (exit $ac_status); } && | |
8037 | { ac_try='test -s conftest.$ac_objext' | |
8038 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8039 | (eval $ac_try) 2>&5 | |
8040 | ac_status=$? | |
8041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8042 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
8043 | : |
8044 | else | |
ba479fd2 NN |
8045 | echo "$as_me: failed program was:" >&5 |
8046 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8047 | ||
8048 | ||
8049 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 8050 | #define rlim_t long |
ba479fd2 | 8051 | _ACEOF |
b2522d2b HPN |
8052 | |
8053 | fi | |
ba479fd2 | 8054 | rm -f conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 8055 | |
351df804 | 8056 | for ac_func in ldgetname |
c1800ec8 ZW |
8057 | do |
8058 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
ba479fd2 NN |
8059 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8060 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8061 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8062 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8063 | else | |
8064 | cat >conftest.$ac_ext <<_ACEOF | |
8065 | #line $LINENO "configure" | |
8066 | /* confdefs.h. */ | |
8067 | _ACEOF | |
8068 | cat confdefs.h >>conftest.$ac_ext | |
8069 | cat >>conftest.$ac_ext <<_ACEOF | |
8070 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8071 | #undef $ac_tr_decl |
8072 | #define $ac_tr_decl 1 | |
ba479fd2 | 8073 | |
351df804 KG |
8074 | #include "ansidecl.h" |
8075 | #include "system.h" | |
8076 | #ifdef HAVE_LDFCN_H | |
8077 | #include <ldfcn.h> | |
8078 | #endif | |
8079 | ||
8080 | ||
ba479fd2 NN |
8081 | int |
8082 | main () | |
8083 | { | |
351df804 KG |
8084 | #ifndef $ac_func |
8085 | char *(*pfn) = (char *(*)) $ac_func ; | |
8086 | #endif | |
ba479fd2 NN |
8087 | ; |
8088 | return 0; | |
8089 | } | |
8090 | _ACEOF | |
8091 | rm -f conftest.$ac_objext | |
8092 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8093 | (eval $ac_compile) 2>&5 | |
8094 | ac_status=$? | |
8095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8096 | (exit $ac_status); } && | |
8097 | { ac_try='test -s conftest.$ac_objext' | |
8098 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8099 | (eval $ac_try) 2>&5 | |
8100 | ac_status=$? | |
8101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8102 | (exit $ac_status); }; }; then | |
351df804 KG |
8103 | eval "gcc_cv_have_decl_$ac_func=yes" |
8104 | else | |
ba479fd2 NN |
8105 | echo "$as_me: failed program was:" >&5 |
8106 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8107 | ||
8108 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 8109 | fi |
ba479fd2 | 8110 | rm -f conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
8111 | fi |
8112 | ||
8113 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8114 | echo "$as_me:$LINENO: result: yes" >&5 |
8115 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8116 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8117 | _ACEOF |
8118 | ||
351df804 | 8119 | else |
ba479fd2 NN |
8120 | echo "$as_me:$LINENO: result: no" >&5 |
8121 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 8122 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8123 | _ACEOF |
8124 | ||
351df804 KG |
8125 | fi |
8126 | ||
8127 | done | |
8128 | if test x = y ; then | |
ba479fd2 NN |
8129 | |
8130 | cat >>confdefs.h <<\_ACEOF | |
351df804 | 8131 | #define HAVE_DECL_LDGETNAME 1 |
ba479fd2 | 8132 | _ACEOF |
351df804 KG |
8133 | fi |
8134 | ||
8135 | ||
8136 | for ac_func in times | |
8137 | do | |
8138 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
ba479fd2 NN |
8139 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
8140 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
8141 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
8142 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8143 | else | |
8144 | cat >conftest.$ac_ext <<_ACEOF | |
8145 | #line $LINENO "configure" | |
8146 | /* confdefs.h. */ | |
8147 | _ACEOF | |
8148 | cat confdefs.h >>conftest.$ac_ext | |
8149 | cat >>conftest.$ac_ext <<_ACEOF | |
8150 | /* end confdefs.h. */ | |
351df804 KG |
8151 | #undef $ac_tr_decl |
8152 | #define $ac_tr_decl 1 | |
ba479fd2 | 8153 | |
c1800ec8 ZW |
8154 | #include "ansidecl.h" |
8155 | #include "system.h" | |
8156 | #ifdef HAVE_SYS_TIMES_H | |
8157 | #include <sys/times.h> | |
8158 | #endif | |
8159 | ||
8160 | ||
ba479fd2 NN |
8161 | int |
8162 | main () | |
8163 | { | |
c1800ec8 ZW |
8164 | #ifndef $ac_func |
8165 | char *(*pfn) = (char *(*)) $ac_func ; | |
8166 | #endif | |
ba479fd2 NN |
8167 | ; |
8168 | return 0; | |
8169 | } | |
8170 | _ACEOF | |
8171 | rm -f conftest.$ac_objext | |
8172 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8173 | (eval $ac_compile) 2>&5 | |
8174 | ac_status=$? | |
8175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8176 | (exit $ac_status); } && | |
8177 | { ac_try='test -s conftest.$ac_objext' | |
8178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8179 | (eval $ac_try) 2>&5 | |
8180 | ac_status=$? | |
8181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8182 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8183 | eval "gcc_cv_have_decl_$ac_func=yes" |
8184 | else | |
ba479fd2 NN |
8185 | echo "$as_me: failed program was:" >&5 |
8186 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8187 | ||
8188 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 8189 | fi |
ba479fd2 | 8190 | rm -f conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
8191 | fi |
8192 | ||
8193 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
8194 | echo "$as_me:$LINENO: result: yes" >&5 |
8195 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8196 | #define $ac_tr_decl 1 |
ba479fd2 NN |
8197 | _ACEOF |
8198 | ||
c1800ec8 | 8199 | else |
ba479fd2 NN |
8200 | echo "$as_me:$LINENO: result: no" >&5 |
8201 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 8202 | #define $ac_tr_decl 0 |
ba479fd2 NN |
8203 | _ACEOF |
8204 | ||
c1800ec8 ZW |
8205 | fi |
8206 | ||
8207 | done | |
8208 | if test x = y ; then | |
ba479fd2 NN |
8209 | |
8210 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8211 | #define HAVE_DECL_TIMES 1 |
ba479fd2 | 8212 | _ACEOF |
c1800ec8 ZW |
8213 | fi |
8214 | ||
8215 | ||
8216 | # More time-related stuff. | |
ba479fd2 NN |
8217 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
8218 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
8219 | if test "${ac_cv_struct_tms+set}" = set; then | |
8220 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8221 | else | |
8222 | ||
8223 | cat >conftest.$ac_ext <<_ACEOF | |
8224 | #line $LINENO "configure" | |
8225 | /* confdefs.h. */ | |
8226 | _ACEOF | |
8227 | cat confdefs.h >>conftest.$ac_ext | |
8228 | cat >>conftest.$ac_ext <<_ACEOF | |
8229 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8230 | |
8231 | #include "ansidecl.h" | |
8232 | #include "system.h" | |
8233 | #ifdef HAVE_SYS_TIMES_H | |
8234 | #include <sys/times.h> | |
8235 | #endif | |
8236 | ||
ba479fd2 NN |
8237 | int |
8238 | main () | |
8239 | { | |
c1800ec8 | 8240 | struct tms tms; |
ba479fd2 NN |
8241 | ; |
8242 | return 0; | |
8243 | } | |
8244 | _ACEOF | |
8245 | rm -f conftest.$ac_objext | |
8246 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8247 | (eval $ac_compile) 2>&5 | |
8248 | ac_status=$? | |
8249 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8250 | (exit $ac_status); } && | |
8251 | { ac_try='test -s conftest.$ac_objext' | |
8252 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8253 | (eval $ac_try) 2>&5 | |
8254 | ac_status=$? | |
8255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8256 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8257 | ac_cv_struct_tms=yes |
8258 | else | |
ba479fd2 NN |
8259 | echo "$as_me: failed program was:" >&5 |
8260 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8261 | ||
8262 | ac_cv_struct_tms=no | |
c1800ec8 | 8263 | fi |
ba479fd2 | 8264 | rm -f conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8265 | fi |
ba479fd2 NN |
8266 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
8267 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 8268 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
8269 | |
8270 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8271 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 8272 | _ACEOF |
c1800ec8 ZW |
8273 | |
8274 | fi | |
8275 | ||
8276 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
8277 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
8278 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
8279 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
8280 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
8281 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8282 | else | |
8283 | ||
8284 | cat >conftest.$ac_ext <<_ACEOF | |
8285 | #line $LINENO "configure" | |
8286 | /* confdefs.h. */ | |
8287 | _ACEOF | |
8288 | cat confdefs.h >>conftest.$ac_ext | |
8289 | cat >>conftest.$ac_ext <<_ACEOF | |
8290 | /* end confdefs.h. */ | |
c1800ec8 ZW |
8291 | |
8292 | #include "ansidecl.h" | |
8293 | #include "system.h" | |
8294 | ||
ba479fd2 NN |
8295 | int |
8296 | main () | |
8297 | { | |
c1800ec8 | 8298 | clock_t x; |
ba479fd2 NN |
8299 | ; |
8300 | return 0; | |
8301 | } | |
8302 | _ACEOF | |
8303 | rm -f conftest.$ac_objext | |
8304 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8305 | (eval $ac_compile) 2>&5 | |
8306 | ac_status=$? | |
8307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8308 | (exit $ac_status); } && | |
8309 | { ac_try='test -s conftest.$ac_objext' | |
8310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8311 | (eval $ac_try) 2>&5 | |
8312 | ac_status=$? | |
8313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8314 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
8315 | gcc_cv_type_clock_t=yes |
8316 | else | |
ba479fd2 NN |
8317 | echo "$as_me: failed program was:" >&5 |
8318 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8319 | ||
8320 | gcc_cv_type_clock_t=no | |
c1800ec8 | 8321 | fi |
ba479fd2 | 8322 | rm -f conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 8323 | fi |
ba479fd2 NN |
8324 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
8325 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 8326 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
8327 | |
8328 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 8329 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 8330 | _ACEOF |
c1800ec8 ZW |
8331 | |
8332 | fi | |
8333 | ||
ba479fd2 NN |
8334 | echo "$as_me:$LINENO: checking for uchar" >&5 |
8335 | echo $ECHO_N "checking for uchar... $ECHO_C" >&6 | |
8336 | if test "${gcc_cv_type_uchar+set}" = set; then | |
8337 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
a12b5bd9 | 8338 | else |
ba479fd2 NN |
8339 | cat >conftest.$ac_ext <<_ACEOF |
8340 | #line $LINENO "configure" | |
8341 | /* confdefs.h. */ | |
8342 | _ACEOF | |
8343 | cat confdefs.h >>conftest.$ac_ext | |
8344 | cat >>conftest.$ac_ext <<_ACEOF | |
8345 | /* end confdefs.h. */ | |
a12b5bd9 ZW |
8346 | |
8347 | #include "ansidecl.h" | |
8348 | #include "system.h" | |
8349 | ||
ba479fd2 NN |
8350 | int |
8351 | main () | |
8352 | { | |
a12b5bd9 ZW |
8353 | if ((uchar *)0) return 0; |
8354 | if (sizeof(uchar)) return 0; | |
ba479fd2 NN |
8355 | ; |
8356 | return 0; | |
8357 | } | |
8358 | _ACEOF | |
8359 | rm -f conftest.$ac_objext | |
8360 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8361 | (eval $ac_compile) 2>&5 | |
8362 | ac_status=$? | |
8363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8364 | (exit $ac_status); } && | |
8365 | { ac_try='test -s conftest.$ac_objext' | |
8366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8367 | (eval $ac_try) 2>&5 | |
8368 | ac_status=$? | |
8369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8370 | (exit $ac_status); }; }; then | |
a12b5bd9 ZW |
8371 | ac_cv_type_uchar=yes |
8372 | else | |
ba479fd2 NN |
8373 | echo "$as_me: failed program was:" >&5 |
8374 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8375 | ||
8376 | ac_cv_type_uchar=no | |
a12b5bd9 | 8377 | fi |
ba479fd2 | 8378 | rm -f conftest.$ac_objext conftest.$ac_ext |
a12b5bd9 | 8379 | fi |
ba479fd2 NN |
8380 | echo "$as_me:$LINENO: result: $gcc_cv_type_uchar" >&5 |
8381 | echo "${ECHO_T}$gcc_cv_type_uchar" >&6 | |
63cf211a | 8382 | if test $ac_cv_type_uchar = yes; then |
ba479fd2 NN |
8383 | |
8384 | cat >>confdefs.h <<\_ACEOF | |
a12b5bd9 | 8385 | #define HAVE_UCHAR 1 |
ba479fd2 | 8386 | _ACEOF |
a12b5bd9 ZW |
8387 | |
8388 | fi | |
8389 | ||
eb70d86d AS |
8390 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
8391 | CFLAGS="$saved_CFLAGS" | |
8392 | ||
07cf4226 DM |
8393 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
8394 | if test "${enable_initfini_array+set}" = set; then | |
8395 | enableval="$enable_initfini_array" | |
ba479fd2 | 8396 | |
07cf4226 | 8397 | else |
ba479fd2 NN |
8398 | |
8399 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
8400 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
8401 | if test "${gcc_cv_initfini_array+set}" = set; then | |
8402 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 8403 | else |
eb70d86d | 8404 | if test "$cross_compiling" = yes; then |
918c4fe4 | 8405 | gcc_cv_initfini_array=no |
eb70d86d | 8406 | else |
ba479fd2 NN |
8407 | cat >conftest.$ac_ext <<_ACEOF |
8408 | #line $LINENO "configure" | |
8409 | /* confdefs.h. */ | |
8410 | _ACEOF | |
8411 | cat confdefs.h >>conftest.$ac_ext | |
8412 | cat >>conftest.$ac_ext <<_ACEOF | |
8413 | /* end confdefs.h. */ | |
eb70d86d | 8414 | |
07cf4226 DM |
8415 | static int x = -1; |
8416 | int main (void) { return x; } | |
8417 | int foo (void) { x = 0; } | |
8418 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
8419 | _ACEOF |
8420 | rm -f conftest$ac_exeext | |
8421 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8422 | (eval $ac_link) 2>&5 | |
8423 | ac_status=$? | |
8424 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8425 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8426 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8427 | (eval $ac_try) 2>&5 | |
8428 | ac_status=$? | |
8429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8430 | (exit $ac_status); }; }; then | |
918c4fe4 | 8431 | gcc_cv_initfini_array=yes |
eb70d86d | 8432 | else |
ba479fd2 NN |
8433 | echo "$as_me: program exited with status $ac_status" >&5 |
8434 | echo "$as_me: failed program was:" >&5 | |
8435 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8436 | ||
8437 | ( exit $ac_status ) | |
8438 | gcc_cv_initfini_array=no | |
eb70d86d | 8439 | fi |
a6a5e4c9 | 8440 | rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 8441 | fi |
07cf4226 | 8442 | fi |
ba479fd2 NN |
8443 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
8444 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 8445 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 8446 | |
ba479fd2 | 8447 | fi; |
63cf211a | 8448 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
8449 | |
8450 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 8451 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 8452 | _ACEOF |
07cf4226 | 8453 | |
eb70d86d | 8454 | fi |
81bf3d9e | 8455 | |
ba479fd2 NN |
8456 | # mkdir takes a single argument on some systems. |
8457 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
8458 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
8459 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
8460 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 8461 | else |
ba479fd2 NN |
8462 | cat >conftest.$ac_ext <<_ACEOF |
8463 | #line $LINENO "configure" | |
8464 | /* confdefs.h. */ | |
8465 | _ACEOF | |
8466 | cat confdefs.h >>conftest.$ac_ext | |
8467 | cat >>conftest.$ac_ext <<_ACEOF | |
8468 | /* end confdefs.h. */ | |
75923b2f MK |
8469 | |
8470 | #include <sys/types.h> | |
8471 | #ifdef HAVE_SYS_STAT_H | |
8472 | # include <sys/stat.h> | |
8473 | #endif | |
8474 | #ifdef HAVE_UNISTD_H | |
8475 | # include <unistd.h> | |
8476 | #endif | |
8477 | #ifdef HAVE_DIRECT_H | |
8478 | # include <direct.h> | |
8479 | #endif | |
ba479fd2 NN |
8480 | int |
8481 | main () | |
8482 | { | |
75923b2f | 8483 | mkdir ("foo", 0); |
ba479fd2 NN |
8484 | ; |
8485 | return 0; | |
8486 | } | |
8487 | _ACEOF | |
8488 | rm -f conftest.$ac_objext | |
8489 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8490 | (eval $ac_compile) 2>&5 | |
8491 | ac_status=$? | |
8492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8493 | (exit $ac_status); } && | |
8494 | { ac_try='test -s conftest.$ac_objext' | |
8495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8496 | (eval $ac_try) 2>&5 | |
8497 | ac_status=$? | |
8498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8499 | (exit $ac_status); }; }; then | |
75923b2f MK |
8500 | gcc_cv_mkdir_takes_one_arg=no |
8501 | else | |
ba479fd2 NN |
8502 | echo "$as_me: failed program was:" >&5 |
8503 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8504 | ||
8505 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 8506 | fi |
ba479fd2 | 8507 | rm -f conftest.$ac_objext conftest.$ac_ext |
75923b2f | 8508 | fi |
ba479fd2 NN |
8509 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
8510 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 8511 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
8512 | |
8513 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 8514 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 8515 | _ACEOF |
75923b2f MK |
8516 | |
8517 | fi | |
8518 | ||
8519 | ||
861bb6c1 JL |
8520 | # File extensions |
8521 | manext='.1' | |
8522 | objext='.o' | |
8523 | ||
8524 | ||
8525 | ||
4977bab6 ZW |
8526 | # With Setjmp/Longjmp based exception handling. |
8527 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
8528 | if test "${enable_sjlj_exceptions+set}" = set; then | |
8529 | enableval="$enable_sjlj_exceptions" | |
8530 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 8531 | |
ba479fd2 NN |
8532 | cat >>confdefs.h <<_ACEOF |
8533 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
8534 | _ACEOF | |
4977bab6 | 8535 | |
ba479fd2 | 8536 | fi; |
4977bab6 | 8537 | |
c6c51600 | 8538 | if test x$host = x$target; then |
ba479fd2 NN |
8539 | echo "$as_me:$LINENO: checking for main in -lunwind" >&5 |
8540 | echo $ECHO_N "checking for main in -lunwind... $ECHO_C" >&6 | |
8541 | if test "${ac_cv_lib_unwind_main+set}" = set; then | |
8542 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4977bab6 | 8543 | else |
ba479fd2 | 8544 | ac_check_lib_save_LIBS=$LIBS |
4977bab6 | 8545 | LIBS="-lunwind $LIBS" |
ba479fd2 NN |
8546 | cat >conftest.$ac_ext <<_ACEOF |
8547 | #line $LINENO "configure" | |
8548 | /* confdefs.h. */ | |
8549 | _ACEOF | |
8550 | cat confdefs.h >>conftest.$ac_ext | |
8551 | cat >>conftest.$ac_ext <<_ACEOF | |
8552 | /* end confdefs.h. */ | |
4977bab6 | 8553 | |
4977bab6 | 8554 | |
ba479fd2 NN |
8555 | int |
8556 | main () | |
8557 | { | |
8558 | main (); | |
8559 | ; | |
8560 | return 0; | |
8561 | } | |
8562 | _ACEOF | |
8563 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8564 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8565 | (eval $ac_link) 2>&5 | |
8566 | ac_status=$? | |
8567 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8568 | (exit $ac_status); } && | |
8569 | { ac_try='test -s conftest$ac_exeext' | |
8570 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8571 | (eval $ac_try) 2>&5 | |
8572 | ac_status=$? | |
8573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8574 | (exit $ac_status); }; }; then | |
8575 | ac_cv_lib_unwind_main=yes | |
8576 | else | |
8577 | echo "$as_me: failed program was:" >&5 | |
8578 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8579 | ||
8580 | ac_cv_lib_unwind_main=no | |
8581 | fi | |
8582 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext | |
8583 | LIBS=$ac_check_lib_save_LIBS | |
8584 | fi | |
8585 | echo "$as_me:$LINENO: result: $ac_cv_lib_unwind_main" >&5 | |
8586 | echo "${ECHO_T}$ac_cv_lib_unwind_main" >&6 | |
8587 | if test $ac_cv_lib_unwind_main = yes; then | |
4977bab6 ZW |
8588 | use_libunwind_default=yes |
8589 | else | |
ba479fd2 | 8590 | use_libunwind_default=no |
4977bab6 ZW |
8591 | fi |
8592 | ||
c6c51600 AS |
8593 | else |
8594 | use_libunwind_default=no | |
8595 | fi | |
4977bab6 ZW |
8596 | # Use libunwind based exception handling. |
8597 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
8598 | if test "${enable_libunwind_exceptions+set}" = set; then | |
8599 | enableval="$enable_libunwind_exceptions" | |
8600 | use_libunwind_exceptions=$enableval | |
8601 | else | |
8602 | use_libunwind_exceptions=$use_libunwind_default | |
ba479fd2 | 8603 | fi; |
63cf211a | 8604 | if test x"$use_libunwind_exceptions" = xyes; then |
ba479fd2 NN |
8605 | |
8606 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8607 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
ba479fd2 | 8608 | _ACEOF |
4977bab6 ZW |
8609 | |
8610 | fi | |
8611 | ||
34a86c2b NN |
8612 | # -------------------------------------------------------- |
8613 | # Build, host, and target specific configuration fragments | |
8614 | # -------------------------------------------------------- | |
8615 | ||
5b28c537 NN |
8616 | # Collect build-machine-specific information. |
8617 | . ${srcdir}/config.build | |
8618 | ||
a89ea0df NN |
8619 | # Collect host-machine-specific information. |
8620 | . ${srcdir}/config.host | |
8621 | ||
ef69da62 | 8622 | target_gtfiles= |
a89ea0df NN |
8623 | |
8624 | # Collect target-machine-specific information. | |
8ad9fb33 | 8625 | . ${srcdir}/config.gcc |
861bb6c1 JL |
8626 | |
8627 | extra_objs="${host_extra_objs} ${extra_objs}" | |
8628 | ||
8629 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 8630 | if test x"$tm_file" = x |
861bb6c1 JL |
8631 | then tm_file=$cpu_type/$cpu_type.h; fi |
8632 | ||
6b2adea9 | 8633 | if test x"$extra_headers" = x |
861bb6c1 JL |
8634 | then extra_headers=; fi |
8635 | ||
75bffa71 | 8636 | if test x$md_file = x |
e98e406f | 8637 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 8638 | |
75bffa71 | 8639 | if test x$out_file = x |
861bb6c1 JL |
8640 | then out_file=$cpu_type/$cpu_type.c; fi |
8641 | ||
75bffa71 | 8642 | if test x"$tmake_file" = x |
861bb6c1 JL |
8643 | then tmake_file=$cpu_type/t-$cpu_type |
8644 | fi | |
8645 | ||
90e6a802 | 8646 | if test x"$dwarf2" = xyes |
756ee602 | 8647 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
8648 | fi |
8649 | ||
861bb6c1 | 8650 | # Say what files are being used for the output code and MD file. |
11642c3a | 8651 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
8652 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
8653 | ||
11642c3a | 8654 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
8655 | # about them and drop them. |
8656 | ||
11642c3a ZW |
8657 | bx= |
8658 | for x in $build_xm_file; do | |
8659 | if test -f $srcdir/config/$x | |
8660 | then bx="$bx $x" | |
ba479fd2 NN |
8661 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8662 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8663 | fi |
8664 | done | |
8665 | build_xm_file="$bx" | |
8666 | ||
8667 | hx= | |
8668 | for x in $host_xm_file; do | |
8669 | if test -f $srcdir/config/$x | |
8670 | then hx="$hx $x" | |
ba479fd2 NN |
8671 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8672 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8673 | fi |
8674 | done | |
8675 | host_xm_file="$hx" | |
8676 | ||
8677 | tx= | |
8678 | for x in $xm_file; do | |
8679 | if test -f $srcdir/config/$x | |
8680 | then tx="$tx $x" | |
ba479fd2 NN |
8681 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
8682 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
8683 | fi |
8684 | done | |
8685 | xm_file="$tx" | |
8686 | ||
861bb6c1 JL |
8687 | count=a |
8688 | for f in $tm_file; do | |
8689 | count=${count}x | |
8690 | done | |
75bffa71 | 8691 | if test $count = ax; then |
861bb6c1 JL |
8692 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
8693 | else | |
8694 | echo "Using the following target machine macro files:" | |
8695 | for f in $tm_file; do | |
8696 | echo " $srcdir/config/$f" | |
8697 | done | |
8698 | fi | |
8699 | ||
4977bab6 | 8700 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
8701 | |
8702 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8703 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 8704 | _ACEOF |
4977bab6 ZW |
8705 | |
8706 | fi | |
8707 | ||
861bb6c1 JL |
8708 | count=a |
8709 | for f in $host_xm_file; do | |
8710 | count=${count}x | |
8711 | done | |
11642c3a ZW |
8712 | if test $count = a; then |
8713 | : | |
8714 | elif test $count = ax; then | |
861bb6c1 JL |
8715 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
8716 | else | |
8717 | echo "Using the following host machine macro files:" | |
8718 | for f in $host_xm_file; do | |
8719 | echo " $srcdir/config/$f" | |
8720 | done | |
8721 | fi | |
476d9098 | 8722 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 8723 | |
75bffa71 | 8724 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
8725 | count=a |
8726 | for f in $build_xm_file; do | |
8727 | count=${count}x | |
8728 | done | |
11642c3a ZW |
8729 | if test $count = a; then |
8730 | : | |
8731 | elif test $count = ax; then | |
861bb6c1 JL |
8732 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
8733 | else | |
8734 | echo "Using the following build machine macro files:" | |
8735 | for f in $build_xm_file; do | |
8736 | echo " $srcdir/config/$f" | |
8737 | done | |
8738 | fi | |
8739 | fi | |
8740 | ||
c2e494a8 NN |
8741 | # Check if a valid thread package |
8742 | case ${enable_threads_flag} in | |
8743 | "" | no) | |
8744 | # No threads | |
8745 | target_thread_file='single' | |
8746 | ;; | |
8747 | yes) | |
8748 | # default | |
8749 | target_thread_file='single' | |
8750 | ;; | |
769e49eb NN |
8751 | aix | dce | gnat | irix | posix | rtems | \ |
8752 | single | solaris | vxworks | win32 ) | |
c2e494a8 NN |
8753 | target_thread_file=${enable_threads_flag} |
8754 | ;; | |
8755 | *) | |
8756 | echo "${enable_threads_flag} is an unknown thread package" 1>&2 | |
8757 | exit 1 | |
8758 | ;; | |
8759 | esac | |
8760 | ||
8761 | if test x${thread_file} = x; then | |
8762 | # No thread file set by target-specific clauses in config.gcc, | |
8763 | # so use file chosen by default logic above | |
8764 | thread_file=${target_thread_file} | |
861bb6c1 JL |
8765 | fi |
8766 | ||
2121a768 JT |
8767 | if test x$enable___cxa_atexit = xyes || \ |
8768 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
ba479fd2 NN |
8769 | |
8770 | cat >>confdefs.h <<\_ACEOF | |
2121a768 | 8771 | #define DEFAULT_USE_CXA_ATEXIT 1 |
ba479fd2 | 8772 | _ACEOF |
2121a768 JT |
8773 | |
8774 | fi | |
8775 | ||
a5381466 | 8776 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
8777 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
8778 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
8779 | |
8780 | ||
8781 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 8782 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 8783 | _ACEOF |
a5381466 ZW |
8784 | |
8785 | fi | |
8786 | ||
b7cb92ad | 8787 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 8788 | # the first file included by config.h. |
4977bab6 | 8789 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 8790 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 8791 | # work to find out the build config parameters. |
75bffa71 | 8792 | if test x$host = x$build |
db81d74a | 8793 | then |
eaf4e618 | 8794 | build_auto=auto-host.h |
06f0b04c | 8795 | FORBUILD=.. |
b7cb92ad JL |
8796 | else |
8797 | # We create a subdir, then run autoconf in the subdir. | |
8798 | # To prevent recursion we set host and build for the new | |
8799 | # invocation of configure to the build for this invocation | |
ba479fd2 | 8800 | # of configure. |
b7cb92ad JL |
8801 | tempdir=build.$$ |
8802 | rm -rf $tempdir | |
8803 | mkdir $tempdir | |
8804 | cd $tempdir | |
8805 | case ${srcdir} in | |
255b8a49 | 8806 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
8807 | *) realsrcdir=../${srcdir};; |
8808 | esac | |
d920e825 L |
8809 | saved_CFLAGS="${CFLAGS}" |
8810 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
8811 | ${realsrcdir}/configure \ | |
534d0cc0 | 8812 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 8813 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
8814 | |
8815 | # We just finished tests for the build machine, so rename | |
8816 | # the file auto-build.h in the gcc directory. | |
8817 | mv auto-host.h ../auto-build.h | |
8818 | cd .. | |
8819 | rm -rf $tempdir | |
eaf4e618 | 8820 | build_auto=auto-build.h |
3b1b059c | 8821 | FORBUILD=../${build_subdir} |
db81d74a RH |
8822 | fi |
8823 | ||
06f0b04c | 8824 | |
eaf4e618 | 8825 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
8826 | tm_p_file="${tm_p_file} tm-preds.h" |
8827 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
8828 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 8829 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
8830 | # put this back in temporarily. |
8831 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 8832 | |
34a86c2b NN |
8833 | # -------- |
8834 | # UNSORTED | |
8835 | # -------- | |
8836 | ||
f1943b77 | 8837 | # Get the version trigger filename from the toplevel |
75bffa71 | 8838 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
8839 | gcc_version_trigger=$with_gcc_version_trigger |
8840 | else | |
8841 | gcc_version_trigger=${srcdir}/version.c | |
8842 | fi | |
022dae81 | 8843 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 8844 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 8845 | |
cc1e60ea | 8846 | # Compile in configure arguments. |
8105825d | 8847 | if test -f configargs.h ; then |
cc1e60ea | 8848 | # Being re-configured. |
022dae81 | 8849 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
8850 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
8851 | else | |
8852 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
8853 | fi | |
eeae7b41 DJ |
8854 | |
8855 | # Double all backslashes and backslash all quotes to turn | |
8856 | # gcc_config_arguments into a C string. | |
8857 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
8858 | $gcc_config_arguments | |
8859 | EOF | |
8860 | gcc_config_arguments_str=`cat conftest.out` | |
8861 | rm -f conftest.out | |
8862 | ||
cc1e60ea JM |
8863 | cat > configargs.h <<EOF |
8864 | /* Generated automatically. */ | |
eeae7b41 | 8865 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 8866 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
8867 | |
8868 | static const struct { | |
8869 | const char *name, *value; | |
8870 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
8871 | EOF |
8872 | ||
ab87f8c8 JL |
8873 | # Internationalization |
8874 | PACKAGE=gcc | |
8875 | VERSION="$gcc_version" | |
861bb6c1 | 8876 | |
ab87f8c8 JL |
8877 | |
8878 | ||
56694dd9 ZW |
8879 | # If we haven't got the data from the intl directory, |
8880 | # assume NLS is disabled. | |
ba479fd2 NN |
8881 | USE_NLS=no |
8882 | LIBINTL= | |
8883 | LIBINTL_DEP= | |
8884 | INCINTL= | |
8885 | XGETTEXT= | |
8886 | GMSGFMT= | |
8887 | POSUB= | |
56694dd9 ZW |
8888 | if test -f ../intl/config.intl; then |
8889 | . ../intl/config.intl | |
093e61a6 | 8890 | fi |
ba479fd2 NN |
8891 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
8892 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
56694dd9 | 8893 | if test x"$USE_NLS" != xyes; then |
ba479fd2 NN |
8894 | echo "$as_me:$LINENO: result: no" >&5 |
8895 | echo "${ECHO_T}no" >&6 | |
56694dd9 | 8896 | else |
ba479fd2 NN |
8897 | echo "$as_me:$LINENO: result: yes" >&5 |
8898 | echo "${ECHO_T}yes" >&6 | |
8899 | ||
8900 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 8901 | #define ENABLE_NLS 1 |
ba479fd2 | 8902 | _ACEOF |
56694dd9 | 8903 | |
093e61a6 | 8904 | |
ba479fd2 NN |
8905 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
8906 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
56694dd9 | 8907 | # Look for .po and .gmo files in the source directory. |
ba479fd2 | 8908 | CATALOGS= |
56694dd9 ZW |
8909 | XLINGUAS= |
8910 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
8911 | # If there aren't any .gmo files the shell will give us the | |
8912 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
8913 | # weeded out. | |
8914 | case "$cat" in *\**) | |
8915 | continue;; | |
8916 | esac | |
8917 | # The quadruple backslash is collapsed to a double backslash | |
8918 | # by the backticks, then collapsed again by the double quotes, | |
8919 | # leaving us with one backslash in the sed expression (right | |
8920 | # before the dot that mustn't act as a wildcard). | |
8921 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"` | |
8922 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"` | |
8923 | # The user is allowed to set LINGUAS to a list of languages to | |
8924 | # install catalogs for. If it's empty that means "all of them." | |
8925 | if test "x$LINGUAS" = x; then | |
8926 | CATALOGS="$CATALOGS $cat" | |
8927 | XLINGUAS="$XLINGUAS $lang" | |
8928 | else | |
8929 | case "$LINGUAS" in *$lang*) | |
8930 | CATALOGS="$CATALOGS $cat" | |
8931 | XLINGUAS="$XLINGUAS $lang" | |
8932 | ;; | |
8933 | esac | |
8934 | fi | |
8935 | done | |
8936 | LINGUAS="$XLINGUAS" | |
ba479fd2 NN |
8937 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
8938 | echo "${ECHO_T}$LINGUAS" >&6 | |
56694dd9 | 8939 | fi |
861bb6c1 | 8940 | |
56694dd9 ZW |
8941 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
8942 | # -liconv on the link line twice. | |
8943 | case "$LIBINTL" in *$LIBICONV*) | |
8944 | LIBICONV= ;; | |
8945 | esac | |
dc6746e7 | 8946 | |
56694dd9 ZW |
8947 | # Windows32 Registry support for specifying GCC installation paths. |
8948 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
8949 | if test "${enable_win32_registry+set}" = set; then | |
8950 | enableval="$enable_win32_registry" | |
dc6746e7 | 8951 | |
ba479fd2 | 8952 | fi; |
56694dd9 ZW |
8953 | case $host_os in |
8954 | win32 | pe | cygwin* | mingw32* | uwin*) | |
ba479fd2 NN |
8955 | echo "$as_me:$LINENO: checking whether windows registry support is requested" >&5 |
8956 | echo $ECHO_N "checking whether windows registry support is requested... $ECHO_C" >&6 | |
56694dd9 | 8957 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
8958 | |
8959 | cat >>confdefs.h <<\_ACEOF | |
56694dd9 | 8960 | #define ENABLE_WIN32_REGISTRY 1 |
ba479fd2 NN |
8961 | _ACEOF |
8962 | ||
8963 | echo "$as_me:$LINENO: result: yes" >&5 | |
8964 | echo "${ECHO_T}yes" >&6 | |
8965 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
8966 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 | |
8967 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
8968 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8969 | else | |
8970 | ac_func_search_save_LIBS=$LIBS | |
8971 | ac_cv_search_RegOpenKeyExA=no | |
8972 | cat >conftest.$ac_ext <<_ACEOF | |
8973 | #line $LINENO "configure" | |
8974 | /* confdefs.h. */ | |
8975 | _ACEOF | |
8976 | cat confdefs.h >>conftest.$ac_ext | |
8977 | cat >>conftest.$ac_ext <<_ACEOF | |
8978 | /* end confdefs.h. */ | |
861bb6c1 | 8979 | |
ab87f8c8 | 8980 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8981 | #ifdef __cplusplus |
8982 | extern "C" | |
8983 | #endif | |
ab87f8c8 | 8984 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8985 | builtin and then its argument prototype would still apply. */ |
8986 | char RegOpenKeyExA (); | |
8987 | int | |
8988 | main () | |
8989 | { | |
8990 | RegOpenKeyExA (); | |
8991 | ; | |
8992 | return 0; | |
8993 | } | |
8994 | _ACEOF | |
8995 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8996 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8997 | (eval $ac_link) 2>&5 | |
8998 | ac_status=$? | |
8999 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9000 | (exit $ac_status); } && | |
9001 | { ac_try='test -s conftest$ac_exeext' | |
9002 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9003 | (eval $ac_try) 2>&5 | |
9004 | ac_status=$? | |
9005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9006 | (exit $ac_status); }; }; then | |
56694dd9 | 9007 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 9008 | else |
ba479fd2 NN |
9009 | echo "$as_me: failed program was:" >&5 |
9010 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9011 | ||
861bb6c1 | 9012 | fi |
ba479fd2 NN |
9013 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
9014 | if test "$ac_cv_search_RegOpenKeyExA" = no; then | |
9015 | for ac_lib in advapi32; do | |
9016 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9017 | cat >conftest.$ac_ext <<_ACEOF | |
9018 | #line $LINENO "configure" | |
9019 | /* confdefs.h. */ | |
9020 | _ACEOF | |
9021 | cat confdefs.h >>conftest.$ac_ext | |
9022 | cat >>conftest.$ac_ext <<_ACEOF | |
9023 | /* end confdefs.h. */ | |
9024 | ||
56694dd9 | 9025 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9026 | #ifdef __cplusplus |
9027 | extern "C" | |
9028 | #endif | |
56694dd9 | 9029 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9030 | builtin and then its argument prototype would still apply. */ |
9031 | char RegOpenKeyExA (); | |
9032 | int | |
9033 | main () | |
9034 | { | |
9035 | RegOpenKeyExA (); | |
9036 | ; | |
9037 | return 0; | |
9038 | } | |
9039 | _ACEOF | |
9040 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9041 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9042 | (eval $ac_link) 2>&5 | |
9043 | ac_status=$? | |
9044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9045 | (exit $ac_status); } && | |
9046 | { ac_try='test -s conftest$ac_exeext' | |
9047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9048 | (eval $ac_try) 2>&5 | |
9049 | ac_status=$? | |
9050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9051 | (exit $ac_status); }; }; then | |
9052 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 9053 | break |
861bb6c1 | 9054 | else |
ba479fd2 NN |
9055 | echo "$as_me: failed program was:" >&5 |
9056 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9057 | ||
861bb6c1 | 9058 | fi |
ba479fd2 NN |
9059 | rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
9060 | done | |
6e3f3080 | 9061 | fi |
ba479fd2 NN |
9062 | LIBS=$ac_func_search_save_LIBS |
9063 | fi | |
9064 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
9065 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
9066 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 9067 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 9068 | |
ab87f8c8 | 9069 | fi |
ba479fd2 | 9070 | |
cafe096b | 9071 | else |
ba479fd2 NN |
9072 | echo "$as_me:$LINENO: result: no" >&5 |
9073 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 9074 | fi |
ab87f8c8 | 9075 | |
56694dd9 ZW |
9076 | # Check if user specified a different registry key. |
9077 | case "x${enable_win32_registry}" in | |
9078 | x | xyes) | |
9079 | # default. | |
9080 | gcc_cv_win32_registry_key="$VERSION" | |
9081 | ;; | |
9082 | xno) | |
9083 | # no registry lookup. | |
9084 | gcc_cv_win32_registry_key='' | |
9085 | ;; | |
9086 | *) | |
9087 | # user-specified key. | |
9088 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
9089 | ;; | |
9090 | esac | |
ab87f8c8 | 9091 | |
56694dd9 | 9092 | if test "x$enable_win32_registry" != xno; then |
ba479fd2 NN |
9093 | echo "$as_me:$LINENO: checking registry key on windows hosts" >&5 |
9094 | echo $ECHO_N "checking registry key on windows hosts... $ECHO_C" >&6 | |
9095 | ||
9096 | cat >>confdefs.h <<_ACEOF | |
56694dd9 | 9097 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
ba479fd2 | 9098 | _ACEOF |
cafe096b | 9099 | |
ba479fd2 NN |
9100 | echo "$as_me:$LINENO: result: $gcc_cv_win32_registry_key" >&5 |
9101 | echo "${ECHO_T}$gcc_cv_win32_registry_key" >&6 | |
093e61a6 | 9102 | fi |
56694dd9 ZW |
9103 | ;; |
9104 | esac | |
ab87f8c8 | 9105 | |
56694dd9 ZW |
9106 | # Get an absolute path to the GCC top-level source directory |
9107 | holddir=`${PWDCMD-pwd}` | |
9108 | cd $srcdir | |
9109 | topdir=`${PWDCMD-pwd}` | |
9110 | cd $holddir | |
ab87f8c8 | 9111 | |
56694dd9 | 9112 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 9113 | xmake_file= |
c406e779 | 9114 | for f in ${host_xmake_file} |
56694dd9 ZW |
9115 | do |
9116 | if test -f ${srcdir}/config/$f | |
9117 | then | |
2ed26f6b | 9118 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
9119 | fi |
9120 | done | |
093e61a6 | 9121 | |
56694dd9 | 9122 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 9123 | tmake_file_= |
c406e779 | 9124 | for f in ${tmake_file} |
56694dd9 ZW |
9125 | do |
9126 | if test -f ${srcdir}/config/$f | |
9127 | then | |
2ed26f6b | 9128 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
9129 | fi |
9130 | done | |
2ed26f6b | 9131 | tmake_file="${tmake_file_}" |
71a94577 | 9132 | |
56694dd9 | 9133 | symbolic_link='ln -s' |
34a86c2b | 9134 | |
ab87f8c8 JL |
9135 | # If the host doesn't support symlinks, modify CC in |
9136 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
9137 | # Otherwise, we can use "CC=$(CC)". | |
9138 | rm -f symtest.tem | |
9139 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
9140 | then | |
9141 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 9142 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 9143 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 9144 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
9145 | else |
9146 | rm -f symtest.tem | |
9147 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
9148 | then | |
9149 | symbolic_link="cp -p" | |
9150 | else | |
9151 | symbolic_link="cp" | |
9152 | fi | |
9153 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 9154 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 9155 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 9156 | 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 |
9157 | fi |
9158 | rm -f symtest.tem | |
9159 | ||
9160 | out_object_file=`basename $out_file .c`.o | |
9161 | ||
9162 | tm_file_list= | |
e22340b0 | 9163 | tm_include_list= |
ab87f8c8 | 9164 | for f in $tm_file; do |
64ccbc99 | 9165 | case $f in |
d02af173 | 9166 | defaults.h ) |
e22340b0 ZW |
9167 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
9168 | tm_include_list="${tm_include_list} $f" | |
9169 | ;; | |
9170 | * ) | |
9171 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
9172 | tm_include_list="${tm_include_list} config/$f" | |
9173 | ;; | |
64ccbc99 | 9174 | esac |
ab87f8c8 JL |
9175 | done |
9176 | ||
11642c3a | 9177 | tm_p_file_list= |
e22340b0 | 9178 | tm_p_include_list= |
11642c3a | 9179 | for f in $tm_p_file; do |
4977bab6 ZW |
9180 | case $f in |
9181 | tm-preds.h ) | |
e22340b0 ZW |
9182 | tm_p_file_list="${tm_p_file_list} $f" |
9183 | tm_p_include_list="${tm_p_include_list} $f" | |
9184 | ;; | |
9185 | * ) | |
9186 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
9187 | tm_p_include_list="${tm_p_include_list} config/$f" | |
9188 | esac | |
9189 | done | |
9190 | ||
9191 | xm_file_list= | |
9192 | xm_include_list= | |
9193 | for f in $xm_file; do | |
9194 | case $f in | |
9195 | ansidecl.h ) | |
9196 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
9197 | xm_include_list="${xm_include_list} $f" | |
9198 | ;; | |
9199 | auto-host.h ) | |
9200 | xm_file_list="${xm_file_list} $f" | |
9201 | xm_include_list="${xm_include_list} $f" | |
9202 | ;; | |
9203 | * ) | |
9204 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
9205 | xm_include_list="${xm_include_list} config/$f" | |
9206 | ;; | |
4977bab6 | 9207 | esac |
11642c3a ZW |
9208 | done |
9209 | ||
ab87f8c8 | 9210 | host_xm_file_list= |
e22340b0 | 9211 | host_xm_include_list= |
ab87f8c8 | 9212 | for f in $host_xm_file; do |
64ccbc99 | 9213 | case $f in |
d02af173 | 9214 | ansidecl.h ) |
e22340b0 ZW |
9215 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
9216 | host_xm_include_list="${host_xm_include_list} $f" | |
9217 | ;; | |
e2500fed | 9218 | auto-host.h ) |
e22340b0 ZW |
9219 | host_xm_file_list="${host_xm_file_list} $f" |
9220 | host_xm_include_list="${host_xm_include_list} $f" | |
9221 | ;; | |
9222 | * ) | |
9223 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
9224 | host_xm_include_list="${host_xm_include_list} config/$f" | |
9225 | ;; | |
64ccbc99 | 9226 | esac |
ab87f8c8 JL |
9227 | done |
9228 | ||
9229 | build_xm_file_list= | |
9230 | for f in $build_xm_file; do | |
64ccbc99 | 9231 | case $f in |
d02af173 | 9232 | ansidecl.h ) |
e22340b0 ZW |
9233 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
9234 | build_xm_include_list="${build_xm_include_list} $f" | |
9235 | ;; | |
e2500fed | 9236 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
9237 | build_xm_file_list="${build_xm_file_list} $f" |
9238 | build_xm_include_list="${build_xm_include_list} $f" | |
9239 | ;; | |
9240 | * ) | |
9241 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
9242 | build_xm_include_list="${build_xm_include_list} config/$f" | |
9243 | ;; | |
64ccbc99 | 9244 | esac |
ab87f8c8 JL |
9245 | done |
9246 | ||
a078a589 ZW |
9247 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
9248 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
9249 | CROSS= |
9250 | ALL=all.internal | |
9251 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9252 | if test x$host != x$target |
9253 | then | |
a078a589 ZW |
9254 | CROSS="-DCROSS_COMPILE" |
9255 | ALL=all.cross | |
9256 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 | 9257 | case "$host","$target" in |
3a7e8b87 GK |
9258 | # Darwin crosses can use the host system's libraries and headers, |
9259 | # because of the fat library support. Of course, it must be the | |
9260 | # same version of Darwin on both sides. Allow the user to | |
9261 | # just say --target=foo-darwin without a version number to mean | |
9262 | # "the version on this system". | |
9263 | *-*-darwin*,*-*-darwin*) | |
9264 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
9265 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
9266 | if test $hostos = $targetos -o $targetos = darwin ; then | |
9267 | CROSS= | |
9268 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
9269 | with_headers=yes | |
9270 | fi | |
9271 | ;; | |
9272 | ||
343f59d9 AM |
9273 | i?86-*-*,x86_64-*-* \ |
9274 | | powerpc*-*-*,powerpc64*-*-*) | |
9275 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
9276 | esac | |
7a615b25 AO |
9277 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
9278 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
9279 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
9280 | fi |
9281 | ||
b39d221a EC |
9282 | # If this is a cross-compiler that does not |
9283 | # have its own set of headers then define | |
9284 | # inhibit_libc | |
9285 | ||
dc06db20 R |
9286 | # If this is using newlib, without having the headers available now, |
9287 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
9288 | # This prevents libgcc2 from containing any code which requires libc |
9289 | # support. | |
b39d221a | 9290 | inhibit_libc= |
dc06db20 R |
9291 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
9292 | test x$with_newlib = xyes ; } && | |
e50084fa | 9293 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
b39d221a | 9294 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
9295 | fi |
9296 | ||
9297 | ||
a078a589 ZW |
9298 | # When building gcc with a cross-compiler, we need to adjust things so |
9299 | # that the generator programs are still built with the native compiler. | |
9300 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
9301 | |
9302 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
9303 | BUILD_PREFIX= |
9304 | BUILD_PREFIX_1=ignore- | |
9305 | CC_FOR_BUILD='$(CC)' | |
9306 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 9307 | |
ba479fd2 | 9308 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
9309 | |
9310 | # Possibly disable fixproto, on a per-target basis. | |
9311 | case ${use_fixproto} in | |
9312 | no) | |
9313 | STMP_FIXPROTO= | |
9314 | ;; | |
9315 | yes) | |
9316 | STMP_FIXPROTO=stmp-fixproto | |
9317 | ;; | |
9318 | esac | |
9319 | ||
a078a589 | 9320 | |
83599948 NS |
9321 | # And these apply if build != host, or we are generating coverage data |
9322 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 9323 | then |
5c35940c NN |
9324 | BUILD_PREFIX=build- |
9325 | BUILD_PREFIX_1=build- | |
b11e4747 | 9326 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 9327 | |
7a615b25 AO |
9328 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
9329 | STMP_FIXINC= | |
9330 | STMP_FIXPROTO= | |
9331 | fi | |
ab87f8c8 JL |
9332 | fi |
9333 | ||
9334 | # Expand extra_headers to include complete path. | |
9335 | # This substitutes for lots of t-* files. | |
9336 | extra_headers_list= | |
b1ef58c8 NN |
9337 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
9338 | for file in ${extra_headers} ; do | |
9339 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
9340 | done | |
ab87f8c8 | 9341 | |
ab87f8c8 | 9342 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
9343 | case $use_collect2 in |
9344 | no) use_collect2= ;; | |
9345 | "") ;; | |
ba479fd2 | 9346 | *) |
34a86c2b NN |
9347 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
9348 | xm_defines="${xm_defines} USE_COLLECT2" | |
9349 | ;; | |
9350 | esac | |
ab87f8c8 | 9351 | |
d869a8c4 NN |
9352 | # Identify the assembler which will work hand-in-glove with the newly |
9353 | # built GCC, so that we can examine its features. This is the assembler | |
9354 | # which will be driven by the driver program. | |
9355 | # | |
9356 | # If build != host, and we aren't building gas in-tree, we identify a | |
9357 | # build->target assembler and hope that it will have the same features | |
9358 | # as the host->target assembler we'll be using. | |
ba479fd2 NN |
9359 | echo "$as_me:$LINENO: checking what assembler to use" >&5 |
9360 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
34a86c2b | 9361 | in_tree_gas=no |
ab87f8c8 | 9362 | gcc_cv_as= |
981d4858 JM |
9363 | gcc_cv_gas_major_version= |
9364 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
9365 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
9366 | if test -x "$DEFAULT_ASSEMBLER"; then | |
9367 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
9368 | elif test -x "$AS"; then | |
9369 | gcc_cv_as="$AS" | |
9370 | elif test -x as$host_exeext; then | |
9371 | # Build using assembler in the current directory. | |
9372 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
9373 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
9374 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
9375 | # Single tree build which includes gas. |
9376 | in_tree_gas=yes | |
9377 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9378 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
9379 | $gcc_cv_as_gas_srcdir/configure \ | |
9380 | $gcc_cv_as_gas_srcdir/configure.in \ | |
9381 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
9382 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
9383 | if test x$gcc_cv_gas_version != x; then | |
9384 | break | |
9385 | fi | |
9386 | done | |
9387 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
9388 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
9389 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
9390 | case $gcc_cv_gas_patch_version in |
9391 | "") gcc_cv_gas_patch_version="0" ;; | |
9392 | esac | |
8ada417f ZW |
9393 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
9394 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
9395 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 9396 | |
f9c1196a ZW |
9397 | rm -f as$host_exeext |
9398 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
5408ac6c HPN |
9399 | in_tree_gas_is_elf=no |
9400 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
9401 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
9402 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
9403 | then | |
9404 | in_tree_gas_is_elf=yes | |
9405 | fi | |
981d4858 | 9406 | fi |
9e423e6d | 9407 | |
534d0cc0 | 9408 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
9409 | # Search the same directories that the installed compiler will |
9410 | # search. Else we may find the wrong assembler and lose. If we | |
9411 | # do not find a suitable assembler binary, then try the user's | |
9412 | # path. | |
9413 | # | |
9414 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
9415 | # user's path. Unfortunately, there is no good way to get at the | |
9416 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
9417 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
9418 | # to be fixed as part of the make/configure rewrite too. | |
9419 | ||
9420 | if test "x$exec_prefix" = xNONE; then | |
9421 | if test "x$prefix" = xNONE; then | |
9422 | test_prefix=/usr/local | |
9423 | else | |
9424 | test_prefix=$prefix | |
9425 | fi | |
9426 | else | |
9427 | test_prefix=$exec_prefix | |
9428 | fi | |
9429 | ||
9430 | # If the loop below does not find an assembler, then use whatever | |
9431 | # one we can find in the users's path. | |
9432 | # user's path. | |
55a2ea2a AM |
9433 | if test "x$program_prefix" != xNONE; then |
9434 | gcc_cv_as=${program_prefix}as$host_exeext | |
9435 | else | |
9436 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
9437 | fi | |
9438 | ||
caa55b1e NN |
9439 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
9440 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
9441 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
9442 | /usr/lib/gcc/$target_noncanonical \ | |
9443 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
9444 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
9445 | |
9446 | if test x$host = x$target; then | |
9447 | test_dirs="$test_dirs \ | |
779243f7 JL |
9448 | /usr/libexec \ |
9449 | /usr/ccs/gcc \ | |
9450 | /usr/ccs/bin \ | |
9451 | /udk/usr/ccs/bin \ | |
9452 | /bsd43/usr/lib/cmplrs/cc \ | |
9453 | /usr/cross64/usr/bin \ | |
9454 | /usr/lib/cmplrs/cc \ | |
9455 | /sysv/usr/lib/cmplrs/cc \ | |
9456 | /svr4/usr/lib/cmplrs/cc \ | |
9457 | /usr/bin" | |
55a2ea2a | 9458 | fi |
779243f7 JL |
9459 | |
9460 | for dir in $test_dirs; do | |
55a2ea2a | 9461 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
9462 | gcc_cv_as=$dir/as$host_exeext |
9463 | break; | |
9464 | fi | |
9465 | done | |
9e423e6d | 9466 | fi |
34a86c2b NN |
9467 | case $in_tree_gas in |
9468 | yes) | |
ba479fd2 NN |
9469 | echo "$as_me:$LINENO: result: \"newly built gas\"" >&5 |
9470 | echo "${ECHO_T}\"newly built gas\"" >&6 | |
34a86c2b NN |
9471 | ;; |
9472 | no) | |
ba479fd2 NN |
9473 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
9474 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
34a86c2b NN |
9475 | ;; |
9476 | esac | |
981d4858 | 9477 | |
d869a8c4 NN |
9478 | # Identify the linker which will work hand-in-glove with the newly |
9479 | # built GCC, so that we can examine its features. This is the linker | |
9480 | # which will be driven by the driver program. | |
9481 | # | |
9482 | # If build != host, and we aren't building gas in-tree, we identify a | |
9483 | # build->target linker and hope that it will have the same features | |
9484 | # as the host->target linker we'll be using. | |
ba479fd2 NN |
9485 | echo "$as_me:$LINENO: checking what linker to use" >&5 |
9486 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
34a86c2b | 9487 | in_tree_ld=no |
275b60d6 JJ |
9488 | gcc_cv_ld= |
9489 | gcc_cv_gld_major_version= | |
9490 | gcc_cv_gld_minor_version= | |
9491 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
9492 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9493 | if test -x "$DEFAULT_LINKER"; then | |
9494 | gcc_cv_ld="$DEFAULT_LINKER" | |
9495 | elif test -x "$LD"; then | |
9496 | gcc_cv_ld="$LD" | |
f9c1196a | 9497 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 9498 | # Build using linker in the current directory. |
f9c1196a | 9499 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
9500 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
9501 | && test -f ../ld/Makefile; then | |
275b60d6 | 9502 | # Single tree build which includes ld. |
34a86c2b | 9503 | in_tree_ld=yes |
5408ac6c HPN |
9504 | in_tree_ld_is_elf=no |
9505 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
9506 | || grep 'EMUL = .*linux' ../ld/Makefile) > /dev/null; then | |
9507 | in_tree_ld_is_elf=yes | |
9508 | fi | |
275b60d6 JJ |
9509 | 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 |
9510 | do | |
9511 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
9512 | if test x$gcc_cv_gld_version != x; then | |
9513 | break | |
9514 | fi | |
9515 | done | |
9516 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
9517 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
9518 | rm -f collect-ld$host_exeext |
9519 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
9520 | 2>/dev/null | |
275b60d6 JJ |
9521 | fi |
9522 | ||
534d0cc0 | 9523 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
9524 | # Search the same directories that the installed compiler will |
9525 | # search. Else we may find the wrong linker and lose. If we | |
9526 | # do not find a suitable linker binary, then try the user's | |
9527 | # path. | |
9528 | # | |
9529 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
9530 | # user's path. Unfortunately, there is no good way to get at the | |
9531 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
9532 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
9533 | # to be fixed as part of the make/configure rewrite too. | |
9534 | ||
9535 | if test "x$exec_prefix" = xNONE; then | |
9536 | if test "x$prefix" = xNONE; then | |
9537 | test_prefix=/usr/local | |
9538 | else | |
9539 | test_prefix=$prefix | |
9540 | fi | |
9541 | else | |
9542 | test_prefix=$exec_prefix | |
9543 | fi | |
9544 | ||
9545 | # If the loop below does not find an linker, then use whatever | |
9546 | # one we can find in the users's path. | |
9547 | # user's path. | |
55a2ea2a AM |
9548 | if test "x$program_prefix" != xNONE; then |
9549 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
9550 | else | |
9551 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
9552 | fi | |
9553 | ||
caa55b1e NN |
9554 | test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \ |
9555 | $test_prefix/lib/gcc-lib/$target_noncanonical \ | |
9556 | /usr/lib/gcc/$target_noncanonical/$gcc_version \ | |
9557 | /usr/lib/gcc/$target_noncanonical \ | |
9558 | $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \ | |
9559 | $test_prefix/$target_noncanonical/bin" | |
55a2ea2a AM |
9560 | |
9561 | if test x$host = x$target; then | |
9562 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
9563 | /usr/libexec \ |
9564 | /usr/ccs/gcc \ | |
9565 | /usr/ccs/bin \ | |
9566 | /udk/usr/ccs/bin \ | |
9567 | /bsd43/usr/lib/cmplrs/cc \ | |
9568 | /usr/cross64/usr/bin \ | |
9569 | /usr/lib/cmplrs/cc \ | |
9570 | /sysv/usr/lib/cmplrs/cc \ | |
9571 | /svr4/usr/lib/cmplrs/cc \ | |
9572 | /usr/bin" | |
55a2ea2a | 9573 | fi |
275b60d6 JJ |
9574 | |
9575 | for dir in $test_dirs; do | |
55a2ea2a | 9576 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
9577 | gcc_cv_ld=$dir/ld$host_exeext |
9578 | break; | |
9579 | fi | |
9580 | done | |
9581 | fi | |
34a86c2b NN |
9582 | case $in_tree_ld in |
9583 | yes) | |
ba479fd2 NN |
9584 | echo "$as_me:$LINENO: result: \"newly built ld\"" >&5 |
9585 | echo "${ECHO_T}\"newly built ld\"" >&6 | |
34a86c2b NN |
9586 | ;; |
9587 | no) | |
ba479fd2 NN |
9588 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
9589 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
34a86c2b NN |
9590 | ;; |
9591 | esac | |
275b60d6 | 9592 | |
981d4858 | 9593 | # Figure out what nm we will be using. |
f9c1196a | 9594 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
ba479fd2 NN |
9595 | echo "$as_me:$LINENO: checking what nm to use" >&5 |
9596 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
f9c1196a | 9597 | in_tree_nm=no |
981d4858 JM |
9598 | if test -x nm$host_exeext; then |
9599 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
9600 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
9601 | && test -f ../binutils/Makefile; then | |
9602 | # Single tree build which includes binutils. | |
9603 | in_tree_nm=yes | |
9604 | gcc_cv_nm=./nm$host_exeext | |
9605 | rm -f nm$host_exeext | |
9606 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
9607 | elif test "x$program_prefix" != xNONE; then |
9608 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
9609 | else | |
9610 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 9611 | fi |
f9c1196a | 9612 | case $in_tree_nm in |
ba479fd2 NN |
9613 | yes) echo "$as_me:$LINENO: result: \"newly built nm\"" >&5 |
9614 | echo "${ECHO_T}\"newly built nm\"" >&6 ;; | |
9615 | no) echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
9616 | echo "${ECHO_T}$gcc_cv_nm" >&6 ;; | |
f9c1196a | 9617 | esac |
981d4858 | 9618 | |
3cae5780 | 9619 | # Figure out what objdump we will be using. |
ba479fd2 NN |
9620 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
9621 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
f9c1196a | 9622 | in_tree_objdump=no |
3cae5780 AS |
9623 | if test -x objdump$host_exeext; then |
9624 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
9625 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
9626 | && test -f ../binutils/Makefile; then | |
9627 | # Single tree build which includes binutils. | |
9628 | in_tree_objdump=yes | |
9629 | gcc_cv_objdump=./objdump$host_exeext | |
9630 | rm -f objdump$host_exeext | |
9631 | $symbolic_link ../binutils/objdump$host_exeext \ | |
9632 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
9633 | elif test "x$program_prefix" != xNONE; then |
9634 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
9635 | else | |
f9c1196a ZW |
9636 | gcc_cv_objdump=`echo objdump | \ |
9637 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 9638 | fi |
f9c1196a | 9639 | case $in_tree_objdump in |
ba479fd2 NN |
9640 | yes) echo "$as_me:$LINENO: result: \"newly built objdump\"" >&5 |
9641 | echo "${ECHO_T}\"newly built objdump\"" >&6 ;; | |
9642 | no) echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
9643 | echo "${ECHO_T}$gcc_cv_objdump" >&6 ;; | |
f9c1196a | 9644 | esac |
3cae5780 | 9645 | |
981d4858 | 9646 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
9647 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
9648 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
9649 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
9650 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9651 | else |
9652 | gcc_cv_as_balign_and_p2align=no | |
9653 | if test $in_tree_gas = yes; then | |
9654 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
9655 | then gcc_cv_as_balign_and_p2align=yes | |
9656 | fi | |
9657 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 9658 | echo '.balign 4 |
8ada417f | 9659 | .p2align 2' > conftest.s |
ba479fd2 NN |
9660 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9661 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9662 | (eval $ac_try) 2>&5 | |
9663 | ac_status=$? | |
9664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9665 | (exit $ac_status); }; } | |
8ada417f ZW |
9666 | then |
9667 | gcc_cv_as_balign_and_p2align=yes | |
9668 | else | |
9669 | echo "configure: failed program was" >&5 | |
9670 | cat conftest.s >&5 | |
9671 | fi | |
9672 | rm -f conftest.o conftest.s | |
9673 | fi | |
9674 | fi | |
ba479fd2 NN |
9675 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
9676 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 9677 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
9678 | |
9679 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 9680 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 9681 | _ACEOF |
981d4858 | 9682 | |
ad9c4d9f NN |
9683 | fi |
9684 | ||
ba479fd2 NN |
9685 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
9686 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
9687 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
9688 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9689 | else |
9690 | gcc_cv_as_max_skip_p2align=no | |
9691 | if test $in_tree_gas = yes; then | |
9692 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
9693 | then gcc_cv_as_max_skip_p2align=yes | |
9694 | fi | |
9695 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 9696 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
9697 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9699 | (eval $ac_try) 2>&5 | |
9700 | ac_status=$? | |
9701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9702 | (exit $ac_status); }; } | |
8ada417f ZW |
9703 | then |
9704 | gcc_cv_as_max_skip_p2align=yes | |
9705 | else | |
9706 | echo "configure: failed program was" >&5 | |
9707 | cat conftest.s >&5 | |
9708 | fi | |
9709 | rm -f conftest.o conftest.s | |
9710 | fi | |
ad9c4d9f | 9711 | fi |
ba479fd2 NN |
9712 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
9713 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 9714 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
9715 | |
9716 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 9717 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 9718 | _ACEOF |
9e423e6d | 9719 | |
9e423e6d | 9720 | fi |
ad9c4d9f | 9721 | |
ba479fd2 NN |
9722 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
9723 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
9724 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
9725 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9726 | else |
9727 | gcc_cv_as_subsection_m1=no | |
9728 | if test $in_tree_gas = yes; then | |
9729 | if test $in_tree_gas_is_elf = yes \ | |
9730 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
9731 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 9732 | fi |
8ada417f | 9733 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 9734 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
9735 | .subsection -1 |
9736 | conftest_label2: .word 0 | |
8ada417f | 9737 | .previous' > conftest.s |
ba479fd2 NN |
9738 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9740 | (eval $ac_try) 2>&5 | |
9741 | ac_status=$? | |
9742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9743 | (exit $ac_status); }; } | |
8ada417f ZW |
9744 | then |
9745 | if test x$gcc_cv_nm != x; then | |
9746 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
9747 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
9748 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
9749 | then : | |
9750 | else gcc_cv_as_subsection_m1=yes | |
9751 | fi | |
9752 | rm -f conftest.nm1 conftest.nm2 | |
9753 | fi | |
9754 | else | |
9755 | echo "configure: failed program was" >&5 | |
9756 | cat conftest.s >&5 | |
9757 | fi | |
9758 | rm -f conftest.o conftest.s | |
9759 | fi | |
981d4858 | 9760 | fi |
ba479fd2 NN |
9761 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
9762 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 9763 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
9764 | |
9765 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 9766 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 9767 | _ACEOF |
981d4858 | 9768 | |
d1accaa3 | 9769 | fi |
ad9c4d9f | 9770 | |
ba479fd2 NN |
9771 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
9772 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
9773 | if test "${gcc_cv_as_weak+set}" = set; then | |
9774 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9775 | else |
9776 | gcc_cv_as_weak=no | |
9777 | if test $in_tree_gas = yes; then | |
9778 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
9779 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 9780 | fi |
8ada417f | 9781 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 9782 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
9783 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9785 | (eval $ac_try) 2>&5 | |
9786 | ac_status=$? | |
9787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9788 | (exit $ac_status); }; } | |
8ada417f ZW |
9789 | then |
9790 | gcc_cv_as_weak=yes | |
9791 | else | |
9792 | echo "configure: failed program was" >&5 | |
9793 | cat conftest.s >&5 | |
9794 | fi | |
9795 | rm -f conftest.o conftest.s | |
9796 | fi | |
981d4858 | 9797 | fi |
ba479fd2 NN |
9798 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
9799 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 9800 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
9801 | |
9802 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 9803 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 9804 | _ACEOF |
981d4858 | 9805 | |
12822146 | 9806 | fi |
ad9c4d9f | 9807 | |
8ada417f ZW |
9808 | # .hidden needs to be supported in both the assembler and the linker, |
9809 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
9810 | # This is irritatingly difficult to feature test for; we have to check the | |
9811 | # date string after the version number. If we've got an in-tree | |
9812 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
9813 | # to be safe. | |
9814 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
9815 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
9816 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
9817 | if test "${gcc_cv_as_hidden+set}" = set; then | |
9818 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9819 | else |
9820 | gcc_cv_as_hidden=no | |
9821 | if test $in_tree_gas = yes; then | |
9822 | if test $in_tree_gas_is_elf = yes \ | |
9823 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
9824 | then gcc_cv_as_hidden=yes | |
9825 | fi | |
9826 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 9827 | echo ' .hidden foobar |
8ada417f | 9828 | foobar:' > conftest.s |
ba479fd2 NN |
9829 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9830 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9831 | (eval $ac_try) 2>&5 | |
9832 | ac_status=$? | |
9833 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9834 | (exit $ac_status); }; } | |
8ada417f ZW |
9835 | then |
9836 | gcc_cv_as_hidden=yes | |
9837 | else | |
9838 | echo "configure: failed program was" >&5 | |
9839 | cat conftest.s >&5 | |
9840 | fi | |
9841 | rm -f conftest.o conftest.s | |
9842 | fi | |
9843 | fi | |
ba479fd2 NN |
9844 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
9845 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 9846 | |
ad9c4d9f | 9847 | |
ba479fd2 NN |
9848 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
9849 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
9850 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
9851 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9852 | else |
9853 | if test $in_tree_ld = yes ; then | |
9854 | gcc_cv_ld_hidden=no | |
9855 | 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 \ | |
9856 | && test $in_tree_ld_is_elf = yes; then | |
9857 | gcc_cv_ld_hidden=yes | |
9858 | fi | |
9859 | else | |
9860 | gcc_cv_ld_hidden=yes | |
bace148a | 9861 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
9862 | if echo "$ld_ver" | grep GNU > /dev/null; then |
9863 | ld_vers=`echo $ld_ver | sed -n \ | |
9864 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
9865 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
9866 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
9867 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
9868 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
9869 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
9870 | 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'` | |
9871 | if test 0"$ld_date" -lt 20020404; then | |
9872 | if test -n "$ld_date"; then | |
9873 | # If there was date string, but was earlier than 2002-04-04, fail | |
9874 | gcc_cv_ld_hidden=no | |
9875 | elif test -z "$ld_vers"; then | |
9876 | # If there was no date string nor ld version number, something is wrong | |
9877 | gcc_cv_ld_hidden=no | |
9878 | else | |
9879 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
9880 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
9881 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
9882 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
9883 | if test "$ld_vers_major" -lt 2; then | |
9884 | gcc_cv_ld_hidden=no | |
9885 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
9886 | gcc_cv_ld_hidden="no" | |
9887 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
9888 | gcc_cv_ld_hidden=no | |
c72931a6 | 9889 | fi |
8ada417f | 9890 | fi |
789b7de5 | 9891 | fi |
8ada417f | 9892 | else |
28690784 | 9893 | case "${target}" in |
b0fd7d27 | 9894 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
9895 | gcc_cv_ld_hidden=yes |
9896 | ;; | |
9897 | *) | |
9898 | gcc_cv_ld_hidden=no | |
9899 | ;; | |
9900 | esac | |
8ada417f ZW |
9901 | fi |
9902 | fi | |
6d07784a | 9903 | fi |
ba479fd2 NN |
9904 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
9905 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 9906 | libgcc_visibility=no |
ad9c4d9f | 9907 | |
8e3940b2 | 9908 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 9909 | libgcc_visibility=yes |
ba479fd2 NN |
9910 | |
9911 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 9912 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 9913 | _ACEOF |
ad9c4d9f NN |
9914 | |
9915 | fi | |
9916 | ||
8ada417f | 9917 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
9918 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
9919 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
9920 | if test "${gcc_cv_as_leb128+set}" = set; then | |
9921 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9922 | else |
9923 | gcc_cv_as_leb128=no | |
9924 | if test $in_tree_gas = yes; then | |
9925 | if test $in_tree_gas_is_elf = yes \ | |
9926 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
9927 | then gcc_cv_as_leb128=yes | |
9928 | fi | |
9929 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 9930 | echo ' .data |
b7460f24 RH |
9931 | .uleb128 L2 - L1 |
9932 | L1: | |
9933 | .uleb128 1280 | |
9934 | .sleb128 -1010 | |
8ada417f | 9935 | L2:' > conftest.s |
ba479fd2 NN |
9936 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
9937 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9938 | (eval $ac_try) 2>&5 | |
9939 | ac_status=$? | |
9940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9941 | (exit $ac_status); }; } | |
8ada417f ZW |
9942 | then |
9943 | # GAS versions before 2.11 do not support uleb128, | |
9944 | # despite appearing to. | |
9945 | # ??? There exists an elf-specific test that will crash | |
9946 | # the assembler. Perhaps it's better to figure out whether | |
9947 | # arbitrary sections are supported and try the test. | |
bace148a | 9948 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
9949 | if echo "$as_ver" | grep GNU > /dev/null; then |
9950 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
9951 | as_major=`echo $as_ver | sed 's/\..*//'` | |
9952 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
9953 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
9954 | then : | |
9955 | else gcc_cv_as_leb128=yes | |
9956 | fi | |
9957 | fi | |
9958 | else | |
9959 | echo "configure: failed program was" >&5 | |
9960 | cat conftest.s >&5 | |
9961 | fi | |
9962 | rm -f conftest.o conftest.s | |
9963 | fi | |
b7460f24 | 9964 | fi |
ba479fd2 NN |
9965 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
9966 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 9967 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
9968 | |
9969 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 9970 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 9971 | _ACEOF |
b7460f24 RH |
9972 | |
9973 | fi | |
ad9c4d9f | 9974 | |
8ada417f ZW |
9975 | # GAS versions up to and including 2.11.0 may mis-optimize |
9976 | # .eh_frame data. | |
ba479fd2 NN |
9977 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
9978 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
9979 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
9980 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
9981 | else |
9982 | gcc_cv_as_eh_frame=no | |
9983 | if test $in_tree_gas = yes; then | |
9984 | if test $in_tree_gas_is_elf = yes \ | |
9985 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
9986 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 9987 | fi |
8ada417f | 9988 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 9989 | echo ' .text |
c64688ae RH |
9990 | .LFB1: |
9991 | .4byte 0 | |
9992 | .L1: | |
9993 | .4byte 0 | |
9994 | .LFE1: | |
9995 | .section .eh_frame,"aw",@progbits | |
9996 | __FRAME_BEGIN__: | |
9997 | .4byte .LECIE1-.LSCIE1 | |
9998 | .LSCIE1: | |
9999 | .4byte 0x0 | |
10000 | .byte 0x1 | |
10001 | .ascii "z\0" | |
10002 | .byte 0x1 | |
10003 | .byte 0x78 | |
10004 | .byte 0x1a | |
10005 | .byte 0x0 | |
10006 | .byte 0x4 | |
10007 | .4byte 1 | |
10008 | .p2align 1 | |
10009 | .LECIE1: | |
10010 | .LSFDE1: | |
10011 | .4byte .LEFDE1-.LASFDE1 | |
10012 | .LASFDE1: | |
10013 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
10014 | .4byte .LFB1 | |
10015 | .4byte .LFE1-.LFB1 | |
10016 | .byte 0x4 | |
10017 | .4byte .LFE1-.LFB1 | |
10018 | .byte 0x4 | |
10019 | .4byte .L1-.LFB1 | |
8ada417f | 10020 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
10021 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10023 | (eval $ac_try) 2>&5 | |
10024 | ac_status=$? | |
10025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10026 | (exit $ac_status); }; } | |
8ada417f ZW |
10027 | then |
10028 | cat > conftest.lit <<EOF | |
c64688ae RH |
10029 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
10030 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 10031 | 0020 08000000 04080000 0044 .........D |
01efb963 | 10032 | EOF |
ba479fd2 | 10033 | cat > conftest.big <<EOF |
01efb963 AS |
10034 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
10035 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 10036 | 0020 00000008 04000000 0844 .........D |
c64688ae | 10037 | EOF |
8ada417f ZW |
10038 | # If the assembler didn't choke, and we can objdump, |
10039 | # and we got the correct data, then succeed. | |
10040 | if test x$gcc_cv_objdump != x \ | |
10041 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
10042 | | tail -3 > conftest.got \ | |
10043 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
10044 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
10045 | then | |
10046 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
10047 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
10048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10049 | (eval $ac_try) 2>&5 | |
10050 | ac_status=$? | |
10051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10052 | (exit $ac_status); }; }; then | |
8ada417f ZW |
10053 | gcc_cv_as_eh_frame=buggy |
10054 | else | |
10055 | # Uh oh, what do we do now? | |
10056 | gcc_cv_as_eh_frame=no | |
10057 | fi | |
10058 | else | |
10059 | echo "configure: failed program was" >&5 | |
10060 | cat conftest.s >&5 | |
10061 | fi | |
10062 | rm -f conftest.o conftest.s | |
10063 | fi | |
c64688ae | 10064 | fi |
ba479fd2 NN |
10065 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
10066 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 10067 | |
6e3f3080 | 10068 | |
63cf211a | 10069 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
10070 | |
10071 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10072 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 10073 | _ACEOF |
ad9c4d9f NN |
10074 | |
10075 | fi | |
10076 | ||
ba479fd2 NN |
10077 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
10078 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
10079 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
10080 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10081 | else |
10082 | gcc_cv_as_shf_merge=no | |
10083 | if test $in_tree_gas = yes; then | |
10084 | if test $in_tree_gas_is_elf = yes \ | |
10085 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10086 | then gcc_cv_as_shf_merge=yes | |
10087 | fi | |
10088 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10089 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
10090 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
10091 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10092 | (eval $ac_try) 2>&5 | |
10093 | ac_status=$? | |
10094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10095 | (exit $ac_status); }; } | |
8ada417f ZW |
10096 | then |
10097 | gcc_cv_as_shf_merge=yes | |
10098 | else | |
10099 | echo "configure: failed program was" >&5 | |
10100 | cat conftest.s >&5 | |
10101 | fi | |
10102 | rm -f conftest.o conftest.s | |
10103 | fi | |
201556f0 | 10104 | fi |
ba479fd2 NN |
10105 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
10106 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 10107 | |
8ad9fb33 | 10108 | |
ba479fd2 | 10109 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 10110 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 10111 | _ACEOF |
201556f0 | 10112 | |
201556f0 | 10113 | |
8ada417f | 10114 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
10115 | conftest_s= |
10116 | tls_first_major= | |
10117 | tls_first_minor= | |
9739c90c | 10118 | tls_as_opt= |
f996902d | 10119 | case "$target" in |
6f9b006d RH |
10120 | alpha*-*-*) |
10121 | conftest_s=' | |
10122 | .section ".tdata","awT",@progbits | |
10123 | foo: .long 25 | |
10124 | .text | |
10125 | ldq $27,__tls_get_addr($29) !literal!1 | |
10126 | lda $16,foo($29) !tlsgd!1 | |
10127 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
10128 | ldq $27,__tls_get_addr($29) !literal!2 | |
10129 | lda $16,foo($29) !tlsldm!2 | |
10130 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
10131 | ldq $1,foo($29) !gotdtprel | |
10132 | ldah $2,foo($29) !dtprelhi | |
10133 | lda $3,foo($2) !dtprello | |
10134 | lda $4,foo($29) !dtprel | |
10135 | ldq $1,foo($29) !gottprel | |
10136 | ldah $2,foo($29) !tprelhi | |
10137 | lda $3,foo($2) !tprello | |
10138 | lda $4,foo($29) !tprel' | |
10139 | tls_first_major=2 | |
10140 | tls_first_minor=13 | |
10141 | ;; | |
f996902d RH |
10142 | i[34567]86-*-*) |
10143 | conftest_s=' | |
10144 | .section ".tdata","awT",@progbits | |
10145 | foo: .long 25 | |
10146 | .text | |
10147 | movl %gs:0, %eax | |
10148 | leal foo@TLSGD(,%ebx,1), %eax | |
10149 | leal foo@TLSLDM(%ebx), %eax | |
10150 | leal foo@DTPOFF(%eax), %edx | |
10151 | movl foo@GOTTPOFF(%ebx), %eax | |
10152 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
10153 | addl foo@GOTNTPOFF(%ebx), %eax |
10154 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
10155 | movl $foo@TPOFF, %eax |
10156 | subl $foo@TPOFF, %eax | |
10157 | leal foo@NTPOFF(%ecx), %eax' | |
10158 | tls_first_major=2 | |
75d38379 JJ |
10159 | tls_first_minor=14 |
10160 | ;; | |
10161 | x86_64-*-*) | |
10162 | conftest_s=' | |
10163 | .section ".tdata","awT",@progbits | |
10164 | foo: .long 25 | |
10165 | .text | |
10166 | movq %fs:0, %rax | |
10167 | leaq foo@TLSGD(%rip), %rdi | |
10168 | leaq foo@TLSLD(%rip), %rdi | |
10169 | leaq foo@DTPOFF(%rax), %rdx | |
10170 | movq foo@GOTTPOFF(%rip), %rax | |
10171 | movq $foo@TPOFF, %rax' | |
10172 | tls_first_major=2 | |
10173 | tls_first_minor=14 | |
f996902d | 10174 | ;; |
7b6e506e RH |
10175 | ia64-*-*) |
10176 | conftest_s=' | |
10177 | .section ".tdata","awT",@progbits | |
10178 | foo: data8 25 | |
10179 | .text | |
10180 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
10181 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
10182 | addl r18 = @ltoff(@tprel(foo#)), gp | |
10183 | addl r19 = @dtprel(foo#), gp | |
10184 | adds r21 = @dtprel(foo#), r13 | |
10185 | movl r23 = @dtprel(foo#) | |
10186 | addl r20 = @tprel(foo#), gp | |
10187 | adds r22 = @tprel(foo#), r13 | |
10188 | movl r24 = @tprel(foo#)' | |
10189 | tls_first_major=2 | |
10190 | tls_first_minor=13 | |
10191 | ;; | |
c4501e62 JJ |
10192 | powerpc-*-*) |
10193 | conftest_s=' | |
10194 | .section ".tdata","awT",@progbits | |
10195 | .align 2 | |
10196 | ld0: .space 4 | |
10197 | ld1: .space 4 | |
10198 | x1: .space 4 | |
10199 | x2: .space 4 | |
10200 | x3: .space 4 | |
10201 | .text | |
10202 | addi 3,31,ld0@got@tlsgd | |
10203 | bl __tls_get_addr | |
10204 | addi 3,31,x1@got@tlsld | |
10205 | bl __tls_get_addr | |
10206 | addi 9,3,x1@dtprel | |
10207 | addis 9,3,x2@dtprel@ha | |
10208 | addi 9,9,x2@dtprel@l | |
10209 | lwz 9,x3@got@tprel(31) | |
10210 | add 9,9,x@tls | |
10211 | addi 9,2,x1@tprel | |
10212 | addis 9,2,x2@tprel@ha | |
10213 | addi 9,9,x2@tprel@l' | |
10214 | tls_first_major=2 | |
10215 | tls_first_minor=14 | |
9739c90c | 10216 | tls_as_opt=-a32 |
c4501e62 JJ |
10217 | ;; |
10218 | powerpc64-*-*) | |
10219 | conftest_s=' | |
10220 | .section ".tdata","awT",@progbits | |
10221 | .align 3 | |
10222 | ld0: .space 8 | |
10223 | ld1: .space 8 | |
10224 | x1: .space 8 | |
10225 | x2: .space 8 | |
10226 | x3: .space 8 | |
10227 | .text | |
10228 | addi 3,2,ld0@got@tlsgd | |
10229 | bl .__tls_get_addr | |
10230 | nop | |
10231 | addi 3,2,ld1@toc | |
10232 | bl .__tls_get_addr | |
10233 | nop | |
10234 | addi 3,2,x1@got@tlsld | |
10235 | bl .__tls_get_addr | |
10236 | nop | |
10237 | addi 9,3,x1@dtprel | |
10238 | bl .__tls_get_addr | |
10239 | nop | |
10240 | addis 9,3,x2@dtprel@ha | |
10241 | addi 9,9,x2@dtprel@l | |
10242 | bl .__tls_get_addr | |
10243 | nop | |
10244 | ld 9,x3@got@dtprel(2) | |
10245 | add 9,9,3 | |
10246 | bl .__tls_get_addr | |
10247 | nop' | |
10248 | tls_first_major=2 | |
10249 | tls_first_minor=14 | |
9739c90c | 10250 | tls_as_opt=-a64 |
c4501e62 | 10251 | ;; |
fd3cd001 UW |
10252 | s390-*-*) |
10253 | conftest_s=' | |
10254 | .section ".tdata","awT",@progbits | |
10255 | foo: .long 25 | |
10256 | .text | |
10257 | .long foo@TLSGD | |
10258 | .long foo@TLSLDM | |
10259 | .long foo@DTPOFF | |
10260 | .long foo@NTPOFF | |
10261 | .long foo@GOTNTPOFF | |
10262 | .long foo@INDNTPOFF | |
10263 | l %r1,foo@GOTNTPOFF(%r12) | |
10264 | l %r1,0(%r1):tls_load:foo | |
10265 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
10266 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
10267 | tls_first_major=2 | |
10268 | tls_first_minor=14 | |
9739c90c | 10269 | tls_as_opt=-m31 |
fd3cd001 UW |
10270 | ;; |
10271 | s390x-*-*) | |
10272 | conftest_s=' | |
10273 | .section ".tdata","awT",@progbits | |
10274 | foo: .long 25 | |
10275 | .text | |
10276 | .quad foo@TLSGD | |
10277 | .quad foo@TLSLDM | |
10278 | .quad foo@DTPOFF | |
10279 | .quad foo@NTPOFF | |
10280 | .quad foo@GOTNTPOFF | |
10281 | lg %r1,foo@GOTNTPOFF(%r12) | |
10282 | larl %r1,foo@INDNTPOFF | |
10283 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
10284 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
10285 | tls_first_major=2 | |
10286 | tls_first_minor=14 | |
9739c90c | 10287 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 10288 | ;; |
9ff13962 KK |
10289 | sh-*-* | sh[34]-*-*) |
10290 | conftest_s=' | |
10291 | .section ".tdata","awT",@progbits | |
10292 | foo: .long 25 | |
10293 | .text | |
10294 | .long foo@TLSGD | |
10295 | .long foo@TLSLDM | |
10296 | .long foo@DTPOFF | |
10297 | .long foo@GOTTPOFF | |
10298 | .long foo@TPOFF' | |
10299 | tls_first_major=2 | |
10300 | tls_first_minor=13 | |
10301 | ;; | |
5751a10b JJ |
10302 | sparc*-*-*) |
10303 | conftest_s=' | |
10304 | .section ".tdata","awT",@progbits | |
10305 | foo: .long 25 | |
10306 | .text | |
10307 | sethi %tgd_hi22(foo), %o0 | |
10308 | add %o0, %tgd_lo10(foo), %o1 | |
10309 | add %l7, %o1, %o0, %tgd_add(foo) | |
10310 | call __tls_get_addr, %tgd_call(foo) | |
10311 | sethi %tldm_hi22(foo), %l1 | |
10312 | add %l1, %tldm_lo10(foo), %l2 | |
10313 | add %l7, %l2, %o0, %tldm_add(foo) | |
10314 | call __tls_get_addr, %tldm_call(foo) | |
10315 | sethi %tldo_hix22(foo), %l3 | |
10316 | xor %l3, %tldo_lox10(foo), %l4 | |
10317 | add %o0, %l4, %l5, %tldo_add(foo) | |
10318 | sethi %tie_hi22(foo), %o3 | |
10319 | add %o3, %tie_lo10(foo), %o3 | |
10320 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
10321 | add %g7, %o2, %o4, %tie_add(foo) | |
10322 | sethi %tle_hix22(foo), %l1 | |
10323 | xor %l1, %tle_lox10(foo), %o5 | |
10324 | ld [%g7 + %o5], %o1' | |
10325 | tls_first_major=2 | |
10326 | tls_first_minor=14 | |
10327 | tls_as_opt=-32 | |
10328 | ;; | |
f996902d RH |
10329 | esac |
10330 | if test -z "$tls_first_major"; then | |
8ada417f ZW |
10331 | : # If we don't have a check, assume no support. |
10332 | else | |
ba479fd2 NN |
10333 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
10334 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
10335 | if test "${gcc_cv_as_tls+set}" = set; then | |
10336 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10337 | else |
10338 | gcc_cv_as_tls=no | |
10339 | if test $in_tree_gas = yes; then | |
10340 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
10341 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 10342 | fi |
8ada417f | 10343 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10344 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
10345 | if { ac_try='$gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s >&5' |
10346 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10347 | (eval $ac_try) 2>&5 | |
10348 | ac_status=$? | |
10349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10350 | (exit $ac_status); }; } | |
8ada417f ZW |
10351 | then |
10352 | gcc_cv_as_tls=yes | |
10353 | else | |
10354 | echo "configure: failed program was" >&5 | |
10355 | cat conftest.s >&5 | |
10356 | fi | |
10357 | rm -f conftest.o conftest.s | |
f996902d | 10358 | fi |
f996902d | 10359 | fi |
ba479fd2 NN |
10360 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
10361 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 10362 | if test $gcc_cv_as_tls = yes; then |
ba479fd2 NN |
10363 | |
10364 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 10365 | #define HAVE_AS_TLS 1 |
ba479fd2 | 10366 | _ACEOF |
f996902d RH |
10367 | |
10368 | fi | |
8ada417f ZW |
10369 | fi |
10370 | ||
10371 | # Target-specific assembler checks. | |
f996902d | 10372 | |
3a37b08e RH |
10373 | case "$target" in |
10374 | # All TARGET_ABI_OSF targets. | |
10375 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
10376 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
10377 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
10378 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
10379 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 10380 | else |
8ada417f ZW |
10381 | gcc_cv_as_alpha_explicit_relocs=no |
10382 | if test $in_tree_gas = yes; then | |
10383 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
10384 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 10385 | fi |
8ada417f | 10386 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10387 | echo ' .set nomacro |
3a37b08e RH |
10388 | .text |
10389 | extbl $3, $2, $3 !lituse_bytoff!1 | |
10390 | ldq $2, a($29) !literal!1 | |
10391 | ldq $4, b($29) !literal!2 | |
10392 | ldq_u $3, 0($2) !lituse_base!1 | |
10393 | ldq $27, f($29) !literal!5 | |
10394 | jsr $26, ($27), f !lituse_jsr!5 | |
10395 | ldah $29, 0($26) !gpdisp!3 | |
10396 | lda $0, c($29) !gprel | |
10397 | ldah $1, d($29) !gprelhigh | |
10398 | lda $1, d($1) !gprellow | |
8ada417f | 10399 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
10400 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10402 | (eval $ac_try) 2>&5 | |
10403 | ac_status=$? | |
10404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10405 | (exit $ac_status); }; } | |
8ada417f ZW |
10406 | then |
10407 | gcc_cv_as_alpha_explicit_relocs=yes | |
10408 | else | |
10409 | echo "configure: failed program was" >&5 | |
10410 | cat conftest.s >&5 | |
10411 | fi | |
10412 | rm -f conftest.o conftest.s | |
10413 | fi | |
cafe096b | 10414 | fi |
ba479fd2 NN |
10415 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
10416 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 10417 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
10418 | |
10419 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 10420 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 10421 | _ACEOF |
3a37b08e | 10422 | |
8ada417f | 10423 | fi |
3a37b08e | 10424 | ;; |
8ada417f | 10425 | |
1cb36a98 | 10426 | sparc*-*-*) |
ba479fd2 NN |
10427 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
10428 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
10429 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
10430 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 10431 | else |
8ada417f ZW |
10432 | gcc_cv_as_sparc_register_op=no |
10433 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10434 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
10435 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10436 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10437 | (eval $ac_try) 2>&5 | |
10438 | ac_status=$? | |
10439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10440 | (exit $ac_status); }; } | |
8ada417f ZW |
10441 | then |
10442 | gcc_cv_as_sparc_register_op=yes | |
10443 | else | |
10444 | echo "configure: failed program was" >&5 | |
10445 | cat conftest.s >&5 | |
10446 | fi | |
10447 | rm -f conftest.o conftest.s | |
10448 | fi | |
cafe096b | 10449 | fi |
ba479fd2 NN |
10450 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
10451 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 10452 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
10453 | |
10454 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 10455 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 10456 | _ACEOF |
1cb36a98 | 10457 | |
8ada417f | 10458 | fi |
1cb36a98 | 10459 | |
ba479fd2 NN |
10460 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
10461 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
10462 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
10463 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 10464 | else |
8ada417f ZW |
10465 | gcc_cv_as_sparc_relax=no |
10466 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10467 | echo '.text' > conftest.s |
ba479fd2 NN |
10468 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
10469 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10470 | (eval $ac_try) 2>&5 | |
10471 | ac_status=$? | |
10472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10473 | (exit $ac_status); }; } | |
8ada417f ZW |
10474 | then |
10475 | gcc_cv_as_sparc_relax=yes | |
10476 | else | |
10477 | echo "configure: failed program was" >&5 | |
10478 | cat conftest.s >&5 | |
10479 | fi | |
10480 | rm -f conftest.o conftest.s | |
10481 | fi | |
cafe096b | 10482 | fi |
ba479fd2 NN |
10483 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
10484 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 10485 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
10486 | |
10487 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 10488 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 10489 | _ACEOF |
e95b1e6a | 10490 | |
8ada417f | 10491 | fi |
e95b1e6a | 10492 | |
ba479fd2 NN |
10493 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
10494 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
10495 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
10496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 10497 | else |
8ada417f ZW |
10498 | gcc_cv_as_sparc_ua_pcrel=no |
10499 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10500 | echo '.text |
8ada417f ZW |
10501 | foo: |
10502 | nop | |
10503 | .data | |
10504 | .align 4 | |
10505 | .byte 0 | |
10506 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
10507 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
10508 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10509 | (eval $ac_try) 2>&5 | |
10510 | ac_status=$? | |
10511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10512 | (exit $ac_status); }; } | |
8ada417f ZW |
10513 | then |
10514 | if test x$gcc_cv_ld != x \ | |
10515 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
10516 | gcc_cv_as_sparc_ua_pcrel=yes | |
10517 | fi | |
10518 | rm -f conftest | |
10519 | else | |
10520 | echo "configure: failed program was" >&5 | |
10521 | cat conftest.s >&5 | |
10522 | fi | |
10523 | rm -f conftest.o conftest.s | |
10524 | fi | |
cafe096b | 10525 | fi |
ba479fd2 NN |
10526 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
10527 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 10528 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
10529 | |
10530 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 10531 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 10532 | _ACEOF |
17e9e88c | 10533 | |
17e9e88c | 10534 | |
ba479fd2 NN |
10535 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
10536 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
10537 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
10538 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 10539 | else |
8ada417f ZW |
10540 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
10541 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10542 | echo '.data |
8ada417f ZW |
10543 | .align 4 |
10544 | .byte 0x31 | |
10545 | .uaword %r_disp32(foo) | |
10546 | .byte 0x32, 0x33, 0x34 | |
10547 | .global foo | |
10548 | .hidden foo | |
10549 | foo: | |
10550 | .skip 4' > conftest.s | |
ba479fd2 NN |
10551 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
10552 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10553 | (eval $ac_try) 2>&5 | |
10554 | ac_status=$? | |
10555 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10556 | (exit $ac_status); }; } | |
8ada417f ZW |
10557 | then |
10558 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
10559 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
10560 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
10561 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
10562 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
10563 | | grep 'DISP32' > /dev/null 2>&1; then | |
10564 | : | |
10565 | else | |
10566 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 10567 | fi |
8ada417f ZW |
10568 | fi |
10569 | rm -f conftest | |
10570 | else | |
10571 | echo "configure: failed program was" >&5 | |
10572 | cat conftest.s >&5 | |
10573 | fi | |
10574 | rm -f conftest.o conftest.s | |
10575 | fi | |
cafe096b | 10576 | fi |
ba479fd2 NN |
10577 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
10578 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 10579 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
10580 | |
10581 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 10582 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 10583 | _ACEOF |
cf7b8b0d | 10584 | |
8ada417f | 10585 | fi |
ba479fd2 | 10586 | |
8ada417f | 10587 | fi # unaligned pcrel relocs |
cf7b8b0d | 10588 | |
ba479fd2 NN |
10589 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
10590 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
10591 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
10592 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 10593 | else |
8ada417f ZW |
10594 | gcc_cv_as_sparc_offsetable_lo10=no |
10595 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10596 | echo '.text |
8ada417f ZW |
10597 | or %g1, %lo(ab) + 12, %g1 |
10598 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
10599 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
10600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10601 | (eval $ac_try) 2>&5 | |
10602 | ac_status=$? | |
10603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10604 | (exit $ac_status); }; } | |
8ada417f ZW |
10605 | then |
10606 | if test x$gcc_cv_objdump != x \ | |
10607 | && %gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ | |
10608 | | grep ' 82106000 82106000' > /dev/null 2>&1; then | |
10609 | gcc_cv_as_offsetable_lo10=yes | |
10610 | fi | |
10611 | else | |
10612 | echo "configure: failed program was" >&5 | |
10613 | cat conftest.s >&5 | |
10614 | fi | |
10615 | rm -f conftest.o conftest.s | |
10616 | fi | |
cafe096b | 10617 | fi |
ba479fd2 NN |
10618 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
10619 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 10620 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
10621 | |
10622 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 10623 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 10624 | _ACEOF |
1cb36a98 | 10625 | |
8ada417f | 10626 | fi |
1cb36a98 RH |
10627 | ;; |
10628 | ||
c307e6dd | 10629 | i[34567]86-*-* | x86_64-*-*) |
ba479fd2 NN |
10630 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
10631 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
10632 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
10633 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10634 | else |
10635 | gcc_cv_as_ix86_filds_fists=no | |
10636 | if test $in_tree_gas = yes; then | |
10637 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
10638 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 10639 | fi |
8ada417f | 10640 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10641 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
10642 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10643 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10644 | (eval $ac_try) 2>&5 | |
10645 | ac_status=$? | |
10646 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10647 | (exit $ac_status); }; } | |
8ada417f ZW |
10648 | then |
10649 | gcc_cv_as_ix86_filds_fists=yes | |
10650 | else | |
10651 | echo "configure: failed program was" >&5 | |
10652 | cat conftest.s >&5 | |
981d4858 | 10653 | fi |
8ada417f ZW |
10654 | rm -f conftest.o conftest.s |
10655 | fi | |
10656 | fi | |
ba479fd2 NN |
10657 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
10658 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 10659 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
10660 | |
10661 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 10662 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 10663 | _ACEOF |
ad9c4d9f | 10664 | |
f6f5dff2 RO |
10665 | fi |
10666 | ||
ba479fd2 NN |
10667 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
10668 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
10669 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
10670 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
10671 | else |
10672 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
10673 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10674 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
10675 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10676 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10677 | (eval $ac_try) 2>&5 | |
10678 | ac_status=$? | |
10679 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10680 | (exit $ac_status); }; } | |
f6f5dff2 RO |
10681 | then |
10682 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
10683 | else | |
10684 | echo "configure: failed program was" >&5 | |
10685 | cat conftest.s >&5 | |
10686 | fi | |
10687 | rm -f conftest.o conftest.s | |
10688 | fi | |
10689 | fi | |
ba479fd2 NN |
10690 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
10691 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 10692 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
10693 | |
10694 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 10695 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 10696 | _ACEOF |
f6f5dff2 | 10697 | |
ad9c4d9f NN |
10698 | fi |
10699 | ||
6f3ca281 ZW |
10700 | # This one is used unconditionally by i386.[ch]; it is to be defined |
10701 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
10702 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
10703 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
10704 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
10705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10706 | else |
10707 | gcc_cv_as_ix86_gotoff_in_data=no | |
10708 | if test $in_tree_gas = yes; then | |
10709 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
10710 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
10711 | fi | |
10712 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10713 | echo ' .text |
f88c65f7 RH |
10714 | .L0: |
10715 | nop | |
10716 | .data | |
8ada417f | 10717 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
10718 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10719 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10720 | (eval $ac_try) 2>&5 | |
10721 | ac_status=$? | |
10722 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10723 | (exit $ac_status); }; } | |
8ada417f ZW |
10724 | then |
10725 | gcc_cv_as_ix86_gotoff_in_data=yes | |
10726 | else | |
10727 | echo "configure: failed program was" >&5 | |
10728 | cat conftest.s >&5 | |
f88c65f7 | 10729 | fi |
8ada417f ZW |
10730 | rm -f conftest.o conftest.s |
10731 | fi | |
10732 | fi | |
ba479fd2 NN |
10733 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
10734 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 10735 | |
6f3ca281 | 10736 | |
ba479fd2 | 10737 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 10738 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 10739 | _ACEOF |
f88c65f7 | 10740 | |
1cb36a98 | 10741 | ;; |
ef1ecf87 RH |
10742 | |
10743 | ia64*-*-*) | |
ba479fd2 NN |
10744 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
10745 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
10746 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
10747 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 10748 | else |
8ada417f ZW |
10749 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
10750 | if test $in_tree_gas = yes; then | |
10751 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
10752 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 10753 | fi |
8ada417f | 10754 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10755 | echo ' .text |
ef1ecf87 RH |
10756 | addl r15 = @ltoffx(x#), gp |
10757 | ;; | |
cfa9ee99 | 10758 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
10759 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10760 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10761 | (eval $ac_try) 2>&5 | |
10762 | ac_status=$? | |
10763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10764 | (exit $ac_status); }; } | |
8ada417f | 10765 | then |
cfa9ee99 | 10766 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
10767 | else |
10768 | echo "configure: failed program was" >&5 | |
10769 | cat conftest.s >&5 | |
2c4a9cff | 10770 | fi |
8ada417f ZW |
10771 | rm -f conftest.o conftest.s |
10772 | fi | |
10773 | fi | |
ba479fd2 NN |
10774 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
10775 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 10776 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
10777 | |
10778 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 10779 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 10780 | _ACEOF |
8ada417f | 10781 | |
cfa9ee99 | 10782 | fi |
8ada417f | 10783 | |
2c4a9cff | 10784 | ;; |
8ada417f | 10785 | |
2c4a9cff | 10786 | powerpc*-*-*) |
8ada417f ZW |
10787 | case $target in |
10788 | *-*-aix) conftest_s=' .csect .textPR';; | |
10789 | *) conftest_s=' .text';; | |
10790 | esac | |
10791 | conftest_s="$conftest_s | |
10792 | mfcr 3,128" | |
10793 | ||
ba479fd2 NN |
10794 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
10795 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
10796 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
10797 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 10798 | else |
8ada417f ZW |
10799 | gcc_cv_as_powerpc_mfcrf=no |
10800 | if test $in_tree_gas = yes; then | |
10801 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
10802 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 10803 | fi |
8ada417f | 10804 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 10805 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
10806 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10808 | (eval $ac_try) 2>&5 | |
10809 | ac_status=$? | |
10810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10811 | (exit $ac_status); }; } | |
8ada417f ZW |
10812 | then |
10813 | gcc_cv_as_powerpc_mfcrf=yes | |
10814 | else | |
10815 | echo "configure: failed program was" >&5 | |
10816 | cat conftest.s >&5 | |
10817 | fi | |
10818 | rm -f conftest.o conftest.s | |
10819 | fi | |
2c4a9cff | 10820 | fi |
ba479fd2 NN |
10821 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
10822 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 10823 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
10824 | |
10825 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 10826 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 10827 | _ACEOF |
ef1ecf87 | 10828 | |
8ada417f ZW |
10829 | fi |
10830 | ;; | |
10831 | ||
10832 | mips*-*-*) | |
ba479fd2 NN |
10833 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
10834 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
10835 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
10836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10837 | else |
10838 | gcc_cv_as_mips_explicit_relocs=no | |
10839 | if test $in_tree_gas = yes; then | |
10840 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
10841 | then gcc_cv_as_mips_explicit_relocs=yes | |
10842 | fi | |
10843 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10844 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
10845 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10846 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10847 | (eval $ac_try) 2>&5 | |
10848 | ac_status=$? | |
10849 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10850 | (exit $ac_status); }; } | |
8ada417f ZW |
10851 | then |
10852 | gcc_cv_as_mips_explicit_relocs=yes | |
10853 | else | |
10854 | echo "configure: failed program was" >&5 | |
10855 | cat conftest.s >&5 | |
ef1ecf87 | 10856 | fi |
8ada417f ZW |
10857 | rm -f conftest.o conftest.s |
10858 | fi | |
10859 | fi | |
ba479fd2 NN |
10860 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
10861 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
10862 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
10863 | if test x$target_cpu_default = x | |
10864 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
10865 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
10866 | fi | |
10867 | fi | |
10868 | ||
ef1ecf87 | 10869 | ;; |
1cb36a98 | 10870 | esac |
9d147085 RH |
10871 | # ??? Not all targets support dwarf2 debug_line, even within a version |
10872 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
10873 | # info to the output file. So, as supported targets are added to gas 2.11, | |
10874 | # add some instruction here to (also) show we expect this might work. | |
10875 | # ??? Once 2.11 is released, probably need to add first known working | |
10876 | # version to the per-target configury. | |
10877 | case "$target" in | |
80486e06 | 10878 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 10879 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
d116bdf8 | 10880 | | xstormy16*-*-* | cris-*-* | xtensa-*-*) |
9d147085 RH |
10881 | insn="nop" |
10882 | ;; | |
10883 | ia64*-*-*) | |
10884 | insn="nop 0" | |
10885 | ;; | |
2853bc5a HPN |
10886 | mmix-*-*) |
10887 | insn="swym 0" | |
10888 | ;; | |
8ada417f ZW |
10889 | esac |
10890 | if test x"$insn" != x; then | |
10891 | conftest_s="\ | |
10892 | .file 1 \"conftest.s\" | |
10893 | .loc 1 3 0 | |
10894 | $insn" | |
ba479fd2 NN |
10895 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
10896 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
10897 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
10898 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10899 | else |
10900 | gcc_cv_as_dwarf2_debug_line=no | |
10901 | if test $in_tree_gas = yes; then | |
10902 | if test $in_tree_gas_is_elf = yes \ | |
10903 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
10904 | then gcc_cv_as_dwarf2_debug_line=yes | |
10905 | fi | |
10906 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10907 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
10908 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10909 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10910 | (eval $ac_try) 2>&5 | |
10911 | ac_status=$? | |
10912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10913 | (exit $ac_status); }; } | |
8ada417f ZW |
10914 | then |
10915 | # ??? This fails with non-gnu grep. Maybe use objdump? | |
10916 | if grep debug_line conftest.o > /dev/null 2>&1; then | |
10917 | gcc_cv_as_dwarf2_debug_line=yes | |
10918 | fi | |
10919 | else | |
10920 | echo "configure: failed program was" >&5 | |
10921 | cat conftest.s >&5 | |
10922 | fi | |
10923 | rm -f conftest.o conftest.s | |
10924 | fi | |
10925 | fi | |
ba479fd2 NN |
10926 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
10927 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 10928 | |
ad9c4d9f | 10929 | |
8ada417f ZW |
10930 | # The .debug_line file table must be in the exact order that |
10931 | # we specified the files, since these indices are also used | |
10932 | # by DW_AT_decl_file. Approximate this test by testing if | |
10933 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
10934 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
10935 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
10936 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
10937 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10938 | else |
10939 | gcc_cv_as_dwarf2_file_buggy=no | |
10940 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 10941 | echo ' .file 1 "foo.s" |
8ada417f | 10942 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
10943 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
10944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10945 | (eval $ac_try) 2>&5 | |
10946 | ac_status=$? | |
10947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10948 | (exit $ac_status); }; } | |
8ada417f ZW |
10949 | then |
10950 | gcc_cv_as_dwarf2_file_buggy=yes | |
10951 | else | |
10952 | echo "configure: failed program was" >&5 | |
10953 | cat conftest.s >&5 | |
10954 | fi | |
10955 | rm -f conftest.o conftest.s | |
10956 | fi | |
ad9c4d9f | 10957 | fi |
ba479fd2 NN |
10958 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
10959 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
10960 | |
10961 | ||
10962 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
10963 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
10964 | |
10965 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 10966 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 10967 | _ACEOF |
9d147085 | 10968 | |
8ada417f | 10969 | fi |
ad9c4d9f | 10970 | |
ba479fd2 NN |
10971 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
10972 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
10973 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
10974 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
10975 | else |
10976 | gcc_cv_as_gdwarf2_flag=no | |
10977 | if test $in_tree_gas = yes; then | |
10978 | if test $in_tree_gas_is_elf = yes \ | |
10979 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
10980 | then gcc_cv_as_gdwarf2_flag=yes | |
10981 | fi | |
10982 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 10983 | echo "$insn" > conftest.s |
ba479fd2 NN |
10984 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
10985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10986 | (eval $ac_try) 2>&5 | |
10987 | ac_status=$? | |
10988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10989 | (exit $ac_status); }; } | |
8ada417f ZW |
10990 | then |
10991 | gcc_cv_as_gdwarf2_flag=yes | |
10992 | else | |
10993 | echo "configure: failed program was" >&5 | |
10994 | cat conftest.s >&5 | |
10995 | fi | |
10996 | rm -f conftest.o conftest.s | |
10997 | fi | |
ad9c4d9f | 10998 | fi |
ba479fd2 NN |
10999 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
11000 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 11001 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
11002 | |
11003 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11004 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 11005 | _ACEOF |
5f0e9ea2 GK |
11006 | |
11007 | fi | |
ad9c4d9f | 11008 | |
ba479fd2 NN |
11009 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
11010 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
11011 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
11012 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
11013 | else |
11014 | gcc_cv_as_gstabs_flag=no | |
11015 | if test $in_tree_gas = yes; then | |
11016 | if test $in_tree_gas_is_elf = yes \ | |
11017 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
11018 | then gcc_cv_as_gstabs_flag=yes | |
11019 | fi | |
11020 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 11021 | echo "$insn" > conftest.s |
ba479fd2 NN |
11022 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
11023 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11024 | (eval $ac_try) 2>&5 | |
11025 | ac_status=$? | |
11026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11027 | (exit $ac_status); }; } | |
8ada417f ZW |
11028 | then |
11029 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
11030 | # and warns about it, but still exits successfully. So check for | |
11031 | # this. | |
ba479fd2 NN |
11032 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
11033 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11034 | (eval $ac_try) 2>&5 | |
11035 | ac_status=$? | |
11036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11037 | (exit $ac_status); }; } | |
8ada417f ZW |
11038 | then : |
11039 | else gcc_cv_as_gstabs_flag=yes | |
11040 | fi | |
11041 | else | |
11042 | echo "configure: failed program was" >&5 | |
11043 | cat conftest.s >&5 | |
11044 | fi | |
11045 | rm -f conftest.o conftest.s | |
11046 | fi | |
ad9c4d9f | 11047 | fi |
ba479fd2 NN |
11048 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
11049 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 11050 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
11051 | |
11052 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 11053 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 11054 | _ACEOF |
5f0e9ea2 GK |
11055 | |
11056 | fi | |
8ada417f | 11057 | fi |
5f0e9ea2 | 11058 | |
ba479fd2 NN |
11059 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
11060 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 11061 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 11062 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11063 | 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 \ |
11064 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
11065 | gcc_cv_ld_ro_rw_mix=read-write |
11066 | fi | |
11067 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
11068 | echo '.section myfoosect, "a"' > conftest1.s |
11069 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 11070 | echo '.byte 1' >> conftest2.s |
90e145da | 11071 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 11072 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
11073 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
11074 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
11075 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 11076 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 11077 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 11078 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 11079 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
11080 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
11081 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
11082 | gcc_cv_ld_ro_rw_mix=read-only | |
11083 | else | |
11084 | gcc_cv_ld_ro_rw_mix=read-write | |
11085 | fi | |
11086 | fi | |
11087 | fi | |
11088 | rm -f conftest.* conftest[123].* | |
11089 | fi | |
11090 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
11091 | |
11092 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 11093 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 11094 | _ACEOF |
96d0f4dc JJ |
11095 | |
11096 | fi | |
ba479fd2 NN |
11097 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
11098 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 11099 | |
ba479fd2 NN |
11100 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
11101 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 11102 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 11103 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
11104 | 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 \ |
11105 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
11106 | gcc_cv_ld_eh_frame_hdr=yes |
11107 | fi | |
11108 | elif test x$gcc_cv_ld != x; then | |
11109 | # Check if linker supports --eh-frame-hdr option | |
11110 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
11111 | gcc_cv_ld_eh_frame_hdr=yes | |
11112 | fi | |
11113 | fi | |
11114 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
ba479fd2 NN |
11115 | |
11116 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 11117 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 11118 | _ACEOF |
275b60d6 JJ |
11119 | |
11120 | fi | |
ba479fd2 NN |
11121 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
11122 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 11123 | |
ba479fd2 NN |
11124 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
11125 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
11126 | gcc_cv_ld_pie=no |
11127 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
11128 | 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 \ |
11129 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
11130 | gcc_cv_ld_pie=yes |
11131 | fi | |
11132 | elif test x$gcc_cv_ld != x; then | |
11133 | # Check if linker supports -pie option | |
11134 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
11135 | gcc_cv_ld_pie=yes | |
11136 | fi | |
11137 | fi | |
11138 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
11139 | |
11140 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 11141 | #define HAVE_LD_PIE 1 |
ba479fd2 | 11142 | _ACEOF |
24a4dd31 JJ |
11143 | |
11144 | fi | |
ba479fd2 NN |
11145 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
11146 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 11147 | |
9fb28a67 | 11148 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 11149 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
11150 | |
11151 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 11152 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 11153 | _ACEOF |
793e9558 PB |
11154 | |
11155 | fi | |
11156 | ||
861bb6c1 | 11157 | # Figure out what language subdirectories are present. |
71205e0b MH |
11158 | # Look if the user specified --enable-languages="..."; if not, use |
11159 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
11160 | # go away some day. | |
cc9a08e0 | 11161 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
11162 | if test x"${enable_languages+set}" != xset; then |
11163 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 11164 | enable_languages="${LANGUAGES}" |
ba479fd2 NN |
11165 | { echo "$as_me:$LINENO: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&5 |
11166 | echo "$as_me: WARNING: setting LANGUAGES is deprecated, use --enable-languages instead" >&2;} | |
cc9a08e0 | 11167 | |
71205e0b MH |
11168 | else |
11169 | enable_languages=all | |
11170 | fi | |
d6c6b553 | 11171 | else |
015089dd TJ |
11172 | if test x"${enable_languages}" = x \ |
11173 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 11174 | then |
ba479fd2 NN |
11175 | { { echo "$as_me:$LINENO: error: --enable-languages needs at least one language argument" >&5 |
11176 | echo "$as_me: error: --enable-languages needs at least one language argument" >&2;} | |
11177 | { (exit 1); exit 1; }; } | |
d6c6b553 | 11178 | fi |
71205e0b | 11179 | fi |
cc9a08e0 | 11180 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
11181 | |
11182 | # First scan to see if an enabled language requires some other language. | |
11183 | # We assume that a given config-lang.in will list all the language | |
11184 | # front ends it requires, even if some are required indirectly. | |
c406e779 | 11185 | for lang in ${srcdir}/*/config-lang.in |
75382c6d TT |
11186 | do |
11187 | case $lang in | |
75382c6d TT |
11188 | # The odd quoting in the next line works around |
11189 | # an apparent bug in bash 1.12 on linux. | |
11190 | ${srcdir}/[*]/config-lang.in) | |
11191 | ;; | |
11192 | *) | |
11193 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
11194 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
11195 | for other in $this_lang_requires | |
11196 | do | |
11197 | case ,${enable_languages}, in | |
11198 | *,$other,*) | |
11199 | ;; | |
11200 | *,all,*) | |
11201 | ;; | |
1bf17cc4 | 11202 | *,$lang_alias,*) |
75382c6d TT |
11203 | enable_languages="$enable_languages,$other" |
11204 | ;; | |
11205 | esac | |
11206 | done | |
11207 | ;; | |
11208 | esac | |
11209 | done | |
11210 | ||
015089dd TJ |
11211 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
11212 | found_languages= | |
861bb6c1 | 11213 | subdirs= |
c406e779 | 11214 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 JL |
11215 | do |
11216 | case $lang in | |
861bb6c1 JL |
11217 | # The odd quoting in the next line works around |
11218 | # an apparent bug in bash 1.12 on linux. | |
11219 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
11220 | *) |
11221 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
11222 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
11223 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
11224 | if test "x$lang_alias" = x |
11225 | then | |
11226 | echo "$lang doesn't set \$language." 1>&2 | |
11227 | exit 1 | |
11228 | fi | |
2b60b2cb AO |
11229 | case ${build_by_default},${enable_languages}, in |
11230 | *,$lang_alias,*) add_this_lang=yes ;; | |
11231 | no,*) add_this_lang=no ;; | |
11232 | *,all,*) add_this_lang=yes ;; | |
11233 | *) add_this_lang=no ;; | |
11234 | esac | |
015089dd | 11235 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
11236 | if test x"${add_this_lang}" = xyes; then |
11237 | case $lang in | |
11238 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 11239 | if test x$have_gnat = xyes ; then |
71205e0b MH |
11240 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
11241 | fi | |
11242 | ;; | |
11243 | *) | |
11244 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
11245 | ;; | |
11246 | esac | |
11247 | fi | |
11248 | ;; | |
861bb6c1 JL |
11249 | esac |
11250 | done | |
11251 | ||
015089dd TJ |
11252 | missing_languages= |
11253 | for expected_language in ${expected_languages} .. | |
ba479fd2 | 11254 | do |
015089dd TJ |
11255 | if test "${expected_language}" != ..; then |
11256 | missing_language="${expected_language}" | |
11257 | if test "${expected_language}" = "c" \ | |
11258 | || test "${expected_language}" = "all"; then | |
11259 | missing_language= | |
11260 | fi | |
11261 | for found_language in ${found_languages} .. | |
ba479fd2 | 11262 | do |
015089dd TJ |
11263 | if test "${found_language}" != ..; then |
11264 | if test "${expected_language}" = "${found_language}"; then | |
11265 | missing_language= | |
11266 | fi | |
11267 | fi | |
11268 | done | |
11269 | if test "x${missing_language}" != x; then | |
11270 | missing_languages="${missing_languages} ${missing_language}" | |
11271 | fi | |
11272 | fi | |
11273 | done | |
11274 | ||
11275 | if test "x$missing_languages" != x; then | |
ba479fd2 | 11276 | { { echo "$as_me:$LINENO: error: |
015089dd | 11277 | The following requested languages were not found:${missing_languages} |
ba479fd2 NN |
11278 | The following languages were available: c${found_languages}" >&5 |
11279 | echo "$as_me: error: | |
11280 | The following requested languages were not found:${missing_languages} | |
11281 | The following languages were available: c${found_languages}" >&2;} | |
11282 | { (exit 1); exit 1; }; } | |
02ef40d9 TJ |
11283 | fi |
11284 | ||
f24af81b TT |
11285 | # Make gthr-default.h if we have a thread file. |
11286 | gthread_flags= | |
75bffa71 | 11287 | if test $thread_file != single; then |
f24af81b | 11288 | rm -f gthr-default.h |
db0d1ed9 | 11289 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
11290 | gthread_flags=-DHAVE_GTHR_DEFAULT |
11291 | fi | |
11292 | ||
11293 | ||
81bf3d9e | 11294 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 11295 | |
81bf3d9e RH |
11296 | # Check whether --with-gc or --without-gc was given. |
11297 | if test "${with_gc+set}" = set; then | |
11298 | withval="$with_gc" | |
11299 | case "$withval" in | |
59415997 | 11300 | page | zone) |
81bf3d9e RH |
11301 | GGC=ggc-$withval |
11302 | ;; | |
11303 | *) | |
ba479fd2 NN |
11304 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
11305 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
11306 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
11307 | ;; |
11308 | esac | |
11309 | else | |
005537df | 11310 | GGC=ggc-page |
ba479fd2 | 11311 | fi; |
81bf3d9e RH |
11312 | |
11313 | echo "Using $GGC for garbage collection." | |
11314 | ||
3c809ba4 | 11315 | # Use the system's zlib library. |
b8dad04b ZW |
11316 | zlibdir=-L../zlib |
11317 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 11318 | |
3c809ba4 AG |
11319 | # Check whether --with-system-zlib or --without-system-zlib was given. |
11320 | if test "${with_system_zlib+set}" = set; then | |
11321 | withval="$with_system_zlib" | |
11322 | zlibdir= | |
11323 | zlibinc= | |
11324 | ||
ba479fd2 | 11325 | fi; |
3c809ba4 AG |
11326 | |
11327 | ||
11328 | ||
dc6746e7 | 11329 | |
ba479fd2 NN |
11330 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
11331 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
11332 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
11333 | if test "${enable_maintainer_mode+set}" = set; then | |
11334 | enableval="$enable_maintainer_mode" | |
11335 | maintainer_mode=$enableval | |
11336 | else | |
11337 | maintainer_mode=no | |
ba479fd2 | 11338 | fi; |
63cf211a | 11339 | |
ba479fd2 NN |
11340 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
11341 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
11342 | |
11343 | if test "$maintainer_mode" = "yes"; then | |
11344 | MAINT='' | |
11345 | else | |
11346 | MAINT='#' | |
11347 | fi | |
11348 | ||
861bb6c1 JL |
11349 | # Make empty files to contain the specs and options for each language. |
11350 | # Then add #include lines to for a compiler that has specs and/or options. | |
11351 | ||
d7b42618 | 11352 | lang_opt_files= |
861bb6c1 | 11353 | lang_specs_files= |
3103b7db | 11354 | lang_tree_files= |
861bb6c1 JL |
11355 | for subdir in . $subdirs |
11356 | do | |
d7b42618 NB |
11357 | if test -f $srcdir/$subdir/lang.opt; then |
11358 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
11359 | fi | |
75bffa71 | 11360 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 11361 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 11362 | fi |
3103b7db | 11363 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 11364 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 11365 | fi |
861bb6c1 JL |
11366 | done |
11367 | ||
11368 | # These (without "all_") are set in each config-lang.in. | |
11369 | # `language' must be a single word so is spelled singularly. | |
11370 | all_languages= | |
11371 | all_boot_languages= | |
11372 | all_compilers= | |
11373 | all_stagestuff= | |
6eb95e99 | 11374 | all_outputs='Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 | 11375 | # List of language makefile fragments. |
2ed26f6b ZW |
11376 | all_lang_makefrags= |
11377 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 11378 | all_lang_makefiles= |
e2500fed | 11379 | # Files for gengtype |
ef69da62 | 11380 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
11381 | # Files for gengtype with language |
11382 | all_gtfiles_files_langs= | |
11383 | all_gtfiles_files_files= | |
861bb6c1 JL |
11384 | |
11385 | # Add the language fragments. | |
11386 | # Languages are added via two mechanisms. Some information must be | |
11387 | # recorded in makefile variables, these are defined in config-lang.in. | |
11388 | # We accumulate them and plug them into the main Makefile. | |
11389 | # The other mechanism is a set of hooks for each of the main targets | |
11390 | # like `clean', `install', etc. | |
11391 | ||
861bb6c1 | 11392 | language_hooks="Make-hooks" |
861bb6c1 | 11393 | |
c406e779 | 11394 | for s in $subdirs |
861bb6c1 | 11395 | do |
861bb6c1 JL |
11396 | language= |
11397 | boot_language= | |
11398 | compilers= | |
11399 | stagestuff= | |
861bb6c1 | 11400 | outputs= |
e2500fed | 11401 | gtfiles= |
861bb6c1 | 11402 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 11403 | if test "x$language" = x |
861bb6c1 JL |
11404 | then |
11405 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
11406 | exit 1 | |
11407 | fi | |
2ed26f6b | 11408 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$s/Make-lang.in" |
72aaffbd | 11409 | if test -f ${srcdir}/$s/Makefile.in |
2ed26f6b | 11410 | then all_lang_makefiles="$s/Makefile" |
72aaffbd | 11411 | fi |
861bb6c1 | 11412 | all_languages="$all_languages $language" |
75bffa71 | 11413 | if test "x$boot_language" = xyes |
861bb6c1 JL |
11414 | then |
11415 | all_boot_languages="$all_boot_languages $language" | |
11416 | fi | |
11417 | all_compilers="$all_compilers $compilers" | |
11418 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 11419 | all_outputs="$all_outputs $outputs" |
e2500fed | 11420 | all_gtfiles="$all_gtfiles $gtfiles" |
c406e779 | 11421 | for f in $gtfiles |
8ac9d31f | 11422 | do |
8ac9d31f TJ |
11423 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
11424 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f | 11425 | done |
861bb6c1 JL |
11426 | done |
11427 | ||
8ac9d31f TJ |
11428 | # Pick up gtfiles for c |
11429 | gtfiles= | |
11430 | s="c" | |
11431 | . ${srcdir}/c-config-lang.in | |
11432 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 11433 | for f in $gtfiles |
8ac9d31f | 11434 | do |
8ac9d31f TJ |
11435 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " |
11436 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8ac9d31f TJ |
11437 | done |
11438 | ||
cbc59f01 | 11439 | check_languages= |
c406e779 | 11440 | for language in $all_languages |
cbc59f01 | 11441 | do |
cbc59f01 | 11442 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
11443 | done |
11444 | ||
62b81e45 MM |
11445 | # We link each language in with a set of hooks, reached indirectly via |
11446 | # lang.${target}. | |
861bb6c1 JL |
11447 | |
11448 | rm -f Make-hooks | |
11449 | touch Make-hooks | |
65ebbf81 | 11450 | target_list="all.build all.cross start.encap rest.encap tags \ |
a207b594 | 11451 | install-normal install-common install-man \ |
03787dfd | 11452 | uninstall srcextra \ |
a03ad584 | 11453 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 11454 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
11455 | for t in $target_list |
11456 | do | |
11457 | x= | |
c406e779 | 11458 | for lang in $all_languages |
861bb6c1 | 11459 | do |
ab87f8c8 | 11460 | x="$x $lang.$t" |
861bb6c1 JL |
11461 | done |
11462 | echo "lang.$t: $x" >> Make-hooks | |
11463 | done | |
11464 | ||
cc06d68c | 11465 | # Create .gdbinit. |
861bb6c1 | 11466 | |
cc06d68c GP |
11467 | echo "dir ." > .gdbinit |
11468 | echo "dir ${srcdir}" >> .gdbinit | |
11469 | if test x$gdb_needs_out_file_path = xyes | |
11470 | then | |
11471 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
11472 | fi | |
11473 | if test "x$subdirs" != x; then | |
11474 | for s in $subdirs | |
11475 | do | |
11476 | echo "dir ${srcdir}/$s" >> .gdbinit | |
11477 | done | |
861bb6c1 | 11478 | fi |
cc06d68c | 11479 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 11480 | |
8f8d3278 NC |
11481 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
11482 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
11483 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
11484 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
11485 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
11486 | # make and thus we'd get different behavior depending on where we built the | |
11487 | # sources. | |
5949a9fc | 11488 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 11489 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 11490 | else |
8f8d3278 NC |
11491 | # An explanation of the sed strings: |
11492 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
11493 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
11494 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 11495 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
11496 | # |
11497 | # (*) Note this pattern overwrites the first character of the string | |
11498 | # with a forward slash if one is not already present. This is not a | |
11499 | # problem because the exact names of the sub-directories concerned is | |
11500 | # unimportant, just the number of them matters. | |
11501 | # | |
11502 | # The practical upshot of these patterns is like this: | |
11503 | # | |
11504 | # prefix exec_prefix result | |
11505 | # ------ ----------- ------ | |
11506 | # /foo /foo/bar ../ | |
11507 | # /foo/ /foo/bar ../ | |
11508 | # /foo /foo/bar/ ../ | |
11509 | # /foo/ /foo/bar/ ../ | |
11510 | # /foo /foo/bar/ugg ../../ | |
11511 | # | |
4c112cda | 11512 | dollar='$$' |
caa55b1e | 11513 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
11514 | fi |
11515 | ||
11516 | ||
2ce3c6c6 | 11517 | |
2bbea3a6 RH |
11518 | # Find a directory in which to install a shared libgcc. |
11519 | ||
11520 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
11521 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
11522 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
11523 | |
11524 | fi; | |
2bbea3a6 RH |
11525 | |
11526 | ||
5b15f277 RH |
11527 | # Check whether --with-slibdir or --without-slibdir was given. |
11528 | if test "${with_slibdir+set}" = set; then | |
11529 | withval="$with_slibdir" | |
11530 | slibdir="$with_slibdir" | |
11531 | else | |
11532 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 11533 | slibdir='$(libsubdir)' |
5b15f277 | 11534 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
11535 | slibdir='$(build_tooldir)/lib' |
11536 | else | |
5b15f277 | 11537 | slibdir='$(libdir)' |
2bbea3a6 | 11538 | fi |
ba479fd2 | 11539 | fi; |
2bbea3a6 RH |
11540 | |
11541 | ||
1e6347d8 | 11542 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
11543 | |
11544 | ||
861bb6c1 JL |
11545 | # Substitute configuration variables |
11546 | ||
11547 | ||
11548 | ||
11549 | ||
11550 | ||
11551 | ||
11552 | ||
11553 | ||
11554 | ||
11555 | ||
11556 | ||
11557 | ||
11558 | ||
11559 | ||
11560 | ||
11561 | ||
11562 | ||
11563 | ||
11564 | ||
11565 | ||
11566 | ||
11567 | ||
11568 | ||
11569 | ||
11570 | ||
11571 | ||
11572 | ||
11573 | ||
11574 | ||
11575 | ||
11576 | ||
11577 | ||
11578 | ||
11579 | ||
11580 | ||
11581 | ||
11582 | ||
11583 | ||
11584 | ||
11585 | ||
11586 | ||
11587 | ||
11588 | ||
11589 | ||
11590 | ||
11591 | ||
9b16d2c4 | 11592 | |
e9a25f70 | 11593 | |
6e26218f | 11594 | |
c8724862 | 11595 | |
e061d1ce | 11596 | |
d8bb17c8 | 11597 | |
11642c3a ZW |
11598 | |
11599 | ||
11600 | ||
11601 | ||
11602 | ||
11603 | ||
11604 | ||
3d9d2476 | 11605 | |
596151e1 | 11606 | |
8ac9d31f TJ |
11607 | |
11608 | ||
11609 | ||
e2500fed | 11610 | |
51b9ff45 KC |
11611 | |
11612 | ||
861bb6c1 JL |
11613 | |
11614 | ||
6e3f3080 NN |
11615 | # Echo link setup. |
11616 | if test x${build} = x${host} ; then | |
11617 | if test x${host} = x${target} ; then | |
11618 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
11619 | else | |
11620 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
11621 | echo " from ${host} to ${target}." 1>&2 | |
11622 | fi | |
11623 | else | |
11624 | if test x${host} = x${target} ; then | |
11625 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
11626 | echo " for ${target}." 1>&2 | |
11627 | else | |
11628 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
11629 | echo " from ${host} to ${target}." 1>&2 | |
11630 | fi | |
11631 | fi | |
11632 | ||
11633 | # Configure the subdirectories | |
11634 | # AC_CONFIG_SUBDIRS($subdirs) | |
11635 | ||
11636 | # Create the Makefile | |
11637 | # and configure language subdirectories | |
ba479fd2 | 11638 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
11639 | |
11640 | ||
ba479fd2 | 11641 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 11642 | |
ba479fd2 | 11643 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
11644 | # This file is a shell script that caches the results of configure |
11645 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
11646 | # scripts and configure runs, see configure's option --config-cache. |
11647 | # It is not useful on other systems. If it contains results you don't | |
11648 | # want to keep, you may remove or edit it. | |
6e3f3080 | 11649 | # |
ba479fd2 NN |
11650 | # config.status only pays attention to the cache file if you give it |
11651 | # the --recheck option to rerun configure. | |
6e3f3080 | 11652 | # |
ba479fd2 NN |
11653 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
11654 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
11655 | # following values. | |
11656 | ||
11657 | _ACEOF | |
11658 | ||
6e3f3080 NN |
11659 | # The following way of writing the cache mishandles newlines in values, |
11660 | # but we know of no workaround that is simple, portable, and efficient. | |
11661 | # So, don't put newlines in cache variables' values. | |
11662 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
11663 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
11664 | { |
11665 | (set) 2>&1 | | |
11666 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
11667 | *ac_space=\ *) | |
11668 | # `set' does not quote correctly, so add quotes (double-quote | |
11669 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
11670 | sed -n \ | |
11671 | "s/'/'\\\\''/g; | |
11672 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
11673 | ;; | |
11674 | *) | |
11675 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
11676 | sed -n \ | |
11677 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
11678 | ;; | |
11679 | esac; | |
11680 | } | | |
11681 | sed ' | |
11682 | t clear | |
11683 | : clear | |
11684 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
11685 | t end | |
11686 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
11687 | : end' >>confcache | |
11688 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 11689 | if test -w $cache_file; then |
ba479fd2 NN |
11690 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
11691 | cat confcache >$cache_file | |
6e3f3080 NN |
11692 | else |
11693 | echo "not updating unwritable cache $cache_file" | |
11694 | fi | |
11695 | fi | |
11696 | rm -f confcache | |
11697 | ||
11698 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
11699 | # Let make expand exec_prefix. | |
11700 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
11701 | ||
ba479fd2 NN |
11702 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
11703 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
11704 | # trailing colons and then remove the whole line if VPATH becomes empty | |
11705 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 11706 | if test "x$srcdir" = x.; then |
ba479fd2 NN |
11707 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
11708 | s/:*\$(srcdir):*/:/; | |
11709 | s/:*\${srcdir}:*/:/; | |
11710 | s/:*@srcdir@:*/:/; | |
11711 | s/^\([^=]*=[ ]*\):*/\1/; | |
11712 | s/:*$//; | |
11713 | s/^[^=]*=[ ]*$//; | |
11714 | }' | |
6e3f3080 NN |
11715 | fi |
11716 | ||
63cf211a | 11717 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 11718 | |
ba479fd2 NN |
11719 | ac_libobjs= |
11720 | ac_ltlibobjs= | |
11721 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
11722 | # 1. Remove the extension, and $U if already installed. | |
11723 | ac_i=`echo "$ac_i" | | |
11724 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` | |
11725 | # 2. Add them. | |
11726 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
11727 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
11728 | done | |
11729 | LIBOBJS=$ac_libobjs | |
63cf211a | 11730 | |
ba479fd2 NN |
11731 | LTLIBOBJS=$ac_ltlibobjs |
11732 | ||
11733 | ||
11734 | ||
11735 | : ${CONFIG_STATUS=./config.status} | |
11736 | ac_clean_files_save=$ac_clean_files | |
11737 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
11738 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
11739 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
11740 | cat >$CONFIG_STATUS <<_ACEOF | |
11741 | #! $SHELL | |
11742 | # Generated by $as_me. | |
6e3f3080 NN |
11743 | # Run this file to recreate the current configuration. |
11744 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 11745 | # configure, is in config.log if it exists. |
6e3f3080 | 11746 | |
ba479fd2 NN |
11747 | debug=false |
11748 | ac_cs_recheck=false | |
11749 | ac_cs_silent=false | |
11750 | SHELL=\${CONFIG_SHELL-$SHELL} | |
11751 | _ACEOF | |
11752 | ||
11753 | cat >>$CONFIG_STATUS <<\_ACEOF | |
11754 | ## --------------------- ## | |
11755 | ## M4sh Initialization. ## | |
11756 | ## --------------------- ## | |
11757 | ||
11758 | # Be Bourne compatible | |
11759 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
11760 | emulate sh | |
11761 | NULLCMD=: | |
11762 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
11763 | # is contrary to our usage. Disable this feature. | |
11764 | alias -g '${1+"$@"}'='"$@"' | |
11765 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
11766 | set -o posix | |
11767 | fi | |
11768 | ||
11769 | # Support unset when possible. | |
11770 | if (FOO=FOO; unset FOO) >/dev/null 2>&1; then | |
11771 | as_unset=unset | |
11772 | else | |
11773 | as_unset=false | |
11774 | fi | |
11775 | ||
11776 | ||
11777 | # Work around bugs in pre-3.0 UWIN ksh. | |
11778 | $as_unset ENV MAIL MAILPATH | |
11779 | PS1='$ ' | |
11780 | PS2='> ' | |
11781 | PS4='+ ' | |
11782 | ||
11783 | # NLS nuisances. | |
11784 | for as_var in \ | |
11785 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
11786 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
11787 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 11788 | do |
ba479fd2 NN |
11789 | if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then |
11790 | eval $as_var=C; export $as_var | |
11791 | else | |
11792 | $as_unset $as_var | |
11793 | fi | |
6e3f3080 NN |
11794 | done |
11795 | ||
ba479fd2 NN |
11796 | # Required to use basename. |
11797 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
11798 | as_expr=expr | |
11799 | else | |
11800 | as_expr=false | |
11801 | fi | |
6e3f3080 | 11802 | |
ba479fd2 NN |
11803 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
11804 | as_basename=basename | |
11805 | else | |
11806 | as_basename=false | |
11807 | fi | |
6e3f3080 NN |
11808 | |
11809 | ||
ba479fd2 NN |
11810 | # Name of the executable. |
11811 | as_me=`$as_basename "$0" || | |
11812 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
11813 | X"$0" : 'X\(//\)$' \| \ | |
11814 | X"$0" : 'X\(/\)$' \| \ | |
11815 | . : '\(.\)' 2>/dev/null || | |
11816 | echo X/"$0" | | |
11817 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
11818 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
11819 | /^X\/\(\/\).*/{ s//\1/; q; } | |
11820 | s/.*/./; q'` | |
11821 | ||
6e3f3080 | 11822 | |
ba479fd2 NN |
11823 | # PATH needs CR, and LINENO needs CR and PATH. |
11824 | # Avoid depending upon Character Ranges. | |
11825 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
11826 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
11827 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
11828 | as_cr_digits='0123456789' | |
11829 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
11830 | ||
11831 | # The user is always right. | |
11832 | if test "${PATH_SEPARATOR+set}" != set; then | |
11833 | echo "#! /bin/sh" >conf$$.sh | |
11834 | echo "exit 0" >>conf$$.sh | |
11835 | chmod +x conf$$.sh | |
11836 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
11837 | PATH_SEPARATOR=';' | |
6e3f3080 | 11838 | else |
ba479fd2 NN |
11839 | PATH_SEPARATOR=: |
11840 | fi | |
11841 | rm -f conf$$.sh | |
11842 | fi | |
11843 | ||
11844 | ||
11845 | as_lineno_1=$LINENO | |
11846 | as_lineno_2=$LINENO | |
11847 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
11848 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
11849 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
11850 | # Find who we are. Look in the path if we contain no path at all | |
11851 | # relative or not. | |
11852 | case $0 in | |
11853 | *[\\/]* ) as_myself=$0 ;; | |
11854 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11855 | for as_dir in $PATH | |
11856 | do | |
11857 | IFS=$as_save_IFS | |
11858 | test -z "$as_dir" && as_dir=. | |
11859 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
11860 | done | |
11861 | ||
11862 | ;; | |
11863 | esac | |
11864 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
11865 | # in which case we are not to be found in the path. | |
11866 | if test "x$as_myself" = x; then | |
11867 | as_myself=$0 | |
11868 | fi | |
11869 | if test ! -f "$as_myself"; then | |
11870 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
11871 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
11872 | { (exit 1); exit 1; }; } | |
6e3f3080 | 11873 | fi |
ba479fd2 NN |
11874 | case $CONFIG_SHELL in |
11875 | '') | |
11876 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
11877 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
11878 | do | |
11879 | IFS=$as_save_IFS | |
11880 | test -z "$as_dir" && as_dir=. | |
11881 | for as_base in sh bash ksh sh5; do | |
11882 | case $as_dir in | |
11883 | /*) | |
11884 | if ("$as_dir/$as_base" -c ' | |
11885 | as_lineno_1=$LINENO | |
11886 | as_lineno_2=$LINENO | |
11887 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
11888 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
11889 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
11890 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
11891 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
11892 | CONFIG_SHELL=$as_dir/$as_base | |
11893 | export CONFIG_SHELL | |
11894 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
11895 | fi;; | |
11896 | esac | |
11897 | done | |
11898 | done | |
11899 | ;; | |
11900 | esac | |
11901 | ||
11902 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
11903 | # uniformly replaced by the line number. The first 'sed' inserts a | |
11904 | # line-number line before each line; the second 'sed' does the real | |
11905 | # work. The second script uses 'N' to pair each line-number line | |
11906 | # with the numbered line, and appends trailing '-' during | |
11907 | # substitution so that $LINENO is not a special case at line end. | |
11908 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
11909 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
11910 | sed '=' <$as_myself | | |
11911 | sed ' | |
11912 | N | |
11913 | s,$,-, | |
11914 | : loop | |
11915 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
11916 | t loop | |
11917 | s,-$,, | |
11918 | s,^['$as_cr_digits']*\n,, | |
11919 | ' >$as_me.lineno && | |
11920 | chmod +x $as_me.lineno || | |
11921 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
11922 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
11923 | { (exit 1); exit 1; }; } | |
11924 | ||
11925 | # Don't try to exec as it changes $[0], causing all sort of problems | |
11926 | # (the dirname of $[0] is not the place where we might find the | |
11927 | # original and so on. Autoconf is especially sensible to this). | |
11928 | . ./$as_me.lineno | |
11929 | # Exit status is that of the last command. | |
11930 | exit | |
11931 | } | |
11932 | ||
11933 | ||
11934 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
11935 | *c*,-n*) ECHO_N= ECHO_C=' | |
11936 | ' ECHO_T=' ' ;; | |
11937 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
11938 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
11939 | esac | |
11940 | ||
11941 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
11942 | as_expr=expr | |
11943 | else | |
11944 | as_expr=false | |
11945 | fi | |
11946 | ||
11947 | rm -f conf$$ conf$$.exe conf$$.file | |
11948 | echo >conf$$.file | |
11949 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
11950 | # We could just check for DJGPP; but this test a) works b) is more generic | |
11951 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
11952 | if test -f conf$$.exe; then | |
11953 | # Don't use ln at all; we don't have any links | |
11954 | as_ln_s='cp -p' | |
6e3f3080 | 11955 | else |
ba479fd2 | 11956 | as_ln_s='ln -s' |
6e3f3080 | 11957 | fi |
ba479fd2 NN |
11958 | elif ln conf$$.file conf$$ 2>/dev/null; then |
11959 | as_ln_s=ln | |
11960 | else | |
11961 | as_ln_s='cp -p' | |
11962 | fi | |
11963 | rm -f conf$$ conf$$.exe conf$$.file | |
11964 | ||
11965 | if mkdir -p . 2>/dev/null; then | |
11966 | as_mkdir_p=: | |
11967 | else | |
11968 | as_mkdir_p=false | |
11969 | fi | |
11970 | ||
11971 | as_executable_p="test -f" | |
11972 | ||
11973 | # Sed expression to map a string onto a valid CPP name. | |
11974 | as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" | |
11975 | ||
11976 | # Sed expression to map a string onto a valid variable name. | |
11977 | as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" | |
11978 | ||
11979 | ||
11980 | # IFS | |
11981 | # We need space, tab and new line, in precisely that order. | |
11982 | as_nl=' | |
11983 | ' | |
11984 | IFS=" $as_nl" | |
11985 | ||
11986 | # CDPATH. | |
11987 | $as_unset CDPATH | |
11988 | ||
11989 | exec 6>&1 | |
11990 | ||
11991 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
11992 | # report actual input values of CONFIG_FILES etc. instead of their | |
11993 | # values after options handling. Logging --version etc. is OK. | |
11994 | exec 5>>config.log | |
11995 | { | |
11996 | echo | |
11997 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
11998 | ## Running $as_me. ## | |
11999 | _ASBOX | |
12000 | } >&5 | |
12001 | cat >&5 <<_CSEOF | |
12002 | ||
12003 | This file was extended by $as_me, which was | |
12004 | generated by GNU Autoconf 2.57. Invocation command line was | |
12005 | ||
12006 | CONFIG_FILES = $CONFIG_FILES | |
12007 | CONFIG_HEADERS = $CONFIG_HEADERS | |
12008 | CONFIG_LINKS = $CONFIG_LINKS | |
12009 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
12010 | $ $0 $@ | |
12011 | ||
12012 | _CSEOF | |
12013 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
12014 | echo >&5 | |
12015 | _ACEOF | |
12016 | ||
12017 | # Files that config.status was made for. | |
12018 | if test -n "$ac_config_files"; then | |
12019 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
12020 | fi | |
12021 | ||
12022 | if test -n "$ac_config_headers"; then | |
12023 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
12024 | fi | |
12025 | ||
12026 | if test -n "$ac_config_links"; then | |
12027 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
12028 | fi | |
12029 | ||
12030 | if test -n "$ac_config_commands"; then | |
12031 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
12032 | fi | |
12033 | ||
12034 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12035 | ||
12036 | ac_cs_usage="\ | |
12037 | \`$as_me' instantiates files from templates according to the | |
12038 | current configuration. | |
12039 | ||
12040 | Usage: $0 [OPTIONS] [FILE]... | |
12041 | ||
12042 | -h, --help print this help, then exit | |
12043 | -V, --version print version number, then exit | |
12044 | -q, --quiet do not print progress messages | |
12045 | -d, --debug don't remove temporary files | |
12046 | --recheck update $as_me by reconfiguring in the same conditions | |
12047 | --file=FILE[:TEMPLATE] | |
12048 | instantiate the configuration file FILE | |
12049 | --header=FILE[:TEMPLATE] | |
12050 | instantiate the configuration header FILE | |
12051 | ||
12052 | Configuration files: | |
12053 | $config_files | |
12054 | ||
12055 | Configuration headers: | |
12056 | $config_headers | |
12057 | ||
12058 | Configuration commands: | |
12059 | $config_commands | |
12060 | ||
12061 | Report bugs to <bug-autoconf@gnu.org>." | |
12062 | _ACEOF | |
12063 | ||
12064 | cat >>$CONFIG_STATUS <<_ACEOF | |
12065 | ac_cs_version="\\ | |
12066 | config.status | |
12067 | configured by $0, generated by GNU Autoconf 2.57, | |
12068 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" | |
12069 | ||
12070 | Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 | |
12071 | Free Software Foundation, Inc. | |
12072 | This config.status script is free software; the Free Software Foundation | |
12073 | gives unlimited permission to copy, distribute and modify it." | |
12074 | srcdir=$srcdir | |
12075 | _ACEOF | |
12076 | ||
12077 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12078 | # If no file are specified by the user, then we need to provide default | |
12079 | # value. By we need to know if files were specified by the user. | |
12080 | ac_need_defaults=: | |
12081 | while test $# != 0 | |
12082 | do | |
12083 | case $1 in | |
12084 | --*=*) | |
12085 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
12086 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
12087 | ac_shift=: | |
12088 | ;; | |
12089 | -*) | |
12090 | ac_option=$1 | |
12091 | ac_optarg=$2 | |
12092 | ac_shift=shift | |
12093 | ;; | |
12094 | *) # This is not an option, so the user has probably given explicit | |
12095 | # arguments. | |
12096 | ac_option=$1 | |
12097 | ac_need_defaults=false;; | |
12098 | esac | |
12099 | ||
12100 | case $ac_option in | |
12101 | # Handling of the options. | |
12102 | _ACEOF | |
12103 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12104 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
12105 | ac_cs_recheck=: ;; | |
12106 | --version | --vers* | -V ) | |
12107 | echo "$ac_cs_version"; exit 0 ;; | |
12108 | --he | --h) | |
12109 | # Conflict between --help and --header | |
12110 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
12111 | Try \`$0 --help' for more information." >&5 | |
12112 | echo "$as_me: error: ambiguous option: $1 | |
12113 | Try \`$0 --help' for more information." >&2;} | |
12114 | { (exit 1); exit 1; }; };; | |
12115 | --help | --hel | -h ) | |
12116 | echo "$ac_cs_usage"; exit 0 ;; | |
12117 | --debug | --d* | -d ) | |
12118 | debug=: ;; | |
12119 | --file | --fil | --fi | --f ) | |
12120 | $ac_shift | |
12121 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
12122 | ac_need_defaults=false;; | |
12123 | --header | --heade | --head | --hea ) | |
12124 | $ac_shift | |
12125 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
12126 | ac_need_defaults=false;; | |
12127 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
12128 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
12129 | ac_cs_silent=: ;; | |
12130 | ||
12131 | # This is an error. | |
12132 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
12133 | Try \`$0 --help' for more information." >&5 | |
12134 | echo "$as_me: error: unrecognized option: $1 | |
12135 | Try \`$0 --help' for more information." >&2;} | |
12136 | { (exit 1); exit 1; }; } ;; | |
12137 | ||
12138 | *) ac_config_targets="$ac_config_targets $1" ;; | |
12139 | ||
12140 | esac | |
12141 | shift | |
6e3f3080 | 12142 | done |
ba479fd2 NN |
12143 | |
12144 | ac_configure_extra_args= | |
12145 | ||
12146 | if $ac_cs_silent; then | |
12147 | exec 6>/dev/null | |
12148 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
12149 | fi |
12150 | ||
ba479fd2 NN |
12151 | _ACEOF |
12152 | cat >>$CONFIG_STATUS <<_ACEOF | |
12153 | if \$ac_cs_recheck; then | |
12154 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
12155 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
12156 | fi | |
861bb6c1 | 12157 | |
ba479fd2 NN |
12158 | _ACEOF |
12159 | ||
12160 | cat >>$CONFIG_STATUS <<_ACEOF | |
12161 | # | |
12162 | # INIT-COMMANDS section. | |
12163 | # | |
12164 | ||
12165 | subdirs='$subdirs' | |
12166 | symbolic_link='$symbolic_link' | |
12167 | ||
12168 | ||
12169 | _ACEOF | |
12170 | ||
12171 | ||
12172 | ||
12173 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12174 | for ac_config_target in $ac_config_targets | |
12175 | do | |
12176 | case "$ac_config_target" in | |
12177 | # Handling of arguments. | |
12178 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
12179 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
12180 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
12181 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
12182 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
12183 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 12184 | esac |
ba479fd2 NN |
12185 | done |
12186 | ||
12187 | # If the user did not use the arguments to specify the items to instantiate, | |
12188 | # then the envvar interface is used. Set only those that are not. | |
12189 | # We use the long form for the default assignment because of an extremely | |
12190 | # bizarre bug on SunOS 4.1.3. | |
12191 | if $ac_need_defaults; then | |
12192 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
12193 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
12194 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
12195 | fi | |
12196 | ||
12197 | # Have a temporary directory for convenience. Make it in the build tree | |
12198 | # simply because there is no reason to put it here, and in addition, | |
12199 | # creating and moving files from /tmp can sometimes cause problems. | |
12200 | # Create a temporary directory, and hook for its removal unless debugging. | |
12201 | $debug || | |
12202 | { | |
12203 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
12204 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
12205 | } | |
861bb6c1 | 12206 | |
ba479fd2 | 12207 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 12208 | |
ba479fd2 NN |
12209 | { |
12210 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
12211 | test -n "$tmp" && test -d "$tmp" | |
12212 | } || | |
12213 | { | |
12214 | tmp=./confstat$$-$RANDOM | |
12215 | (umask 077 && mkdir $tmp) | |
12216 | } || | |
12217 | { | |
12218 | echo "$me: cannot create a temporary directory in ." >&2 | |
12219 | { (exit 1); exit 1; } | |
12220 | } | |
12221 | ||
12222 | _ACEOF | |
12223 | ||
12224 | cat >>$CONFIG_STATUS <<_ACEOF | |
12225 | ||
12226 | # | |
12227 | # CONFIG_FILES section. | |
12228 | # | |
12229 | ||
12230 | # No need to generate the scripts if there are no CONFIG_FILES. | |
12231 | # This happens for instance when ./config.status config.h | |
12232 | if test -n "\$CONFIG_FILES"; then | |
12233 | # Protect against being on the right side of a sed subst in config.status. | |
12234 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
12235 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
12236 | s,@SHELL@,$SHELL,;t t | |
12237 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
12238 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
12239 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
12240 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
12241 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
12242 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
12243 | s,@exec_prefix@,$exec_prefix,;t t | |
12244 | s,@prefix@,$prefix,;t t | |
12245 | s,@program_transform_name@,$program_transform_name,;t t | |
12246 | s,@bindir@,$bindir,;t t | |
12247 | s,@sbindir@,$sbindir,;t t | |
12248 | s,@libexecdir@,$libexecdir,;t t | |
12249 | s,@datadir@,$datadir,;t t | |
12250 | s,@sysconfdir@,$sysconfdir,;t t | |
12251 | s,@sharedstatedir@,$sharedstatedir,;t t | |
12252 | s,@localstatedir@,$localstatedir,;t t | |
12253 | s,@libdir@,$libdir,;t t | |
12254 | s,@includedir@,$includedir,;t t | |
12255 | s,@oldincludedir@,$oldincludedir,;t t | |
12256 | s,@infodir@,$infodir,;t t | |
12257 | s,@mandir@,$mandir,;t t | |
12258 | s,@build_alias@,$build_alias,;t t | |
12259 | s,@host_alias@,$host_alias,;t t | |
12260 | s,@target_alias@,$target_alias,;t t | |
12261 | s,@DEFS@,$DEFS,;t t | |
12262 | s,@ECHO_C@,$ECHO_C,;t t | |
12263 | s,@ECHO_N@,$ECHO_N,;t t | |
12264 | s,@ECHO_T@,$ECHO_T,;t t | |
12265 | s,@LIBS@,$LIBS,;t t | |
12266 | s,@build@,$build,;t t | |
12267 | s,@build_cpu@,$build_cpu,;t t | |
12268 | s,@build_vendor@,$build_vendor,;t t | |
12269 | s,@build_os@,$build_os,;t t | |
12270 | s,@host@,$host,;t t | |
12271 | s,@host_cpu@,$host_cpu,;t t | |
12272 | s,@host_vendor@,$host_vendor,;t t | |
12273 | s,@host_os@,$host_os,;t t | |
12274 | s,@target@,$target,;t t | |
12275 | s,@target_cpu@,$target_cpu,;t t | |
12276 | s,@target_vendor@,$target_vendor,;t t | |
12277 | s,@target_os@,$target_os,;t t | |
12278 | s,@build_subdir@,$build_subdir,;t t | |
12279 | s,@host_subdir@,$host_subdir,;t t | |
12280 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 12281 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
12282 | s,@CC@,$CC,;t t |
12283 | s,@CFLAGS@,$CFLAGS,;t t | |
12284 | s,@LDFLAGS@,$LDFLAGS,;t t | |
12285 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
12286 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
12287 | s,@EXEEXT@,$EXEEXT,;t t | |
12288 | s,@OBJEXT@,$OBJEXT,;t t | |
12289 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
12290 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
12291 | s,@CPP@,$CPP,;t t | |
12292 | s,@GNATBIND@,$GNATBIND,;t t | |
12293 | s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t | |
12294 | s,@strict1_warn@,$strict1_warn,;t t | |
12295 | s,@warn_cflags@,$warn_cflags,;t t | |
12296 | s,@WERROR@,$WERROR,;t t | |
12297 | s,@nocommon_flag@,$nocommon_flag,;t t | |
12298 | s,@EGREP@,$EGREP,;t t | |
12299 | s,@valgrind_path@,$valgrind_path,;t t | |
12300 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
12301 | s,@valgrind_command@,$valgrind_command,;t t | |
12302 | s,@coverage_flags@,$coverage_flags,;t t | |
12303 | s,@enable_multilib@,$enable_multilib,;t t | |
12304 | s,@enable_shared@,$enable_shared,;t t | |
12305 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
12306 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
12307 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
12308 | s,@onestep@,$onestep,;t t | |
12309 | s,@SET_MAKE@,$SET_MAKE,;t t | |
12310 | s,@AWK@,$AWK,;t t | |
12311 | s,@LN@,$LN,;t t | |
12312 | s,@LN_S@,$LN_S,;t t | |
12313 | s,@RANLIB@,$RANLIB,;t t | |
12314 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
12315 | s,@INSTALL@,$INSTALL,;t t | |
12316 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
12317 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
12318 | s,@make_compare_target@,$make_compare_target,;t t | |
12319 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
12320 | s,@MAKEINFO@,$MAKEINFO,;t t | |
12321 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
12322 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
12323 | s,@FLEX@,$FLEX,;t t | |
12324 | s,@BISON@,$BISON,;t t | |
12325 | s,@stage1_cflags@,$stage1_cflags,;t t | |
12326 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
12327 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
12328 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
12329 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
12330 | s,@LIBICONV@,$LIBICONV,;t t | |
12331 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t | |
12332 | s,@manext@,$manext,;t t | |
12333 | s,@objext@,$objext,;t t | |
12334 | s,@extra_modes_file@,$extra_modes_file,;t t | |
12335 | s,@FORBUILD@,$FORBUILD,;t t | |
12336 | s,@PACKAGE@,$PACKAGE,;t t | |
12337 | s,@VERSION@,$VERSION,;t t | |
12338 | s,@USE_NLS@,$USE_NLS,;t t | |
12339 | s,@LIBINTL@,$LIBINTL,;t t | |
12340 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
12341 | s,@INCINTL@,$INCINTL,;t t | |
12342 | s,@XGETTEXT@,$XGETTEXT,;t t | |
12343 | s,@GMSGFMT@,$GMSGFMT,;t t | |
12344 | s,@POSUB@,$POSUB,;t t | |
12345 | s,@CATALOGS@,$CATALOGS,;t t | |
12346 | s,@CROSS@,$CROSS,;t t | |
12347 | s,@ALL@,$ALL,;t t | |
12348 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
12349 | s,@inhibit_libc@,$inhibit_libc,;t t | |
12350 | s,@BUILD_PREFIX@,$BUILD_PREFIX,;t t | |
12351 | s,@BUILD_PREFIX_1@,$BUILD_PREFIX_1,;t t | |
12352 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t | |
12353 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
12354 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
12355 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
12356 | s,@libgcc_visibility@,$libgcc_visibility,;t t | |
12357 | s,@gthread_flags@,$gthread_flags,;t t | |
12358 | s,@GGC@,$GGC,;t t | |
12359 | s,@zlibdir@,$zlibdir,;t t | |
12360 | s,@zlibinc@,$zlibinc,;t t | |
12361 | s,@MAINT@,$MAINT,;t t | |
12362 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
12363 | s,@dollar@,$dollar,;t t | |
12364 | s,@slibdir@,$slibdir,;t t | |
12365 | s,@objdir@,$objdir,;t t | |
12366 | s,@subdirs@,$subdirs,;t t | |
12367 | s,@srcdir@,$srcdir,;t t | |
12368 | s,@docobjdir@,$docobjdir,;t t | |
ba479fd2 NN |
12369 | s,@all_boot_languages@,$all_boot_languages,;t t |
12370 | s,@all_compilers@,$all_compilers,;t t | |
12371 | s,@all_gtfiles@,$all_gtfiles,;t t | |
12372 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
12373 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
12374 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
12375 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
12376 | s,@all_languages@,$all_languages,;t t | |
12377 | s,@all_stagestuff@,$all_stagestuff,;t t | |
12378 | s,@build_exeext@,$build_exeext,;t t | |
12379 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
12380 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
12381 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
12382 | s,@build_xm_defines@,$build_xm_defines,;t t | |
12383 | s,@check_languages@,$check_languages,;t t | |
12384 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
12385 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
12386 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
12387 | s,@xmake_file@,$xmake_file,;t t | |
12388 | s,@tmake_file@,$tmake_file,;t t | |
12389 | s,@extra_headers_list@,$extra_headers_list,;t t | |
12390 | s,@extra_objs@,$extra_objs,;t t | |
12391 | s,@extra_parts@,$extra_parts,;t t | |
12392 | s,@extra_passes@,$extra_passes,;t t | |
12393 | s,@extra_programs@,$extra_programs,;t t | |
12394 | s,@float_h_file@,$float_h_file,;t t | |
12395 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
12396 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
12397 | s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t | |
12398 | s,@gcc_version@,$gcc_version,;t t | |
12399 | s,@gcc_version_full@,$gcc_version_full,;t t | |
12400 | s,@gcc_version_trigger@,$gcc_version_trigger,;t t | |
12401 | s,@host_exeext@,$host_exeext,;t t | |
12402 | s,@host_extra_gcc_objs@,$host_extra_gcc_objs,;t t | |
12403 | s,@host_xm_file_list@,$host_xm_file_list,;t t | |
12404 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
12405 | s,@host_xm_defines@,$host_xm_defines,;t t | |
12406 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
12407 | s,@install@,$install,;t t | |
12408 | s,@lang_opt_files@,$lang_opt_files,;t t | |
12409 | s,@lang_specs_files@,$lang_specs_files,;t t | |
12410 | s,@lang_tree_files@,$lang_tree_files,;t t | |
12411 | s,@local_prefix@,$local_prefix,;t t | |
12412 | s,@md_file@,$md_file,;t t | |
12413 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
12414 | s,@out_file@,$out_file,;t t | |
12415 | s,@out_object_file@,$out_object_file,;t t | |
12416 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
12417 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
12418 | s,@symbolic_link@,$symbolic_link,;t t | |
12419 | s,@thread_file@,$thread_file,;t t | |
12420 | s,@tm_file_list@,$tm_file_list,;t t | |
12421 | s,@tm_include_list@,$tm_include_list,;t t | |
12422 | s,@tm_defines@,$tm_defines,;t t | |
12423 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
12424 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
12425 | s,@xm_file_list@,$xm_file_list,;t t | |
12426 | s,@xm_include_list@,$xm_include_list,;t t | |
12427 | s,@xm_defines@,$xm_defines,;t t | |
12428 | s,@target_noncanonical@,$target_noncanonical,;t t | |
12429 | s,@c_target_objs@,$c_target_objs,;t t | |
12430 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
12431 | s,@target_cpu_default@,$target_cpu_default,;t t | |
12432 | s,@LIBOBJS@,$LIBOBJS,;t t | |
12433 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
12434 | /@language_hooks@/r $language_hooks | |
12435 | s,@language_hooks@,,;t t | |
12436 | CEOF | |
12437 | ||
12438 | _ACEOF | |
12439 | ||
12440 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12441 | # Split the substitutions into bite-sized pieces for seds with | |
12442 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
12443 | ac_max_sed_lines=48 | |
12444 | ac_sed_frag=1 # Number of current file. | |
12445 | ac_beg=1 # First line for current file. | |
12446 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
12447 | ac_more_lines=: | |
12448 | ac_sed_cmds= | |
12449 | while $ac_more_lines; do | |
12450 | if test $ac_beg -gt 1; then | |
12451 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
12452 | else | |
12453 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
12454 | fi | |
12455 | if test ! -s $tmp/subs.frag; then | |
12456 | ac_more_lines=false | |
12457 | else | |
12458 | # The purpose of the label and of the branching condition is to | |
12459 | # speed up the sed processing (if there are no `@' at all, there | |
12460 | # is no need to browse any of the substitutions). | |
12461 | # These are the two extra sed commands mentioned above. | |
12462 | (echo ':t | |
12463 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
12464 | if test -z "$ac_sed_cmds"; then | |
12465 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" | |
12466 | else | |
12467 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" | |
12468 | fi | |
12469 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
12470 | ac_beg=$ac_end | |
12471 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
12472 | fi | |
12473 | done | |
12474 | if test -z "$ac_sed_cmds"; then | |
12475 | ac_sed_cmds=cat | |
63cf211a | 12476 | fi |
ba479fd2 | 12477 | fi # test -n "$CONFIG_FILES" |
cafe096b | 12478 | |
ba479fd2 NN |
12479 | _ACEOF |
12480 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12481 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
12482 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
12483 | case $ac_file in | |
12484 | - | *:- | *:-:* ) # input from stdin | |
12485 | cat >$tmp/stdin | |
12486 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
12487 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
12488 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
12489 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
12490 | * ) ac_file_in=$ac_file.in ;; | |
63cf211a | 12491 | esac |
cafe096b | 12492 | |
ba479fd2 NN |
12493 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
12494 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
12495 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
12496 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
12497 | X"$ac_file" : 'X\(//\)$' \| \ | |
12498 | X"$ac_file" : 'X\(/\)' \| \ | |
12499 | . : '\(.\)' 2>/dev/null || | |
12500 | echo X"$ac_file" | | |
12501 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
12502 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
12503 | /^X\(\/\/\)$/{ s//\1/; q; } | |
12504 | /^X\(\/\).*/{ s//\1/; q; } | |
12505 | s/.*/./; q'` | |
12506 | { if $as_mkdir_p; then | |
12507 | mkdir -p "$ac_dir" | |
12508 | else | |
12509 | as_dir="$ac_dir" | |
12510 | as_dirs= | |
12511 | while test ! -d "$as_dir"; do | |
12512 | as_dirs="$as_dir $as_dirs" | |
12513 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
12514 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
12515 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
12516 | X"$as_dir" : 'X\(//\)$' \| \ | |
12517 | X"$as_dir" : 'X\(/\)' \| \ | |
12518 | . : '\(.\)' 2>/dev/null || | |
12519 | echo X"$as_dir" | | |
12520 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
12521 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
12522 | /^X\(\/\/\)$/{ s//\1/; q; } | |
12523 | /^X\(\/\).*/{ s//\1/; q; } | |
12524 | s/.*/./; q'` | |
12525 | done | |
12526 | test ! -n "$as_dirs" || mkdir $as_dirs | |
12527 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
12528 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
12529 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 12530 | |
ba479fd2 NN |
12531 | ac_builddir=. |
12532 | ||
12533 | if test "$ac_dir" != .; then | |
12534 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
12535 | # A "../" for each directory in $ac_dir_suffix. | |
12536 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
12537 | else | |
12538 | ac_dir_suffix= ac_top_builddir= | |
12539 | fi | |
12540 | ||
12541 | case $srcdir in | |
12542 | .) # No --srcdir option. We are building in place. | |
12543 | ac_srcdir=. | |
12544 | if test -z "$ac_top_builddir"; then | |
12545 | ac_top_srcdir=. | |
12546 | else | |
12547 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
12548 | fi ;; | |
12549 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
12550 | ac_srcdir=$srcdir$ac_dir_suffix; | |
12551 | ac_top_srcdir=$srcdir ;; | |
12552 | *) # Relative path. | |
12553 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
12554 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
12555 | esac | |
12556 | # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be | |
12557 | # absolute. | |
12558 | ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` | |
12559 | ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` | |
12560 | ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` | |
12561 | ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` | |
12562 | ||
12563 | ||
12564 | ||
12565 | if test x"$ac_file" != x-; then | |
12566 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
12567 | echo "$as_me: creating $ac_file" >&6;} | |
12568 | rm -f "$ac_file" | |
12569 | fi | |
12570 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
12571 | # use $as_me), people would be surprised to read: | |
12572 | # /* config.h. Generated by config.status. */ | |
12573 | if test x"$ac_file" = x-; then | |
12574 | configure_input= | |
12575 | else | |
12576 | configure_input="$ac_file. " | |
12577 | fi | |
12578 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
12579 | sed 's,.*/,,'` by configure." | |
12580 | ||
12581 | # First look for the input files in the build tree, otherwise in the | |
12582 | # src tree. | |
12583 | ac_file_inputs=`IFS=: | |
12584 | for f in $ac_file_in; do | |
12585 | case $f in | |
12586 | -) echo $tmp/stdin ;; | |
12587 | [\\/$]*) | |
12588 | # Absolute (can't be DOS-style, as IFS=:) | |
12589 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
12590 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
12591 | { (exit 1); exit 1; }; } | |
12592 | echo $f;; | |
12593 | *) # Relative | |
12594 | if test -f "$f"; then | |
12595 | # Build tree | |
12596 | echo $f | |
12597 | elif test -f "$srcdir/$f"; then | |
12598 | # Source tree | |
12599 | echo $srcdir/$f | |
12600 | else | |
12601 | # /dev/null tree | |
12602 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
12603 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
12604 | { (exit 1); exit 1; }; } | |
12605 | fi;; | |
12606 | esac | |
12607 | done` || { (exit 1); exit 1; } | |
12608 | _ACEOF | |
12609 | cat >>$CONFIG_STATUS <<_ACEOF | |
12610 | sed "$ac_vpsub | |
12611 | $extrasub | |
12612 | _ACEOF | |
12613 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12614 | :t | |
12615 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
12616 | s,@configure_input@,$configure_input,;t t | |
12617 | s,@srcdir@,$ac_srcdir,;t t | |
12618 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
12619 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
12620 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
12621 | s,@builddir@,$ac_builddir,;t t | |
12622 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
12623 | s,@top_builddir@,$ac_top_builddir,;t t | |
12624 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
12625 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
12626 | rm -f $tmp/stdin | |
12627 | if test x"$ac_file" != x-; then | |
12628 | mv $tmp/out $ac_file | |
12629 | else | |
12630 | cat $tmp/out | |
12631 | rm -f $tmp/out | |
12632 | fi | |
12633 | ||
12634 | done | |
12635 | _ACEOF | |
12636 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 12637 | |
ba479fd2 NN |
12638 | # |
12639 | # CONFIG_HEADER section. | |
12640 | # | |
861bb6c1 JL |
12641 | |
12642 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
12643 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
12644 | # | |
12645 | # ac_d sets the value in "#define NAME VALUE" lines. | |
ba479fd2 NN |
12646 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
12647 | ac_dB='[ ].*$,\1#\2' | |
12648 | ac_dC=' ' | |
12649 | ac_dD=',;t' | |
12650 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
12651 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
12652 | ac_uB='$,\1#\2define\3' | |
861bb6c1 | 12653 | ac_uC=' ' |
ba479fd2 NN |
12654 | ac_uD=',;t' |
12655 | ||
12656 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 12657 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
12658 | case $ac_file in |
12659 | - | *:- | *:-:* ) # input from stdin | |
12660 | cat >$tmp/stdin | |
12661 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
12662 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
12663 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
12664 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
12665 | * ) ac_file_in=$ac_file.in ;; | |
861bb6c1 JL |
12666 | esac |
12667 | ||
ba479fd2 NN |
12668 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
12669 | echo "$as_me: creating $ac_file" >&6;} | |
12670 | ||
12671 | # First look for the input files in the build tree, otherwise in the | |
12672 | # src tree. | |
12673 | ac_file_inputs=`IFS=: | |
12674 | for f in $ac_file_in; do | |
12675 | case $f in | |
12676 | -) echo $tmp/stdin ;; | |
12677 | [\\/$]*) | |
12678 | # Absolute (can't be DOS-style, as IFS=:) | |
12679 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
12680 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
12681 | { (exit 1); exit 1; }; } | |
12682 | echo $f;; | |
12683 | *) # Relative | |
12684 | if test -f "$f"; then | |
12685 | # Build tree | |
12686 | echo $f | |
12687 | elif test -f "$srcdir/$f"; then | |
12688 | # Source tree | |
12689 | echo $srcdir/$f | |
12690 | else | |
12691 | # /dev/null tree | |
12692 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
12693 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
12694 | { (exit 1); exit 1; }; } | |
12695 | fi;; | |
12696 | esac | |
12697 | done` || { (exit 1); exit 1; } | |
12698 | # Remove the trailing spaces. | |
12699 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in | |
12700 | ||
12701 | _ACEOF | |
12702 | ||
12703 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
12704 | # `conftest.undefs', that substitutes the proper values into | |
12705 | # config.h.in to produce config.h. The first handles `#define' | |
12706 | # templates, and the second `#undef' templates. | |
12707 | # And first: Protect against being on the right side of a sed subst in | |
12708 | # config.status. Protect against being in an unquoted here document | |
12709 | # in config.status. | |
12710 | rm -f conftest.defines conftest.undefs | |
12711 | # Using a here document instead of a string reduces the quoting nightmare. | |
12712 | # Putting comments in sed scripts is not portable. | |
12713 | # | |
12714 | # `end' is used to avoid that the second main sed command (meant for | |
12715 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
12716 | # See the Autoconf documentation for `clear'. | |
12717 | cat >confdef2sed.sed <<\_ACEOF | |
12718 | s/[\\&,]/\\&/g | |
12719 | s,[\\$`],\\&,g | |
12720 | t clear | |
12721 | : clear | |
12722 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp | |
12723 | t end | |
12724 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp | |
12725 | : end | |
12726 | _ACEOF | |
12727 | # If some macros were called several times there might be several times | |
12728 | # the same #defines, which is useless. Nevertheless, we may not want to | |
12729 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
12730 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
12731 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
12732 | rm -f confdef2sed.sed | |
861bb6c1 JL |
12733 | |
12734 | # This sed command replaces #undef with comments. This is necessary, for | |
12735 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
12736 | # on some systems where configure will not decide to define it. | |
ba479fd2 NN |
12737 | cat >>conftest.undefs <<\_ACEOF |
12738 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, | |
12739 | _ACEOF | |
12740 | ||
12741 | # Break up conftest.defines because some shells have a limit on the size | |
12742 | # of here documents, and old seds have small limits too (100 cmds). | |
12743 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
12744 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS | |
12745 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS | |
12746 | echo ' :' >>$CONFIG_STATUS | |
12747 | rm -f conftest.tail | |
12748 | while grep . conftest.defines >/dev/null | |
12749 | do | |
12750 | # Write a limited-size here document to $tmp/defines.sed. | |
12751 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
12752 | # Speed up: don't consider the non `#define' lines. | |
12753 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS | |
12754 | # Work around the forget-to-reset-the-flag bug. | |
12755 | echo 't clr' >>$CONFIG_STATUS | |
12756 | echo ': clr' >>$CONFIG_STATUS | |
12757 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
12758 | echo 'CEOF | |
12759 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
12760 | rm -f $tmp/in | |
12761 | mv $tmp/out $tmp/in | |
12762 | ' >>$CONFIG_STATUS | |
12763 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
12764 | rm -f conftest.defines | |
12765 | mv conftest.tail conftest.defines | |
12766 | done | |
12767 | rm -f conftest.defines | |
12768 | echo ' fi # grep' >>$CONFIG_STATUS | |
12769 | echo >>$CONFIG_STATUS | |
861bb6c1 | 12770 | |
ba479fd2 NN |
12771 | # Break up conftest.undefs because some shells have a limit on the size |
12772 | # of here documents, and old seds have small limits too (100 cmds). | |
12773 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 12774 | rm -f conftest.tail |
ba479fd2 | 12775 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 12776 | do |
ba479fd2 NN |
12777 | # Write a limited-size here document to $tmp/undefs.sed. |
12778 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
12779 | # Speed up: don't consider the non `#undef' | |
12780 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS | |
12781 | # Work around the forget-to-reset-the-flag bug. | |
12782 | echo 't clr' >>$CONFIG_STATUS | |
12783 | echo ': clr' >>$CONFIG_STATUS | |
12784 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 12785 | echo 'CEOF |
ba479fd2 NN |
12786 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
12787 | rm -f $tmp/in | |
12788 | mv $tmp/out $tmp/in | |
12789 | ' >>$CONFIG_STATUS | |
12790 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
12791 | rm -f conftest.undefs | |
12792 | mv conftest.tail conftest.undefs | |
861bb6c1 | 12793 | done |
ba479fd2 NN |
12794 | rm -f conftest.undefs |
12795 | ||
12796 | cat >>$CONFIG_STATUS <<\_ACEOF | |
12797 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
12798 | # use $as_me), people would be surprised to read: | |
12799 | # /* config.h. Generated by config.status. */ | |
12800 | if test x"$ac_file" = x-; then | |
12801 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 12802 | else |
ba479fd2 | 12803 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 12804 | fi |
ba479fd2 NN |
12805 | cat $tmp/in >>$tmp/config.h |
12806 | rm -f $tmp/in | |
12807 | if test x"$ac_file" != x-; then | |
12808 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
12809 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
12810 | echo "$as_me: $ac_file is unchanged" >&6;} | |
12811 | else | |
12812 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
12813 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
12814 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
12815 | X"$ac_file" : 'X\(//\)$' \| \ | |
12816 | X"$ac_file" : 'X\(/\)' \| \ | |
12817 | . : '\(.\)' 2>/dev/null || | |
12818 | echo X"$ac_file" | | |
12819 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
12820 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
12821 | /^X\(\/\/\)$/{ s//\1/; q; } | |
12822 | /^X\(\/\).*/{ s//\1/; q; } | |
12823 | s/.*/./; q'` | |
12824 | { if $as_mkdir_p; then | |
12825 | mkdir -p "$ac_dir" | |
12826 | else | |
12827 | as_dir="$ac_dir" | |
12828 | as_dirs= | |
12829 | while test ! -d "$as_dir"; do | |
12830 | as_dirs="$as_dir $as_dirs" | |
12831 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
12832 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
12833 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
12834 | X"$as_dir" : 'X\(//\)$' \| \ | |
12835 | X"$as_dir" : 'X\(/\)' \| \ | |
12836 | . : '\(.\)' 2>/dev/null || | |
12837 | echo X"$as_dir" | | |
12838 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
12839 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
12840 | /^X\(\/\/\)$/{ s//\1/; q; } | |
12841 | /^X\(\/\).*/{ s//\1/; q; } | |
12842 | s/.*/./; q'` | |
12843 | done | |
12844 | test ! -n "$as_dirs" || mkdir $as_dirs | |
12845 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
12846 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
12847 | { (exit 1); exit 1; }; }; } | |
63cf211a | 12848 | |
ba479fd2 NN |
12849 | rm -f $ac_file |
12850 | mv $tmp/config.h $ac_file | |
12851 | fi | |
12852 | else | |
12853 | cat $tmp/config.h | |
12854 | rm -f $tmp/config.h | |
12855 | fi | |
12856 | done | |
12857 | _ACEOF | |
12858 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 12859 | |
ba479fd2 NN |
12860 | # |
12861 | # CONFIG_COMMANDS section. | |
12862 | # | |
12863 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
12864 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
12865 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
12866 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
12867 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
12868 | X"$ac_dest" : 'X\(//\)[^/]' \| \ | |
12869 | X"$ac_dest" : 'X\(//\)$' \| \ | |
12870 | X"$ac_dest" : 'X\(/\)' \| \ | |
12871 | . : '\(.\)' 2>/dev/null || | |
12872 | echo X"$ac_dest" | | |
12873 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
12874 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
12875 | /^X\(\/\/\)$/{ s//\1/; q; } | |
12876 | /^X\(\/\).*/{ s//\1/; q; } | |
12877 | s/.*/./; q'` | |
12878 | ac_builddir=. | |
12879 | ||
12880 | if test "$ac_dir" != .; then | |
12881 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
12882 | # A "../" for each directory in $ac_dir_suffix. | |
12883 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
12884 | else | |
12885 | ac_dir_suffix= ac_top_builddir= | |
12886 | fi | |
12887 | ||
12888 | case $srcdir in | |
12889 | .) # No --srcdir option. We are building in place. | |
12890 | ac_srcdir=. | |
12891 | if test -z "$ac_top_builddir"; then | |
12892 | ac_top_srcdir=. | |
12893 | else | |
12894 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
12895 | fi ;; | |
12896 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
12897 | ac_srcdir=$srcdir$ac_dir_suffix; | |
12898 | ac_top_srcdir=$srcdir ;; | |
12899 | *) # Relative path. | |
12900 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
12901 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
12902 | esac | |
12903 | # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be | |
12904 | # absolute. | |
12905 | ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` | |
12906 | ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` | |
12907 | ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` | |
12908 | ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` | |
12909 | ||
12910 | ||
12911 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
12912 | echo "$as_me: executing $ac_dest commands" >&6;} | |
12913 | case $ac_dest in | |
12914 | default ) | |
f1faaabd NN |
12915 | case ${CONFIG_HEADERS} in |
12916 | *auto-host.h:config.in*) | |
12917 | echo > cstamp-h ;; | |
861bb6c1 | 12918 | esac |
2ed26f6b | 12919 | # Make sure all the subdirs exist. |
c406e779 | 12920 | for d in $subdirs |
2ed26f6b | 12921 | do |
2ed26f6b | 12922 | test -d $d || mkdir $d |
2ed26f6b | 12923 | done |
93cf819d BK |
12924 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
12925 | # bootstrapping and the installation procedure can still use | |
12926 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
12927 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
12928 | # This is virtually a duplicate of what happens in configure.lang; we do | |
12929 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 12930 | if test "$symbolic_link" = "ln -s"; then |
c406e779 | 12931 | for d in ${subdirs} fixinc ; do |
1e6347d8 | 12932 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 12933 | cd $d |
6a1b7268 | 12934 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
12935 | do |
12936 | rm -f $t | |
12937 | $symbolic_link ../$t $t 2>/dev/null | |
12938 | done | |
12939 | cd $STARTDIR | |
93cf819d BK |
12940 | done |
12941 | else true ; fi | |
ba479fd2 NN |
12942 | ;; |
12943 | esac | |
12944 | done | |
12945 | _ACEOF | |
cafe096b | 12946 | |
ba479fd2 NN |
12947 | cat >>$CONFIG_STATUS <<\_ACEOF |
12948 | ||
12949 | { (exit 0); exit 0; } | |
12950 | _ACEOF | |
861bb6c1 | 12951 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
12952 | ac_clean_files=$ac_clean_files_save |
12953 | ||
12954 | ||
12955 | # configure is writing to config.log, and then calls config.status. | |
12956 | # config.status does its own redirection, appending to config.log. | |
12957 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
12958 | # by configure, so config.status won't be able to write to it; its | |
12959 | # output is simply discarded. So we exec the FD to /dev/null, | |
12960 | # effectively closing config.log, so it can be properly (re)opened and | |
12961 | # appended to by config.status. When coming back to configure, we | |
12962 | # need to make the FD available again. | |
12963 | if test "$no_create" != yes; then | |
12964 | ac_cs_success=: | |
12965 | ac_config_status_args= | |
12966 | test "$silent" = yes && | |
12967 | ac_config_status_args="$ac_config_status_args --quiet" | |
12968 | exec 5>/dev/null | |
12969 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
12970 | exec 5>>config.log | |
12971 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
12972 | # would make configure fail if this is the last instruction. | |
12973 | $ac_cs_success || { (exit 1); exit 1; } | |
12974 | fi | |
861bb6c1 | 12975 |