]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
8ab705be | 3 | # Generated by GNU Autoconf 2.59. |
861bb6c1 | 4 | # |
86da66b5 | 5 | # Copyright (C) 2003 Free Software Foundation, Inc. |
861bb6c1 JL |
6 | # This configure script is free software; the Free Software Foundation |
7 | # gives unlimited permission to copy, distribute and modify it. | |
ba479fd2 NN |
8 | ## --------------------- ## |
9 | ## M4sh Initialization. ## | |
10 | ## --------------------- ## | |
11 | ||
12 | # Be Bourne compatible | |
13 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
14 | emulate sh | |
15 | NULLCMD=: | |
16 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17 | # is contrary to our usage. Disable this feature. | |
18 | alias -g '${1+"$@"}'='"$@"' | |
19 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
20 | set -o posix | |
21 | fi | |
86da66b5 | 22 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
23 | |
24 | # Support unset when possible. | |
86da66b5 | 25 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
26 | as_unset=unset |
27 | else | |
28 | as_unset=false | |
29 | fi | |
30 | ||
31 | ||
32 | # Work around bugs in pre-3.0 UWIN ksh. | |
33 | $as_unset ENV MAIL MAILPATH | |
34 | PS1='$ ' | |
35 | PS2='> ' | |
36 | PS4='+ ' | |
37 | ||
38 | # NLS nuisances. | |
39 | for as_var in \ | |
40 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
41 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
42 | LC_TELEPHONE LC_TIME | |
43 | do | |
86da66b5 | 44 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
45 | eval $as_var=C; export $as_var |
46 | else | |
47 | $as_unset $as_var | |
48 | fi | |
49 | done | |
50 | ||
51 | # Required to use basename. | |
52 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
53 | as_expr=expr | |
54 | else | |
55 | as_expr=false | |
56 | fi | |
57 | ||
58 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | |
59 | as_basename=basename | |
60 | else | |
61 | as_basename=false | |
62 | fi | |
63 | ||
64 | ||
65 | # Name of the executable. | |
66 | as_me=`$as_basename "$0" || | |
67 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
68 | X"$0" : 'X\(//\)$' \| \ | |
69 | X"$0" : 'X\(/\)$' \| \ | |
70 | . : '\(.\)' 2>/dev/null || | |
71 | echo X/"$0" | | |
72 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
73 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
74 | /^X\/\(\/\).*/{ s//\1/; q; } | |
75 | s/.*/./; q'` | |
76 | ||
77 | ||
78 | # PATH needs CR, and LINENO needs CR and PATH. | |
79 | # Avoid depending upon Character Ranges. | |
80 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
81 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
82 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
83 | as_cr_digits='0123456789' | |
84 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
85 | ||
86 | # The user is always right. | |
87 | if test "${PATH_SEPARATOR+set}" != set; then | |
88 | echo "#! /bin/sh" >conf$$.sh | |
89 | echo "exit 0" >>conf$$.sh | |
90 | chmod +x conf$$.sh | |
91 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
92 | PATH_SEPARATOR=';' | |
93 | else | |
94 | PATH_SEPARATOR=: | |
95 | fi | |
96 | rm -f conf$$.sh | |
97 | fi | |
98 | ||
99 | ||
100 | as_lineno_1=$LINENO | |
101 | as_lineno_2=$LINENO | |
102 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
103 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
104 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
105 | # Find who we are. Look in the path if we contain no path at all | |
106 | # relative or not. | |
107 | case $0 in | |
108 | *[\\/]* ) as_myself=$0 ;; | |
109 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
110 | for as_dir in $PATH | |
111 | do | |
112 | IFS=$as_save_IFS | |
113 | test -z "$as_dir" && as_dir=. | |
114 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
115 | done | |
116 | ||
117 | ;; | |
118 | esac | |
119 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
120 | # in which case we are not to be found in the path. | |
121 | if test "x$as_myself" = x; then | |
122 | as_myself=$0 | |
123 | fi | |
124 | if test ! -f "$as_myself"; then | |
125 | { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | |
126 | { (exit 1); exit 1; }; } | |
127 | fi | |
128 | case $CONFIG_SHELL in | |
129 | '') | |
130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
131 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
132 | do | |
133 | IFS=$as_save_IFS | |
134 | test -z "$as_dir" && as_dir=. | |
135 | for as_base in sh bash ksh sh5; do | |
136 | case $as_dir in | |
137 | /*) | |
138 | if ("$as_dir/$as_base" -c ' | |
139 | as_lineno_1=$LINENO | |
140 | as_lineno_2=$LINENO | |
141 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
142 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
143 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
144 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
145 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
146 | CONFIG_SHELL=$as_dir/$as_base | |
147 | export CONFIG_SHELL | |
148 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
149 | fi;; | |
150 | esac | |
151 | done | |
152 | done | |
153 | ;; | |
154 | esac | |
155 | ||
156 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
157 | # uniformly replaced by the line number. The first 'sed' inserts a | |
158 | # line-number line before each line; the second 'sed' does the real | |
159 | # work. The second script uses 'N' to pair each line-number line | |
160 | # with the numbered line, and appends trailing '-' during | |
161 | # substitution so that $LINENO is not a special case at line end. | |
162 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
163 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
164 | sed '=' <$as_myself | | |
165 | sed ' | |
166 | N | |
167 | s,$,-, | |
168 | : loop | |
169 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
170 | t loop | |
171 | s,-$,, | |
172 | s,^['$as_cr_digits']*\n,, | |
173 | ' >$as_me.lineno && | |
174 | chmod +x $as_me.lineno || | |
175 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
176 | { (exit 1); exit 1; }; } | |
177 | ||
178 | # Don't try to exec as it changes $[0], causing all sort of problems | |
179 | # (the dirname of $[0] is not the place where we might find the | |
180 | # original and so on. Autoconf is especially sensible to this). | |
181 | . ./$as_me.lineno | |
182 | # Exit status is that of the last command. | |
183 | exit | |
184 | } | |
185 | ||
186 | ||
187 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
188 | *c*,-n*) ECHO_N= ECHO_C=' | |
189 | ' ECHO_T=' ' ;; | |
190 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
191 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
192 | esac | |
193 | ||
194 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
195 | as_expr=expr | |
196 | else | |
197 | as_expr=false | |
198 | fi | |
199 | ||
200 | rm -f conf$$ conf$$.exe conf$$.file | |
201 | echo >conf$$.file | |
202 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
203 | # We could just check for DJGPP; but this test a) works b) is more generic | |
204 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
205 | if test -f conf$$.exe; then | |
206 | # Don't use ln at all; we don't have any links | |
207 | as_ln_s='cp -p' | |
208 | else | |
209 | as_ln_s='ln -s' | |
210 | fi | |
211 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
212 | as_ln_s=ln | |
213 | else | |
214 | as_ln_s='cp -p' | |
215 | fi | |
216 | rm -f conf$$ conf$$.exe conf$$.file | |
861bb6c1 | 217 | |
ba479fd2 NN |
218 | if mkdir -p . 2>/dev/null; then |
219 | as_mkdir_p=: | |
220 | else | |
86da66b5 | 221 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
222 | as_mkdir_p=false |
223 | fi | |
224 | ||
225 | as_executable_p="test -f" | |
226 | ||
227 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 228 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
229 | |
230 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 231 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
232 | |
233 | ||
234 | # IFS | |
235 | # We need space, tab and new line, in precisely that order. | |
236 | as_nl=' | |
237 | ' | |
238 | IFS=" $as_nl" | |
239 | ||
240 | # CDPATH. | |
241 | $as_unset CDPATH | |
242 | ||
243 | ||
244 | # Name of the host. | |
245 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
246 | # so uname gets run too. | |
247 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
248 | ||
249 | exec 6>&1 | |
250 | ||
251 | # | |
252 | # Initializations. | |
253 | # | |
861bb6c1 | 254 | ac_default_prefix=/usr/local |
ba479fd2 NN |
255 | ac_config_libobj_dir=. |
256 | cross_compiling=no | |
257 | subdirs= | |
258 | MFLAGS= | |
259 | MAKEFLAGS= | |
260 | SHELL=${CONFIG_SHELL-/bin/sh} | |
261 | ||
262 | # Maximum number of lines to put in a shell here document. | |
263 | # This variable seems obsolete. It should probably be removed, and | |
264 | # only ac_max_sed_lines should be used. | |
265 | : ${ac_max_here_lines=38} | |
266 | ||
267 | # Identity of this package. | |
268 | PACKAGE_NAME= | |
269 | PACKAGE_TARNAME= | |
270 | PACKAGE_VERSION= | |
271 | PACKAGE_STRING= | |
272 | PACKAGE_BUGREPORT= | |
273 | ||
274 | ac_unique_file="tree.c" | |
275 | # Factoring default headers for most tests. | |
276 | ac_includes_default="\ | |
277 | #include <stdio.h> | |
278 | #if HAVE_SYS_TYPES_H | |
279 | # include <sys/types.h> | |
280 | #endif | |
281 | #if HAVE_SYS_STAT_H | |
282 | # include <sys/stat.h> | |
283 | #endif | |
284 | #if STDC_HEADERS | |
285 | # include <stdlib.h> | |
286 | # include <stddef.h> | |
287 | #else | |
288 | # if HAVE_STDLIB_H | |
289 | # include <stdlib.h> | |
290 | # endif | |
291 | #endif | |
292 | #if HAVE_STRING_H | |
293 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
294 | # include <memory.h> | |
295 | # endif | |
296 | # include <string.h> | |
297 | #endif | |
298 | #if HAVE_STRINGS_H | |
299 | # include <strings.h> | |
300 | #endif | |
301 | #if HAVE_INTTYPES_H | |
302 | # include <inttypes.h> | |
303 | #else | |
304 | # if HAVE_STDINT_H | |
305 | # include <stdint.h> | |
306 | # endif | |
307 | #endif | |
308 | #if HAVE_UNISTD_H | |
309 | # include <unistd.h> | |
310 | #endif" | |
311 | ||
18fc9bd4 | 312 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn cxx_compat_warn warn_cflags WERROR nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir objdir subdirs srcdir all_boot_languages all_compilers all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files all_lang_makefrags all_lang_makefiles all_languages all_selected_languages all_stagestuff build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' |
ba479fd2 | 313 | ac_subst_files='language_hooks' |
861bb6c1 JL |
314 | |
315 | # Initialize some variables set by options. | |
ba479fd2 NN |
316 | ac_init_help= |
317 | ac_init_version=false | |
861bb6c1 JL |
318 | # The variables have the same names as the options, with |
319 | # dashes changed to underlines. | |
ba479fd2 | 320 | cache_file=/dev/null |
861bb6c1 | 321 | exec_prefix=NONE |
861bb6c1 | 322 | no_create= |
861bb6c1 JL |
323 | no_recursion= |
324 | prefix=NONE | |
325 | program_prefix=NONE | |
326 | program_suffix=NONE | |
327 | program_transform_name=s,x,x, | |
328 | silent= | |
329 | site= | |
330 | srcdir= | |
861bb6c1 JL |
331 | verbose= |
332 | x_includes=NONE | |
333 | x_libraries=NONE | |
ba479fd2 NN |
334 | |
335 | # Installation directory options. | |
336 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
337 | # and all the variables that are supposed to be based on exec_prefix | |
338 | # by default will actually change. | |
339 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
861bb6c1 JL |
340 | bindir='${exec_prefix}/bin' |
341 | sbindir='${exec_prefix}/sbin' | |
342 | libexecdir='${exec_prefix}/libexec' | |
343 | datadir='${prefix}/share' | |
344 | sysconfdir='${prefix}/etc' | |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
347 | libdir='${exec_prefix}/lib' | |
348 | includedir='${prefix}/include' | |
349 | oldincludedir='/usr/include' | |
350 | infodir='${prefix}/info' | |
351 | mandir='${prefix}/man' | |
352 | ||
861bb6c1 JL |
353 | ac_prev= |
354 | for ac_option | |
355 | do | |
861bb6c1 JL |
356 | # If the previous option needs an argument, assign it. |
357 | if test -n "$ac_prev"; then | |
358 | eval "$ac_prev=\$ac_option" | |
359 | ac_prev= | |
360 | continue | |
361 | fi | |
362 | ||
ba479fd2 | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
ba479fd2 | 367 | case $ac_option in |
861bb6c1 JL |
368 | |
369 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
370 | ac_prev=bindir ;; | |
371 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
ba479fd2 | 372 | bindir=$ac_optarg ;; |
861bb6c1 JL |
373 | |
374 | -build | --build | --buil | --bui | --bu) | |
ba479fd2 | 375 | ac_prev=build_alias ;; |
861bb6c1 | 376 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
ba479fd2 | 377 | build_alias=$ac_optarg ;; |
861bb6c1 JL |
378 | |
379 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
380 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
381 | ac_prev=cache_file ;; | |
382 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
383 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
ba479fd2 NN |
384 | cache_file=$ac_optarg ;; |
385 | ||
386 | --config-cache | -C) | |
387 | cache_file=config.cache ;; | |
861bb6c1 JL |
388 | |
389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
390 | ac_prev=datadir ;; | |
391 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
392 | | --da=*) | |
ba479fd2 | 393 | datadir=$ac_optarg ;; |
861bb6c1 JL |
394 | |
395 | -disable-* | --disable-*) | |
ba479fd2 | 396 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
861bb6c1 | 397 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
400 | { (exit 1); exit 1; }; } | |
401 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
402 | eval "enable_$ac_feature=no" ;; | |
861bb6c1 JL |
403 | |
404 | -enable-* | --enable-*) | |
ba479fd2 | 405 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
861bb6c1 | 406 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
409 | { (exit 1); exit 1; }; } | |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
413 | *) ac_optarg=yes ;; |
414 | esac | |
ba479fd2 | 415 | eval "enable_$ac_feature='$ac_optarg'" ;; |
861bb6c1 JL |
416 | |
417 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
418 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
419 | | --exec | --exe | --ex) | |
420 | ac_prev=exec_prefix ;; | |
421 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
422 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
423 | | --exec=* | --exe=* | --ex=*) | |
ba479fd2 | 424 | exec_prefix=$ac_optarg ;; |
861bb6c1 JL |
425 | |
426 | -gas | --gas | --ga | --g) | |
427 | # Obsolete; use --with-gas. | |
428 | with_gas=yes ;; | |
429 | ||
ba479fd2 NN |
430 | -help | --help | --hel | --he | -h) |
431 | ac_init_help=long ;; | |
432 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
433 | ac_init_help=recursive ;; | |
434 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
435 | ac_init_help=short ;; | |
861bb6c1 JL |
436 | |
437 | -host | --host | --hos | --ho) | |
ba479fd2 | 438 | ac_prev=host_alias ;; |
861bb6c1 | 439 | -host=* | --host=* | --hos=* | --ho=*) |
ba479fd2 | 440 | host_alias=$ac_optarg ;; |
861bb6c1 JL |
441 | |
442 | -includedir | --includedir | --includedi | --included | --include \ | |
443 | | --includ | --inclu | --incl | --inc) | |
444 | ac_prev=includedir ;; | |
445 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
446 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
ba479fd2 | 447 | includedir=$ac_optarg ;; |
861bb6c1 JL |
448 | |
449 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
450 | ac_prev=infodir ;; | |
451 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
ba479fd2 | 452 | infodir=$ac_optarg ;; |
861bb6c1 JL |
453 | |
454 | -libdir | --libdir | --libdi | --libd) | |
455 | ac_prev=libdir ;; | |
456 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
ba479fd2 | 457 | libdir=$ac_optarg ;; |
861bb6c1 JL |
458 | |
459 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
460 | | --libexe | --libex | --libe) | |
461 | ac_prev=libexecdir ;; | |
462 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
463 | | --libexe=* | --libex=* | --libe=*) | |
ba479fd2 | 464 | libexecdir=$ac_optarg ;; |
861bb6c1 JL |
465 | |
466 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
467 | | --localstate | --localstat | --localsta | --localst \ | |
468 | | --locals | --local | --loca | --loc | --lo) | |
469 | ac_prev=localstatedir ;; | |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
471 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
472 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
ba479fd2 | 473 | localstatedir=$ac_optarg ;; |
861bb6c1 JL |
474 | |
475 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
476 | ac_prev=mandir ;; | |
477 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
ba479fd2 | 478 | mandir=$ac_optarg ;; |
861bb6c1 JL |
479 | |
480 | -nfp | --nfp | --nf) | |
481 | # Obsolete; use --without-fp. | |
482 | with_fp=no ;; | |
483 | ||
484 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
ba479fd2 | 485 | | --no-cr | --no-c | -n) |
861bb6c1 JL |
486 | no_create=yes ;; |
487 | ||
488 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
489 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
490 | no_recursion=yes ;; | |
491 | ||
492 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
493 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
494 | | --oldin | --oldi | --old | --ol | --o) | |
495 | ac_prev=oldincludedir ;; | |
496 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
497 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
498 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
ba479fd2 | 499 | oldincludedir=$ac_optarg ;; |
861bb6c1 JL |
500 | |
501 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
502 | ac_prev=prefix ;; | |
503 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
ba479fd2 | 504 | prefix=$ac_optarg ;; |
861bb6c1 JL |
505 | |
506 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
507 | | --program-pre | --program-pr | --program-p) | |
508 | ac_prev=program_prefix ;; | |
509 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
510 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
ba479fd2 | 511 | program_prefix=$ac_optarg ;; |
861bb6c1 JL |
512 | |
513 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
514 | | --program-suf | --program-su | --program-s) | |
515 | ac_prev=program_suffix ;; | |
516 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
517 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
ba479fd2 | 518 | program_suffix=$ac_optarg ;; |
861bb6c1 JL |
519 | |
520 | -program-transform-name | --program-transform-name \ | |
521 | | --program-transform-nam | --program-transform-na \ | |
522 | | --program-transform-n | --program-transform- \ | |
523 | | --program-transform | --program-transfor \ | |
524 | | --program-transfo | --program-transf \ | |
525 | | --program-trans | --program-tran \ | |
526 | | --progr-tra | --program-tr | --program-t) | |
527 | ac_prev=program_transform_name ;; | |
528 | -program-transform-name=* | --program-transform-name=* \ | |
529 | | --program-transform-nam=* | --program-transform-na=* \ | |
530 | | --program-transform-n=* | --program-transform-=* \ | |
531 | | --program-transform=* | --program-transfor=* \ | |
532 | | --program-transfo=* | --program-transf=* \ | |
533 | | --program-trans=* | --program-tran=* \ | |
534 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
ba479fd2 | 535 | program_transform_name=$ac_optarg ;; |
861bb6c1 JL |
536 | |
537 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
538 | | -silent | --silent | --silen | --sile | --sil) | |
539 | silent=yes ;; | |
540 | ||
541 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
542 | ac_prev=sbindir ;; | |
543 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
544 | | --sbi=* | --sb=*) | |
ba479fd2 | 545 | sbindir=$ac_optarg ;; |
861bb6c1 JL |
546 | |
547 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
548 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
549 | | --sharedst | --shareds | --shared | --share | --shar \ | |
550 | | --sha | --sh) | |
551 | ac_prev=sharedstatedir ;; | |
552 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
553 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
554 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
555 | | --sha=* | --sh=*) | |
ba479fd2 | 556 | sharedstatedir=$ac_optarg ;; |
861bb6c1 JL |
557 | |
558 | -site | --site | --sit) | |
559 | ac_prev=site ;; | |
560 | -site=* | --site=* | --sit=*) | |
ba479fd2 | 561 | site=$ac_optarg ;; |
861bb6c1 JL |
562 | |
563 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
564 | ac_prev=srcdir ;; | |
565 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
ba479fd2 | 566 | srcdir=$ac_optarg ;; |
861bb6c1 JL |
567 | |
568 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
569 | | --syscon | --sysco | --sysc | --sys | --sy) | |
570 | ac_prev=sysconfdir ;; | |
571 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
572 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
ba479fd2 | 573 | sysconfdir=$ac_optarg ;; |
861bb6c1 JL |
574 | |
575 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
ba479fd2 | 576 | ac_prev=target_alias ;; |
861bb6c1 | 577 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
ba479fd2 | 578 | target_alias=$ac_optarg ;; |
861bb6c1 JL |
579 | |
580 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
581 | verbose=yes ;; | |
582 | ||
ba479fd2 NN |
583 | -version | --version | --versio | --versi | --vers | -V) |
584 | ac_init_version=: ;; | |
861bb6c1 JL |
585 | |
586 | -with-* | --with-*) | |
ba479fd2 | 587 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
861bb6c1 | 588 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
591 | { (exit 1); exit 1; }; } | |
861bb6c1 | 592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
ba479fd2 NN |
593 | case $ac_option in |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
861bb6c1 JL |
595 | *) ac_optarg=yes ;; |
596 | esac | |
ba479fd2 | 597 | eval "with_$ac_package='$ac_optarg'" ;; |
861bb6c1 JL |
598 | |
599 | -without-* | --without-*) | |
ba479fd2 | 600 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
861bb6c1 | 601 | # Reject names that are not valid shell variable names. |
ba479fd2 NN |
602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
604 | { (exit 1); exit 1; }; } | |
605 | ac_package=`echo $ac_package | sed 's/-/_/g'` | |
606 | eval "with_$ac_package=no" ;; | |
861bb6c1 JL |
607 | |
608 | --x) | |
609 | # Obsolete; use --with-x. | |
610 | with_x=yes ;; | |
611 | ||
612 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
613 | | --x-incl | --x-inc | --x-in | --x-i) | |
614 | ac_prev=x_includes ;; | |
615 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
616 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
ba479fd2 | 617 | x_includes=$ac_optarg ;; |
861bb6c1 JL |
618 | |
619 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
620 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
621 | ac_prev=x_libraries ;; | |
622 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
623 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
ba479fd2 | 624 | x_libraries=$ac_optarg ;; |
861bb6c1 | 625 | |
ba479fd2 NN |
626 | -*) { echo "$as_me: error: unrecognized option: $ac_option |
627 | Try \`$0 --help' for more information." >&2 | |
628 | { (exit 1); exit 1; }; } | |
861bb6c1 JL |
629 | ;; |
630 | ||
ba479fd2 NN |
631 | *=*) |
632 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
633 | # Reject names that are not valid shell variable names. | |
634 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
635 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
636 | { (exit 1); exit 1; }; } | |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
638 | eval "$ac_envvar='$ac_optarg'" | |
639 | export $ac_envvar ;; | |
640 | ||
861bb6c1 | 641 | *) |
ba479fd2 NN |
642 | # FIXME: should be removed in autoconf 3.0. |
643 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
644 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
645 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
646 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
861bb6c1 JL |
647 | ;; |
648 | ||
649 | esac | |
650 | done | |
651 | ||
652 | if test -n "$ac_prev"; then | |
ba479fd2 NN |
653 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
654 | { echo "$as_me: error: missing argument to $ac_option" >&2 | |
655 | { (exit 1); exit 1; }; } | |
63cf211a | 656 | fi |
63cf211a | 657 | |
ba479fd2 NN |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
660 | do | |
661 | eval ac_val=$`echo $ac_var` | |
662 | case $ac_val in | |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
666 | esac | |
667 | done | |
093e61a6 | 668 | |
ba479fd2 NN |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
86da66b5 | 671 | localstatedir libdir includedir oldincludedir infodir mandir |
861bb6c1 | 672 | do |
ba479fd2 NN |
673 | eval ac_val=$`echo $ac_var` |
674 | case $ac_val in | |
675 | [\\/$]* | ?:[\\/]* ) ;; | |
676 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
677 | { (exit 1); exit 1; }; };; | |
861bb6c1 JL |
678 | esac |
679 | done | |
680 | ||
ba479fd2 NN |
681 | # There might be people who depend on the old broken behavior: `$host' |
682 | # used to hold the argument of --host etc. | |
683 | # FIXME: To remove some day. | |
684 | build=$build_alias | |
685 | host=$host_alias | |
686 | target=$target_alias | |
687 | ||
688 | # FIXME: To remove some day. | |
689 | if test "x$host_alias" != x; then | |
690 | if test "x$build_alias" = x; then | |
691 | cross_compiling=maybe | |
692 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
693 | If a cross compiler is detected then cross compile mode will be used." >&2 | |
694 | elif test "x$build_alias" != "x$host_alias"; then | |
695 | cross_compiling=yes | |
696 | fi | |
697 | fi | |
6e3f3080 | 698 | |
ba479fd2 NN |
699 | ac_tool_prefix= |
700 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
701 | ||
702 | test "$silent" = yes && exec 6>/dev/null | |
861bb6c1 | 703 | |
861bb6c1 JL |
704 | |
705 | # Find the source files, if location was not specified. | |
706 | if test -z "$srcdir"; then | |
707 | ac_srcdir_defaulted=yes | |
708 | # Try the directory containing this script, then its parent. | |
ba479fd2 NN |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || |
710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
713 | X"$0" : 'X\(/\)' \| \ | |
714 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
715 | echo X"$0" | |
716 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
717 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
718 | /^X\(\/\/\)$/{ s//\1/; q; } | |
719 | /^X\(\/\).*/{ s//\1/; q; } | |
720 | s/.*/./; q'` | |
861bb6c1 JL |
721 | srcdir=$ac_confdir |
722 | if test ! -r $srcdir/$ac_unique_file; then | |
723 | srcdir=.. | |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
728 | if test ! -r $srcdir/$ac_unique_file; then | |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
ba479fd2 NN |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 |
731 | { (exit 1); exit 1; }; } | |
63cf211a | 732 | else |
ba479fd2 NN |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 |
734 | { (exit 1); exit 1; }; } | |
63cf211a NN |
735 | fi |
736 | fi | |
ba479fd2 NN |
737 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || |
738 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
739 | { (exit 1); exit 1; }; } | |
740 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
741 | ac_env_build_alias_set=${build_alias+set} | |
742 | ac_env_build_alias_value=$build_alias | |
743 | ac_cv_env_build_alias_set=${build_alias+set} | |
744 | ac_cv_env_build_alias_value=$build_alias | |
745 | ac_env_host_alias_set=${host_alias+set} | |
746 | ac_env_host_alias_value=$host_alias | |
747 | ac_cv_env_host_alias_set=${host_alias+set} | |
748 | ac_cv_env_host_alias_value=$host_alias | |
749 | ac_env_target_alias_set=${target_alias+set} | |
750 | ac_env_target_alias_value=$target_alias | |
751 | ac_cv_env_target_alias_set=${target_alias+set} | |
752 | ac_cv_env_target_alias_value=$target_alias | |
753 | ac_env_CC_set=${CC+set} | |
754 | ac_env_CC_value=$CC | |
755 | ac_cv_env_CC_set=${CC+set} | |
756 | ac_cv_env_CC_value=$CC | |
757 | ac_env_CFLAGS_set=${CFLAGS+set} | |
758 | ac_env_CFLAGS_value=$CFLAGS | |
759 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
760 | ac_cv_env_CFLAGS_value=$CFLAGS | |
761 | ac_env_LDFLAGS_set=${LDFLAGS+set} | |
762 | ac_env_LDFLAGS_value=$LDFLAGS | |
763 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
764 | ac_cv_env_LDFLAGS_value=$LDFLAGS | |
765 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
766 | ac_env_CPPFLAGS_value=$CPPFLAGS | |
767 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
768 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
769 | ac_env_CPP_set=${CPP+set} | |
770 | ac_env_CPP_value=$CPP | |
771 | ac_cv_env_CPP_set=${CPP+set} | |
772 | ac_cv_env_CPP_value=$CPP | |
6de9cd9a DN |
773 | ac_env_GMPLIBS_set=${GMPLIBS+set} |
774 | ac_env_GMPLIBS_value=$GMPLIBS | |
775 | ac_cv_env_GMPLIBS_set=${GMPLIBS+set} | |
776 | ac_cv_env_GMPLIBS_value=$GMPLIBS | |
777 | ac_env_GMPINC_set=${GMPINC+set} | |
778 | ac_env_GMPINC_value=$GMPINC | |
779 | ac_cv_env_GMPINC_set=${GMPINC+set} | |
780 | ac_cv_env_GMPINC_value=$GMPINC | |
63cf211a | 781 | |
ba479fd2 NN |
782 | # |
783 | # Report the --help message. | |
784 | # | |
785 | if test "$ac_init_help" = "long"; then | |
786 | # Omit some internal or obsolete options to make the list less imposing. | |
787 | # This message is too long to be a string in the A/UX 3.1 sh. | |
788 | cat <<_ACEOF | |
789 | \`configure' configures this package to adapt to many kinds of systems. | |
861bb6c1 | 790 | |
ba479fd2 | 791 | Usage: $0 [OPTION]... [VAR=VALUE]... |
861bb6c1 | 792 | |
ba479fd2 NN |
793 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
794 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
861bb6c1 | 795 | |
ba479fd2 | 796 | Defaults for the options are specified in brackets. |
861bb6c1 | 797 | |
ba479fd2 NN |
798 | Configuration: |
799 | -h, --help display this help and exit | |
800 | --help=short display options specific to this package | |
801 | --help=recursive display the short help of all the included packages | |
802 | -V, --version display version information and exit | |
803 | -q, --quiet, --silent do not print \`checking...' messages | |
804 | --cache-file=FILE cache test results in FILE [disabled] | |
805 | -C, --config-cache alias for \`--cache-file=config.cache' | |
806 | -n, --no-create do not create output files | |
807 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
808 | ||
809 | _ACEOF | |
810 | ||
811 | cat <<_ACEOF | |
812 | Installation directories: | |
813 | --prefix=PREFIX install architecture-independent files in PREFIX | |
86da66b5 | 814 | [$ac_default_prefix] |
ba479fd2 | 815 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
86da66b5 | 816 | [PREFIX] |
861bb6c1 | 817 | |
ba479fd2 NN |
818 | By default, \`make install' will install all the files in |
819 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
820 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
821 | for instance \`--prefix=\$HOME'. | |
13c22933 | 822 | |
ba479fd2 | 823 | For better control, use the options below. |
13c22933 | 824 | |
ba479fd2 NN |
825 | Fine tuning of the installation directories: |
826 | --bindir=DIR user executables [EPREFIX/bin] | |
827 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
828 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
829 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
830 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
831 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
832 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
833 | --libdir=DIR object code libraries [EPREFIX/lib] | |
834 | --includedir=DIR C header files [PREFIX/include] | |
835 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
836 | --infodir=DIR info documentation [PREFIX/info] | |
837 | --mandir=DIR man documentation [PREFIX/man] | |
838 | _ACEOF | |
13c22933 | 839 | |
ba479fd2 | 840 | cat <<\_ACEOF |
13c22933 | 841 | |
ba479fd2 NN |
842 | Program names: |
843 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
844 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
845 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | |
13c22933 | 846 | |
ba479fd2 NN |
847 | System types: |
848 | --build=BUILD configure for building on BUILD [guessed] | |
849 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
850 | --target=TARGET configure for building compilers for TARGET [HOST] | |
851 | _ACEOF | |
13c22933 JJ |
852 | fi |
853 | ||
ba479fd2 | 854 | if test -n "$ac_init_help"; then |
13c22933 | 855 | |
ba479fd2 | 856 | cat <<\_ACEOF |
13c22933 | 857 | |
ba479fd2 NN |
858 | Optional Features: |
859 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
860 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
03787dfd KC |
861 | --enable-generated-files-in-srcdir |
862 | put copies of generated files in source dir | |
863 | intended for creating source tarballs for users | |
864 | without texinfo bison or flex. | |
09a9c095 | 865 | --enable-werror-always enable -Werror always |
ba479fd2 NN |
866 | --enable-werror enable -Werror in bootstrap stage2 and later |
867 | --enable-checking=LIST | |
868 | enable expensive run-time checks. With LIST, | |
869 | enable only specific categories of checks. | |
cdce5c16 NS |
870 | Categories are: yes,no,all,none,release. |
871 | Flags are: assert,fold,gc,gcac,misc, | |
872 | rtlflag,rtl,runtime,tree,valgrind. | |
74ee1642 | 873 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 874 | --enable-coverage=LEVEL |
fb38008e | 875 | enable compiler's code coverage collection. |
ba479fd2 NN |
876 | Use to measure compiler performance and locate |
877 | unused parts of the compiler. With LEVEL, specify | |
878 | optimization. Values are opt, noopt, | |
879 | default is noopt | |
880 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
881 | --enable-multilib enable library support for multiple ABIs | |
882 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
486aa804 | 883 | --enable-decimal-float enable decimal float extension to C |
ba479fd2 NN |
884 | --enable-threads enable thread usage for target GCC |
885 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
886 | --enable-tls enable or disable generation of tls code |
887 | overriding the assembler check for tls support | |
ba479fd2 NN |
888 | --enable-objc-gc enable the use of Boehm's garbage collector with |
889 | the GNU Objective-C runtime | |
890 | --disable-shared don't provide a shared libgcc | |
891 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 892 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 893 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
894 | --enable-initfini-array use .init_array/.fini_array sections |
895 | --enable-sjlj-exceptions | |
896 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 897 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
898 | --disable-win32-registry |
899 | disable lookup of installation paths in the | |
900 | Registry on Windows hosts | |
901 | --enable-win32-registry enable registry lookup (default) | |
902 | --enable-win32-registry=KEY | |
903 | use KEY instead of GCC version as the last portion | |
904 | of the registry key | |
905 | --enable-maintainer-mode | |
906 | enable make rules and dependencies not useful | |
907 | (and sometimes confusing) to the casual installer | |
908 | --enable-version-specific-runtime-libs | |
909 | specify that runtime libraries should be | |
910 | installed in a compiler-specific directory | |
093e61a6 | 911 | |
ba479fd2 NN |
912 | Optional Packages: |
913 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
914 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
915 | --with-local-prefix=DIR specifies directory to put local include | |
916 | --with-gxx-include-dir=DIR | |
917 | specifies directory to put g++ header files | |
918 | --with-cpp-install-dir=DIR | |
919 | install the user visible C preprocessor in DIR | |
920 | (relative to PREFIX) as well as PREFIX/bin | |
921 | --with-gnu-ld arrange to work with GNU ld. | |
922 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 923 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
924 | --with-gnu-as arrange to work with GNU as |
925 | --with-as arrange to use the specified as (full pathname) | |
926 | --with-stabs arrange to use stabs instead of host debug format | |
927 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
928 | --with-build-sysroot=sysroot |
929 | use sysroot as the system root during the build | |
ba479fd2 | 930 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
931 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
932 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
933 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 934 | --with-system-libunwind use installed libunwind |
ed965309 | 935 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 936 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
937 | with the compiler |
938 | --with-system-zlib use installed libz | |
22482f74 MS |
939 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
940 | --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] | |
941 | --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] | |
942 | --with-htmldir=DIR html documentation in in DIR [DOCDIR] | |
13c22933 | 943 | |
ba479fd2 NN |
944 | Some influential environment variables: |
945 | CC C compiler command | |
946 | CFLAGS C compiler flags | |
947 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
948 | nonstandard directory <lib dir> | |
949 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
950 | headers in a nonstandard directory <include dir> | |
951 | CPP C preprocessor | |
6de9cd9a DN |
952 | GMPLIBS How to link GMP |
953 | GMPINC How to find GMP include files | |
13c22933 | 954 | |
ba479fd2 NN |
955 | Use these variables to override the choices made by `configure' or to help |
956 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 957 | |
ba479fd2 NN |
958 | _ACEOF |
959 | fi | |
6e3f3080 | 960 | |
ba479fd2 NN |
961 | if test "$ac_init_help" = "recursive"; then |
962 | # If there are subdirs, report their specific --help. | |
963 | ac_popdir=`pwd` | |
964 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
965 | test -d $ac_dir || continue | |
966 | ac_builddir=. | |
967 | ||
968 | if test "$ac_dir" != .; then | |
969 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
970 | # A "../" for each directory in $ac_dir_suffix. | |
971 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
972 | else | |
973 | ac_dir_suffix= ac_top_builddir= | |
974 | fi | |
975 | ||
976 | case $srcdir in | |
977 | .) # No --srcdir option. We are building in place. | |
978 | ac_srcdir=. | |
979 | if test -z "$ac_top_builddir"; then | |
980 | ac_top_srcdir=. | |
981 | else | |
982 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
983 | fi ;; | |
984 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
985 | ac_srcdir=$srcdir$ac_dir_suffix; | |
986 | ac_top_srcdir=$srcdir ;; | |
987 | *) # Relative path. | |
988 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
989 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
990 | esac | |
8ab705be KC |
991 | |
992 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
993 | # the directories may not exist. | |
994 | case `pwd` in | |
995 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 996 | *) |
8ab705be KC |
997 | case "$ac_dir" in |
998 | .) ac_abs_builddir=`pwd`;; | |
999 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
1000 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
1001 | esac;; |
1002 | esac | |
8ab705be | 1003 | case $ac_abs_builddir in |
86da66b5 HPN |
1004 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
1005 | *) | |
1006 | case ${ac_top_builddir}. in | |
8ab705be | 1007 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 1008 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 1009 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
1010 | esac;; |
1011 | esac | |
8ab705be | 1012 | case $ac_abs_builddir in |
86da66b5 HPN |
1013 | .) ac_abs_srcdir=$ac_srcdir;; |
1014 | *) | |
1015 | case $ac_srcdir in | |
8ab705be | 1016 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1017 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1018 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1019 | esac;; |
1020 | esac | |
8ab705be | 1021 | case $ac_abs_builddir in |
86da66b5 HPN |
1022 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1023 | *) | |
1024 | case $ac_top_srcdir in | |
8ab705be | 1025 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1026 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1027 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1028 | esac;; |
1029 | esac | |
ba479fd2 NN |
1030 | |
1031 | cd $ac_dir | |
1032 | # Check for guested configure; otherwise get Cygnus style configure. | |
1033 | if test -f $ac_srcdir/configure.gnu; then | |
1034 | echo | |
1035 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1036 | elif test -f $ac_srcdir/configure; then | |
1037 | echo | |
1038 | $SHELL $ac_srcdir/configure --help=recursive | |
1039 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1040 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1041 | echo |
1042 | $ac_configure --help | |
1043 | else | |
1044 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1045 | fi | |
ec6c7392 | 1046 | cd $ac_popdir |
ba479fd2 NN |
1047 | done |
1048 | fi | |
1049 | ||
1050 | test -n "$ac_init_help" && exit 0 | |
1051 | if $ac_init_version; then | |
1052 | cat <<\_ACEOF | |
1053 | ||
86da66b5 | 1054 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1055 | This configure script is free software; the Free Software Foundation |
1056 | gives unlimited permission to copy, distribute and modify it. | |
1057 | _ACEOF | |
1058 | exit 0 | |
1059 | fi | |
1060 | exec 5>config.log | |
1061 | cat >&5 <<_ACEOF | |
1062 | This file contains any messages produced by compilers while | |
1063 | running configure, to aid debugging if configure makes a mistake. | |
1064 | ||
1065 | It was created by $as_me, which was | |
8ab705be | 1066 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1067 | |
1068 | $ $0 $@ | |
1069 | ||
1070 | _ACEOF | |
1071 | { | |
1072 | cat <<_ASUNAME | |
1073 | ## --------- ## | |
1074 | ## Platform. ## | |
1075 | ## --------- ## | |
1076 | ||
1077 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1078 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1079 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1080 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1081 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1082 | ||
1083 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1084 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1085 | ||
1086 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1087 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1088 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1089 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1090 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1091 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1092 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1093 | ||
1094 | _ASUNAME | |
1095 | ||
1096 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1097 | for as_dir in $PATH | |
1098 | do | |
1099 | IFS=$as_save_IFS | |
1100 | test -z "$as_dir" && as_dir=. | |
1101 | echo "PATH: $as_dir" | |
1102 | done | |
1103 | ||
1104 | } >&5 | |
1105 | ||
1106 | cat >&5 <<_ACEOF | |
1107 | ||
1108 | ||
1109 | ## ----------- ## | |
1110 | ## Core tests. ## | |
1111 | ## ----------- ## | |
1112 | ||
1113 | _ACEOF | |
1114 | ||
1115 | ||
1116 | # Keep a trace of the command line. | |
1117 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1118 | # Strip out --silent because we don't want to record it for future runs. | |
1119 | # Also quote any args containing shell meta-characters. | |
1120 | # Make two passes to allow for proper duplicate-argument suppression. | |
1121 | ac_configure_args= | |
1122 | ac_configure_args0= | |
1123 | ac_configure_args1= | |
1124 | ac_sep= | |
1125 | ac_must_keep_next=false | |
1126 | for ac_pass in 1 2 | |
1127 | do | |
1128 | for ac_arg | |
1129 | do | |
1130 | case $ac_arg in | |
1131 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1132 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1133 | | -silent | --silent | --silen | --sile | --sil) | |
1134 | continue ;; | |
1135 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1136 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1137 | esac | |
1138 | case $ac_pass in | |
1139 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1140 | 2) | |
1141 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1142 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1143 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1144 | else |
86da66b5 HPN |
1145 | case $ac_arg in |
1146 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1147 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1148 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1149 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1150 | case "$ac_configure_args0 " in | |
1151 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1152 | esac | |
1153 | ;; | |
1154 | -* ) ac_must_keep_next=true ;; | |
1155 | esac | |
ba479fd2 NN |
1156 | fi |
1157 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1158 | # Get rid of the leading space. | |
1159 | ac_sep=" " | |
1160 | ;; | |
1161 | esac | |
1162 | done | |
1163 | done | |
1164 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1165 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1166 | ||
1167 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1168 | # config.log. We remove comments because anyway the quotes in there | |
1169 | # would cause problems or look ugly. | |
1170 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1171 | # such as our DU 5.0 friend, will then `close' the trap. | |
1172 | trap 'exit_status=$? | |
1173 | # Save into config.log some information that might help in debugging. | |
1174 | { | |
1175 | echo | |
1176 | ||
1177 | cat <<\_ASBOX | |
1178 | ## ---------------- ## | |
1179 | ## Cache variables. ## | |
1180 | ## ---------------- ## | |
1181 | _ASBOX | |
1182 | echo | |
1183 | # The following way of writing the cache mishandles newlines in values, | |
1184 | { | |
1185 | (set) 2>&1 | | |
1186 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1187 | *ac_space=\ *) | |
1188 | sed -n \ | |
86da66b5 HPN |
1189 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1190 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1191 | ;; |
1192 | *) | |
1193 | sed -n \ | |
86da66b5 | 1194 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1195 | ;; |
1196 | esac; | |
1197 | } | |
1198 | echo | |
1199 | ||
1200 | cat <<\_ASBOX | |
1201 | ## ----------------- ## | |
1202 | ## Output variables. ## | |
1203 | ## ----------------- ## | |
1204 | _ASBOX | |
1205 | echo | |
1206 | for ac_var in $ac_subst_vars | |
1207 | do | |
1208 | eval ac_val=$`echo $ac_var` | |
1209 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1210 | done | sort | |
1211 | echo | |
1212 | ||
1213 | if test -n "$ac_subst_files"; then | |
1214 | cat <<\_ASBOX | |
1215 | ## ------------- ## | |
1216 | ## Output files. ## | |
1217 | ## ------------- ## | |
1218 | _ASBOX | |
1219 | echo | |
1220 | for ac_var in $ac_subst_files | |
1221 | do | |
1222 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1223 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1224 | done | sort |
1225 | echo | |
1226 | fi | |
1227 | ||
1228 | if test -s confdefs.h; then | |
1229 | cat <<\_ASBOX | |
1230 | ## ----------- ## | |
1231 | ## confdefs.h. ## | |
1232 | ## ----------- ## | |
1233 | _ASBOX | |
1234 | echo | |
1235 | sed "/^$/d" confdefs.h | sort | |
1236 | echo | |
1237 | fi | |
1238 | test "$ac_signal" != 0 && | |
1239 | echo "$as_me: caught signal $ac_signal" | |
1240 | echo "$as_me: exit $exit_status" | |
1241 | } >&5 | |
86da66b5 | 1242 | rm -f core *.core && |
ba479fd2 NN |
1243 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1244 | exit $exit_status | |
1245 | ' 0 | |
1246 | for ac_signal in 1 2 13 15; do | |
1247 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1248 | done | |
1249 | ac_signal=0 | |
1250 | ||
1251 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1252 | rm -rf conftest* confdefs.h | |
1253 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1254 | echo >confdefs.h | |
1255 | ||
1256 | # Predefined preprocessor variables. | |
1257 | ||
1258 | cat >>confdefs.h <<_ACEOF | |
1259 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1260 | _ACEOF | |
1261 | ||
1262 | ||
1263 | cat >>confdefs.h <<_ACEOF | |
1264 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1265 | _ACEOF | |
1266 | ||
1267 | ||
1268 | cat >>confdefs.h <<_ACEOF | |
1269 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1270 | _ACEOF | |
1271 | ||
1272 | ||
1273 | cat >>confdefs.h <<_ACEOF | |
1274 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1275 | _ACEOF | |
1276 | ||
1277 | ||
1278 | cat >>confdefs.h <<_ACEOF | |
1279 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1280 | _ACEOF | |
1281 | ||
1282 | ||
1283 | # Let the site file select an alternate cache file if it wants to. | |
1284 | # Prefer explicitly selected file to automatically selected ones. | |
1285 | if test -z "$CONFIG_SITE"; then | |
1286 | if test "x$prefix" != xNONE; then | |
1287 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1288 | else | |
1289 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1290 | fi | |
1291 | fi | |
1292 | for ac_site_file in $CONFIG_SITE; do | |
1293 | if test -r "$ac_site_file"; then | |
1294 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1295 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1296 | sed 's/^/| /' "$ac_site_file" >&5 | |
1297 | . "$ac_site_file" | |
1298 | fi | |
1299 | done | |
1300 | ||
1301 | if test -r "$cache_file"; then | |
1302 | # Some versions of bash will fail to source /dev/null (special | |
1303 | # files actually), so we avoid doing that. | |
1304 | if test -f "$cache_file"; then | |
1305 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1306 | echo "$as_me: loading cache $cache_file" >&6;} | |
1307 | case $cache_file in | |
1308 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1309 | *) . ./$cache_file;; | |
1310 | esac | |
1311 | fi | |
1312 | else | |
1313 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1314 | echo "$as_me: creating cache $cache_file" >&6;} | |
1315 | >$cache_file | |
1316 | fi | |
1317 | ||
1318 | # Check that the precious variables saved in the cache have kept the same | |
1319 | # value. | |
1320 | ac_cache_corrupted=false | |
1321 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1322 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1323 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1324 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1325 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1326 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1327 | case $ac_old_set,$ac_new_set in | |
1328 | set,) | |
1329 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1330 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1331 | ac_cache_corrupted=: ;; | |
1332 | ,set) | |
1333 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1334 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1335 | ac_cache_corrupted=: ;; | |
1336 | ,);; | |
1337 | *) | |
1338 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1339 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1340 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1341 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1342 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1343 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1344 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1345 | ac_cache_corrupted=: |
ba479fd2 NN |
1346 | fi;; |
1347 | esac | |
1348 | # Pass precious variables to config.status. | |
1349 | if test "$ac_new_set" = set; then | |
1350 | case $ac_new_val in | |
1351 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1352 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1353 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1354 | esac | |
1355 | case " $ac_configure_args " in | |
1356 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1357 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1358 | esac | |
1359 | fi | |
1360 | done | |
1361 | if $ac_cache_corrupted; then | |
1362 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1363 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1364 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1365 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1366 | { (exit 1); exit 1; }; } | |
1367 | fi | |
1368 | ||
1369 | ac_ext=c | |
1370 | ac_cpp='$CPP $CPPFLAGS' | |
1371 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1372 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1373 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1374 | ||
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | ||
1389 | ||
1390 | ||
1391 | ||
1392 | ||
914c5af7 | 1393 | |
ba479fd2 NN |
1394 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1395 | ||
1396 | ||
9f18db39 PB |
1397 | gcc_version=`cat $srcdir/BASE-VER` |
1398 | ||
ba479fd2 NN |
1399 | # Determine the host, build, and target systems |
1400 | ac_aux_dir= | |
1401 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1402 | if test -f $ac_dir/install-sh; then | |
1403 | ac_aux_dir=$ac_dir | |
1404 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1405 | break | |
1406 | elif test -f $ac_dir/install.sh; then | |
1407 | ac_aux_dir=$ac_dir | |
1408 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1409 | break | |
1410 | elif test -f $ac_dir/shtool; then | |
1411 | ac_aux_dir=$ac_dir | |
1412 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1413 | break | |
1414 | fi | |
1415 | done | |
1416 | if test -z "$ac_aux_dir"; then | |
1417 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1418 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1419 | { (exit 1); exit 1; }; } | |
1420 | fi | |
1421 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1422 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1423 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1424 | ||
1425 | # Make sure we can run config.sub. | |
1426 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1427 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1428 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1429 | { (exit 1); exit 1; }; } | |
1430 | ||
1431 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1432 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1433 | if test "${ac_cv_build+set}" = set; then | |
1434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1435 | else | |
1436 | ac_cv_build_alias=$build_alias | |
1437 | test -z "$ac_cv_build_alias" && | |
1438 | ac_cv_build_alias=`$ac_config_guess` | |
1439 | test -z "$ac_cv_build_alias" && | |
1440 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1441 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1442 | { (exit 1); exit 1; }; } | |
1443 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1444 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1445 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1446 | { (exit 1); exit 1; }; } | |
1447 | ||
1448 | fi | |
1449 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1450 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1451 | build=$ac_cv_build | |
1452 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1453 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1454 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1455 | ||
1456 | ||
1457 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1458 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1459 | if test "${ac_cv_host+set}" = set; then | |
1460 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1461 | else | |
1462 | ac_cv_host_alias=$host_alias | |
1463 | test -z "$ac_cv_host_alias" && | |
1464 | ac_cv_host_alias=$ac_cv_build_alias | |
1465 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1466 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1467 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1468 | { (exit 1); exit 1; }; } | |
1469 | ||
1470 | fi | |
1471 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1472 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1473 | host=$ac_cv_host | |
1474 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1475 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1476 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1477 | ||
1478 | ||
1479 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1480 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1481 | if test "${ac_cv_target+set}" = set; then | |
1482 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1483 | else | |
1484 | ac_cv_target_alias=$target_alias | |
1485 | test "x$ac_cv_target_alias" = "x" && | |
1486 | ac_cv_target_alias=$ac_cv_host_alias | |
1487 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1488 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1489 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1490 | { (exit 1); exit 1; }; } | |
1491 | ||
1492 | fi | |
1493 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1494 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1495 | target=$ac_cv_target | |
1496 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1497 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1498 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1499 | ||
1500 | ||
1501 | # The aliases save the names the user supplied, while $host etc. | |
1502 | # will get canonicalized. | |
1503 | test -n "$target_alias" && | |
1504 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1505 | NONENONEs,x,x, && | |
1506 | program_prefix=${target_alias}- | |
1507 | ||
1508 | # Determine the noncanonical target name, for directory use. | |
18fc9bd4 RG |
1509 | case ${build_alias} in |
1510 | "") build_noncanonical=${build} ;; | |
1511 | *) build_noncanonical=${build_alias} ;; | |
1512 | esac | |
1513 | ||
1514 | case ${host_alias} in | |
1515 | "") host_noncanonical=${build_noncanonical} ;; | |
1516 | *) host_noncanonical=${host_alias} ;; | |
1517 | esac | |
1518 | ||
1519 | case ${target_alias} in | |
1520 | "") target_noncanonical=${host_noncanonical} ;; | |
1521 | *) target_noncanonical=${target_alias} ;; | |
1522 | esac | |
1523 | ||
1524 | ||
1525 | ||
8f1529e6 L |
1526 | |
1527 | # Determine the target- and build-specific subdirectories | |
18fc9bd4 RG |
1528 | # Prefix 'build-' so this never conflicts with target_subdir. |
1529 | build_subdir="build-${build_noncanonical}" | |
1530 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories | |
1531 | if ( test $srcdir = . && test -d gcc ) \ | |
1532 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1533 | host_subdir="host-${host_noncanonical}" | |
1534 | else | |
1535 | host_subdir=. | |
1536 | fi | |
1537 | # No prefix. | |
1538 | target_subdir=${target_noncanonical} | |
1539 | ||
73458fb7 | 1540 | |
093e61a6 | 1541 | # Set program_transform_name |
13c22933 | 1542 | test "$program_prefix" != NONE && |
ba479fd2 | 1543 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1544 | # Use a double $ so make ignores it. |
1545 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1546 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1547 | # Double any \ or $. echo might interpret backslashes. | |
1548 | # By default was `s,x,x', remove it if useless. | |
1549 | cat <<\_ACEOF >conftest.sed | |
1550 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1551 | _ACEOF | |
1552 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1553 | rm conftest.sed | |
13c22933 JJ |
1554 | |
1555 | ||
34a86c2b NN |
1556 | # Check for bogus environment variables. |
1557 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1558 | # since this would lead to problems installing/building glibc. | |
1559 | # LIBRARY_PATH contains the current directory if one of the following | |
1560 | # is true: | |
1561 | # - one of the terminals (":" and ";") is the first or last sign | |
1562 | # - two terminals occur directly after each other | |
1563 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1564 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1565 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1566 | case ${LIBRARY_PATH} in |
1567 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1568 | library_path_setting="contains current directory" | |
1569 | ;; | |
1570 | *) | |
1571 | library_path_setting="ok" | |
1572 | ;; | |
1573 | esac | |
ba479fd2 NN |
1574 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1575 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1576 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1577 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1578 | *** LIBRARY_PATH shouldn't contain the current directory when |
1579 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1580 | *** and run configure again." >&5 |
1581 | echo "$as_me: error: | |
1582 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1583 | *** building gcc. Please change the environment variable | |
1584 | *** and run configure again." >&2;} | |
1585 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1586 | fi |
1587 | ||
34a86c2b NN |
1588 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1589 | # since this would lead to problems installing/building glibc. | |
1590 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1591 | # is true: | |
1592 | # - one of the terminals (":" and ";") is the first or last sign | |
1593 | # - two terminals occur directly after each other | |
1594 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1595 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1596 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1597 | case ${GCC_EXEC_PREFIX} in |
1598 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1599 | gcc_exec_prefix_setting="contains current directory" | |
1600 | ;; | |
1601 | *) | |
1602 | gcc_exec_prefix_setting="ok" | |
1603 | ;; | |
1604 | esac | |
ba479fd2 NN |
1605 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1606 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1607 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1608 | { { echo "$as_me:$LINENO: error: |
1609 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1610 | *** building gcc. Please change the environment variable | |
1611 | *** and run configure again." >&5 | |
1612 | echo "$as_me: error: | |
cafe096b EC |
1613 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1614 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1615 | *** and run configure again." >&2;} |
1616 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1617 | fi |
1618 | ||
1619 | # ----------- | |
1620 | # Directories | |
1621 | # ----------- | |
1622 | ||
1623 | # Specify the local prefix | |
1624 | local_prefix= | |
ba479fd2 | 1625 | |
34a86c2b NN |
1626 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1627 | if test "${with_local_prefix+set}" = set; then | |
1628 | withval="$with_local_prefix" | |
1629 | case "${withval}" in | |
ba479fd2 NN |
1630 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1631 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1632 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1633 | no) ;; |
1634 | *) local_prefix=$with_local_prefix ;; | |
1635 | esac | |
ba479fd2 | 1636 | fi; |
34a86c2b NN |
1637 | |
1638 | # Default local prefix if it is empty | |
1639 | if test x$local_prefix = x; then | |
1640 | local_prefix=/usr/local | |
1641 | fi | |
1642 | ||
1643 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1644 | # passed in by the toplevel make and thus we'd get different behavior | |
1645 | # depending on where we built the sources. | |
1646 | gcc_gxx_include_dir= | |
1647 | # Specify the g++ header file directory | |
ba479fd2 | 1648 | |
34a86c2b NN |
1649 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1650 | if test "${with_gxx_include_dir+set}" = set; then | |
1651 | withval="$with_gxx_include_dir" | |
1652 | case "${withval}" in | |
ba479fd2 NN |
1653 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1654 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1655 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1656 | no) ;; |
1657 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1658 | esac | |
ba479fd2 | 1659 | fi; |
34a86c2b | 1660 | |
0f57bf40 | 1661 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
1662 | if test x${gcc_gxx_include_dir} = x; then |
1663 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1664 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1665 | else | |
0f57bf40 MM |
1666 | libstdcxx_incdir='include/c++/$(version)' |
1667 | if test x$host != x$target; then | |
1668 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
1669 | fi | |
1670 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" | |
34a86c2b NN |
1671 | fi |
1672 | fi | |
1673 | ||
ba479fd2 | 1674 | |
34a86c2b NN |
1675 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1676 | if test "${with_cpp_install_dir+set}" = set; then | |
1677 | withval="$with_cpp_install_dir" | |
1678 | if test x$withval = xyes; then | |
ba479fd2 NN |
1679 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1680 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1681 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1682 | elif test x$withval != xno; then |
1683 | cpp_install_dir=$withval | |
1684 | fi | |
ba479fd2 | 1685 | fi; |
34a86c2b | 1686 | |
51b9ff45 | 1687 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1688 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1689 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1690 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1691 | # just that. |
1692 | ||
03787dfd KC |
1693 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1694 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1695 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1696 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1697 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1698 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1699 | else |
03787dfd | 1700 | generated_files_in_srcdir=no |
ba479fd2 | 1701 | fi; |
51b9ff45 | 1702 | |
03787dfd KC |
1703 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1704 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1705 | ||
1706 | if test "$generated_files_in_srcdir" = "yes"; then | |
1707 | GENINSRC='' | |
03787dfd KC |
1708 | else |
1709 | GENINSRC='#' | |
03787dfd KC |
1710 | fi |
1711 | ||
1712 | ||
34a86c2b NN |
1713 | # ------------------- |
1714 | # Find default linker | |
1715 | # ------------------- | |
1716 | ||
1717 | # With GNU ld | |
ba479fd2 | 1718 | |
34a86c2b NN |
1719 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1720 | if test "${with_gnu_ld+set}" = set; then | |
1721 | withval="$with_gnu_ld" | |
1722 | gnu_ld_flag="$with_gnu_ld" | |
1723 | else | |
1724 | gnu_ld_flag=no | |
ba479fd2 | 1725 | fi; |
6e3f3080 | 1726 | |
63cf211a | 1727 | # With pre-defined ld |
ba479fd2 | 1728 | |
34a86c2b NN |
1729 | # Check whether --with-ld or --without-ld was given. |
1730 | if test "${with_ld+set}" = set; then | |
1731 | withval="$with_ld" | |
1732 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1733 | fi; |
34a86c2b NN |
1734 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1735 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1736 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1737 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1738 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1739 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1740 | gnu_ld_flag=yes | |
1741 | fi | |
ba479fd2 NN |
1742 | |
1743 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1744 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1745 | _ACEOF |
34a86c2b NN |
1746 | |
1747 | fi | |
1748 | ||
ba479fd2 NN |
1749 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1750 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1751 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1752 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1753 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1754 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1755 | else |
ba479fd2 NN |
1756 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1757 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1758 | fi |
1759 | else | |
ba479fd2 NN |
1760 | echo "$as_me:$LINENO: result: no" >&5 |
1761 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1762 | fi |
1763 | ||
d594623a L |
1764 | # With demangler in GNU ld |
1765 | ||
1766 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1767 | if test "${with_demangler_in_ld+set}" = set; then | |
1768 | withval="$with_demangler_in_ld" | |
1769 | demangler_in_ld="$with_demangler_in_ld" | |
1770 | else | |
1771 | demangler_in_ld=no | |
1772 | fi; | |
1773 | ||
34a86c2b NN |
1774 | # ---------------------- |
1775 | # Find default assembler | |
1776 | # ---------------------- | |
1777 | ||
1778 | # With GNU as | |
ba479fd2 | 1779 | |
34a86c2b NN |
1780 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1781 | if test "${with_gnu_as+set}" = set; then | |
1782 | withval="$with_gnu_as" | |
1783 | gas_flag="$with_gnu_as" | |
1784 | else | |
1785 | gas_flag=no | |
ba479fd2 | 1786 | fi; |
34a86c2b NN |
1787 | |
1788 | ||
1789 | # Check whether --with-as or --without-as was given. | |
1790 | if test "${with_as+set}" = set; then | |
1791 | withval="$with_as" | |
1792 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1793 | fi; |
34a86c2b NN |
1794 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1795 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1796 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1797 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1798 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1799 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1800 | gas_flag=yes | |
1801 | fi | |
ba479fd2 NN |
1802 | |
1803 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1804 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1805 | _ACEOF |
34a86c2b NN |
1806 | |
1807 | fi | |
1808 | ||
ba479fd2 NN |
1809 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1810 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1811 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1812 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1813 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1814 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1815 | else |
ba479fd2 NN |
1816 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1817 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1818 | fi |
1819 | else | |
ba479fd2 NN |
1820 | echo "$as_me:$LINENO: result: no" >&5 |
1821 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1822 | fi |
1823 | ||
1824 | # --------------- | |
1825 | # Find C compiler | |
1826 | # --------------- | |
1827 | ||
426ca3ca RO |
1828 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1829 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1830 | # file, even when creating an executable, so an execution test fails. | |
1831 | # Remove possible default executable files to avoid this. | |
1832 | # | |
1833 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1834 | # Autoconf includes it. | |
1835 | rm -f a.out a.exe b.out | |
1836 | ||
34a86c2b | 1837 | # Find the native compiler |
ba479fd2 NN |
1838 | ac_ext=c |
1839 | ac_cpp='$CPP $CPPFLAGS' | |
1840 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1841 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1842 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1843 | if test -n "$ac_tool_prefix"; then | |
1844 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1845 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1846 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1847 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1848 | if test "${ac_cv_prog_CC+set}" = set; then | |
1849 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1850 | else | |
1851 | if test -n "$CC"; then | |
1852 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1853 | else | |
1854 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1855 | for as_dir in $PATH | |
1856 | do | |
1857 | IFS=$as_save_IFS | |
1858 | test -z "$as_dir" && as_dir=. | |
1859 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1860 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1861 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1862 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1863 | break 2 | |
1864 | fi | |
1865 | done | |
1866 | done | |
1867 | ||
1868 | fi | |
1869 | fi | |
1870 | CC=$ac_cv_prog_CC | |
1871 | if test -n "$CC"; then | |
1872 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1873 | echo "${ECHO_T}$CC" >&6 | |
1874 | else | |
1875 | echo "$as_me:$LINENO: result: no" >&5 | |
1876 | echo "${ECHO_T}no" >&6 | |
1877 | fi | |
1878 | ||
1879 | fi | |
1880 | if test -z "$ac_cv_prog_CC"; then | |
1881 | ac_ct_CC=$CC | |
1882 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1883 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1884 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1885 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1886 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1887 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1888 | else | |
1889 | if test -n "$ac_ct_CC"; then | |
1890 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1891 | else | |
1892 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1893 | for as_dir in $PATH | |
1894 | do | |
1895 | IFS=$as_save_IFS | |
1896 | test -z "$as_dir" && as_dir=. | |
1897 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1898 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1899 | ac_cv_prog_ac_ct_CC="gcc" | |
1900 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1901 | break 2 | |
1902 | fi | |
1903 | done | |
1904 | done | |
1905 | ||
1906 | fi | |
1907 | fi | |
1908 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1909 | if test -n "$ac_ct_CC"; then | |
1910 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1911 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1912 | else | |
1913 | echo "$as_me:$LINENO: result: no" >&5 | |
1914 | echo "${ECHO_T}no" >&6 | |
1915 | fi | |
1916 | ||
1917 | CC=$ac_ct_CC | |
1918 | else | |
1919 | CC="$ac_cv_prog_CC" | |
1920 | fi | |
1921 | ||
1922 | if test -z "$CC"; then | |
1923 | if test -n "$ac_tool_prefix"; then | |
1924 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1925 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1926 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1927 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1928 | if test "${ac_cv_prog_CC+set}" = set; then | |
1929 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1930 | else |
1931 | if test -n "$CC"; then | |
1932 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1933 | else | |
ba479fd2 NN |
1934 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1935 | for as_dir in $PATH | |
1936 | do | |
1937 | IFS=$as_save_IFS | |
1938 | test -z "$as_dir" && as_dir=. | |
1939 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1940 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1941 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1942 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1943 | break 2 | |
1944 | fi | |
1945 | done | |
1946 | done | |
1947 | ||
cd9e5e7c MK |
1948 | fi |
1949 | fi | |
ba479fd2 | 1950 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1951 | if test -n "$CC"; then |
ba479fd2 NN |
1952 | echo "$as_me:$LINENO: result: $CC" >&5 |
1953 | echo "${ECHO_T}$CC" >&6 | |
1954 | else | |
1955 | echo "$as_me:$LINENO: result: no" >&5 | |
1956 | echo "${ECHO_T}no" >&6 | |
1957 | fi | |
1958 | ||
1959 | fi | |
1960 | if test -z "$ac_cv_prog_CC"; then | |
1961 | ac_ct_CC=$CC | |
1962 | # Extract the first word of "cc", so it can be a program name with args. | |
1963 | set dummy cc; ac_word=$2 | |
1964 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1965 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1966 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1967 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1968 | else | |
1969 | if test -n "$ac_ct_CC"; then | |
1970 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1971 | else | |
1972 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1973 | for as_dir in $PATH | |
1974 | do | |
1975 | IFS=$as_save_IFS | |
1976 | test -z "$as_dir" && as_dir=. | |
1977 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1978 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1979 | ac_cv_prog_ac_ct_CC="cc" | |
1980 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1981 | break 2 | |
1982 | fi | |
1983 | done | |
1984 | done | |
1985 | ||
1986 | fi | |
1987 | fi | |
1988 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1989 | if test -n "$ac_ct_CC"; then | |
1990 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1991 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1992 | else | |
1993 | echo "$as_me:$LINENO: result: no" >&5 | |
1994 | echo "${ECHO_T}no" >&6 | |
1995 | fi | |
1996 | ||
1997 | CC=$ac_ct_CC | |
cd9e5e7c | 1998 | else |
ba479fd2 | 1999 | CC="$ac_cv_prog_CC" |
e9a25f70 | 2000 | fi |
6e3f3080 | 2001 | |
ba479fd2 | 2002 | fi |
6e3f3080 NN |
2003 | if test -z "$CC"; then |
2004 | # Extract the first word of "cc", so it can be a program name with args. | |
2005 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
2006 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2007 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2008 | if test "${ac_cv_prog_CC+set}" = set; then | |
2009 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2010 | else |
2011 | if test -n "$CC"; then | |
2012 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2013 | else | |
2014 | ac_prog_rejected=no | |
ba479fd2 NN |
2015 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2016 | for as_dir in $PATH | |
2017 | do | |
2018 | IFS=$as_save_IFS | |
2019 | test -z "$as_dir" && as_dir=. | |
2020 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2021 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2022 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2023 | ac_prog_rejected=yes | |
2024 | continue | |
2025 | fi | |
2026 | ac_cv_prog_CC="cc" | |
2027 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2028 | break 2 | |
2029 | fi | |
2030 | done | |
2031 | done | |
2032 | ||
6e3f3080 NN |
2033 | if test $ac_prog_rejected = yes; then |
2034 | # We found a bogon in the path, so make sure we never use it. | |
2035 | set dummy $ac_cv_prog_CC | |
2036 | shift | |
ba479fd2 | 2037 | if test $# != 0; then |
6e3f3080 NN |
2038 | # We chose a different compiler from the bogus one. |
2039 | # However, it has the same basename, so the bogon will be chosen | |
2040 | # first if we set CC to just the basename; use the full file name. | |
2041 | shift | |
ba479fd2 | 2042 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2043 | fi |
6e3f3080 NN |
2044 | fi |
2045 | fi | |
2046 | fi | |
ba479fd2 | 2047 | CC=$ac_cv_prog_CC |
6e3f3080 | 2048 | if test -n "$CC"; then |
ba479fd2 NN |
2049 | echo "$as_me:$LINENO: result: $CC" >&5 |
2050 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2051 | else |
ba479fd2 NN |
2052 | echo "$as_me:$LINENO: result: no" >&5 |
2053 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2054 | fi |
6e3f3080 | 2055 | |
ba479fd2 NN |
2056 | fi |
2057 | if test -z "$CC"; then | |
2058 | if test -n "$ac_tool_prefix"; then | |
2059 | for ac_prog in cl | |
2060 | do | |
2061 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2062 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2063 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2064 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2065 | if test "${ac_cv_prog_CC+set}" = set; then | |
2066 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2067 | else |
6e3f3080 NN |
2068 | if test -n "$CC"; then |
2069 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2070 | else | |
ba479fd2 NN |
2071 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2072 | for as_dir in $PATH | |
2073 | do | |
2074 | IFS=$as_save_IFS | |
2075 | test -z "$as_dir" && as_dir=. | |
2076 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2077 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2078 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2079 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2080 | break 2 | |
2081 | fi | |
2082 | done | |
2083 | done | |
2084 | ||
093e61a6 | 2085 | fi |
6e3f3080 | 2086 | fi |
ba479fd2 | 2087 | CC=$ac_cv_prog_CC |
6e3f3080 | 2088 | if test -n "$CC"; then |
ba479fd2 NN |
2089 | echo "$as_me:$LINENO: result: $CC" >&5 |
2090 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2091 | else |
ba479fd2 NN |
2092 | echo "$as_me:$LINENO: result: no" >&5 |
2093 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2094 | fi |
cafe096b | 2095 | |
ba479fd2 NN |
2096 | test -n "$CC" && break |
2097 | done | |
2098 | fi | |
2099 | if test -z "$CC"; then | |
2100 | ac_ct_CC=$CC | |
2101 | for ac_prog in cl | |
2102 | do | |
2103 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2104 | set dummy $ac_prog; ac_word=$2 | |
2105 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2106 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2107 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2108 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2109 | else | |
2110 | if test -n "$ac_ct_CC"; then | |
2111 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2112 | else | |
2113 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2114 | for as_dir in $PATH | |
2115 | do | |
2116 | IFS=$as_save_IFS | |
2117 | test -z "$as_dir" && as_dir=. | |
2118 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2119 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2120 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2121 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2122 | break 2 | |
2123 | fi | |
2124 | done | |
2125 | done | |
6e3f3080 | 2126 | |
ba479fd2 NN |
2127 | fi |
2128 | fi | |
2129 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2130 | if test -n "$ac_ct_CC"; then | |
2131 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2132 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2133 | else | |
2134 | echo "$as_me:$LINENO: result: no" >&5 | |
2135 | echo "${ECHO_T}no" >&6 | |
2136 | fi | |
6e3f3080 | 2137 | |
ba479fd2 NN |
2138 | test -n "$ac_ct_CC" && break |
2139 | done | |
63cf211a | 2140 | |
ba479fd2 NN |
2141 | CC=$ac_ct_CC |
2142 | fi | |
2143 | ||
2144 | fi | |
2145 | ||
2146 | ||
2147 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2148 | See \`config.log' for more details." >&5 | |
2149 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2150 | See \`config.log' for more details." >&2;} | |
2151 | { (exit 1); exit 1; }; } | |
2152 | ||
2153 | # Provide some information about the compiler. | |
2154 | echo "$as_me:$LINENO:" \ | |
2155 | "checking for C compiler version" >&5 | |
2156 | ac_compiler=`set X $ac_compile; echo $2` | |
2157 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2158 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2159 | ac_status=$? | |
2160 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2161 | (exit $ac_status); } | |
2162 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2163 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2164 | ac_status=$? | |
2165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2166 | (exit $ac_status); } | |
2167 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2168 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2169 | ac_status=$? | |
2170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2171 | (exit $ac_status); } | |
2172 | ||
2173 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2174 | /* confdefs.h. */ |
2175 | _ACEOF | |
2176 | cat confdefs.h >>conftest.$ac_ext | |
2177 | cat >>conftest.$ac_ext <<_ACEOF | |
2178 | /* end confdefs.h. */ | |
2179 | ||
2180 | int | |
2181 | main () | |
2182 | { | |
63cf211a | 2183 | |
ba479fd2 NN |
2184 | ; |
2185 | return 0; | |
2186 | } | |
2187 | _ACEOF | |
2188 | ac_clean_files_save=$ac_clean_files | |
2189 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2190 | # Try to create an executable without -o first, disregard a.out. | |
2191 | # It will help us diagnose broken compilers, and finding out an intuition | |
2192 | # of exeext. | |
86da66b5 HPN |
2193 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2194 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2195 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2196 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2197 | (eval $ac_link_default) 2>&5 | |
2198 | ac_status=$? | |
2199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2200 | (exit $ac_status); }; then | |
2201 | # Find the output, starting from the most likely. This scheme is | |
2202 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2203 | # resort. | |
2204 | ||
2205 | # Be careful to initialize this variable, since it used to be cached. | |
2206 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2207 | ac_cv_exeext= | |
2208 | # b.out is created by i960 compilers. | |
2209 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2210 | do | |
2211 | test -f "$ac_file" || continue | |
2212 | case $ac_file in | |
2213 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2214 | ;; |
ba479fd2 | 2215 | conftest.$ac_ext ) |
86da66b5 HPN |
2216 | # This is the source file. |
2217 | ;; | |
ba479fd2 | 2218 | [ab].out ) |
86da66b5 HPN |
2219 | # We found the default executable, but exeext='' is most |
2220 | # certainly right. | |
2221 | break;; | |
ba479fd2 | 2222 | *.* ) |
86da66b5 HPN |
2223 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2224 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2225 | # but it would be cool to find out if it's true. Does anybody | |
2226 | # maintain Libtool? --akim. | |
2227 | export ac_cv_exeext | |
2228 | break;; | |
ba479fd2 | 2229 | * ) |
86da66b5 | 2230 | break;; |
ba479fd2 NN |
2231 | esac |
2232 | done | |
2233 | else | |
2234 | echo "$as_me: failed program was:" >&5 | |
2235 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2236 | ||
2237 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2238 | See \`config.log' for more details." >&5 | |
2239 | echo "$as_me: error: C compiler cannot create executables | |
2240 | See \`config.log' for more details." >&2;} | |
2241 | { (exit 77); exit 77; }; } | |
2242 | fi | |
2243 | ||
2244 | ac_exeext=$ac_cv_exeext | |
2245 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2246 | echo "${ECHO_T}$ac_file" >&6 | |
2247 | ||
2248 | # Check the compiler produces executables we can run. If not, either | |
2249 | # the compiler is broken, or we cross compile. | |
2250 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2251 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2252 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2253 | # If not cross compiling, check that we can run a simple program. | |
2254 | if test "$cross_compiling" != yes; then | |
2255 | if { ac_try='./$ac_file' | |
2256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2257 | (eval $ac_try) 2>&5 | |
2258 | ac_status=$? | |
2259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2260 | (exit $ac_status); }; }; then | |
2261 | cross_compiling=no | |
6e3f3080 | 2262 | else |
ba479fd2 NN |
2263 | if test "$cross_compiling" = maybe; then |
2264 | cross_compiling=yes | |
2265 | else | |
2266 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2267 | If you meant to cross compile, use \`--host'. | |
2268 | See \`config.log' for more details." >&5 | |
2269 | echo "$as_me: error: cannot run C compiled programs. | |
2270 | If you meant to cross compile, use \`--host'. | |
2271 | See \`config.log' for more details." >&2;} | |
2272 | { (exit 1); exit 1; }; } | |
2273 | fi | |
6e3f3080 NN |
2274 | fi |
2275 | fi | |
ba479fd2 NN |
2276 | echo "$as_me:$LINENO: result: yes" >&5 |
2277 | echo "${ECHO_T}yes" >&6 | |
2278 | ||
2279 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2280 | ac_clean_files=$ac_clean_files_save | |
2281 | # Check the compiler produces executables we can run. If not, either | |
2282 | # the compiler is broken, or we cross compile. | |
2283 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2284 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2285 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2286 | echo "${ECHO_T}$cross_compiling" >&6 | |
2287 | ||
2288 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2289 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2290 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2291 | (eval $ac_link) 2>&5 | |
2292 | ac_status=$? | |
2293 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2294 | (exit $ac_status); }; then | |
2295 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2296 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2297 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2298 | # `rm'. | |
2299 | for ac_file in conftest.exe conftest conftest.*; do | |
2300 | test -f "$ac_file" || continue | |
2301 | case $ac_file in | |
2302 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2303 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2304 | export ac_cv_exeext |
2305 | break;; | |
ba479fd2 NN |
2306 | * ) break;; |
2307 | esac | |
2308 | done | |
e9a25f70 | 2309 | else |
ba479fd2 NN |
2310 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2311 | See \`config.log' for more details." >&5 | |
2312 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2313 | See \`config.log' for more details." >&2;} | |
2314 | { (exit 1); exit 1; }; } | |
2315 | fi | |
2316 | ||
2317 | rm -f conftest$ac_cv_exeext | |
2318 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2319 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2320 | ||
2321 | rm -f conftest.$ac_ext | |
2322 | EXEEXT=$ac_cv_exeext | |
2323 | ac_exeext=$EXEEXT | |
2324 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2325 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2326 | if test "${ac_cv_objext+set}" = set; then | |
2327 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2328 | else | |
2329 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2330 | /* confdefs.h. */ |
2331 | _ACEOF | |
2332 | cat confdefs.h >>conftest.$ac_ext | |
2333 | cat >>conftest.$ac_ext <<_ACEOF | |
2334 | /* end confdefs.h. */ | |
2335 | ||
2336 | int | |
2337 | main () | |
2338 | { | |
6e3f3080 | 2339 | |
ba479fd2 NN |
2340 | ; |
2341 | return 0; | |
2342 | } | |
2343 | _ACEOF | |
2344 | rm -f conftest.o conftest.obj | |
2345 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2346 | (eval $ac_compile) 2>&5 | |
2347 | ac_status=$? | |
2348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2349 | (exit $ac_status); }; then | |
2350 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2351 | case $ac_file in | |
2352 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2353 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2354 | break;; | |
2355 | esac | |
2356 | done | |
63cf211a | 2357 | else |
ba479fd2 NN |
2358 | echo "$as_me: failed program was:" >&5 |
2359 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2360 | ||
2361 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2362 | See \`config.log' for more details." >&5 | |
2363 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2364 | See \`config.log' for more details." >&2;} | |
2365 | { (exit 1); exit 1; }; } | |
2366 | fi | |
2367 | ||
2368 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2369 | fi | |
2370 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2371 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2372 | OBJEXT=$ac_cv_objext | |
2373 | ac_objext=$OBJEXT | |
2374 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2375 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2376 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2377 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2378 | else | |
2379 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2380 | /* confdefs.h. */ |
2381 | _ACEOF | |
2382 | cat confdefs.h >>conftest.$ac_ext | |
2383 | cat >>conftest.$ac_ext <<_ACEOF | |
2384 | /* end confdefs.h. */ | |
2385 | ||
2386 | int | |
2387 | main () | |
2388 | { | |
2389 | #ifndef __GNUC__ | |
2390 | choke me | |
2391 | #endif | |
6e3f3080 | 2392 | |
ba479fd2 NN |
2393 | ; |
2394 | return 0; | |
2395 | } | |
2396 | _ACEOF | |
2397 | rm -f conftest.$ac_objext | |
2398 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2399 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2400 | ac_status=$? |
86da66b5 HPN |
2401 | grep -v '^ *+' conftest.er1 >conftest.err |
2402 | rm -f conftest.er1 | |
2403 | cat conftest.err >&5 | |
ba479fd2 NN |
2404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2405 | (exit $ac_status); } && | |
ec6c7392 PB |
2406 | { ac_try='test -z "$ac_c_werror_flag" |
2407 | || test ! -s conftest.err' | |
86da66b5 HPN |
2408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2409 | (eval $ac_try) 2>&5 | |
2410 | ac_status=$? | |
2411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2412 | (exit $ac_status); }; } && | |
2413 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2415 | (eval $ac_try) 2>&5 | |
2416 | ac_status=$? | |
2417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2418 | (exit $ac_status); }; }; then | |
2419 | ac_compiler_gnu=yes | |
2420 | else | |
2421 | echo "$as_me: failed program was:" >&5 | |
2422 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2423 | ||
2424 | ac_compiler_gnu=no | |
2425 | fi | |
86da66b5 | 2426 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2427 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2428 | ||
2429 | fi | |
2430 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2431 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2432 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2433 | ac_test_CFLAGS=${CFLAGS+set} | |
2434 | ac_save_CFLAGS=$CFLAGS | |
2435 | CFLAGS="-g" | |
2436 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2437 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2438 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2439 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2440 | else | |
2441 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2442 | /* confdefs.h. */ |
2443 | _ACEOF | |
2444 | cat confdefs.h >>conftest.$ac_ext | |
2445 | cat >>conftest.$ac_ext <<_ACEOF | |
2446 | /* end confdefs.h. */ | |
2447 | ||
2448 | int | |
2449 | main () | |
2450 | { | |
2451 | ||
2452 | ; | |
2453 | return 0; | |
2454 | } | |
2455 | _ACEOF | |
2456 | rm -f conftest.$ac_objext | |
2457 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2458 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2459 | ac_status=$? |
86da66b5 HPN |
2460 | grep -v '^ *+' conftest.er1 >conftest.err |
2461 | rm -f conftest.er1 | |
2462 | cat conftest.err >&5 | |
ba479fd2 NN |
2463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2464 | (exit $ac_status); } && | |
ec6c7392 PB |
2465 | { ac_try='test -z "$ac_c_werror_flag" |
2466 | || test ! -s conftest.err' | |
86da66b5 HPN |
2467 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2468 | (eval $ac_try) 2>&5 | |
2469 | ac_status=$? | |
2470 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2471 | (exit $ac_status); }; } && | |
2472 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2473 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2474 | (eval $ac_try) 2>&5 | |
2475 | ac_status=$? | |
2476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2477 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2478 | ac_cv_prog_cc_g=yes |
2479 | else | |
ba479fd2 NN |
2480 | echo "$as_me: failed program was:" >&5 |
2481 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2482 | |
ba479fd2 | 2483 | ac_cv_prog_cc_g=no |
6e3f3080 | 2484 | fi |
86da66b5 | 2485 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2486 | fi |
2487 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2488 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2489 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2490 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2491 | elif test $ac_cv_prog_cc_g = yes; then |
2492 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2493 | CFLAGS="-g -O2" |
2494 | else | |
cd9e5e7c | 2495 | CFLAGS="-g" |
81814e35 | 2496 | fi |
3723cad9 | 2497 | else |
cd9e5e7c MK |
2498 | if test "$GCC" = yes; then |
2499 | CFLAGS="-O2" | |
2500 | else | |
2501 | CFLAGS= | |
2502 | fi | |
e9a25f70 | 2503 | fi |
ba479fd2 NN |
2504 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2505 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2506 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2507 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2508 | else | |
2509 | ac_cv_prog_cc_stdc=no | |
2510 | ac_save_CC=$CC | |
2511 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2512 | /* confdefs.h. */ |
2513 | _ACEOF | |
2514 | cat confdefs.h >>conftest.$ac_ext | |
2515 | cat >>conftest.$ac_ext <<_ACEOF | |
2516 | /* end confdefs.h. */ | |
2517 | #include <stdarg.h> | |
2518 | #include <stdio.h> | |
2519 | #include <sys/types.h> | |
2520 | #include <sys/stat.h> | |
2521 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2522 | struct buf { int x; }; | |
2523 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2524 | static char *e (p, i) | |
2525 | char **p; | |
2526 | int i; | |
2527 | { | |
2528 | return p[i]; | |
2529 | } | |
2530 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2531 | { | |
2532 | char *s; | |
2533 | va_list v; | |
2534 | va_start (v,p); | |
2535 | s = g (p, va_arg (v,int)); | |
2536 | va_end (v); | |
2537 | return s; | |
2538 | } | |
86da66b5 HPN |
2539 | |
2540 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2541 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2542 | These don't provoke an error unfortunately, instead are silently treated | |
2543 | as 'x'. The following induces an error, until -std1 is added to get | |
2544 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2545 | array size at least. It's necessary to write '\x00'==0 to get something | |
2546 | that's true only with -std1. */ | |
2547 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2548 | ||
ba479fd2 NN |
2549 | int test (int i, double x); |
2550 | struct s1 {int (*f) (int a);}; | |
2551 | struct s2 {int (*f) (double a);}; | |
2552 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2553 | int argc; | |
2554 | char **argv; | |
2555 | int | |
2556 | main () | |
2557 | { | |
2558 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2559 | ; | |
2560 | return 0; | |
2561 | } | |
2562 | _ACEOF | |
2563 | # Don't try gcc -ansi; that turns off useful extensions and | |
2564 | # breaks some systems' header files. | |
2565 | # AIX -qlanglvl=ansi | |
2566 | # Ultrix and OSF/1 -std1 | |
2567 | # HP-UX 10.20 and later -Ae | |
2568 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2569 | # SVR4 -Xc -D__EXTENSIONS__ | |
2570 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2571 | do | |
2572 | CC="$ac_save_CC $ac_arg" | |
2573 | rm -f conftest.$ac_objext | |
2574 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2575 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2576 | ac_status=$? |
86da66b5 HPN |
2577 | grep -v '^ *+' conftest.er1 >conftest.err |
2578 | rm -f conftest.er1 | |
2579 | cat conftest.err >&5 | |
ba479fd2 NN |
2580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2581 | (exit $ac_status); } && | |
ec6c7392 PB |
2582 | { ac_try='test -z "$ac_c_werror_flag" |
2583 | || test ! -s conftest.err' | |
86da66b5 HPN |
2584 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2585 | (eval $ac_try) 2>&5 | |
2586 | ac_status=$? | |
2587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2588 | (exit $ac_status); }; } && | |
2589 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2590 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2591 | (eval $ac_try) 2>&5 | |
2592 | ac_status=$? | |
2593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2594 | (exit $ac_status); }; }; then | |
2595 | ac_cv_prog_cc_stdc=$ac_arg | |
2596 | break | |
2597 | else | |
2598 | echo "$as_me: failed program was:" >&5 | |
2599 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2600 | |
ba479fd2 | 2601 | fi |
86da66b5 | 2602 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2603 | done |
2604 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2605 | CC=$ac_save_CC | |
2606 | ||
2607 | fi | |
2608 | ||
2609 | case "x$ac_cv_prog_cc_stdc" in | |
2610 | x|xno) | |
2611 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2612 | echo "${ECHO_T}none needed" >&6 ;; | |
2613 | *) | |
2614 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2615 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2616 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2617 | esac | |
2618 | ||
2619 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2620 | # in C++ we need to declare it. In case someone uses the same compiler | |
2621 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2622 | # the declaration of exit, since it's the most demanding environment. | |
2623 | cat >conftest.$ac_ext <<_ACEOF | |
2624 | #ifndef __cplusplus | |
2625 | choke me | |
2626 | #endif | |
2627 | _ACEOF | |
2628 | rm -f conftest.$ac_objext | |
2629 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2630 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2631 | ac_status=$? |
86da66b5 HPN |
2632 | grep -v '^ *+' conftest.er1 >conftest.err |
2633 | rm -f conftest.er1 | |
2634 | cat conftest.err >&5 | |
ba479fd2 NN |
2635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2636 | (exit $ac_status); } && | |
ec6c7392 PB |
2637 | { ac_try='test -z "$ac_c_werror_flag" |
2638 | || test ! -s conftest.err' | |
86da66b5 HPN |
2639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2640 | (eval $ac_try) 2>&5 | |
2641 | ac_status=$? | |
2642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2643 | (exit $ac_status); }; } && | |
2644 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2645 | { (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); }; }; then | |
2650 | for ac_declaration in \ | |
86da66b5 | 2651 | '' \ |
ba479fd2 NN |
2652 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2653 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2654 | 'extern "C" void exit (int) throw ();' \ | |
2655 | 'extern "C" void exit (int);' \ | |
2656 | 'void exit (int);' | |
2657 | do | |
2658 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2659 | /* confdefs.h. */ |
2660 | _ACEOF | |
2661 | cat confdefs.h >>conftest.$ac_ext | |
2662 | cat >>conftest.$ac_ext <<_ACEOF | |
2663 | /* end confdefs.h. */ | |
33e70558 | 2664 | $ac_declaration |
86da66b5 | 2665 | #include <stdlib.h> |
ba479fd2 NN |
2666 | int |
2667 | main () | |
2668 | { | |
2669 | exit (42); | |
2670 | ; | |
2671 | return 0; | |
2672 | } | |
2673 | _ACEOF | |
2674 | rm -f conftest.$ac_objext | |
2675 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2676 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2677 | ac_status=$? |
86da66b5 HPN |
2678 | grep -v '^ *+' conftest.er1 >conftest.err |
2679 | rm -f conftest.er1 | |
2680 | cat conftest.err >&5 | |
ba479fd2 NN |
2681 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2682 | (exit $ac_status); } && | |
ec6c7392 PB |
2683 | { ac_try='test -z "$ac_c_werror_flag" |
2684 | || test ! -s conftest.err' | |
86da66b5 HPN |
2685 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2686 | (eval $ac_try) 2>&5 | |
2687 | ac_status=$? | |
2688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2689 | (exit $ac_status); }; } && | |
2690 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2691 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2692 | (eval $ac_try) 2>&5 | |
2693 | ac_status=$? | |
2694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2695 | (exit $ac_status); }; }; then | |
2696 | : | |
2697 | else | |
2698 | echo "$as_me: failed program was:" >&5 | |
2699 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2700 | ||
2701 | continue | |
2702 | fi | |
86da66b5 | 2703 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2704 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2705 | /* confdefs.h. */ |
2706 | _ACEOF | |
2707 | cat confdefs.h >>conftest.$ac_ext | |
2708 | cat >>conftest.$ac_ext <<_ACEOF | |
2709 | /* end confdefs.h. */ | |
2710 | $ac_declaration | |
2711 | int | |
2712 | main () | |
2713 | { | |
2714 | exit (42); | |
2715 | ; | |
2716 | return 0; | |
2717 | } | |
2718 | _ACEOF | |
2719 | rm -f conftest.$ac_objext | |
2720 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2721 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2722 | ac_status=$? |
86da66b5 HPN |
2723 | grep -v '^ *+' conftest.er1 >conftest.err |
2724 | rm -f conftest.er1 | |
2725 | cat conftest.err >&5 | |
ba479fd2 NN |
2726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2727 | (exit $ac_status); } && | |
ec6c7392 PB |
2728 | { ac_try='test -z "$ac_c_werror_flag" |
2729 | || test ! -s conftest.err' | |
86da66b5 HPN |
2730 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2731 | (eval $ac_try) 2>&5 | |
2732 | ac_status=$? | |
2733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2734 | (exit $ac_status); }; } && | |
2735 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2737 | (eval $ac_try) 2>&5 | |
2738 | ac_status=$? | |
2739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2740 | (exit $ac_status); }; }; then | |
2741 | break | |
3ec83fc2 | 2742 | else |
ba479fd2 NN |
2743 | echo "$as_me: failed program was:" >&5 |
2744 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2745 | ||
6e3f3080 | 2746 | fi |
86da66b5 | 2747 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2748 | done |
2749 | rm -f conftest* | |
2750 | if test -n "$ac_declaration"; then | |
2751 | echo '#ifdef __cplusplus' >>confdefs.h | |
2752 | echo $ac_declaration >>confdefs.h | |
2753 | echo '#endif' >>confdefs.h | |
2754 | fi | |
2755 | ||
3ec83fc2 | 2756 | else |
ba479fd2 NN |
2757 | echo "$as_me: failed program was:" >&5 |
2758 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2759 | ||
2760 | fi | |
86da66b5 | 2761 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2762 | ac_ext=c |
2763 | ac_cpp='$CPP $CPPFLAGS' | |
2764 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2765 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2766 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2767 | ||
2768 | if test "x$CC" != xcc; then | |
2769 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2770 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2771 | else | |
2772 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2773 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2774 | fi | |
2775 | set dummy $CC; ac_cc=`echo $2 | | |
2776 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2777 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2778 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2779 | else | |
2780 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2781 | /* confdefs.h. */ |
2782 | _ACEOF | |
2783 | cat confdefs.h >>conftest.$ac_ext | |
2784 | cat >>conftest.$ac_ext <<_ACEOF | |
2785 | /* end confdefs.h. */ | |
2786 | ||
2787 | int | |
2788 | main () | |
2789 | { | |
2790 | ||
2791 | ; | |
2792 | return 0; | |
2793 | } | |
2794 | _ACEOF | |
3ec83fc2 RH |
2795 | # Make sure it works both with $CC and with simple cc. |
2796 | # We do the test twice because some compilers refuse to overwrite an | |
2797 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2798 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2799 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2800 | (eval $ac_try) 2>&5 | |
2801 | ac_status=$? | |
2802 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2803 | (exit $ac_status); } && | |
2804 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2805 | (eval $ac_try) 2>&5 | |
2806 | ac_status=$? | |
2807 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2808 | (exit $ac_status); }; | |
3ec83fc2 RH |
2809 | then |
2810 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2811 | if test "x$CC" != xcc; then | |
2812 | # Test first that cc exists at all. | |
ba479fd2 NN |
2813 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2814 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2815 | (eval $ac_try) 2>&5 | |
2816 | ac_status=$? | |
2817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2818 | (exit $ac_status); }; }; then | |
2819 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2820 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2821 | (eval $ac_try) 2>&5 | |
2822 | ac_status=$? | |
2823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2824 | (exit $ac_status); } && | |
2825 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2826 | (eval $ac_try) 2>&5 | |
2827 | ac_status=$? | |
2828 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2829 | (exit $ac_status); }; | |
3ec83fc2 | 2830 | then |
86da66b5 HPN |
2831 | # cc works too. |
2832 | : | |
3ec83fc2 | 2833 | else |
86da66b5 HPN |
2834 | # cc exists but doesn't like -o. |
2835 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2836 | fi |
2837 | fi | |
2838 | fi | |
2839 | else | |
2840 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2841 | fi | |
2842 | rm -f conftest* | |
2843 | ||
2844 | fi | |
2845 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2846 | echo "$as_me:$LINENO: result: yes" >&5 |
2847 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2848 | else |
ba479fd2 NN |
2849 | echo "$as_me:$LINENO: result: no" >&5 |
2850 | echo "${ECHO_T}no" >&6 | |
2851 | ||
2852 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2853 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2854 | _ACEOF |
3ec83fc2 RH |
2855 | |
2856 | fi | |
2857 | ||
3b620440 KC |
2858 | # expand $ac_aux_dir to an absolute path |
2859 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2860 | ||
2861 | # FIXME: we rely on the cache variable name because | |
2862 | # there is no other way. | |
2863 | set dummy $CC | |
2864 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2865 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2866 | # Losing compiler, so override with the script. | |
2867 | # FIXME: It is wrong to rewrite CC. | |
2868 | # But if we don't then we get into trouble of one sort or another. | |
2869 | # A longer-term fix would be to have automake use am__CC in this case, | |
2870 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2871 | CC="$am_aux_dir/compile $CC" | |
2872 | fi | |
2873 | ||
414d23ae HPN |
2874 | # autoconf is lame and doesn't give us any substitution variable for this. |
2875 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2876 | NO_MINUS_C_MINUS_O=yes | |
2877 | else | |
2878 | OUTPUT_OPTION='-o $@' | |
2879 | fi | |
2880 | ||
2881 | ||
2882 | ||
ec6c7392 PB |
2883 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
2884 | # optimizations to be activated explicitly by the toplevel. | |
2885 | case "$CC" in | |
2886 | */prev-gcc/xgcc*) ;; | |
2887 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
2888 | esac | |
2889 | ||
2890 | ||
73458fb7 NN |
2891 | # ------------------------- |
2892 | # Check C compiler features | |
2893 | # ------------------------- | |
2894 | ||
ba479fd2 NN |
2895 | ac_ext=c |
2896 | ac_cpp='$CPP $CPPFLAGS' | |
2897 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2898 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2899 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2900 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2901 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2902 | # On Suns, sometimes $CPP names a directory. |
2903 | if test -n "$CPP" && test -d "$CPP"; then | |
2904 | CPP= | |
2905 | fi | |
2906 | if test -z "$CPP"; then | |
ba479fd2 NN |
2907 | if test "${ac_cv_prog_CPP+set}" = set; then |
2908 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2909 | else | |
2910 | # Double quotes because CPP needs to be expanded | |
2911 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2912 | do | |
2913 | ac_preproc_ok=false | |
2914 | for ac_c_preproc_warn_flag in '' yes | |
2915 | do | |
2916 | # Use a header file that comes with gcc, so configuring glibc | |
2917 | # with a fresh cross-compiler works. | |
2918 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2919 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2920 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2921 | # not just through cpp. "Syntax error" is here to catch this case. |
2922 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2923 | /* confdefs.h. */ |
2924 | _ACEOF | |
2925 | cat confdefs.h >>conftest.$ac_ext | |
2926 | cat >>conftest.$ac_ext <<_ACEOF | |
2927 | /* end confdefs.h. */ | |
2928 | #ifdef __STDC__ | |
2929 | # include <limits.h> | |
2930 | #else | |
2931 | # include <assert.h> | |
2932 | #endif | |
86da66b5 | 2933 | Syntax error |
ba479fd2 NN |
2934 | _ACEOF |
2935 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2936 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2937 | ac_status=$? | |
2938 | grep -v '^ *+' conftest.er1 >conftest.err | |
2939 | rm -f conftest.er1 | |
2940 | cat conftest.err >&5 | |
2941 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2942 | (exit $ac_status); } >/dev/null; then | |
2943 | if test -s conftest.err; then | |
2944 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2945 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2946 | else |
2947 | ac_cpp_err= | |
2948 | fi | |
2949 | else | |
2950 | ac_cpp_err=yes | |
2951 | fi | |
2952 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2953 | : |
cafe096b | 2954 | else |
ba479fd2 NN |
2955 | echo "$as_me: failed program was:" >&5 |
2956 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2957 | ||
2958 | # Broken: fails on valid input. | |
2959 | continue | |
2960 | fi | |
2961 | rm -f conftest.err conftest.$ac_ext | |
2962 | ||
2963 | # OK, works on sane cases. Now check whether non-existent headers | |
2964 | # can be detected and how. | |
2965 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2966 | /* confdefs.h. */ |
2967 | _ACEOF | |
2968 | cat confdefs.h >>conftest.$ac_ext | |
2969 | cat >>conftest.$ac_ext <<_ACEOF | |
2970 | /* end confdefs.h. */ | |
2971 | #include <ac_nonexistent.h> | |
2972 | _ACEOF | |
2973 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2974 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2975 | ac_status=$? | |
2976 | grep -v '^ *+' conftest.er1 >conftest.err | |
2977 | rm -f conftest.er1 | |
2978 | cat conftest.err >&5 | |
2979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2980 | (exit $ac_status); } >/dev/null; then | |
2981 | if test -s conftest.err; then | |
2982 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2983 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2984 | else |
2985 | ac_cpp_err= | |
2986 | fi | |
2987 | else | |
2988 | ac_cpp_err=yes | |
2989 | fi | |
2990 | if test -z "$ac_cpp_err"; then | |
2991 | # Broken: success on invalid input. | |
2992 | continue | |
2993 | else | |
2994 | echo "$as_me: failed program was:" >&5 | |
2995 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2996 | ||
2997 | # Passes both tests. | |
2998 | ac_preproc_ok=: | |
2999 | break | |
3000 | fi | |
3001 | rm -f conftest.err conftest.$ac_ext | |
3002 | ||
3003 | done | |
3004 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3005 | rm -f conftest.err conftest.$ac_ext | |
3006 | if $ac_preproc_ok; then | |
3007 | break | |
3008 | fi | |
3009 | ||
3010 | done | |
3011 | ac_cv_prog_CPP=$CPP | |
3012 | ||
3013 | fi | |
3014 | CPP=$ac_cv_prog_CPP | |
3015 | else | |
3016 | ac_cv_prog_CPP=$CPP | |
3017 | fi | |
3018 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
3019 | echo "${ECHO_T}$CPP" >&6 | |
3020 | ac_preproc_ok=false | |
3021 | for ac_c_preproc_warn_flag in '' yes | |
3022 | do | |
3023 | # Use a header file that comes with gcc, so configuring glibc | |
3024 | # with a fresh cross-compiler works. | |
3025 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3026 | # <limits.h> exists even on freestanding compilers. | |
3027 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3028 | # not just through cpp. "Syntax error" is here to catch this case. | |
3029 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3030 | /* confdefs.h. */ |
3031 | _ACEOF | |
3032 | cat confdefs.h >>conftest.$ac_ext | |
3033 | cat >>conftest.$ac_ext <<_ACEOF | |
3034 | /* end confdefs.h. */ | |
3035 | #ifdef __STDC__ | |
3036 | # include <limits.h> | |
3037 | #else | |
3038 | # include <assert.h> | |
3039 | #endif | |
86da66b5 | 3040 | Syntax error |
ba479fd2 NN |
3041 | _ACEOF |
3042 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3043 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3044 | ac_status=$? | |
3045 | grep -v '^ *+' conftest.er1 >conftest.err | |
3046 | rm -f conftest.er1 | |
3047 | cat conftest.err >&5 | |
3048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3049 | (exit $ac_status); } >/dev/null; then | |
3050 | if test -s conftest.err; then | |
3051 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3052 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3053 | else |
3054 | ac_cpp_err= | |
3055 | fi | |
3056 | else | |
3057 | ac_cpp_err=yes | |
3058 | fi | |
3059 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3060 | : |
414d23ae | 3061 | else |
ba479fd2 NN |
3062 | echo "$as_me: failed program was:" >&5 |
3063 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3064 | ||
3065 | # Broken: fails on valid input. | |
3066 | continue | |
3067 | fi | |
3068 | rm -f conftest.err conftest.$ac_ext | |
3069 | ||
3070 | # OK, works on sane cases. Now check whether non-existent headers | |
3071 | # can be detected and how. | |
3072 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3073 | /* confdefs.h. */ |
3074 | _ACEOF | |
3075 | cat confdefs.h >>conftest.$ac_ext | |
3076 | cat >>conftest.$ac_ext <<_ACEOF | |
3077 | /* end confdefs.h. */ | |
3078 | #include <ac_nonexistent.h> | |
3079 | _ACEOF | |
3080 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3081 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3082 | ac_status=$? | |
3083 | grep -v '^ *+' conftest.er1 >conftest.err | |
3084 | rm -f conftest.er1 | |
3085 | cat conftest.err >&5 | |
3086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3087 | (exit $ac_status); } >/dev/null; then | |
3088 | if test -s conftest.err; then | |
3089 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3090 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3091 | else |
3092 | ac_cpp_err= | |
3093 | fi | |
6e3f3080 | 3094 | else |
ba479fd2 | 3095 | ac_cpp_err=yes |
63cf211a | 3096 | fi |
ba479fd2 NN |
3097 | if test -z "$ac_cpp_err"; then |
3098 | # Broken: success on invalid input. | |
3099 | continue | |
3100 | else | |
3101 | echo "$as_me: failed program was:" >&5 | |
3102 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3103 | ||
3104 | # Passes both tests. | |
3105 | ac_preproc_ok=: | |
3106 | break | |
63cf211a | 3107 | fi |
ba479fd2 NN |
3108 | rm -f conftest.err conftest.$ac_ext |
3109 | ||
3110 | done | |
3111 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3112 | rm -f conftest.err conftest.$ac_ext | |
3113 | if $ac_preproc_ok; then | |
3114 | : | |
6e3f3080 | 3115 | else |
ba479fd2 NN |
3116 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3117 | See \`config.log' for more details." >&5 | |
3118 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3119 | See \`config.log' for more details." >&2;} | |
3120 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3121 | fi |
3122 | ||
ba479fd2 NN |
3123 | ac_ext=c |
3124 | ac_cpp='$CPP $CPPFLAGS' | |
3125 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3126 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3127 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3128 | ||
b5472e1d | 3129 | |
ba479fd2 NN |
3130 | echo "$as_me:$LINENO: checking for inline" >&5 |
3131 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3132 | if test "${ac_cv_c_inline+set}" = set; then | |
3133 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3134 | else |
3135 | ac_cv_c_inline=no | |
3136 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3137 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3138 | /* confdefs.h. */ |
3139 | _ACEOF | |
3140 | cat confdefs.h >>conftest.$ac_ext | |
3141 | cat >>conftest.$ac_ext <<_ACEOF | |
3142 | /* end confdefs.h. */ | |
3143 | #ifndef __cplusplus | |
3144 | typedef int foo_t; | |
3145 | static $ac_kw foo_t static_foo () {return 0; } | |
3146 | $ac_kw foo_t foo () {return 0; } | |
3147 | #endif | |
414d23ae | 3148 | |
ba479fd2 NN |
3149 | _ACEOF |
3150 | rm -f conftest.$ac_objext | |
3151 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3152 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3153 | ac_status=$? |
86da66b5 HPN |
3154 | grep -v '^ *+' conftest.er1 >conftest.err |
3155 | rm -f conftest.er1 | |
3156 | cat conftest.err >&5 | |
ba479fd2 NN |
3157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3158 | (exit $ac_status); } && | |
ec6c7392 PB |
3159 | { ac_try='test -z "$ac_c_werror_flag" |
3160 | || test ! -s conftest.err' | |
86da66b5 HPN |
3161 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3162 | (eval $ac_try) 2>&5 | |
3163 | ac_status=$? | |
3164 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3165 | (exit $ac_status); }; } && | |
3166 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3167 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3168 | (eval $ac_try) 2>&5 | |
3169 | ac_status=$? | |
3170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3171 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3172 | ac_cv_c_inline=$ac_kw; break |
3173 | else | |
ba479fd2 NN |
3174 | echo "$as_me: failed program was:" >&5 |
3175 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3176 | ||
414d23ae | 3177 | fi |
86da66b5 | 3178 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3179 | done |
3180 | ||
3181 | fi | |
ba479fd2 NN |
3182 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3183 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3184 | |
3185 | ||
ba479fd2 | 3186 | case $ac_cv_c_inline in |
414d23ae | 3187 | inline | yes) ;; |
86da66b5 HPN |
3188 | *) |
3189 | case $ac_cv_c_inline in | |
3190 | no) ac_val=;; | |
3191 | *) ac_val=$ac_cv_c_inline;; | |
3192 | esac | |
3193 | cat >>confdefs.h <<_ACEOF | |
3194 | #ifndef __cplusplus | |
3195 | #define inline $ac_val | |
3196 | #endif | |
ba479fd2 | 3197 | _ACEOF |
86da66b5 | 3198 | ;; |
414d23ae HPN |
3199 | esac |
3200 | ||
414d23ae | 3201 | |
414d23ae | 3202 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3203 | |
3204 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3205 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3206 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3207 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3208 | else | |
3209 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3210 | then ac_cv_prog_egrep='grep -E' | |
3211 | else ac_cv_prog_egrep='egrep' | |
3212 | fi | |
3213 | fi | |
3214 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3215 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3216 | EGREP=$ac_cv_prog_egrep | |
3217 | ||
3218 | ||
3219 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3220 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3221 | if test "${ac_cv_header_stdc+set}" = set; then | |
3222 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3223 | else | |
3224 | cat >conftest.$ac_ext <<_ACEOF | |
3225 | /* confdefs.h. */ | |
3226 | _ACEOF | |
3227 | cat confdefs.h >>conftest.$ac_ext | |
3228 | cat >>conftest.$ac_ext <<_ACEOF | |
3229 | /* end confdefs.h. */ | |
3230 | #include <stdlib.h> | |
3231 | #include <stdarg.h> | |
3232 | #include <string.h> | |
3233 | #include <float.h> | |
3234 | ||
3235 | int | |
3236 | main () | |
3237 | { | |
3238 | ||
3239 | ; | |
3240 | return 0; | |
3241 | } | |
3242 | _ACEOF | |
3243 | rm -f conftest.$ac_objext | |
3244 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3245 | (eval $ac_compile) 2>conftest.er1 | |
3246 | ac_status=$? | |
3247 | grep -v '^ *+' conftest.er1 >conftest.err | |
3248 | rm -f conftest.er1 | |
3249 | cat conftest.err >&5 | |
3250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3251 | (exit $ac_status); } && | |
ec6c7392 PB |
3252 | { ac_try='test -z "$ac_c_werror_flag" |
3253 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3254 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3255 | (eval $ac_try) 2>&5 | |
3256 | ac_status=$? | |
3257 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3258 | (exit $ac_status); }; } && | |
3259 | { ac_try='test -s conftest.$ac_objext' | |
3260 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3261 | (eval $ac_try) 2>&5 | |
3262 | ac_status=$? | |
3263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3264 | (exit $ac_status); }; }; then | |
3265 | ac_cv_header_stdc=yes | |
3266 | else | |
3267 | echo "$as_me: failed program was:" >&5 | |
3268 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3269 | ||
3270 | ac_cv_header_stdc=no | |
3271 | fi | |
3272 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3273 | ||
3274 | if test $ac_cv_header_stdc = yes; then | |
3275 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3276 | cat >conftest.$ac_ext <<_ACEOF | |
3277 | /* confdefs.h. */ | |
3278 | _ACEOF | |
3279 | cat confdefs.h >>conftest.$ac_ext | |
3280 | cat >>conftest.$ac_ext <<_ACEOF | |
3281 | /* end confdefs.h. */ | |
3282 | #include <string.h> | |
3283 | ||
3284 | _ACEOF | |
3285 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3286 | $EGREP "memchr" >/dev/null 2>&1; then | |
3287 | : | |
3288 | else | |
3289 | ac_cv_header_stdc=no | |
3290 | fi | |
3291 | rm -f conftest* | |
3292 | ||
3293 | fi | |
3294 | ||
3295 | if test $ac_cv_header_stdc = yes; then | |
3296 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3297 | cat >conftest.$ac_ext <<_ACEOF | |
3298 | /* confdefs.h. */ | |
3299 | _ACEOF | |
3300 | cat confdefs.h >>conftest.$ac_ext | |
3301 | cat >>conftest.$ac_ext <<_ACEOF | |
3302 | /* end confdefs.h. */ | |
3303 | #include <stdlib.h> | |
3304 | ||
3305 | _ACEOF | |
3306 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3307 | $EGREP "free" >/dev/null 2>&1; then | |
3308 | : | |
3309 | else | |
3310 | ac_cv_header_stdc=no | |
3311 | fi | |
3312 | rm -f conftest* | |
3313 | ||
3314 | fi | |
3315 | ||
3316 | if test $ac_cv_header_stdc = yes; then | |
3317 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3318 | if test "$cross_compiling" = yes; then | |
3319 | : | |
3320 | else | |
3321 | cat >conftest.$ac_ext <<_ACEOF | |
3322 | /* confdefs.h. */ | |
3323 | _ACEOF | |
3324 | cat confdefs.h >>conftest.$ac_ext | |
3325 | cat >>conftest.$ac_ext <<_ACEOF | |
3326 | /* end confdefs.h. */ | |
3327 | #include <ctype.h> | |
3328 | #if ((' ' & 0x0FF) == 0x020) | |
3329 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3330 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3331 | #else | |
3332 | # define ISLOWER(c) \ | |
3333 | (('a' <= (c) && (c) <= 'i') \ | |
3334 | || ('j' <= (c) && (c) <= 'r') \ | |
3335 | || ('s' <= (c) && (c) <= 'z')) | |
3336 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3337 | #endif | |
3338 | ||
3339 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3340 | int | |
3341 | main () | |
3342 | { | |
3343 | int i; | |
3344 | for (i = 0; i < 256; i++) | |
3345 | if (XOR (islower (i), ISLOWER (i)) | |
3346 | || toupper (i) != TOUPPER (i)) | |
3347 | exit(2); | |
3348 | exit (0); | |
3349 | } | |
3350 | _ACEOF | |
3351 | rm -f conftest$ac_exeext | |
3352 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3353 | (eval $ac_link) 2>&5 | |
3354 | ac_status=$? | |
3355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3356 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3358 | (eval $ac_try) 2>&5 | |
3359 | ac_status=$? | |
3360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3361 | (exit $ac_status); }; }; then | |
3362 | : | |
3363 | else | |
3364 | echo "$as_me: program exited with status $ac_status" >&5 | |
3365 | echo "$as_me: failed program was:" >&5 | |
3366 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3367 | ||
3368 | ( exit $ac_status ) | |
3369 | ac_cv_header_stdc=no | |
3370 | fi | |
3371 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3372 | fi | |
3373 | fi | |
3374 | fi | |
3375 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3376 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3377 | if test $ac_cv_header_stdc = yes; then | |
3378 | ||
3379 | cat >>confdefs.h <<\_ACEOF | |
3380 | #define STDC_HEADERS 1 | |
3381 | _ACEOF | |
3382 | ||
3383 | fi | |
3384 | ||
3385 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3386 | ||
3387 | ||
3388 | ||
3389 | ||
3390 | ||
3391 | ||
3392 | ||
3393 | ||
3394 | ||
3395 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3396 | inttypes.h stdint.h unistd.h | |
3397 | do | |
3398 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3399 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3400 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3401 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3402 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3403 | else | |
3404 | cat >conftest.$ac_ext <<_ACEOF | |
3405 | /* confdefs.h. */ | |
3406 | _ACEOF | |
3407 | cat confdefs.h >>conftest.$ac_ext | |
3408 | cat >>conftest.$ac_ext <<_ACEOF | |
3409 | /* end confdefs.h. */ | |
3410 | $ac_includes_default | |
3411 | ||
3412 | #include <$ac_header> | |
3413 | _ACEOF | |
3414 | rm -f conftest.$ac_objext | |
3415 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3416 | (eval $ac_compile) 2>conftest.er1 | |
3417 | ac_status=$? | |
3418 | grep -v '^ *+' conftest.er1 >conftest.err | |
3419 | rm -f conftest.er1 | |
3420 | cat conftest.err >&5 | |
3421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3422 | (exit $ac_status); } && | |
ec6c7392 PB |
3423 | { ac_try='test -z "$ac_c_werror_flag" |
3424 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3425 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3426 | (eval $ac_try) 2>&5 | |
3427 | ac_status=$? | |
3428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3429 | (exit $ac_status); }; } && | |
3430 | { ac_try='test -s conftest.$ac_objext' | |
3431 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3432 | (eval $ac_try) 2>&5 | |
3433 | ac_status=$? | |
3434 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3435 | (exit $ac_status); }; }; then | |
3436 | eval "$as_ac_Header=yes" | |
3437 | else | |
3438 | echo "$as_me: failed program was:" >&5 | |
3439 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3440 | ||
3441 | eval "$as_ac_Header=no" | |
3442 | fi | |
3443 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3444 | fi | |
3445 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3446 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3447 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3448 | cat >>confdefs.h <<_ACEOF | |
3449 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3450 | _ACEOF | |
3451 | ||
3452 | fi | |
3453 | ||
3454 | done | |
3455 | ||
3456 | ||
3457 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3458 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3459 | if test "${ac_cv_type_void_p+set}" = set; then | |
3460 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3461 | else | |
3462 | cat >conftest.$ac_ext <<_ACEOF | |
3463 | /* confdefs.h. */ | |
3464 | _ACEOF | |
3465 | cat confdefs.h >>conftest.$ac_ext | |
3466 | cat >>conftest.$ac_ext <<_ACEOF | |
3467 | /* end confdefs.h. */ | |
3468 | $ac_includes_default | |
3469 | int | |
3470 | main () | |
3471 | { | |
3472 | if ((void * *) 0) | |
3473 | return 0; | |
3474 | if (sizeof (void *)) | |
3475 | return 0; | |
3476 | ; | |
3477 | return 0; | |
3478 | } | |
3479 | _ACEOF | |
3480 | rm -f conftest.$ac_objext | |
3481 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3482 | (eval $ac_compile) 2>conftest.er1 | |
3483 | ac_status=$? | |
3484 | grep -v '^ *+' conftest.er1 >conftest.err | |
3485 | rm -f conftest.er1 | |
3486 | cat conftest.err >&5 | |
3487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3488 | (exit $ac_status); } && | |
ec6c7392 PB |
3489 | { ac_try='test -z "$ac_c_werror_flag" |
3490 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3492 | (eval $ac_try) 2>&5 | |
3493 | ac_status=$? | |
3494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3495 | (exit $ac_status); }; } && | |
3496 | { ac_try='test -s conftest.$ac_objext' | |
3497 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3498 | (eval $ac_try) 2>&5 | |
3499 | ac_status=$? | |
3500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3501 | (exit $ac_status); }; }; then | |
3502 | ac_cv_type_void_p=yes | |
3503 | else | |
3504 | echo "$as_me: failed program was:" >&5 | |
3505 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3506 | ||
3507 | ac_cv_type_void_p=no | |
3508 | fi | |
3509 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3510 | fi | |
3511 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3512 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3513 | ||
ba479fd2 NN |
3514 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3515 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3516 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3517 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3518 | else |
bf3b7cd3 JD |
3519 | if test "$ac_cv_type_void_p" = yes; then |
3520 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3521 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3522 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3523 | # This bug is HP SR number 8606223364. | |
3524 | if test "$cross_compiling" = yes; then | |
3525 | # Depending upon the size, compute the lo and hi bounds. | |
3526 | cat >conftest.$ac_ext <<_ACEOF | |
3527 | /* confdefs.h. */ | |
3528 | _ACEOF | |
3529 | cat confdefs.h >>conftest.$ac_ext | |
3530 | cat >>conftest.$ac_ext <<_ACEOF | |
3531 | /* end confdefs.h. */ | |
3532 | $ac_includes_default | |
3533 | int | |
3534 | main () | |
3535 | { | |
3536 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3537 | test_array [0] = 0 | |
3538 | ||
3539 | ; | |
3540 | return 0; | |
3541 | } | |
3542 | _ACEOF | |
3543 | rm -f conftest.$ac_objext | |
3544 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3545 | (eval $ac_compile) 2>conftest.er1 | |
3546 | ac_status=$? | |
3547 | grep -v '^ *+' conftest.er1 >conftest.err | |
3548 | rm -f conftest.er1 | |
3549 | cat conftest.err >&5 | |
3550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3551 | (exit $ac_status); } && | |
ec6c7392 PB |
3552 | { ac_try='test -z "$ac_c_werror_flag" |
3553 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3555 | (eval $ac_try) 2>&5 | |
3556 | ac_status=$? | |
3557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3558 | (exit $ac_status); }; } && | |
3559 | { ac_try='test -s conftest.$ac_objext' | |
3560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3561 | (eval $ac_try) 2>&5 | |
3562 | ac_status=$? | |
3563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3564 | (exit $ac_status); }; }; then | |
3565 | ac_lo=0 ac_mid=0 | |
3566 | while :; do | |
3567 | cat >conftest.$ac_ext <<_ACEOF | |
3568 | /* confdefs.h. */ | |
3569 | _ACEOF | |
3570 | cat confdefs.h >>conftest.$ac_ext | |
3571 | cat >>conftest.$ac_ext <<_ACEOF | |
3572 | /* end confdefs.h. */ | |
3573 | $ac_includes_default | |
3574 | int | |
3575 | main () | |
3576 | { | |
3577 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3578 | test_array [0] = 0 | |
3579 | ||
3580 | ; | |
3581 | return 0; | |
3582 | } | |
3583 | _ACEOF | |
3584 | rm -f conftest.$ac_objext | |
3585 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3586 | (eval $ac_compile) 2>conftest.er1 | |
3587 | ac_status=$? | |
3588 | grep -v '^ *+' conftest.er1 >conftest.err | |
3589 | rm -f conftest.er1 | |
3590 | cat conftest.err >&5 | |
3591 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3592 | (exit $ac_status); } && | |
ec6c7392 PB |
3593 | { ac_try='test -z "$ac_c_werror_flag" |
3594 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3595 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3596 | (eval $ac_try) 2>&5 | |
3597 | ac_status=$? | |
3598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3599 | (exit $ac_status); }; } && | |
3600 | { ac_try='test -s conftest.$ac_objext' | |
3601 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3602 | (eval $ac_try) 2>&5 | |
3603 | ac_status=$? | |
3604 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3605 | (exit $ac_status); }; }; then | |
3606 | ac_hi=$ac_mid; break | |
3607 | else | |
3608 | echo "$as_me: failed program was:" >&5 | |
3609 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3610 | ||
3611 | ac_lo=`expr $ac_mid + 1` | |
3612 | if test $ac_lo -le $ac_mid; then | |
3613 | ac_lo= ac_hi= | |
3614 | break | |
3615 | fi | |
3616 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3617 | fi | |
3618 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3619 | done | |
3620 | else | |
3621 | echo "$as_me: failed program was:" >&5 | |
3622 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3623 | ||
3624 | cat >conftest.$ac_ext <<_ACEOF | |
3625 | /* confdefs.h. */ | |
3626 | _ACEOF | |
3627 | cat confdefs.h >>conftest.$ac_ext | |
3628 | cat >>conftest.$ac_ext <<_ACEOF | |
3629 | /* end confdefs.h. */ | |
3630 | $ac_includes_default | |
3631 | int | |
3632 | main () | |
3633 | { | |
3634 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3635 | test_array [0] = 0 | |
3636 | ||
3637 | ; | |
3638 | return 0; | |
3639 | } | |
3640 | _ACEOF | |
3641 | rm -f conftest.$ac_objext | |
3642 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3643 | (eval $ac_compile) 2>conftest.er1 | |
3644 | ac_status=$? | |
3645 | grep -v '^ *+' conftest.er1 >conftest.err | |
3646 | rm -f conftest.er1 | |
3647 | cat conftest.err >&5 | |
3648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3649 | (exit $ac_status); } && | |
ec6c7392 PB |
3650 | { ac_try='test -z "$ac_c_werror_flag" |
3651 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3653 | (eval $ac_try) 2>&5 | |
3654 | ac_status=$? | |
3655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3656 | (exit $ac_status); }; } && | |
3657 | { ac_try='test -s conftest.$ac_objext' | |
3658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3659 | (eval $ac_try) 2>&5 | |
3660 | ac_status=$? | |
3661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3662 | (exit $ac_status); }; }; then | |
3663 | ac_hi=-1 ac_mid=-1 | |
3664 | while :; do | |
3665 | cat >conftest.$ac_ext <<_ACEOF | |
3666 | /* confdefs.h. */ | |
3667 | _ACEOF | |
3668 | cat confdefs.h >>conftest.$ac_ext | |
3669 | cat >>conftest.$ac_ext <<_ACEOF | |
3670 | /* end confdefs.h. */ | |
3671 | $ac_includes_default | |
3672 | int | |
3673 | main () | |
3674 | { | |
3675 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3676 | test_array [0] = 0 | |
3677 | ||
3678 | ; | |
3679 | return 0; | |
3680 | } | |
3681 | _ACEOF | |
3682 | rm -f conftest.$ac_objext | |
3683 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3684 | (eval $ac_compile) 2>conftest.er1 | |
3685 | ac_status=$? | |
3686 | grep -v '^ *+' conftest.er1 >conftest.err | |
3687 | rm -f conftest.er1 | |
3688 | cat conftest.err >&5 | |
3689 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3690 | (exit $ac_status); } && | |
ec6c7392 PB |
3691 | { ac_try='test -z "$ac_c_werror_flag" |
3692 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3693 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3694 | (eval $ac_try) 2>&5 | |
3695 | ac_status=$? | |
3696 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3697 | (exit $ac_status); }; } && | |
3698 | { ac_try='test -s conftest.$ac_objext' | |
3699 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3700 | (eval $ac_try) 2>&5 | |
3701 | ac_status=$? | |
3702 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3703 | (exit $ac_status); }; }; then | |
3704 | ac_lo=$ac_mid; break | |
3705 | else | |
3706 | echo "$as_me: failed program was:" >&5 | |
3707 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3708 | ||
3709 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3710 | if test $ac_mid -le $ac_hi; then | |
3711 | ac_lo= ac_hi= | |
3712 | break | |
3713 | fi | |
3714 | ac_mid=`expr 2 '*' $ac_mid` | |
3715 | fi | |
3716 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3717 | done | |
3718 | else | |
3719 | echo "$as_me: failed program was:" >&5 | |
3720 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3721 | ||
3722 | ac_lo= ac_hi= | |
3723 | fi | |
3724 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3725 | fi | |
3726 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3727 | # Binary search between lo and hi bounds. | |
3728 | while test "x$ac_lo" != "x$ac_hi"; do | |
3729 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3730 | cat >conftest.$ac_ext <<_ACEOF | |
3731 | /* confdefs.h. */ | |
3732 | _ACEOF | |
3733 | cat confdefs.h >>conftest.$ac_ext | |
3734 | cat >>conftest.$ac_ext <<_ACEOF | |
3735 | /* end confdefs.h. */ | |
3736 | $ac_includes_default | |
3737 | int | |
3738 | main () | |
3739 | { | |
3740 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3741 | test_array [0] = 0 | |
3742 | ||
3743 | ; | |
3744 | return 0; | |
3745 | } | |
3746 | _ACEOF | |
3747 | rm -f conftest.$ac_objext | |
3748 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3749 | (eval $ac_compile) 2>conftest.er1 | |
3750 | ac_status=$? | |
3751 | grep -v '^ *+' conftest.er1 >conftest.err | |
3752 | rm -f conftest.er1 | |
3753 | cat conftest.err >&5 | |
3754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3755 | (exit $ac_status); } && | |
ec6c7392 PB |
3756 | { ac_try='test -z "$ac_c_werror_flag" |
3757 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3758 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3759 | (eval $ac_try) 2>&5 | |
3760 | ac_status=$? | |
3761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3762 | (exit $ac_status); }; } && | |
3763 | { ac_try='test -s conftest.$ac_objext' | |
3764 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3765 | (eval $ac_try) 2>&5 | |
3766 | ac_status=$? | |
3767 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3768 | (exit $ac_status); }; }; then | |
3769 | ac_hi=$ac_mid | |
3770 | else | |
3771 | echo "$as_me: failed program was:" >&5 | |
3772 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3773 | ||
3774 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3775 | fi | |
3776 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3777 | done | |
3778 | case $ac_lo in | |
3779 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3780 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3781 | See \`config.log' for more details." >&5 | |
3782 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3783 | See \`config.log' for more details." >&2;} | |
3784 | { (exit 1); exit 1; }; } ;; | |
3785 | esac | |
3786 | else | |
3787 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
3788 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
3789 | See \`config.log' for more details." >&5 | |
3790 | echo "$as_me: error: cannot run test program while cross compiling | |
3791 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
3792 | { (exit 1); exit 1; }; } |
3793 | else | |
3794 | cat >conftest.$ac_ext <<_ACEOF | |
3795 | /* confdefs.h. */ | |
3796 | _ACEOF | |
3797 | cat confdefs.h >>conftest.$ac_ext | |
3798 | cat >>conftest.$ac_ext <<_ACEOF | |
3799 | /* end confdefs.h. */ | |
3800 | $ac_includes_default | |
3801 | long longval () { return (long) (sizeof (void *)); } | |
3802 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3803 | #include <stdio.h> | |
3804 | #include <stdlib.h> | |
3805 | int | |
3806 | main () | |
3807 | { | |
3808 | ||
3809 | FILE *f = fopen ("conftest.val", "w"); | |
3810 | if (! f) | |
3811 | exit (1); | |
3812 | if (((long) (sizeof (void *))) < 0) | |
3813 | { | |
3814 | long i = longval (); | |
3815 | if (i != ((long) (sizeof (void *)))) | |
3816 | exit (1); | |
3817 | fprintf (f, "%ld\n", i); | |
3818 | } | |
3819 | else | |
3820 | { | |
3821 | unsigned long i = ulongval (); | |
3822 | if (i != ((long) (sizeof (void *)))) | |
3823 | exit (1); | |
3824 | fprintf (f, "%lu\n", i); | |
3825 | } | |
3826 | exit (ferror (f) || fclose (f) != 0); | |
3827 | ||
3828 | ; | |
3829 | return 0; | |
3830 | } | |
3831 | _ACEOF | |
3832 | rm -f conftest$ac_exeext | |
3833 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3834 | (eval $ac_link) 2>&5 | |
3835 | ac_status=$? | |
3836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3837 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3839 | (eval $ac_try) 2>&5 | |
3840 | ac_status=$? | |
3841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3842 | (exit $ac_status); }; }; then | |
3843 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3844 | else | |
3845 | echo "$as_me: program exited with status $ac_status" >&5 | |
3846 | echo "$as_me: failed program was:" >&5 | |
3847 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3848 | ||
3849 | ( exit $ac_status ) | |
3850 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3851 | See \`config.log' for more details." >&5 | |
3852 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3853 | See \`config.log' for more details." >&2;} | |
3854 | { (exit 1); exit 1; }; } | |
3855 | fi | |
3856 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3857 | fi | |
3858 | fi | |
3859 | rm -f conftest.val | |
3860 | else | |
3861 | ac_cv_sizeof_void_p=0 | |
3862 | fi | |
3863 | fi | |
3864 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3865 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3866 | cat >>confdefs.h <<_ACEOF | |
3867 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3868 | _ACEOF | |
3869 | ||
3870 | ||
3871 | echo "$as_me:$LINENO: checking for short" >&5 | |
3872 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3873 | if test "${ac_cv_type_short+set}" = set; then | |
3874 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3875 | else | |
3876 | cat >conftest.$ac_ext <<_ACEOF | |
3877 | /* confdefs.h. */ | |
3878 | _ACEOF | |
3879 | cat confdefs.h >>conftest.$ac_ext | |
3880 | cat >>conftest.$ac_ext <<_ACEOF | |
3881 | /* end confdefs.h. */ | |
3882 | $ac_includes_default | |
3883 | int | |
3884 | main () | |
3885 | { | |
3886 | if ((short *) 0) | |
3887 | return 0; | |
3888 | if (sizeof (short)) | |
3889 | return 0; | |
3890 | ; | |
3891 | return 0; | |
3892 | } | |
3893 | _ACEOF | |
3894 | rm -f conftest.$ac_objext | |
3895 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3896 | (eval $ac_compile) 2>conftest.er1 | |
3897 | ac_status=$? | |
3898 | grep -v '^ *+' conftest.er1 >conftest.err | |
3899 | rm -f conftest.er1 | |
3900 | cat conftest.err >&5 | |
3901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3902 | (exit $ac_status); } && | |
ec6c7392 PB |
3903 | { ac_try='test -z "$ac_c_werror_flag" |
3904 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3905 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3906 | (eval $ac_try) 2>&5 | |
3907 | ac_status=$? | |
3908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3909 | (exit $ac_status); }; } && | |
3910 | { ac_try='test -s conftest.$ac_objext' | |
3911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3912 | (eval $ac_try) 2>&5 | |
3913 | ac_status=$? | |
3914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3915 | (exit $ac_status); }; }; then | |
3916 | ac_cv_type_short=yes | |
3917 | else | |
3918 | echo "$as_me: failed program was:" >&5 | |
3919 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3920 | ||
3921 | ac_cv_type_short=no | |
3922 | fi | |
3923 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3924 | fi | |
3925 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3926 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3927 | ||
3928 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3929 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3930 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3931 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3932 | else | |
3933 | if test "$ac_cv_type_short" = yes; then | |
3934 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3935 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3936 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3937 | # This bug is HP SR number 8606223364. | |
3938 | if test "$cross_compiling" = yes; then | |
3939 | # Depending upon the size, compute the lo and hi bounds. | |
3940 | cat >conftest.$ac_ext <<_ACEOF | |
3941 | /* confdefs.h. */ | |
3942 | _ACEOF | |
3943 | cat confdefs.h >>conftest.$ac_ext | |
3944 | cat >>conftest.$ac_ext <<_ACEOF | |
3945 | /* end confdefs.h. */ | |
3946 | $ac_includes_default | |
3947 | int | |
3948 | main () | |
3949 | { | |
3950 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3951 | test_array [0] = 0 | |
3952 | ||
3953 | ; | |
3954 | return 0; | |
3955 | } | |
3956 | _ACEOF | |
3957 | rm -f conftest.$ac_objext | |
3958 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3959 | (eval $ac_compile) 2>conftest.er1 | |
3960 | ac_status=$? | |
3961 | grep -v '^ *+' conftest.er1 >conftest.err | |
3962 | rm -f conftest.er1 | |
3963 | cat conftest.err >&5 | |
3964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3965 | (exit $ac_status); } && | |
ec6c7392 PB |
3966 | { ac_try='test -z "$ac_c_werror_flag" |
3967 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3968 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3969 | (eval $ac_try) 2>&5 | |
3970 | ac_status=$? | |
3971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3972 | (exit $ac_status); }; } && | |
3973 | { ac_try='test -s conftest.$ac_objext' | |
3974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3975 | (eval $ac_try) 2>&5 | |
3976 | ac_status=$? | |
3977 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3978 | (exit $ac_status); }; }; then | |
3979 | ac_lo=0 ac_mid=0 | |
3980 | while :; do | |
3981 | cat >conftest.$ac_ext <<_ACEOF | |
3982 | /* confdefs.h. */ | |
3983 | _ACEOF | |
3984 | cat confdefs.h >>conftest.$ac_ext | |
3985 | cat >>conftest.$ac_ext <<_ACEOF | |
3986 | /* end confdefs.h. */ | |
3987 | $ac_includes_default | |
3988 | int | |
3989 | main () | |
3990 | { | |
3991 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
3992 | test_array [0] = 0 | |
3993 | ||
3994 | ; | |
3995 | return 0; | |
3996 | } | |
3997 | _ACEOF | |
3998 | rm -f conftest.$ac_objext | |
3999 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4000 | (eval $ac_compile) 2>conftest.er1 | |
4001 | ac_status=$? | |
4002 | grep -v '^ *+' conftest.er1 >conftest.err | |
4003 | rm -f conftest.er1 | |
4004 | cat conftest.err >&5 | |
4005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4006 | (exit $ac_status); } && | |
ec6c7392 PB |
4007 | { ac_try='test -z "$ac_c_werror_flag" |
4008 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4010 | (eval $ac_try) 2>&5 | |
4011 | ac_status=$? | |
4012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4013 | (exit $ac_status); }; } && | |
4014 | { ac_try='test -s conftest.$ac_objext' | |
4015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4016 | (eval $ac_try) 2>&5 | |
4017 | ac_status=$? | |
4018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4019 | (exit $ac_status); }; }; then | |
4020 | ac_hi=$ac_mid; break | |
4021 | else | |
4022 | echo "$as_me: failed program was:" >&5 | |
4023 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4024 | ||
4025 | ac_lo=`expr $ac_mid + 1` | |
4026 | if test $ac_lo -le $ac_mid; then | |
4027 | ac_lo= ac_hi= | |
4028 | break | |
4029 | fi | |
4030 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4031 | fi | |
4032 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4033 | done | |
4034 | else | |
4035 | echo "$as_me: failed program was:" >&5 | |
4036 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4037 | ||
4038 | cat >conftest.$ac_ext <<_ACEOF | |
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 | int | |
4046 | main () | |
4047 | { | |
4048 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4049 | test_array [0] = 0 | |
4050 | ||
4051 | ; | |
4052 | return 0; | |
4053 | } | |
4054 | _ACEOF | |
4055 | rm -f conftest.$ac_objext | |
4056 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4057 | (eval $ac_compile) 2>conftest.er1 | |
4058 | ac_status=$? | |
4059 | grep -v '^ *+' conftest.er1 >conftest.err | |
4060 | rm -f conftest.er1 | |
4061 | cat conftest.err >&5 | |
4062 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4063 | (exit $ac_status); } && | |
ec6c7392 PB |
4064 | { ac_try='test -z "$ac_c_werror_flag" |
4065 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4066 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4067 | (eval $ac_try) 2>&5 | |
4068 | ac_status=$? | |
4069 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4070 | (exit $ac_status); }; } && | |
4071 | { ac_try='test -s conftest.$ac_objext' | |
4072 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4073 | (eval $ac_try) 2>&5 | |
4074 | ac_status=$? | |
4075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4076 | (exit $ac_status); }; }; then | |
4077 | ac_hi=-1 ac_mid=-1 | |
4078 | while :; do | |
4079 | cat >conftest.$ac_ext <<_ACEOF | |
4080 | /* confdefs.h. */ | |
4081 | _ACEOF | |
4082 | cat confdefs.h >>conftest.$ac_ext | |
4083 | cat >>conftest.$ac_ext <<_ACEOF | |
4084 | /* end confdefs.h. */ | |
4085 | $ac_includes_default | |
4086 | int | |
4087 | main () | |
4088 | { | |
4089 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4090 | test_array [0] = 0 | |
4091 | ||
4092 | ; | |
4093 | return 0; | |
4094 | } | |
4095 | _ACEOF | |
4096 | rm -f conftest.$ac_objext | |
4097 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4098 | (eval $ac_compile) 2>conftest.er1 | |
4099 | ac_status=$? | |
4100 | grep -v '^ *+' conftest.er1 >conftest.err | |
4101 | rm -f conftest.er1 | |
4102 | cat conftest.err >&5 | |
4103 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4104 | (exit $ac_status); } && | |
ec6c7392 PB |
4105 | { ac_try='test -z "$ac_c_werror_flag" |
4106 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4107 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4108 | (eval $ac_try) 2>&5 | |
4109 | ac_status=$? | |
4110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4111 | (exit $ac_status); }; } && | |
4112 | { ac_try='test -s conftest.$ac_objext' | |
4113 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4114 | (eval $ac_try) 2>&5 | |
4115 | ac_status=$? | |
4116 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4117 | (exit $ac_status); }; }; then | |
4118 | ac_lo=$ac_mid; break | |
4119 | else | |
4120 | echo "$as_me: failed program was:" >&5 | |
4121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4122 | ||
4123 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4124 | if test $ac_mid -le $ac_hi; then | |
4125 | ac_lo= ac_hi= | |
4126 | break | |
4127 | fi | |
4128 | ac_mid=`expr 2 '*' $ac_mid` | |
4129 | fi | |
4130 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4131 | done | |
4132 | else | |
4133 | echo "$as_me: failed program was:" >&5 | |
4134 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4135 | ||
4136 | ac_lo= ac_hi= | |
4137 | fi | |
4138 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4139 | fi | |
4140 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4141 | # Binary search between lo and hi bounds. | |
4142 | while test "x$ac_lo" != "x$ac_hi"; do | |
4143 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4144 | cat >conftest.$ac_ext <<_ACEOF | |
4145 | /* confdefs.h. */ | |
4146 | _ACEOF | |
4147 | cat confdefs.h >>conftest.$ac_ext | |
4148 | cat >>conftest.$ac_ext <<_ACEOF | |
4149 | /* end confdefs.h. */ | |
4150 | $ac_includes_default | |
4151 | int | |
4152 | main () | |
4153 | { | |
4154 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4155 | test_array [0] = 0 | |
4156 | ||
4157 | ; | |
4158 | return 0; | |
4159 | } | |
4160 | _ACEOF | |
4161 | rm -f conftest.$ac_objext | |
4162 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4163 | (eval $ac_compile) 2>conftest.er1 | |
4164 | ac_status=$? | |
4165 | grep -v '^ *+' conftest.er1 >conftest.err | |
4166 | rm -f conftest.er1 | |
4167 | cat conftest.err >&5 | |
4168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4169 | (exit $ac_status); } && | |
ec6c7392 PB |
4170 | { ac_try='test -z "$ac_c_werror_flag" |
4171 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4173 | (eval $ac_try) 2>&5 | |
4174 | ac_status=$? | |
4175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4176 | (exit $ac_status); }; } && | |
4177 | { ac_try='test -s conftest.$ac_objext' | |
4178 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4179 | (eval $ac_try) 2>&5 | |
4180 | ac_status=$? | |
4181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4182 | (exit $ac_status); }; }; then | |
4183 | ac_hi=$ac_mid | |
4184 | else | |
4185 | echo "$as_me: failed program was:" >&5 | |
4186 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4187 | ||
4188 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4189 | fi | |
4190 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4191 | done | |
4192 | case $ac_lo in | |
4193 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4194 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4195 | See \`config.log' for more details." >&5 | |
4196 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4197 | See \`config.log' for more details." >&2;} | |
4198 | { (exit 1); exit 1; }; } ;; | |
4199 | esac | |
4200 | else | |
4201 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4202 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4203 | See \`config.log' for more details." >&5 | |
4204 | echo "$as_me: error: cannot run test program while cross compiling | |
4205 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4206 | { (exit 1); exit 1; }; } |
4207 | else | |
4208 | cat >conftest.$ac_ext <<_ACEOF | |
4209 | /* confdefs.h. */ | |
4210 | _ACEOF | |
4211 | cat confdefs.h >>conftest.$ac_ext | |
4212 | cat >>conftest.$ac_ext <<_ACEOF | |
4213 | /* end confdefs.h. */ | |
4214 | $ac_includes_default | |
4215 | long longval () { return (long) (sizeof (short)); } | |
4216 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4217 | #include <stdio.h> | |
4218 | #include <stdlib.h> | |
4219 | int | |
4220 | main () | |
4221 | { | |
4222 | ||
4223 | FILE *f = fopen ("conftest.val", "w"); | |
4224 | if (! f) | |
4225 | exit (1); | |
4226 | if (((long) (sizeof (short))) < 0) | |
4227 | { | |
4228 | long i = longval (); | |
4229 | if (i != ((long) (sizeof (short)))) | |
4230 | exit (1); | |
4231 | fprintf (f, "%ld\n", i); | |
4232 | } | |
4233 | else | |
4234 | { | |
4235 | unsigned long i = ulongval (); | |
4236 | if (i != ((long) (sizeof (short)))) | |
4237 | exit (1); | |
4238 | fprintf (f, "%lu\n", i); | |
4239 | } | |
4240 | exit (ferror (f) || fclose (f) != 0); | |
4241 | ||
4242 | ; | |
4243 | return 0; | |
4244 | } | |
4245 | _ACEOF | |
4246 | rm -f conftest$ac_exeext | |
4247 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4248 | (eval $ac_link) 2>&5 | |
4249 | ac_status=$? | |
4250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4251 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4252 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4253 | (eval $ac_try) 2>&5 | |
4254 | ac_status=$? | |
4255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4256 | (exit $ac_status); }; }; then | |
4257 | ac_cv_sizeof_short=`cat conftest.val` | |
4258 | else | |
4259 | echo "$as_me: program exited with status $ac_status" >&5 | |
4260 | echo "$as_me: failed program was:" >&5 | |
4261 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4262 | ||
4263 | ( exit $ac_status ) | |
4264 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4265 | See \`config.log' for more details." >&5 | |
4266 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4267 | See \`config.log' for more details." >&2;} | |
4268 | { (exit 1); exit 1; }; } | |
4269 | fi | |
4270 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4271 | fi | |
4272 | fi | |
4273 | rm -f conftest.val | |
4274 | else | |
4275 | ac_cv_sizeof_short=0 | |
4276 | fi | |
4277 | fi | |
4278 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4279 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4280 | cat >>confdefs.h <<_ACEOF | |
4281 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4282 | _ACEOF | |
4283 | ||
4284 | ||
4285 | echo "$as_me:$LINENO: checking for int" >&5 | |
4286 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4287 | if test "${ac_cv_type_int+set}" = set; then | |
4288 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4289 | else | |
4290 | cat >conftest.$ac_ext <<_ACEOF | |
4291 | /* confdefs.h. */ | |
4292 | _ACEOF | |
4293 | cat confdefs.h >>conftest.$ac_ext | |
4294 | cat >>conftest.$ac_ext <<_ACEOF | |
4295 | /* end confdefs.h. */ | |
4296 | $ac_includes_default | |
4297 | int | |
4298 | main () | |
4299 | { | |
4300 | if ((int *) 0) | |
4301 | return 0; | |
4302 | if (sizeof (int)) | |
4303 | return 0; | |
4304 | ; | |
4305 | return 0; | |
4306 | } | |
4307 | _ACEOF | |
4308 | rm -f conftest.$ac_objext | |
4309 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4310 | (eval $ac_compile) 2>conftest.er1 | |
4311 | ac_status=$? | |
4312 | grep -v '^ *+' conftest.er1 >conftest.err | |
4313 | rm -f conftest.er1 | |
4314 | cat conftest.err >&5 | |
4315 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4316 | (exit $ac_status); } && | |
ec6c7392 PB |
4317 | { ac_try='test -z "$ac_c_werror_flag" |
4318 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4319 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4320 | (eval $ac_try) 2>&5 | |
4321 | ac_status=$? | |
4322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4323 | (exit $ac_status); }; } && | |
4324 | { ac_try='test -s conftest.$ac_objext' | |
4325 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4326 | (eval $ac_try) 2>&5 | |
4327 | ac_status=$? | |
4328 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4329 | (exit $ac_status); }; }; then | |
4330 | ac_cv_type_int=yes | |
4331 | else | |
4332 | echo "$as_me: failed program was:" >&5 | |
4333 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4334 | ||
4335 | ac_cv_type_int=no | |
4336 | fi | |
4337 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4338 | fi | |
4339 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4340 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4341 | ||
4342 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4343 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4344 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4345 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4346 | else | |
4347 | if test "$ac_cv_type_int" = yes; then | |
4348 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4349 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4350 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4351 | # This bug is HP SR number 8606223364. | |
4352 | if test "$cross_compiling" = yes; then | |
4353 | # Depending upon the size, compute the lo and hi bounds. | |
4354 | cat >conftest.$ac_ext <<_ACEOF | |
4355 | /* confdefs.h. */ | |
4356 | _ACEOF | |
4357 | cat confdefs.h >>conftest.$ac_ext | |
4358 | cat >>conftest.$ac_ext <<_ACEOF | |
4359 | /* end confdefs.h. */ | |
4360 | $ac_includes_default | |
4361 | int | |
4362 | main () | |
4363 | { | |
4364 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4365 | test_array [0] = 0 | |
4366 | ||
4367 | ; | |
4368 | return 0; | |
4369 | } | |
4370 | _ACEOF | |
4371 | rm -f conftest.$ac_objext | |
4372 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4373 | (eval $ac_compile) 2>conftest.er1 | |
4374 | ac_status=$? | |
4375 | grep -v '^ *+' conftest.er1 >conftest.err | |
4376 | rm -f conftest.er1 | |
4377 | cat conftest.err >&5 | |
4378 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4379 | (exit $ac_status); } && | |
ec6c7392 PB |
4380 | { ac_try='test -z "$ac_c_werror_flag" |
4381 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4382 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4383 | (eval $ac_try) 2>&5 | |
4384 | ac_status=$? | |
4385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4386 | (exit $ac_status); }; } && | |
4387 | { ac_try='test -s conftest.$ac_objext' | |
4388 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4389 | (eval $ac_try) 2>&5 | |
4390 | ac_status=$? | |
4391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4392 | (exit $ac_status); }; }; then | |
4393 | ac_lo=0 ac_mid=0 | |
4394 | while :; do | |
4395 | cat >conftest.$ac_ext <<_ACEOF | |
4396 | /* confdefs.h. */ | |
4397 | _ACEOF | |
4398 | cat confdefs.h >>conftest.$ac_ext | |
4399 | cat >>conftest.$ac_ext <<_ACEOF | |
4400 | /* end confdefs.h. */ | |
4401 | $ac_includes_default | |
4402 | int | |
4403 | main () | |
4404 | { | |
4405 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4406 | test_array [0] = 0 | |
4407 | ||
4408 | ; | |
4409 | return 0; | |
4410 | } | |
4411 | _ACEOF | |
4412 | rm -f conftest.$ac_objext | |
4413 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4414 | (eval $ac_compile) 2>conftest.er1 | |
4415 | ac_status=$? | |
4416 | grep -v '^ *+' conftest.er1 >conftest.err | |
4417 | rm -f conftest.er1 | |
4418 | cat conftest.err >&5 | |
4419 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4420 | (exit $ac_status); } && | |
ec6c7392 PB |
4421 | { ac_try='test -z "$ac_c_werror_flag" |
4422 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4423 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4424 | (eval $ac_try) 2>&5 | |
4425 | ac_status=$? | |
4426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4427 | (exit $ac_status); }; } && | |
4428 | { ac_try='test -s conftest.$ac_objext' | |
4429 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4430 | (eval $ac_try) 2>&5 | |
4431 | ac_status=$? | |
4432 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4433 | (exit $ac_status); }; }; then | |
4434 | ac_hi=$ac_mid; break | |
4435 | else | |
4436 | echo "$as_me: failed program was:" >&5 | |
4437 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4438 | ||
4439 | ac_lo=`expr $ac_mid + 1` | |
4440 | if test $ac_lo -le $ac_mid; then | |
4441 | ac_lo= ac_hi= | |
4442 | break | |
4443 | fi | |
4444 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4445 | fi | |
4446 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4447 | done | |
4448 | else | |
4449 | echo "$as_me: failed program was:" >&5 | |
4450 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4451 | ||
4452 | cat >conftest.$ac_ext <<_ACEOF | |
4453 | /* confdefs.h. */ | |
4454 | _ACEOF | |
4455 | cat confdefs.h >>conftest.$ac_ext | |
4456 | cat >>conftest.$ac_ext <<_ACEOF | |
4457 | /* end confdefs.h. */ | |
4458 | $ac_includes_default | |
4459 | int | |
4460 | main () | |
4461 | { | |
4462 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4463 | test_array [0] = 0 | |
4464 | ||
4465 | ; | |
4466 | return 0; | |
4467 | } | |
4468 | _ACEOF | |
4469 | rm -f conftest.$ac_objext | |
4470 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4471 | (eval $ac_compile) 2>conftest.er1 | |
4472 | ac_status=$? | |
4473 | grep -v '^ *+' conftest.er1 >conftest.err | |
4474 | rm -f conftest.er1 | |
4475 | cat conftest.err >&5 | |
4476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4477 | (exit $ac_status); } && | |
ec6c7392 PB |
4478 | { ac_try='test -z "$ac_c_werror_flag" |
4479 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4480 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4481 | (eval $ac_try) 2>&5 | |
4482 | ac_status=$? | |
4483 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4484 | (exit $ac_status); }; } && | |
4485 | { ac_try='test -s conftest.$ac_objext' | |
4486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4487 | (eval $ac_try) 2>&5 | |
4488 | ac_status=$? | |
4489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4490 | (exit $ac_status); }; }; then | |
4491 | ac_hi=-1 ac_mid=-1 | |
4492 | while :; do | |
4493 | cat >conftest.$ac_ext <<_ACEOF | |
4494 | /* confdefs.h. */ | |
4495 | _ACEOF | |
4496 | cat confdefs.h >>conftest.$ac_ext | |
4497 | cat >>conftest.$ac_ext <<_ACEOF | |
4498 | /* end confdefs.h. */ | |
4499 | $ac_includes_default | |
4500 | int | |
4501 | main () | |
4502 | { | |
4503 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4504 | test_array [0] = 0 | |
4505 | ||
4506 | ; | |
4507 | return 0; | |
4508 | } | |
4509 | _ACEOF | |
4510 | rm -f conftest.$ac_objext | |
4511 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4512 | (eval $ac_compile) 2>conftest.er1 | |
4513 | ac_status=$? | |
4514 | grep -v '^ *+' conftest.er1 >conftest.err | |
4515 | rm -f conftest.er1 | |
4516 | cat conftest.err >&5 | |
4517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4518 | (exit $ac_status); } && | |
ec6c7392 PB |
4519 | { ac_try='test -z "$ac_c_werror_flag" |
4520 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4521 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4522 | (eval $ac_try) 2>&5 | |
4523 | ac_status=$? | |
4524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4525 | (exit $ac_status); }; } && | |
4526 | { ac_try='test -s conftest.$ac_objext' | |
4527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4528 | (eval $ac_try) 2>&5 | |
4529 | ac_status=$? | |
4530 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4531 | (exit $ac_status); }; }; then | |
4532 | ac_lo=$ac_mid; break | |
4533 | else | |
4534 | echo "$as_me: failed program was:" >&5 | |
4535 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4536 | ||
4537 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4538 | if test $ac_mid -le $ac_hi; then | |
4539 | ac_lo= ac_hi= | |
4540 | break | |
4541 | fi | |
4542 | ac_mid=`expr 2 '*' $ac_mid` | |
4543 | fi | |
4544 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4545 | done | |
4546 | else | |
4547 | echo "$as_me: failed program was:" >&5 | |
4548 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4549 | ||
4550 | ac_lo= ac_hi= | |
4551 | fi | |
4552 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4553 | fi | |
4554 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4555 | # Binary search between lo and hi bounds. | |
4556 | while test "x$ac_lo" != "x$ac_hi"; do | |
4557 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4558 | cat >conftest.$ac_ext <<_ACEOF | |
4559 | /* confdefs.h. */ | |
4560 | _ACEOF | |
4561 | cat confdefs.h >>conftest.$ac_ext | |
4562 | cat >>conftest.$ac_ext <<_ACEOF | |
4563 | /* end confdefs.h. */ | |
4564 | $ac_includes_default | |
4565 | int | |
4566 | main () | |
4567 | { | |
4568 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4569 | test_array [0] = 0 | |
4570 | ||
4571 | ; | |
4572 | return 0; | |
4573 | } | |
4574 | _ACEOF | |
4575 | rm -f conftest.$ac_objext | |
4576 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4577 | (eval $ac_compile) 2>conftest.er1 | |
4578 | ac_status=$? | |
4579 | grep -v '^ *+' conftest.er1 >conftest.err | |
4580 | rm -f conftest.er1 | |
4581 | cat conftest.err >&5 | |
4582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4583 | (exit $ac_status); } && | |
ec6c7392 PB |
4584 | { ac_try='test -z "$ac_c_werror_flag" |
4585 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4586 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4587 | (eval $ac_try) 2>&5 | |
4588 | ac_status=$? | |
4589 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4590 | (exit $ac_status); }; } && | |
4591 | { ac_try='test -s conftest.$ac_objext' | |
4592 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4593 | (eval $ac_try) 2>&5 | |
4594 | ac_status=$? | |
4595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4596 | (exit $ac_status); }; }; then | |
4597 | ac_hi=$ac_mid | |
4598 | else | |
4599 | echo "$as_me: failed program was:" >&5 | |
4600 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4601 | ||
4602 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4603 | fi | |
4604 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4605 | done | |
4606 | case $ac_lo in | |
4607 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4608 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4609 | See \`config.log' for more details." >&5 | |
4610 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4611 | See \`config.log' for more details." >&2;} | |
4612 | { (exit 1); exit 1; }; } ;; | |
4613 | esac | |
4614 | else | |
4615 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4616 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4617 | See \`config.log' for more details." >&5 | |
4618 | echo "$as_me: error: cannot run test program while cross compiling | |
4619 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4620 | { (exit 1); exit 1; }; } |
4621 | else | |
4622 | cat >conftest.$ac_ext <<_ACEOF | |
4623 | /* confdefs.h. */ | |
4624 | _ACEOF | |
4625 | cat confdefs.h >>conftest.$ac_ext | |
4626 | cat >>conftest.$ac_ext <<_ACEOF | |
4627 | /* end confdefs.h. */ | |
4628 | $ac_includes_default | |
4629 | long longval () { return (long) (sizeof (int)); } | |
4630 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4631 | #include <stdio.h> | |
4632 | #include <stdlib.h> | |
4633 | int | |
4634 | main () | |
4635 | { | |
4636 | ||
4637 | FILE *f = fopen ("conftest.val", "w"); | |
4638 | if (! f) | |
4639 | exit (1); | |
4640 | if (((long) (sizeof (int))) < 0) | |
4641 | { | |
4642 | long i = longval (); | |
4643 | if (i != ((long) (sizeof (int)))) | |
4644 | exit (1); | |
4645 | fprintf (f, "%ld\n", i); | |
4646 | } | |
4647 | else | |
4648 | { | |
4649 | unsigned long i = ulongval (); | |
4650 | if (i != ((long) (sizeof (int)))) | |
4651 | exit (1); | |
4652 | fprintf (f, "%lu\n", i); | |
4653 | } | |
4654 | exit (ferror (f) || fclose (f) != 0); | |
4655 | ||
4656 | ; | |
4657 | return 0; | |
4658 | } | |
4659 | _ACEOF | |
4660 | rm -f conftest$ac_exeext | |
4661 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4662 | (eval $ac_link) 2>&5 | |
4663 | ac_status=$? | |
4664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4665 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4667 | (eval $ac_try) 2>&5 | |
4668 | ac_status=$? | |
4669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4670 | (exit $ac_status); }; }; then | |
4671 | ac_cv_sizeof_int=`cat conftest.val` | |
4672 | else | |
4673 | echo "$as_me: program exited with status $ac_status" >&5 | |
4674 | echo "$as_me: failed program was:" >&5 | |
4675 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4676 | ||
4677 | ( exit $ac_status ) | |
4678 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4679 | See \`config.log' for more details." >&5 | |
4680 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4681 | See \`config.log' for more details." >&2;} | |
4682 | { (exit 1); exit 1; }; } | |
4683 | fi | |
4684 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4685 | fi | |
4686 | fi | |
4687 | rm -f conftest.val | |
4688 | else | |
4689 | ac_cv_sizeof_int=0 | |
4690 | fi | |
4691 | fi | |
4692 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4693 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4694 | cat >>confdefs.h <<_ACEOF | |
4695 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4696 | _ACEOF | |
4697 | ||
4698 | ||
4699 | echo "$as_me:$LINENO: checking for long" >&5 | |
4700 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4701 | if test "${ac_cv_type_long+set}" = set; then | |
4702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4703 | else | |
4704 | cat >conftest.$ac_ext <<_ACEOF | |
4705 | /* confdefs.h. */ | |
4706 | _ACEOF | |
4707 | cat confdefs.h >>conftest.$ac_ext | |
4708 | cat >>conftest.$ac_ext <<_ACEOF | |
4709 | /* end confdefs.h. */ | |
4710 | $ac_includes_default | |
4711 | int | |
4712 | main () | |
4713 | { | |
4714 | if ((long *) 0) | |
4715 | return 0; | |
4716 | if (sizeof (long)) | |
4717 | return 0; | |
4718 | ; | |
4719 | return 0; | |
4720 | } | |
4721 | _ACEOF | |
4722 | rm -f conftest.$ac_objext | |
4723 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4724 | (eval $ac_compile) 2>conftest.er1 | |
4725 | ac_status=$? | |
4726 | grep -v '^ *+' conftest.er1 >conftest.err | |
4727 | rm -f conftest.er1 | |
4728 | cat conftest.err >&5 | |
4729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4730 | (exit $ac_status); } && | |
ec6c7392 PB |
4731 | { ac_try='test -z "$ac_c_werror_flag" |
4732 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4733 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4734 | (eval $ac_try) 2>&5 | |
4735 | ac_status=$? | |
4736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4737 | (exit $ac_status); }; } && | |
4738 | { ac_try='test -s conftest.$ac_objext' | |
4739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4740 | (eval $ac_try) 2>&5 | |
4741 | ac_status=$? | |
4742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4743 | (exit $ac_status); }; }; then | |
4744 | ac_cv_type_long=yes | |
4745 | else | |
4746 | echo "$as_me: failed program was:" >&5 | |
4747 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4748 | ||
4749 | ac_cv_type_long=no | |
4750 | fi | |
4751 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4752 | fi | |
4753 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4754 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4755 | ||
4756 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4757 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4758 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4759 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4760 | else | |
4761 | if test "$ac_cv_type_long" = yes; then | |
4762 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4763 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4764 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4765 | # This bug is HP SR number 8606223364. | |
4766 | if test "$cross_compiling" = yes; then | |
4767 | # Depending upon the size, compute the lo and hi bounds. | |
4768 | cat >conftest.$ac_ext <<_ACEOF | |
4769 | /* confdefs.h. */ | |
4770 | _ACEOF | |
4771 | cat confdefs.h >>conftest.$ac_ext | |
4772 | cat >>conftest.$ac_ext <<_ACEOF | |
4773 | /* end confdefs.h. */ | |
4774 | $ac_includes_default | |
4775 | int | |
4776 | main () | |
4777 | { | |
4778 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4779 | test_array [0] = 0 | |
4780 | ||
4781 | ; | |
4782 | return 0; | |
4783 | } | |
4784 | _ACEOF | |
4785 | rm -f conftest.$ac_objext | |
4786 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4787 | (eval $ac_compile) 2>conftest.er1 | |
4788 | ac_status=$? | |
4789 | grep -v '^ *+' conftest.er1 >conftest.err | |
4790 | rm -f conftest.er1 | |
4791 | cat conftest.err >&5 | |
4792 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4793 | (exit $ac_status); } && | |
ec6c7392 PB |
4794 | { ac_try='test -z "$ac_c_werror_flag" |
4795 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4796 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4797 | (eval $ac_try) 2>&5 | |
4798 | ac_status=$? | |
4799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4800 | (exit $ac_status); }; } && | |
4801 | { ac_try='test -s conftest.$ac_objext' | |
4802 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4803 | (eval $ac_try) 2>&5 | |
4804 | ac_status=$? | |
4805 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4806 | (exit $ac_status); }; }; then | |
4807 | ac_lo=0 ac_mid=0 | |
4808 | while :; do | |
4809 | cat >conftest.$ac_ext <<_ACEOF | |
4810 | /* confdefs.h. */ | |
4811 | _ACEOF | |
4812 | cat confdefs.h >>conftest.$ac_ext | |
4813 | cat >>conftest.$ac_ext <<_ACEOF | |
4814 | /* end confdefs.h. */ | |
4815 | $ac_includes_default | |
4816 | int | |
4817 | main () | |
4818 | { | |
4819 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4820 | test_array [0] = 0 | |
4821 | ||
4822 | ; | |
4823 | return 0; | |
4824 | } | |
4825 | _ACEOF | |
4826 | rm -f conftest.$ac_objext | |
4827 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4828 | (eval $ac_compile) 2>conftest.er1 | |
4829 | ac_status=$? | |
4830 | grep -v '^ *+' conftest.er1 >conftest.err | |
4831 | rm -f conftest.er1 | |
4832 | cat conftest.err >&5 | |
4833 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4834 | (exit $ac_status); } && | |
ec6c7392 PB |
4835 | { ac_try='test -z "$ac_c_werror_flag" |
4836 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4838 | (eval $ac_try) 2>&5 | |
4839 | ac_status=$? | |
4840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4841 | (exit $ac_status); }; } && | |
4842 | { ac_try='test -s conftest.$ac_objext' | |
4843 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4844 | (eval $ac_try) 2>&5 | |
4845 | ac_status=$? | |
4846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4847 | (exit $ac_status); }; }; then | |
4848 | ac_hi=$ac_mid; break | |
4849 | else | |
4850 | echo "$as_me: failed program was:" >&5 | |
4851 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4852 | ||
4853 | ac_lo=`expr $ac_mid + 1` | |
4854 | if test $ac_lo -le $ac_mid; then | |
4855 | ac_lo= ac_hi= | |
4856 | break | |
4857 | fi | |
4858 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4859 | fi | |
4860 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4861 | done | |
4862 | else | |
4863 | echo "$as_me: failed program was:" >&5 | |
4864 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4865 | ||
4866 | cat >conftest.$ac_ext <<_ACEOF | |
4867 | /* confdefs.h. */ | |
4868 | _ACEOF | |
4869 | cat confdefs.h >>conftest.$ac_ext | |
4870 | cat >>conftest.$ac_ext <<_ACEOF | |
4871 | /* end confdefs.h. */ | |
4872 | $ac_includes_default | |
4873 | int | |
4874 | main () | |
4875 | { | |
4876 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4877 | test_array [0] = 0 | |
4878 | ||
4879 | ; | |
4880 | return 0; | |
4881 | } | |
4882 | _ACEOF | |
4883 | rm -f conftest.$ac_objext | |
4884 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4885 | (eval $ac_compile) 2>conftest.er1 | |
4886 | ac_status=$? | |
4887 | grep -v '^ *+' conftest.er1 >conftest.err | |
4888 | rm -f conftest.er1 | |
4889 | cat conftest.err >&5 | |
4890 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4891 | (exit $ac_status); } && | |
ec6c7392 PB |
4892 | { ac_try='test -z "$ac_c_werror_flag" |
4893 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4894 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4895 | (eval $ac_try) 2>&5 | |
4896 | ac_status=$? | |
4897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4898 | (exit $ac_status); }; } && | |
4899 | { ac_try='test -s conftest.$ac_objext' | |
4900 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4901 | (eval $ac_try) 2>&5 | |
4902 | ac_status=$? | |
4903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4904 | (exit $ac_status); }; }; then | |
4905 | ac_hi=-1 ac_mid=-1 | |
4906 | while :; do | |
4907 | cat >conftest.$ac_ext <<_ACEOF | |
4908 | /* confdefs.h. */ | |
4909 | _ACEOF | |
4910 | cat confdefs.h >>conftest.$ac_ext | |
4911 | cat >>conftest.$ac_ext <<_ACEOF | |
4912 | /* end confdefs.h. */ | |
4913 | $ac_includes_default | |
4914 | int | |
4915 | main () | |
4916 | { | |
4917 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4918 | test_array [0] = 0 | |
4919 | ||
4920 | ; | |
4921 | return 0; | |
4922 | } | |
4923 | _ACEOF | |
4924 | rm -f conftest.$ac_objext | |
4925 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4926 | (eval $ac_compile) 2>conftest.er1 | |
4927 | ac_status=$? | |
4928 | grep -v '^ *+' conftest.er1 >conftest.err | |
4929 | rm -f conftest.er1 | |
4930 | cat conftest.err >&5 | |
4931 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4932 | (exit $ac_status); } && | |
ec6c7392 PB |
4933 | { ac_try='test -z "$ac_c_werror_flag" |
4934 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4935 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4936 | (eval $ac_try) 2>&5 | |
4937 | ac_status=$? | |
4938 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4939 | (exit $ac_status); }; } && | |
4940 | { ac_try='test -s conftest.$ac_objext' | |
4941 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4942 | (eval $ac_try) 2>&5 | |
4943 | ac_status=$? | |
4944 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4945 | (exit $ac_status); }; }; then | |
4946 | ac_lo=$ac_mid; break | |
4947 | else | |
4948 | echo "$as_me: failed program was:" >&5 | |
4949 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4950 | ||
4951 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4952 | if test $ac_mid -le $ac_hi; then | |
4953 | ac_lo= ac_hi= | |
4954 | break | |
4955 | fi | |
4956 | ac_mid=`expr 2 '*' $ac_mid` | |
4957 | fi | |
4958 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4959 | done | |
4960 | else | |
4961 | echo "$as_me: failed program was:" >&5 | |
4962 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4963 | ||
4964 | ac_lo= ac_hi= | |
4965 | fi | |
4966 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4967 | fi | |
4968 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4969 | # Binary search between lo and hi bounds. | |
4970 | while test "x$ac_lo" != "x$ac_hi"; do | |
4971 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4972 | cat >conftest.$ac_ext <<_ACEOF | |
4973 | /* confdefs.h. */ | |
4974 | _ACEOF | |
4975 | cat confdefs.h >>conftest.$ac_ext | |
4976 | cat >>conftest.$ac_ext <<_ACEOF | |
4977 | /* end confdefs.h. */ | |
4978 | $ac_includes_default | |
4979 | int | |
4980 | main () | |
4981 | { | |
4982 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4983 | test_array [0] = 0 | |
4984 | ||
4985 | ; | |
4986 | return 0; | |
4987 | } | |
4988 | _ACEOF | |
4989 | rm -f conftest.$ac_objext | |
4990 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4991 | (eval $ac_compile) 2>conftest.er1 | |
4992 | ac_status=$? | |
4993 | grep -v '^ *+' conftest.er1 >conftest.err | |
4994 | rm -f conftest.er1 | |
4995 | cat conftest.err >&5 | |
4996 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4997 | (exit $ac_status); } && | |
ec6c7392 PB |
4998 | { ac_try='test -z "$ac_c_werror_flag" |
4999 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5000 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5001 | (eval $ac_try) 2>&5 | |
5002 | ac_status=$? | |
5003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5004 | (exit $ac_status); }; } && | |
5005 | { ac_try='test -s conftest.$ac_objext' | |
5006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5007 | (eval $ac_try) 2>&5 | |
5008 | ac_status=$? | |
5009 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5010 | (exit $ac_status); }; }; then | |
5011 | ac_hi=$ac_mid | |
5012 | else | |
5013 | echo "$as_me: failed program was:" >&5 | |
5014 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5015 | ||
5016 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5017 | fi | |
5018 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5019 | done | |
5020 | case $ac_lo in | |
5021 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5022 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5023 | See \`config.log' for more details." >&5 | |
5024 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5025 | See \`config.log' for more details." >&2;} | |
5026 | { (exit 1); exit 1; }; } ;; | |
5027 | esac | |
5028 | else | |
5029 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5030 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5031 | See \`config.log' for more details." >&5 | |
5032 | echo "$as_me: error: cannot run test program while cross compiling | |
5033 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5034 | { (exit 1); exit 1; }; } |
5035 | else | |
5036 | cat >conftest.$ac_ext <<_ACEOF | |
5037 | /* confdefs.h. */ | |
5038 | _ACEOF | |
5039 | cat confdefs.h >>conftest.$ac_ext | |
5040 | cat >>conftest.$ac_ext <<_ACEOF | |
5041 | /* end confdefs.h. */ | |
5042 | $ac_includes_default | |
5043 | long longval () { return (long) (sizeof (long)); } | |
5044 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5045 | #include <stdio.h> | |
5046 | #include <stdlib.h> | |
5047 | int | |
5048 | main () | |
5049 | { | |
5050 | ||
5051 | FILE *f = fopen ("conftest.val", "w"); | |
5052 | if (! f) | |
5053 | exit (1); | |
5054 | if (((long) (sizeof (long))) < 0) | |
5055 | { | |
5056 | long i = longval (); | |
5057 | if (i != ((long) (sizeof (long)))) | |
5058 | exit (1); | |
5059 | fprintf (f, "%ld\n", i); | |
5060 | } | |
5061 | else | |
5062 | { | |
5063 | unsigned long i = ulongval (); | |
5064 | if (i != ((long) (sizeof (long)))) | |
5065 | exit (1); | |
5066 | fprintf (f, "%lu\n", i); | |
5067 | } | |
5068 | exit (ferror (f) || fclose (f) != 0); | |
5069 | ||
5070 | ; | |
5071 | return 0; | |
5072 | } | |
5073 | _ACEOF | |
5074 | rm -f conftest$ac_exeext | |
5075 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5076 | (eval $ac_link) 2>&5 | |
5077 | ac_status=$? | |
5078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5079 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5081 | (eval $ac_try) 2>&5 | |
5082 | ac_status=$? | |
5083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5084 | (exit $ac_status); }; }; then | |
5085 | ac_cv_sizeof_long=`cat conftest.val` | |
5086 | else | |
5087 | echo "$as_me: program exited with status $ac_status" >&5 | |
5088 | echo "$as_me: failed program was:" >&5 | |
5089 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5090 | ||
5091 | ( exit $ac_status ) | |
5092 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5093 | See \`config.log' for more details." >&5 | |
5094 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5095 | See \`config.log' for more details." >&2;} | |
5096 | { (exit 1); exit 1; }; } | |
5097 | fi | |
5098 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5099 | fi | |
5100 | fi | |
5101 | rm -f conftest.val | |
5102 | else | |
5103 | ac_cv_sizeof_long=0 | |
5104 | fi | |
5105 | fi | |
5106 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5107 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5108 | cat >>confdefs.h <<_ACEOF | |
5109 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5110 | _ACEOF | |
5111 | ||
5112 | ||
5ec1c5e6 KC |
5113 | echo "$as_me:$LINENO: checking for long long" >&5 |
5114 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5115 | if test "${ac_cv_type_long_long+set}" = set; then | |
5116 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5117 | else | |
5118 | cat >conftest.$ac_ext <<_ACEOF | |
5119 | /* confdefs.h. */ | |
5120 | _ACEOF | |
5121 | cat confdefs.h >>conftest.$ac_ext | |
5122 | cat >>conftest.$ac_ext <<_ACEOF | |
5123 | /* end confdefs.h. */ | |
5124 | $ac_includes_default | |
5125 | int | |
5126 | main () | |
5127 | { | |
5128 | if ((long long *) 0) | |
5129 | return 0; | |
5130 | if (sizeof (long long)) | |
5131 | return 0; | |
5132 | ; | |
5133 | return 0; | |
5134 | } | |
5135 | _ACEOF | |
5136 | rm -f conftest.$ac_objext | |
5137 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5138 | (eval $ac_compile) 2>conftest.er1 | |
5139 | ac_status=$? | |
5140 | grep -v '^ *+' conftest.er1 >conftest.err | |
5141 | rm -f conftest.er1 | |
5142 | cat conftest.err >&5 | |
5143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5144 | (exit $ac_status); } && | |
ec6c7392 PB |
5145 | { ac_try='test -z "$ac_c_werror_flag" |
5146 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5148 | (eval $ac_try) 2>&5 | |
5149 | ac_status=$? | |
5150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5151 | (exit $ac_status); }; } && | |
5152 | { ac_try='test -s conftest.$ac_objext' | |
5153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5154 | (eval $ac_try) 2>&5 | |
5155 | ac_status=$? | |
5156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5157 | (exit $ac_status); }; }; then | |
5158 | ac_cv_type_long_long=yes | |
5159 | else | |
5160 | echo "$as_me: failed program was:" >&5 | |
5161 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5162 | ||
5163 | ac_cv_type_long_long=no | |
5164 | fi | |
5165 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5166 | fi | |
5167 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5168 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5169 | if test $ac_cv_type_long_long = yes; then | |
5170 | ||
5171 | cat >>confdefs.h <<_ACEOF | |
5172 | #define HAVE_LONG_LONG 1 | |
5173 | _ACEOF | |
5174 | ||
5175 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5176 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5177 | if test "${ac_cv_type_long_long+set}" = set; then | |
5178 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5179 | else | |
5180 | cat >conftest.$ac_ext <<_ACEOF | |
5181 | /* confdefs.h. */ | |
5182 | _ACEOF | |
5183 | cat confdefs.h >>conftest.$ac_ext | |
5184 | cat >>conftest.$ac_ext <<_ACEOF | |
5185 | /* end confdefs.h. */ | |
5186 | $ac_includes_default | |
5187 | int | |
5188 | main () | |
5189 | { | |
5190 | if ((long long *) 0) | |
5191 | return 0; | |
5192 | if (sizeof (long long)) | |
5193 | return 0; | |
5194 | ; | |
5195 | return 0; | |
5196 | } | |
5197 | _ACEOF | |
5198 | rm -f conftest.$ac_objext | |
5199 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5200 | (eval $ac_compile) 2>conftest.er1 | |
5201 | ac_status=$? | |
5202 | grep -v '^ *+' conftest.er1 >conftest.err | |
5203 | rm -f conftest.er1 | |
5204 | cat conftest.err >&5 | |
5205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5206 | (exit $ac_status); } && | |
ec6c7392 PB |
5207 | { ac_try='test -z "$ac_c_werror_flag" |
5208 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5209 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5210 | (eval $ac_try) 2>&5 | |
5211 | ac_status=$? | |
5212 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5213 | (exit $ac_status); }; } && | |
5214 | { ac_try='test -s conftest.$ac_objext' | |
5215 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5216 | (eval $ac_try) 2>&5 | |
5217 | ac_status=$? | |
5218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5219 | (exit $ac_status); }; }; then | |
5220 | ac_cv_type_long_long=yes | |
5221 | else | |
5222 | echo "$as_me: failed program was:" >&5 | |
5223 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5224 | ||
5225 | ac_cv_type_long_long=no | |
5226 | fi | |
5227 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5228 | fi | |
5229 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5230 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5231 | ||
5232 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5233 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5234 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5235 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5236 | else | |
5237 | if test "$ac_cv_type_long_long" = yes; then | |
5238 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5239 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5240 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5241 | # This bug is HP SR number 8606223364. | |
5242 | if test "$cross_compiling" = yes; then | |
5243 | # Depending upon the size, compute the lo and hi bounds. | |
5244 | cat >conftest.$ac_ext <<_ACEOF | |
5245 | /* confdefs.h. */ | |
5246 | _ACEOF | |
5247 | cat confdefs.h >>conftest.$ac_ext | |
5248 | cat >>conftest.$ac_ext <<_ACEOF | |
5249 | /* end confdefs.h. */ | |
5250 | $ac_includes_default | |
5251 | int | |
5252 | main () | |
5253 | { | |
5254 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5255 | test_array [0] = 0 | |
5256 | ||
5257 | ; | |
5258 | return 0; | |
5259 | } | |
5260 | _ACEOF | |
5261 | rm -f conftest.$ac_objext | |
5262 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5263 | (eval $ac_compile) 2>conftest.er1 | |
5264 | ac_status=$? | |
5265 | grep -v '^ *+' conftest.er1 >conftest.err | |
5266 | rm -f conftest.er1 | |
5267 | cat conftest.err >&5 | |
5268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5269 | (exit $ac_status); } && | |
ec6c7392 PB |
5270 | { ac_try='test -z "$ac_c_werror_flag" |
5271 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5272 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5273 | (eval $ac_try) 2>&5 | |
5274 | ac_status=$? | |
5275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5276 | (exit $ac_status); }; } && | |
5277 | { ac_try='test -s conftest.$ac_objext' | |
5278 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5279 | (eval $ac_try) 2>&5 | |
5280 | ac_status=$? | |
5281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5282 | (exit $ac_status); }; }; then | |
5283 | ac_lo=0 ac_mid=0 | |
5284 | while :; do | |
5285 | cat >conftest.$ac_ext <<_ACEOF | |
5286 | /* confdefs.h. */ | |
5287 | _ACEOF | |
5288 | cat confdefs.h >>conftest.$ac_ext | |
5289 | cat >>conftest.$ac_ext <<_ACEOF | |
5290 | /* end confdefs.h. */ | |
5291 | $ac_includes_default | |
5292 | int | |
5293 | main () | |
5294 | { | |
5295 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5296 | test_array [0] = 0 | |
5297 | ||
5298 | ; | |
5299 | return 0; | |
5300 | } | |
5301 | _ACEOF | |
5302 | rm -f conftest.$ac_objext | |
5303 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5304 | (eval $ac_compile) 2>conftest.er1 | |
5305 | ac_status=$? | |
5306 | grep -v '^ *+' conftest.er1 >conftest.err | |
5307 | rm -f conftest.er1 | |
5308 | cat conftest.err >&5 | |
5309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5310 | (exit $ac_status); } && | |
ec6c7392 PB |
5311 | { ac_try='test -z "$ac_c_werror_flag" |
5312 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5313 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5314 | (eval $ac_try) 2>&5 | |
5315 | ac_status=$? | |
5316 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5317 | (exit $ac_status); }; } && | |
5318 | { ac_try='test -s conftest.$ac_objext' | |
5319 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5320 | (eval $ac_try) 2>&5 | |
5321 | ac_status=$? | |
5322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5323 | (exit $ac_status); }; }; then | |
5324 | ac_hi=$ac_mid; break | |
5325 | else | |
5326 | echo "$as_me: failed program was:" >&5 | |
5327 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5328 | ||
5329 | ac_lo=`expr $ac_mid + 1` | |
5330 | if test $ac_lo -le $ac_mid; then | |
5331 | ac_lo= ac_hi= | |
5332 | break | |
5333 | fi | |
5334 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5335 | fi | |
5336 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5337 | done | |
5338 | else | |
5339 | echo "$as_me: failed program was:" >&5 | |
5340 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5341 | ||
5342 | cat >conftest.$ac_ext <<_ACEOF | |
5343 | /* confdefs.h. */ | |
5344 | _ACEOF | |
5345 | cat confdefs.h >>conftest.$ac_ext | |
5346 | cat >>conftest.$ac_ext <<_ACEOF | |
5347 | /* end confdefs.h. */ | |
5348 | $ac_includes_default | |
5349 | int | |
5350 | main () | |
5351 | { | |
5352 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5353 | test_array [0] = 0 | |
5354 | ||
5355 | ; | |
5356 | return 0; | |
5357 | } | |
5358 | _ACEOF | |
5359 | rm -f conftest.$ac_objext | |
5360 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5361 | (eval $ac_compile) 2>conftest.er1 | |
5362 | ac_status=$? | |
5363 | grep -v '^ *+' conftest.er1 >conftest.err | |
5364 | rm -f conftest.er1 | |
5365 | cat conftest.err >&5 | |
5366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5367 | (exit $ac_status); } && | |
ec6c7392 PB |
5368 | { ac_try='test -z "$ac_c_werror_flag" |
5369 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5370 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5371 | (eval $ac_try) 2>&5 | |
5372 | ac_status=$? | |
5373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5374 | (exit $ac_status); }; } && | |
5375 | { ac_try='test -s conftest.$ac_objext' | |
5376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5377 | (eval $ac_try) 2>&5 | |
5378 | ac_status=$? | |
5379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5380 | (exit $ac_status); }; }; then | |
5381 | ac_hi=-1 ac_mid=-1 | |
5382 | while :; do | |
5383 | cat >conftest.$ac_ext <<_ACEOF | |
5384 | /* confdefs.h. */ | |
5385 | _ACEOF | |
5386 | cat confdefs.h >>conftest.$ac_ext | |
5387 | cat >>conftest.$ac_ext <<_ACEOF | |
5388 | /* end confdefs.h. */ | |
5389 | $ac_includes_default | |
5390 | int | |
5391 | main () | |
5392 | { | |
5393 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5394 | test_array [0] = 0 | |
5395 | ||
5396 | ; | |
5397 | return 0; | |
5398 | } | |
5399 | _ACEOF | |
5400 | rm -f conftest.$ac_objext | |
5401 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5402 | (eval $ac_compile) 2>conftest.er1 | |
5403 | ac_status=$? | |
5404 | grep -v '^ *+' conftest.er1 >conftest.err | |
5405 | rm -f conftest.er1 | |
5406 | cat conftest.err >&5 | |
5407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5408 | (exit $ac_status); } && | |
ec6c7392 PB |
5409 | { ac_try='test -z "$ac_c_werror_flag" |
5410 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5412 | (eval $ac_try) 2>&5 | |
5413 | ac_status=$? | |
5414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5415 | (exit $ac_status); }; } && | |
5416 | { ac_try='test -s conftest.$ac_objext' | |
5417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5418 | (eval $ac_try) 2>&5 | |
5419 | ac_status=$? | |
5420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5421 | (exit $ac_status); }; }; then | |
5422 | ac_lo=$ac_mid; break | |
5423 | else | |
5424 | echo "$as_me: failed program was:" >&5 | |
5425 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5426 | ||
5427 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5428 | if test $ac_mid -le $ac_hi; then | |
5429 | ac_lo= ac_hi= | |
5430 | break | |
5431 | fi | |
5432 | ac_mid=`expr 2 '*' $ac_mid` | |
5433 | fi | |
5434 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5435 | done | |
5436 | else | |
5437 | echo "$as_me: failed program was:" >&5 | |
5438 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5439 | ||
5440 | ac_lo= ac_hi= | |
5441 | fi | |
5442 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5443 | fi | |
5444 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5445 | # Binary search between lo and hi bounds. | |
5446 | while test "x$ac_lo" != "x$ac_hi"; do | |
5447 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5448 | cat >conftest.$ac_ext <<_ACEOF | |
5449 | /* confdefs.h. */ | |
5450 | _ACEOF | |
5451 | cat confdefs.h >>conftest.$ac_ext | |
5452 | cat >>conftest.$ac_ext <<_ACEOF | |
5453 | /* end confdefs.h. */ | |
5454 | $ac_includes_default | |
5455 | int | |
5456 | main () | |
5457 | { | |
5458 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5459 | test_array [0] = 0 | |
5460 | ||
5461 | ; | |
5462 | return 0; | |
5463 | } | |
5464 | _ACEOF | |
5465 | rm -f conftest.$ac_objext | |
5466 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5467 | (eval $ac_compile) 2>conftest.er1 | |
5468 | ac_status=$? | |
5469 | grep -v '^ *+' conftest.er1 >conftest.err | |
5470 | rm -f conftest.er1 | |
5471 | cat conftest.err >&5 | |
5472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5473 | (exit $ac_status); } && | |
ec6c7392 PB |
5474 | { ac_try='test -z "$ac_c_werror_flag" |
5475 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5477 | (eval $ac_try) 2>&5 | |
5478 | ac_status=$? | |
5479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5480 | (exit $ac_status); }; } && | |
5481 | { ac_try='test -s conftest.$ac_objext' | |
5482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5483 | (eval $ac_try) 2>&5 | |
5484 | ac_status=$? | |
5485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5486 | (exit $ac_status); }; }; then | |
5487 | ac_hi=$ac_mid | |
5488 | else | |
5489 | echo "$as_me: failed program was:" >&5 | |
5490 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5491 | ||
5492 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5493 | fi | |
5494 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5495 | done | |
5496 | case $ac_lo in | |
5497 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5498 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5499 | See \`config.log' for more details." >&5 | |
5500 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5501 | See \`config.log' for more details." >&2;} | |
5502 | { (exit 1); exit 1; }; } ;; | |
5503 | esac | |
5504 | else | |
5505 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5506 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5507 | See \`config.log' for more details." >&5 | |
5508 | echo "$as_me: error: cannot run test program while cross compiling | |
5509 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5510 | { (exit 1); exit 1; }; } |
5511 | else | |
5512 | cat >conftest.$ac_ext <<_ACEOF | |
5513 | /* confdefs.h. */ | |
5514 | _ACEOF | |
5515 | cat confdefs.h >>conftest.$ac_ext | |
5516 | cat >>conftest.$ac_ext <<_ACEOF | |
5517 | /* end confdefs.h. */ | |
5518 | $ac_includes_default | |
5519 | long longval () { return (long) (sizeof (long long)); } | |
5520 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5521 | #include <stdio.h> | |
5522 | #include <stdlib.h> | |
5523 | int | |
5524 | main () | |
5525 | { | |
5526 | ||
5527 | FILE *f = fopen ("conftest.val", "w"); | |
5528 | if (! f) | |
5529 | exit (1); | |
5530 | if (((long) (sizeof (long long))) < 0) | |
5531 | { | |
5532 | long i = longval (); | |
5533 | if (i != ((long) (sizeof (long long)))) | |
5534 | exit (1); | |
5535 | fprintf (f, "%ld\n", i); | |
5536 | } | |
5537 | else | |
5538 | { | |
5539 | unsigned long i = ulongval (); | |
5540 | if (i != ((long) (sizeof (long long)))) | |
5541 | exit (1); | |
5542 | fprintf (f, "%lu\n", i); | |
5543 | } | |
5544 | exit (ferror (f) || fclose (f) != 0); | |
5545 | ||
5546 | ; | |
5547 | return 0; | |
5548 | } | |
5549 | _ACEOF | |
5550 | rm -f conftest$ac_exeext | |
5551 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5552 | (eval $ac_link) 2>&5 | |
5553 | ac_status=$? | |
5554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5555 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5556 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5557 | (eval $ac_try) 2>&5 | |
5558 | ac_status=$? | |
5559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5560 | (exit $ac_status); }; }; then | |
5561 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5562 | else | |
5563 | echo "$as_me: program exited with status $ac_status" >&5 | |
5564 | echo "$as_me: failed program was:" >&5 | |
5565 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5566 | ||
5567 | ( exit $ac_status ) | |
5568 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5569 | See \`config.log' for more details." >&5 | |
5570 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5571 | See \`config.log' for more details." >&2;} | |
5572 | { (exit 1); exit 1; }; } | |
5573 | fi | |
5574 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5575 | fi | |
5576 | fi | |
5577 | rm -f conftest.val | |
5578 | else | |
5579 | ac_cv_sizeof_long_long=0 | |
5580 | fi | |
5581 | fi | |
5582 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5583 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5584 | cat >>confdefs.h <<_ACEOF | |
5585 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5586 | _ACEOF | |
5587 | ||
5588 | ||
5589 | fi | |
5ec1c5e6 KC |
5590 | |
5591 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5592 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5593 | if test "${ac_cv_type___int64+set}" = set; then | |
5594 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5595 | else | |
5596 | cat >conftest.$ac_ext <<_ACEOF | |
5597 | /* confdefs.h. */ | |
5598 | _ACEOF | |
5599 | cat confdefs.h >>conftest.$ac_ext | |
5600 | cat >>conftest.$ac_ext <<_ACEOF | |
5601 | /* end confdefs.h. */ | |
5602 | $ac_includes_default | |
5603 | int | |
5604 | main () | |
5605 | { | |
5606 | if ((__int64 *) 0) | |
5607 | return 0; | |
5608 | if (sizeof (__int64)) | |
5609 | return 0; | |
5610 | ; | |
5611 | return 0; | |
5612 | } | |
5613 | _ACEOF | |
5614 | rm -f conftest.$ac_objext | |
5615 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5616 | (eval $ac_compile) 2>conftest.er1 | |
5617 | ac_status=$? | |
5618 | grep -v '^ *+' conftest.er1 >conftest.err | |
5619 | rm -f conftest.er1 | |
5620 | cat conftest.err >&5 | |
5621 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5622 | (exit $ac_status); } && | |
ec6c7392 PB |
5623 | { ac_try='test -z "$ac_c_werror_flag" |
5624 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5625 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5626 | (eval $ac_try) 2>&5 | |
5627 | ac_status=$? | |
5628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5629 | (exit $ac_status); }; } && | |
5630 | { ac_try='test -s conftest.$ac_objext' | |
5631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5632 | (eval $ac_try) 2>&5 | |
5633 | ac_status=$? | |
5634 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5635 | (exit $ac_status); }; }; then | |
5636 | ac_cv_type___int64=yes | |
5637 | else | |
5638 | echo "$as_me: failed program was:" >&5 | |
5639 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5640 | ||
5641 | ac_cv_type___int64=no | |
5642 | fi | |
5643 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5644 | fi | |
5645 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5646 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5647 | if test $ac_cv_type___int64 = yes; then | |
5648 | ||
5649 | cat >>confdefs.h <<_ACEOF | |
5650 | #define HAVE___INT64 1 | |
5651 | _ACEOF | |
5652 | ||
5653 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5654 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5655 | if test "${ac_cv_type___int64+set}" = set; then | |
5656 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5657 | else | |
ba479fd2 | 5658 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5659 | /* confdefs.h. */ |
5660 | _ACEOF | |
5661 | cat confdefs.h >>conftest.$ac_ext | |
5662 | cat >>conftest.$ac_ext <<_ACEOF | |
5663 | /* end confdefs.h. */ | |
bf3b7cd3 | 5664 | $ac_includes_default |
ba479fd2 NN |
5665 | int |
5666 | main () | |
5667 | { | |
bf3b7cd3 JD |
5668 | if ((__int64 *) 0) |
5669 | return 0; | |
5670 | if (sizeof (__int64)) | |
5671 | return 0; | |
ba479fd2 NN |
5672 | ; |
5673 | return 0; | |
5674 | } | |
5675 | _ACEOF | |
5676 | rm -f conftest.$ac_objext | |
5677 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5678 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5679 | ac_status=$? |
86da66b5 HPN |
5680 | grep -v '^ *+' conftest.er1 >conftest.err |
5681 | rm -f conftest.er1 | |
5682 | cat conftest.err >&5 | |
ba479fd2 NN |
5683 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5684 | (exit $ac_status); } && | |
ec6c7392 PB |
5685 | { ac_try='test -z "$ac_c_werror_flag" |
5686 | || test ! -s conftest.err' | |
86da66b5 HPN |
5687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5688 | (eval $ac_try) 2>&5 | |
5689 | ac_status=$? | |
5690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5691 | (exit $ac_status); }; } && | |
5692 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5693 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5694 | (eval $ac_try) 2>&5 | |
5695 | ac_status=$? | |
5696 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5697 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5698 | ac_cv_type___int64=yes |
75b6f3fd | 5699 | else |
ba479fd2 NN |
5700 | echo "$as_me: failed program was:" >&5 |
5701 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5702 | ||
bf3b7cd3 | 5703 | ac_cv_type___int64=no |
75b6f3fd | 5704 | fi |
86da66b5 | 5705 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5706 | fi |
bf3b7cd3 JD |
5707 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5708 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5709 | |
bf3b7cd3 JD |
5710 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5711 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5712 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5713 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5714 | else |
bf3b7cd3 JD |
5715 | if test "$ac_cv_type___int64" = yes; then |
5716 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5717 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5718 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5719 | # This bug is HP SR number 8606223364. | |
5720 | if test "$cross_compiling" = yes; then | |
5721 | # Depending upon the size, compute the lo and hi bounds. | |
5722 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5723 | /* confdefs.h. */ |
5724 | _ACEOF | |
5725 | cat confdefs.h >>conftest.$ac_ext | |
5726 | cat >>conftest.$ac_ext <<_ACEOF | |
5727 | /* end confdefs.h. */ | |
bf3b7cd3 | 5728 | $ac_includes_default |
ba479fd2 NN |
5729 | int |
5730 | main () | |
5731 | { | |
bf3b7cd3 JD |
5732 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5733 | test_array [0] = 0 | |
5734 | ||
ba479fd2 NN |
5735 | ; |
5736 | return 0; | |
5737 | } | |
5738 | _ACEOF | |
5739 | rm -f conftest.$ac_objext | |
5740 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5741 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5742 | ac_status=$? |
86da66b5 HPN |
5743 | grep -v '^ *+' conftest.er1 >conftest.err |
5744 | rm -f conftest.er1 | |
5745 | cat conftest.err >&5 | |
ba479fd2 NN |
5746 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5747 | (exit $ac_status); } && | |
ec6c7392 PB |
5748 | { ac_try='test -z "$ac_c_werror_flag" |
5749 | || test ! -s conftest.err' | |
86da66b5 HPN |
5750 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5751 | (eval $ac_try) 2>&5 | |
5752 | ac_status=$? | |
5753 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5754 | (exit $ac_status); }; } && | |
5755 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5756 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5757 | (eval $ac_try) 2>&5 | |
5758 | ac_status=$? | |
5759 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5760 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5761 | ac_lo=0 ac_mid=0 |
5762 | while :; do | |
5763 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5764 | /* confdefs.h. */ |
5765 | _ACEOF | |
5766 | cat confdefs.h >>conftest.$ac_ext | |
5767 | cat >>conftest.$ac_ext <<_ACEOF | |
5768 | /* end confdefs.h. */ | |
bf3b7cd3 | 5769 | $ac_includes_default |
ba479fd2 NN |
5770 | int |
5771 | main () | |
5772 | { | |
bf3b7cd3 JD |
5773 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5774 | test_array [0] = 0 | |
5775 | ||
ba479fd2 NN |
5776 | ; |
5777 | return 0; | |
5778 | } | |
5779 | _ACEOF | |
5780 | rm -f conftest.$ac_objext | |
5781 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5782 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5783 | ac_status=$? |
86da66b5 HPN |
5784 | grep -v '^ *+' conftest.er1 >conftest.err |
5785 | rm -f conftest.er1 | |
5786 | cat conftest.err >&5 | |
ba479fd2 NN |
5787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5788 | (exit $ac_status); } && | |
ec6c7392 PB |
5789 | { ac_try='test -z "$ac_c_werror_flag" |
5790 | || test ! -s conftest.err' | |
86da66b5 HPN |
5791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5792 | (eval $ac_try) 2>&5 | |
5793 | ac_status=$? | |
5794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5795 | (exit $ac_status); }; } && | |
5796 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5797 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5798 | (eval $ac_try) 2>&5 | |
5799 | ac_status=$? | |
5800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5801 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5802 | ac_hi=$ac_mid; break |
75e93faa | 5803 | else |
ba479fd2 NN |
5804 | echo "$as_me: failed program was:" >&5 |
5805 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5806 | ||
bf3b7cd3 JD |
5807 | ac_lo=`expr $ac_mid + 1` |
5808 | if test $ac_lo -le $ac_mid; then | |
5809 | ac_lo= ac_hi= | |
5810 | break | |
5811 | fi | |
5812 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5813 | fi |
86da66b5 | 5814 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5815 | done |
75e93faa | 5816 | else |
bf3b7cd3 JD |
5817 | echo "$as_me: failed program was:" >&5 |
5818 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5819 | ||
5820 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5821 | /* confdefs.h. */ |
5822 | _ACEOF | |
5823 | cat confdefs.h >>conftest.$ac_ext | |
5824 | cat >>conftest.$ac_ext <<_ACEOF | |
5825 | /* end confdefs.h. */ | |
bf3b7cd3 | 5826 | $ac_includes_default |
ba479fd2 NN |
5827 | int |
5828 | main () | |
5829 | { | |
bf3b7cd3 JD |
5830 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5831 | test_array [0] = 0 | |
5832 | ||
ba479fd2 NN |
5833 | ; |
5834 | return 0; | |
5835 | } | |
5836 | _ACEOF | |
5837 | rm -f conftest.$ac_objext | |
5838 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5839 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5840 | ac_status=$? |
86da66b5 HPN |
5841 | grep -v '^ *+' conftest.er1 >conftest.err |
5842 | rm -f conftest.er1 | |
5843 | cat conftest.err >&5 | |
ba479fd2 NN |
5844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5845 | (exit $ac_status); } && | |
ec6c7392 PB |
5846 | { ac_try='test -z "$ac_c_werror_flag" |
5847 | || test ! -s conftest.err' | |
86da66b5 HPN |
5848 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5849 | (eval $ac_try) 2>&5 | |
5850 | ac_status=$? | |
5851 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5852 | (exit $ac_status); }; } && | |
5853 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5854 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5855 | (eval $ac_try) 2>&5 | |
5856 | ac_status=$? | |
5857 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5858 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5859 | ac_hi=-1 ac_mid=-1 |
5860 | while :; do | |
5861 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5862 | /* confdefs.h. */ |
5863 | _ACEOF | |
5864 | cat confdefs.h >>conftest.$ac_ext | |
5865 | cat >>conftest.$ac_ext <<_ACEOF | |
5866 | /* end confdefs.h. */ | |
bf3b7cd3 | 5867 | $ac_includes_default |
ba479fd2 NN |
5868 | int |
5869 | main () | |
5870 | { | |
bf3b7cd3 JD |
5871 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5872 | test_array [0] = 0 | |
5873 | ||
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 | |
86da66b5 | 5880 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5881 | ac_status=$? |
86da66b5 HPN |
5882 | grep -v '^ *+' conftest.er1 >conftest.err |
5883 | rm -f conftest.er1 | |
5884 | cat conftest.err >&5 | |
ba479fd2 NN |
5885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5886 | (exit $ac_status); } && | |
ec6c7392 PB |
5887 | { ac_try='test -z "$ac_c_werror_flag" |
5888 | || test ! -s conftest.err' | |
86da66b5 HPN |
5889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5890 | (eval $ac_try) 2>&5 | |
5891 | ac_status=$? | |
5892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5893 | (exit $ac_status); }; } && | |
5894 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5895 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5896 | (eval $ac_try) 2>&5 | |
5897 | ac_status=$? | |
5898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5899 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5900 | ac_lo=$ac_mid; break |
04cabffc | 5901 | else |
ba479fd2 NN |
5902 | echo "$as_me: failed program was:" >&5 |
5903 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5904 | ||
bf3b7cd3 JD |
5905 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5906 | if test $ac_mid -le $ac_hi; then | |
5907 | ac_lo= ac_hi= | |
5908 | break | |
5909 | fi | |
5910 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5911 | fi |
86da66b5 | 5912 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5913 | done |
5914 | else | |
5915 | echo "$as_me: failed program was:" >&5 | |
5916 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5917 | |
bf3b7cd3 | 5918 | ac_lo= ac_hi= |
414d23ae | 5919 | fi |
bf3b7cd3 | 5920 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5921 | fi |
bf3b7cd3 JD |
5922 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5923 | # Binary search between lo and hi bounds. | |
5924 | while test "x$ac_lo" != "x$ac_hi"; do | |
5925 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5926 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5927 | /* confdefs.h. */ |
5928 | _ACEOF | |
5929 | cat confdefs.h >>conftest.$ac_ext | |
5930 | cat >>conftest.$ac_ext <<_ACEOF | |
5931 | /* end confdefs.h. */ | |
bf3b7cd3 | 5932 | $ac_includes_default |
ba479fd2 NN |
5933 | int |
5934 | main () | |
5935 | { | |
bf3b7cd3 JD |
5936 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5937 | test_array [0] = 0 | |
5938 | ||
ba479fd2 NN |
5939 | ; |
5940 | return 0; | |
5941 | } | |
5942 | _ACEOF | |
5943 | rm -f conftest.$ac_objext | |
5944 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5945 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5946 | ac_status=$? |
86da66b5 HPN |
5947 | grep -v '^ *+' conftest.er1 >conftest.err |
5948 | rm -f conftest.er1 | |
5949 | cat conftest.err >&5 | |
ba479fd2 NN |
5950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5951 | (exit $ac_status); } && | |
ec6c7392 PB |
5952 | { ac_try='test -z "$ac_c_werror_flag" |
5953 | || test ! -s conftest.err' | |
86da66b5 HPN |
5954 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5955 | (eval $ac_try) 2>&5 | |
5956 | ac_status=$? | |
5957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5958 | (exit $ac_status); }; } && | |
5959 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5960 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5961 | (eval $ac_try) 2>&5 | |
5962 | ac_status=$? | |
5963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5964 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5965 | ac_hi=$ac_mid |
75e93faa | 5966 | else |
ba479fd2 NN |
5967 | echo "$as_me: failed program was:" >&5 |
5968 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5969 | ||
bf3b7cd3 | 5970 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5971 | fi |
86da66b5 | 5972 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5973 | done |
bf3b7cd3 JD |
5974 | case $ac_lo in |
5975 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5976 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5977 | See \`config.log' for more details." >&5 | |
5978 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5979 | See \`config.log' for more details." >&2;} | |
5980 | { (exit 1); exit 1; }; } ;; | |
5981 | esac | |
5982 | else | |
5983 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5984 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5985 | See \`config.log' for more details." >&5 | |
5986 | echo "$as_me: error: cannot run test program while cross compiling | |
5987 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5988 | { (exit 1); exit 1; }; } |
5989 | else | |
5990 | cat >conftest.$ac_ext <<_ACEOF | |
5991 | /* confdefs.h. */ | |
5992 | _ACEOF | |
5993 | cat confdefs.h >>conftest.$ac_ext | |
5994 | cat >>conftest.$ac_ext <<_ACEOF | |
5995 | /* end confdefs.h. */ | |
5996 | $ac_includes_default | |
5997 | long longval () { return (long) (sizeof (__int64)); } | |
5998 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
5999 | #include <stdio.h> | |
6000 | #include <stdlib.h> | |
6001 | int | |
6002 | main () | |
6003 | { | |
414d23ae | 6004 | |
bf3b7cd3 JD |
6005 | FILE *f = fopen ("conftest.val", "w"); |
6006 | if (! f) | |
6007 | exit (1); | |
6008 | if (((long) (sizeof (__int64))) < 0) | |
6009 | { | |
6010 | long i = longval (); | |
6011 | if (i != ((long) (sizeof (__int64)))) | |
6012 | exit (1); | |
6013 | fprintf (f, "%ld\n", i); | |
6014 | } | |
6015 | else | |
6016 | { | |
6017 | unsigned long i = ulongval (); | |
6018 | if (i != ((long) (sizeof (__int64)))) | |
6019 | exit (1); | |
6020 | fprintf (f, "%lu\n", i); | |
6021 | } | |
6022 | exit (ferror (f) || fclose (f) != 0); | |
6023 | ||
6024 | ; | |
6025 | return 0; | |
6026 | } | |
6027 | _ACEOF | |
6028 | rm -f conftest$ac_exeext | |
6029 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6030 | (eval $ac_link) 2>&5 | |
6031 | ac_status=$? | |
6032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6033 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6034 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6035 | (eval $ac_try) 2>&5 | |
6036 | ac_status=$? | |
6037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6038 | (exit $ac_status); }; }; then | |
6039 | ac_cv_sizeof___int64=`cat conftest.val` | |
6040 | else | |
6041 | echo "$as_me: program exited with status $ac_status" >&5 | |
6042 | echo "$as_me: failed program was:" >&5 | |
6043 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6044 | |
bf3b7cd3 JD |
6045 | ( exit $ac_status ) |
6046 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
6047 | See \`config.log' for more details." >&5 | |
6048 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
6049 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 6050 | { (exit 1); exit 1; }; } |
414d23ae | 6051 | fi |
bf3b7cd3 JD |
6052 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6053 | fi | |
6054 | fi | |
6055 | rm -f conftest.val | |
6056 | else | |
6057 | ac_cv_sizeof___int64=0 | |
6058 | fi | |
6059 | fi | |
ba479fd2 NN |
6060 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6061 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6062 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6063 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6064 | _ACEOF |
414d23ae | 6065 | |
cafe096b | 6066 | |
414d23ae HPN |
6067 | fi |
6068 | ||
5ec1c5e6 | 6069 | |
34a86c2b NN |
6070 | # --------------------- |
6071 | # Warnings and checking | |
6072 | # --------------------- | |
6073 | ||
b5472e1d NN |
6074 | # Check $CC warning features (if it's GCC). |
6075 | # We want to use -pedantic, but we don't want warnings about | |
6076 | # * 'long long' | |
6077 | # * variadic macros | |
89a42ac8 | 6078 | # * overlong strings |
b5472e1d NN |
6079 | # So, we only use -pedantic if we can disable those warnings. |
6080 | ||
6081 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6082 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6083 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6084 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6085 | else | |
6086 | save_CFLAGS="$CFLAGS" | |
6087 | CFLAGS="-Wno-long-long" | |
6088 | cat >conftest.$ac_ext <<_ACEOF | |
6089 | /* confdefs.h. */ | |
6090 | _ACEOF | |
6091 | cat confdefs.h >>conftest.$ac_ext | |
6092 | cat >>conftest.$ac_ext <<_ACEOF | |
6093 | /* end confdefs.h. */ | |
6094 | ||
6095 | _ACEOF | |
6096 | rm -f conftest.$ac_objext | |
6097 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6098 | (eval $ac_compile) 2>conftest.er1 | |
6099 | ac_status=$? | |
6100 | grep -v '^ *+' conftest.er1 >conftest.err | |
6101 | rm -f conftest.er1 | |
6102 | cat conftest.err >&5 | |
6103 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6104 | (exit $ac_status); } && | |
ec6c7392 PB |
6105 | { ac_try='test -z "$ac_c_werror_flag" |
6106 | || test ! -s conftest.err' | |
b5472e1d NN |
6107 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6108 | (eval $ac_try) 2>&5 | |
6109 | ac_status=$? | |
6110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6111 | (exit $ac_status); }; } && | |
6112 | { ac_try='test -s conftest.$ac_objext' | |
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 | |
6118 | ac_cv_prog_cc_w_no_long_long=yes | |
6119 | else | |
6120 | echo "$as_me: failed program was:" >&5 | |
6121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6122 | ||
6123 | ac_cv_prog_cc_w_no_long_long=no | |
6124 | fi | |
6125 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6126 | CFLAGS="$save_CFLAGS" | |
6127 | ||
6128 | fi | |
6129 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6130 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6131 | ||
6132 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6133 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6134 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6135 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6136 | else | |
6137 | save_CFLAGS="$CFLAGS" | |
6138 | CFLAGS="-Wno-variadic-macros" | |
6139 | cat >conftest.$ac_ext <<_ACEOF | |
6140 | /* confdefs.h. */ | |
6141 | _ACEOF | |
6142 | cat confdefs.h >>conftest.$ac_ext | |
6143 | cat >>conftest.$ac_ext <<_ACEOF | |
6144 | /* end confdefs.h. */ | |
6145 | ||
6146 | _ACEOF | |
6147 | rm -f conftest.$ac_objext | |
6148 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6149 | (eval $ac_compile) 2>conftest.er1 | |
6150 | ac_status=$? | |
6151 | grep -v '^ *+' conftest.er1 >conftest.err | |
6152 | rm -f conftest.er1 | |
6153 | cat conftest.err >&5 | |
6154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6155 | (exit $ac_status); } && | |
ec6c7392 PB |
6156 | { ac_try='test -z "$ac_c_werror_flag" |
6157 | || test ! -s conftest.err' | |
b5472e1d NN |
6158 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6159 | (eval $ac_try) 2>&5 | |
6160 | ac_status=$? | |
6161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6162 | (exit $ac_status); }; } && | |
6163 | { ac_try='test -s conftest.$ac_objext' | |
6164 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6165 | (eval $ac_try) 2>&5 | |
6166 | ac_status=$? | |
6167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6168 | (exit $ac_status); }; }; then | |
6169 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6170 | else | |
6171 | echo "$as_me: failed program was:" >&5 | |
6172 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6173 | ||
6174 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6175 | fi | |
6176 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6177 | CFLAGS="$save_CFLAGS" | |
6178 | ||
6179 | fi | |
6180 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6181 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6182 | ||
89a42ac8 ZW |
6183 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 |
6184 | echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 | |
6185 | if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then | |
6186 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6187 | else | |
6188 | save_CFLAGS="$CFLAGS" | |
6189 | CFLAGS="-Wno-overlength-strings" | |
6190 | cat >conftest.$ac_ext <<_ACEOF | |
6191 | /* confdefs.h. */ | |
6192 | _ACEOF | |
6193 | cat confdefs.h >>conftest.$ac_ext | |
6194 | cat >>conftest.$ac_ext <<_ACEOF | |
6195 | /* end confdefs.h. */ | |
6196 | ||
6197 | _ACEOF | |
6198 | rm -f conftest.$ac_objext | |
6199 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6200 | (eval $ac_compile) 2>conftest.er1 | |
6201 | ac_status=$? | |
6202 | grep -v '^ *+' conftest.er1 >conftest.err | |
6203 | rm -f conftest.er1 | |
6204 | cat conftest.err >&5 | |
6205 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6206 | (exit $ac_status); } && | |
ec6c7392 PB |
6207 | { ac_try='test -z "$ac_c_werror_flag" |
6208 | || test ! -s conftest.err' | |
89a42ac8 ZW |
6209 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6210 | (eval $ac_try) 2>&5 | |
6211 | ac_status=$? | |
6212 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6213 | (exit $ac_status); }; } && | |
6214 | { ac_try='test -s conftest.$ac_objext' | |
6215 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6216 | (eval $ac_try) 2>&5 | |
6217 | ac_status=$? | |
6218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6219 | (exit $ac_status); }; }; then | |
6220 | ac_cv_prog_cc_w_no_overlength_strings=yes | |
6221 | else | |
6222 | echo "$as_me: failed program was:" >&5 | |
6223 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6224 | ||
6225 | ac_cv_prog_cc_w_no_overlength_strings=no | |
6226 | fi | |
6227 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6228 | CFLAGS="$save_CFLAGS" | |
6229 | ||
6230 | fi | |
6231 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 | |
6232 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 | |
6233 | ||
34a86c2b | 6234 | strict1_warn= |
b5472e1d | 6235 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
89a42ac8 ZW |
6236 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ |
6237 | && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then | |
6238 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
34a86c2b NN |
6239 | fi |
6240 | ||
643d3bd2 NN |
6241 | # Add -Wold-style-definition if it's accepted |
6242 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6243 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6244 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6245 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6246 | else | |
6247 | save_CFLAGS="$CFLAGS" | |
6248 | CFLAGS="-Wold-style-definition" | |
6249 | cat >conftest.$ac_ext <<_ACEOF | |
6250 | /* confdefs.h. */ | |
6251 | _ACEOF | |
6252 | cat confdefs.h >>conftest.$ac_ext | |
6253 | cat >>conftest.$ac_ext <<_ACEOF | |
6254 | /* end confdefs.h. */ | |
6255 | ||
6256 | _ACEOF | |
6257 | rm -f conftest.$ac_objext | |
6258 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6259 | (eval $ac_compile) 2>conftest.er1 | |
6260 | ac_status=$? | |
6261 | grep -v '^ *+' conftest.er1 >conftest.err | |
6262 | rm -f conftest.er1 | |
6263 | cat conftest.err >&5 | |
6264 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6265 | (exit $ac_status); } && | |
ec6c7392 PB |
6266 | { ac_try='test -z "$ac_c_werror_flag" |
6267 | || test ! -s conftest.err' | |
643d3bd2 NN |
6268 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6269 | (eval $ac_try) 2>&5 | |
6270 | ac_status=$? | |
6271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6272 | (exit $ac_status); }; } && | |
6273 | { ac_try='test -s conftest.$ac_objext' | |
6274 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6275 | (eval $ac_try) 2>&5 | |
6276 | ac_status=$? | |
6277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6278 | (exit $ac_status); }; }; then | |
6279 | ac_cv_prog_cc_w_old_style_definition=yes | |
6280 | else | |
6281 | echo "$as_me: failed program was:" >&5 | |
6282 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6283 | ||
6284 | ac_cv_prog_cc_w_old_style_definition=no | |
6285 | fi | |
6286 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6287 | CFLAGS="$save_CFLAGS" | |
6288 | ||
6289 | fi | |
6290 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6291 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6292 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6293 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6294 | fi | |
6295 | ||
ac0f3f39 KG |
6296 | # Add -Wmissing-format-attribute if it's accepted |
6297 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6298 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6299 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6300 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6301 | else | |
6302 | save_CFLAGS="$CFLAGS" | |
6303 | CFLAGS="-Wmissing-format-attribute" | |
6304 | cat >conftest.$ac_ext <<_ACEOF | |
6305 | /* confdefs.h. */ | |
6306 | _ACEOF | |
6307 | cat confdefs.h >>conftest.$ac_ext | |
6308 | cat >>conftest.$ac_ext <<_ACEOF | |
6309 | /* end confdefs.h. */ | |
6310 | ||
6311 | _ACEOF | |
6312 | rm -f conftest.$ac_objext | |
6313 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6314 | (eval $ac_compile) 2>conftest.er1 | |
6315 | ac_status=$? | |
6316 | grep -v '^ *+' conftest.er1 >conftest.err | |
6317 | rm -f conftest.er1 | |
6318 | cat conftest.err >&5 | |
6319 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6320 | (exit $ac_status); } && | |
ec6c7392 PB |
6321 | { ac_try='test -z "$ac_c_werror_flag" |
6322 | || test ! -s conftest.err' | |
ac0f3f39 KG |
6323 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6324 | (eval $ac_try) 2>&5 | |
6325 | ac_status=$? | |
6326 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6327 | (exit $ac_status); }; } && | |
6328 | { ac_try='test -s conftest.$ac_objext' | |
6329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6330 | (eval $ac_try) 2>&5 | |
6331 | ac_status=$? | |
6332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6333 | (exit $ac_status); }; }; then | |
6334 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6335 | else | |
6336 | echo "$as_me: failed program was:" >&5 | |
6337 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6338 | ||
6339 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6340 | fi | |
6341 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6342 | CFLAGS="$save_CFLAGS" | |
6343 | ||
6344 | fi | |
6345 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6346 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6347 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6348 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6349 | fi | |
6350 | ||
09a9c095 NN |
6351 | # Enable -Werror, period. |
6352 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6353 | if test "${enable_werror_always+set}" = set; then | |
6354 | enableval="$enable_werror_always" | |
6355 | ||
6356 | else | |
6357 | enable_werror_always=no | |
6358 | fi; | |
6359 | if test x${enable_werror_always} = xyes ; then | |
6360 | strict1_warn="${strict1_warn} -Werror" | |
6361 | WERROR=-Werror | |
6362 | fi | |
6363 | ||
ac0f3f39 KG |
6364 | |
6365 | ||
373477bb GDR |
6366 | # Get C++ compatibility warning flag, if supported. |
6367 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 | |
6368 | echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 | |
6369 | if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then | |
6370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6371 | else | |
6372 | save_CFLAGS="$CFLAGS" | |
6373 | CFLAGS="-Wc++-compat" | |
6374 | cat >conftest.$ac_ext <<_ACEOF | |
6375 | /* confdefs.h. */ | |
6376 | _ACEOF | |
6377 | cat confdefs.h >>conftest.$ac_ext | |
6378 | cat >>conftest.$ac_ext <<_ACEOF | |
6379 | /* end confdefs.h. */ | |
6380 | ||
6381 | _ACEOF | |
6382 | rm -f conftest.$ac_objext | |
6383 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6384 | (eval $ac_compile) 2>conftest.er1 | |
6385 | ac_status=$? | |
6386 | grep -v '^ *+' conftest.er1 >conftest.err | |
6387 | rm -f conftest.er1 | |
6388 | cat conftest.err >&5 | |
6389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6390 | (exit $ac_status); } && | |
ec6c7392 PB |
6391 | { ac_try='test -z "$ac_c_werror_flag" |
6392 | || test ! -s conftest.err' | |
373477bb GDR |
6393 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6394 | (eval $ac_try) 2>&5 | |
6395 | ac_status=$? | |
6396 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6397 | (exit $ac_status); }; } && | |
6398 | { ac_try='test -s conftest.$ac_objext' | |
6399 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6400 | (eval $ac_try) 2>&5 | |
6401 | ac_status=$? | |
6402 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6403 | (exit $ac_status); }; }; then | |
6404 | ac_cv_prog_cc_w_cxx_compat=yes | |
6405 | else | |
6406 | echo "$as_me: failed program was:" >&5 | |
6407 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6408 | ||
6409 | ac_cv_prog_cc_w_cxx_compat=no | |
6410 | fi | |
6411 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6412 | CFLAGS="$save_CFLAGS" | |
6413 | ||
6414 | fi | |
6415 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 | |
6416 | echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6 | |
6417 | if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then | |
6418 | cxx_compat_warn="-Wc++-compat" | |
6419 | fi | |
6420 | ||
6421 | ||
6422 | ||
ba479fd2 | 6423 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6424 | # That's useful for people building cross-compilers, or just running a |
6425 | # quick `make'. | |
6426 | warn_cflags= | |
6427 | if test "x$GCC" = "xyes"; then | |
6428 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6429 | fi | |
6430 | ||
6431 | ||
dd859b8a | 6432 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6433 | is_release= |
6434 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6435 | is_release=yes | |
6436 | fi | |
dd859b8a KG |
6437 | # Check whether --enable-werror or --disable-werror was given. |
6438 | if test "${enable_werror+set}" = set; then | |
6439 | enableval="$enable_werror" | |
ba479fd2 | 6440 | |
dd859b8a | 6441 | else |
06c37c96 NS |
6442 | if test x$is_release = x ; then |
6443 | # Default to "yes" on development branches. | |
dd859b8a | 6444 | enable_werror=yes |
06c37c96 NS |
6445 | else |
6446 | # Default to "no" on release branches. | |
6447 | enable_werror=no | |
6448 | fi | |
ba479fd2 | 6449 | fi; |
dd859b8a KG |
6450 | if test x$enable_werror = xyes ; then |
6451 | WERROR=-Werror | |
6452 | fi | |
6453 | ||
6454 | ||
414d23ae HPN |
6455 | # Enable expensive internal checks |
6456 | # Check whether --enable-checking or --disable-checking was given. | |
6457 | if test "${enable_checking+set}" = set; then | |
6458 | enableval="$enable_checking" | |
e1bbfc5c NS |
6459 | ac_checking_flags="${enableval}" |
6460 | else | |
6461 | ||
6462 | # Determine the default checks. | |
6463 | if test x$is_release = x ; then | |
6464 | ac_checking_flags=yes | |
6465 | else | |
6466 | ac_checking_flags=release | |
6467 | fi | |
6468 | fi; | |
6469 | ac_assert_checking=1 | |
6470 | ac_checking= | |
cdce5c16 NS |
6471 | ac_fold_checking= |
6472 | ac_gc_checking= | |
6473 | ac_gc_always_collect= | |
414d23ae HPN |
6474 | ac_rtl_checking= |
6475 | ac_rtlflag_checking= | |
b53ef395 | 6476 | ac_runtime_checking=1 |
cdce5c16 NS |
6477 | ac_tree_checking= |
6478 | ac_valgrind_checking= | |
e1bbfc5c NS |
6479 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6480 | for check in $ac_checking_flags | |
6481 | do | |
6482 | case $check in | |
cdce5c16 | 6483 | # these set all the flags to specific states |
e1bbfc5c | 6484 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6485 | ac_fold_checking= ; ac_gc_checking=1 ; |
6486 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6487 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6488 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6489 | no|none) ac_assert_checking= ; ac_checking= ; | |
6490 | ac_fold_checking= ; ac_gc_checking= ; | |
6491 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6492 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6493 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6494 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6495 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6496 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6497 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6498 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6499 | release) ac_assert_checking=1 ; ac_checking= ; | |
6500 | ac_fold_checking= ; ac_gc_checking= ; | |
6501 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6502 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6503 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6504 | # these enable particular checks | |
e1bbfc5c NS |
6505 | assert) ac_assert_checking=1 ;; |
6506 | fold) ac_fold_checking=1 ;; | |
6507 | gc) ac_gc_checking=1 ;; | |
6508 | gcac) ac_gc_always_collect=1 ;; | |
6509 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6510 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6511 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6512 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6513 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6514 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6515 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6516 | echo "$as_me: error: unknown check category $check" >&2;} |
6517 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6518 | esac |
6519 | done | |
6520 | IFS="$ac_save_IFS" | |
06c37c96 | 6521 | |
ba479fd2 NN |
6522 | nocommon_flag="" |
6523 | if test x$ac_checking != x ; then | |
6524 | ||
6525 | cat >>confdefs.h <<\_ACEOF | |
6526 | #define ENABLE_CHECKING 1 | |
6527 | _ACEOF | |
6528 | ||
6529 | nocommon_flag=-fno-common | |
6530 | fi | |
6531 | ||
06c37c96 NS |
6532 | if test x$ac_assert_checking != x ; then |
6533 | ||
6534 | cat >>confdefs.h <<\_ACEOF | |
6535 | #define ENABLE_ASSERT_CHECKING 1 | |
6536 | _ACEOF | |
6537 | ||
b53ef395 | 6538 | fi |
232b67d9 | 6539 | |
b53ef395 NS |
6540 | if test x$ac_runtime_checking != x ; then |
6541 | ||
6542 | cat >>confdefs.h <<\_ACEOF | |
6543 | #define ENABLE_RUNTIME_CHECKING 1 | |
6544 | _ACEOF | |
6545 | ||
06c37c96 | 6546 | fi |
ba479fd2 NN |
6547 | if test x$ac_tree_checking != x ; then |
6548 | ||
6549 | cat >>confdefs.h <<\_ACEOF | |
6550 | #define ENABLE_TREE_CHECKING 1 | |
6551 | _ACEOF | |
6552 | ||
13f05fd0 | 6553 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6554 | fi |
13f05fd0 | 6555 | |
ba479fd2 NN |
6556 | if test x$ac_rtl_checking != x ; then |
6557 | ||
6558 | cat >>confdefs.h <<\_ACEOF | |
6559 | #define ENABLE_RTL_CHECKING 1 | |
6560 | _ACEOF | |
6561 | ||
6562 | fi | |
6563 | if test x$ac_rtlflag_checking != x ; then | |
6564 | ||
6565 | cat >>confdefs.h <<\_ACEOF | |
6566 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6567 | _ACEOF | |
6568 | ||
6569 | fi | |
6570 | if test x$ac_gc_checking != x ; then | |
6571 | ||
6572 | cat >>confdefs.h <<\_ACEOF | |
6573 | #define ENABLE_GC_CHECKING 1 | |
6574 | _ACEOF | |
6575 | ||
6576 | fi | |
6577 | if test x$ac_gc_always_collect != x ; then | |
6578 | ||
6579 | cat >>confdefs.h <<\_ACEOF | |
6580 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6581 | _ACEOF | |
6582 | ||
6583 | fi | |
6584 | if test x$ac_fold_checking != x ; then | |
6585 | ||
6586 | cat >>confdefs.h <<\_ACEOF | |
6587 | #define ENABLE_FOLD_CHECKING 1 | |
6588 | _ACEOF | |
6589 | ||
6590 | fi | |
6591 | valgrind_path_defines= | |
6592 | valgrind_command= | |
6593 | ||
ba479fd2 NN |
6594 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6595 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6596 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6597 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6598 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6599 | fi | |
6600 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6601 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6602 | else | |
6603 | # Is the header compilable? | |
6604 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6605 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6606 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6607 | /* confdefs.h. */ |
6608 | _ACEOF | |
6609 | cat confdefs.h >>conftest.$ac_ext | |
6610 | cat >>conftest.$ac_ext <<_ACEOF | |
6611 | /* end confdefs.h. */ | |
6612 | $ac_includes_default | |
63cf211a | 6613 | #include <valgrind.h> |
ba479fd2 NN |
6614 | _ACEOF |
6615 | rm -f conftest.$ac_objext | |
6616 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6617 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6618 | ac_status=$? |
86da66b5 HPN |
6619 | grep -v '^ *+' conftest.er1 >conftest.err |
6620 | rm -f conftest.er1 | |
6621 | cat conftest.err >&5 | |
ba479fd2 NN |
6622 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6623 | (exit $ac_status); } && | |
ec6c7392 PB |
6624 | { ac_try='test -z "$ac_c_werror_flag" |
6625 | || test ! -s conftest.err' | |
86da66b5 HPN |
6626 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6627 | (eval $ac_try) 2>&5 | |
6628 | ac_status=$? | |
6629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6630 | (exit $ac_status); }; } && | |
6631 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6632 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6633 | (eval $ac_try) 2>&5 | |
6634 | ac_status=$? | |
6635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6636 | (exit $ac_status); }; }; then | |
6637 | ac_header_compiler=yes | |
6638 | else | |
6639 | echo "$as_me: failed program was:" >&5 | |
6640 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6641 | ||
6642 | ac_header_compiler=no | |
6643 | fi | |
86da66b5 | 6644 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6645 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6646 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6647 | ||
6648 | # Is the header present? | |
6649 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6650 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6651 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6652 | /* confdefs.h. */ |
6653 | _ACEOF | |
6654 | cat confdefs.h >>conftest.$ac_ext | |
6655 | cat >>conftest.$ac_ext <<_ACEOF | |
6656 | /* end confdefs.h. */ | |
6657 | #include <valgrind.h> | |
6658 | _ACEOF | |
6659 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6660 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6661 | ac_status=$? | |
6662 | grep -v '^ *+' conftest.er1 >conftest.err | |
6663 | rm -f conftest.er1 | |
6664 | cat conftest.err >&5 | |
6665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6666 | (exit $ac_status); } >/dev/null; then | |
6667 | if test -s conftest.err; then | |
6668 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6669 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6670 | else |
6671 | ac_cpp_err= | |
6672 | fi | |
6673 | else | |
6674 | ac_cpp_err=yes | |
6675 | fi | |
6676 | if test -z "$ac_cpp_err"; then | |
6677 | ac_header_preproc=yes | |
6678 | else | |
6679 | echo "$as_me: failed program was:" >&5 | |
6680 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6681 | ||
6682 | ac_header_preproc=no | |
6683 | fi | |
6684 | rm -f conftest.err conftest.$ac_ext | |
6685 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6686 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6687 | ||
6688 | # So? What about this header? | |
86da66b5 HPN |
6689 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6690 | yes:no: ) | |
ba479fd2 NN |
6691 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6692 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6693 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6694 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6695 | ac_header_preproc=yes | |
ba479fd2 | 6696 | ;; |
86da66b5 | 6697 | no:yes:* ) |
ba479fd2 NN |
6698 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6699 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6700 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6701 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6702 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6703 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6704 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6705 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6706 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6707 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6708 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6709 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6710 | ( |
6711 | cat <<\_ASBOX | |
86da66b5 HPN |
6712 | ## ------------------------------------------ ## |
6713 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6714 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6715 | _ASBOX |
6716 | ) | | |
6717 | sed "s/^/$as_me: WARNING: /" >&2 | |
6718 | ;; | |
6719 | esac | |
6720 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6721 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6722 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6723 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6724 | else | |
6725 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6726 | fi |
ba479fd2 NN |
6727 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6728 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6729 | ||
6e3f3080 | 6730 | fi |
ba479fd2 | 6731 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6732 | have_valgrind_h=yes |
6733 | else | |
ba479fd2 | 6734 | have_valgrind_h=no |
6938ec6c NN |
6735 | fi |
6736 | ||
6737 | ||
ba479fd2 | 6738 | |
cdce5c16 | 6739 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6740 | # It is certainly possible that there's valgrind but no valgrind.h. |
6741 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6742 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6743 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6744 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6745 | /* confdefs.h. */ |
6746 | _ACEOF | |
6747 | cat confdefs.h >>conftest.$ac_ext | |
6748 | cat >>conftest.$ac_ext <<_ACEOF | |
6749 | /* end confdefs.h. */ | |
a207b594 | 6750 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6751 | #ifndef VALGRIND_DISCARD |
6752 | #error VALGRIND_DISCARD not defined | |
6753 | #endif | |
ba479fd2 NN |
6754 | _ACEOF |
6755 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6756 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6757 | ac_status=$? | |
6758 | grep -v '^ *+' conftest.er1 >conftest.err | |
6759 | rm -f conftest.er1 | |
6760 | cat conftest.err >&5 | |
6761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6762 | (exit $ac_status); } >/dev/null; then | |
6763 | if test -s conftest.err; then | |
6764 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6765 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6766 | else |
6767 | ac_cpp_err= | |
6768 | fi | |
6769 | else | |
6770 | ac_cpp_err=yes | |
6771 | fi | |
6772 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6773 | gcc_cv_header_valgrind_memcheck_h=yes |
6774 | else | |
ba479fd2 NN |
6775 | echo "$as_me: failed program was:" >&5 |
6776 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6777 | ||
a207b594 HPN |
6778 | gcc_cv_header_valgrind_memcheck_h=no |
6779 | fi | |
ba479fd2 NN |
6780 | rm -f conftest.err conftest.$ac_ext |
6781 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6782 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6783 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6784 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6785 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6786 | /* confdefs.h. */ |
6787 | _ACEOF | |
6788 | cat confdefs.h >>conftest.$ac_ext | |
6789 | cat >>conftest.$ac_ext <<_ACEOF | |
6790 | /* end confdefs.h. */ | |
a207b594 HPN |
6791 | #include <memcheck.h> |
6792 | #ifndef VALGRIND_DISCARD | |
6793 | #error VALGRIND_DISCARD not defined | |
6794 | #endif | |
ba479fd2 NN |
6795 | _ACEOF |
6796 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6797 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6798 | ac_status=$? | |
6799 | grep -v '^ *+' conftest.er1 >conftest.err | |
6800 | rm -f conftest.er1 | |
6801 | cat conftest.err >&5 | |
6802 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6803 | (exit $ac_status); } >/dev/null; then | |
6804 | if test -s conftest.err; then | |
6805 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6806 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6807 | else |
6808 | ac_cpp_err= | |
6809 | fi | |
6810 | else | |
6811 | ac_cpp_err=yes | |
6812 | fi | |
6813 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6814 | gcc_cv_header_memcheck_h=yes |
6815 | else | |
ba479fd2 NN |
6816 | echo "$as_me: failed program was:" >&5 |
6817 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6818 | ||
cafe096b EC |
6819 | gcc_cv_header_memcheck_h=no |
6820 | fi | |
ba479fd2 NN |
6821 | rm -f conftest.err conftest.$ac_ext |
6822 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6823 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6824 | ||
56694dd9 ZW |
6825 | # Prepare PATH_SEPARATOR. |
6826 | # The user is always right. | |
6827 | if test "${PATH_SEPARATOR+set}" != set; then | |
6828 | echo "#! /bin/sh" >conf$$.sh | |
6829 | echo "exit 0" >>conf$$.sh | |
6830 | chmod +x conf$$.sh | |
6831 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6832 | PATH_SEPARATOR=';' | |
6833 | else | |
6834 | PATH_SEPARATOR=: | |
6835 | fi | |
6836 | rm -f conf$$.sh | |
6837 | fi | |
6838 | ||
6839 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6840 | # as systems may use methods other than mode bits to determine executability. | |
6841 | cat >conf$$.file <<_ASEOF | |
6842 | #! /bin/sh | |
6843 | exit 0 | |
6844 | _ASEOF | |
6845 | chmod +x conf$$.file | |
6846 | if test -x conf$$.file >/dev/null 2>&1; then | |
6847 | ac_executable_p="test -x" | |
6848 | else | |
6849 | ac_executable_p="test -f" | |
6850 | fi | |
6851 | rm -f conf$$.file | |
6852 | ||
6853 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6854 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6855 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6856 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6857 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6859 | else |
6860 | case "$valgrind_path" in | |
56694dd9 ZW |
6861 | [\\/]* | ?:[\\/]*) |
6862 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6863 | ;; | |
414d23ae | 6864 | *) |
56694dd9 ZW |
6865 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6866 | for ac_dir in $PATH; do | |
6867 | IFS="$ac_save_IFS" | |
6868 | test -z "$ac_dir" && ac_dir=. | |
6869 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6870 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6871 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6872 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6873 | break 2 | |
6874 | fi | |
6875 | fi | |
6876 | done | |
6877 | done | |
6878 | IFS="$ac_save_IFS" | |
6879 | ;; | |
414d23ae | 6880 | esac |
75e93faa | 6881 | fi |
414d23ae HPN |
6882 | valgrind_path="$ac_cv_path_valgrind_path" |
6883 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6884 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6885 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6886 | else |
ba479fd2 NN |
6887 | echo "$as_me:$LINENO: result: no" >&5 |
6888 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6889 | fi |
6890 | ||
a207b594 HPN |
6891 | if test "x$valgrind_path" = "x" \ |
6892 | || (test $have_valgrind_h = no \ | |
6893 | && test $gcc_cv_header_memcheck_h = no \ | |
6894 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6895 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6896 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6897 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6898 | fi |
6899 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6900 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6901 | |
6902 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6903 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6904 | _ACEOF |
75e93faa | 6905 | |
a207b594 | 6906 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6907 | |
6908 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6909 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6910 | _ACEOF |
a207b594 HPN |
6911 | |
6912 | fi | |
14011ca4 | 6913 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6914 | |
6915 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6916 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6917 | _ACEOF |
14011ca4 AJ |
6918 | |
6919 | fi | |
414d23ae | 6920 | fi |
75e93faa | 6921 | |
75e93faa ZW |
6922 | |
6923 | ||
74ee1642 PB |
6924 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6925 | if test "${enable_mapped_location+set}" = set; then | |
6926 | enableval="$enable_mapped_location" | |
6927 | ||
6928 | else | |
6929 | enable_mapped_location=no | |
6930 | fi; | |
6931 | ||
6932 | if test "$enable_mapped_location" = yes ; then | |
6933 | ||
6934 | cat >>confdefs.h <<\_ACEOF | |
6935 | #define USE_MAPPED_LOCATION 1 | |
6936 | _ACEOF | |
6937 | ||
6938 | fi | |
6939 | ||
414d23ae HPN |
6940 | # Enable code coverage collection |
6941 | # Check whether --enable-coverage or --disable-coverage was given. | |
6942 | if test "${enable_coverage+set}" = set; then | |
6943 | enableval="$enable_coverage" | |
6944 | case "${enableval}" in | |
6dd297da NN |
6945 | yes|noopt) |
6946 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6947 | ;; | |
6948 | opt) | |
6949 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6950 | ;; | |
6951 | no) | |
6952 | # a.k.a. --disable-coverage | |
6953 | coverage_flags="" | |
6954 | ;; | |
6955 | *) | |
6956 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6957 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6958 | { (exit 1); exit 1; }; } | |
6dd297da | 6959 | ;; |
414d23ae | 6960 | esac |
75e93faa | 6961 | else |
414d23ae | 6962 | coverage_flags="" |
ba479fd2 | 6963 | fi; |
5c3bc9fb | 6964 | |
414d23ae | 6965 | |
439a7e54 DN |
6966 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6967 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6968 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6969 | |
439a7e54 DN |
6970 | else |
6971 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6972 | fi; |
439a7e54 | 6973 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6974 | |
6975 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6976 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6977 | _ACEOF |
439a7e54 DN |
6978 | |
6979 | fi | |
6980 | ||
73458fb7 NN |
6981 | # ------------------------------- |
6982 | # Miscenalleous configure options | |
6983 | # ------------------------------- | |
34a86c2b NN |
6984 | |
6985 | # With stabs | |
ba479fd2 | 6986 | |
34a86c2b NN |
6987 | # Check whether --with-stabs or --without-stabs was given. |
6988 | if test "${with_stabs+set}" = set; then | |
6989 | withval="$with_stabs" | |
6990 | stabs="$with_stabs" | |
6991 | else | |
6992 | stabs=no | |
ba479fd2 | 6993 | fi; |
cafe096b | 6994 | |
34a86c2b NN |
6995 | # Determine whether or not multilibs are enabled. |
6996 | # Check whether --enable-multilib or --disable-multilib was given. | |
6997 | if test "${enable_multilib+set}" = set; then | |
6998 | enableval="$enable_multilib" | |
ba479fd2 | 6999 | |
34a86c2b NN |
7000 | else |
7001 | enable_multilib=yes | |
ba479fd2 | 7002 | fi; |
75e93faa | 7003 | |
34a86c2b | 7004 | |
414d23ae HPN |
7005 | # Enable __cxa_atexit for C++. |
7006 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
7007 | if test "${enable___cxa_atexit+set}" = set; then | |
7008 | enableval="$enable___cxa_atexit" | |
75e93faa | 7009 | |
ba479fd2 | 7010 | fi; |
75e93faa | 7011 | |
486aa804 BE |
7012 | # Enable C extension for decimal float if target supports it. |
7013 | # Check whether --enable-decimal-float or --disable-decimal-float was given. | |
7014 | if test "${enable_decimal_float+set}" = set; then | |
7015 | enableval="$enable_decimal_float" | |
7016 | ||
7017 | if test x$enablevar = xyes ; then | |
7018 | case $target in | |
7019 | powerpc*-*-linux* | i?86*-*-linux*) | |
a4a9df5f | 7020 | enable_decimal_float=yes |
486aa804 BE |
7021 | ;; |
7022 | *) | |
7023 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7024 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7025 | enable_decimal_float=no | |
7026 | ;; | |
7027 | esac | |
7028 | fi | |
7029 | ||
7030 | else | |
a4a9df5f | 7031 | enable_decimal_float=no |
486aa804 BE |
7032 | fi; |
7033 | ||
7034 | ||
7035 | ||
7036 | dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` | |
7037 | ||
7038 | cat >>confdefs.h <<_ACEOF | |
7039 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7040 | _ACEOF | |
7041 | ||
7042 | ||
414d23ae HPN |
7043 | # Enable threads |
7044 | # Pass with no value to take the default | |
7045 | # Pass with a value to specify a thread package | |
7046 | # Check whether --enable-threads or --disable-threads was given. | |
7047 | if test "${enable_threads+set}" = set; then | |
7048 | enableval="$enable_threads" | |
ba479fd2 | 7049 | |
414d23ae HPN |
7050 | else |
7051 | enable_threads='' | |
ba479fd2 | 7052 | fi; |
414d23ae | 7053 | |
8dea1cca DD |
7054 | # Check whether --enable-tls or --disable-tls was given. |
7055 | if test "${enable_tls+set}" = set; then | |
7056 | enableval="$enable_tls" | |
7057 | ||
7058 | case $enable_tls in | |
7059 | yes | no) ;; | |
7060 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7061 | Valid choices are 'yes' and 'no'." >&5 | |
7062 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7063 | Valid choices are 'yes' and 'no'." >&2;} | |
7064 | { (exit 1); exit 1; }; } ;; | |
7065 | esac | |
7066 | ||
7067 | else | |
7068 | enable_tls='' | |
7069 | fi; | |
7070 | ||
414d23ae HPN |
7071 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
7072 | if test "${enable_objc_gc+set}" = set; then | |
7073 | enableval="$enable_objc_gc" | |
7074 | if test x$enable_objc_gc = xno; then | |
7075 | objc_boehm_gc='' | |
7076 | else | |
7077 | objc_boehm_gc=1 | |
7078 | fi | |
7079 | else | |
7080 | objc_boehm_gc='' | |
ba479fd2 | 7081 | fi; |
75e93faa ZW |
7082 | |
7083 | ||
414d23ae HPN |
7084 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
7085 | if test "${with_dwarf2+set}" = set; then | |
7086 | withval="$with_dwarf2" | |
7087 | dwarf2="$with_dwarf2" | |
75e93faa | 7088 | else |
414d23ae | 7089 | dwarf2=no |
ba479fd2 | 7090 | fi; |
75e93faa | 7091 | |
414d23ae HPN |
7092 | # Check whether --enable-shared or --disable-shared was given. |
7093 | if test "${enable_shared+set}" = set; then | |
7094 | enableval="$enable_shared" | |
ba479fd2 | 7095 | |
414d23ae HPN |
7096 | case $enable_shared in |
7097 | yes | no) ;; | |
7098 | *) | |
7099 | enable_shared=no | |
7100 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7101 | for pkg in $enableval; do | |
7102 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7103 | enable_shared=yes | |
7104 | fi | |
7105 | done | |
7106 | IFS="$ac_save_ifs" | |
7107 | ;; | |
7108 | esac | |
7109 | ||
75e93faa | 7110 | else |
414d23ae | 7111 | enable_shared=yes |
ba479fd2 | 7112 | fi; |
75e93faa | 7113 | |
75e93faa | 7114 | |
75e93faa | 7115 | |
160633c6 MM |
7116 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
7117 | if test "${with_build_sysroot+set}" = set; then | |
7118 | withval="$with_build_sysroot" | |
7119 | ||
7120 | fi; | |
7121 | ||
7122 | ||
4977bab6 ZW |
7123 | # Check whether --with-sysroot or --without-sysroot was given. |
7124 | if test "${with_sysroot+set}" = set; then | |
7125 | withval="$with_sysroot" | |
ba479fd2 | 7126 | |
4977bab6 | 7127 | case ${with_sysroot} in |
caa55b1e | 7128 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7129 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7130 | esac | |
ba479fd2 | 7131 | |
4977bab6 ZW |
7132 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
7133 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
7134 | ||
047d636f DJ |
7135 | if test "x$exec_prefix" = xNONE; then |
7136 | if test "x$prefix" = xNONE; then | |
7137 | test_prefix=/usr/local | |
7138 | else | |
7139 | test_prefix=$prefix | |
7140 | fi | |
7141 | else | |
7142 | test_prefix=$exec_prefix | |
7143 | fi | |
7144 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
7145 | "${test_prefix}"|"${test_prefix}/"*|\ |
7146 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
7147 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7148 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7149 | ;; | |
7150 | esac | |
7151 | ||
4977bab6 | 7152 | else |
ba479fd2 | 7153 | |
4977bab6 | 7154 | TARGET_SYSTEM_ROOT= |
db720d9a | 7155 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7156 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7157 | ||
ba479fd2 | 7158 | fi; |
4977bab6 ZW |
7159 | |
7160 | ||
7161 | ||
7162 | ||
d1bd0ded | 7163 | # Build with intermodule optimisations |
d1bd0ded GK |
7164 | # Check whether --enable-intermodule or --disable-intermodule was given. |
7165 | if test "${enable_intermodule+set}" = set; then | |
7166 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
7167 | case ${enable_intermodule} in |
7168 | yes) onestep="-onestep";; | |
7169 | *) onestep="";; | |
d1bd0ded | 7170 | esac |
0c46c5c7 KC |
7171 | else |
7172 | onestep="" | |
ba479fd2 | 7173 | fi; |
d1bd0ded GK |
7174 | |
7175 | ||
f3c9f174 NN |
7176 | # Sanity check enable_languages in case someone does not run the toplevel |
7177 | # configure # script. | |
7178 | # Check whether --enable-languages or --disable-languages was given. | |
7179 | if test "${enable_languages+set}" = set; then | |
7180 | enableval="$enable_languages" | |
7181 | case ,${enable_languages}, in | |
7182 | ,,|,yes,) | |
7183 | # go safe -- we cannot be much sure without the toplevel | |
7184 | # configure's | |
7185 | # analysis of which target libs are present and usable | |
7186 | enable_languages=c | |
7187 | ;; | |
7188 | *,all,*) | |
7189 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7190 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7191 | { (exit 1); exit 1; }; } | |
7192 | ;; | |
7193 | *,c,*) | |
7194 | ;; | |
7195 | *) | |
7196 | enable_languages=c,${enable_languages} | |
7197 | ;; | |
7198 | esac | |
7199 | else | |
7200 | enable_languages=c | |
7201 | fi; | |
7202 | ||
9288b845 CD |
7203 | # Used by documentation targets |
7204 | ||
7205 | ||
7206 | ||
f3c9f174 | 7207 | |
73458fb7 NN |
7208 | # ------------------------- |
7209 | # Checks for other programs | |
7210 | # ------------------------- | |
5b67ad6f | 7211 | |
ba479fd2 NN |
7212 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7213 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7214 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7215 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7217 | else |
ba479fd2 | 7218 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7219 | all: |
ba479fd2 NN |
7220 | @echo 'ac_maketemp="$(MAKE)"' |
7221 | _ACEOF | |
e9a25f70 | 7222 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7223 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7224 | if test -n "$ac_maketemp"; then |
7225 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7226 | else | |
7227 | eval ac_cv_prog_make_${ac_make}_set=no | |
7228 | fi | |
ba479fd2 | 7229 | rm -f conftest.make |
e9a25f70 JL |
7230 | fi |
7231 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7232 | echo "$as_me:$LINENO: result: yes" >&5 |
7233 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7234 | SET_MAKE= |
7235 | else | |
ba479fd2 NN |
7236 | echo "$as_me:$LINENO: result: no" >&5 |
7237 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7238 | SET_MAKE="MAKE=${MAKE-make}" |
7239 | fi | |
7240 | ||
7241 | ||
861bb6c1 | 7242 | # Find some useful tools |
ba479fd2 | 7243 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7244 | do |
ba479fd2 | 7245 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7246 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7247 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7248 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7249 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7250 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7251 | else |
7252 | if test -n "$AWK"; then | |
7253 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7254 | else | |
ba479fd2 NN |
7255 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7256 | for as_dir in $PATH | |
7257 | do | |
7258 | IFS=$as_save_IFS | |
7259 | test -z "$as_dir" && as_dir=. | |
7260 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7261 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7262 | ac_cv_prog_AWK="$ac_prog" | |
7263 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7264 | break 2 | |
7265 | fi | |
7266 | done | |
7267 | done | |
7268 | ||
861bb6c1 JL |
7269 | fi |
7270 | fi | |
ba479fd2 | 7271 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7272 | if test -n "$AWK"; then |
ba479fd2 NN |
7273 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7274 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7275 | else |
ba479fd2 NN |
7276 | echo "$as_me:$LINENO: result: no" >&5 |
7277 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7278 | fi |
7279 | ||
ba479fd2 | 7280 | test -n "$AWK" && break |
861bb6c1 JL |
7281 | done |
7282 | ||
776dc15d | 7283 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7284 | # Bail out if it's missing. |
7285 | case ${AWK} in | |
ba479fd2 NN |
7286 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7287 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7288 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7289 | esac |
7290 | ||
ba479fd2 NN |
7291 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7292 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7293 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7294 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7295 | else |
7296 | rm -f conftestdata_t | |
7297 | echo >conftestdata_f | |
7298 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7299 | then | |
7300 | gcc_cv_prog_LN_S="ln -s" | |
7301 | else | |
7302 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7303 | then | |
7304 | gcc_cv_prog_LN_S=ln | |
7305 | else | |
35f06ae4 PB |
7306 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7307 | then | |
06c3418c | 7308 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7309 | else |
7310 | gcc_cv_prog_LN_S=cp | |
7311 | fi | |
0a4b6309 RL |
7312 | fi |
7313 | fi | |
7314 | rm -f conftestdata_f conftestdata_t | |
7315 | ||
7316 | fi | |
7317 | LN_S="$gcc_cv_prog_LN_S" | |
7318 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7319 | echo "$as_me:$LINENO: result: yes" >&5 |
7320 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7321 | else |
7322 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7323 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7324 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7325 | else |
35f06ae4 PB |
7326 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7327 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7328 | fi |
7329 | fi | |
7330 | ||
18fc9bd4 RG |
7331 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7332 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7333 | if test "${acx_cv_prog_LN+set}" = set; then | |
7334 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7335 | else | |
7336 | rm -f conftestdata_t | |
7337 | echo >conftestdata_f | |
7338 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7339 | then | |
7340 | acx_cv_prog_LN=ln | |
7341 | else | |
7342 | acx_cv_prog_LN=no | |
7343 | fi | |
7344 | rm -f conftestdata_f conftestdata_t | |
7345 | ||
7346 | fi | |
7347 | if test $acx_cv_prog_LN = no; then | |
7348 | LN="$LN_S" | |
7349 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7350 | echo "${ECHO_T}no, using $LN" >&6 | |
7351 | else | |
7352 | LN="$acx_cv_prog_LN" | |
7353 | echo "$as_me:$LINENO: result: yes" >&5 | |
7354 | echo "${ECHO_T}yes" >&6 | |
7355 | fi | |
7356 | ||
ba479fd2 NN |
7357 | if test -n "$ac_tool_prefix"; then |
7358 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7359 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7360 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7361 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7362 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7363 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7364 | else |
7365 | if test -n "$RANLIB"; then | |
7366 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7367 | else | |
ba479fd2 NN |
7368 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7369 | for as_dir in $PATH | |
7370 | do | |
7371 | IFS=$as_save_IFS | |
7372 | test -z "$as_dir" && as_dir=. | |
7373 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7374 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7375 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7376 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7377 | break 2 | |
7378 | fi | |
7379 | done | |
7380 | done | |
7381 | ||
6e3f3080 NN |
7382 | fi |
7383 | fi | |
ba479fd2 | 7384 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7385 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7386 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7387 | echo "${ECHO_T}$RANLIB" >&6 | |
7388 | else | |
7389 | echo "$as_me:$LINENO: result: no" >&5 | |
7390 | echo "${ECHO_T}no" >&6 | |
7391 | fi | |
7392 | ||
7393 | fi | |
7394 | if test -z "$ac_cv_prog_RANLIB"; then | |
7395 | ac_ct_RANLIB=$RANLIB | |
7396 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7397 | set dummy ranlib; ac_word=$2 | |
7398 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7399 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7400 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7401 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7402 | else | |
7403 | if test -n "$ac_ct_RANLIB"; then | |
7404 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7405 | else | |
7406 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7407 | for as_dir in $PATH | |
7408 | do | |
7409 | IFS=$as_save_IFS | |
7410 | test -z "$as_dir" && as_dir=. | |
7411 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7412 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7413 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7414 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7415 | break 2 | |
7416 | fi | |
7417 | done | |
7418 | done | |
7419 | ||
7420 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7421 | fi | |
7422 | fi | |
7423 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7424 | if test -n "$ac_ct_RANLIB"; then | |
7425 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7426 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7427 | else |
ba479fd2 NN |
7428 | echo "$as_me:$LINENO: result: no" >&5 |
7429 | echo "${ECHO_T}no" >&6 | |
7430 | fi | |
7431 | ||
7432 | RANLIB=$ac_ct_RANLIB | |
7433 | else | |
7434 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7435 | fi |
7436 | ||
343a6100 MM |
7437 | case "${host}" in |
7438 | *-*-darwin*) | |
7439 | # By default, the Darwin ranlib will not treat common symbols as | |
7440 | # definitions when building the archive table of contents. Other | |
7441 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7442 | # it behave similarly. | |
7443 | ranlib_flags="-c" | |
7444 | ;; | |
7445 | *) | |
7446 | ranlib_flags="" | |
7447 | esac | |
7448 | ||
7449 | ||
0a4b6309 RL |
7450 | # Find a good install program. We prefer a C program (faster), |
7451 | # so one script is as good as another. But avoid the broken or | |
7452 | # incompatible versions: | |
7453 | # SysV /etc/install, /usr/sbin/install | |
7454 | # SunOS /usr/etc/install | |
7455 | # IRIX /sbin/install | |
7456 | # AIX /bin/install | |
7457 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7458 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7459 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7460 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7461 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7462 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7463 | if test "${ac_cv_path_install+set}" = set; then |
7464 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7465 | else |
7466 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7467 | for ac_dir in $PATH; do | |
7468 | # Account for people who put trailing slashes in PATH elements. | |
7469 | case "$ac_dir/" in | |
7470 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7471 | *) | |
7472 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7473 | for ac_prog in ginstall scoinst install; do | |
7474 | if test -f $ac_dir/$ac_prog; then | |
7475 | if test $ac_prog = install && | |
7476 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7477 | # AIX install. It has an incompatible calling convention. | |
7478 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7479 | : | |
7480 | else | |
7481 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7482 | break 2 | |
7483 | fi | |
7484 | fi | |
7485 | done | |
7486 | ;; | |
7487 | esac | |
7488 | done | |
7489 | IFS="$ac_save_IFS" | |
7490 | ||
7491 | fi | |
7492 | if test "${ac_cv_path_install+set}" = set; then | |
7493 | INSTALL="$ac_cv_path_install" | |
7494 | else | |
7495 | # As a last resort, use the slow shell script. We don't cache a | |
7496 | # path for INSTALL within a source directory, because that will | |
7497 | # break other packages using the cache if that directory is | |
7498 | # removed, or if the path is relative. | |
7499 | INSTALL="$ac_install_sh" | |
7500 | fi | |
7501 | fi | |
ba479fd2 NN |
7502 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7503 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7504 | |
7505 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7506 | # It thinks the first close brace ends the variable substitution. | |
7507 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7508 | ||
7509 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7510 | ||
861bb6c1 | 7511 | |
3a000df0 | 7512 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7513 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7514 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7515 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7516 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7517 | else |
7518 | echo abfoo >t1 | |
7519 | echo cdfoo >t2 | |
269a7343 | 7520 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7521 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7522 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7523 | : |
3a000df0 KC |
7524 | else |
7525 | gcc_cv_prog_cmp_skip=gnucompare | |
7526 | fi | |
269a7343 KG |
7527 | fi |
7528 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7529 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7530 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7531 | : | |
7532 | else | |
7533 | gcc_cv_prog_cmp_skip=fastcompare | |
7534 | fi | |
7535 | fi | |
3a000df0 KC |
7536 | fi |
7537 | rm t1 t2 | |
7538 | ||
7539 | fi | |
ba479fd2 NN |
7540 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7541 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7542 | make_compare_target=$gcc_cv_prog_cmp_skip |
7543 | ||
7544 | ||
7545 | ||
73458fb7 NN |
7546 | # See if we have the mktemp command. |
7547 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7548 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7549 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7550 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7551 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7552 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7553 | else |
7554 | if test -n "$have_mktemp_command"; then | |
7555 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7556 | else | |
ba479fd2 NN |
7557 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7558 | for as_dir in $PATH | |
7559 | do | |
7560 | IFS=$as_save_IFS | |
7561 | test -z "$as_dir" && as_dir=. | |
7562 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7563 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7564 | ac_cv_prog_have_mktemp_command="yes" | |
7565 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7566 | break 2 | |
7567 | fi | |
7568 | done | |
7569 | done | |
7570 | ||
73458fb7 NN |
7571 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7572 | fi | |
7573 | fi | |
ba479fd2 | 7574 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7575 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7576 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7577 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7578 | else |
ba479fd2 NN |
7579 | echo "$as_me:$LINENO: result: no" >&5 |
7580 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7581 | fi |
7582 | ||
7583 | ||
7c27e184 PB |
7584 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7585 | ||
7586 | # See if makeinfo has been installed and is modern enough | |
7587 | # that we can use it. | |
9f18db39 PB |
7588 | |
7589 | ac_executable_extensions="$build_exeext" | |
7590 | ||
7c27e184 | 7591 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7592 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7593 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7594 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7595 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7596 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7597 | else |
7598 | if test -n "$MAKEINFO"; then | |
7599 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7600 | else | |
ba479fd2 NN |
7601 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7602 | for as_dir in $PATH | |
7603 | do | |
7604 | IFS=$as_save_IFS | |
7605 | test -z "$as_dir" && as_dir=. | |
7606 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7607 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7608 | ac_cv_prog_MAKEINFO="makeinfo" | |
7609 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7610 | break 2 | |
7611 | fi | |
7612 | done | |
7613 | done | |
7614 | ||
73458fb7 NN |
7615 | fi |
7616 | fi | |
ba479fd2 | 7617 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7618 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7619 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7620 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7621 | else |
ba479fd2 NN |
7622 | echo "$as_me:$LINENO: result: no" >&5 |
7623 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7624 | fi |
7625 | ||
7626 | if test -n "$MAKEINFO"; then | |
7627 | # Found it, now check the version. | |
ba479fd2 NN |
7628 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7629 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7630 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7631 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7632 | else |
7633 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7634 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
18fc9bd4 | 7635 | echo "configure:7635: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7636 | case $ac_prog_version in |
7637 | '') gcc_cv_prog_makeinfo_modern=no;; | |
1a598a97 | 7638 | 4.[4-9]*) |
73458fb7 NN |
7639 | gcc_cv_prog_makeinfo_modern=yes;; |
7640 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7641 | esac | |
7642 | ||
7643 | fi | |
ba479fd2 NN |
7644 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7645 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7646 | else |
7647 | gcc_cv_prog_makeinfo_modern=no | |
7648 | fi | |
7649 | ||
73458fb7 | 7650 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7651 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7652 | { echo "$as_me:$LINENO: WARNING: |
7653 | *** Makeinfo is missing or too old. | |
7654 | *** Info documentation will not be built." >&5 | |
7655 | echo "$as_me: WARNING: | |
cafe096b | 7656 | *** Makeinfo is missing or too old. |
ba479fd2 | 7657 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7658 | BUILD_INFO= |
7659 | else | |
ba479fd2 | 7660 | BUILD_INFO=info |
73458fb7 NN |
7661 | fi |
7662 | ||
7c27e184 | 7663 | |
73458fb7 | 7664 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7665 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7666 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7667 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7668 | echo "$as_me:$LINENO: result: yes" >&5 |
7669 | echo "${ECHO_T}yes" >&6 | |
7670 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7671 | else |
ba479fd2 NN |
7672 | echo "$as_me:$LINENO: result: no" >&5 |
7673 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7674 | GENERATED_MANPAGES= |
7675 | fi | |
7676 | ||
7c27e184 | 7677 | |
73458fb7 | 7678 | # How about lex? |
7c27e184 PB |
7679 | for ac_prog in flex |
7680 | do | |
7681 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7682 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7683 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7684 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7685 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7686 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7687 | else |
7688 | if test -n "$FLEX"; then | |
7689 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7690 | else | |
ba479fd2 NN |
7691 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7692 | for as_dir in $PATH | |
7693 | do | |
7694 | IFS=$as_save_IFS | |
7695 | test -z "$as_dir" && as_dir=. | |
7696 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7697 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7698 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7699 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7700 | break 2 | |
7701 | fi | |
7702 | done | |
7703 | done | |
7704 | ||
73458fb7 NN |
7705 | fi |
7706 | fi | |
ba479fd2 | 7707 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7708 | if test -n "$FLEX"; then |
ba479fd2 NN |
7709 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7710 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7711 | else |
ba479fd2 NN |
7712 | echo "$as_me:$LINENO: result: no" >&5 |
7713 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7714 | fi |
7715 | ||
7c27e184 PB |
7716 | test -n "$FLEX" && break |
7717 | done | |
7718 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7719 | ||
73458fb7 NN |
7720 | |
7721 | # Bison? | |
7c27e184 PB |
7722 | for ac_prog in bison |
7723 | do | |
7724 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7725 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7726 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7727 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7728 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7730 | else |
7731 | if test -n "$BISON"; then | |
7732 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7733 | else | |
ba479fd2 NN |
7734 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7735 | for as_dir in $PATH | |
7736 | do | |
7737 | IFS=$as_save_IFS | |
7738 | test -z "$as_dir" && as_dir=. | |
7739 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7740 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7741 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7742 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7743 | break 2 | |
7744 | fi | |
7745 | done | |
7746 | done | |
7747 | ||
73458fb7 NN |
7748 | fi |
7749 | fi | |
ba479fd2 | 7750 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7751 | if test -n "$BISON"; then |
ba479fd2 NN |
7752 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7753 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7754 | else |
ba479fd2 NN |
7755 | echo "$as_me:$LINENO: result: no" >&5 |
7756 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7757 | fi |
7758 | ||
7c27e184 PB |
7759 | test -n "$BISON" && break |
7760 | done | |
7761 | test -n "$BISON" || BISON="$MISSING bison" | |
7762 | ||
7763 | ||
7764 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7765 | # check for build == host before using them. | |
73458fb7 | 7766 | |
f6a874ac | 7767 | # NM |
414adbdd GK |
7768 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7769 | && test -d ../binutils ; then | |
f6a874ac JW |
7770 | NM='$(objdir)/../binutils/nm-new' |
7771 | else | |
7772 | # Extract the first word of "nm", so it can be a program name with args. | |
7773 | set dummy nm; ac_word=$2 | |
7774 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7775 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7776 | if test "${ac_cv_prog_NM+set}" = set; then | |
7777 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7778 | else | |
7779 | if test -n "$NM"; then | |
7780 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7781 | else | |
7782 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7783 | for as_dir in $PATH | |
7784 | do | |
7785 | IFS=$as_save_IFS | |
7786 | test -z "$as_dir" && as_dir=. | |
7787 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7788 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7789 | ac_cv_prog_NM="nm" | |
7790 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7791 | break 2 | |
7792 | fi | |
7793 | done | |
7794 | done | |
7795 | ||
7796 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7797 | fi | |
7798 | fi | |
7799 | NM=$ac_cv_prog_NM | |
7800 | if test -n "$NM"; then | |
7801 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7802 | echo "${ECHO_T}$NM" >&6 | |
7803 | else | |
7804 | echo "$as_me:$LINENO: result: no" >&5 | |
7805 | echo "${ECHO_T}no" >&6 | |
7806 | fi | |
7807 | ||
7808 | fi | |
7809 | ||
7810 | # AR | |
414adbdd GK |
7811 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7812 | && test -d ../binutils ; then | |
f6a874ac JW |
7813 | AR='$(objdir)/../binutils/ar' |
7814 | else | |
7815 | # Extract the first word of "ar", so it can be a program name with args. | |
7816 | set dummy ar; ac_word=$2 | |
7817 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7818 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7819 | if test "${ac_cv_prog_AR+set}" = set; then | |
7820 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7821 | else | |
7822 | if test -n "$AR"; then | |
7823 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7824 | else | |
7825 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7826 | for as_dir in $PATH | |
7827 | do | |
7828 | IFS=$as_save_IFS | |
7829 | test -z "$as_dir" && as_dir=. | |
7830 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7831 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7832 | ac_cv_prog_AR="ar" | |
7833 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7834 | break 2 | |
7835 | fi | |
7836 | done | |
7837 | done | |
7838 | ||
7839 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7840 | fi | |
7841 | fi | |
7842 | AR=$ac_cv_prog_AR | |
7843 | if test -n "$AR"; then | |
7844 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7845 | echo "${ECHO_T}$AR" >&6 | |
7846 | else | |
7847 | echo "$as_me:$LINENO: result: no" >&5 | |
7848 | echo "${ECHO_T}no" >&6 | |
7849 | fi | |
7850 | ||
7851 | fi | |
7852 | ||
7853 | ||
73458fb7 NN |
7854 | # -------------------- |
7855 | # Checks for C headers | |
7856 | # -------------------- | |
7857 | ||
ba479fd2 NN |
7858 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7859 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7860 | if test "${gcc_cv_glibc+set}" = set; then | |
7861 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7862 | else | |
7863 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7864 | /* confdefs.h. */ |
7865 | _ACEOF | |
7866 | cat confdefs.h >>conftest.$ac_ext | |
7867 | cat >>conftest.$ac_ext <<_ACEOF | |
7868 | /* end confdefs.h. */ | |
73458fb7 | 7869 | #include <features.h> |
ba479fd2 NN |
7870 | int |
7871 | main () | |
7872 | { | |
73458fb7 NN |
7873 | |
7874 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7875 | #error Not a GNU C library system | |
7876 | #endif | |
ba479fd2 NN |
7877 | ; |
7878 | return 0; | |
7879 | } | |
7880 | _ACEOF | |
7881 | rm -f conftest.$ac_objext | |
7882 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7883 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7884 | ac_status=$? |
86da66b5 HPN |
7885 | grep -v '^ *+' conftest.er1 >conftest.err |
7886 | rm -f conftest.er1 | |
7887 | cat conftest.err >&5 | |
ba479fd2 NN |
7888 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7889 | (exit $ac_status); } && | |
ec6c7392 PB |
7890 | { ac_try='test -z "$ac_c_werror_flag" |
7891 | || test ! -s conftest.err' | |
86da66b5 HPN |
7892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7893 | (eval $ac_try) 2>&5 | |
7894 | ac_status=$? | |
7895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7896 | (exit $ac_status); }; } && | |
7897 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7899 | (eval $ac_try) 2>&5 | |
7900 | ac_status=$? | |
7901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7902 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7903 | gcc_cv_glibc=yes |
7904 | else | |
ba479fd2 NN |
7905 | echo "$as_me: failed program was:" >&5 |
7906 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7907 | ||
7908 | gcc_cv_glibc=no | |
73458fb7 | 7909 | fi |
86da66b5 | 7910 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7911 | fi |
7912 | ||
ba479fd2 NN |
7913 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7914 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7915 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7916 | |
7917 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7918 | #define _GNU_SOURCE 1 |
ba479fd2 | 7919 | _ACEOF |
73458fb7 NN |
7920 | |
7921 | fi | |
7922 | ||
ca9bc441 NN |
7923 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7924 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 7925 | |
ca9bc441 NN |
7926 | ac_c_preproc_warn_flag=yes |
7927 | ||
ba479fd2 NN |
7928 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7929 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7930 | if test "${ac_cv_header_stdc+set}" = set; then | |
7931 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7932 | else |
ba479fd2 | 7933 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7934 | /* confdefs.h. */ |
7935 | _ACEOF | |
7936 | cat confdefs.h >>conftest.$ac_ext | |
7937 | cat >>conftest.$ac_ext <<_ACEOF | |
7938 | /* end confdefs.h. */ | |
956d6950 JL |
7939 | #include <stdlib.h> |
7940 | #include <stdarg.h> | |
7941 | #include <string.h> | |
7942 | #include <float.h> | |
ba479fd2 NN |
7943 | |
7944 | int | |
7945 | main () | |
7946 | { | |
7947 | ||
7948 | ; | |
7949 | return 0; | |
7950 | } | |
7951 | _ACEOF | |
7952 | rm -f conftest.$ac_objext | |
7953 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7954 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7955 | ac_status=$? |
86da66b5 HPN |
7956 | grep -v '^ *+' conftest.er1 >conftest.err |
7957 | rm -f conftest.er1 | |
7958 | cat conftest.err >&5 | |
ba479fd2 NN |
7959 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7960 | (exit $ac_status); } && | |
ec6c7392 PB |
7961 | { ac_try='test -z "$ac_c_werror_flag" |
7962 | || test ! -s conftest.err' | |
86da66b5 HPN |
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); }; } && | |
7968 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7969 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7970 | (eval $ac_try) 2>&5 | |
7971 | ac_status=$? | |
7972 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7973 | (exit $ac_status); }; }; then | |
956d6950 JL |
7974 | ac_cv_header_stdc=yes |
7975 | else | |
ba479fd2 NN |
7976 | echo "$as_me: failed program was:" >&5 |
7977 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7978 | ||
7979 | ac_cv_header_stdc=no | |
956d6950 | 7980 | fi |
86da66b5 | 7981 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7982 | |
7983 | if test $ac_cv_header_stdc = yes; then | |
7984 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7985 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7986 | /* confdefs.h. */ |
7987 | _ACEOF | |
7988 | cat confdefs.h >>conftest.$ac_ext | |
7989 | cat >>conftest.$ac_ext <<_ACEOF | |
7990 | /* end confdefs.h. */ | |
956d6950 | 7991 | #include <string.h> |
ba479fd2 NN |
7992 | |
7993 | _ACEOF | |
956d6950 | 7994 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 7995 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
7996 | : |
7997 | else | |
956d6950 JL |
7998 | ac_cv_header_stdc=no |
7999 | fi | |
8000 | rm -f conftest* | |
8001 | ||
8002 | fi | |
8003 | ||
8004 | if test $ac_cv_header_stdc = yes; then | |
8005 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8006 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8007 | /* confdefs.h. */ |
8008 | _ACEOF | |
8009 | cat confdefs.h >>conftest.$ac_ext | |
8010 | cat >>conftest.$ac_ext <<_ACEOF | |
8011 | /* end confdefs.h. */ | |
956d6950 | 8012 | #include <stdlib.h> |
ba479fd2 NN |
8013 | |
8014 | _ACEOF | |
956d6950 | 8015 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8016 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8017 | : |
8018 | else | |
956d6950 JL |
8019 | ac_cv_header_stdc=no |
8020 | fi | |
8021 | rm -f conftest* | |
8022 | ||
8023 | fi | |
8024 | ||
8025 | if test $ac_cv_header_stdc = yes; then | |
8026 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8027 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8028 | : |
8029 | else | |
ba479fd2 | 8030 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8031 | /* confdefs.h. */ |
8032 | _ACEOF | |
8033 | cat confdefs.h >>conftest.$ac_ext | |
8034 | cat >>conftest.$ac_ext <<_ACEOF | |
8035 | /* end confdefs.h. */ | |
956d6950 | 8036 | #include <ctype.h> |
ba479fd2 NN |
8037 | #if ((' ' & 0x0FF) == 0x020) |
8038 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8039 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8040 | #else | |
8041 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8042 | (('a' <= (c) && (c) <= 'i') \ |
8043 | || ('j' <= (c) && (c) <= 'r') \ | |
8044 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8045 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8046 | #endif | |
63cf211a | 8047 | |
ba479fd2 NN |
8048 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8049 | int | |
8050 | main () | |
8051 | { | |
8052 | int i; | |
8053 | for (i = 0; i < 256; i++) | |
8054 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8055 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
8056 | exit(2); |
8057 | exit (0); | |
8058 | } | |
8059 | _ACEOF | |
8060 | rm -f conftest$ac_exeext | |
8061 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8062 | (eval $ac_link) 2>&5 | |
8063 | ac_status=$? | |
8064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8065 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8066 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8067 | (eval $ac_try) 2>&5 | |
8068 | ac_status=$? | |
8069 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8070 | (exit $ac_status); }; }; then | |
956d6950 JL |
8071 | : |
8072 | else | |
ba479fd2 NN |
8073 | echo "$as_me: program exited with status $ac_status" >&5 |
8074 | echo "$as_me: failed program was:" >&5 | |
8075 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8076 | ||
8077 | ( exit $ac_status ) | |
8078 | ac_cv_header_stdc=no | |
956d6950 | 8079 | fi |
86da66b5 | 8080 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8081 | fi |
956d6950 JL |
8082 | fi |
8083 | fi | |
ba479fd2 NN |
8084 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8085 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 8086 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8087 | |
8088 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8089 | #define STDC_HEADERS 1 |
ba479fd2 | 8090 | _ACEOF |
956d6950 JL |
8091 | |
8092 | fi | |
8093 | ||
ba479fd2 NN |
8094 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8095 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
8096 | if test "${ac_cv_header_time+set}" = set; then | |
8097 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8098 | else |
ba479fd2 | 8099 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8100 | /* confdefs.h. */ |
8101 | _ACEOF | |
8102 | cat confdefs.h >>conftest.$ac_ext | |
8103 | cat >>conftest.$ac_ext <<_ACEOF | |
8104 | /* end confdefs.h. */ | |
956d6950 JL |
8105 | #include <sys/types.h> |
8106 | #include <sys/time.h> | |
8107 | #include <time.h> | |
ba479fd2 NN |
8108 | |
8109 | int | |
8110 | main () | |
8111 | { | |
8112 | if ((struct tm *) 0) | |
8113 | return 0; | |
8114 | ; | |
8115 | return 0; | |
8116 | } | |
8117 | _ACEOF | |
8118 | rm -f conftest.$ac_objext | |
8119 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8120 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8121 | ac_status=$? |
86da66b5 HPN |
8122 | grep -v '^ *+' conftest.er1 >conftest.err |
8123 | rm -f conftest.er1 | |
8124 | cat conftest.err >&5 | |
ba479fd2 NN |
8125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8126 | (exit $ac_status); } && | |
ec6c7392 PB |
8127 | { ac_try='test -z "$ac_c_werror_flag" |
8128 | || test ! -s conftest.err' | |
86da66b5 HPN |
8129 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8130 | (eval $ac_try) 2>&5 | |
8131 | ac_status=$? | |
8132 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8133 | (exit $ac_status); }; } && | |
8134 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8135 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8136 | (eval $ac_try) 2>&5 | |
8137 | ac_status=$? | |
8138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8139 | (exit $ac_status); }; }; then | |
956d6950 JL |
8140 | ac_cv_header_time=yes |
8141 | else | |
ba479fd2 NN |
8142 | echo "$as_me: failed program was:" >&5 |
8143 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8144 | ||
8145 | ac_cv_header_time=no | |
956d6950 | 8146 | fi |
86da66b5 | 8147 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8148 | fi |
ba479fd2 NN |
8149 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8150 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 8151 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8152 | |
8153 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8154 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8155 | _ACEOF |
956d6950 JL |
8156 | |
8157 | fi | |
8158 | ||
18fc9bd4 RG |
8159 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8160 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
8161 | if test "${gcc_cv_header_string+set}" = set; then | |
8162 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8163 | else | |
8164 | cat >conftest.$ac_ext <<_ACEOF | |
8165 | /* confdefs.h. */ | |
8166 | _ACEOF | |
8167 | cat confdefs.h >>conftest.$ac_ext | |
8168 | cat >>conftest.$ac_ext <<_ACEOF | |
8169 | /* end confdefs.h. */ | |
8170 | #include <string.h> | |
8171 | #include <strings.h> | |
8172 | int | |
8173 | main () | |
8174 | { | |
8175 | ||
8176 | ; | |
8177 | return 0; | |
8178 | } | |
8179 | _ACEOF | |
8180 | rm -f conftest.$ac_objext | |
8181 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8182 | (eval $ac_compile) 2>conftest.er1 | |
8183 | ac_status=$? | |
8184 | grep -v '^ *+' conftest.er1 >conftest.err | |
8185 | rm -f conftest.er1 | |
8186 | cat conftest.err >&5 | |
8187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8188 | (exit $ac_status); } && | |
8189 | { ac_try='test -z "$ac_c_werror_flag" | |
8190 | || test ! -s conftest.err' | |
8191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8192 | (eval $ac_try) 2>&5 | |
8193 | ac_status=$? | |
8194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8195 | (exit $ac_status); }; } && | |
8196 | { ac_try='test -s conftest.$ac_objext' | |
8197 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8198 | (eval $ac_try) 2>&5 | |
8199 | ac_status=$? | |
8200 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8201 | (exit $ac_status); }; }; then | |
8202 | gcc_cv_header_string=yes | |
8203 | else | |
8204 | echo "$as_me: failed program was:" >&5 | |
8205 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8206 | ||
8207 | gcc_cv_header_string=no | |
8208 | fi | |
8209 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8210 | fi | |
8211 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8212 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8213 | if test $gcc_cv_header_string = yes; then | |
8214 | ||
8215 | cat >>confdefs.h <<\_ACEOF | |
8216 | #define STRING_WITH_STRINGS 1 | |
8217 | _ACEOF | |
8218 | ||
8219 | fi | |
8220 | ||
ba479fd2 NN |
8221 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8222 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8223 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8224 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8225 | else |
ba479fd2 | 8226 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8227 | /* confdefs.h. */ |
8228 | _ACEOF | |
8229 | cat confdefs.h >>conftest.$ac_ext | |
8230 | cat >>conftest.$ac_ext <<_ACEOF | |
8231 | /* end confdefs.h. */ | |
e9831ca0 KG |
8232 | #include <sys/types.h> |
8233 | #include <sys/wait.h> | |
8234 | #ifndef WEXITSTATUS | |
ba479fd2 | 8235 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8236 | #endif |
8237 | #ifndef WIFEXITED | |
ba479fd2 | 8238 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8239 | #endif |
ba479fd2 NN |
8240 | |
8241 | int | |
8242 | main () | |
8243 | { | |
8244 | int s; | |
8245 | wait (&s); | |
8246 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8247 | ; | |
8248 | return 0; | |
8249 | } | |
8250 | _ACEOF | |
8251 | rm -f conftest.$ac_objext | |
8252 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8253 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8254 | ac_status=$? |
86da66b5 HPN |
8255 | grep -v '^ *+' conftest.er1 >conftest.err |
8256 | rm -f conftest.er1 | |
8257 | cat conftest.err >&5 | |
ba479fd2 NN |
8258 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8259 | (exit $ac_status); } && | |
ec6c7392 PB |
8260 | { ac_try='test -z "$ac_c_werror_flag" |
8261 | || test ! -s conftest.err' | |
86da66b5 HPN |
8262 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8263 | (eval $ac_try) 2>&5 | |
8264 | ac_status=$? | |
8265 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8266 | (exit $ac_status); }; } && | |
8267 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8268 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8269 | (eval $ac_try) 2>&5 | |
8270 | ac_status=$? | |
8271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8272 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8273 | ac_cv_header_sys_wait_h=yes |
8274 | else | |
ba479fd2 NN |
8275 | echo "$as_me: failed program was:" >&5 |
8276 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8277 | ||
8278 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8279 | fi |
86da66b5 | 8280 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8281 | fi |
ba479fd2 NN |
8282 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8283 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8284 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8285 | |
8286 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8287 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8288 | _ACEOF |
6e3f3080 | 8289 | |
63cf211a | 8290 | fi |
6e3f3080 | 8291 | |
ba479fd2 NN |
8292 | |
8293 | ||
8294 | ||
8295 | ||
8296 | ||
8297 | ||
8298 | ||
8299 | ||
8300 | ||
8301 | ||
8302 | ||
8303 | ||
8304 | ||
8305 | ||
8306 | ||
8307 | ||
8308 | ||
8309 | ||
8310 | ||
8311 | ||
8312 | ||
dfb77e37 KC |
8313 | |
8314 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8315 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8316 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8317 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8318 | do |
ba479fd2 | 8319 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
18fc9bd4 | 8320 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8321 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8322 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8323 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8324 | else |
18fc9bd4 | 8325 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8326 | /* confdefs.h. */ |
8327 | _ACEOF | |
8328 | cat confdefs.h >>conftest.$ac_ext | |
8329 | cat >>conftest.$ac_ext <<_ACEOF | |
8330 | /* end confdefs.h. */ | |
8331 | #include <$ac_header> | |
8332 | _ACEOF | |
8333 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8334 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8335 | ac_status=$? | |
8336 | grep -v '^ *+' conftest.er1 >conftest.err | |
8337 | rm -f conftest.er1 | |
8338 | cat conftest.err >&5 | |
8339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8340 | (exit $ac_status); } >/dev/null; then | |
8341 | if test -s conftest.err; then | |
8342 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8343 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8344 | else |
8345 | ac_cpp_err= | |
8346 | fi | |
8347 | else | |
8348 | ac_cpp_err=yes | |
8349 | fi | |
8350 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8351 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8352 | else |
8353 | echo "$as_me: failed program was:" >&5 | |
8354 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8355 | ||
18fc9bd4 | 8356 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8357 | fi |
8358 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8359 | fi |
ba479fd2 NN |
8360 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8361 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8362 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8363 | cat >>confdefs.h <<_ACEOF | |
8364 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8365 | _ACEOF | |
8366 | ||
956d6950 JL |
8367 | fi |
8368 | done | |
8369 | ||
8370 | ||
f24af81b | 8371 | # Check for thread headers. |
18fc9bd4 | 8372 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8373 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8374 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8375 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8376 | else |
18fc9bd4 | 8377 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8378 | /* confdefs.h. */ |
8379 | _ACEOF | |
8380 | cat confdefs.h >>conftest.$ac_ext | |
8381 | cat >>conftest.$ac_ext <<_ACEOF | |
8382 | /* end confdefs.h. */ | |
8383 | #include <thread.h> | |
8384 | _ACEOF | |
8385 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8386 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8387 | ac_status=$? | |
8388 | grep -v '^ *+' conftest.er1 >conftest.err | |
8389 | rm -f conftest.er1 | |
8390 | cat conftest.err >&5 | |
8391 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8392 | (exit $ac_status); } >/dev/null; then | |
8393 | if test -s conftest.err; then | |
8394 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8395 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8396 | else |
8397 | ac_cpp_err= | |
8398 | fi | |
8399 | else | |
8400 | ac_cpp_err=yes | |
8401 | fi | |
8402 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8403 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8404 | else |
8405 | echo "$as_me: failed program was:" >&5 | |
8406 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8407 | ||
18fc9bd4 | 8408 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8409 | fi |
8410 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8411 | fi |
ba479fd2 NN |
8412 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8413 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8414 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8415 | have_thread_h=yes |
8416 | else | |
ba479fd2 | 8417 | have_thread_h= |
f24af81b TT |
8418 | fi |
8419 | ||
18fc9bd4 | 8420 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8421 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8422 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8423 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 8424 | else |
18fc9bd4 | 8425 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8426 | /* confdefs.h. */ |
8427 | _ACEOF | |
8428 | cat confdefs.h >>conftest.$ac_ext | |
8429 | cat >>conftest.$ac_ext <<_ACEOF | |
8430 | /* end confdefs.h. */ | |
8431 | #include <pthread.h> | |
8432 | _ACEOF | |
8433 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8434 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8435 | ac_status=$? | |
8436 | grep -v '^ *+' conftest.er1 >conftest.err | |
8437 | rm -f conftest.er1 | |
8438 | cat conftest.err >&5 | |
8439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8440 | (exit $ac_status); } >/dev/null; then | |
8441 | if test -s conftest.err; then | |
8442 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8443 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8444 | else |
8445 | ac_cpp_err= | |
8446 | fi | |
8447 | else | |
8448 | ac_cpp_err=yes | |
8449 | fi | |
18fc9bd4 RG |
8450 | if test -z "$ac_cpp_err"; then |
8451 | ac_cv_header_pthread_h=yes | |
ba479fd2 | 8452 | else |
18fc9bd4 RG |
8453 | echo "$as_me: failed program was:" >&5 |
8454 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8455 | ||
8456 | ac_cv_header_pthread_h=no | |
8457 | fi | |
8458 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8459 | fi |
ba479fd2 NN |
8460 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8461 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8462 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8463 | have_pthread_h=yes |
8464 | else | |
ba479fd2 | 8465 | have_pthread_h= |
f24af81b TT |
8466 | fi |
8467 | ||
8468 | ||
84c041a1 | 8469 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8470 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8471 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8472 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8473 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8474 | else | |
8475 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8476 | /* confdefs.h. */ |
8477 | _ACEOF | |
8478 | cat confdefs.h >>conftest.$ac_ext | |
8479 | cat >>conftest.$ac_ext <<_ACEOF | |
8480 | /* end confdefs.h. */ | |
75e93faa ZW |
8481 | #ifdef HAVE_LIMITS_H |
8482 | #include <limits.h> | |
8483 | #endif | |
8484 | #ifdef CHAR_BIT | |
8485 | found | |
8486 | #endif | |
ba479fd2 | 8487 | _ACEOF |
75e93faa | 8488 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8489 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8490 | gcc_cv_decl_char_bit=yes |
8491 | else | |
75e93faa ZW |
8492 | gcc_cv_decl_char_bit=no |
8493 | fi | |
8494 | rm -f conftest* | |
8495 | ||
8496 | ||
8497 | fi | |
ba479fd2 NN |
8498 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8499 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8500 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8501 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8502 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8503 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8504 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8505 | else |
8506 | i=8 | |
8507 | gcc_cv_c_nbby= | |
8508 | while test $i -lt 65; do | |
ba479fd2 | 8509 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8510 | /* confdefs.h. */ |
8511 | _ACEOF | |
8512 | cat confdefs.h >>conftest.$ac_ext | |
8513 | cat >>conftest.$ac_ext <<_ACEOF | |
8514 | /* end confdefs.h. */ | |
8515 | ||
8516 | int | |
8517 | main () | |
8518 | { | |
4e70264f ZW |
8519 | switch(0) { |
8520 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8521 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8522 | ; } | |
ba479fd2 NN |
8523 | ; |
8524 | return 0; | |
8525 | } | |
8526 | _ACEOF | |
8527 | rm -f conftest.$ac_objext | |
8528 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8529 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8530 | ac_status=$? |
86da66b5 HPN |
8531 | grep -v '^ *+' conftest.er1 >conftest.err |
8532 | rm -f conftest.er1 | |
8533 | cat conftest.err >&5 | |
ba479fd2 NN |
8534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8535 | (exit $ac_status); } && | |
ec6c7392 PB |
8536 | { ac_try='test -z "$ac_c_werror_flag" |
8537 | || test ! -s conftest.err' | |
86da66b5 HPN |
8538 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8539 | (eval $ac_try) 2>&5 | |
8540 | ac_status=$? | |
8541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8542 | (exit $ac_status); }; } && | |
8543 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8544 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8545 | (eval $ac_try) 2>&5 | |
8546 | ac_status=$? | |
8547 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8548 | (exit $ac_status); }; }; then | |
4e70264f | 8549 | gcc_cv_c_nbby=$i; break |
75e93faa | 8550 | else |
ba479fd2 NN |
8551 | echo "$as_me: failed program was:" >&5 |
8552 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8553 | ||
75e93faa | 8554 | fi |
86da66b5 | 8555 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8556 | i=`expr $i + 1` |
8557 | done | |
8558 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8559 | ||
8560 | fi | |
ba479fd2 NN |
8561 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8562 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8563 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8564 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8565 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8566 | { (exit 1); exit 1; }; } | |
75e93faa | 8567 | else |
ba479fd2 NN |
8568 | |
8569 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8570 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8571 | _ACEOF |
75e93faa ZW |
8572 | |
8573 | fi | |
8574 | fi | |
ba479fd2 NN |
8575 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8576 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8577 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8578 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8579 | else |
9791c75c | 8580 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8581 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8582 | /* confdefs.h. */ |
8583 | _ACEOF | |
8584 | cat confdefs.h >>conftest.$ac_ext | |
8585 | cat >>conftest.$ac_ext <<_ACEOF | |
8586 | /* end confdefs.h. */ | |
4977bab6 ZW |
8587 | #include <sys/types.h> |
8588 | #include <sys/param.h> | |
9791c75c | 8589 | |
ba479fd2 NN |
8590 | int |
8591 | main () | |
8592 | { | |
4977bab6 ZW |
8593 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8594 | bogus endian macros | |
84c041a1 | 8595 | #endif |
9791c75c | 8596 | |
ba479fd2 NN |
8597 | ; |
8598 | return 0; | |
8599 | } | |
8600 | _ACEOF | |
8601 | rm -f conftest.$ac_objext | |
8602 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8603 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8604 | ac_status=$? |
86da66b5 HPN |
8605 | grep -v '^ *+' conftest.er1 >conftest.err |
8606 | rm -f conftest.er1 | |
8607 | cat conftest.err >&5 | |
ba479fd2 NN |
8608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8609 | (exit $ac_status); } && | |
ec6c7392 PB |
8610 | { ac_try='test -z "$ac_c_werror_flag" |
8611 | || test ! -s conftest.err' | |
86da66b5 HPN |
8612 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8613 | (eval $ac_try) 2>&5 | |
8614 | ac_status=$? | |
8615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8616 | (exit $ac_status); }; } && | |
8617 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8618 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8619 | (eval $ac_try) 2>&5 | |
8620 | ac_status=$? | |
8621 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8622 | (exit $ac_status); }; }; then | |
4977bab6 | 8623 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8624 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8625 | /* confdefs.h. */ |
8626 | _ACEOF | |
8627 | cat confdefs.h >>conftest.$ac_ext | |
8628 | cat >>conftest.$ac_ext <<_ACEOF | |
8629 | /* end confdefs.h. */ | |
4977bab6 ZW |
8630 | #include <sys/types.h> |
8631 | #include <sys/param.h> | |
9791c75c | 8632 | |
ba479fd2 NN |
8633 | int |
8634 | main () | |
8635 | { | |
4977bab6 ZW |
8636 | #if BYTE_ORDER != BIG_ENDIAN |
8637 | not big endian | |
84c041a1 | 8638 | #endif |
9791c75c | 8639 | |
ba479fd2 NN |
8640 | ; |
8641 | return 0; | |
8642 | } | |
8643 | _ACEOF | |
8644 | rm -f conftest.$ac_objext | |
8645 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8646 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8647 | ac_status=$? |
86da66b5 HPN |
8648 | grep -v '^ *+' conftest.er1 >conftest.err |
8649 | rm -f conftest.er1 | |
8650 | cat conftest.err >&5 | |
ba479fd2 NN |
8651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8652 | (exit $ac_status); } && | |
ec6c7392 PB |
8653 | { ac_try='test -z "$ac_c_werror_flag" |
8654 | || test ! -s conftest.err' | |
86da66b5 HPN |
8655 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8656 | (eval $ac_try) 2>&5 | |
8657 | ac_status=$? | |
8658 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8659 | (exit $ac_status); }; } && | |
8660 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8661 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8662 | (eval $ac_try) 2>&5 | |
8663 | ac_status=$? | |
8664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8665 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8666 | ac_cv_c_bigendian=yes |
8667 | else | |
ba479fd2 NN |
8668 | echo "$as_me: failed program was:" >&5 |
8669 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8670 | ||
8671 | ac_cv_c_bigendian=no | |
4977bab6 | 8672 | fi |
86da66b5 | 8673 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8674 | else |
ba479fd2 NN |
8675 | echo "$as_me: failed program was:" >&5 |
8676 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8677 | ||
9791c75c KC |
8678 | # It does not; compile a test program. |
8679 | if test "$cross_compiling" = yes; then | |
8680 | # try to guess the endianness by grepping values into an object file | |
8681 | ac_cv_c_bigendian=unknown | |
8682 | cat >conftest.$ac_ext <<_ACEOF | |
8683 | /* confdefs.h. */ | |
8684 | _ACEOF | |
8685 | cat confdefs.h >>conftest.$ac_ext | |
8686 | cat >>conftest.$ac_ext <<_ACEOF | |
8687 | /* end confdefs.h. */ | |
8688 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8689 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8690 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8691 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8692 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8693 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8694 | int | |
8695 | main () | |
8696 | { | |
8697 | _ascii (); _ebcdic (); | |
8698 | ; | |
8699 | return 0; | |
8700 | } | |
8701 | _ACEOF | |
8702 | rm -f conftest.$ac_objext | |
8703 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8704 | (eval $ac_compile) 2>conftest.er1 | |
8705 | ac_status=$? | |
8706 | grep -v '^ *+' conftest.er1 >conftest.err | |
8707 | rm -f conftest.er1 | |
8708 | cat conftest.err >&5 | |
8709 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8710 | (exit $ac_status); } && | |
ec6c7392 PB |
8711 | { ac_try='test -z "$ac_c_werror_flag" |
8712 | || test ! -s conftest.err' | |
9791c75c KC |
8713 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8714 | (eval $ac_try) 2>&5 | |
8715 | ac_status=$? | |
8716 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8717 | (exit $ac_status); }; } && | |
8718 | { ac_try='test -s conftest.$ac_objext' | |
8719 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8720 | (eval $ac_try) 2>&5 | |
8721 | ac_status=$? | |
8722 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8723 | (exit $ac_status); }; }; then | |
8724 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8725 | ac_cv_c_bigendian=yes | |
8726 | fi | |
8727 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8728 | if test "$ac_cv_c_bigendian" = unknown; then | |
8729 | ac_cv_c_bigendian=no | |
8730 | else | |
8731 | # finding both strings is unlikely to happen, but who knows? | |
8732 | ac_cv_c_bigendian=unknown | |
8733 | fi | |
8734 | fi | |
8735 | else | |
8736 | echo "$as_me: failed program was:" >&5 | |
8737 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8738 | ||
4977bab6 | 8739 | fi |
86da66b5 | 8740 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8741 | else |
8742 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8743 | /* confdefs.h. */ |
8744 | _ACEOF | |
8745 | cat confdefs.h >>conftest.$ac_ext | |
8746 | cat >>conftest.$ac_ext <<_ACEOF | |
8747 | /* end confdefs.h. */ | |
9791c75c KC |
8748 | int |
8749 | main () | |
8750 | { | |
4977bab6 ZW |
8751 | /* Are we little or big endian? From Harbison&Steele. */ |
8752 | union | |
8753 | { | |
8754 | long l; | |
8755 | char c[sizeof (long)]; | |
8756 | } u; | |
8757 | u.l = 1; | |
8758 | exit (u.c[sizeof (long) - 1] == 1); | |
8759 | } | |
ba479fd2 NN |
8760 | _ACEOF |
8761 | rm -f conftest$ac_exeext | |
8762 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8763 | (eval $ac_link) 2>&5 | |
8764 | ac_status=$? | |
8765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8766 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8768 | (eval $ac_try) 2>&5 | |
8769 | ac_status=$? | |
8770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8771 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8772 | ac_cv_c_bigendian=no |
8773 | else | |
ba479fd2 NN |
8774 | echo "$as_me: program exited with status $ac_status" >&5 |
8775 | echo "$as_me: failed program was:" >&5 | |
8776 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8777 | ||
8778 | ( exit $ac_status ) | |
8779 | ac_cv_c_bigendian=yes | |
4977bab6 | 8780 | fi |
86da66b5 | 8781 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8782 | fi |
4977bab6 | 8783 | fi |
9791c75c | 8784 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8785 | fi |
ba479fd2 NN |
8786 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8787 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8788 | case $ac_cv_c_bigendian in |
8789 | yes) | |
ba479fd2 NN |
8790 | |
8791 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8792 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8793 | _ACEOF |
9791c75c KC |
8794 | ;; |
8795 | no) | |
8796 | ;; | |
8797 | *) | |
8798 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8799 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8800 | echo "$as_me: error: unknown endianness | |
8801 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8802 | { (exit 1); exit 1; }; } ;; | |
8803 | esac | |
84c041a1 | 8804 | |
75e93faa | 8805 | |
73458fb7 NN |
8806 | # -------- |
8807 | # UNSORTED | |
8808 | # -------- | |
1e608388 | 8809 | |
73458fb7 NN |
8810 | # Stage specific cflags for build. |
8811 | stage1_cflags= | |
8812 | case $build in | |
8813 | vax-*-*) | |
8814 | if test x$GCC = xyes | |
8815 | then | |
8816 | stage1_cflags="-Wa,-J" | |
8817 | else | |
8818 | stage1_cflags="-J" | |
8819 | fi | |
8820 | ;; | |
8821 | powerpc-*-darwin*) | |
8822 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8823 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8824 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8825 | # that too. | |
8826 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8827 | ;; | |
8828 | esac | |
1e608388 | 8829 | |
1e608388 | 8830 | |
4e70264f ZW |
8831 | # These libraries may be used by collect2. |
8832 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8833 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8834 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8835 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8837 | else |
8838 | save_LIBS="$LIBS" | |
7f2749d4 | 8839 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8840 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8841 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8842 | do | |
8843 | LIBS="$libs" | |
ba479fd2 | 8844 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8845 | /* confdefs.h. */ |
8846 | _ACEOF | |
8847 | cat confdefs.h >>conftest.$ac_ext | |
8848 | cat >>conftest.$ac_ext <<_ACEOF | |
8849 | /* end confdefs.h. */ | |
8850 | ||
4e70264f | 8851 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8852 | #ifdef __cplusplus |
8853 | extern "C" | |
8854 | #endif | |
4e70264f | 8855 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8856 | builtin and then its argument prototype would still apply. */ |
8857 | char ldopen (); | |
8858 | int | |
8859 | main () | |
8860 | { | |
8861 | ldopen (); | |
8862 | ; | |
8863 | return 0; | |
8864 | } | |
8865 | _ACEOF | |
8866 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8867 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8868 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8869 | ac_status=$? |
86da66b5 HPN |
8870 | grep -v '^ *+' conftest.er1 >conftest.err |
8871 | rm -f conftest.er1 | |
8872 | cat conftest.err >&5 | |
ba479fd2 NN |
8873 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8874 | (exit $ac_status); } && | |
ec6c7392 PB |
8875 | { ac_try='test -z "$ac_c_werror_flag" |
8876 | || test ! -s conftest.err' | |
86da66b5 HPN |
8877 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8878 | (eval $ac_try) 2>&5 | |
8879 | ac_status=$? | |
8880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8881 | (exit $ac_status); }; } && | |
8882 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8883 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8884 | (eval $ac_try) 2>&5 | |
8885 | ac_status=$? | |
8886 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8887 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8888 | gcc_cv_collect2_libs="$libs"; break |
8889 | else | |
ba479fd2 NN |
8890 | echo "$as_me: failed program was:" >&5 |
8891 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8892 | ||
4e70264f | 8893 | fi |
86da66b5 HPN |
8894 | rm -f conftest.err conftest.$ac_objext \ |
8895 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8896 | done |
8897 | LIBS="$save_LIBS" | |
8898 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8899 | fi | |
ba479fd2 NN |
8900 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8901 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8902 | case $gcc_cv_collect2_libs in |
8903 | "none required") ;; | |
8904 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8905 | esac | |
8906 | ||
8907 | ||
7f2749d4 RK |
8908 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8909 | # -lexc. So test for it. | |
8910 | save_LIBS="$LIBS" | |
8911 | LIBS= | |
ba479fd2 NN |
8912 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8913 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8914 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8915 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8916 | else | |
8917 | ac_func_search_save_LIBS=$LIBS | |
8918 | ac_cv_search_exc_resume=no | |
8919 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8920 | /* confdefs.h. */ |
8921 | _ACEOF | |
8922 | cat confdefs.h >>conftest.$ac_ext | |
8923 | cat >>conftest.$ac_ext <<_ACEOF | |
8924 | /* end confdefs.h. */ | |
7f2749d4 | 8925 | |
7f2749d4 | 8926 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8927 | #ifdef __cplusplus |
8928 | extern "C" | |
8929 | #endif | |
7f2749d4 | 8930 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8931 | builtin and then its argument prototype would still apply. */ |
8932 | char exc_resume (); | |
8933 | int | |
8934 | main () | |
8935 | { | |
8936 | exc_resume (); | |
8937 | ; | |
8938 | return 0; | |
8939 | } | |
8940 | _ACEOF | |
8941 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8942 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8943 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8944 | ac_status=$? |
86da66b5 HPN |
8945 | grep -v '^ *+' conftest.er1 >conftest.err |
8946 | rm -f conftest.er1 | |
8947 | cat conftest.err >&5 | |
ba479fd2 NN |
8948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8949 | (exit $ac_status); } && | |
ec6c7392 PB |
8950 | { ac_try='test -z "$ac_c_werror_flag" |
8951 | || test ! -s conftest.err' | |
86da66b5 HPN |
8952 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8953 | (eval $ac_try) 2>&5 | |
8954 | ac_status=$? | |
8955 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8956 | (exit $ac_status); }; } && | |
8957 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8958 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8959 | (eval $ac_try) 2>&5 | |
8960 | ac_status=$? | |
8961 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8962 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8963 | ac_cv_search_exc_resume="none required" |
8964 | else | |
ba479fd2 NN |
8965 | echo "$as_me: failed program was:" >&5 |
8966 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8967 | ||
7f2749d4 | 8968 | fi |
86da66b5 HPN |
8969 | rm -f conftest.err conftest.$ac_objext \ |
8970 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8971 | if test "$ac_cv_search_exc_resume" = no; then |
8972 | for ac_lib in exc; do | |
8973 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8974 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8975 | /* confdefs.h. */ |
8976 | _ACEOF | |
8977 | cat confdefs.h >>conftest.$ac_ext | |
8978 | cat >>conftest.$ac_ext <<_ACEOF | |
8979 | /* end confdefs.h. */ | |
8980 | ||
7f2749d4 | 8981 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8982 | #ifdef __cplusplus |
8983 | extern "C" | |
8984 | #endif | |
7f2749d4 | 8985 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8986 | builtin and then its argument prototype would still apply. */ |
8987 | char exc_resume (); | |
8988 | int | |
8989 | main () | |
8990 | { | |
8991 | exc_resume (); | |
8992 | ; | |
8993 | return 0; | |
8994 | } | |
8995 | _ACEOF | |
8996 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8997 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8998 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8999 | ac_status=$? |
86da66b5 HPN |
9000 | grep -v '^ *+' conftest.er1 >conftest.err |
9001 | rm -f conftest.er1 | |
9002 | cat conftest.err >&5 | |
ba479fd2 NN |
9003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9004 | (exit $ac_status); } && | |
ec6c7392 PB |
9005 | { ac_try='test -z "$ac_c_werror_flag" |
9006 | || test ! -s conftest.err' | |
86da66b5 HPN |
9007 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9008 | (eval $ac_try) 2>&5 | |
9009 | ac_status=$? | |
9010 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9011 | (exit $ac_status); }; } && | |
9012 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9013 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9014 | (eval $ac_try) 2>&5 | |
9015 | ac_status=$? | |
9016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9017 | (exit $ac_status); }; }; then | |
9018 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
9019 | break |
9020 | else | |
ba479fd2 NN |
9021 | echo "$as_me: failed program was:" >&5 |
9022 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9023 | ||
cafe096b | 9024 | fi |
86da66b5 HPN |
9025 | rm -f conftest.err conftest.$ac_objext \ |
9026 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9027 | done |
6e3f3080 | 9028 | fi |
ba479fd2 NN |
9029 | LIBS=$ac_func_search_save_LIBS |
9030 | fi | |
9031 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
9032 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
9033 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 9034 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 9035 | |
7f2749d4 | 9036 | fi |
ba479fd2 | 9037 | |
7f2749d4 RK |
9038 | GNAT_LIBEXC="$LIBS" |
9039 | LIBS="$save_LIBS" | |
9040 | ||
9041 | ||
62c9aa5f ZW |
9042 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9043 | # they're both in the same place. jcf-dump needs them. | |
9044 | save_LIBS="$LIBS" | |
9045 | LIBS= | |
ba479fd2 NN |
9046 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9047 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
9048 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9049 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9050 | else | |
9051 | ac_func_search_save_LIBS=$LIBS | |
9052 | ac_cv_search_ldexp=no | |
9053 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9054 | /* confdefs.h. */ |
9055 | _ACEOF | |
9056 | cat confdefs.h >>conftest.$ac_ext | |
9057 | cat >>conftest.$ac_ext <<_ACEOF | |
9058 | /* end confdefs.h. */ | |
62c9aa5f | 9059 | |
62c9aa5f | 9060 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9061 | #ifdef __cplusplus |
9062 | extern "C" | |
9063 | #endif | |
62c9aa5f | 9064 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9065 | builtin and then its argument prototype would still apply. */ |
9066 | char ldexp (); | |
9067 | int | |
9068 | main () | |
9069 | { | |
9070 | ldexp (); | |
9071 | ; | |
9072 | return 0; | |
9073 | } | |
9074 | _ACEOF | |
9075 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9076 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9077 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9078 | ac_status=$? |
86da66b5 HPN |
9079 | grep -v '^ *+' conftest.er1 >conftest.err |
9080 | rm -f conftest.er1 | |
9081 | cat conftest.err >&5 | |
ba479fd2 NN |
9082 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9083 | (exit $ac_status); } && | |
ec6c7392 PB |
9084 | { ac_try='test -z "$ac_c_werror_flag" |
9085 | || test ! -s conftest.err' | |
86da66b5 HPN |
9086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9087 | (eval $ac_try) 2>&5 | |
9088 | ac_status=$? | |
9089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9090 | (exit $ac_status); }; } && | |
9091 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9092 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9093 | (eval $ac_try) 2>&5 | |
9094 | ac_status=$? | |
9095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9096 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
9097 | ac_cv_search_ldexp="none required" |
9098 | else | |
ba479fd2 NN |
9099 | echo "$as_me: failed program was:" >&5 |
9100 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9101 | ||
62c9aa5f | 9102 | fi |
86da66b5 HPN |
9103 | rm -f conftest.err conftest.$ac_objext \ |
9104 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9105 | if test "$ac_cv_search_ldexp" = no; then |
9106 | for ac_lib in m; do | |
9107 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9108 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9109 | /* confdefs.h. */ |
9110 | _ACEOF | |
9111 | cat confdefs.h >>conftest.$ac_ext | |
9112 | cat >>conftest.$ac_ext <<_ACEOF | |
9113 | /* end confdefs.h. */ | |
9114 | ||
62c9aa5f | 9115 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9116 | #ifdef __cplusplus |
9117 | extern "C" | |
9118 | #endif | |
62c9aa5f | 9119 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9120 | builtin and then its argument prototype would still apply. */ |
9121 | char ldexp (); | |
9122 | int | |
9123 | main () | |
9124 | { | |
9125 | ldexp (); | |
9126 | ; | |
9127 | return 0; | |
9128 | } | |
9129 | _ACEOF | |
9130 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9131 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9132 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9133 | ac_status=$? |
86da66b5 HPN |
9134 | grep -v '^ *+' conftest.er1 >conftest.err |
9135 | rm -f conftest.er1 | |
9136 | cat conftest.err >&5 | |
ba479fd2 NN |
9137 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9138 | (exit $ac_status); } && | |
ec6c7392 PB |
9139 | { ac_try='test -z "$ac_c_werror_flag" |
9140 | || test ! -s conftest.err' | |
86da66b5 HPN |
9141 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9142 | (eval $ac_try) 2>&5 | |
9143 | ac_status=$? | |
9144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9145 | (exit $ac_status); }; } && | |
9146 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9148 | (eval $ac_try) 2>&5 | |
9149 | ac_status=$? | |
9150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9151 | (exit $ac_status); }; }; then | |
9152 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
9153 | break |
9154 | else | |
ba479fd2 NN |
9155 | echo "$as_me: failed program was:" >&5 |
9156 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9157 | ||
cafe096b | 9158 | fi |
86da66b5 HPN |
9159 | rm -f conftest.err conftest.$ac_objext \ |
9160 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9161 | done |
6e3f3080 | 9162 | fi |
ba479fd2 NN |
9163 | LIBS=$ac_func_search_save_LIBS |
9164 | fi | |
9165 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
9166 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9167 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9168 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9169 | |
62c9aa5f | 9170 | fi |
ba479fd2 | 9171 | |
62c9aa5f ZW |
9172 | LDEXP_LIB="$LIBS" |
9173 | LIBS="$save_LIBS" | |
9174 | ||
9175 | ||
956d6950 JL |
9176 | # Use <inttypes.h> only if it exists, |
9177 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9178 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9179 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9180 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9182 | else | |
9183 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9184 | /* confdefs.h. */ |
9185 | _ACEOF | |
9186 | cat confdefs.h >>conftest.$ac_ext | |
9187 | cat >>conftest.$ac_ext <<_ACEOF | |
9188 | /* end confdefs.h. */ | |
956d6950 JL |
9189 | #include <sys/types.h> |
9190 | #include <inttypes.h> | |
ba479fd2 NN |
9191 | int |
9192 | main () | |
9193 | { | |
956d6950 | 9194 | intmax_t i = -1; |
ba479fd2 NN |
9195 | ; |
9196 | return 0; | |
9197 | } | |
9198 | _ACEOF | |
9199 | rm -f conftest.$ac_objext | |
9200 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9201 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9202 | ac_status=$? |
86da66b5 HPN |
9203 | grep -v '^ *+' conftest.er1 >conftest.err |
9204 | rm -f conftest.er1 | |
9205 | cat conftest.err >&5 | |
ba479fd2 NN |
9206 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9207 | (exit $ac_status); } && | |
ec6c7392 PB |
9208 | { ac_try='test -z "$ac_c_werror_flag" |
9209 | || test ! -s conftest.err' | |
86da66b5 HPN |
9210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9211 | (eval $ac_try) 2>&5 | |
9212 | ac_status=$? | |
9213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9214 | (exit $ac_status); }; } && | |
9215 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9217 | (eval $ac_try) 2>&5 | |
9218 | ac_status=$? | |
9219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9220 | (exit $ac_status); }; }; then | |
0056a9b5 | 9221 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9222 | else |
ba479fd2 NN |
9223 | echo "$as_me: failed program was:" >&5 |
9224 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9225 | ||
9226 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9227 | fi |
86da66b5 | 9228 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9229 | fi |
9230 | ||
ba479fd2 NN |
9231 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9232 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9233 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9234 | |
9235 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9236 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9237 | _ACEOF |
0056a9b5 KG |
9238 | |
9239 | fi | |
956d6950 | 9240 | |
c149cc37 | 9241 | |
ba479fd2 NN |
9242 | |
9243 | ||
9244 | ||
9245 | ||
9246 | ||
9247 | ||
9248 | ||
9249 | ||
9250 | ||
9251 | ||
9252 | ||
9253 | ||
9254 | ||
9255 | ||
9256 | ||
9257 | ||
0d667716 KG |
9258 | |
9259 | ||
9260 | ||
9261 | ||
9262 | ||
9263 | ||
9264 | ||
9265 | ||
9266 | ||
9267 | ||
9268 | ||
9269 | ||
ba479fd2 NN |
9270 | |
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
9276 | ||
9277 | ||
52a6edcc | 9278 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9279 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9280 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9281 | clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked | |
956d6950 | 9282 | do |
ba479fd2 NN |
9283 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9284 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9285 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9286 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9287 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9288 | else | |
9289 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9290 | /* confdefs.h. */ |
9291 | _ACEOF | |
9292 | cat confdefs.h >>conftest.$ac_ext | |
9293 | cat >>conftest.$ac_ext <<_ACEOF | |
9294 | /* end confdefs.h. */ | |
86da66b5 HPN |
9295 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9296 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9297 | #define $ac_func innocuous_$ac_func | |
9298 | ||
956d6950 | 9299 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9300 | which can conflict with char $ac_func (); below. |
9301 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9302 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9303 | |
ba479fd2 NN |
9304 | #ifdef __STDC__ |
9305 | # include <limits.h> | |
9306 | #else | |
9307 | # include <assert.h> | |
9308 | #endif | |
86da66b5 HPN |
9309 | |
9310 | #undef $ac_func | |
9311 | ||
6e3f3080 | 9312 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9313 | #ifdef __cplusplus |
9314 | extern "C" | |
9315 | { | |
9316 | #endif | |
6e3f3080 | 9317 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9318 | builtin and then its argument prototype would still apply. */ |
9319 | char $ac_func (); | |
956d6950 JL |
9320 | /* The GNU C library defines this for functions which it implements |
9321 | to always fail with ENOSYS. Some functions are actually named | |
9322 | something starting with __ and the normal name is an alias. */ | |
9323 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9324 | choke me | |
9325 | #else | |
ba479fd2 NN |
9326 | char (*f) () = $ac_func; |
9327 | #endif | |
9328 | #ifdef __cplusplus | |
9329 | } | |
956d6950 JL |
9330 | #endif |
9331 | ||
ba479fd2 NN |
9332 | int |
9333 | main () | |
9334 | { | |
9335 | return f != $ac_func; | |
9336 | ; | |
9337 | return 0; | |
9338 | } | |
9339 | _ACEOF | |
9340 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9341 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9342 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9343 | ac_status=$? |
86da66b5 HPN |
9344 | grep -v '^ *+' conftest.er1 >conftest.err |
9345 | rm -f conftest.er1 | |
9346 | cat conftest.err >&5 | |
ba479fd2 NN |
9347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9348 | (exit $ac_status); } && | |
ec6c7392 PB |
9349 | { ac_try='test -z "$ac_c_werror_flag" |
9350 | || test ! -s conftest.err' | |
86da66b5 HPN |
9351 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9352 | (eval $ac_try) 2>&5 | |
9353 | ac_status=$? | |
9354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9355 | (exit $ac_status); }; } && | |
9356 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9358 | (eval $ac_try) 2>&5 | |
9359 | ac_status=$? | |
9360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9361 | (exit $ac_status); }; }; then | |
9362 | eval "$as_ac_var=yes" | |
9363 | else | |
9364 | echo "$as_me: failed program was:" >&5 | |
9365 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9366 | ||
9367 | eval "$as_ac_var=no" | |
9368 | fi | |
86da66b5 HPN |
9369 | rm -f conftest.err conftest.$ac_objext \ |
9370 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9371 | fi |
9372 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9373 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9374 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9375 | cat >>confdefs.h <<_ACEOF | |
9376 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9377 | _ACEOF | |
956d6950 | 9378 | |
956d6950 JL |
9379 | fi |
9380 | done | |
9381 | ||
6885fc87 | 9382 | |
39f6c4c8 | 9383 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9384 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9385 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9386 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9387 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9388 | else |
9389 | if test "$cross_compiling" = yes; then | |
9390 | gcc_cv_func_mbstowcs_works=yes | |
9391 | else | |
ba479fd2 | 9392 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9393 | /* confdefs.h. */ |
9394 | _ACEOF | |
9395 | cat confdefs.h >>conftest.$ac_ext | |
9396 | cat >>conftest.$ac_ext <<_ACEOF | |
9397 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9398 | #include <stdlib.h> |
9399 | int main() | |
9400 | { | |
9401 | mbstowcs(0, "", 0); | |
9402 | return 0; | |
9403 | } | |
ba479fd2 NN |
9404 | _ACEOF |
9405 | rm -f conftest$ac_exeext | |
9406 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9407 | (eval $ac_link) 2>&5 | |
9408 | ac_status=$? | |
9409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9410 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9411 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9412 | (eval $ac_try) 2>&5 | |
9413 | ac_status=$? | |
9414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9415 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9416 | gcc_cv_func_mbstowcs_works=yes |
9417 | else | |
ba479fd2 NN |
9418 | echo "$as_me: program exited with status $ac_status" >&5 |
9419 | echo "$as_me: failed program was:" >&5 | |
9420 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9421 | ||
9422 | ( exit $ac_status ) | |
9423 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9424 | fi |
86da66b5 | 9425 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9426 | fi |
39f6c4c8 | 9427 | fi |
ba479fd2 NN |
9428 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9429 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9430 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9431 | |
9432 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9433 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9434 | _ACEOF |
39f6c4c8 KW |
9435 | |
9436 | fi | |
9437 | fi | |
9438 | ||
ba479fd2 NN |
9439 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9440 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9441 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9442 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9443 | else |
ba479fd2 | 9444 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9445 | /* confdefs.h. */ |
9446 | _ACEOF | |
9447 | cat confdefs.h >>conftest.$ac_ext | |
9448 | cat >>conftest.$ac_ext <<_ACEOF | |
9449 | /* end confdefs.h. */ | |
8b4fc07a NN |
9450 | $ac_includes_default |
9451 | int | |
9452 | main () | |
9453 | { | |
9454 | if ((ssize_t *) 0) | |
9455 | return 0; | |
9456 | if (sizeof (ssize_t)) | |
9457 | return 0; | |
9458 | ; | |
9459 | return 0; | |
9460 | } | |
ba479fd2 | 9461 | _ACEOF |
8b4fc07a NN |
9462 | rm -f conftest.$ac_objext |
9463 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9464 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9465 | ac_status=$? |
86da66b5 HPN |
9466 | grep -v '^ *+' conftest.er1 >conftest.err |
9467 | rm -f conftest.er1 | |
9468 | cat conftest.err >&5 | |
8b4fc07a NN |
9469 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9470 | (exit $ac_status); } && | |
ec6c7392 PB |
9471 | { ac_try='test -z "$ac_c_werror_flag" |
9472 | || test ! -s conftest.err' | |
86da66b5 HPN |
9473 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9474 | (eval $ac_try) 2>&5 | |
9475 | ac_status=$? | |
9476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9477 | (exit $ac_status); }; } && | |
9478 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9479 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9480 | (eval $ac_try) 2>&5 | |
9481 | ac_status=$? | |
9482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9483 | (exit $ac_status); }; }; then | |
cb65112a | 9484 | ac_cv_type_ssize_t=yes |
f12bc141 | 9485 | else |
8b4fc07a NN |
9486 | echo "$as_me: failed program was:" >&5 |
9487 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9488 | |
8b4fc07a NN |
9489 | ac_cv_type_ssize_t=no |
9490 | fi | |
86da66b5 | 9491 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9492 | fi |
ba479fd2 NN |
9493 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9494 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9495 | if test $ac_cv_type_ssize_t = yes; then |
9496 | : | |
9497 | else | |
ba479fd2 | 9498 | |
8b4fc07a | 9499 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9500 | #define ssize_t int |
ba479fd2 | 9501 | _ACEOF |
f12bc141 ZW |
9502 | |
9503 | fi | |
9504 | ||
0b9d02c6 | 9505 | |
e256b8b6 DA |
9506 | # Try to determine the array type of the second argument of getgroups |
9507 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9508 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9509 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9510 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9511 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9512 | else | |
9513 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9514 | /* confdefs.h. */ |
9515 | _ACEOF | |
9516 | cat confdefs.h >>conftest.$ac_ext | |
9517 | cat >>conftest.$ac_ext <<_ACEOF | |
9518 | /* end confdefs.h. */ | |
e256b8b6 | 9519 | #include <sys/types.h> |
ba479fd2 NN |
9520 | |
9521 | _ACEOF | |
e256b8b6 | 9522 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9523 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9524 | ac_cv_type_uid_t=yes |
9525 | else | |
e256b8b6 DA |
9526 | ac_cv_type_uid_t=no |
9527 | fi | |
9528 | rm -f conftest* | |
9529 | ||
9530 | fi | |
ba479fd2 NN |
9531 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9532 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9533 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9534 | |
9535 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9536 | #define uid_t int |
ba479fd2 | 9537 | _ACEOF |
cafe096b | 9538 | |
ba479fd2 NN |
9539 | |
9540 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9541 | #define gid_t int |
ba479fd2 | 9542 | _ACEOF |
e256b8b6 DA |
9543 | |
9544 | fi | |
9545 | ||
ba479fd2 NN |
9546 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9547 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9548 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9549 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9550 | else |
9551 | if test "$cross_compiling" = yes; then | |
9552 | ac_cv_type_getgroups=cross | |
9553 | else | |
ba479fd2 | 9554 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9555 | /* confdefs.h. */ |
9556 | _ACEOF | |
9557 | cat confdefs.h >>conftest.$ac_ext | |
9558 | cat >>conftest.$ac_ext <<_ACEOF | |
9559 | /* end confdefs.h. */ | |
e256b8b6 DA |
9560 | /* Thanks to Mike Rendell for this test. */ |
9561 | #include <sys/types.h> | |
9562 | #define NGID 256 | |
9563 | #undef MAX | |
9564 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9565 | |
9566 | int | |
9567 | main () | |
e256b8b6 DA |
9568 | { |
9569 | gid_t gidset[NGID]; | |
9570 | int i, n; | |
9571 | union { gid_t gval; long lval; } val; | |
9572 | ||
9573 | val.lval = -1; | |
9574 | for (i = 0; i < NGID; i++) | |
9575 | gidset[i] = val.gval; | |
9576 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9577 | gidset); |
e256b8b6 DA |
9578 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9579 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9580 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9581 | } |
ba479fd2 NN |
9582 | _ACEOF |
9583 | rm -f conftest$ac_exeext | |
9584 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9585 | (eval $ac_link) 2>&5 | |
9586 | ac_status=$? | |
9587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9588 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9589 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9590 | (eval $ac_try) 2>&5 | |
9591 | ac_status=$? | |
9592 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9593 | (exit $ac_status); }; }; then | |
9594 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9595 | else |
ba479fd2 NN |
9596 | echo "$as_me: program exited with status $ac_status" >&5 |
9597 | echo "$as_me: failed program was:" >&5 | |
9598 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9599 | ||
9600 | ( exit $ac_status ) | |
9601 | ac_cv_type_getgroups=int | |
e256b8b6 | 9602 | fi |
86da66b5 | 9603 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9604 | fi |
e256b8b6 | 9605 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9606 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9607 | /* confdefs.h. */ |
9608 | _ACEOF | |
9609 | cat confdefs.h >>conftest.$ac_ext | |
9610 | cat >>conftest.$ac_ext <<_ACEOF | |
9611 | /* end confdefs.h. */ | |
e256b8b6 | 9612 | #include <unistd.h> |
ba479fd2 NN |
9613 | |
9614 | _ACEOF | |
e256b8b6 | 9615 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9616 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9617 | ac_cv_type_getgroups=gid_t |
9618 | else | |
e256b8b6 DA |
9619 | ac_cv_type_getgroups=int |
9620 | fi | |
9621 | rm -f conftest* | |
9622 | ||
9623 | fi | |
9624 | fi | |
ba479fd2 NN |
9625 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9626 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9627 | |
ba479fd2 | 9628 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9629 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9630 | _ACEOF |
e256b8b6 DA |
9631 | |
9632 | ||
9633 | if test "${target}" = "${build}"; then | |
9634 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9635 | else | |
9636 | case "${target}" in | |
9637 | # This condition may need some tweaking. It should include all | |
9638 | # targets where the array type of the second argument of getgroups | |
9639 | # is int and the type of gid_t is not equivalent to int. | |
9640 | *-*-sunos* | *-*-ultrix*) | |
9641 | TARGET_GETGROUPS_T=int | |
9642 | ;; | |
9643 | *) | |
9644 | TARGET_GETGROUPS_T=gid_t | |
9645 | ;; | |
9646 | esac | |
9647 | fi | |
9648 | ||
9649 | ||
3b0727a0 | 9650 | |
18fc9bd4 | 9651 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
3b0727a0 MR |
9652 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 |
9653 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9654 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9655 | else |
18fc9bd4 | 9656 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
9657 | /* confdefs.h. */ |
9658 | _ACEOF | |
9659 | cat confdefs.h >>conftest.$ac_ext | |
9660 | cat >>conftest.$ac_ext <<_ACEOF | |
9661 | /* end confdefs.h. */ | |
9662 | #include <sys/mman.h> | |
9663 | _ACEOF | |
9664 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9665 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9666 | ac_status=$? | |
9667 | grep -v '^ *+' conftest.er1 >conftest.err | |
9668 | rm -f conftest.er1 | |
9669 | cat conftest.err >&5 | |
9670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9671 | (exit $ac_status); } >/dev/null; then | |
9672 | if test -s conftest.err; then | |
9673 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9674 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9675 | else | |
9676 | ac_cpp_err= | |
9677 | fi | |
9678 | else | |
9679 | ac_cpp_err=yes | |
9680 | fi | |
9681 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 9682 | ac_cv_header_sys_mman_h=yes |
3b0727a0 MR |
9683 | else |
9684 | echo "$as_me: failed program was:" >&5 | |
9685 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9686 | ||
18fc9bd4 | 9687 | ac_cv_header_sys_mman_h=no |
3b0727a0 MR |
9688 | fi |
9689 | rm -f conftest.err conftest.$ac_ext | |
9690 | fi | |
9691 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9692 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9693 | if test $ac_cv_header_sys_mman_h = yes; then | |
9694 | gcc_header_sys_mman_h=yes | |
9695 | else | |
9696 | gcc_header_sys_mman_h=no | |
9697 | fi | |
9698 | ||
9699 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9700 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9701 | if test "${ac_cv_func_mmap+set}" = set; then | |
9702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9703 | else | |
9704 | cat >conftest.$ac_ext <<_ACEOF | |
9705 | /* confdefs.h. */ | |
9706 | _ACEOF | |
9707 | cat confdefs.h >>conftest.$ac_ext | |
9708 | cat >>conftest.$ac_ext <<_ACEOF | |
9709 | /* end confdefs.h. */ | |
9710 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9711 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9712 | #define mmap innocuous_mmap | |
9713 | ||
9714 | /* System header to define __stub macros and hopefully few prototypes, | |
9715 | which can conflict with char mmap (); below. | |
9716 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9717 | <limits.h> exists even on freestanding compilers. */ | |
9718 | ||
9719 | #ifdef __STDC__ | |
9720 | # include <limits.h> | |
9721 | #else | |
9722 | # include <assert.h> | |
9723 | #endif | |
9724 | ||
9725 | #undef mmap | |
9726 | ||
9727 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9728 | #ifdef __cplusplus | |
9729 | extern "C" | |
9730 | { | |
9731 | #endif | |
9732 | /* We use char because int might match the return type of a gcc2 | |
9733 | builtin and then its argument prototype would still apply. */ | |
9734 | char mmap (); | |
9735 | /* The GNU C library defines this for functions which it implements | |
9736 | to always fail with ENOSYS. Some functions are actually named | |
9737 | something starting with __ and the normal name is an alias. */ | |
9738 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9739 | choke me | |
9740 | #else | |
9741 | char (*f) () = mmap; | |
9742 | #endif | |
9743 | #ifdef __cplusplus | |
9744 | } | |
9745 | #endif | |
9746 | ||
9747 | int | |
9748 | main () | |
9749 | { | |
9750 | return f != mmap; | |
9751 | ; | |
9752 | return 0; | |
9753 | } | |
9754 | _ACEOF | |
9755 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9756 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9757 | (eval $ac_link) 2>conftest.er1 | |
9758 | ac_status=$? | |
9759 | grep -v '^ *+' conftest.er1 >conftest.err | |
9760 | rm -f conftest.er1 | |
9761 | cat conftest.err >&5 | |
9762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9763 | (exit $ac_status); } && | |
ec6c7392 PB |
9764 | { ac_try='test -z "$ac_c_werror_flag" |
9765 | || test ! -s conftest.err' | |
3b0727a0 MR |
9766 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9767 | (eval $ac_try) 2>&5 | |
9768 | ac_status=$? | |
9769 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9770 | (exit $ac_status); }; } && | |
9771 | { ac_try='test -s conftest$ac_exeext' | |
9772 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9773 | (eval $ac_try) 2>&5 | |
9774 | ac_status=$? | |
9775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9776 | (exit $ac_status); }; }; then | |
9777 | ac_cv_func_mmap=yes | |
9778 | else | |
9779 | echo "$as_me: failed program was:" >&5 | |
9780 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9781 | ||
9782 | ac_cv_func_mmap=no | |
9783 | fi | |
9784 | rm -f conftest.err conftest.$ac_objext \ | |
9785 | conftest$ac_exeext conftest.$ac_ext | |
9786 | fi | |
9787 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9788 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9789 | if test $ac_cv_func_mmap = yes; then | |
9790 | gcc_func_mmap=yes | |
9791 | else | |
9792 | gcc_func_mmap=no | |
9793 | fi | |
9794 | ||
9795 | if test "$gcc_header_sys_mman_h" != yes \ | |
9796 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9797 | gcc_cv_func_mmap_file=no |
9798 | gcc_cv_func_mmap_dev_zero=no | |
9799 | gcc_cv_func_mmap_anon=no | |
9800 | else | |
ba479fd2 NN |
9801 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9802 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9803 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9804 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9805 | else |
ba479fd2 | 9806 | # Add a system to this blacklist if |
1072ec3f ZW |
9807 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9808 | # memory area containing the same data that you'd get if you applied | |
9809 | # read() to the same fd. The only system known to have a problem here | |
9810 | # is VMS, where text files have record structure. | |
9811 | case "$host_os" in | |
ba479fd2 | 9812 | vms* | ultrix*) |
1072ec3f ZW |
9813 | gcc_cv_func_mmap_file=no ;; |
9814 | *) | |
9815 | gcc_cv_func_mmap_file=yes;; | |
9816 | esac | |
9817 | fi | |
ba479fd2 NN |
9818 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9819 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9820 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9821 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9822 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9823 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9824 | else |
9825 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9826 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9827 | # zeroed pages with both the following properties: | |
9828 | # 1. If you map N consecutive pages in with one call, and then | |
9829 | # unmap any subset of those pages, the pages that were not | |
9830 | # explicitly unmapped remain accessible. | |
9831 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9832 | # both at once, they must both go away. | |
9833 | # Systems known to be in this category are Windows (all variants), | |
9834 | # VMS, and Darwin. | |
9835 | case "$host_os" in | |
2ce240d3 | 9836 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9837 | gcc_cv_func_mmap_dev_zero=no ;; |
9838 | *) | |
9839 | gcc_cv_func_mmap_dev_zero=yes;; | |
9840 | esac | |
9841 | fi | |
ba479fd2 NN |
9842 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9843 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9844 | |
9845 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9846 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9847 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9848 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9849 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9850 | else | |
9851 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9852 | /* confdefs.h. */ |
9853 | _ACEOF | |
9854 | cat confdefs.h >>conftest.$ac_ext | |
9855 | cat >>conftest.$ac_ext <<_ACEOF | |
9856 | /* end confdefs.h. */ | |
1072ec3f ZW |
9857 | #include <sys/types.h> |
9858 | #include <sys/mman.h> | |
9859 | #include <unistd.h> | |
9860 | ||
9861 | #ifndef MAP_ANONYMOUS | |
9862 | #define MAP_ANONYMOUS MAP_ANON | |
9863 | #endif | |
9864 | ||
ba479fd2 NN |
9865 | int |
9866 | main () | |
9867 | { | |
1072ec3f | 9868 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9869 | ; |
9870 | return 0; | |
9871 | } | |
9872 | _ACEOF | |
9873 | rm -f conftest.$ac_objext | |
9874 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9875 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9876 | ac_status=$? |
86da66b5 HPN |
9877 | grep -v '^ *+' conftest.er1 >conftest.err |
9878 | rm -f conftest.er1 | |
9879 | cat conftest.err >&5 | |
ba479fd2 NN |
9880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9881 | (exit $ac_status); } && | |
ec6c7392 PB |
9882 | { ac_try='test -z "$ac_c_werror_flag" |
9883 | || test ! -s conftest.err' | |
86da66b5 HPN |
9884 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9885 | (eval $ac_try) 2>&5 | |
9886 | ac_status=$? | |
9887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9888 | (exit $ac_status); }; } && | |
9889 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9890 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9891 | (eval $ac_try) 2>&5 | |
9892 | ac_status=$? | |
9893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9894 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9895 | gcc_cv_decl_map_anon=yes |
9896 | else | |
ba479fd2 NN |
9897 | echo "$as_me: failed program was:" >&5 |
9898 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9899 | ||
9900 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9901 | fi |
86da66b5 | 9902 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9903 | fi |
ba479fd2 NN |
9904 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9905 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9906 | |
9907 | if test $gcc_cv_decl_map_anon = no; then | |
9908 | gcc_cv_func_mmap_anon=no | |
9909 | else | |
ba479fd2 NN |
9910 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9911 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9912 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9913 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9914 | else |
9915 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9916 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9917 | # doesn't give anonymous zeroed pages with the same properties listed | |
9918 | # above for use of /dev/zero. | |
9919 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9920 | case "$host_os" in | |
9921 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9922 | gcc_cv_func_mmap_anon=no ;; | |
9923 | *) | |
9924 | gcc_cv_func_mmap_anon=yes;; | |
9925 | esac | |
9926 | fi | |
ba479fd2 NN |
9927 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9928 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9929 | fi |
9930 | fi | |
9931 | ||
9932 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9933 | |
9934 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9935 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9936 | _ACEOF |
1072ec3f ZW |
9937 | |
9938 | fi | |
9939 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9940 | |
9941 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9942 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9943 | _ACEOF |
1072ec3f ZW |
9944 | |
9945 | fi | |
9946 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9947 | |
9948 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9949 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9950 | _ACEOF |
1072ec3f ZW |
9951 | |
9952 | fi | |
9953 | ||
b27d2bd5 MK |
9954 | |
9955 | case "${host}" in | |
ee262b6f | 9956 | *-*-*vms*) |
ba479fd2 | 9957 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9958 | # won't work, and it isn't easily adaptable. It makes more sense to |
9959 | # just force it. | |
9960 | ac_cv_func_vfork_works=yes | |
9961 | ;; | |
b27d2bd5 | 9962 | esac |
ba479fd2 NN |
9963 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9964 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9965 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9966 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9967 | else | |
9968 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9969 | /* confdefs.h. */ |
9970 | _ACEOF | |
9971 | cat confdefs.h >>conftest.$ac_ext | |
9972 | cat >>conftest.$ac_ext <<_ACEOF | |
9973 | /* end confdefs.h. */ | |
9974 | $ac_includes_default | |
9975 | int | |
9976 | main () | |
9977 | { | |
9978 | if ((pid_t *) 0) | |
9979 | return 0; | |
9980 | if (sizeof (pid_t)) | |
9981 | return 0; | |
9982 | ; | |
9983 | return 0; | |
9984 | } | |
9985 | _ACEOF | |
9986 | rm -f conftest.$ac_objext | |
9987 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9988 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9989 | ac_status=$? |
86da66b5 HPN |
9990 | grep -v '^ *+' conftest.er1 >conftest.err |
9991 | rm -f conftest.er1 | |
9992 | cat conftest.err >&5 | |
ba479fd2 NN |
9993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9994 | (exit $ac_status); } && | |
ec6c7392 PB |
9995 | { ac_try='test -z "$ac_c_werror_flag" |
9996 | || test ! -s conftest.err' | |
86da66b5 HPN |
9997 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9998 | (eval $ac_try) 2>&5 | |
9999 | ac_status=$? | |
10000 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10001 | (exit $ac_status); }; } && | |
10002 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
10003 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10004 | (eval $ac_try) 2>&5 | |
10005 | ac_status=$? | |
10006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10007 | (exit $ac_status); }; }; then | |
cb65112a | 10008 | ac_cv_type_pid_t=yes |
c375c43b | 10009 | else |
ba479fd2 NN |
10010 | echo "$as_me: failed program was:" >&5 |
10011 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10012 | |
ba479fd2 NN |
10013 | ac_cv_type_pid_t=no |
10014 | fi | |
86da66b5 | 10015 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 10016 | fi |
ba479fd2 NN |
10017 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10018 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
10019 | if test $ac_cv_type_pid_t = yes; then | |
10020 | : | |
10021 | else | |
10022 | ||
10023 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10024 | #define pid_t int |
ba479fd2 | 10025 | _ACEOF |
c375c43b KG |
10026 | |
10027 | fi | |
10028 | ||
ba479fd2 NN |
10029 | |
10030 | ||
10031 | for ac_header in unistd.h vfork.h | |
10032 | do | |
10033 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
18fc9bd4 | 10034 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
10035 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
10036 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
10037 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 10038 | else |
18fc9bd4 | 10039 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10040 | /* confdefs.h. */ |
10041 | _ACEOF | |
10042 | cat confdefs.h >>conftest.$ac_ext | |
10043 | cat >>conftest.$ac_ext <<_ACEOF | |
10044 | /* end confdefs.h. */ | |
10045 | #include <$ac_header> | |
10046 | _ACEOF | |
10047 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
10048 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
10049 | ac_status=$? | |
10050 | grep -v '^ *+' conftest.er1 >conftest.err | |
10051 | rm -f conftest.er1 | |
10052 | cat conftest.err >&5 | |
10053 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10054 | (exit $ac_status); } >/dev/null; then | |
10055 | if test -s conftest.err; then | |
10056 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 10057 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
10058 | else |
10059 | ac_cpp_err= | |
10060 | fi | |
093e61a6 | 10061 | else |
ba479fd2 NN |
10062 | ac_cpp_err=yes |
10063 | fi | |
10064 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 10065 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10066 | else |
10067 | echo "$as_me: failed program was:" >&5 | |
10068 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10069 | ||
18fc9bd4 | 10070 | eval "$as_ac_Header=no" |
ba479fd2 NN |
10071 | fi |
10072 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 10073 | fi |
ba479fd2 NN |
10074 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
10075 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
10076 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10077 | cat >>confdefs.h <<_ACEOF | |
10078 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10079 | _ACEOF | |
6e3f3080 NN |
10080 | |
10081 | fi | |
ba479fd2 NN |
10082 | done |
10083 | ||
10084 | ||
10085 | ||
10086 | for ac_func in fork vfork | |
10087 | do | |
10088 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10089 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
10090 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
10091 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
10092 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10093 | else | |
10094 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10095 | /* confdefs.h. */ |
10096 | _ACEOF | |
10097 | cat confdefs.h >>conftest.$ac_ext | |
10098 | cat >>conftest.$ac_ext <<_ACEOF | |
10099 | /* end confdefs.h. */ | |
86da66b5 HPN |
10100 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10101 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10102 | #define $ac_func innocuous_$ac_func | |
10103 | ||
c375c43b | 10104 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10105 | which can conflict with char $ac_func (); below. |
10106 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10107 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10108 | |
ba479fd2 NN |
10109 | #ifdef __STDC__ |
10110 | # include <limits.h> | |
10111 | #else | |
10112 | # include <assert.h> | |
10113 | #endif | |
86da66b5 HPN |
10114 | |
10115 | #undef $ac_func | |
10116 | ||
6e3f3080 | 10117 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
10118 | #ifdef __cplusplus |
10119 | extern "C" | |
10120 | { | |
10121 | #endif | |
6e3f3080 | 10122 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
10123 | builtin and then its argument prototype would still apply. */ |
10124 | char $ac_func (); | |
c375c43b KG |
10125 | /* The GNU C library defines this for functions which it implements |
10126 | to always fail with ENOSYS. Some functions are actually named | |
10127 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 10128 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
10129 | choke me |
10130 | #else | |
ba479fd2 NN |
10131 | char (*f) () = $ac_func; |
10132 | #endif | |
10133 | #ifdef __cplusplus | |
10134 | } | |
c375c43b KG |
10135 | #endif |
10136 | ||
ba479fd2 NN |
10137 | int |
10138 | main () | |
10139 | { | |
10140 | return f != $ac_func; | |
10141 | ; | |
10142 | return 0; | |
10143 | } | |
10144 | _ACEOF | |
10145 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10146 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10147 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10148 | ac_status=$? |
86da66b5 HPN |
10149 | grep -v '^ *+' conftest.er1 >conftest.err |
10150 | rm -f conftest.er1 | |
10151 | cat conftest.err >&5 | |
ba479fd2 NN |
10152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10153 | (exit $ac_status); } && | |
ec6c7392 PB |
10154 | { ac_try='test -z "$ac_c_werror_flag" |
10155 | || test ! -s conftest.err' | |
86da66b5 HPN |
10156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10157 | (eval $ac_try) 2>&5 | |
10158 | ac_status=$? | |
10159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10160 | (exit $ac_status); }; } && | |
10161 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10162 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10163 | (eval $ac_try) 2>&5 | |
10164 | ac_status=$? | |
10165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10166 | (exit $ac_status); }; }; then | |
10167 | eval "$as_ac_var=yes" | |
10168 | else | |
10169 | echo "$as_me: failed program was:" >&5 | |
10170 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10171 | ||
10172 | eval "$as_ac_var=no" | |
10173 | fi | |
86da66b5 HPN |
10174 | rm -f conftest.err conftest.$ac_objext \ |
10175 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10176 | fi |
10177 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10178 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10179 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10180 | cat >>confdefs.h <<_ACEOF | |
10181 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10182 | _ACEOF | |
10183 | ||
c375c43b | 10184 | fi |
ba479fd2 | 10185 | done |
c375c43b | 10186 | |
ba479fd2 NN |
10187 | if test "x$ac_cv_func_fork" = xyes; then |
10188 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10189 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10190 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10191 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10192 | else |
ba479fd2 NN |
10193 | if test "$cross_compiling" = yes; then |
10194 | ac_cv_func_fork_works=cross | |
10195 | else | |
10196 | cat >conftest.$ac_ext <<_ACEOF | |
ec6c7392 PB |
10197 | /* By Ruediger Kuhlmann. */ |
10198 | #include <sys/types.h> | |
10199 | #if HAVE_UNISTD_H | |
10200 | # include <unistd.h> | |
10201 | #endif | |
10202 | /* Some systems only have a dummy stub for fork() */ | |
10203 | int main () | |
10204 | { | |
10205 | if (fork() < 0) | |
10206 | exit (1); | |
10207 | exit (0); | |
10208 | } | |
ba479fd2 NN |
10209 | _ACEOF |
10210 | rm -f conftest$ac_exeext | |
10211 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10212 | (eval $ac_link) 2>&5 | |
10213 | ac_status=$? | |
10214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10215 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10217 | (eval $ac_try) 2>&5 | |
10218 | ac_status=$? | |
10219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10220 | (exit $ac_status); }; }; then | |
10221 | ac_cv_func_fork_works=yes | |
10222 | else | |
10223 | echo "$as_me: program exited with status $ac_status" >&5 | |
10224 | echo "$as_me: failed program was:" >&5 | |
10225 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10226 | ||
10227 | ( exit $ac_status ) | |
10228 | ac_cv_func_fork_works=no | |
10229 | fi | |
86da66b5 | 10230 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10231 | fi |
10232 | fi | |
10233 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10234 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10235 | ||
10236 | else | |
10237 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10238 | fi | |
10239 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10240 | case $host in | |
10241 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10242 | # Override, as these systems have only a dummy fork() stub | |
10243 | ac_cv_func_fork_works=no | |
10244 | ;; | |
10245 | *) | |
10246 | ac_cv_func_fork_works=yes | |
10247 | ;; | |
10248 | esac | |
10249 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10250 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10251 | fi |
c375c43b | 10252 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10253 | if test "x$ac_cv_func_vfork" = xyes; then |
10254 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10255 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10256 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10257 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10258 | else |
ba479fd2 NN |
10259 | if test "$cross_compiling" = yes; then |
10260 | ac_cv_func_vfork_works=cross | |
10261 | else | |
10262 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10263 | /* confdefs.h. */ |
10264 | _ACEOF | |
10265 | cat confdefs.h >>conftest.$ac_ext | |
10266 | cat >>conftest.$ac_ext <<_ACEOF | |
10267 | /* end confdefs.h. */ | |
c375c43b KG |
10268 | /* Thanks to Paul Eggert for this test. */ |
10269 | #include <stdio.h> | |
ba479fd2 | 10270 | #include <stdlib.h> |
c375c43b KG |
10271 | #include <sys/types.h> |
10272 | #include <sys/stat.h> | |
ba479fd2 NN |
10273 | #include <sys/wait.h> |
10274 | #if HAVE_UNISTD_H | |
10275 | # include <unistd.h> | |
c375c43b | 10276 | #endif |
ba479fd2 NN |
10277 | #if HAVE_VFORK_H |
10278 | # include <vfork.h> | |
c375c43b KG |
10279 | #endif |
10280 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10281 | argument registers are propagated back to the parent. The compiler |
10282 | is told about this with #include <vfork.h>, but some compilers | |
10283 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10284 | static variable whose address is put into a register that is | |
10285 | clobbered by the vfork. */ | |
10286 | static void | |
c375c43b KG |
10287 | #ifdef __cplusplus |
10288 | sparc_address_test (int arg) | |
ba479fd2 | 10289 | # else |
c375c43b KG |
10290 | sparc_address_test (arg) int arg; |
10291 | #endif | |
10292 | { | |
10293 | static pid_t child; | |
10294 | if (!child) { | |
10295 | child = vfork (); | |
10296 | if (child < 0) { | |
10297 | perror ("vfork"); | |
10298 | _exit(2); | |
10299 | } | |
10300 | if (!child) { | |
10301 | arg = getpid(); | |
10302 | write(-1, "", 0); | |
10303 | _exit (arg); | |
10304 | } | |
10305 | } | |
10306 | } | |
ba479fd2 NN |
10307 | |
10308 | int | |
10309 | main () | |
10310 | { | |
c375c43b KG |
10311 | pid_t parent = getpid (); |
10312 | pid_t child; | |
10313 | ||
ba479fd2 | 10314 | sparc_address_test (0); |
c375c43b KG |
10315 | |
10316 | child = vfork (); | |
10317 | ||
10318 | if (child == 0) { | |
ba479fd2 NN |
10319 | /* Here is another test for sparc vfork register problems. This |
10320 | test uses lots of local variables, at least as many local | |
10321 | variables as main has allocated so far including compiler | |
10322 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10323 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10324 | reuse the register of parent for one of the local variables, | |
10325 | since it will think that parent can't possibly be used any more | |
10326 | in this routine. Assigning to the local variable will thus | |
10327 | munge parent in the parent process. */ | |
c375c43b KG |
10328 | pid_t |
10329 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10330 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10331 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10332 | use the same hardware register for all 8 local variables. */ | |
10333 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10334 | || p != p5 || p != p6 || p != p7) | |
10335 | _exit(1); | |
10336 | ||
ba479fd2 NN |
10337 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10338 | from child file descriptors. If the child closes a descriptor | |
10339 | before it execs or exits, this munges the parent's descriptor | |
10340 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10341 | _exit(close(fileno(stdout)) != 0); |
10342 | } else { | |
10343 | int status; | |
10344 | struct stat st; | |
10345 | ||
10346 | while (wait(&status) != child) | |
10347 | ; | |
10348 | exit( | |
10349 | /* Was there some problem with vforking? */ | |
10350 | child < 0 | |
10351 | ||
10352 | /* Did the child fail? (This shouldn't happen.) */ | |
10353 | || status | |
10354 | ||
10355 | /* Did the vfork/compiler bug occur? */ | |
10356 | || parent != getpid() | |
10357 | ||
10358 | /* Did the file descriptor bug occur? */ | |
10359 | || fstat(fileno(stdout), &st) != 0 | |
10360 | ); | |
10361 | } | |
10362 | } | |
ba479fd2 NN |
10363 | _ACEOF |
10364 | rm -f conftest$ac_exeext | |
10365 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10366 | (eval $ac_link) 2>&5 | |
10367 | ac_status=$? | |
10368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10369 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10370 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10371 | (eval $ac_try) 2>&5 | |
10372 | ac_status=$? | |
10373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10374 | (exit $ac_status); }; }; then | |
c375c43b KG |
10375 | ac_cv_func_vfork_works=yes |
10376 | else | |
ba479fd2 NN |
10377 | echo "$as_me: program exited with status $ac_status" >&5 |
10378 | echo "$as_me: failed program was:" >&5 | |
10379 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10380 | ||
10381 | ( exit $ac_status ) | |
10382 | ac_cv_func_vfork_works=no | |
cafe096b | 10383 | fi |
86da66b5 | 10384 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10385 | fi |
ba479fd2 NN |
10386 | fi |
10387 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10388 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10389 | |
ba479fd2 NN |
10390 | fi; |
10391 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10392 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10393 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10394 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10395 | fi |
10396 | ||
ba479fd2 NN |
10397 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10398 | ||
10399 | cat >>confdefs.h <<\_ACEOF | |
10400 | #define HAVE_WORKING_VFORK 1 | |
10401 | _ACEOF | |
10402 | ||
10403 | else | |
10404 | ||
10405 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10406 | #define vfork fork |
ba479fd2 | 10407 | _ACEOF |
c375c43b KG |
10408 | |
10409 | fi | |
ba479fd2 NN |
10410 | if test "x$ac_cv_func_fork_works" = xyes; then |
10411 | ||
10412 | cat >>confdefs.h <<\_ACEOF | |
10413 | #define HAVE_WORKING_FORK 1 | |
10414 | _ACEOF | |
10415 | ||
10416 | fi | |
10417 | ||
c375c43b | 10418 | |
81bf3d9e | 10419 | |
dfb77e37 KC |
10420 | if test "X$prefix" = "XNONE"; then |
10421 | acl_final_prefix="$ac_default_prefix" | |
10422 | else | |
10423 | acl_final_prefix="$prefix" | |
10424 | fi | |
10425 | if test "X$exec_prefix" = "XNONE"; then | |
10426 | acl_final_exec_prefix='${prefix}' | |
10427 | else | |
10428 | acl_final_exec_prefix="$exec_prefix" | |
10429 | fi | |
10430 | acl_save_prefix="$prefix" | |
10431 | prefix="$acl_final_prefix" | |
10432 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10433 | prefix="$acl_save_prefix" | |
f91abfce TT |
10434 | |
10435 | ||
dfb77e37 KC |
10436 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10437 | if test "${with_gnu_ld+set}" = set; then | |
10438 | withval="$with_gnu_ld" | |
10439 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10440 | else |
dfb77e37 KC |
10441 | with_gnu_ld=no |
10442 | fi; | |
10443 | # Prepare PATH_SEPARATOR. | |
10444 | # The user is always right. | |
10445 | if test "${PATH_SEPARATOR+set}" != set; then | |
10446 | echo "#! /bin/sh" >conf$$.sh | |
10447 | echo "exit 0" >>conf$$.sh | |
10448 | chmod +x conf$$.sh | |
10449 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10450 | PATH_SEPARATOR=';' | |
ba479fd2 | 10451 | else |
dfb77e37 | 10452 | PATH_SEPARATOR=: |
ba479fd2 | 10453 | fi |
dfb77e37 KC |
10454 | rm -f conf$$.sh |
10455 | fi | |
10456 | ac_prog=ld | |
10457 | if test "$GCC" = yes; then | |
10458 | # Check if gcc -print-prog-name=ld gives a path. | |
10459 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10460 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10461 | case $host in | |
10462 | *-*-mingw*) | |
10463 | # gcc leaves a trailing carriage return which upsets mingw | |
10464 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10465 | *) | |
10466 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10467 | esac | |
10468 | case $ac_prog in | |
10469 | # Accept absolute paths. | |
10470 | [\\/]* | [A-Za-z]:[\\/]*) | |
10471 | re_direlt='/[^/][^/]*/\.\./' | |
10472 | # Canonicalize the path of ld | |
10473 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10474 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10475 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10476 | done | |
10477 | test -z "$LD" && LD="$ac_prog" | |
10478 | ;; | |
10479 | "") | |
10480 | # If it fails, then pretend we aren't using GCC. | |
10481 | ac_prog=ld | |
10482 | ;; | |
10483 | *) | |
10484 | # If it is relative, then search for the first ld in PATH. | |
10485 | with_gnu_ld=unknown | |
10486 | ;; | |
10487 | esac | |
10488 | elif test "$with_gnu_ld" = yes; then | |
10489 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10490 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10491 | else |
dfb77e37 KC |
10492 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10493 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10494 | fi |
dfb77e37 KC |
10495 | if test "${acl_cv_path_LD+set}" = set; then |
10496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10497 | else |
dfb77e37 KC |
10498 | if test -z "$LD"; then |
10499 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10500 | for ac_dir in $PATH; do | |
10501 | test -z "$ac_dir" && ac_dir=. | |
10502 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10503 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10504 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10505 | # but apparently some GNU ld's only accept -v. | |
10506 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
10507 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
10508 | test "$with_gnu_ld" != no && break | |
10509 | else | |
10510 | test "$with_gnu_ld" != yes && break | |
10511 | fi | |
dfb77e37 KC |
10512 | fi |
10513 | done | |
10514 | IFS="$ac_save_ifs" | |
10515 | else | |
10516 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10517 | fi | |
10518 | fi | |
ba479fd2 | 10519 | |
dfb77e37 KC |
10520 | LD="$acl_cv_path_LD" |
10521 | if test -n "$LD"; then | |
10522 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10523 | echo "${ECHO_T}$LD" >&6 | |
10524 | else | |
10525 | echo "$as_me:$LINENO: result: no" >&5 | |
10526 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10527 | fi |
dfb77e37 KC |
10528 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10529 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10530 | { (exit 1); exit 1; }; } | |
10531 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10532 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10533 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10534 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10535 | else | |
10536 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
10537 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
10538 | acl_cv_prog_gnu_ld=yes | |
10539 | else | |
10540 | acl_cv_prog_gnu_ld=no | |
10541 | fi | |
dfb77e37 KC |
10542 | fi |
10543 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10544 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10545 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10546 | ||
10547 | ||
10548 | ||
10549 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10550 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10551 | if test "${acl_cv_rpath+set}" = set; then | |
10552 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10553 | else | |
10554 | ||
10555 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10556 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10557 | . ./conftest.sh | |
10558 | rm -f ./conftest.sh | |
10559 | acl_cv_rpath=done | |
ba479fd2 | 10560 | |
eb158727 | 10561 | fi |
dfb77e37 KC |
10562 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10563 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10564 | wl="$acl_cv_wl" | |
10565 | libext="$acl_cv_libext" | |
10566 | shlibext="$acl_cv_shlibext" | |
10567 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10568 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10569 | hardcode_direct="$acl_cv_hardcode_direct" | |
10570 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10571 | # Check whether --enable-rpath or --disable-rpath was given. | |
10572 | if test "${enable_rpath+set}" = set; then | |
10573 | enableval="$enable_rpath" | |
10574 | : | |
10575 | else | |
10576 | enable_rpath=yes | |
10577 | fi; | |
10578 | ||
10579 | ||
10580 | ||
10581 | ||
10582 | ||
10583 | ||
10584 | ||
10585 | use_additional=yes | |
10586 | ||
10587 | acl_save_prefix="$prefix" | |
10588 | prefix="$acl_final_prefix" | |
10589 | acl_save_exec_prefix="$exec_prefix" | |
10590 | exec_prefix="$acl_final_exec_prefix" | |
10591 | ||
10592 | eval additional_includedir=\"$includedir\" | |
10593 | eval additional_libdir=\"$libdir\" | |
10594 | ||
10595 | exec_prefix="$acl_save_exec_prefix" | |
10596 | prefix="$acl_save_prefix" | |
10597 | ||
10598 | ||
10599 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10600 | if test "${with_libiconv_prefix+set}" = set; then | |
10601 | withval="$with_libiconv_prefix" | |
10602 | ||
10603 | if test "X$withval" = "Xno"; then | |
10604 | use_additional=no | |
10605 | else | |
10606 | if test "X$withval" = "X"; then | |
10607 | ||
10608 | acl_save_prefix="$prefix" | |
10609 | prefix="$acl_final_prefix" | |
10610 | acl_save_exec_prefix="$exec_prefix" | |
10611 | exec_prefix="$acl_final_exec_prefix" | |
10612 | ||
10613 | eval additional_includedir=\"$includedir\" | |
10614 | eval additional_libdir=\"$libdir\" | |
10615 | ||
10616 | exec_prefix="$acl_save_exec_prefix" | |
10617 | prefix="$acl_save_prefix" | |
10618 | ||
10619 | else | |
10620 | additional_includedir="$withval/include" | |
10621 | additional_libdir="$withval/lib" | |
10622 | fi | |
10623 | fi | |
10624 | ||
10625 | fi; | |
10626 | LIBICONV= | |
10627 | LTLIBICONV= | |
10628 | INCICONV= | |
10629 | rpathdirs= | |
10630 | ltrpathdirs= | |
10631 | names_already_handled= | |
10632 | names_next_round='iconv ' | |
10633 | while test -n "$names_next_round"; do | |
10634 | names_this_round="$names_next_round" | |
10635 | names_next_round= | |
10636 | for name in $names_this_round; do | |
10637 | already_handled= | |
10638 | for n in $names_already_handled; do | |
10639 | if test "$n" = "$name"; then | |
10640 | already_handled=yes | |
10641 | break | |
10642 | fi | |
10643 | done | |
10644 | if test -z "$already_handled"; then | |
10645 | names_already_handled="$names_already_handled $name" | |
10646 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10647 | eval value=\"\$HAVE_LIB$uppername\" | |
10648 | if test -n "$value"; then | |
10649 | if test "$value" = yes; then | |
10650 | eval value=\"\$LIB$uppername\" | |
10651 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10652 | eval value=\"\$LTLIB$uppername\" | |
10653 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10654 | else | |
10655 | : | |
10656 | fi | |
10657 | else | |
10658 | found_dir= | |
10659 | found_la= | |
10660 | found_so= | |
10661 | found_a= | |
10662 | if test $use_additional = yes; then | |
10663 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10664 | found_dir="$additional_libdir" | |
10665 | found_so="$additional_libdir/lib$name.$shlibext" | |
10666 | if test -f "$additional_libdir/lib$name.la"; then | |
10667 | found_la="$additional_libdir/lib$name.la" | |
10668 | fi | |
10669 | else | |
10670 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10671 | found_dir="$additional_libdir" | |
10672 | found_a="$additional_libdir/lib$name.$libext" | |
10673 | if test -f "$additional_libdir/lib$name.la"; then | |
10674 | found_la="$additional_libdir/lib$name.la" | |
10675 | fi | |
10676 | fi | |
10677 | fi | |
10678 | fi | |
10679 | if test "X$found_dir" = "X"; then | |
10680 | for x in $LDFLAGS $LTLIBICONV; do | |
10681 | ||
10682 | acl_save_prefix="$prefix" | |
10683 | prefix="$acl_final_prefix" | |
10684 | acl_save_exec_prefix="$exec_prefix" | |
10685 | exec_prefix="$acl_final_exec_prefix" | |
10686 | eval x=\"$x\" | |
10687 | exec_prefix="$acl_save_exec_prefix" | |
10688 | prefix="$acl_save_prefix" | |
10689 | ||
10690 | case "$x" in | |
10691 | -L*) | |
10692 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10693 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10694 | found_dir="$dir" | |
10695 | found_so="$dir/lib$name.$shlibext" | |
10696 | if test -f "$dir/lib$name.la"; then | |
10697 | found_la="$dir/lib$name.la" | |
10698 | fi | |
10699 | else | |
10700 | if test -f "$dir/lib$name.$libext"; then | |
10701 | found_dir="$dir" | |
10702 | found_a="$dir/lib$name.$libext" | |
10703 | if test -f "$dir/lib$name.la"; then | |
10704 | found_la="$dir/lib$name.la" | |
10705 | fi | |
10706 | fi | |
10707 | fi | |
10708 | ;; | |
10709 | esac | |
10710 | if test "X$found_dir" != "X"; then | |
10711 | break | |
10712 | fi | |
10713 | done | |
10714 | fi | |
10715 | if test "X$found_dir" != "X"; then | |
10716 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10717 | if test "X$found_so" != "X"; then | |
10718 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10719 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10720 | else | |
10721 | haveit= | |
10722 | for x in $ltrpathdirs; do | |
10723 | if test "X$x" = "X$found_dir"; then | |
10724 | haveit=yes | |
10725 | break | |
10726 | fi | |
10727 | done | |
10728 | if test -z "$haveit"; then | |
10729 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10730 | fi | |
10731 | if test "$hardcode_direct" = yes; then | |
10732 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10733 | else | |
10734 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10735 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10736 | haveit= | |
10737 | for x in $rpathdirs; do | |
10738 | if test "X$x" = "X$found_dir"; then | |
10739 | haveit=yes | |
10740 | break | |
10741 | fi | |
10742 | done | |
10743 | if test -z "$haveit"; then | |
10744 | rpathdirs="$rpathdirs $found_dir" | |
10745 | fi | |
10746 | else | |
10747 | haveit= | |
10748 | for x in $LDFLAGS $LIBICONV; do | |
10749 | ||
10750 | acl_save_prefix="$prefix" | |
10751 | prefix="$acl_final_prefix" | |
10752 | acl_save_exec_prefix="$exec_prefix" | |
10753 | exec_prefix="$acl_final_exec_prefix" | |
10754 | eval x=\"$x\" | |
10755 | exec_prefix="$acl_save_exec_prefix" | |
10756 | prefix="$acl_save_prefix" | |
10757 | ||
10758 | if test "X$x" = "X-L$found_dir"; then | |
10759 | haveit=yes | |
10760 | break | |
10761 | fi | |
10762 | done | |
10763 | if test -z "$haveit"; then | |
10764 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10765 | fi | |
10766 | if test "$hardcode_minus_L" != no; then | |
10767 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10768 | else | |
10769 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10770 | fi | |
10771 | fi | |
10772 | fi | |
10773 | fi | |
10774 | else | |
10775 | if test "X$found_a" != "X"; then | |
10776 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10777 | else | |
10778 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10779 | fi | |
10780 | fi | |
10781 | additional_includedir= | |
10782 | case "$found_dir" in | |
10783 | */lib | */lib/) | |
10784 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10785 | additional_includedir="$basedir/include" | |
10786 | ;; | |
10787 | esac | |
10788 | if test "X$additional_includedir" != "X"; then | |
10789 | if test "X$additional_includedir" != "X/usr/include"; then | |
10790 | haveit= | |
10791 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10792 | if test -n "$GCC"; then | |
10793 | case $host_os in | |
18fc9bd4 | 10794 | linux*) haveit=yes;; |
dfb77e37 KC |
10795 | esac |
10796 | fi | |
10797 | fi | |
10798 | if test -z "$haveit"; then | |
10799 | for x in $CPPFLAGS $INCICONV; do | |
10800 | ||
10801 | acl_save_prefix="$prefix" | |
10802 | prefix="$acl_final_prefix" | |
10803 | acl_save_exec_prefix="$exec_prefix" | |
10804 | exec_prefix="$acl_final_exec_prefix" | |
10805 | eval x=\"$x\" | |
10806 | exec_prefix="$acl_save_exec_prefix" | |
10807 | prefix="$acl_save_prefix" | |
10808 | ||
10809 | if test "X$x" = "X-I$additional_includedir"; then | |
10810 | haveit=yes | |
10811 | break | |
10812 | fi | |
10813 | done | |
10814 | if test -z "$haveit"; then | |
10815 | if test -d "$additional_includedir"; then | |
10816 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10817 | fi | |
10818 | fi | |
10819 | fi | |
10820 | fi | |
10821 | fi | |
10822 | if test -n "$found_la"; then | |
10823 | save_libdir="$libdir" | |
10824 | case "$found_la" in | |
10825 | */* | *\\*) . "$found_la" ;; | |
10826 | *) . "./$found_la" ;; | |
10827 | esac | |
10828 | libdir="$save_libdir" | |
10829 | for dep in $dependency_libs; do | |
10830 | case "$dep" in | |
10831 | -L*) | |
10832 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10833 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10834 | haveit= | |
10835 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10836 | if test -n "$GCC"; then | |
10837 | case $host_os in | |
18fc9bd4 | 10838 | linux*) haveit=yes;; |
dfb77e37 KC |
10839 | esac |
10840 | fi | |
10841 | fi | |
10842 | if test -z "$haveit"; then | |
10843 | haveit= | |
10844 | for x in $LDFLAGS $LIBICONV; do | |
10845 | ||
10846 | acl_save_prefix="$prefix" | |
10847 | prefix="$acl_final_prefix" | |
10848 | acl_save_exec_prefix="$exec_prefix" | |
10849 | exec_prefix="$acl_final_exec_prefix" | |
10850 | eval x=\"$x\" | |
10851 | exec_prefix="$acl_save_exec_prefix" | |
10852 | prefix="$acl_save_prefix" | |
10853 | ||
10854 | if test "X$x" = "X-L$additional_libdir"; then | |
10855 | haveit=yes | |
10856 | break | |
10857 | fi | |
10858 | done | |
10859 | if test -z "$haveit"; then | |
10860 | if test -d "$additional_libdir"; then | |
10861 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10862 | fi | |
10863 | fi | |
10864 | haveit= | |
10865 | for x in $LDFLAGS $LTLIBICONV; do | |
10866 | ||
10867 | acl_save_prefix="$prefix" | |
10868 | prefix="$acl_final_prefix" | |
10869 | acl_save_exec_prefix="$exec_prefix" | |
10870 | exec_prefix="$acl_final_exec_prefix" | |
10871 | eval x=\"$x\" | |
10872 | exec_prefix="$acl_save_exec_prefix" | |
10873 | prefix="$acl_save_prefix" | |
10874 | ||
10875 | if test "X$x" = "X-L$additional_libdir"; then | |
10876 | haveit=yes | |
10877 | break | |
10878 | fi | |
10879 | done | |
10880 | if test -z "$haveit"; then | |
10881 | if test -d "$additional_libdir"; then | |
10882 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10883 | fi | |
10884 | fi | |
10885 | fi | |
10886 | fi | |
10887 | ;; | |
10888 | -R*) | |
10889 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10890 | if test "$enable_rpath" != no; then | |
10891 | haveit= | |
10892 | for x in $rpathdirs; do | |
10893 | if test "X$x" = "X$dir"; then | |
10894 | haveit=yes | |
10895 | break | |
10896 | fi | |
10897 | done | |
10898 | if test -z "$haveit"; then | |
10899 | rpathdirs="$rpathdirs $dir" | |
10900 | fi | |
10901 | haveit= | |
10902 | for x in $ltrpathdirs; do | |
10903 | if test "X$x" = "X$dir"; then | |
10904 | haveit=yes | |
10905 | break | |
10906 | fi | |
10907 | done | |
10908 | if test -z "$haveit"; then | |
10909 | ltrpathdirs="$ltrpathdirs $dir" | |
10910 | fi | |
10911 | fi | |
10912 | ;; | |
10913 | -l*) | |
10914 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10915 | ;; | |
10916 | *.la) | |
10917 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10918 | ;; | |
10919 | *) | |
10920 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10921 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10922 | ;; | |
10923 | esac | |
10924 | done | |
10925 | fi | |
10926 | else | |
10927 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10928 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10929 | fi | |
10930 | fi | |
10931 | fi | |
10932 | done | |
10933 | done | |
10934 | if test "X$rpathdirs" != "X"; then | |
10935 | if test -n "$hardcode_libdir_separator"; then | |
10936 | alldirs= | |
10937 | for found_dir in $rpathdirs; do | |
10938 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10939 | done | |
10940 | acl_save_libdir="$libdir" | |
10941 | libdir="$alldirs" | |
10942 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10943 | libdir="$acl_save_libdir" | |
10944 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10945 | else | |
10946 | for found_dir in $rpathdirs; do | |
10947 | acl_save_libdir="$libdir" | |
10948 | libdir="$found_dir" | |
10949 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10950 | libdir="$acl_save_libdir" | |
10951 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10952 | done | |
10953 | fi | |
10954 | fi | |
10955 | if test "X$ltrpathdirs" != "X"; then | |
10956 | for found_dir in $ltrpathdirs; do | |
10957 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10958 | done | |
10959 | fi | |
10960 | ||
10961 | ||
10962 | ||
10963 | ||
10964 | ||
10965 | ||
10966 | ||
10967 | am_save_CPPFLAGS="$CPPFLAGS" | |
10968 | ||
10969 | for element in $INCICONV; do | |
10970 | haveit= | |
10971 | for x in $CPPFLAGS; do | |
10972 | ||
10973 | acl_save_prefix="$prefix" | |
10974 | prefix="$acl_final_prefix" | |
10975 | acl_save_exec_prefix="$exec_prefix" | |
10976 | exec_prefix="$acl_final_exec_prefix" | |
10977 | eval x=\"$x\" | |
10978 | exec_prefix="$acl_save_exec_prefix" | |
10979 | prefix="$acl_save_prefix" | |
10980 | ||
10981 | if test "X$x" = "X$element"; then | |
10982 | haveit=yes | |
10983 | break | |
10984 | fi | |
10985 | done | |
10986 | if test -z "$haveit"; then | |
10987 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10988 | fi | |
10989 | done | |
eb158727 ZW |
10990 | |
10991 | ||
ba479fd2 NN |
10992 | echo "$as_me:$LINENO: checking for iconv" >&5 |
10993 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
10994 | if test "${am_cv_func_iconv+set}" = set; then | |
10995 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 10996 | else |
ba479fd2 | 10997 | |
f91abfce TT |
10998 | am_cv_func_iconv="no, consider installing GNU libiconv" |
10999 | am_cv_lib_iconv=no | |
ba479fd2 | 11000 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11001 | /* confdefs.h. */ |
11002 | _ACEOF | |
11003 | cat confdefs.h >>conftest.$ac_ext | |
11004 | cat >>conftest.$ac_ext <<_ACEOF | |
11005 | /* end confdefs.h. */ | |
f91abfce TT |
11006 | #include <stdlib.h> |
11007 | #include <iconv.h> | |
ba479fd2 NN |
11008 | int |
11009 | main () | |
11010 | { | |
f91abfce TT |
11011 | iconv_t cd = iconv_open("",""); |
11012 | iconv(cd,NULL,NULL,NULL,NULL); | |
11013 | iconv_close(cd); | |
ba479fd2 NN |
11014 | ; |
11015 | return 0; | |
11016 | } | |
11017 | _ACEOF | |
11018 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11019 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11020 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11021 | ac_status=$? |
86da66b5 HPN |
11022 | grep -v '^ *+' conftest.er1 >conftest.err |
11023 | rm -f conftest.er1 | |
11024 | cat conftest.err >&5 | |
ba479fd2 NN |
11025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11026 | (exit $ac_status); } && | |
ec6c7392 PB |
11027 | { ac_try='test -z "$ac_c_werror_flag" |
11028 | || test ! -s conftest.err' | |
86da66b5 HPN |
11029 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11030 | (eval $ac_try) 2>&5 | |
11031 | ac_status=$? | |
11032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11033 | (exit $ac_status); }; } && | |
11034 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11035 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11036 | (eval $ac_try) 2>&5 | |
11037 | ac_status=$? | |
11038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11039 | (exit $ac_status); }; }; then | |
f91abfce TT |
11040 | am_cv_func_iconv=yes |
11041 | else | |
ba479fd2 NN |
11042 | echo "$as_me: failed program was:" >&5 |
11043 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11044 | ||
f91abfce | 11045 | fi |
86da66b5 HPN |
11046 | rm -f conftest.err conftest.$ac_objext \ |
11047 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11048 | if test "$am_cv_func_iconv" != yes; then |
11049 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11050 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11051 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11052 | /* confdefs.h. */ |
11053 | _ACEOF | |
11054 | cat confdefs.h >>conftest.$ac_ext | |
11055 | cat >>conftest.$ac_ext <<_ACEOF | |
11056 | /* end confdefs.h. */ | |
f91abfce TT |
11057 | #include <stdlib.h> |
11058 | #include <iconv.h> | |
ba479fd2 NN |
11059 | int |
11060 | main () | |
11061 | { | |
f91abfce TT |
11062 | iconv_t cd = iconv_open("",""); |
11063 | iconv(cd,NULL,NULL,NULL,NULL); | |
11064 | iconv_close(cd); | |
ba479fd2 NN |
11065 | ; |
11066 | return 0; | |
11067 | } | |
11068 | _ACEOF | |
11069 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11070 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11071 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11072 | ac_status=$? |
86da66b5 HPN |
11073 | grep -v '^ *+' conftest.er1 >conftest.err |
11074 | rm -f conftest.er1 | |
11075 | cat conftest.err >&5 | |
ba479fd2 NN |
11076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11077 | (exit $ac_status); } && | |
ec6c7392 PB |
11078 | { ac_try='test -z "$ac_c_werror_flag" |
11079 | || test ! -s conftest.err' | |
86da66b5 HPN |
11080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11081 | (eval $ac_try) 2>&5 | |
11082 | ac_status=$? | |
11083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11084 | (exit $ac_status); }; } && | |
11085 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11087 | (eval $ac_try) 2>&5 | |
11088 | ac_status=$? | |
11089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11090 | (exit $ac_status); }; }; then | |
f91abfce TT |
11091 | am_cv_lib_iconv=yes |
11092 | am_cv_func_iconv=yes | |
11093 | else | |
ba479fd2 NN |
11094 | echo "$as_me: failed program was:" >&5 |
11095 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11096 | ||
f91abfce | 11097 | fi |
86da66b5 HPN |
11098 | rm -f conftest.err conftest.$ac_objext \ |
11099 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11100 | LIBS="$am_save_LIBS" |
11101 | fi | |
6e3f3080 | 11102 | |
ba479fd2 NN |
11103 | fi |
11104 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
11105 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 11106 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11107 | |
11108 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11109 | #define HAVE_ICONV 1 |
ba479fd2 | 11110 | _ACEOF |
f91abfce | 11111 | |
dfb77e37 KC |
11112 | fi |
11113 | if test "$am_cv_lib_iconv" = yes; then | |
11114 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
11115 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
11116 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11117 | echo "${ECHO_T}$LIBICONV" >&6 | |
11118 | else | |
11119 | CPPFLAGS="$am_save_CPPFLAGS" | |
11120 | LIBICONV= | |
11121 | LTLIBICONV= | |
11122 | fi | |
11123 | ||
11124 | ||
11125 | ||
11126 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
11127 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11128 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
11129 | if test "${am_cv_proto_iconv+set}" = set; then | |
11130 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11131 | else |
ba479fd2 NN |
11132 | |
11133 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11134 | /* confdefs.h. */ |
11135 | _ACEOF | |
11136 | cat confdefs.h >>conftest.$ac_ext | |
11137 | cat >>conftest.$ac_ext <<_ACEOF | |
11138 | /* end confdefs.h. */ | |
f91abfce TT |
11139 | |
11140 | #include <stdlib.h> | |
11141 | #include <iconv.h> | |
11142 | extern | |
11143 | #ifdef __cplusplus | |
11144 | "C" | |
11145 | #endif | |
11146 | #if defined(__STDC__) || defined(__cplusplus) | |
11147 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11148 | #else | |
11149 | size_t iconv(); | |
11150 | #endif | |
11151 | ||
ba479fd2 NN |
11152 | int |
11153 | main () | |
11154 | { | |
f91abfce | 11155 | |
ba479fd2 NN |
11156 | ; |
11157 | return 0; | |
11158 | } | |
11159 | _ACEOF | |
11160 | rm -f conftest.$ac_objext | |
11161 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11162 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11163 | ac_status=$? |
86da66b5 HPN |
11164 | grep -v '^ *+' conftest.er1 >conftest.err |
11165 | rm -f conftest.er1 | |
11166 | cat conftest.err >&5 | |
ba479fd2 NN |
11167 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11168 | (exit $ac_status); } && | |
ec6c7392 PB |
11169 | { ac_try='test -z "$ac_c_werror_flag" |
11170 | || test ! -s conftest.err' | |
86da66b5 HPN |
11171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11172 | (eval $ac_try) 2>&5 | |
11173 | ac_status=$? | |
11174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11175 | (exit $ac_status); }; } && | |
11176 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11177 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11178 | (eval $ac_try) 2>&5 | |
11179 | ac_status=$? | |
11180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11181 | (exit $ac_status); }; }; then | |
f91abfce TT |
11182 | am_cv_proto_iconv_arg1="" |
11183 | else | |
ba479fd2 NN |
11184 | echo "$as_me: failed program was:" >&5 |
11185 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11186 | ||
11187 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11188 | fi |
86da66b5 | 11189 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11190 | 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);" |
11191 | fi | |
11192 | ||
11193 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11194 | echo "$as_me:$LINENO: result: ${ac_t:- |
11195 | }$am_cv_proto_iconv" >&5 | |
11196 | echo "${ECHO_T}${ac_t:- | |
11197 | }$am_cv_proto_iconv" >&6 | |
11198 | ||
11199 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11200 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11201 | _ACEOF |
f91abfce TT |
11202 | |
11203 | fi | |
f91abfce | 11204 | |
56694dd9 ZW |
11205 | # Until we have in-tree GNU iconv: |
11206 | LIBICONV_DEP= | |
11207 | ||
11208 | ||
18fc9bd4 RG |
11209 | |
11210 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 | |
11211 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11212 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11213 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11214 | else | |
11215 | cat >conftest.$ac_ext <<_ACEOF | |
11216 | /* confdefs.h. */ | |
11217 | _ACEOF | |
11218 | cat confdefs.h >>conftest.$ac_ext | |
11219 | cat >>conftest.$ac_ext <<_ACEOF | |
11220 | /* end confdefs.h. */ | |
11221 | #include <locale.h> | |
11222 | int | |
11223 | main () | |
11224 | { | |
11225 | return LC_MESSAGES | |
11226 | ; | |
11227 | return 0; | |
11228 | } | |
11229 | _ACEOF | |
11230 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11231 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11232 | (eval $ac_link) 2>conftest.er1 | |
11233 | ac_status=$? | |
11234 | grep -v '^ *+' conftest.er1 >conftest.err | |
11235 | rm -f conftest.er1 | |
11236 | cat conftest.err >&5 | |
11237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11238 | (exit $ac_status); } && | |
11239 | { ac_try='test -z "$ac_c_werror_flag" | |
11240 | || test ! -s conftest.err' | |
11241 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11242 | (eval $ac_try) 2>&5 | |
11243 | ac_status=$? | |
11244 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11245 | (exit $ac_status); }; } && | |
11246 | { ac_try='test -s conftest$ac_exeext' | |
11247 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11248 | (eval $ac_try) 2>&5 | |
11249 | ac_status=$? | |
11250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11251 | (exit $ac_status); }; }; then | |
11252 | am_cv_val_LC_MESSAGES=yes | |
11253 | else | |
11254 | echo "$as_me: failed program was:" >&5 | |
11255 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11256 | ||
11257 | am_cv_val_LC_MESSAGES=no | |
11258 | fi | |
11259 | rm -f conftest.err conftest.$ac_objext \ | |
11260 | conftest$ac_exeext conftest.$ac_ext | |
11261 | fi | |
11262 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 | |
11263 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
11264 | if test $am_cv_val_LC_MESSAGES = yes; then | |
11265 | ||
11266 | cat >>confdefs.h <<\_ACEOF | |
11267 | #define HAVE_LC_MESSAGES 1 | |
11268 | _ACEOF | |
11269 | ||
11270 | fi | |
11271 | ||
f91abfce | 11272 | |
a03ea89b BM |
11273 | |
11274 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11275 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11276 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11277 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11278 | else | |
11279 | cat >conftest.$ac_ext <<_ACEOF | |
11280 | /* confdefs.h. */ | |
11281 | _ACEOF | |
11282 | cat confdefs.h >>conftest.$ac_ext | |
11283 | cat >>conftest.$ac_ext <<_ACEOF | |
11284 | /* end confdefs.h. */ | |
11285 | #include <langinfo.h> | |
11286 | int | |
11287 | main () | |
11288 | { | |
11289 | char* cs = nl_langinfo(CODESET); | |
11290 | ; | |
11291 | return 0; | |
11292 | } | |
11293 | _ACEOF | |
11294 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11295 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11296 | (eval $ac_link) 2>conftest.er1 | |
11297 | ac_status=$? | |
11298 | grep -v '^ *+' conftest.er1 >conftest.err | |
11299 | rm -f conftest.er1 | |
11300 | cat conftest.err >&5 | |
11301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11302 | (exit $ac_status); } && | |
ec6c7392 PB |
11303 | { ac_try='test -z "$ac_c_werror_flag" |
11304 | || test ! -s conftest.err' | |
a03ea89b BM |
11305 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11306 | (eval $ac_try) 2>&5 | |
11307 | ac_status=$? | |
11308 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11309 | (exit $ac_status); }; } && | |
11310 | { ac_try='test -s conftest$ac_exeext' | |
11311 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11312 | (eval $ac_try) 2>&5 | |
11313 | ac_status=$? | |
11314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11315 | (exit $ac_status); }; }; then | |
11316 | am_cv_langinfo_codeset=yes | |
11317 | else | |
11318 | echo "$as_me: failed program was:" >&5 | |
11319 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11320 | ||
11321 | am_cv_langinfo_codeset=no | |
11322 | fi | |
11323 | rm -f conftest.err conftest.$ac_objext \ | |
11324 | conftest$ac_exeext conftest.$ac_ext | |
11325 | ||
11326 | fi | |
11327 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11328 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11329 | if test $am_cv_langinfo_codeset = yes; then | |
11330 | ||
11331 | cat >>confdefs.h <<\_ACEOF | |
11332 | #define HAVE_LANGINFO_CODESET 1 | |
11333 | _ACEOF | |
11334 | ||
11335 | fi | |
11336 | ||
11337 | ||
86cf1cbd KG |
11338 | # We will need to find libiberty.h and ansidecl.h |
11339 | saved_CFLAGS="$CFLAGS" | |
11340 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11341 | |
11342 | ||
11343 | ||
11344 | ||
11345 | ||
11346 | ||
11347 | ||
11348 | ||
11349 | ||
11350 | ||
11351 | ||
11352 | ||
11353 | ||
11354 | ||
11355 | ||
11356 | ||
11357 | ||
11358 | ||
11359 | ||
11360 | ||
11361 | ||
6a257778 | 11362 | |
ad6717df PB |
11363 | |
11364 | ||
0d667716 KG |
11365 | |
11366 | ||
11367 | ||
11368 | ||
11369 | ||
11370 | ||
11371 | ||
11372 | ||
11373 | ||
11374 | ||
367e8319 | 11375 | |
0d667716 KG |
11376 | |
11377 | ||
7391b66c | 11378 | |
ed5b9f96 GK |
11379 | |
11380 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11381 | strsignal strstr strverscmp \ | |
11382 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11383 | free basename getopt clock getpagesize clearerr_unlocked feof_unlocked ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked putchar_unlocked putc_unlocked |
81bf3d9e | 11384 | do |
ad6717df | 11385 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11386 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11387 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11388 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11389 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11390 | else | |
11391 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11392 | /* confdefs.h. */ |
11393 | _ACEOF | |
11394 | cat confdefs.h >>conftest.$ac_ext | |
11395 | cat >>conftest.$ac_ext <<_ACEOF | |
11396 | /* end confdefs.h. */ | |
7afe8c41 KG |
11397 | #undef $ac_tr_decl |
11398 | #define $ac_tr_decl 1 | |
ba479fd2 | 11399 | |
d02af173 | 11400 | #include "ansidecl.h" |
86cf1cbd | 11401 | #include "system.h" |
f31e826b | 11402 | |
ba479fd2 NN |
11403 | int |
11404 | main () | |
11405 | { | |
86cf1cbd KG |
11406 | #ifndef $ac_func |
11407 | char *(*pfn) = (char *(*)) $ac_func ; | |
11408 | #endif | |
ba479fd2 NN |
11409 | ; |
11410 | return 0; | |
11411 | } | |
11412 | _ACEOF | |
11413 | rm -f conftest.$ac_objext | |
11414 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11415 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11416 | ac_status=$? |
86da66b5 HPN |
11417 | grep -v '^ *+' conftest.er1 >conftest.err |
11418 | rm -f conftest.er1 | |
11419 | cat conftest.err >&5 | |
ba479fd2 NN |
11420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11421 | (exit $ac_status); } && | |
ec6c7392 PB |
11422 | { ac_try='test -z "$ac_c_werror_flag" |
11423 | || test ! -s conftest.err' | |
86da66b5 HPN |
11424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11425 | (eval $ac_try) 2>&5 | |
11426 | ac_status=$? | |
11427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11428 | (exit $ac_status); }; } && | |
11429 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11431 | (eval $ac_try) 2>&5 | |
11432 | ac_status=$? | |
11433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11434 | (exit $ac_status); }; }; then | |
f31e826b | 11435 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11436 | else |
ba479fd2 NN |
11437 | echo "$as_me: failed program was:" >&5 |
11438 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11439 | ||
11440 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11441 | fi |
86da66b5 | 11442 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11443 | fi |
11444 | ||
f31e826b | 11445 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11446 | echo "$as_me:$LINENO: result: yes" >&5 |
11447 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11448 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11449 | _ACEOF |
11450 | ||
81bf3d9e | 11451 | else |
ba479fd2 NN |
11452 | echo "$as_me:$LINENO: result: no" >&5 |
11453 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11454 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11455 | _ACEOF |
11456 | ||
81bf3d9e RH |
11457 | fi |
11458 | ||
11459 | done | |
ba479fd2 | 11460 | |
ba479fd2 | 11461 | |
ba479fd2 | 11462 | |
81bf3d9e | 11463 | |
81bf3d9e RH |
11464 | |
11465 | for ac_func in getrlimit setrlimit getrusage | |
11466 | do | |
ad6717df | 11467 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11468 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11469 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11470 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11471 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11472 | else | |
11473 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11474 | /* confdefs.h. */ |
11475 | _ACEOF | |
11476 | cat confdefs.h >>conftest.$ac_ext | |
11477 | cat >>conftest.$ac_ext <<_ACEOF | |
11478 | /* end confdefs.h. */ | |
7afe8c41 KG |
11479 | #undef $ac_tr_decl |
11480 | #define $ac_tr_decl 1 | |
ba479fd2 | 11481 | |
d02af173 | 11482 | #include "ansidecl.h" |
86cf1cbd | 11483 | #include "system.h" |
81bf3d9e RH |
11484 | #ifdef HAVE_SYS_RESOURCE_H |
11485 | #include <sys/resource.h> | |
11486 | #endif | |
11487 | ||
f31e826b | 11488 | |
ba479fd2 NN |
11489 | int |
11490 | main () | |
11491 | { | |
86cf1cbd KG |
11492 | #ifndef $ac_func |
11493 | char *(*pfn) = (char *(*)) $ac_func ; | |
11494 | #endif | |
ba479fd2 NN |
11495 | ; |
11496 | return 0; | |
11497 | } | |
11498 | _ACEOF | |
11499 | rm -f conftest.$ac_objext | |
11500 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11501 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11502 | ac_status=$? |
86da66b5 HPN |
11503 | grep -v '^ *+' conftest.er1 >conftest.err |
11504 | rm -f conftest.er1 | |
11505 | cat conftest.err >&5 | |
ba479fd2 NN |
11506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11507 | (exit $ac_status); } && | |
ec6c7392 PB |
11508 | { ac_try='test -z "$ac_c_werror_flag" |
11509 | || test ! -s conftest.err' | |
86da66b5 HPN |
11510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11511 | (eval $ac_try) 2>&5 | |
11512 | ac_status=$? | |
11513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11514 | (exit $ac_status); }; } && | |
11515 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11516 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11517 | (eval $ac_try) 2>&5 | |
11518 | ac_status=$? | |
11519 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11520 | (exit $ac_status); }; }; then | |
f31e826b | 11521 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11522 | else |
ba479fd2 NN |
11523 | echo "$as_me: failed program was:" >&5 |
11524 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11525 | ||
11526 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11527 | fi |
86da66b5 | 11528 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11529 | fi |
11530 | ||
f31e826b | 11531 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11532 | echo "$as_me:$LINENO: result: yes" >&5 |
11533 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11534 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11535 | _ACEOF |
11536 | ||
81bf3d9e | 11537 | else |
ba479fd2 NN |
11538 | echo "$as_me:$LINENO: result: no" >&5 |
11539 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11540 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11541 | _ACEOF |
11542 | ||
81bf3d9e RH |
11543 | fi |
11544 | ||
11545 | done | |
86cf1cbd | 11546 | |
81bf3d9e | 11547 | |
ba479fd2 | 11548 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11549 | /* confdefs.h. */ |
11550 | _ACEOF | |
11551 | cat confdefs.h >>conftest.$ac_ext | |
11552 | cat >>conftest.$ac_ext <<_ACEOF | |
11553 | /* end confdefs.h. */ | |
b2522d2b HPN |
11554 | |
11555 | #include "ansidecl.h" | |
11556 | #include "system.h" | |
11557 | #ifdef HAVE_SYS_RESOURCE_H | |
11558 | #include <sys/resource.h> | |
11559 | #endif | |
11560 | ||
ba479fd2 NN |
11561 | int |
11562 | main () | |
11563 | { | |
b2522d2b | 11564 | rlim_t l = 0; |
ba479fd2 NN |
11565 | ; |
11566 | return 0; | |
11567 | } | |
11568 | _ACEOF | |
11569 | rm -f conftest.$ac_objext | |
11570 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11571 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11572 | ac_status=$? |
86da66b5 HPN |
11573 | grep -v '^ *+' conftest.er1 >conftest.err |
11574 | rm -f conftest.er1 | |
11575 | cat conftest.err >&5 | |
ba479fd2 NN |
11576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11577 | (exit $ac_status); } && | |
ec6c7392 PB |
11578 | { ac_try='test -z "$ac_c_werror_flag" |
11579 | || test ! -s conftest.err' | |
86da66b5 HPN |
11580 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11581 | (eval $ac_try) 2>&5 | |
11582 | ac_status=$? | |
11583 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11584 | (exit $ac_status); }; } && | |
11585 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11586 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11587 | (eval $ac_try) 2>&5 | |
11588 | ac_status=$? | |
11589 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11590 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11591 | : |
11592 | else | |
ba479fd2 NN |
11593 | echo "$as_me: failed program was:" >&5 |
11594 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11595 | ||
11596 | ||
11597 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11598 | #define rlim_t long |
ba479fd2 | 11599 | _ACEOF |
b2522d2b HPN |
11600 | |
11601 | fi | |
86da66b5 | 11602 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11603 | |
2102b2fe RS |
11604 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11605 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11606 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11607 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11608 | |
351df804 | 11609 | for ac_func in ldgetname |
c1800ec8 | 11610 | do |
ad6717df | 11611 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11612 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11613 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11614 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11615 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11616 | else | |
11617 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11618 | /* confdefs.h. */ |
11619 | _ACEOF | |
11620 | cat confdefs.h >>conftest.$ac_ext | |
11621 | cat >>conftest.$ac_ext <<_ACEOF | |
11622 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11623 | #undef $ac_tr_decl |
11624 | #define $ac_tr_decl 1 | |
ba479fd2 | 11625 | |
351df804 KG |
11626 | #include "ansidecl.h" |
11627 | #include "system.h" | |
11628 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11629 | #undef FREAD |
11630 | #undef FWRITE | |
351df804 KG |
11631 | #include <ldfcn.h> |
11632 | #endif | |
11633 | ||
11634 | ||
ba479fd2 NN |
11635 | int |
11636 | main () | |
11637 | { | |
351df804 KG |
11638 | #ifndef $ac_func |
11639 | char *(*pfn) = (char *(*)) $ac_func ; | |
11640 | #endif | |
ba479fd2 NN |
11641 | ; |
11642 | return 0; | |
11643 | } | |
11644 | _ACEOF | |
11645 | rm -f conftest.$ac_objext | |
11646 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11647 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11648 | ac_status=$? |
86da66b5 HPN |
11649 | grep -v '^ *+' conftest.er1 >conftest.err |
11650 | rm -f conftest.er1 | |
11651 | cat conftest.err >&5 | |
ba479fd2 NN |
11652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11653 | (exit $ac_status); } && | |
ec6c7392 PB |
11654 | { ac_try='test -z "$ac_c_werror_flag" |
11655 | || test ! -s conftest.err' | |
86da66b5 HPN |
11656 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11657 | (eval $ac_try) 2>&5 | |
11658 | ac_status=$? | |
11659 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11660 | (exit $ac_status); }; } && | |
11661 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11662 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11663 | (eval $ac_try) 2>&5 | |
11664 | ac_status=$? | |
11665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11666 | (exit $ac_status); }; }; then | |
351df804 KG |
11667 | eval "gcc_cv_have_decl_$ac_func=yes" |
11668 | else | |
ba479fd2 NN |
11669 | echo "$as_me: failed program was:" >&5 |
11670 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11671 | ||
11672 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11673 | fi |
86da66b5 | 11674 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11675 | fi |
11676 | ||
11677 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11678 | echo "$as_me:$LINENO: result: yes" >&5 |
11679 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11680 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11681 | _ACEOF |
11682 | ||
351df804 | 11683 | else |
ba479fd2 NN |
11684 | echo "$as_me:$LINENO: result: no" >&5 |
11685 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11686 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11687 | _ACEOF |
11688 | ||
351df804 KG |
11689 | fi |
11690 | ||
11691 | done | |
ba479fd2 | 11692 | |
351df804 KG |
11693 | |
11694 | ||
11695 | for ac_func in times | |
11696 | do | |
ad6717df | 11697 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11698 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11699 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11700 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11701 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11702 | else | |
11703 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11704 | /* confdefs.h. */ |
11705 | _ACEOF | |
11706 | cat confdefs.h >>conftest.$ac_ext | |
11707 | cat >>conftest.$ac_ext <<_ACEOF | |
11708 | /* end confdefs.h. */ | |
351df804 KG |
11709 | #undef $ac_tr_decl |
11710 | #define $ac_tr_decl 1 | |
ba479fd2 | 11711 | |
c1800ec8 ZW |
11712 | #include "ansidecl.h" |
11713 | #include "system.h" | |
11714 | #ifdef HAVE_SYS_TIMES_H | |
11715 | #include <sys/times.h> | |
11716 | #endif | |
11717 | ||
11718 | ||
ba479fd2 NN |
11719 | int |
11720 | main () | |
11721 | { | |
c1800ec8 ZW |
11722 | #ifndef $ac_func |
11723 | char *(*pfn) = (char *(*)) $ac_func ; | |
11724 | #endif | |
ba479fd2 NN |
11725 | ; |
11726 | return 0; | |
11727 | } | |
11728 | _ACEOF | |
11729 | rm -f conftest.$ac_objext | |
11730 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11731 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11732 | ac_status=$? |
86da66b5 HPN |
11733 | grep -v '^ *+' conftest.er1 >conftest.err |
11734 | rm -f conftest.er1 | |
11735 | cat conftest.err >&5 | |
ba479fd2 NN |
11736 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11737 | (exit $ac_status); } && | |
ec6c7392 PB |
11738 | { ac_try='test -z "$ac_c_werror_flag" |
11739 | || test ! -s conftest.err' | |
86da66b5 HPN |
11740 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11741 | (eval $ac_try) 2>&5 | |
11742 | ac_status=$? | |
11743 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11744 | (exit $ac_status); }; } && | |
11745 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11746 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11747 | (eval $ac_try) 2>&5 | |
11748 | ac_status=$? | |
11749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11750 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11751 | eval "gcc_cv_have_decl_$ac_func=yes" |
11752 | else | |
ba479fd2 NN |
11753 | echo "$as_me: failed program was:" >&5 |
11754 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11755 | ||
11756 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11757 | fi |
86da66b5 | 11758 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11759 | fi |
11760 | ||
11761 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11762 | echo "$as_me:$LINENO: result: yes" >&5 |
11763 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11764 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11765 | _ACEOF |
11766 | ||
c1800ec8 | 11767 | else |
ba479fd2 NN |
11768 | echo "$as_me:$LINENO: result: no" >&5 |
11769 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11770 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11771 | _ACEOF |
11772 | ||
c1800ec8 ZW |
11773 | fi |
11774 | ||
11775 | done | |
c1800ec8 ZW |
11776 | |
11777 | ||
4f6d8cc8 GK |
11778 | |
11779 | for ac_func in sigaltstack | |
11780 | do | |
11781 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
11782 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 | |
11783 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11784 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11785 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11786 | else | |
11787 | cat >conftest.$ac_ext <<_ACEOF | |
11788 | /* confdefs.h. */ | |
11789 | _ACEOF | |
11790 | cat confdefs.h >>conftest.$ac_ext | |
11791 | cat >>conftest.$ac_ext <<_ACEOF | |
11792 | /* end confdefs.h. */ | |
11793 | #undef $ac_tr_decl | |
11794 | #define $ac_tr_decl 1 | |
11795 | ||
11796 | #include "ansidecl.h" | |
11797 | #include "system.h" | |
11798 | #include <signal.h> | |
11799 | ||
11800 | ||
11801 | int | |
11802 | main () | |
11803 | { | |
11804 | #ifndef $ac_func | |
11805 | char *(*pfn) = (char *(*)) $ac_func ; | |
11806 | #endif | |
11807 | ; | |
11808 | return 0; | |
11809 | } | |
11810 | _ACEOF | |
11811 | rm -f conftest.$ac_objext | |
11812 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
11813 | (eval $ac_compile) 2>conftest.er1 | |
11814 | ac_status=$? | |
11815 | grep -v '^ *+' conftest.er1 >conftest.err | |
11816 | rm -f conftest.er1 | |
11817 | cat conftest.err >&5 | |
11818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11819 | (exit $ac_status); } && | |
ec6c7392 PB |
11820 | { ac_try='test -z "$ac_c_werror_flag" |
11821 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
11822 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11823 | (eval $ac_try) 2>&5 | |
11824 | ac_status=$? | |
11825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11826 | (exit $ac_status); }; } && | |
11827 | { ac_try='test -s conftest.$ac_objext' | |
11828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11829 | (eval $ac_try) 2>&5 | |
11830 | ac_status=$? | |
11831 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11832 | (exit $ac_status); }; }; then | |
11833 | eval "gcc_cv_have_decl_$ac_func=yes" | |
11834 | else | |
11835 | echo "$as_me: failed program was:" >&5 | |
11836 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11837 | ||
11838 | eval "gcc_cv_have_decl_$ac_func=no" | |
11839 | fi | |
11840 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
11841 | fi | |
11842 | ||
11843 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
11844 | echo "$as_me:$LINENO: result: yes" >&5 | |
11845 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
11846 | #define $ac_tr_decl 1 | |
11847 | _ACEOF | |
11848 | ||
11849 | else | |
11850 | echo "$as_me:$LINENO: result: no" >&5 | |
11851 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
11852 | #define $ac_tr_decl 0 | |
11853 | _ACEOF | |
11854 | ||
11855 | fi | |
11856 | ||
11857 | done | |
11858 | ||
11859 | ||
c1800ec8 | 11860 | # More time-related stuff. |
ba479fd2 NN |
11861 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11862 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11863 | if test "${ac_cv_struct_tms+set}" = set; then | |
11864 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11865 | else | |
11866 | ||
11867 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11868 | /* confdefs.h. */ |
11869 | _ACEOF | |
11870 | cat confdefs.h >>conftest.$ac_ext | |
11871 | cat >>conftest.$ac_ext <<_ACEOF | |
11872 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11873 | |
11874 | #include "ansidecl.h" | |
11875 | #include "system.h" | |
11876 | #ifdef HAVE_SYS_TIMES_H | |
11877 | #include <sys/times.h> | |
11878 | #endif | |
11879 | ||
ba479fd2 NN |
11880 | int |
11881 | main () | |
11882 | { | |
c1800ec8 | 11883 | struct tms tms; |
ba479fd2 NN |
11884 | ; |
11885 | return 0; | |
11886 | } | |
11887 | _ACEOF | |
11888 | rm -f conftest.$ac_objext | |
11889 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11890 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11891 | ac_status=$? |
86da66b5 HPN |
11892 | grep -v '^ *+' conftest.er1 >conftest.err |
11893 | rm -f conftest.er1 | |
11894 | cat conftest.err >&5 | |
ba479fd2 NN |
11895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11896 | (exit $ac_status); } && | |
ec6c7392 PB |
11897 | { ac_try='test -z "$ac_c_werror_flag" |
11898 | || test ! -s conftest.err' | |
86da66b5 HPN |
11899 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11900 | (eval $ac_try) 2>&5 | |
11901 | ac_status=$? | |
11902 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11903 | (exit $ac_status); }; } && | |
11904 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11905 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11906 | (eval $ac_try) 2>&5 | |
11907 | ac_status=$? | |
11908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11909 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11910 | ac_cv_struct_tms=yes |
11911 | else | |
ba479fd2 NN |
11912 | echo "$as_me: failed program was:" >&5 |
11913 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11914 | ||
11915 | ac_cv_struct_tms=no | |
c1800ec8 | 11916 | fi |
86da66b5 | 11917 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11918 | fi |
ba479fd2 NN |
11919 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11920 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11921 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11922 | |
11923 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11924 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11925 | _ACEOF |
c1800ec8 ZW |
11926 | |
11927 | fi | |
11928 | ||
11929 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11930 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11931 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11932 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11933 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11934 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11935 | else | |
11936 | ||
11937 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11938 | /* confdefs.h. */ |
11939 | _ACEOF | |
11940 | cat confdefs.h >>conftest.$ac_ext | |
11941 | cat >>conftest.$ac_ext <<_ACEOF | |
11942 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11943 | |
11944 | #include "ansidecl.h" | |
11945 | #include "system.h" | |
11946 | ||
ba479fd2 NN |
11947 | int |
11948 | main () | |
11949 | { | |
c1800ec8 | 11950 | clock_t x; |
ba479fd2 NN |
11951 | ; |
11952 | return 0; | |
11953 | } | |
11954 | _ACEOF | |
11955 | rm -f conftest.$ac_objext | |
11956 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11957 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11958 | ac_status=$? |
86da66b5 HPN |
11959 | grep -v '^ *+' conftest.er1 >conftest.err |
11960 | rm -f conftest.er1 | |
11961 | cat conftest.err >&5 | |
ba479fd2 NN |
11962 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11963 | (exit $ac_status); } && | |
ec6c7392 PB |
11964 | { ac_try='test -z "$ac_c_werror_flag" |
11965 | || test ! -s conftest.err' | |
86da66b5 HPN |
11966 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11967 | (eval $ac_try) 2>&5 | |
11968 | ac_status=$? | |
11969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11970 | (exit $ac_status); }; } && | |
11971 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11973 | (eval $ac_try) 2>&5 | |
11974 | ac_status=$? | |
11975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11976 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11977 | gcc_cv_type_clock_t=yes |
11978 | else | |
ba479fd2 NN |
11979 | echo "$as_me: failed program was:" >&5 |
11980 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11981 | ||
11982 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11983 | fi |
86da66b5 | 11984 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11985 | fi |
ba479fd2 NN |
11986 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11987 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11988 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11989 | |
11990 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11991 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 11992 | _ACEOF |
c1800ec8 ZW |
11993 | |
11994 | fi | |
11995 | ||
eb70d86d AS |
11996 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
11997 | CFLAGS="$saved_CFLAGS" | |
11998 | ||
07cf4226 DM |
11999 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
12000 | if test "${enable_initfini_array+set}" = set; then | |
12001 | enableval="$enable_initfini_array" | |
ba479fd2 | 12002 | |
07cf4226 | 12003 | else |
ba479fd2 NN |
12004 | |
12005 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
12006 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
12007 | if test "${gcc_cv_initfini_array+set}" = set; then | |
12008 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12009 | else |
eb70d86d | 12010 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12011 | gcc_cv_initfini_array=no |
eb70d86d | 12012 | else |
ba479fd2 | 12013 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12014 | /* confdefs.h. */ |
12015 | _ACEOF | |
12016 | cat confdefs.h >>conftest.$ac_ext | |
12017 | cat >>conftest.$ac_ext <<_ACEOF | |
12018 | /* end confdefs.h. */ | |
eb70d86d | 12019 | |
07cf4226 DM |
12020 | static int x = -1; |
12021 | int main (void) { return x; } | |
12022 | int foo (void) { x = 0; } | |
12023 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12024 | _ACEOF |
12025 | rm -f conftest$ac_exeext | |
12026 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12027 | (eval $ac_link) 2>&5 | |
12028 | ac_status=$? | |
12029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12030 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
12031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12032 | (eval $ac_try) 2>&5 | |
12033 | ac_status=$? | |
12034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12035 | (exit $ac_status); }; }; then | |
918c4fe4 | 12036 | gcc_cv_initfini_array=yes |
eb70d86d | 12037 | else |
ba479fd2 NN |
12038 | echo "$as_me: program exited with status $ac_status" >&5 |
12039 | echo "$as_me: failed program was:" >&5 | |
12040 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12041 | ||
12042 | ( exit $ac_status ) | |
12043 | gcc_cv_initfini_array=no | |
eb70d86d | 12044 | fi |
86da66b5 | 12045 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12046 | fi |
07cf4226 | 12047 | fi |
ba479fd2 NN |
12048 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12049 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 12050 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12051 | |
ba479fd2 | 12052 | fi; |
63cf211a | 12053 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12054 | |
12055 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12056 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12057 | _ACEOF |
07cf4226 | 12058 | |
eb70d86d | 12059 | fi |
81bf3d9e | 12060 | |
ba479fd2 NN |
12061 | # mkdir takes a single argument on some systems. |
12062 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
12063 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
12064 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
12065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12066 | else |
ba479fd2 | 12067 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12068 | /* confdefs.h. */ |
12069 | _ACEOF | |
12070 | cat confdefs.h >>conftest.$ac_ext | |
12071 | cat >>conftest.$ac_ext <<_ACEOF | |
12072 | /* end confdefs.h. */ | |
75923b2f MK |
12073 | |
12074 | #include <sys/types.h> | |
12075 | #ifdef HAVE_SYS_STAT_H | |
12076 | # include <sys/stat.h> | |
12077 | #endif | |
12078 | #ifdef HAVE_UNISTD_H | |
12079 | # include <unistd.h> | |
12080 | #endif | |
12081 | #ifdef HAVE_DIRECT_H | |
12082 | # include <direct.h> | |
12083 | #endif | |
ba479fd2 NN |
12084 | int |
12085 | main () | |
12086 | { | |
75923b2f | 12087 | mkdir ("foo", 0); |
ba479fd2 NN |
12088 | ; |
12089 | return 0; | |
12090 | } | |
12091 | _ACEOF | |
12092 | rm -f conftest.$ac_objext | |
12093 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 12094 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 12095 | ac_status=$? |
86da66b5 HPN |
12096 | grep -v '^ *+' conftest.er1 >conftest.err |
12097 | rm -f conftest.er1 | |
12098 | cat conftest.err >&5 | |
ba479fd2 NN |
12099 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12100 | (exit $ac_status); } && | |
ec6c7392 PB |
12101 | { ac_try='test -z "$ac_c_werror_flag" |
12102 | || test ! -s conftest.err' | |
86da66b5 HPN |
12103 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12104 | (eval $ac_try) 2>&5 | |
12105 | ac_status=$? | |
12106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12107 | (exit $ac_status); }; } && | |
12108 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
12109 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12110 | (eval $ac_try) 2>&5 | |
12111 | ac_status=$? | |
12112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12113 | (exit $ac_status); }; }; then | |
75923b2f MK |
12114 | gcc_cv_mkdir_takes_one_arg=no |
12115 | else | |
ba479fd2 NN |
12116 | echo "$as_me: failed program was:" >&5 |
12117 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12118 | ||
12119 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 12120 | fi |
86da66b5 | 12121 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 12122 | fi |
ba479fd2 NN |
12123 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12124 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 12125 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12126 | |
12127 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12128 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12129 | _ACEOF |
75923b2f MK |
12130 | |
12131 | fi | |
12132 | ||
12133 | ||
861bb6c1 JL |
12134 | # File extensions |
12135 | manext='.1' | |
12136 | objext='.o' | |
12137 | ||
12138 | ||
12139 | ||
4977bab6 ZW |
12140 | # With Setjmp/Longjmp based exception handling. |
12141 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
12142 | if test "${enable_sjlj_exceptions+set}" = set; then | |
12143 | enableval="$enable_sjlj_exceptions" | |
12144 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 12145 | |
ba479fd2 NN |
12146 | cat >>confdefs.h <<_ACEOF |
12147 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12148 | _ACEOF | |
4977bab6 | 12149 | |
ba479fd2 | 12150 | fi; |
4977bab6 | 12151 | |
443728bb L |
12152 | # For platforms with the unwind ABI which includes an unwind library, |
12153 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12154 | |
443728bb L |
12155 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
12156 | if test "${with_system_libunwind+set}" = set; then | |
12157 | withval="$with_system_libunwind" | |
4977bab6 | 12158 | |
ba479fd2 | 12159 | fi; |
4977bab6 | 12160 | |
34a86c2b NN |
12161 | # -------------------------------------------------------- |
12162 | # Build, host, and target specific configuration fragments | |
12163 | # -------------------------------------------------------- | |
12164 | ||
5b28c537 NN |
12165 | # Collect build-machine-specific information. |
12166 | . ${srcdir}/config.build | |
12167 | ||
a89ea0df NN |
12168 | # Collect host-machine-specific information. |
12169 | . ${srcdir}/config.host | |
12170 | ||
ef69da62 | 12171 | target_gtfiles= |
a89ea0df NN |
12172 | |
12173 | # Collect target-machine-specific information. | |
8ad9fb33 | 12174 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12175 | |
12176 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12177 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12178 | |
12179 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12180 | if test x"$tm_file" = x |
861bb6c1 JL |
12181 | then tm_file=$cpu_type/$cpu_type.h; fi |
12182 | ||
6b2adea9 | 12183 | if test x"$extra_headers" = x |
861bb6c1 JL |
12184 | then extra_headers=; fi |
12185 | ||
75bffa71 | 12186 | if test x$md_file = x |
e98e406f | 12187 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12188 | |
75bffa71 | 12189 | if test x$out_file = x |
861bb6c1 JL |
12190 | then out_file=$cpu_type/$cpu_type.c; fi |
12191 | ||
75bffa71 | 12192 | if test x"$tmake_file" = x |
861bb6c1 JL |
12193 | then tmake_file=$cpu_type/t-$cpu_type |
12194 | fi | |
12195 | ||
90e6a802 | 12196 | if test x"$dwarf2" = xyes |
756ee602 | 12197 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12198 | fi |
12199 | ||
861bb6c1 | 12200 | # Say what files are being used for the output code and MD file. |
11642c3a | 12201 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12202 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12203 | ||
11642c3a | 12204 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12205 | # about them and drop them. |
12206 | ||
11642c3a ZW |
12207 | bx= |
12208 | for x in $build_xm_file; do | |
12209 | if test -f $srcdir/config/$x | |
12210 | then bx="$bx $x" | |
ba479fd2 NN |
12211 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12212 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12213 | fi |
12214 | done | |
12215 | build_xm_file="$bx" | |
12216 | ||
12217 | hx= | |
12218 | for x in $host_xm_file; do | |
12219 | if test -f $srcdir/config/$x | |
12220 | then hx="$hx $x" | |
ba479fd2 NN |
12221 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12222 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12223 | fi |
12224 | done | |
12225 | host_xm_file="$hx" | |
12226 | ||
12227 | tx= | |
12228 | for x in $xm_file; do | |
12229 | if test -f $srcdir/config/$x | |
12230 | then tx="$tx $x" | |
ba479fd2 NN |
12231 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12232 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12233 | fi |
12234 | done | |
12235 | xm_file="$tx" | |
12236 | ||
861bb6c1 JL |
12237 | count=a |
12238 | for f in $tm_file; do | |
12239 | count=${count}x | |
12240 | done | |
75bffa71 | 12241 | if test $count = ax; then |
861bb6c1 JL |
12242 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12243 | else | |
12244 | echo "Using the following target machine macro files:" | |
12245 | for f in $tm_file; do | |
12246 | echo " $srcdir/config/$f" | |
12247 | done | |
12248 | fi | |
12249 | ||
4977bab6 | 12250 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12251 | |
12252 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12253 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12254 | _ACEOF |
4977bab6 ZW |
12255 | |
12256 | fi | |
12257 | ||
99fa8911 AP |
12258 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12259 | ||
12260 | cat >>confdefs.h <<\_ACEOF | |
12261 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12262 | _ACEOF | |
12263 | ||
12264 | fi | |
12265 | ||
861bb6c1 JL |
12266 | count=a |
12267 | for f in $host_xm_file; do | |
12268 | count=${count}x | |
12269 | done | |
11642c3a ZW |
12270 | if test $count = a; then |
12271 | : | |
12272 | elif test $count = ax; then | |
861bb6c1 JL |
12273 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12274 | else | |
12275 | echo "Using the following host machine macro files:" | |
12276 | for f in $host_xm_file; do | |
12277 | echo " $srcdir/config/$f" | |
12278 | done | |
12279 | fi | |
476d9098 | 12280 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12281 | |
75bffa71 | 12282 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12283 | count=a |
12284 | for f in $build_xm_file; do | |
12285 | count=${count}x | |
12286 | done | |
11642c3a ZW |
12287 | if test $count = a; then |
12288 | : | |
12289 | elif test $count = ax; then | |
861bb6c1 JL |
12290 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12291 | else | |
12292 | echo "Using the following build machine macro files:" | |
12293 | for f in $build_xm_file; do | |
12294 | echo " $srcdir/config/$f" | |
12295 | done | |
12296 | fi | |
12297 | fi | |
12298 | ||
4f6d8cc8 GK |
12299 | case ${host} in |
12300 | powerpc-*-darwin*) | |
12301 | echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 | |
12302 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 | |
12303 | if test "${gcc_cv_mcontext_underscores+set}" = set; then | |
12304 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12305 | else | |
12306 | cat >conftest.$ac_ext <<_ACEOF | |
12307 | ||
de4fb767 | 12308 | #include <sys/signal.h> |
4f6d8cc8 GK |
12309 | #include <ucontext.h> |
12310 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12311 | ||
12312 | _ACEOF | |
12313 | rm -f conftest.$ac_objext | |
12314 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12315 | (eval $ac_compile) 2>conftest.er1 | |
12316 | ac_status=$? | |
12317 | grep -v '^ *+' conftest.er1 >conftest.err | |
12318 | rm -f conftest.er1 | |
12319 | cat conftest.err >&5 | |
12320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12321 | (exit $ac_status); } && | |
ec6c7392 PB |
12322 | { ac_try='test -z "$ac_c_werror_flag" |
12323 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
12324 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12325 | (eval $ac_try) 2>&5 | |
12326 | ac_status=$? | |
12327 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12328 | (exit $ac_status); }; } && | |
12329 | { ac_try='test -s conftest.$ac_objext' | |
12330 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12331 | (eval $ac_try) 2>&5 | |
12332 | ac_status=$? | |
12333 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12334 | (exit $ac_status); }; }; then | |
12335 | gcc_cv_mcontext_underscores=no | |
12336 | else | |
12337 | echo "$as_me: failed program was:" >&5 | |
12338 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12339 | ||
12340 | gcc_cv_mcontext_underscores=yes | |
12341 | fi | |
12342 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
12343 | fi | |
12344 | echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 | |
12345 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 | |
12346 | if test $gcc_cv_mcontext_underscores = yes; then | |
12347 | ||
12348 | cat >>confdefs.h <<\_ACEOF | |
12349 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12350 | _ACEOF | |
12351 | ||
12352 | fi | |
12353 | ;; | |
12354 | esac | |
12355 | ||
8bb915b6 NN |
12356 | # --------- |
12357 | # Threading | |
12358 | # --------- | |
12359 | ||
c2e494a8 | 12360 | # Check if a valid thread package |
615be2cf | 12361 | case ${enable_threads} in |
c2e494a8 NN |
12362 | "" | no) |
12363 | # No threads | |
12364 | target_thread_file='single' | |
12365 | ;; | |
12366 | yes) | |
12367 | # default | |
12368 | target_thread_file='single' | |
12369 | ;; | |
18167442 | 12370 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12371 | single | solaris | vxworks | win32 ) |
615be2cf | 12372 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12373 | ;; |
12374 | *) | |
615be2cf | 12375 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12376 | exit 1 |
12377 | ;; | |
12378 | esac | |
12379 | ||
12380 | if test x${thread_file} = x; then | |
12381 | # No thread file set by target-specific clauses in config.gcc, | |
12382 | # so use file chosen by default logic above | |
12383 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12384 | fi |
12385 | ||
8bb915b6 NN |
12386 | # Make gthr-default.h if we have a thread file. |
12387 | gthread_flags= | |
12388 | if test $thread_file != single; then | |
12389 | rm -f gthr-default.h | |
12390 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12391 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12392 | fi | |
12393 | ||
12394 | ||
12395 | # -------- | |
12396 | # UNSORTED | |
12397 | # -------- | |
12398 | ||
18fbf599 | 12399 | use_cxa_atexit=no |
2121a768 JT |
12400 | if test x$enable___cxa_atexit = xyes || \ |
12401 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12402 | if test x$host = x$target; then |
12403 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12404 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12405 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12407 | else | |
12408 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12409 | /* confdefs.h. */ |
12410 | _ACEOF | |
12411 | cat confdefs.h >>conftest.$ac_ext | |
12412 | cat >>conftest.$ac_ext <<_ACEOF | |
12413 | /* end confdefs.h. */ | |
86da66b5 HPN |
12414 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12415 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12416 | #define __cxa_atexit innocuous___cxa_atexit | |
12417 | ||
354b7da5 DH |
12418 | /* System header to define __stub macros and hopefully few prototypes, |
12419 | which can conflict with char __cxa_atexit (); below. | |
12420 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12421 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12422 | |
354b7da5 DH |
12423 | #ifdef __STDC__ |
12424 | # include <limits.h> | |
12425 | #else | |
12426 | # include <assert.h> | |
12427 | #endif | |
86da66b5 HPN |
12428 | |
12429 | #undef __cxa_atexit | |
12430 | ||
354b7da5 DH |
12431 | /* Override any gcc2 internal prototype to avoid an error. */ |
12432 | #ifdef __cplusplus | |
12433 | extern "C" | |
12434 | { | |
12435 | #endif | |
12436 | /* We use char because int might match the return type of a gcc2 | |
12437 | builtin and then its argument prototype would still apply. */ | |
12438 | char __cxa_atexit (); | |
12439 | /* The GNU C library defines this for functions which it implements | |
12440 | to always fail with ENOSYS. Some functions are actually named | |
12441 | something starting with __ and the normal name is an alias. */ | |
12442 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12443 | choke me | |
12444 | #else | |
12445 | char (*f) () = __cxa_atexit; | |
12446 | #endif | |
12447 | #ifdef __cplusplus | |
12448 | } | |
12449 | #endif | |
12450 | ||
12451 | int | |
12452 | main () | |
12453 | { | |
12454 | return f != __cxa_atexit; | |
12455 | ; | |
12456 | return 0; | |
12457 | } | |
12458 | _ACEOF | |
12459 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12460 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12461 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12462 | ac_status=$? |
86da66b5 HPN |
12463 | grep -v '^ *+' conftest.er1 >conftest.err |
12464 | rm -f conftest.er1 | |
12465 | cat conftest.err >&5 | |
354b7da5 DH |
12466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12467 | (exit $ac_status); } && | |
ec6c7392 PB |
12468 | { ac_try='test -z "$ac_c_werror_flag" |
12469 | || test ! -s conftest.err' | |
86da66b5 HPN |
12470 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12471 | (eval $ac_try) 2>&5 | |
12472 | ac_status=$? | |
12473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12474 | (exit $ac_status); }; } && | |
12475 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12477 | (eval $ac_try) 2>&5 | |
12478 | ac_status=$? | |
12479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12480 | (exit $ac_status); }; }; then | |
12481 | ac_cv_func___cxa_atexit=yes | |
12482 | else | |
12483 | echo "$as_me: failed program was:" >&5 | |
12484 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12485 | ||
12486 | ac_cv_func___cxa_atexit=no | |
12487 | fi | |
86da66b5 HPN |
12488 | rm -f conftest.err conftest.$ac_objext \ |
12489 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12490 | fi |
12491 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12492 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12493 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12494 | use_cxa_atexit=yes |
12495 | else | |
12496 | echo "__cxa_atexit can't be enabled on this target" | |
12497 | fi | |
12498 | ||
12499 | else | |
12500 | # We can't check for __cxa_atexit when building a cross, so assume | |
12501 | # it is available | |
12502 | use_cxa_atexit=yes | |
12503 | fi | |
12504 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12505 | |
12506 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 12507 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 12508 | _ACEOF |
2121a768 | 12509 | |
18fbf599 | 12510 | fi |
2121a768 JT |
12511 | fi |
12512 | ||
a5381466 | 12513 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12514 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12515 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12516 | |
12517 | ||
12518 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12519 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12520 | _ACEOF |
a5381466 ZW |
12521 | |
12522 | fi | |
12523 | ||
75685792 RS |
12524 | # Convert extra_options into a form suitable for Makefile use. |
12525 | extra_opt_files= | |
12526 | for f in $extra_options; do | |
12527 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12528 | done | |
12529 | ||
12530 | ||
b7cb92ad | 12531 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12532 | # the first file included by config.h. |
4977bab6 | 12533 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12534 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12535 | # work to find out the build config parameters. |
75bffa71 | 12536 | if test x$host = x$build |
db81d74a | 12537 | then |
eaf4e618 | 12538 | build_auto=auto-host.h |
b7cb92ad JL |
12539 | else |
12540 | # We create a subdir, then run autoconf in the subdir. | |
12541 | # To prevent recursion we set host and build for the new | |
12542 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12543 | # of configure. |
b7cb92ad JL |
12544 | tempdir=build.$$ |
12545 | rm -rf $tempdir | |
12546 | mkdir $tempdir | |
12547 | cd $tempdir | |
12548 | case ${srcdir} in | |
255b8a49 | 12549 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12550 | *) realsrcdir=../${srcdir};; |
12551 | esac | |
d920e825 L |
12552 | saved_CFLAGS="${CFLAGS}" |
12553 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12554 | ${realsrcdir}/configure \ | |
33e70558 | 12555 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12556 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12557 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12558 | |
12559 | # We just finished tests for the build machine, so rename | |
12560 | # the file auto-build.h in the gcc directory. | |
12561 | mv auto-host.h ../auto-build.h | |
12562 | cd .. | |
12563 | rm -rf $tempdir | |
eaf4e618 | 12564 | build_auto=auto-build.h |
db81d74a RH |
12565 | fi |
12566 | ||
06f0b04c | 12567 | |
eaf4e618 | 12568 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12569 | tm_p_file="${tm_p_file} tm-preds.h" |
12570 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12571 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12572 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12573 | # put this back in temporarily. |
232b67d9 | 12574 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12575 | |
34a86c2b NN |
12576 | # -------- |
12577 | # UNSORTED | |
12578 | # -------- | |
12579 | ||
cc1e60ea | 12580 | # Compile in configure arguments. |
8105825d | 12581 | if test -f configargs.h ; then |
cc1e60ea | 12582 | # Being re-configured. |
022dae81 | 12583 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12584 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12585 | else | |
12586 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12587 | fi | |
eeae7b41 DJ |
12588 | |
12589 | # Double all backslashes and backslash all quotes to turn | |
12590 | # gcc_config_arguments into a C string. | |
12591 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12592 | $gcc_config_arguments | |
12593 | EOF | |
12594 | gcc_config_arguments_str=`cat conftest.out` | |
12595 | rm -f conftest.out | |
12596 | ||
cc1e60ea JM |
12597 | cat > configargs.h <<EOF |
12598 | /* Generated automatically. */ | |
eeae7b41 | 12599 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12600 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12601 | |
12602 | static const struct { | |
12603 | const char *name, *value; | |
12604 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12605 | EOF |
12606 | ||
ab87f8c8 | 12607 | # Internationalization |
18fc9bd4 RG |
12608 | # If we haven't got the data from the intl directory, |
12609 | # assume NLS is disabled. | |
12610 | USE_NLS=no | |
12611 | LIBINTL= | |
12612 | LIBINTL_DEP= | |
12613 | INCINTL= | |
12614 | XGETTEXT= | |
12615 | GMSGFMT= | |
12616 | POSUB= | |
12617 | ||
12618 | if test -f ../intl/config.intl; then | |
12619 | . ../intl/config.intl | |
12620 | fi | |
12621 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 | |
12622 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
12623 | if test x"$USE_NLS" != xyes; then | |
12624 | echo "$as_me:$LINENO: result: no" >&5 | |
12625 | echo "${ECHO_T}no" >&6 | |
12626 | else | |
12627 | echo "$as_me:$LINENO: result: yes" >&5 | |
12628 | echo "${ECHO_T}yes" >&6 | |
12629 | ||
12630 | cat >>confdefs.h <<\_ACEOF | |
12631 | #define ENABLE_NLS 1 | |
12632 | _ACEOF | |
12633 | ||
12634 | ||
12635 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 | |
12636 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
12637 | # Look for .po and .gmo files in the source directory. | |
12638 | CATALOGS= | |
12639 | XLINGUAS= | |
12640 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12641 | # If there aren't any .gmo files the shell will give us the | |
12642 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12643 | # weeded out. | |
12644 | case "$cat" in *\**) | |
12645 | continue;; | |
12646 | esac | |
12647 | # The quadruple backslash is collapsed to a double backslash | |
12648 | # by the backticks, then collapsed again by the double quotes, | |
12649 | # leaving us with one backslash in the sed expression (right | |
12650 | # before the dot that mustn't act as a wildcard). | |
12651 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
12652 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
12653 | # The user is allowed to set LINGUAS to a list of languages to | |
12654 | # install catalogs for. If it's empty that means "all of them." | |
12655 | if test "x$LINGUAS" = x; then | |
12656 | CATALOGS="$CATALOGS $cat" | |
12657 | XLINGUAS="$XLINGUAS $lang" | |
12658 | else | |
12659 | case "$LINGUAS" in *$lang*) | |
12660 | CATALOGS="$CATALOGS $cat" | |
12661 | XLINGUAS="$XLINGUAS $lang" | |
12662 | ;; | |
12663 | esac | |
12664 | fi | |
12665 | done | |
12666 | LINGUAS="$XLINGUAS" | |
12667 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 | |
12668 | echo "${ECHO_T}$LINGUAS" >&6 | |
12669 | ||
12670 | ||
12671 | DATADIRNAME=share | |
12672 | ||
12673 | INSTOBJEXT=.mo | |
12674 | ||
12675 | GENCAT=gencat | |
12676 | ||
12677 | CATOBJEXT=.gmo | |
12678 | ||
12679 | fi | |
861bb6c1 | 12680 | |
56694dd9 ZW |
12681 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12682 | # -liconv on the link line twice. | |
12683 | case "$LIBINTL" in *$LIBICONV*) | |
12684 | LIBICONV= ;; | |
12685 | esac | |
dc6746e7 | 12686 | |
7f970b70 AM |
12687 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12688 | if test "${enable_secureplt+set}" = set; then | |
12689 | enableval="$enable_secureplt" | |
12690 | ||
12691 | fi; | |
12692 | ||
56694dd9 ZW |
12693 | # Windows32 Registry support for specifying GCC installation paths. |
12694 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12695 | if test "${enable_win32_registry+set}" = set; then | |
12696 | enableval="$enable_win32_registry" | |
dc6746e7 | 12697 | |
ba479fd2 | 12698 | fi; |
ba479fd2 | 12699 | |
a1286ef5 ZW |
12700 | case $host_os in |
12701 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12702 | if test "x$enable_win32_registry" != xno; then | |
12703 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12704 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12705 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12706 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12707 | else | |
12708 | ac_func_search_save_LIBS=$LIBS | |
12709 | ac_cv_search_RegOpenKeyExA=no | |
12710 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12711 | /* confdefs.h. */ |
12712 | _ACEOF | |
12713 | cat confdefs.h >>conftest.$ac_ext | |
12714 | cat >>conftest.$ac_ext <<_ACEOF | |
12715 | /* end confdefs.h. */ | |
861bb6c1 | 12716 | |
ab87f8c8 | 12717 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12718 | #ifdef __cplusplus |
12719 | extern "C" | |
12720 | #endif | |
ab87f8c8 | 12721 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12722 | builtin and then its argument prototype would still apply. */ |
12723 | char RegOpenKeyExA (); | |
12724 | int | |
12725 | main () | |
12726 | { | |
12727 | RegOpenKeyExA (); | |
12728 | ; | |
12729 | return 0; | |
12730 | } | |
12731 | _ACEOF | |
12732 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12733 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12734 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12735 | ac_status=$? |
86da66b5 HPN |
12736 | grep -v '^ *+' conftest.er1 >conftest.err |
12737 | rm -f conftest.er1 | |
12738 | cat conftest.err >&5 | |
ba479fd2 NN |
12739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12740 | (exit $ac_status); } && | |
ec6c7392 PB |
12741 | { ac_try='test -z "$ac_c_werror_flag" |
12742 | || test ! -s conftest.err' | |
86da66b5 HPN |
12743 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12744 | (eval $ac_try) 2>&5 | |
12745 | ac_status=$? | |
12746 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12747 | (exit $ac_status); }; } && | |
12748 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12749 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12750 | (eval $ac_try) 2>&5 | |
12751 | ac_status=$? | |
12752 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12753 | (exit $ac_status); }; }; then | |
56694dd9 | 12754 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12755 | else |
ba479fd2 NN |
12756 | echo "$as_me: failed program was:" >&5 |
12757 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12758 | ||
861bb6c1 | 12759 | fi |
86da66b5 HPN |
12760 | rm -f conftest.err conftest.$ac_objext \ |
12761 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12762 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12763 | for ac_lib in advapi32; do | |
12764 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12765 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12766 | /* confdefs.h. */ |
12767 | _ACEOF | |
12768 | cat confdefs.h >>conftest.$ac_ext | |
12769 | cat >>conftest.$ac_ext <<_ACEOF | |
12770 | /* end confdefs.h. */ | |
12771 | ||
56694dd9 | 12772 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12773 | #ifdef __cplusplus |
12774 | extern "C" | |
12775 | #endif | |
56694dd9 | 12776 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12777 | builtin and then its argument prototype would still apply. */ |
12778 | char RegOpenKeyExA (); | |
12779 | int | |
12780 | main () | |
12781 | { | |
12782 | RegOpenKeyExA (); | |
12783 | ; | |
12784 | return 0; | |
12785 | } | |
12786 | _ACEOF | |
12787 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12788 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12789 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12790 | ac_status=$? |
86da66b5 HPN |
12791 | grep -v '^ *+' conftest.er1 >conftest.err |
12792 | rm -f conftest.er1 | |
12793 | cat conftest.err >&5 | |
ba479fd2 NN |
12794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12795 | (exit $ac_status); } && | |
ec6c7392 PB |
12796 | { ac_try='test -z "$ac_c_werror_flag" |
12797 | || test ! -s conftest.err' | |
86da66b5 HPN |
12798 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12799 | (eval $ac_try) 2>&5 | |
12800 | ac_status=$? | |
12801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12802 | (exit $ac_status); }; } && | |
12803 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12804 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12805 | (eval $ac_try) 2>&5 | |
12806 | ac_status=$? | |
12807 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12808 | (exit $ac_status); }; }; then | |
12809 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12810 | break |
861bb6c1 | 12811 | else |
ba479fd2 NN |
12812 | echo "$as_me: failed program was:" >&5 |
12813 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12814 | ||
861bb6c1 | 12815 | fi |
86da66b5 HPN |
12816 | rm -f conftest.err conftest.$ac_objext \ |
12817 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12818 | done |
6e3f3080 | 12819 | fi |
ba479fd2 NN |
12820 | LIBS=$ac_func_search_save_LIBS |
12821 | fi | |
12822 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12823 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12824 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12825 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12826 | |
cafe096b | 12827 | else |
a1286ef5 | 12828 | enable_win32_registry=no |
093e61a6 | 12829 | fi |
ab87f8c8 | 12830 | |
a1286ef5 ZW |
12831 | fi |
12832 | ||
12833 | if test "x$enable_win32_registry" != xno; then | |
12834 | ||
12835 | cat >>confdefs.h <<\_ACEOF | |
12836 | #define ENABLE_WIN32_REGISTRY 1 | |
12837 | _ACEOF | |
ab87f8c8 | 12838 | |
a1286ef5 ZW |
12839 | |
12840 | if test "x$enable_win32_registry" != xyes \ | |
12841 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12842 | |
12843 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12844 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12845 | _ACEOF |
cafe096b | 12846 | |
a1286ef5 ZW |
12847 | fi |
12848 | fi | |
12849 | ;; | |
56694dd9 | 12850 | esac |
ab87f8c8 | 12851 | |
56694dd9 ZW |
12852 | # Get an absolute path to the GCC top-level source directory |
12853 | holddir=`${PWDCMD-pwd}` | |
12854 | cd $srcdir | |
12855 | topdir=`${PWDCMD-pwd}` | |
12856 | cd $holddir | |
ab87f8c8 | 12857 | |
56694dd9 | 12858 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12859 | xmake_file= |
c406e779 | 12860 | for f in ${host_xmake_file} |
56694dd9 ZW |
12861 | do |
12862 | if test -f ${srcdir}/config/$f | |
12863 | then | |
2ed26f6b | 12864 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12865 | fi |
12866 | done | |
093e61a6 | 12867 | |
56694dd9 | 12868 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12869 | tmake_file_= |
c406e779 | 12870 | for f in ${tmake_file} |
56694dd9 ZW |
12871 | do |
12872 | if test -f ${srcdir}/config/$f | |
12873 | then | |
2ed26f6b | 12874 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12875 | fi |
12876 | done | |
2ed26f6b | 12877 | tmake_file="${tmake_file_}" |
71a94577 | 12878 | |
ab87f8c8 JL |
12879 | # If the host doesn't support symlinks, modify CC in |
12880 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12881 | # Otherwise, we can use "CC=$(CC)". | |
12882 | rm -f symtest.tem | |
35f06ae4 PB |
12883 | case "$LN_S" in |
12884 | *-s*) | |
12885 | cc_set_by_configure="\$(CC)" | |
12886 | quoted_cc_set_by_configure="\$(CC)" | |
12887 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12888 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12889 | ;; | |
12890 | *) | |
12891 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12892 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12893 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12894 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12895 | ;; | |
12896 | esac | |
ab87f8c8 | 12897 | |
5395b47b NN |
12898 | # This is a terrible hack which will go away some day. |
12899 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12900 | |
12901 | ||
ab87f8c8 JL |
12902 | out_object_file=`basename $out_file .c`.o |
12903 | ||
75685792 RS |
12904 | tm_file_list="options.h" |
12905 | tm_include_list="options.h" | |
ab87f8c8 | 12906 | for f in $tm_file; do |
64ccbc99 | 12907 | case $f in |
d02af173 | 12908 | defaults.h ) |
e22340b0 ZW |
12909 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12910 | tm_include_list="${tm_include_list} $f" | |
12911 | ;; | |
12912 | * ) | |
12913 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12914 | tm_include_list="${tm_include_list} config/$f" | |
12915 | ;; | |
64ccbc99 | 12916 | esac |
ab87f8c8 JL |
12917 | done |
12918 | ||
11642c3a | 12919 | tm_p_file_list= |
e22340b0 | 12920 | tm_p_include_list= |
11642c3a | 12921 | for f in $tm_p_file; do |
4977bab6 ZW |
12922 | case $f in |
12923 | tm-preds.h ) | |
e22340b0 ZW |
12924 | tm_p_file_list="${tm_p_file_list} $f" |
12925 | tm_p_include_list="${tm_p_include_list} $f" | |
12926 | ;; | |
12927 | * ) | |
12928 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12929 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12930 | esac | |
12931 | done | |
12932 | ||
12933 | xm_file_list= | |
12934 | xm_include_list= | |
12935 | for f in $xm_file; do | |
12936 | case $f in | |
12937 | ansidecl.h ) | |
12938 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12939 | xm_include_list="${xm_include_list} $f" | |
12940 | ;; | |
12941 | auto-host.h ) | |
12942 | xm_file_list="${xm_file_list} $f" | |
12943 | xm_include_list="${xm_include_list} $f" | |
12944 | ;; | |
12945 | * ) | |
12946 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12947 | xm_include_list="${xm_include_list} config/$f" | |
12948 | ;; | |
4977bab6 | 12949 | esac |
11642c3a ZW |
12950 | done |
12951 | ||
ab87f8c8 | 12952 | host_xm_file_list= |
e22340b0 | 12953 | host_xm_include_list= |
ab87f8c8 | 12954 | for f in $host_xm_file; do |
64ccbc99 | 12955 | case $f in |
d02af173 | 12956 | ansidecl.h ) |
e22340b0 ZW |
12957 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12958 | host_xm_include_list="${host_xm_include_list} $f" | |
12959 | ;; | |
e2500fed | 12960 | auto-host.h ) |
e22340b0 ZW |
12961 | host_xm_file_list="${host_xm_file_list} $f" |
12962 | host_xm_include_list="${host_xm_include_list} $f" | |
12963 | ;; | |
12964 | * ) | |
12965 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12966 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12967 | ;; | |
64ccbc99 | 12968 | esac |
ab87f8c8 JL |
12969 | done |
12970 | ||
12971 | build_xm_file_list= | |
12972 | for f in $build_xm_file; do | |
64ccbc99 | 12973 | case $f in |
d02af173 | 12974 | ansidecl.h ) |
e22340b0 ZW |
12975 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12976 | build_xm_include_list="${build_xm_include_list} $f" | |
12977 | ;; | |
e2500fed | 12978 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12979 | build_xm_file_list="${build_xm_file_list} $f" |
12980 | build_xm_include_list="${build_xm_include_list} $f" | |
12981 | ;; | |
12982 | * ) | |
12983 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12984 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12985 | ;; | |
64ccbc99 | 12986 | esac |
ab87f8c8 JL |
12987 | done |
12988 | ||
a078a589 ZW |
12989 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12990 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
12991 | CROSS= |
12992 | ALL=all.internal | |
12993 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
12994 | |
12995 | if test "x$with_build_sysroot" != x; then | |
12996 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
12997 | else | |
12998 | # This value is used, even on a native system, because | |
12999 | # CROSS_SYSTEM_HEADER_DIR is just | |
13000 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13001 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13002 | fi | |
13003 | ||
ab87f8c8 JL |
13004 | if test x$host != x$target |
13005 | then | |
a078a589 ZW |
13006 | CROSS="-DCROSS_COMPILE" |
13007 | ALL=all.cross | |
160633c6 | 13008 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13009 | case "$host","$target" in |
3a7e8b87 GK |
13010 | # Darwin crosses can use the host system's libraries and headers, |
13011 | # because of the fat library support. Of course, it must be the | |
13012 | # same version of Darwin on both sides. Allow the user to | |
13013 | # just say --target=foo-darwin without a version number to mean | |
13014 | # "the version on this system". | |
13015 | *-*-darwin*,*-*-darwin*) | |
13016 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13017 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13018 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13019 | CROSS= | |
13020 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13021 | with_headers=yes | |
13022 | fi | |
13023 | ;; | |
13024 | ||
343f59d9 AM |
13025 | i?86-*-*,x86_64-*-* \ |
13026 | | powerpc*-*-*,powerpc64*-*-*) | |
13027 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13028 | esac | |
7a615b25 | 13029 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13030 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13031 | fi |
13032 | ||
b39d221a EC |
13033 | # If this is a cross-compiler that does not |
13034 | # have its own set of headers then define | |
13035 | # inhibit_libc | |
13036 | ||
dc06db20 R |
13037 | # If this is using newlib, without having the headers available now, |
13038 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13039 | # This prevents libgcc2 from containing any code which requires libc |
13040 | # support. | |
160633c6 | 13041 | inhibit_libc=false |
dc06db20 R |
13042 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13043 | test x$with_newlib = xyes ; } && | |
e50084fa | 13044 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13045 | inhibit_libc=true |
b39d221a EC |
13046 | fi |
13047 | ||
13048 | ||
a078a589 ZW |
13049 | # When building gcc with a cross-compiler, we need to adjust things so |
13050 | # that the generator programs are still built with the native compiler. | |
13051 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13052 | |
13053 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13054 | CC_FOR_BUILD='$(CC)' |
13055 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13056 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13057 | |
13058 | # Possibly disable fixproto, on a per-target basis. | |
13059 | case ${use_fixproto} in | |
13060 | no) | |
13061 | STMP_FIXPROTO= | |
13062 | ;; | |
13063 | yes) | |
13064 | STMP_FIXPROTO=stmp-fixproto | |
13065 | ;; | |
13066 | esac | |
13067 | ||
a078a589 | 13068 | |
83599948 NS |
13069 | # And these apply if build != host, or we are generating coverage data |
13070 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13071 | then |
b11e4747 | 13072 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13073 | |
7a615b25 | 13074 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13075 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13076 | STMP_FIXPROTO=stmp-install-fixproto |
13077 | fi | |
7a615b25 | 13078 | fi |
ab87f8c8 JL |
13079 | fi |
13080 | ||
13081 | # Expand extra_headers to include complete path. | |
13082 | # This substitutes for lots of t-* files. | |
13083 | extra_headers_list= | |
b1ef58c8 NN |
13084 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13085 | for file in ${extra_headers} ; do | |
13086 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13087 | done | |
ab87f8c8 | 13088 | |
c38f02df ILT |
13089 | # Define collect2 in Makefile. |
13090 | case $host_can_use_collect2 in | |
13091 | no) collect2= ;; | |
13092 | *) collect2='collect2$(exeext)' ;; | |
13093 | esac | |
13094 | ||
13095 | ||
ab87f8c8 | 13096 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13097 | case $use_collect2 in |
13098 | no) use_collect2= ;; | |
13099 | "") ;; | |
ba479fd2 | 13100 | *) |
34a86c2b NN |
13101 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13102 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13103 | case $host_can_use_collect2 in |
13104 | no) | |
13105 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13106 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13107 | { (exit 1); exit 1; }; } | |
13108 | ;; | |
13109 | esac | |
34a86c2b NN |
13110 | ;; |
13111 | esac | |
ab87f8c8 | 13112 | |
8bb915b6 NN |
13113 | # --------------------------- |
13114 | # Assembler & linker features | |
13115 | # --------------------------- | |
13116 | ||
d869a8c4 NN |
13117 | # Identify the assembler which will work hand-in-glove with the newly |
13118 | # built GCC, so that we can examine its features. This is the assembler | |
13119 | # which will be driven by the driver program. | |
13120 | # | |
13121 | # If build != host, and we aren't building gas in-tree, we identify a | |
13122 | # build->target assembler and hope that it will have the same features | |
13123 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13124 | gcc_cv_gas_major_version= |
13125 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13126 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13127 | |
13128 | if test "${gcc_cv_as+set}" = set; then | |
13129 | : | |
13130 | else | |
13131 | ||
ab87f8c8 JL |
13132 | if test -x "$DEFAULT_ASSEMBLER"; then |
13133 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13134 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13135 | && test -f ../gas/Makefile \ |
13136 | && test x$build = x$host; then | |
e8b05380 PB |
13137 | gcc_cv_as=../gas/as-new$build_exeext |
13138 | elif test -x as$build_exeext; then | |
13139 | # Build using assembler in the current directory. | |
13140 | gcc_cv_as=./as$build_exeext | |
13141 | elif test -x $AS_FOR_TARGET; then | |
13142 | gcc_cv_as="$AS_FOR_TARGET" | |
13143 | else | |
13144 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13145 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
13146 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13147 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13148 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13149 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13150 | else | |
13151 | case $gcc_cv_as in | |
13152 | [\\/]* | ?:[\\/]*) | |
13153 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13154 | ;; | |
13155 | *) | |
13156 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13157 | for as_dir in $PATH | |
13158 | do | |
13159 | IFS=$as_save_IFS | |
13160 | test -z "$as_dir" && as_dir=. | |
13161 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13162 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13163 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13164 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13165 | break 2 | |
13166 | fi | |
13167 | done | |
13168 | done | |
13169 | ||
13170 | ;; | |
13171 | esac | |
13172 | fi | |
13173 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
13174 | ||
13175 | if test -n "$gcc_cv_as"; then | |
13176 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13177 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13178 | else | |
13179 | echo "$as_me:$LINENO: result: no" >&5 | |
13180 | echo "${ECHO_T}no" >&6 | |
13181 | fi | |
13182 | ||
13183 | fi | |
13184 | fi | |
13185 | ||
13186 | ||
13187 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13188 | ||
13189 | ||
13190 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13191 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
13192 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then | |
08d105fa AO |
13193 | # Single tree build which includes gas. We want to prefer it |
13194 | # over whatever linker top-level may have detected, since | |
13195 | # we'll use what we're building after installation anyway. | |
e8b05380 PB |
13196 | echo "$as_me:$LINENO: result: newly built gas" >&5 |
13197 | echo "${ECHO_T}newly built gas" >&6 | |
ad9c4d9f NN |
13198 | in_tree_gas=yes |
13199 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13200 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13201 | $gcc_cv_as_gas_srcdir/configure \ | |
13202 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13203 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13204 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13205 | if test x$gcc_cv_gas_version != x; then |
13206 | break | |
13207 | fi | |
13208 | done | |
13209 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13210 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13211 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13212 | case $gcc_cv_gas_patch_version in |
13213 | "") gcc_cv_gas_patch_version="0" ;; | |
13214 | esac | |
8ada417f ZW |
13215 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13216 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13217 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13218 | |
5408ac6c HPN |
13219 | in_tree_gas_is_elf=no |
13220 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13221 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13222 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13223 | then | |
13224 | in_tree_gas_is_elf=yes | |
13225 | fi | |
e8b05380 PB |
13226 | else |
13227 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13228 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13229 | in_tree_gas=no | |
981d4858 | 13230 | fi |
9e423e6d | 13231 | |
e8b05380 PB |
13232 | # Identify the linker which will work hand-in-glove with the newly |
13233 | # built GCC, so that we can examine its features. This is the linker | |
13234 | # which will be driven by the driver program. | |
9f18db39 | 13235 | # |
e8b05380 PB |
13236 | # If build != host, and we aren't building gas in-tree, we identify a |
13237 | # build->target linker and hope that it will have the same features | |
13238 | # as the host->target linker we'll be using. | |
13239 | gcc_cv_gld_major_version= | |
13240 | gcc_cv_gld_minor_version= | |
13241 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13242 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13243 | |
e8b05380 PB |
13244 | if test "${gcc_cv_ld+set}" = set; then |
13245 | : | |
9f18db39 | 13246 | else |
9f18db39 | 13247 | |
e8b05380 PB |
13248 | if test -x "$DEFAULT_LINKER"; then |
13249 | gcc_cv_ld="$DEFAULT_LINKER" | |
13250 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13251 | && test -f ../ld/Makefile \ | |
13252 | && test x$build = x$host; then | |
13253 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13254 | elif test -x collect-ld$build_exeext; then | |
13255 | # Build using linker in the current directory. | |
13256 | gcc_cv_ld=./collect-ld$build_exeext | |
13257 | elif test -x $LD_FOR_TARGET; then | |
13258 | gcc_cv_ld="$LD_FOR_TARGET" | |
13259 | else | |
13260 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13261 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13262 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13263 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13264 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13265 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13266 | else | |
e8b05380 | 13267 | case $gcc_cv_ld in |
d739199a | 13268 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13269 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13270 | ;; |
13271 | *) | |
13272 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13273 | for as_dir in $PATH | |
13274 | do | |
13275 | IFS=$as_save_IFS | |
13276 | test -z "$as_dir" && as_dir=. | |
13277 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13278 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13279 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13280 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13281 | break 2 | |
13282 | fi | |
13283 | done | |
13284 | done | |
13285 | ||
13286 | ;; | |
13287 | esac | |
13288 | fi | |
e8b05380 | 13289 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
d739199a | 13290 | |
e8b05380 PB |
13291 | if test -n "$gcc_cv_ld"; then |
13292 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13293 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
d739199a DJ |
13294 | else |
13295 | echo "$as_me:$LINENO: result: no" >&5 | |
13296 | echo "${ECHO_T}no" >&6 | |
13297 | fi | |
13298 | ||
13299 | fi | |
e8b05380 PB |
13300 | fi |
13301 | ||
13302 | ||
13303 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13304 | ||
13305 | ||
13306 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13307 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
13308 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then | |
13309 | # Single tree build which includes ld. We want to prefer it | |
13310 | # over whatever linker top-level may have detected, since | |
13311 | # we'll use what we're building after installation anyway. | |
13312 | echo "$as_me:$LINENO: result: newly built ld" >&5 | |
13313 | echo "${ECHO_T}newly built ld" >&6 | |
13314 | in_tree_ld=yes | |
13315 | in_tree_ld_is_elf=no | |
13316 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13317 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13318 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13319 | in_tree_ld_is_elf=yes | |
13320 | fi | |
13321 | 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 | |
13322 | do | |
13323 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13324 | if test x$gcc_cv_gld_version != x; then | |
13325 | break | |
13326 | fi | |
13327 | done | |
13328 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13329 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13330 | else | |
13331 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13332 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13333 | in_tree_ld=no | |
13334 | fi | |
13335 | ||
13336 | # Figure out what nm we will be using. | |
13337 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13338 | if test "${gcc_cv_nm+set}" = set; then | |
13339 | : | |
13340 | else | |
13341 | ||
13342 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13343 | && test -f ../binutils/Makefile \ |
13344 | && test x$build = x$host; then | |
e8b05380 PB |
13345 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13346 | elif test -x nm$build_exeext; then | |
13347 | gcc_cv_nm=./nm$build_exeext | |
13348 | elif test -x $NM_FOR_TARGET; then | |
13349 | gcc_cv_nm="$NM_FOR_TARGET" | |
13350 | else | |
13351 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13352 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13353 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13354 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13355 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13356 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13357 | else | |
e8b05380 | 13358 | case $gcc_cv_nm in |
d739199a | 13359 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13360 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13361 | ;; |
13362 | *) | |
13363 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13364 | for as_dir in $PATH | |
13365 | do | |
13366 | IFS=$as_save_IFS | |
13367 | test -z "$as_dir" && as_dir=. | |
13368 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13369 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13370 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13371 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13372 | break 2 | |
13373 | fi | |
13374 | done | |
13375 | done | |
13376 | ||
13377 | ;; | |
13378 | esac | |
13379 | fi | |
e8b05380 | 13380 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
d739199a | 13381 | |
e8b05380 PB |
13382 | if test -n "$gcc_cv_nm"; then |
13383 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13384 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
d739199a DJ |
13385 | else |
13386 | echo "$as_me:$LINENO: result: no" >&5 | |
13387 | echo "${ECHO_T}no" >&6 | |
13388 | fi | |
13389 | ||
13390 | fi | |
e8b05380 | 13391 | fi |
d739199a | 13392 | |
e8b05380 PB |
13393 | |
13394 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13395 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
13396 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then | |
13397 | # Single tree build which includes binutils. | |
13398 | echo "$as_me:$LINENO: result: newly built nm" >&5 | |
13399 | echo "${ECHO_T}newly built nm" >&6 | |
13400 | in_tree_nm=yes | |
13401 | else | |
13402 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13403 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13404 | in_tree_nm=no | |
13405 | fi | |
13406 | ||
13407 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
13408 | ||
13409 | ||
13410 | # Figure out what objdump we will be using. | |
13411 | if test "${gcc_cv_objdump+set}" = set; then | |
13412 | : | |
13413 | else | |
13414 | ||
13415 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13416 | && test -f ../binutils/Makefile \ |
13417 | && test x$build = x$host; then | |
e8b05380 PB |
13418 | # Single tree build which includes binutils. |
13419 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
13420 | elif test -x objdump$build_exeext; then | |
13421 | gcc_cv_objdump=./objdump$build_exeext | |
13422 | elif test -x $OBJDUMP_FOR_TARGET; then | |
13423 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
13424 | else | |
13425 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13426 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
9f18db39 PB |
13427 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13428 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13429 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
13430 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13431 | else | |
e8b05380 | 13432 | case $gcc_cv_objdump in |
9f18db39 | 13433 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13434 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
13435 | ;; |
13436 | *) | |
13437 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 13438 | for as_dir in $PATH |
9f18db39 PB |
13439 | do |
13440 | IFS=$as_save_IFS | |
13441 | test -z "$as_dir" && as_dir=. | |
13442 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13443 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13444 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
13445 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13446 | break 2 | |
13447 | fi | |
13448 | done | |
13449 | done | |
779243f7 | 13450 | |
9f18db39 PB |
13451 | ;; |
13452 | esac | |
13453 | fi | |
e8b05380 | 13454 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
9f18db39 | 13455 | |
e8b05380 PB |
13456 | if test -n "$gcc_cv_objdump"; then |
13457 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13458 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
9f18db39 PB |
13459 | else |
13460 | echo "$as_me:$LINENO: result: no" >&5 | |
13461 | echo "${ECHO_T}no" >&6 | |
13462 | fi | |
13463 | ||
e8b05380 PB |
13464 | fi |
13465 | fi | |
9f18db39 | 13466 | |
e8b05380 PB |
13467 | |
13468 | echo "$as_me:$LINENO: checking what objdump to use" >&5 | |
13469 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
13470 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then | |
13471 | # Single tree build which includes binutils. | |
13472 | echo "$as_me:$LINENO: result: newly built objdump" >&5 | |
13473 | echo "${ECHO_T}newly built objdump" >&6 | |
13474 | elif test x$gcc_cv_objdump = x; then | |
13475 | echo "$as_me:$LINENO: result: not found" >&5 | |
13476 | echo "${ECHO_T}not found" >&6 | |
13477 | else | |
13478 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13479 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
a2eafc76 | 13480 | fi |
3cae5780 | 13481 | |
981d4858 | 13482 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13483 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13484 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13485 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13486 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13487 | else |
13488 | gcc_cv_as_balign_and_p2align=no | |
13489 | if test $in_tree_gas = yes; then | |
13490 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13491 | then gcc_cv_as_balign_and_p2align=yes | |
13492 | fi | |
13493 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13494 | echo '.balign 4 |
8ada417f | 13495 | .p2align 2' > conftest.s |
ba479fd2 NN |
13496 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13497 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13498 | (eval $ac_try) 2>&5 | |
13499 | ac_status=$? | |
13500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13501 | (exit $ac_status); }; } | |
8ada417f ZW |
13502 | then |
13503 | gcc_cv_as_balign_and_p2align=yes | |
13504 | else | |
13505 | echo "configure: failed program was" >&5 | |
13506 | cat conftest.s >&5 | |
13507 | fi | |
13508 | rm -f conftest.o conftest.s | |
13509 | fi | |
13510 | fi | |
ba479fd2 NN |
13511 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13512 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13513 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13514 | |
13515 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13516 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13517 | _ACEOF |
981d4858 | 13518 | |
ad9c4d9f NN |
13519 | fi |
13520 | ||
ba479fd2 NN |
13521 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13522 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13523 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13524 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13525 | else |
13526 | gcc_cv_as_max_skip_p2align=no | |
13527 | if test $in_tree_gas = yes; then | |
13528 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13529 | then gcc_cv_as_max_skip_p2align=yes | |
13530 | fi | |
13531 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13532 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13533 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13534 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13535 | (eval $ac_try) 2>&5 | |
13536 | ac_status=$? | |
13537 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13538 | (exit $ac_status); }; } | |
8ada417f ZW |
13539 | then |
13540 | gcc_cv_as_max_skip_p2align=yes | |
13541 | else | |
13542 | echo "configure: failed program was" >&5 | |
13543 | cat conftest.s >&5 | |
13544 | fi | |
13545 | rm -f conftest.o conftest.s | |
13546 | fi | |
ad9c4d9f | 13547 | fi |
ba479fd2 NN |
13548 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13549 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13550 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13551 | |
13552 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13553 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13554 | _ACEOF |
9e423e6d | 13555 | |
9e423e6d | 13556 | fi |
ad9c4d9f | 13557 | |
ba479fd2 NN |
13558 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13559 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13560 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13561 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13562 | else |
13563 | gcc_cv_as_subsection_m1=no | |
13564 | if test $in_tree_gas = yes; then | |
13565 | if test $in_tree_gas_is_elf = yes \ | |
13566 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13567 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13568 | fi |
8ada417f | 13569 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13570 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13571 | .subsection -1 |
13572 | conftest_label2: .word 0 | |
8ada417f | 13573 | .previous' > conftest.s |
ba479fd2 NN |
13574 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13575 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13576 | (eval $ac_try) 2>&5 | |
13577 | ac_status=$? | |
13578 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13579 | (exit $ac_status); }; } | |
8ada417f ZW |
13580 | then |
13581 | if test x$gcc_cv_nm != x; then | |
13582 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13583 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13584 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13585 | then : | |
13586 | else gcc_cv_as_subsection_m1=yes | |
13587 | fi | |
13588 | rm -f conftest.nm1 conftest.nm2 | |
13589 | fi | |
13590 | else | |
13591 | echo "configure: failed program was" >&5 | |
13592 | cat conftest.s >&5 | |
13593 | fi | |
13594 | rm -f conftest.o conftest.s | |
13595 | fi | |
981d4858 | 13596 | fi |
ba479fd2 NN |
13597 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13598 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13599 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13600 | |
13601 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13602 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13603 | _ACEOF |
981d4858 | 13604 | |
d1accaa3 | 13605 | fi |
ad9c4d9f | 13606 | |
ba479fd2 NN |
13607 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13608 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13609 | if test "${gcc_cv_as_weak+set}" = set; then | |
13610 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13611 | else |
13612 | gcc_cv_as_weak=no | |
13613 | if test $in_tree_gas = yes; then | |
13614 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13615 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13616 | fi |
8ada417f | 13617 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13618 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13619 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13620 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13621 | (eval $ac_try) 2>&5 | |
13622 | ac_status=$? | |
13623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13624 | (exit $ac_status); }; } | |
8ada417f ZW |
13625 | then |
13626 | gcc_cv_as_weak=yes | |
13627 | else | |
13628 | echo "configure: failed program was" >&5 | |
13629 | cat conftest.s >&5 | |
13630 | fi | |
13631 | rm -f conftest.o conftest.s | |
13632 | fi | |
981d4858 | 13633 | fi |
ba479fd2 NN |
13634 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13635 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13636 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13637 | |
13638 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13639 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13640 | _ACEOF |
981d4858 | 13641 | |
12822146 | 13642 | fi |
ad9c4d9f | 13643 | |
a0203ca7 AO |
13644 | echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
13645 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 | |
13646 | if test "${gcc_cv_as_weakref+set}" = set; then | |
13647 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13648 | else | |
13649 | gcc_cv_as_weakref=no | |
13650 | if test $in_tree_gas = yes; then | |
13651 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
13652 | then gcc_cv_as_weakref=yes | |
13653 | fi | |
13654 | elif test x$gcc_cv_as != x; then | |
13655 | echo ' .weakref foobar, barfnot' > conftest.s | |
13656 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13658 | (eval $ac_try) 2>&5 | |
13659 | ac_status=$? | |
13660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13661 | (exit $ac_status); }; } | |
13662 | then | |
13663 | gcc_cv_as_weakref=yes | |
13664 | else | |
13665 | echo "configure: failed program was" >&5 | |
13666 | cat conftest.s >&5 | |
13667 | fi | |
13668 | rm -f conftest.o conftest.s | |
13669 | fi | |
13670 | fi | |
13671 | echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 | |
13672 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6 | |
13673 | if test $gcc_cv_as_weakref = yes; then | |
13674 | ||
13675 | cat >>confdefs.h <<\_ACEOF | |
13676 | #define HAVE_GAS_WEAKREF 1 | |
13677 | _ACEOF | |
13678 | ||
13679 | fi | |
13680 | ||
e41f3691 JDA |
13681 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13682 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13683 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13684 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13685 | else | |
13686 | gcc_cv_as_nsubspa_comdat=no | |
13687 | if test $in_tree_gas = yes; then | |
13688 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13689 | then gcc_cv_as_nsubspa_comdat=yes | |
13690 | fi | |
13691 | elif test x$gcc_cv_as != x; then | |
13692 | echo ' .SPACE $TEXT$ | |
13693 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13694 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13695 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13696 | (eval $ac_try) 2>&5 | |
13697 | ac_status=$? | |
13698 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13699 | (exit $ac_status); }; } | |
13700 | then | |
13701 | gcc_cv_as_nsubspa_comdat=yes | |
13702 | else | |
13703 | echo "configure: failed program was" >&5 | |
13704 | cat conftest.s >&5 | |
13705 | fi | |
13706 | rm -f conftest.o conftest.s | |
13707 | fi | |
13708 | fi | |
13709 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13710 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13711 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13712 | ||
13713 | cat >>confdefs.h <<\_ACEOF | |
13714 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13715 | _ACEOF | |
13716 | ||
13717 | fi | |
13718 | ||
8ada417f ZW |
13719 | # .hidden needs to be supported in both the assembler and the linker, |
13720 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13721 | # This is irritatingly difficult to feature test for; we have to check the | |
13722 | # date string after the version number. If we've got an in-tree | |
13723 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13724 | # to be safe. | |
13725 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13726 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13727 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13728 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13730 | else |
13731 | gcc_cv_as_hidden=no | |
13732 | if test $in_tree_gas = yes; then | |
13733 | if test $in_tree_gas_is_elf = yes \ | |
13734 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13735 | then gcc_cv_as_hidden=yes | |
13736 | fi | |
13737 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13738 | echo ' .hidden foobar |
8ada417f | 13739 | foobar:' > conftest.s |
ba479fd2 NN |
13740 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13741 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13742 | (eval $ac_try) 2>&5 | |
13743 | ac_status=$? | |
13744 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13745 | (exit $ac_status); }; } | |
8ada417f ZW |
13746 | then |
13747 | gcc_cv_as_hidden=yes | |
13748 | else | |
13749 | echo "configure: failed program was" >&5 | |
13750 | cat conftest.s >&5 | |
13751 | fi | |
13752 | rm -f conftest.o conftest.s | |
13753 | fi | |
13754 | fi | |
ba479fd2 NN |
13755 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13756 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13757 | |
ad9c4d9f | 13758 | |
ba479fd2 NN |
13759 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13760 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13761 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13762 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13763 | else |
13764 | if test $in_tree_ld = yes ; then | |
13765 | gcc_cv_ld_hidden=no | |
13766 | 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 \ | |
13767 | && test $in_tree_ld_is_elf = yes; then | |
13768 | gcc_cv_ld_hidden=yes | |
13769 | fi | |
13770 | else | |
13771 | gcc_cv_ld_hidden=yes | |
bace148a | 13772 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13773 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13774 | ld_vers=`echo $ld_ver | sed -n \ | |
13775 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13776 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13777 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13778 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13779 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13780 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13781 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'` | |
8ada417f | 13782 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` |
11176d2a JB |
13783 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13784 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13785 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13786 | if test 0"$ld_date" -lt 20020404; then |
13787 | if test -n "$ld_date"; then | |
13788 | # If there was date string, but was earlier than 2002-04-04, fail | |
13789 | gcc_cv_ld_hidden=no | |
13790 | elif test -z "$ld_vers"; then | |
13791 | # If there was no date string nor ld version number, something is wrong | |
13792 | gcc_cv_ld_hidden=no | |
13793 | else | |
8ada417f ZW |
13794 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13795 | if test "$ld_vers_major" -lt 2; then | |
13796 | gcc_cv_ld_hidden=no | |
13797 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13798 | gcc_cv_ld_hidden="no" | |
13799 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13800 | gcc_cv_ld_hidden=no | |
c72931a6 | 13801 | fi |
8ada417f | 13802 | fi |
789b7de5 | 13803 | fi |
8ada417f | 13804 | else |
28690784 | 13805 | case "${target}" in |
b0fd7d27 | 13806 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13807 | gcc_cv_ld_hidden=yes |
13808 | ;; | |
13809 | *) | |
13810 | gcc_cv_ld_hidden=no | |
13811 | ;; | |
13812 | esac | |
8ada417f ZW |
13813 | fi |
13814 | fi | |
6d07784a | 13815 | fi |
ba479fd2 NN |
13816 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13817 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13818 | libgcc_visibility=no |
ad9c4d9f | 13819 | |
232b67d9 | 13820 | |
8e3940b2 | 13821 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13822 | libgcc_visibility=yes |
ba479fd2 NN |
13823 | |
13824 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13825 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13826 | _ACEOF |
ad9c4d9f NN |
13827 | |
13828 | fi | |
13829 | ||
8ada417f | 13830 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13831 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13832 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13833 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13834 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13835 | else |
13836 | gcc_cv_as_leb128=no | |
13837 | if test $in_tree_gas = yes; then | |
13838 | if test $in_tree_gas_is_elf = yes \ | |
13839 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13840 | then gcc_cv_as_leb128=yes | |
13841 | fi | |
13842 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13843 | echo ' .data |
b7460f24 RH |
13844 | .uleb128 L2 - L1 |
13845 | L1: | |
13846 | .uleb128 1280 | |
13847 | .sleb128 -1010 | |
8ada417f | 13848 | L2:' > conftest.s |
ba479fd2 NN |
13849 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13850 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13851 | (eval $ac_try) 2>&5 | |
13852 | ac_status=$? | |
13853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13854 | (exit $ac_status); }; } | |
8ada417f ZW |
13855 | then |
13856 | # GAS versions before 2.11 do not support uleb128, | |
13857 | # despite appearing to. | |
13858 | # ??? There exists an elf-specific test that will crash | |
13859 | # the assembler. Perhaps it's better to figure out whether | |
13860 | # arbitrary sections are supported and try the test. | |
bace148a | 13861 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13862 | if echo "$as_ver" | grep GNU > /dev/null; then |
13863 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13864 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13865 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13866 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13867 | then : | |
13868 | else gcc_cv_as_leb128=yes | |
13869 | fi | |
13870 | fi | |
13871 | else | |
13872 | echo "configure: failed program was" >&5 | |
13873 | cat conftest.s >&5 | |
13874 | fi | |
13875 | rm -f conftest.o conftest.s | |
13876 | fi | |
b7460f24 | 13877 | fi |
ba479fd2 NN |
13878 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13879 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13880 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13881 | |
13882 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13883 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13884 | _ACEOF |
b7460f24 RH |
13885 | |
13886 | fi | |
ad9c4d9f | 13887 | |
8ada417f ZW |
13888 | # GAS versions up to and including 2.11.0 may mis-optimize |
13889 | # .eh_frame data. | |
ba479fd2 NN |
13890 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13891 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13892 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13893 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13894 | else |
13895 | gcc_cv_as_eh_frame=no | |
13896 | if test $in_tree_gas = yes; then | |
13897 | if test $in_tree_gas_is_elf = yes \ | |
13898 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13899 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13900 | fi |
8ada417f | 13901 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13902 | echo ' .text |
c64688ae RH |
13903 | .LFB1: |
13904 | .4byte 0 | |
13905 | .L1: | |
13906 | .4byte 0 | |
13907 | .LFE1: | |
13908 | .section .eh_frame,"aw",@progbits | |
13909 | __FRAME_BEGIN__: | |
13910 | .4byte .LECIE1-.LSCIE1 | |
13911 | .LSCIE1: | |
13912 | .4byte 0x0 | |
13913 | .byte 0x1 | |
13914 | .ascii "z\0" | |
13915 | .byte 0x1 | |
13916 | .byte 0x78 | |
13917 | .byte 0x1a | |
13918 | .byte 0x0 | |
13919 | .byte 0x4 | |
13920 | .4byte 1 | |
13921 | .p2align 1 | |
13922 | .LECIE1: | |
13923 | .LSFDE1: | |
13924 | .4byte .LEFDE1-.LASFDE1 | |
13925 | .LASFDE1: | |
13926 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13927 | .4byte .LFB1 | |
13928 | .4byte .LFE1-.LFB1 | |
13929 | .byte 0x4 | |
13930 | .4byte .LFE1-.LFB1 | |
13931 | .byte 0x4 | |
13932 | .4byte .L1-.LFB1 | |
8ada417f | 13933 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13934 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13935 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13936 | (eval $ac_try) 2>&5 | |
13937 | ac_status=$? | |
13938 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13939 | (exit $ac_status); }; } | |
8ada417f ZW |
13940 | then |
13941 | cat > conftest.lit <<EOF | |
c64688ae RH |
13942 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13943 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13944 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13945 | EOF |
ba479fd2 | 13946 | cat > conftest.big <<EOF |
01efb963 AS |
13947 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13948 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13949 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13950 | EOF |
8ada417f ZW |
13951 | # If the assembler didn't choke, and we can objdump, |
13952 | # and we got the correct data, then succeed. | |
13953 | if test x$gcc_cv_objdump != x \ | |
13954 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13955 | | tail -3 > conftest.got \ | |
13956 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13957 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13958 | then | |
13959 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13960 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13962 | (eval $ac_try) 2>&5 | |
13963 | ac_status=$? | |
13964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13965 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13966 | gcc_cv_as_eh_frame=buggy |
13967 | else | |
13968 | # Uh oh, what do we do now? | |
13969 | gcc_cv_as_eh_frame=no | |
13970 | fi | |
13971 | else | |
13972 | echo "configure: failed program was" >&5 | |
13973 | cat conftest.s >&5 | |
13974 | fi | |
13975 | rm -f conftest.o conftest.s | |
13976 | fi | |
c64688ae | 13977 | fi |
ba479fd2 NN |
13978 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13979 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13980 | |
6e3f3080 | 13981 | |
63cf211a | 13982 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13983 | |
13984 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13985 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13986 | _ACEOF |
ad9c4d9f NN |
13987 | |
13988 | fi | |
13989 | ||
ba479fd2 NN |
13990 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
13991 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
13992 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
13993 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13994 | else |
13995 | gcc_cv_as_shf_merge=no | |
13996 | if test $in_tree_gas = yes; then | |
13997 | if test $in_tree_gas_is_elf = yes \ | |
13998 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13999 | then gcc_cv_as_shf_merge=yes | |
14000 | fi | |
14001 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14002 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14003 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14004 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14005 | (eval $ac_try) 2>&5 | |
14006 | ac_status=$? | |
14007 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14008 | (exit $ac_status); }; } | |
8ada417f ZW |
14009 | then |
14010 | gcc_cv_as_shf_merge=yes | |
14011 | else | |
14012 | echo "configure: failed program was" >&5 | |
14013 | cat conftest.s >&5 | |
14014 | fi | |
14015 | rm -f conftest.o conftest.s | |
14016 | fi | |
201556f0 | 14017 | fi |
ba479fd2 NN |
14018 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14019 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 14020 | |
c18a5b6c MM |
14021 | if test $gcc_cv_as_shf_merge = no; then |
14022 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
14023 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14024 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14025 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14026 | else | |
14027 | gcc_cv_as_shf_merge=no | |
14028 | if test $in_tree_gas = yes; then | |
14029 | if test $in_tree_gas_is_elf = yes \ | |
14030 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14031 | then gcc_cv_as_shf_merge=yes | |
14032 | fi | |
14033 | elif test x$gcc_cv_as != x; then | |
14034 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14035 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14036 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14037 | (eval $ac_try) 2>&5 | |
14038 | ac_status=$? | |
14039 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14040 | (exit $ac_status); }; } | |
14041 | then | |
14042 | gcc_cv_as_shf_merge=yes | |
14043 | else | |
14044 | echo "configure: failed program was" >&5 | |
14045 | cat conftest.s >&5 | |
14046 | fi | |
14047 | rm -f conftest.o conftest.s | |
14048 | fi | |
14049 | fi | |
14050 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
14051 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
14052 | ||
14053 | fi | |
8ad9fb33 | 14054 | |
ba479fd2 | 14055 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14056 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14057 | _ACEOF |
201556f0 | 14058 | |
201556f0 | 14059 | |
c18a5b6c MM |
14060 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14061 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14062 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
14063 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14064 | else | |
14065 | gcc_cv_as_comdat_group=no | |
14066 | if test $in_tree_gas = yes; then | |
14067 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14068 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14069 | then gcc_cv_as_comdat_group=yes |
14070 | fi | |
14071 | elif test x$gcc_cv_as != x; then | |
14072 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14073 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14074 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14075 | (eval $ac_try) 2>&5 | |
14076 | ac_status=$? | |
14077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14078 | (exit $ac_status); }; } | |
14079 | then | |
14080 | gcc_cv_as_comdat_group=yes | |
14081 | else | |
14082 | echo "configure: failed program was" >&5 | |
14083 | cat conftest.s >&5 | |
14084 | fi | |
14085 | rm -f conftest.o conftest.s | |
14086 | fi | |
14087 | fi | |
14088 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
14089 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
14090 | ||
14091 | if test $gcc_cv_as_comdat_group = yes; then | |
14092 | gcc_cv_as_comdat_group_percent=no | |
14093 | else | |
14094 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
14095 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14096 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
14097 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14098 | else | |
14099 | gcc_cv_as_comdat_group_percent=no | |
14100 | if test $in_tree_gas = yes; then | |
14101 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14102 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14103 | then gcc_cv_as_comdat_group_percent=yes |
14104 | fi | |
14105 | elif test x$gcc_cv_as != x; then | |
14106 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14107 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14108 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14109 | (eval $ac_try) 2>&5 | |
14110 | ac_status=$? | |
14111 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14112 | (exit $ac_status); }; } | |
14113 | then | |
14114 | gcc_cv_as_comdat_group_percent=yes | |
14115 | else | |
14116 | echo "configure: failed program was" >&5 | |
14117 | cat conftest.s >&5 | |
14118 | fi | |
14119 | rm -f conftest.o conftest.s | |
14120 | fi | |
14121 | fi | |
14122 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
14123 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
14124 | ||
14125 | fi | |
11176d2a JB |
14126 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14127 | comdat_group=yes | |
14128 | if test 0"$ld_date" -lt 20050308; then | |
14129 | if test -n "$ld_date"; then | |
14130 | # If there was date string, but was earlier than 2005-03-08, fail | |
14131 | comdat_group=no | |
14132 | elif test "$ld_vers_major" -lt 2; then | |
14133 | comdat_group=no | |
14134 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14135 | comdat_group=no | |
14136 | fi | |
14137 | fi | |
1cf0118d RO |
14138 | else |
14139 | # assume linkers other than GNU ld don't support COMDAT group | |
14140 | comdat_group=no | |
14141 | fi | |
14142 | if test $comdat_group = no; then | |
14143 | gcc_cv_as_comdat_group=no | |
14144 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14145 | fi |
c18a5b6c MM |
14146 | |
14147 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14148 | #define HAVE_COMDAT_GROUP `if test $gcc_cv_as_comdat_group = yes || test $gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi` |
c18a5b6c MM |
14149 | _ACEOF |
14150 | ||
14151 | ||
8ada417f | 14152 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14153 | conftest_s= |
14154 | tls_first_major= | |
14155 | tls_first_minor= | |
9739c90c | 14156 | tls_as_opt= |
f996902d | 14157 | case "$target" in |
6f9b006d RH |
14158 | alpha*-*-*) |
14159 | conftest_s=' | |
14160 | .section ".tdata","awT",@progbits | |
14161 | foo: .long 25 | |
14162 | .text | |
14163 | ldq $27,__tls_get_addr($29) !literal!1 | |
14164 | lda $16,foo($29) !tlsgd!1 | |
14165 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14166 | ldq $27,__tls_get_addr($29) !literal!2 | |
14167 | lda $16,foo($29) !tlsldm!2 | |
14168 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14169 | ldq $1,foo($29) !gotdtprel | |
14170 | ldah $2,foo($29) !dtprelhi | |
14171 | lda $3,foo($2) !dtprello | |
14172 | lda $4,foo($29) !dtprel | |
14173 | ldq $1,foo($29) !gottprel | |
14174 | ldah $2,foo($29) !tprelhi | |
14175 | lda $3,foo($2) !tprello | |
14176 | lda $4,foo($29) !tprel' | |
14177 | tls_first_major=2 | |
14178 | tls_first_minor=13 | |
2f3321ca | 14179 | tls_as_opt=--fatal-warnings |
6f9b006d | 14180 | ;; |
e4dd71de AH |
14181 | frv*-*-*) |
14182 | conftest_s=' | |
14183 | .section ".tdata","awT",@progbits | |
14184 | x: .long 25 | |
14185 | .text | |
14186 | call #gettlsoff(x)' | |
14187 | tls_first_major=2 | |
14188 | tls_first_minor=14 | |
14189 | ;; | |
51076f96 RC |
14190 | hppa*-*-linux*) |
14191 | conftest_s=' | |
14192 | t1: .reg %r20 | |
14193 | t2: .reg %r21 | |
14194 | gp: .reg %r19 | |
14195 | .section ".tdata","awT",@progbits | |
14196 | foo: .long 25 | |
14197 | .text | |
14198 | .align 4 | |
14199 | addil LT%foo-$tls_gdidx$,gp | |
14200 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14201 | b __tls_get_addr | |
14202 | nop | |
14203 | addil LT%foo-$tls_ldidx$,gp | |
14204 | b __tls_get_addr | |
14205 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14206 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14207 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14208 | mfctl %cr27,%t1 | |
14209 | addil LT%foo-$tls_ieoff$,gp | |
14210 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14211 | add %t1,%t2,%t3 | |
14212 | mfctl %cr27,%t1 | |
14213 | addil LR%foo-$tls_leoff$,%t1 | |
14214 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14215 | tls_first_major=2 | |
14216 | tls_first_minor=15 | |
14217 | tls_as_opt=--fatal-warnings | |
14218 | ;; | |
d3585b76 DJ |
14219 | arm*-*-*) |
14220 | conftest_s=' | |
14221 | .section ".tdata","awT",%progbits | |
14222 | foo: .long 25 | |
14223 | .text | |
14224 | .word foo(gottpoff) | |
14225 | .word foo(tpoff) | |
14226 | .word foo(tlsgd) | |
14227 | .word foo(tlsldm) | |
14228 | .word foo(tlsldo)' | |
14229 | tls_first_major=2 | |
14230 | tls_first_minor=17 | |
14231 | ;; | |
f996902d RH |
14232 | i[34567]86-*-*) |
14233 | conftest_s=' | |
14234 | .section ".tdata","awT",@progbits | |
14235 | foo: .long 25 | |
14236 | .text | |
14237 | movl %gs:0, %eax | |
14238 | leal foo@TLSGD(,%ebx,1), %eax | |
14239 | leal foo@TLSLDM(%ebx), %eax | |
14240 | leal foo@DTPOFF(%eax), %edx | |
14241 | movl foo@GOTTPOFF(%ebx), %eax | |
14242 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14243 | addl foo@GOTNTPOFF(%ebx), %eax |
14244 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14245 | movl $foo@TPOFF, %eax |
14246 | subl $foo@TPOFF, %eax | |
14247 | leal foo@NTPOFF(%ecx), %eax' | |
14248 | tls_first_major=2 | |
75d38379 | 14249 | tls_first_minor=14 |
2f3321ca | 14250 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14251 | ;; |
14252 | x86_64-*-*) | |
14253 | conftest_s=' | |
14254 | .section ".tdata","awT",@progbits | |
14255 | foo: .long 25 | |
14256 | .text | |
14257 | movq %fs:0, %rax | |
14258 | leaq foo@TLSGD(%rip), %rdi | |
14259 | leaq foo@TLSLD(%rip), %rdi | |
14260 | leaq foo@DTPOFF(%rax), %rdx | |
14261 | movq foo@GOTTPOFF(%rip), %rax | |
14262 | movq $foo@TPOFF, %rax' | |
14263 | tls_first_major=2 | |
14264 | tls_first_minor=14 | |
2f3321ca | 14265 | tls_as_opt=--fatal-warnings |
f996902d | 14266 | ;; |
7b6e506e RH |
14267 | ia64-*-*) |
14268 | conftest_s=' | |
14269 | .section ".tdata","awT",@progbits | |
14270 | foo: data8 25 | |
14271 | .text | |
14272 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14273 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14274 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14275 | addl r19 = @dtprel(foo#), gp | |
14276 | adds r21 = @dtprel(foo#), r13 | |
14277 | movl r23 = @dtprel(foo#) | |
14278 | addl r20 = @tprel(foo#), gp | |
14279 | adds r22 = @tprel(foo#), r13 | |
14280 | movl r24 = @tprel(foo#)' | |
14281 | tls_first_major=2 | |
14282 | tls_first_minor=13 | |
2f3321ca | 14283 | tls_as_opt=--fatal-warnings |
7b6e506e | 14284 | ;; |
69229b81 DJ |
14285 | mips*-*-*) |
14286 | conftest_s=' | |
14287 | .section .tdata,"awT",@progbits | |
14288 | x: | |
14289 | .word 2 | |
14290 | .text | |
14291 | addiu $4, $28, %tlsgd(x) | |
14292 | addiu $4, $28, %tlsldm(x) | |
14293 | lui $4, %dtprel_hi(x) | |
14294 | addiu $4, $4, %dtprel_lo(x) | |
14295 | lw $4, %gottprel(x)($28) | |
14296 | lui $4, %tprel_hi(x) | |
14297 | addiu $4, $4, %tprel_lo(x)' | |
14298 | tls_first_major=2 | |
14299 | tls_first_minor=16 | |
14300 | tls_as_opt='-32 --fatal-warnings' | |
14301 | ;; | |
c4501e62 JJ |
14302 | powerpc-*-*) |
14303 | conftest_s=' | |
14304 | .section ".tdata","awT",@progbits | |
14305 | .align 2 | |
14306 | ld0: .space 4 | |
14307 | ld1: .space 4 | |
14308 | x1: .space 4 | |
14309 | x2: .space 4 | |
14310 | x3: .space 4 | |
14311 | .text | |
14312 | addi 3,31,ld0@got@tlsgd | |
14313 | bl __tls_get_addr | |
14314 | addi 3,31,x1@got@tlsld | |
14315 | bl __tls_get_addr | |
14316 | addi 9,3,x1@dtprel | |
14317 | addis 9,3,x2@dtprel@ha | |
14318 | addi 9,9,x2@dtprel@l | |
14319 | lwz 9,x3@got@tprel(31) | |
14320 | add 9,9,x@tls | |
14321 | addi 9,2,x1@tprel | |
14322 | addis 9,2,x2@tprel@ha | |
14323 | addi 9,9,x2@tprel@l' | |
14324 | tls_first_major=2 | |
14325 | tls_first_minor=14 | |
2f3321ca | 14326 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14327 | ;; |
14328 | powerpc64-*-*) | |
14329 | conftest_s=' | |
14330 | .section ".tdata","awT",@progbits | |
14331 | .align 3 | |
14332 | ld0: .space 8 | |
14333 | ld1: .space 8 | |
14334 | x1: .space 8 | |
14335 | x2: .space 8 | |
14336 | x3: .space 8 | |
14337 | .text | |
14338 | addi 3,2,ld0@got@tlsgd | |
14339 | bl .__tls_get_addr | |
14340 | nop | |
14341 | addi 3,2,ld1@toc | |
14342 | bl .__tls_get_addr | |
14343 | nop | |
14344 | addi 3,2,x1@got@tlsld | |
14345 | bl .__tls_get_addr | |
14346 | nop | |
14347 | addi 9,3,x1@dtprel | |
14348 | bl .__tls_get_addr | |
14349 | nop | |
14350 | addis 9,3,x2@dtprel@ha | |
14351 | addi 9,9,x2@dtprel@l | |
14352 | bl .__tls_get_addr | |
14353 | nop | |
14354 | ld 9,x3@got@dtprel(2) | |
14355 | add 9,9,3 | |
14356 | bl .__tls_get_addr | |
14357 | nop' | |
14358 | tls_first_major=2 | |
14359 | tls_first_minor=14 | |
2f3321ca | 14360 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14361 | ;; |
fd3cd001 UW |
14362 | s390-*-*) |
14363 | conftest_s=' | |
14364 | .section ".tdata","awT",@progbits | |
14365 | foo: .long 25 | |
14366 | .text | |
14367 | .long foo@TLSGD | |
14368 | .long foo@TLSLDM | |
14369 | .long foo@DTPOFF | |
14370 | .long foo@NTPOFF | |
14371 | .long foo@GOTNTPOFF | |
14372 | .long foo@INDNTPOFF | |
14373 | l %r1,foo@GOTNTPOFF(%r12) | |
14374 | l %r1,0(%r1):tls_load:foo | |
14375 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14376 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14377 | tls_first_major=2 | |
14378 | tls_first_minor=14 | |
2f3321ca | 14379 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14380 | ;; |
14381 | s390x-*-*) | |
14382 | conftest_s=' | |
14383 | .section ".tdata","awT",@progbits | |
14384 | foo: .long 25 | |
14385 | .text | |
14386 | .quad foo@TLSGD | |
14387 | .quad foo@TLSLDM | |
14388 | .quad foo@DTPOFF | |
14389 | .quad foo@NTPOFF | |
14390 | .quad foo@GOTNTPOFF | |
14391 | lg %r1,foo@GOTNTPOFF(%r12) | |
14392 | larl %r1,foo@INDNTPOFF | |
14393 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14394 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14395 | tls_first_major=2 | |
14396 | tls_first_minor=14 | |
2f3321ca | 14397 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14398 | ;; |
9ff13962 KK |
14399 | sh-*-* | sh[34]-*-*) |
14400 | conftest_s=' | |
14401 | .section ".tdata","awT",@progbits | |
14402 | foo: .long 25 | |
14403 | .text | |
14404 | .long foo@TLSGD | |
14405 | .long foo@TLSLDM | |
14406 | .long foo@DTPOFF | |
14407 | .long foo@GOTTPOFF | |
14408 | .long foo@TPOFF' | |
14409 | tls_first_major=2 | |
14410 | tls_first_minor=13 | |
2f3321ca | 14411 | tls_as_opt=--fatal-warnings |
9ff13962 | 14412 | ;; |
5751a10b | 14413 | sparc*-*-*) |
2f3321ca | 14414 | case "$target" in |
7935dc1b EB |
14415 | sparc*-sun-solaris2.[56789]*) |
14416 | # TLS was introduced in the Solaris 9 4/04 release but | |
14417 | # we do not enable it by default on Solaris 9 either. | |
14418 | if test "x$enable_tls" = xyes ; then | |
14419 | on_solaris=yes | |
14420 | else | |
14421 | enable_tls=no; | |
14422 | fi | |
14423 | ;; | |
2f3321ca EB |
14424 | sparc*-sun-solaris2.*) |
14425 | on_solaris=yes | |
14426 | ;; | |
14427 | *) | |
14428 | on_solaris=no | |
14429 | ;; | |
14430 | esac | |
14431 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14432 | conftest_s=' | |
14433 | .section ".tdata",#alloc,#write,#tls | |
14434 | foo: .long 25 | |
14435 | .text | |
14436 | sethi %tgd_hi22(foo), %o0 | |
14437 | add %o0, %tgd_lo10(foo), %o1 | |
14438 | add %l7, %o1, %o0, %tgd_add(foo) | |
14439 | call __tls_get_addr, %tgd_call(foo) | |
14440 | sethi %tldm_hi22(foo), %l1 | |
14441 | add %l1, %tldm_lo10(foo), %l2 | |
14442 | add %l7, %l2, %o0, %tldm_add(foo) | |
14443 | call __tls_get_addr, %tldm_call(foo) | |
14444 | sethi %tldo_hix22(foo), %l3 | |
14445 | xor %l3, %tldo_lox10(foo), %l4 | |
14446 | add %o0, %l4, %l5, %tldo_add(foo) | |
14447 | sethi %tie_hi22(foo), %o3 | |
14448 | add %o3, %tie_lo10(foo), %o3 | |
14449 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14450 | add %g7, %o2, %o4, %tie_add(foo) | |
14451 | sethi %tle_hix22(foo), %l1 | |
14452 | xor %l1, %tle_lox10(foo), %o5 | |
14453 | ld [%g7 + %o5], %o1' | |
14454 | tls_first_major=0 | |
14455 | tls_first_minor=0 | |
14456 | else | |
14457 | conftest_s=' | |
5751a10b JJ |
14458 | .section ".tdata","awT",@progbits |
14459 | foo: .long 25 | |
14460 | .text | |
14461 | sethi %tgd_hi22(foo), %o0 | |
14462 | add %o0, %tgd_lo10(foo), %o1 | |
14463 | add %l7, %o1, %o0, %tgd_add(foo) | |
14464 | call __tls_get_addr, %tgd_call(foo) | |
14465 | sethi %tldm_hi22(foo), %l1 | |
14466 | add %l1, %tldm_lo10(foo), %l2 | |
14467 | add %l7, %l2, %o0, %tldm_add(foo) | |
14468 | call __tls_get_addr, %tldm_call(foo) | |
14469 | sethi %tldo_hix22(foo), %l3 | |
14470 | xor %l3, %tldo_lox10(foo), %l4 | |
14471 | add %o0, %l4, %l5, %tldo_add(foo) | |
14472 | sethi %tie_hi22(foo), %o3 | |
14473 | add %o3, %tie_lo10(foo), %o3 | |
14474 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14475 | add %g7, %o2, %o4, %tie_add(foo) | |
14476 | sethi %tle_hix22(foo), %l1 | |
14477 | xor %l1, %tle_lox10(foo), %o5 | |
14478 | ld [%g7 + %o5], %o1' | |
14479 | tls_first_major=2 | |
14480 | tls_first_minor=14 | |
2f3321ca EB |
14481 | tls_as_opt="-32 --fatal-warnings" |
14482 | fi | |
5751a10b | 14483 | ;; |
f996902d | 14484 | esac |
8dea1cca DD |
14485 | set_have_as_tls=no |
14486 | if test "x$enable_tls" = xno ; then | |
14487 | : # TLS explicitly disabled. | |
14488 | elif test "x$enable_tls" = xyes ; then | |
14489 | set_have_as_tls=yes # TLS explicitly enabled. | |
14490 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
14491 | : # If we don't have a check, assume no support. |
14492 | else | |
ba479fd2 NN |
14493 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14494 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14495 | if test "${gcc_cv_as_tls+set}" = set; then | |
14496 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14497 | else |
14498 | gcc_cv_as_tls=no | |
14499 | if test $in_tree_gas = yes; then | |
14500 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14501 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14502 | fi |
8ada417f | 14503 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14504 | echo "$conftest_s" > conftest.s |
2f3321ca | 14505 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14507 | (eval $ac_try) 2>&5 | |
14508 | ac_status=$? | |
14509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14510 | (exit $ac_status); }; } | |
8ada417f ZW |
14511 | then |
14512 | gcc_cv_as_tls=yes | |
14513 | else | |
14514 | echo "configure: failed program was" >&5 | |
14515 | cat conftest.s >&5 | |
14516 | fi | |
14517 | rm -f conftest.o conftest.s | |
f996902d | 14518 | fi |
f996902d | 14519 | fi |
ba479fd2 NN |
14520 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14521 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14522 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
14523 | set_have_as_tls=yes |
14524 | fi | |
14525 | fi | |
14526 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
14527 | |
14528 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14529 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14530 | _ACEOF |
f996902d | 14531 | |
8ada417f ZW |
14532 | fi |
14533 | ||
14534 | # Target-specific assembler checks. | |
f996902d | 14535 | |
7e9d8517 L |
14536 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14537 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14538 | gcc_cv_ld_static_dynamic=no | |
14539 | if test $in_tree_ld = yes ; then | |
14540 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14541 | gcc_cv_ld_static_dynamic=yes | |
14542 | fi | |
14543 | elif test x$gcc_cv_ld != x; then | |
14544 | # Check if linker supports -Bstatic/-Bdynamic option | |
14545 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14546 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14547 | gcc_cv_ld_static_dynamic=yes | |
14548 | fi | |
14549 | fi | |
14550 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14551 | ||
14552 | cat >>confdefs.h <<\_ACEOF | |
14553 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14554 | _ACEOF | |
14555 | ||
14556 | fi | |
14557 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14558 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14559 | ||
d594623a L |
14560 | if test x"$demangler_in_ld" = xyes; then |
14561 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14562 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14563 | gcc_cv_ld_demangle=no | |
14564 | if test $in_tree_ld = yes; then | |
14565 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 14 -o "$gcc_cv_gld_major_version" -gt 2; then \ | |
14566 | gcc_cv_ld_demangle=yes | |
14567 | fi | |
14568 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14569 | # Check if the GNU linker supports --demangle option | |
14570 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14571 | gcc_cv_ld_demangle=yes | |
14572 | fi | |
14573 | fi | |
14574 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14575 | ||
14576 | cat >>confdefs.h <<\_ACEOF | |
14577 | #define HAVE_LD_DEMANGLE 1 | |
14578 | _ACEOF | |
14579 | ||
14580 | fi | |
14581 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14582 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14583 | fi | |
14584 | ||
3a37b08e RH |
14585 | case "$target" in |
14586 | # All TARGET_ABI_OSF targets. | |
14587 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14588 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14589 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14590 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14591 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14592 | else |
8ada417f ZW |
14593 | gcc_cv_as_alpha_explicit_relocs=no |
14594 | if test $in_tree_gas = yes; then | |
14595 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14596 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14597 | fi |
8ada417f | 14598 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14599 | echo ' .set nomacro |
3a37b08e RH |
14600 | .text |
14601 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14602 | ldq $2, a($29) !literal!1 | |
14603 | ldq $4, b($29) !literal!2 | |
14604 | ldq_u $3, 0($2) !lituse_base!1 | |
14605 | ldq $27, f($29) !literal!5 | |
14606 | jsr $26, ($27), f !lituse_jsr!5 | |
14607 | ldah $29, 0($26) !gpdisp!3 | |
14608 | lda $0, c($29) !gprel | |
14609 | ldah $1, d($29) !gprelhigh | |
14610 | lda $1, d($1) !gprellow | |
8ada417f | 14611 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14612 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14614 | (eval $ac_try) 2>&5 | |
14615 | ac_status=$? | |
14616 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14617 | (exit $ac_status); }; } | |
8ada417f ZW |
14618 | then |
14619 | gcc_cv_as_alpha_explicit_relocs=yes | |
14620 | else | |
14621 | echo "configure: failed program was" >&5 | |
14622 | cat conftest.s >&5 | |
14623 | fi | |
14624 | rm -f conftest.o conftest.s | |
14625 | fi | |
cafe096b | 14626 | fi |
ba479fd2 NN |
14627 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14628 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14629 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14630 | |
14631 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14632 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14633 | _ACEOF |
3a37b08e | 14634 | |
d006f5eb RH |
14635 | fi |
14636 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14637 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14638 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14639 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14640 | else | |
14641 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14642 | if test $in_tree_gas = yes; then | |
14643 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14644 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14645 | fi | |
14646 | elif test x$gcc_cv_as != x; then | |
14647 | echo ' .set nomacro | |
14648 | .text | |
14649 | ldq $27, a($29) !literal!1 | |
14650 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14651 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14653 | (eval $ac_try) 2>&5 | |
14654 | ac_status=$? | |
14655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14656 | (exit $ac_status); }; } | |
14657 | then | |
14658 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14659 | else | |
14660 | echo "configure: failed program was" >&5 | |
14661 | cat conftest.s >&5 | |
14662 | fi | |
14663 | rm -f conftest.o conftest.s | |
14664 | fi | |
14665 | fi | |
14666 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14667 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14668 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14669 | ||
14670 | cat >>confdefs.h <<\_ACEOF | |
14671 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14672 | _ACEOF | |
14673 | ||
86da66b5 HPN |
14674 | fi |
14675 | ;; | |
14676 | ||
14677 | cris-*-*) | |
14678 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14679 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14680 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14681 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14682 | else | |
14683 | gcc_cv_as_cris_no_mul_bug=no | |
14684 | if test $in_tree_gas = yes; then | |
14685 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14686 | then gcc_cv_as_cris_no_mul_bug=yes | |
14687 | fi | |
14688 | elif test x$gcc_cv_as != x; then | |
14689 | echo '.text' > conftest.s | |
14690 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14691 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14692 | (eval $ac_try) 2>&5 | |
14693 | ac_status=$? | |
14694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14695 | (exit $ac_status); }; } | |
14696 | then | |
14697 | gcc_cv_as_cris_no_mul_bug=yes | |
14698 | else | |
14699 | echo "configure: failed program was" >&5 | |
14700 | cat conftest.s >&5 | |
14701 | fi | |
14702 | rm -f conftest.o conftest.s | |
14703 | fi | |
14704 | fi | |
14705 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14706 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14707 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14708 | ||
14709 | cat >>confdefs.h <<\_ACEOF | |
14710 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14711 | _ACEOF | |
14712 | ||
8ada417f | 14713 | fi |
3a37b08e | 14714 | ;; |
8ada417f | 14715 | |
1cb36a98 | 14716 | sparc*-*-*) |
ba479fd2 NN |
14717 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14718 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14719 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14720 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14721 | else |
8ada417f ZW |
14722 | gcc_cv_as_sparc_register_op=no |
14723 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14724 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14725 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14726 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14727 | (eval $ac_try) 2>&5 | |
14728 | ac_status=$? | |
14729 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14730 | (exit $ac_status); }; } | |
8ada417f ZW |
14731 | then |
14732 | gcc_cv_as_sparc_register_op=yes | |
14733 | else | |
14734 | echo "configure: failed program was" >&5 | |
14735 | cat conftest.s >&5 | |
14736 | fi | |
14737 | rm -f conftest.o conftest.s | |
14738 | fi | |
cafe096b | 14739 | fi |
ba479fd2 NN |
14740 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14741 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14742 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14743 | |
14744 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14745 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14746 | _ACEOF |
1cb36a98 | 14747 | |
8ada417f | 14748 | fi |
1cb36a98 | 14749 | |
ba479fd2 NN |
14750 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14751 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14752 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14753 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14754 | else |
8ada417f ZW |
14755 | gcc_cv_as_sparc_relax=no |
14756 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14757 | echo '.text' > conftest.s |
ba479fd2 NN |
14758 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14760 | (eval $ac_try) 2>&5 | |
14761 | ac_status=$? | |
14762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14763 | (exit $ac_status); }; } | |
8ada417f ZW |
14764 | then |
14765 | gcc_cv_as_sparc_relax=yes | |
14766 | else | |
14767 | echo "configure: failed program was" >&5 | |
14768 | cat conftest.s >&5 | |
14769 | fi | |
14770 | rm -f conftest.o conftest.s | |
14771 | fi | |
cafe096b | 14772 | fi |
ba479fd2 NN |
14773 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14774 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14775 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14776 | |
14777 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14778 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14779 | _ACEOF |
e95b1e6a | 14780 | |
8ada417f | 14781 | fi |
e95b1e6a | 14782 | |
ba479fd2 NN |
14783 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14784 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14785 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14786 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14787 | else |
8ada417f ZW |
14788 | gcc_cv_as_sparc_ua_pcrel=no |
14789 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14790 | echo '.text |
8ada417f ZW |
14791 | foo: |
14792 | nop | |
14793 | .data | |
14794 | .align 4 | |
14795 | .byte 0 | |
14796 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14797 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14798 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14799 | (eval $ac_try) 2>&5 | |
14800 | ac_status=$? | |
14801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14802 | (exit $ac_status); }; } | |
8ada417f ZW |
14803 | then |
14804 | if test x$gcc_cv_ld != x \ | |
14805 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14806 | gcc_cv_as_sparc_ua_pcrel=yes | |
14807 | fi | |
14808 | rm -f conftest | |
14809 | else | |
14810 | echo "configure: failed program was" >&5 | |
14811 | cat conftest.s >&5 | |
14812 | fi | |
14813 | rm -f conftest.o conftest.s | |
14814 | fi | |
cafe096b | 14815 | fi |
ba479fd2 NN |
14816 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14817 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14818 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14819 | |
14820 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14821 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14822 | _ACEOF |
17e9e88c | 14823 | |
17e9e88c | 14824 | |
ba479fd2 NN |
14825 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14826 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14827 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14828 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14829 | else |
8ada417f ZW |
14830 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14831 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14832 | echo '.data |
8ada417f ZW |
14833 | .align 4 |
14834 | .byte 0x31 | |
14835 | .uaword %r_disp32(foo) | |
14836 | .byte 0x32, 0x33, 0x34 | |
14837 | .global foo | |
14838 | .hidden foo | |
14839 | foo: | |
14840 | .skip 4' > conftest.s | |
ba479fd2 NN |
14841 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14842 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14843 | (eval $ac_try) 2>&5 | |
14844 | ac_status=$? | |
14845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14846 | (exit $ac_status); }; } | |
8ada417f ZW |
14847 | then |
14848 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14849 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14850 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14851 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14852 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14853 | | grep 'DISP32' > /dev/null 2>&1; then | |
14854 | : | |
14855 | else | |
14856 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14857 | fi |
8ada417f ZW |
14858 | fi |
14859 | rm -f conftest | |
14860 | else | |
14861 | echo "configure: failed program was" >&5 | |
14862 | cat conftest.s >&5 | |
14863 | fi | |
14864 | rm -f conftest.o conftest.s | |
14865 | fi | |
cafe096b | 14866 | fi |
ba479fd2 NN |
14867 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14868 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14869 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14870 | |
14871 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14872 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14873 | _ACEOF |
cf7b8b0d | 14874 | |
8ada417f | 14875 | fi |
ba479fd2 | 14876 | |
8ada417f | 14877 | fi # unaligned pcrel relocs |
cf7b8b0d | 14878 | |
ba479fd2 NN |
14879 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14880 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14881 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14882 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14883 | else |
8ada417f ZW |
14884 | gcc_cv_as_sparc_offsetable_lo10=no |
14885 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14886 | echo '.text |
8ada417f ZW |
14887 | or %g1, %lo(ab) + 12, %g1 |
14888 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14889 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14890 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14891 | (eval $ac_try) 2>&5 | |
14892 | ac_status=$? | |
14893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14894 | (exit $ac_status); }; } | |
8ada417f ZW |
14895 | then |
14896 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14897 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14898 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14899 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14900 | fi |
14901 | else | |
14902 | echo "configure: failed program was" >&5 | |
14903 | cat conftest.s >&5 | |
14904 | fi | |
14905 | rm -f conftest.o conftest.s | |
14906 | fi | |
cafe096b | 14907 | fi |
ba479fd2 NN |
14908 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14909 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14910 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14911 | |
14912 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14913 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14914 | _ACEOF |
1cb36a98 | 14915 | |
8ada417f | 14916 | fi |
1cb36a98 RH |
14917 | ;; |
14918 | ||
c307e6dd | 14919 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14920 | case $target_os in |
14921 | cygwin* | pe | mingw32*) | |
14922 | # Used for DWARF 2 in PE | |
14923 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14924 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14925 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14926 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14927 | else | |
14928 | gcc_cv_as_ix86_pe_secrel32=no | |
14929 | if test $in_tree_gas = yes; then | |
14930 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14931 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14932 | fi | |
14933 | elif test x$gcc_cv_as != x; then | |
14934 | echo '.text | |
14935 | foo: nop | |
14936 | .data | |
14937 | .secrel32 foo' > conftest.s | |
14938 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14939 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14940 | (eval $ac_try) 2>&5 | |
14941 | ac_status=$? | |
14942 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14943 | (exit $ac_status); }; } | |
14944 | then | |
14945 | if test x$gcc_cv_ld != x \ | |
14946 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14947 | gcc_cv_as_ix86_pe_secrel32=yes | |
14948 | fi | |
14949 | rm -f conftest | |
14950 | else | |
14951 | echo "configure: failed program was" >&5 | |
14952 | cat conftest.s >&5 | |
14953 | fi | |
14954 | rm -f conftest.o conftest.s | |
14955 | fi | |
14956 | fi | |
14957 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14958 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14959 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14960 | ||
14961 | cat >>confdefs.h <<\_ACEOF | |
14962 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14963 | _ACEOF | |
14964 | ||
14965 | fi | |
14966 | ;; | |
14967 | esac | |
14968 | ||
ba479fd2 NN |
14969 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14970 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14971 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14972 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14973 | else |
14974 | gcc_cv_as_ix86_filds_fists=no | |
14975 | if test $in_tree_gas = yes; then | |
14976 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14977 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14978 | fi |
8ada417f | 14979 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14980 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
14981 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14983 | (eval $ac_try) 2>&5 | |
14984 | ac_status=$? | |
14985 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14986 | (exit $ac_status); }; } | |
8ada417f ZW |
14987 | then |
14988 | gcc_cv_as_ix86_filds_fists=yes | |
14989 | else | |
14990 | echo "configure: failed program was" >&5 | |
14991 | cat conftest.s >&5 | |
981d4858 | 14992 | fi |
8ada417f ZW |
14993 | rm -f conftest.o conftest.s |
14994 | fi | |
14995 | fi | |
ba479fd2 NN |
14996 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
14997 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 14998 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
14999 | |
15000 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15001 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15002 | _ACEOF |
ad9c4d9f | 15003 | |
f6f5dff2 RO |
15004 | fi |
15005 | ||
ba479fd2 NN |
15006 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15007 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
15008 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
15009 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15010 | else |
15011 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15012 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15013 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15014 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15016 | (eval $ac_try) 2>&5 | |
15017 | ac_status=$? | |
15018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15019 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15020 | then |
15021 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15022 | else | |
15023 | echo "configure: failed program was" >&5 | |
15024 | cat conftest.s >&5 | |
15025 | fi | |
15026 | rm -f conftest.o conftest.s | |
15027 | fi | |
15028 | fi | |
ba479fd2 NN |
15029 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15030 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 15031 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15032 | |
15033 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15034 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15035 | _ACEOF |
f6f5dff2 | 15036 | |
ad9c4d9f NN |
15037 | fi |
15038 | ||
6f3ca281 ZW |
15039 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15040 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
15041 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15042 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
15043 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
15044 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15045 | else |
15046 | gcc_cv_as_ix86_gotoff_in_data=no | |
15047 | if test $in_tree_gas = yes; then | |
15048 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15049 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15050 | fi | |
15051 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15052 | echo ' .text |
f88c65f7 RH |
15053 | .L0: |
15054 | nop | |
15055 | .data | |
8ada417f | 15056 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15057 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15058 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15059 | (eval $ac_try) 2>&5 | |
15060 | ac_status=$? | |
15061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15062 | (exit $ac_status); }; } | |
8ada417f ZW |
15063 | then |
15064 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15065 | else | |
15066 | echo "configure: failed program was" >&5 | |
15067 | cat conftest.s >&5 | |
f88c65f7 | 15068 | fi |
8ada417f ZW |
15069 | rm -f conftest.o conftest.s |
15070 | fi | |
15071 | fi | |
ba479fd2 NN |
15072 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15073 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 15074 | |
6f3ca281 | 15075 | |
ba479fd2 | 15076 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15077 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15078 | _ACEOF |
f88c65f7 | 15079 | |
1cb36a98 | 15080 | ;; |
ef1ecf87 RH |
15081 | |
15082 | ia64*-*-*) | |
ba479fd2 NN |
15083 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15084 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
15085 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
15086 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15087 | else |
8ada417f ZW |
15088 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15089 | if test $in_tree_gas = yes; then | |
15090 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15091 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15092 | fi |
8ada417f | 15093 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15094 | echo ' .text |
ef1ecf87 RH |
15095 | addl r15 = @ltoffx(x#), gp |
15096 | ;; | |
cfa9ee99 | 15097 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15098 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15099 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15100 | (eval $ac_try) 2>&5 | |
15101 | ac_status=$? | |
15102 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15103 | (exit $ac_status); }; } | |
8ada417f | 15104 | then |
cfa9ee99 | 15105 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15106 | else |
15107 | echo "configure: failed program was" >&5 | |
15108 | cat conftest.s >&5 | |
2c4a9cff | 15109 | fi |
8ada417f ZW |
15110 | rm -f conftest.o conftest.s |
15111 | fi | |
15112 | fi | |
ba479fd2 NN |
15113 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15114 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 15115 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15116 | |
15117 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15118 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15119 | _ACEOF |
8ada417f | 15120 | |
cfa9ee99 | 15121 | fi |
8ada417f | 15122 | |
2c4a9cff | 15123 | ;; |
8ada417f | 15124 | |
2c4a9cff | 15125 | powerpc*-*-*) |
8ada417f | 15126 | case $target in |
432218ba DE |
15127 | *-*-aix*) conftest_s=' .machine "pwr5" |
15128 | .csect .text[PR] | |
6b37db3c | 15129 | mfcr 3,128';; |
8af4d362 PB |
15130 | *-*-darwin*) |
15131 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
15132 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
15133 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
15134 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15135 | else | |
15136 | gcc_cv_as_machine_directive=no | |
15137 | if test x$gcc_cv_as != x; then | |
15138 | echo ' .machine ppc7400' > conftest.s | |
15139 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15140 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15141 | (eval $ac_try) 2>&5 | |
15142 | ac_status=$? | |
15143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15144 | (exit $ac_status); }; } | |
15145 | then | |
15146 | gcc_cv_as_machine_directive=yes | |
15147 | else | |
15148 | echo "configure: failed program was" >&5 | |
15149 | cat conftest.s >&5 | |
15150 | fi | |
15151 | rm -f conftest.o conftest.s | |
15152 | fi | |
15153 | fi | |
15154 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
15155 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
15156 | ||
15157 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15158 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15159 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15160 | test x$build = x$target && exit 1 | |
15161 | fi | |
15162 | conftest_s=' .text | |
6b37db3c | 15163 | mfcr r3,128';; |
4c67db14 | 15164 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15165 | .text |
6b37db3c | 15166 | mfcr 3,128';; |
8ada417f | 15167 | esac |
8ada417f | 15168 | |
ba479fd2 NN |
15169 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15170 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
15171 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
15172 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15173 | else |
8ada417f ZW |
15174 | gcc_cv_as_powerpc_mfcrf=no |
15175 | if test $in_tree_gas = yes; then | |
15176 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15177 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15178 | fi |
8ada417f | 15179 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15180 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15181 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15182 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15183 | (eval $ac_try) 2>&5 | |
15184 | ac_status=$? | |
15185 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15186 | (exit $ac_status); }; } | |
8ada417f ZW |
15187 | then |
15188 | gcc_cv_as_powerpc_mfcrf=yes | |
15189 | else | |
15190 | echo "configure: failed program was" >&5 | |
15191 | cat conftest.s >&5 | |
15192 | fi | |
15193 | rm -f conftest.o conftest.s | |
15194 | fi | |
2c4a9cff | 15195 | fi |
ba479fd2 NN |
15196 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15197 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15198 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15199 | |
15200 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15201 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15202 | _ACEOF |
ef1ecf87 | 15203 | |
8ada417f | 15204 | fi |
432218ba DE |
15205 | |
15206 | case $target in | |
15207 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15208 | .csect .text[PR] | |
15209 | popcntb 3,3';; | |
15210 | *) conftest_s=' .machine power5 | |
15211 | .text | |
15212 | popcntb 3,3';; | |
15213 | esac | |
15214 | ||
15215 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
15216 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
15217 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
15218 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15219 | else | |
15220 | gcc_cv_as_powerpc_popcntb=no | |
15221 | if test $in_tree_gas = yes; then | |
15222 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15223 | then gcc_cv_as_powerpc_popcntb=yes | |
15224 | fi | |
15225 | elif test x$gcc_cv_as != x; then | |
15226 | echo "$conftest_s" > conftest.s | |
15227 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15228 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15229 | (eval $ac_try) 2>&5 | |
15230 | ac_status=$? | |
15231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15232 | (exit $ac_status); }; } | |
15233 | then | |
15234 | gcc_cv_as_powerpc_popcntb=yes | |
15235 | else | |
15236 | echo "configure: failed program was" >&5 | |
15237 | cat conftest.s >&5 | |
15238 | fi | |
15239 | rm -f conftest.o conftest.s | |
15240 | fi | |
15241 | fi | |
15242 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15243 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15244 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15245 | ||
15246 | cat >>confdefs.h <<\_ACEOF | |
15247 | #define HAVE_AS_POPCNTB 1 | |
15248 | _ACEOF | |
15249 | ||
9719f3b7 DE |
15250 | fi |
15251 | ||
15252 | case $target in | |
15253 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
15254 | .csect .text[PR] | |
15255 | frin 1,1';; | |
1e04bfdc | 15256 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
15257 | .text |
15258 | frin 1,1';; | |
15259 | esac | |
15260 | ||
15261 | echo "$as_me:$LINENO: checking assembler for fp round support" >&5 | |
15262 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 | |
15263 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then | |
15264 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15265 | else | |
15266 | gcc_cv_as_powerpc_fprnd=no | |
15267 | if test $in_tree_gas = yes; then | |
15268 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15269 | then gcc_cv_as_powerpc_fprnd=yes | |
15270 | fi | |
15271 | elif test x$gcc_cv_as != x; then | |
15272 | echo "$conftest_s" > conftest.s | |
15273 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15274 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15275 | (eval $ac_try) 2>&5 | |
15276 | ac_status=$? | |
15277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15278 | (exit $ac_status); }; } | |
15279 | then | |
15280 | gcc_cv_as_powerpc_fprnd=yes | |
15281 | else | |
15282 | echo "configure: failed program was" >&5 | |
15283 | cat conftest.s >&5 | |
15284 | fi | |
15285 | rm -f conftest.o conftest.s | |
15286 | fi | |
15287 | fi | |
15288 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 | |
15289 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 | |
15290 | if test $gcc_cv_as_powerpc_fprnd = yes; then | |
15291 | ||
15292 | cat >>confdefs.h <<\_ACEOF | |
15293 | #define HAVE_AS_FPRND 1 | |
15294 | _ACEOF | |
15295 | ||
432218ba DE |
15296 | fi |
15297 | ||
7f970b70 AM |
15298 | case $target in |
15299 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15300 | LCF..0: | |
15301 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15302 | *-*-darwin*) | |
15303 | conftest_s=' .text | |
15304 | LCF0: | |
15305 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15306 | *) conftest_s=' .text | |
15307 | .LCF0: | |
15308 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15309 | esac | |
15310 | ||
15311 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15312 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15313 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15314 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15315 | else | |
15316 | gcc_cv_as_powerpc_rel16=no | |
15317 | if test $in_tree_gas = yes; then | |
15318 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15319 | then gcc_cv_as_powerpc_rel16=yes | |
15320 | fi | |
15321 | elif test x$gcc_cv_as != x; then | |
15322 | echo "$conftest_s" > conftest.s | |
15323 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15324 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15325 | (eval $ac_try) 2>&5 | |
15326 | ac_status=$? | |
15327 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15328 | (exit $ac_status); }; } | |
15329 | then | |
15330 | gcc_cv_as_powerpc_rel16=yes | |
15331 | else | |
15332 | echo "configure: failed program was" >&5 | |
15333 | cat conftest.s >&5 | |
15334 | fi | |
15335 | rm -f conftest.o conftest.s | |
15336 | fi | |
15337 | fi | |
15338 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15339 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15340 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15341 | ||
15342 | cat >>confdefs.h <<\_ACEOF | |
15343 | #define HAVE_AS_REL16 1 | |
15344 | _ACEOF | |
15345 | ||
15346 | fi | |
8ada417f ZW |
15347 | ;; |
15348 | ||
15349 | mips*-*-*) | |
ba479fd2 NN |
15350 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15351 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15352 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15353 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15354 | else |
15355 | gcc_cv_as_mips_explicit_relocs=no | |
15356 | if test $in_tree_gas = yes; then | |
15357 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15358 | then gcc_cv_as_mips_explicit_relocs=yes | |
15359 | fi | |
15360 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15361 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15362 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15364 | (eval $ac_try) 2>&5 | |
15365 | ac_status=$? | |
15366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15367 | (exit $ac_status); }; } | |
8ada417f ZW |
15368 | then |
15369 | gcc_cv_as_mips_explicit_relocs=yes | |
15370 | else | |
15371 | echo "configure: failed program was" >&5 | |
15372 | cat conftest.s >&5 | |
ef1ecf87 | 15373 | fi |
8ada417f ZW |
15374 | rm -f conftest.o conftest.s |
15375 | fi | |
15376 | fi | |
ba479fd2 NN |
15377 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15378 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15379 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15380 | if test x$target_cpu_default = x | |
15381 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15382 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15383 | fi | |
15384 | fi | |
dbad5e72 SE |
15385 | ;; |
15386 | esac | |
8ada417f | 15387 | |
dbad5e72 SE |
15388 | # Mips and HP-UX need the GNU assembler. |
15389 | # Linux on IA64 might be able to use the Intel assembler. | |
15390 | ||
15391 | case "$target" in | |
15392 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
15393 | if test x$gas_flag = xyes \ |
15394 | || test x"$host" != x"$build" \ | |
15395 | || test ! -x "$gcc_cv_as" \ | |
15396 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15397 | : | |
15398 | else | |
15399 | echo "*** This configuration requires the GNU assembler" >&2 | |
15400 | exit 1 | |
15401 | fi | |
ef1ecf87 | 15402 | ;; |
1cb36a98 | 15403 | esac |
dbad5e72 | 15404 | |
9d147085 RH |
15405 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15406 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15407 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15408 | # add some instruction here to (also) show we expect this might work. | |
15409 | # ??? Once 2.11 is released, probably need to add first known working | |
15410 | # version to the per-target configury. | |
15411 | case "$target" in | |
80486e06 | 15412 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15413 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
6afdc741 | 15414 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*) |
9d147085 RH |
15415 | insn="nop" |
15416 | ;; | |
57116d8d | 15417 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15418 | insn="nop 0" |
15419 | ;; | |
2853bc5a HPN |
15420 | mmix-*-*) |
15421 | insn="swym 0" | |
15422 | ;; | |
8ada417f ZW |
15423 | esac |
15424 | if test x"$insn" != x; then | |
15425 | conftest_s="\ | |
15426 | .file 1 \"conftest.s\" | |
15427 | .loc 1 3 0 | |
15428 | $insn" | |
ba479fd2 NN |
15429 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15430 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15431 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15432 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15433 | else |
15434 | gcc_cv_as_dwarf2_debug_line=no | |
15435 | if test $in_tree_gas = yes; then | |
15436 | if test $in_tree_gas_is_elf = yes \ | |
15437 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15438 | then gcc_cv_as_dwarf2_debug_line=yes | |
15439 | fi | |
15440 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15441 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15442 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15443 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15444 | (eval $ac_try) 2>&5 | |
15445 | ac_status=$? | |
15446 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15447 | (exit $ac_status); }; } | |
8ada417f | 15448 | then |
080a5bb0 EB |
15449 | if test x$gcc_cv_objdump != x \ |
15450 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15451 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15452 | gcc_cv_as_dwarf2_debug_line=yes |
15453 | fi | |
15454 | else | |
15455 | echo "configure: failed program was" >&5 | |
15456 | cat conftest.s >&5 | |
15457 | fi | |
15458 | rm -f conftest.o conftest.s | |
15459 | fi | |
15460 | fi | |
ba479fd2 NN |
15461 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15462 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15463 | |
ad9c4d9f | 15464 | |
8ada417f ZW |
15465 | # The .debug_line file table must be in the exact order that |
15466 | # we specified the files, since these indices are also used | |
15467 | # by DW_AT_decl_file. Approximate this test by testing if | |
15468 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15469 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15470 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15471 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15472 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15473 | else |
15474 | gcc_cv_as_dwarf2_file_buggy=no | |
15475 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15476 | echo ' .file 1 "foo.s" |
8ada417f | 15477 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15478 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15479 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15480 | (eval $ac_try) 2>&5 | |
15481 | ac_status=$? | |
15482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15483 | (exit $ac_status); }; } | |
8ada417f ZW |
15484 | then |
15485 | gcc_cv_as_dwarf2_file_buggy=yes | |
15486 | else | |
15487 | echo "configure: failed program was" >&5 | |
15488 | cat conftest.s >&5 | |
15489 | fi | |
15490 | rm -f conftest.o conftest.s | |
15491 | fi | |
ad9c4d9f | 15492 | fi |
ba479fd2 NN |
15493 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15494 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15495 | |
15496 | ||
15497 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15498 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15499 | |
15500 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15501 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15502 | _ACEOF |
9d147085 | 15503 | |
8ada417f | 15504 | fi |
ad9c4d9f | 15505 | |
ba479fd2 NN |
15506 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15507 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15508 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15509 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15510 | else |
15511 | gcc_cv_as_gdwarf2_flag=no | |
15512 | if test $in_tree_gas = yes; then | |
15513 | if test $in_tree_gas_is_elf = yes \ | |
15514 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15515 | then gcc_cv_as_gdwarf2_flag=yes | |
15516 | fi | |
15517 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15518 | echo "$insn" > conftest.s |
ba479fd2 NN |
15519 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15520 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15521 | (eval $ac_try) 2>&5 | |
15522 | ac_status=$? | |
15523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15524 | (exit $ac_status); }; } | |
8ada417f ZW |
15525 | then |
15526 | gcc_cv_as_gdwarf2_flag=yes | |
15527 | else | |
15528 | echo "configure: failed program was" >&5 | |
15529 | cat conftest.s >&5 | |
15530 | fi | |
15531 | rm -f conftest.o conftest.s | |
15532 | fi | |
ad9c4d9f | 15533 | fi |
ba479fd2 NN |
15534 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15535 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15536 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15537 | |
15538 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15539 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15540 | _ACEOF |
5f0e9ea2 GK |
15541 | |
15542 | fi | |
ad9c4d9f | 15543 | |
ba479fd2 NN |
15544 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15545 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15546 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15547 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15548 | else |
15549 | gcc_cv_as_gstabs_flag=no | |
15550 | if test $in_tree_gas = yes; then | |
15551 | if test $in_tree_gas_is_elf = yes \ | |
15552 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15553 | then gcc_cv_as_gstabs_flag=yes | |
15554 | fi | |
15555 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15556 | echo "$insn" > conftest.s |
ba479fd2 NN |
15557 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15559 | (eval $ac_try) 2>&5 | |
15560 | ac_status=$? | |
15561 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15562 | (exit $ac_status); }; } | |
8ada417f ZW |
15563 | then |
15564 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15565 | # and warns about it, but still exits successfully. So check for | |
15566 | # this. | |
ba479fd2 NN |
15567 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15568 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15569 | (eval $ac_try) 2>&5 | |
15570 | ac_status=$? | |
15571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15572 | (exit $ac_status); }; } | |
8ada417f ZW |
15573 | then : |
15574 | else gcc_cv_as_gstabs_flag=yes | |
15575 | fi | |
15576 | else | |
15577 | echo "configure: failed program was" >&5 | |
15578 | cat conftest.s >&5 | |
15579 | fi | |
15580 | rm -f conftest.o conftest.s | |
15581 | fi | |
ad9c4d9f | 15582 | fi |
ba479fd2 NN |
15583 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15584 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15585 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15586 | |
15587 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15588 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15589 | _ACEOF |
5f0e9ea2 GK |
15590 | |
15591 | fi | |
8ada417f | 15592 | fi |
5f0e9ea2 | 15593 | |
ba479fd2 NN |
15594 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15595 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15596 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15597 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15598 | 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 \ |
15599 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15600 | gcc_cv_ld_ro_rw_mix=read-write |
15601 | fi | |
15602 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15603 | echo '.section myfoosect, "a"' > conftest1.s |
15604 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15605 | echo '.byte 1' >> conftest2.s |
90e145da | 15606 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15607 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15608 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15609 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15610 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15611 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15612 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15613 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15614 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15615 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15616 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15617 | gcc_cv_ld_ro_rw_mix=read-only | |
15618 | else | |
15619 | gcc_cv_ld_ro_rw_mix=read-write | |
15620 | fi | |
15621 | fi | |
15622 | fi | |
15623 | rm -f conftest.* conftest[123].* | |
15624 | fi | |
15625 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15626 | |
15627 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15628 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15629 | _ACEOF |
96d0f4dc JJ |
15630 | |
15631 | fi | |
ba479fd2 NN |
15632 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15633 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15634 | |
ba479fd2 NN |
15635 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15636 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15637 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15638 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15639 | 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 \ |
15640 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15641 | gcc_cv_ld_eh_frame_hdr=yes |
15642 | fi | |
15643 | elif test x$gcc_cv_ld != x; then | |
15644 | # Check if linker supports --eh-frame-hdr option | |
15645 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15646 | gcc_cv_ld_eh_frame_hdr=yes | |
15647 | fi | |
15648 | fi | |
232b67d9 | 15649 | |
275b60d6 | 15650 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15651 | |
15652 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15653 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15654 | _ACEOF |
275b60d6 JJ |
15655 | |
15656 | fi | |
ba479fd2 NN |
15657 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15658 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15659 | |
ba479fd2 NN |
15660 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15661 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15662 | gcc_cv_ld_pie=no |
15663 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15664 | 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 \ |
15665 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15666 | gcc_cv_ld_pie=yes |
15667 | fi | |
15668 | elif test x$gcc_cv_ld != x; then | |
15669 | # Check if linker supports -pie option | |
15670 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15671 | gcc_cv_ld_pie=yes | |
15672 | fi | |
15673 | fi | |
15674 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15675 | |
15676 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15677 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15678 | _ACEOF |
24a4dd31 JJ |
15679 | |
15680 | fi | |
ba479fd2 NN |
15681 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15682 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15683 | |
8bb915b6 NN |
15684 | # -------- |
15685 | # UNSORTED | |
15686 | # -------- | |
15687 | ||
765f1bf9 AM |
15688 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15689 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15690 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15691 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15692 | else | |
15693 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15694 | if test $in_tree_ld = yes ; then |
15695 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
15696 | && test $in_tree_ld_is_elf = yes; then | |
15697 | gcc_cv_ld_as_needed=yes | |
15698 | fi | |
15699 | elif test x$gcc_cv_ld != x; then | |
15700 | # Check if linker supports --as-needed and --no-as-needed options | |
15701 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15702 | gcc_cv_ld_as_needed=yes | |
15703 | fi | |
15704 | fi | |
82e923f6 RS |
15705 | |
15706 | fi | |
15707 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15708 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15709 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15710 | ||
15711 | cat >>confdefs.h <<\_ACEOF | |
15712 | #define HAVE_LD_AS_NEEDED 1 | |
15713 | _ACEOF | |
15714 | ||
15715 | fi | |
765f1bf9 | 15716 | |
d82bf747 AM |
15717 | case "$target:$tm_file" in |
15718 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
85b776df AM |
15719 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
15720 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15721 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15722 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15723 | else | |
15724 | gcc_cv_ld_no_dot_syms=no | |
15725 | if test $in_tree_ld = yes ; then | |
15726 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2; then | |
15727 | gcc_cv_ld_no_dot_syms=yes | |
15728 | fi | |
15729 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15730 | cat > conftest1.s <<EOF | |
15731 | .text | |
15732 | bl .foo | |
15733 | EOF | |
15734 | cat > conftest2.s <<EOF | |
15735 | .section ".opd","aw" | |
15736 | .align 3 | |
15737 | .globl foo | |
15738 | .type foo,@function | |
15739 | foo: | |
15740 | .quad .LEfoo,.TOC.@tocbase,0 | |
15741 | .text | |
15742 | .LEfoo: | |
15743 | blr | |
15744 | .size foo,.-.LEfoo | |
15745 | EOF | |
15746 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15747 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15748 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15749 | gcc_cv_ld_no_dot_syms=yes | |
15750 | fi | |
15751 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15752 | fi | |
15753 | ||
15754 | fi | |
15755 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
15756 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
15757 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
15758 | ||
15759 | cat >>confdefs.h <<\_ACEOF | |
15760 | #define HAVE_LD_NO_DOT_SYMS 1 | |
15761 | _ACEOF | |
15762 | ||
15763 | fi | |
15764 | ;; | |
15765 | esac | |
15766 | ||
380e5ca4 MM |
15767 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
15768 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
15769 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
15770 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15771 | else | |
15772 | gcc_cv_ld_sysroot=no | |
15773 | if test $in_tree_ld = yes ; then | |
15774 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then | |
7032df40 | 15775 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
15776 | fi |
15777 | elif test x$gcc_cv_ld != x; then | |
15778 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
15779 | gcc_cv_ld_sysroot=yes | |
15780 | fi | |
15781 | fi | |
15782 | fi | |
15783 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
15784 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
15785 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
15786 | ||
15787 | cat >>confdefs.h <<\_ACEOF | |
15788 | #define HAVE_LD_SYSROOT 1 | |
15789 | _ACEOF | |
15790 | ||
15791 | fi | |
15792 | ||
9fb28a67 | 15793 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 15794 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
15795 | |
15796 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 15797 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 15798 | _ACEOF |
793e9558 PB |
15799 | |
15800 | fi | |
15801 | ||
77008252 JJ |
15802 | # Test for stack protector support in target C library. |
15803 | case "$target" in | |
15804 | *-*-linux*) | |
15805 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
15806 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
15807 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
15808 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15809 | else | |
15810 | gcc_cv_libc_provides_ssp=no | |
15811 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15812 | if test "x$with_sysroot" = x; then | |
15813 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15814 | elif test "x$with_sysroot" = xyes; then | |
15815 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15816 | else | |
15817 | glibc_header_dir="${with_sysroot}/usr/include" | |
15818 | fi | |
15819 | else | |
15820 | glibc_header_dir=/usr/include | |
15821 | fi | |
15822 | # glibc 2.4 and later provides __stack_chk_fail and | |
15823 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
15824 | if test -f $glibc_header_dir/features.h \ | |
15825 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
15826 | $glibc_header_dir/features.h > /dev/null; then | |
15827 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
15828 | $glibc_header_dir/features.h > /dev/null; then | |
15829 | gcc_cv_libc_provides_ssp=yes | |
15830 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
15831 | $glibc_header_dir/features.h > /dev/null \ | |
15832 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
15833 | $glibc_header_dir/features.h > /dev/null; then | |
15834 | gcc_cv_libc_provides_ssp=yes | |
15835 | fi | |
15836 | fi | |
15837 | fi | |
15838 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
15839 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
15840 | *) gcc_cv_libc_provides_ssp=no ;; | |
15841 | esac | |
15842 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
15843 | ||
15844 | cat >>confdefs.h <<\_ACEOF | |
15845 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
15846 | _ACEOF | |
15847 | ||
15848 | fi | |
15849 | ||
ed965309 JJ |
15850 | # Check if TFmode long double should be used by default or not. |
15851 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
15852 | # and later they can use TFmode. | |
15853 | case "$target" in | |
15854 | powerpc*-*-*gnu* | \ | |
15855 | sparc*-*-linux* | \ | |
15856 | s390*-*-linux* | \ | |
15857 | alpha*-*-linux*) | |
15858 | ||
15859 | # Check whether --with-long-double-128 or --without-long-double-128 was given. | |
15860 | if test "${with_long_double_128+set}" = set; then | |
15861 | withval="$with_long_double_128" | |
15862 | gcc_cv_target_ldbl128="$with_long_double_128" | |
15863 | else | |
15864 | gcc_cv_target_ldbl128=no | |
15865 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15866 | if test "x$with_sysroot" = x; then | |
15867 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15868 | elif test "x$with_sysroot" = xyes; then | |
15869 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15870 | else | |
15871 | glibc_header_dir="${with_sysroot}/usr/include" | |
15872 | fi | |
15873 | else | |
15874 | glibc_header_dir=/usr/include | |
15875 | fi | |
15876 | grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ | |
15877 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ | |
15878 | && gcc_cv_target_ldbl128=yes | |
15879 | fi; | |
15880 | ;; | |
15881 | esac | |
15882 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
15883 | ||
15884 | cat >>confdefs.h <<\_ACEOF | |
15885 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
15886 | _ACEOF | |
15887 | ||
15888 | fi | |
15889 | ||
81bf3d9e | 15890 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 15891 | |
81bf3d9e RH |
15892 | # Check whether --with-gc or --without-gc was given. |
15893 | if test "${with_gc+set}" = set; then | |
15894 | withval="$with_gc" | |
15895 | case "$withval" in | |
08cee789 | 15896 | page) |
81bf3d9e | 15897 | GGC=ggc-$withval |
08cee789 DJ |
15898 | ;; |
15899 | zone) | |
15900 | GGC=ggc-$withval | |
15901 | ||
15902 | cat >>confdefs.h <<\_ACEOF | |
15903 | #define GGC_ZONE 1 | |
15904 | _ACEOF | |
15905 | ||
81bf3d9e RH |
15906 | ;; |
15907 | *) | |
ba479fd2 NN |
15908 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
15909 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
15910 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
15911 | ;; |
15912 | esac | |
15913 | else | |
005537df | 15914 | GGC=ggc-page |
ba479fd2 | 15915 | fi; |
81bf3d9e RH |
15916 | |
15917 | echo "Using $GGC for garbage collection." | |
15918 | ||
3c809ba4 | 15919 | # Use the system's zlib library. |
b8dad04b ZW |
15920 | zlibdir=-L../zlib |
15921 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 15922 | |
3c809ba4 AG |
15923 | # Check whether --with-system-zlib or --without-system-zlib was given. |
15924 | if test "${with_system_zlib+set}" = set; then | |
15925 | withval="$with_system_zlib" | |
15926 | zlibdir= | |
15927 | zlibinc= | |
15928 | ||
ba479fd2 | 15929 | fi; |
3c809ba4 AG |
15930 | |
15931 | ||
15932 | ||
dc6746e7 | 15933 | |
ba479fd2 NN |
15934 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15935 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15936 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15937 | if test "${enable_maintainer_mode+set}" = set; then | |
15938 | enableval="$enable_maintainer_mode" | |
15939 | maintainer_mode=$enableval | |
15940 | else | |
15941 | maintainer_mode=no | |
ba479fd2 | 15942 | fi; |
63cf211a | 15943 | |
ba479fd2 NN |
15944 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15945 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15946 | |
15947 | if test "$maintainer_mode" = "yes"; then | |
15948 | MAINT='' | |
15949 | else | |
15950 | MAINT='#' | |
15951 | fi | |
15952 | ||
8bb915b6 NN |
15953 | # -------------- |
15954 | # Language hooks | |
15955 | # -------------- | |
15956 | ||
861bb6c1 JL |
15957 | # Make empty files to contain the specs and options for each language. |
15958 | # Then add #include lines to for a compiler that has specs and/or options. | |
15959 | ||
cc11cc9b | 15960 | subdirs= |
d7b42618 | 15961 | lang_opt_files= |
861bb6c1 | 15962 | lang_specs_files= |
3103b7db | 15963 | lang_tree_files= |
861bb6c1 JL |
15964 | # These (without "all_") are set in each config-lang.in. |
15965 | # `language' must be a single word so is spelled singularly. | |
15966 | all_languages= | |
15967 | all_boot_languages= | |
15968 | all_compilers= | |
15969 | all_stagestuff= | |
53c7ffe7 | 15970 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15971 | # List of language makefile fragments. |
2ed26f6b ZW |
15972 | all_lang_makefrags= |
15973 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15974 | all_lang_makefiles= |
e2500fed | 15975 | # Files for gengtype |
ef69da62 | 15976 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15977 | # Files for gengtype with language |
15978 | all_gtfiles_files_langs= | |
15979 | all_gtfiles_files_files= | |
861bb6c1 | 15980 | |
cc11cc9b PB |
15981 | # These are the languages that are set in --enable-languages, |
15982 | # and are available in the GCC tree. | |
15983 | all_selected_languages= | |
15984 | ||
861bb6c1 JL |
15985 | # Add the language fragments. |
15986 | # Languages are added via two mechanisms. Some information must be | |
15987 | # recorded in makefile variables, these are defined in config-lang.in. | |
15988 | # We accumulate them and plug them into the main Makefile. | |
15989 | # The other mechanism is a set of hooks for each of the main targets | |
15990 | # like `clean', `install', etc. | |
15991 | ||
861bb6c1 | 15992 | language_hooks="Make-hooks" |
861bb6c1 | 15993 | |
cc11cc9b | 15994 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 15995 | do |
cc11cc9b PB |
15996 | case $lang in |
15997 | # The odd quoting in the next line works around | |
15998 | # an apparent bug in bash 1.12 on linux. | |
15999 | ${srcdir}/[*]/config-lang.in) | |
16000 | continue ;; | |
16001 | *) | |
16002 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
16003 | if test "x$lang_alias" = x | |
16004 | then | |
16005 | echo "$lang doesn't set \$language." 1>&2 | |
16006 | exit 1 | |
16007 | fi | |
16008 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
16009 | subdirs="$subdirs $subdir" | |
16010 | case ",$enable_languages," in | |
16011 | *,$lang_alias,*) | |
16012 | all_selected_languages="$all_selected_languages $lang_alias" | |
16013 | if test -f $srcdir/$subdir/lang-specs.h; then | |
16014 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
16015 | fi | |
16016 | ;; | |
16017 | esac | |
16018 | ||
16019 | if test -f $srcdir/$subdir/lang.opt; then | |
16020 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
16021 | fi | |
16022 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
16023 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
16024 | fi | |
16025 | ||
16026 | language= | |
16027 | boot_language= | |
16028 | compilers= | |
16029 | stagestuff= | |
16030 | outputs= | |
16031 | gtfiles= | |
16032 | . ${srcdir}/$subdir/config-lang.in | |
16033 | if test "x$language" = x | |
16034 | then | |
16035 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
16036 | exit 1 | |
16037 | fi | |
16038 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" | |
16039 | if test -f ${srcdir}/$subdir/Makefile.in | |
16040 | then all_lang_makefiles="$subdir/Makefile" | |
16041 | fi | |
16042 | all_languages="$all_languages $language" | |
16043 | if test "x$boot_language" = xyes | |
16044 | then | |
16045 | all_boot_languages="$all_boot_languages $language" | |
16046 | fi | |
16047 | all_compilers="$all_compilers $compilers" | |
16048 | all_stagestuff="$all_stagestuff $stagestuff" | |
16049 | all_outputs="$all_outputs $outputs" | |
16050 | all_gtfiles="$all_gtfiles $gtfiles" | |
16051 | for f in $gtfiles | |
16052 | do | |
16053 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " | |
16054 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
16055 | done | |
16056 | ;; | |
16057 | esac | |
861bb6c1 JL |
16058 | done |
16059 | ||
8ac9d31f TJ |
16060 | # Pick up gtfiles for c |
16061 | gtfiles= | |
cc11cc9b | 16062 | subdir="c" |
8ac9d31f TJ |
16063 | . ${srcdir}/c-config-lang.in |
16064 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 16065 | for f in $gtfiles |
8ac9d31f | 16066 | do |
cc11cc9b | 16067 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " |
8ac9d31f | 16068 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " |
8ac9d31f TJ |
16069 | done |
16070 | ||
cbc59f01 | 16071 | check_languages= |
cc11cc9b | 16072 | for language in $all_selected_languages |
cbc59f01 | 16073 | do |
cc11cc9b | 16074 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
16075 | done |
16076 | ||
62b81e45 | 16077 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 16078 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
16079 | |
16080 | rm -f Make-hooks | |
16081 | touch Make-hooks | |
bd97af06 | 16082 | target_list="all.cross start.encap rest.encap tags \ |
b2d7fd7b | 16083 | install-common install-man install-info dvi html \ |
a541f69d | 16084 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 16085 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 16086 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
cc11cc9b | 16087 | |
861bb6c1 JL |
16088 | for t in $target_list |
16089 | do | |
16090 | x= | |
cc11cc9b | 16091 | for lang in $all_selected_languages |
861bb6c1 | 16092 | do |
cc11cc9b | 16093 | x="$x $lang.$t" |
861bb6c1 JL |
16094 | done |
16095 | echo "lang.$t: $x" >> Make-hooks | |
16096 | done | |
16097 | ||
8bb915b6 NN |
16098 | # -------- |
16099 | # UNSORTED | |
16100 | # -------- | |
16101 | ||
cc06d68c | 16102 | # Create .gdbinit. |
861bb6c1 | 16103 | |
cc06d68c GP |
16104 | echo "dir ." > .gdbinit |
16105 | echo "dir ${srcdir}" >> .gdbinit | |
16106 | if test x$gdb_needs_out_file_path = xyes | |
16107 | then | |
16108 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
16109 | fi | |
16110 | if test "x$subdirs" != x; then | |
16111 | for s in $subdirs | |
16112 | do | |
16113 | echo "dir ${srcdir}/$s" >> .gdbinit | |
16114 | done | |
861bb6c1 | 16115 | fi |
cc06d68c | 16116 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 16117 | |
8f8d3278 NC |
16118 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
16119 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
16120 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
16121 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
16122 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
16123 | # make and thus we'd get different behavior depending on where we built the | |
16124 | # sources. | |
5949a9fc | 16125 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 16126 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 16127 | else |
8f8d3278 NC |
16128 | # An explanation of the sed strings: |
16129 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
16130 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
16131 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 16132 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
16133 | # |
16134 | # (*) Note this pattern overwrites the first character of the string | |
16135 | # with a forward slash if one is not already present. This is not a | |
16136 | # problem because the exact names of the sub-directories concerned is | |
16137 | # unimportant, just the number of them matters. | |
16138 | # | |
16139 | # The practical upshot of these patterns is like this: | |
16140 | # | |
16141 | # prefix exec_prefix result | |
16142 | # ------ ----------- ------ | |
16143 | # /foo /foo/bar ../ | |
16144 | # /foo/ /foo/bar ../ | |
16145 | # /foo /foo/bar/ ../ | |
16146 | # /foo/ /foo/bar/ ../ | |
16147 | # /foo /foo/bar/ugg ../../ | |
16148 | # | |
4c112cda | 16149 | dollar='$$' |
caa55b1e | 16150 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
16151 | fi |
16152 | ||
16153 | ||
2ce3c6c6 | 16154 | |
2bbea3a6 RH |
16155 | # Find a directory in which to install a shared libgcc. |
16156 | ||
16157 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
16158 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
16159 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
16160 | |
16161 | fi; | |
2bbea3a6 RH |
16162 | |
16163 | ||
5b15f277 RH |
16164 | # Check whether --with-slibdir or --without-slibdir was given. |
16165 | if test "${with_slibdir+set}" = set; then | |
16166 | withval="$with_slibdir" | |
16167 | slibdir="$with_slibdir" | |
16168 | else | |
16169 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 16170 | slibdir='$(libsubdir)' |
5b15f277 | 16171 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
16172 | slibdir='$(build_tooldir)/lib' |
16173 | else | |
5b15f277 | 16174 | slibdir='$(libdir)' |
2bbea3a6 | 16175 | fi |
ba479fd2 | 16176 | fi; |
2bbea3a6 RH |
16177 | |
16178 | ||
1e6347d8 | 16179 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
16180 | |
16181 | ||
22482f74 MS |
16182 | |
16183 | # Check whether --with-datarootdir or --without-datarootdir was given. | |
16184 | if test "${with_datarootdir+set}" = set; then | |
16185 | withval="$with_datarootdir" | |
16186 | datarootdir="\${prefix}/$with_datarootdir" | |
16187 | else | |
16188 | datarootdir='$(prefix)/share' | |
16189 | fi; | |
16190 | ||
16191 | ||
16192 | ||
16193 | # Check whether --with-docdir or --without-docdir was given. | |
16194 | if test "${with_docdir+set}" = set; then | |
16195 | withval="$with_docdir" | |
16196 | docdir="\${prefix}/$with_docdir" | |
16197 | else | |
16198 | docdir='$(datarootdir)' | |
16199 | fi; | |
16200 | ||
16201 | ||
16202 | ||
16203 | # Check whether --with-htmldir or --without-htmldir was given. | |
16204 | if test "${with_htmldir+set}" = set; then | |
16205 | withval="$with_htmldir" | |
16206 | htmldir="\${prefix}/$with_htmldir" | |
16207 | else | |
16208 | htmldir='$(docdir)' | |
16209 | fi; | |
16210 | ||
16211 | ||
861bb6c1 JL |
16212 | # Substitute configuration variables |
16213 | ||
16214 | ||
16215 | ||
16216 | ||
16217 | ||
16218 | ||
16219 | ||
16220 | ||
16221 | ||
16222 | ||
16223 | ||
16224 | ||
16225 | ||
16226 | ||
16227 | ||
16228 | ||
16229 | ||
16230 | ||
16231 | ||
16232 | ||
16233 | ||
16234 | ||
16235 | ||
16236 | ||
16237 | ||
16238 | ||
16239 | ||
16240 | ||
16241 | ||
16242 | ||
16243 | ||
16244 | ||
16245 | ||
16246 | ||
16247 | ||
16248 | ||
16249 | ||
16250 | ||
16251 | ||
16252 | ||
16253 | ||
16254 | ||
16255 | ||
16256 | ||
16257 | ||
16258 | ||
9b16d2c4 | 16259 | |
e9a25f70 | 16260 | |
6e26218f | 16261 | |
c8724862 | 16262 | |
e061d1ce | 16263 | |
d8bb17c8 | 16264 | |
11642c3a ZW |
16265 | |
16266 | ||
16267 | ||
16268 | ||
16269 | ||
16270 | ||
16271 | ||
3d9d2476 | 16272 | |
e2500fed | 16273 | |
51b9ff45 | 16274 | |
861bb6c1 | 16275 | |
6e3f3080 NN |
16276 | # Echo link setup. |
16277 | if test x${build} = x${host} ; then | |
16278 | if test x${host} = x${target} ; then | |
16279 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
16280 | else | |
16281 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
16282 | echo " from ${host} to ${target}." 1>&2 | |
16283 | fi | |
16284 | else | |
16285 | if test x${host} = x${target} ; then | |
16286 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
16287 | echo " for ${target}." 1>&2 | |
16288 | else | |
16289 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
16290 | echo " from ${host} to ${target}." 1>&2 | |
16291 | fi | |
16292 | fi | |
16293 | ||
6de9cd9a DN |
16294 | |
16295 | ||
16296 | ||
6e3f3080 NN |
16297 | # Configure the subdirectories |
16298 | # AC_CONFIG_SUBDIRS($subdirs) | |
16299 | ||
16300 | # Create the Makefile | |
16301 | # and configure language subdirectories | |
ba479fd2 | 16302 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
16303 | |
16304 | ||
ba479fd2 | 16305 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 16306 | |
ba479fd2 | 16307 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
16308 | # This file is a shell script that caches the results of configure |
16309 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
16310 | # scripts and configure runs, see configure's option --config-cache. |
16311 | # It is not useful on other systems. If it contains results you don't | |
16312 | # want to keep, you may remove or edit it. | |
6e3f3080 | 16313 | # |
ba479fd2 NN |
16314 | # config.status only pays attention to the cache file if you give it |
16315 | # the --recheck option to rerun configure. | |
6e3f3080 | 16316 | # |
ba479fd2 NN |
16317 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
16318 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16319 | # following values. | |
16320 | ||
16321 | _ACEOF | |
16322 | ||
6e3f3080 NN |
16323 | # The following way of writing the cache mishandles newlines in values, |
16324 | # but we know of no workaround that is simple, portable, and efficient. | |
16325 | # So, don't put newlines in cache variables' values. | |
16326 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
16327 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
16328 | { |
16329 | (set) 2>&1 | | |
16330 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
16331 | *ac_space=\ *) | |
16332 | # `set' does not quote correctly, so add quotes (double-quote | |
16333 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
16334 | sed -n \ | |
86da66b5 HPN |
16335 | "s/'/'\\\\''/g; |
16336 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
16337 | ;; |
16338 | *) | |
16339 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
16340 | sed -n \ | |
86da66b5 | 16341 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
16342 | ;; |
16343 | esac; | |
16344 | } | | |
16345 | sed ' | |
16346 | t clear | |
16347 | : clear | |
16348 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
16349 | t end | |
16350 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
16351 | : end' >>confcache | |
16352 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 16353 | if test -w $cache_file; then |
ba479fd2 NN |
16354 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
16355 | cat confcache >$cache_file | |
6e3f3080 NN |
16356 | else |
16357 | echo "not updating unwritable cache $cache_file" | |
16358 | fi | |
16359 | fi | |
16360 | rm -f confcache | |
16361 | ||
16362 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16363 | # Let make expand exec_prefix. | |
16364 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16365 | ||
ba479fd2 NN |
16366 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
16367 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16368 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16369 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 16370 | if test "x$srcdir" = x.; then |
86da66b5 | 16371 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
16372 | s/:*\$(srcdir):*/:/; |
16373 | s/:*\${srcdir}:*/:/; | |
16374 | s/:*@srcdir@:*/:/; | |
86da66b5 | 16375 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 16376 | s/:*$//; |
86da66b5 | 16377 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 16378 | }' |
6e3f3080 NN |
16379 | fi |
16380 | ||
63cf211a | 16381 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16382 | |
ba479fd2 NN |
16383 | ac_libobjs= |
16384 | ac_ltlibobjs= | |
16385 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16386 | # 1. Remove the extension, and $U if already installed. | |
16387 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16388 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16389 | # 2. Add them. |
16390 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16391 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16392 | done | |
16393 | LIBOBJS=$ac_libobjs | |
63cf211a | 16394 | |
ba479fd2 NN |
16395 | LTLIBOBJS=$ac_ltlibobjs |
16396 | ||
16397 | ||
16398 | ||
16399 | : ${CONFIG_STATUS=./config.status} | |
16400 | ac_clean_files_save=$ac_clean_files | |
16401 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16402 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16403 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16404 | cat >$CONFIG_STATUS <<_ACEOF | |
16405 | #! $SHELL | |
16406 | # Generated by $as_me. | |
6e3f3080 NN |
16407 | # Run this file to recreate the current configuration. |
16408 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16409 | # configure, is in config.log if it exists. |
6e3f3080 | 16410 | |
ba479fd2 NN |
16411 | debug=false |
16412 | ac_cs_recheck=false | |
16413 | ac_cs_silent=false | |
16414 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16415 | _ACEOF | |
16416 | ||
16417 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16418 | ## --------------------- ## | |
16419 | ## M4sh Initialization. ## | |
16420 | ## --------------------- ## | |
16421 | ||
16422 | # Be Bourne compatible | |
16423 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16424 | emulate sh | |
16425 | NULLCMD=: | |
16426 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16427 | # is contrary to our usage. Disable this feature. | |
16428 | alias -g '${1+"$@"}'='"$@"' | |
16429 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16430 | set -o posix | |
16431 | fi | |
86da66b5 | 16432 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16433 | |
16434 | # Support unset when possible. | |
86da66b5 | 16435 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16436 | as_unset=unset |
16437 | else | |
16438 | as_unset=false | |
16439 | fi | |
16440 | ||
16441 | ||
16442 | # Work around bugs in pre-3.0 UWIN ksh. | |
16443 | $as_unset ENV MAIL MAILPATH | |
16444 | PS1='$ ' | |
16445 | PS2='> ' | |
16446 | PS4='+ ' | |
16447 | ||
16448 | # NLS nuisances. | |
16449 | for as_var in \ | |
16450 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16451 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16452 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16453 | do |
86da66b5 | 16454 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16455 | eval $as_var=C; export $as_var |
16456 | else | |
16457 | $as_unset $as_var | |
16458 | fi | |
6e3f3080 NN |
16459 | done |
16460 | ||
ba479fd2 NN |
16461 | # Required to use basename. |
16462 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16463 | as_expr=expr | |
16464 | else | |
16465 | as_expr=false | |
16466 | fi | |
6e3f3080 | 16467 | |
ba479fd2 NN |
16468 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16469 | as_basename=basename | |
16470 | else | |
16471 | as_basename=false | |
16472 | fi | |
6e3f3080 NN |
16473 | |
16474 | ||
ba479fd2 NN |
16475 | # Name of the executable. |
16476 | as_me=`$as_basename "$0" || | |
16477 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16478 | X"$0" : 'X\(//\)$' \| \ | |
16479 | X"$0" : 'X\(/\)$' \| \ | |
16480 | . : '\(.\)' 2>/dev/null || | |
16481 | echo X/"$0" | | |
16482 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16483 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16484 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16485 | s/.*/./; q'` | |
16486 | ||
6e3f3080 | 16487 | |
ba479fd2 NN |
16488 | # PATH needs CR, and LINENO needs CR and PATH. |
16489 | # Avoid depending upon Character Ranges. | |
16490 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16491 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16492 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16493 | as_cr_digits='0123456789' | |
16494 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16495 | ||
16496 | # The user is always right. | |
16497 | if test "${PATH_SEPARATOR+set}" != set; then | |
16498 | echo "#! /bin/sh" >conf$$.sh | |
16499 | echo "exit 0" >>conf$$.sh | |
16500 | chmod +x conf$$.sh | |
16501 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16502 | PATH_SEPARATOR=';' | |
6e3f3080 | 16503 | else |
ba479fd2 NN |
16504 | PATH_SEPARATOR=: |
16505 | fi | |
16506 | rm -f conf$$.sh | |
16507 | fi | |
16508 | ||
16509 | ||
16510 | as_lineno_1=$LINENO | |
16511 | as_lineno_2=$LINENO | |
16512 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16513 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16514 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16515 | # Find who we are. Look in the path if we contain no path at all | |
16516 | # relative or not. | |
16517 | case $0 in | |
16518 | *[\\/]* ) as_myself=$0 ;; | |
16519 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16520 | for as_dir in $PATH | |
16521 | do | |
16522 | IFS=$as_save_IFS | |
16523 | test -z "$as_dir" && as_dir=. | |
16524 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16525 | done | |
16526 | ||
16527 | ;; | |
16528 | esac | |
16529 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16530 | # in which case we are not to be found in the path. | |
16531 | if test "x$as_myself" = x; then | |
16532 | as_myself=$0 | |
16533 | fi | |
16534 | if test ! -f "$as_myself"; then | |
16535 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16536 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16537 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16538 | fi |
ba479fd2 NN |
16539 | case $CONFIG_SHELL in |
16540 | '') | |
16541 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16542 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16543 | do | |
16544 | IFS=$as_save_IFS | |
16545 | test -z "$as_dir" && as_dir=. | |
16546 | for as_base in sh bash ksh sh5; do | |
16547 | case $as_dir in | |
16548 | /*) | |
16549 | if ("$as_dir/$as_base" -c ' | |
16550 | as_lineno_1=$LINENO | |
16551 | as_lineno_2=$LINENO | |
16552 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16553 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16554 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16555 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16556 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16557 | CONFIG_SHELL=$as_dir/$as_base | |
16558 | export CONFIG_SHELL | |
16559 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16560 | fi;; | |
16561 | esac | |
16562 | done | |
16563 | done | |
16564 | ;; | |
16565 | esac | |
16566 | ||
16567 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16568 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16569 | # line-number line before each line; the second 'sed' does the real | |
16570 | # work. The second script uses 'N' to pair each line-number line | |
16571 | # with the numbered line, and appends trailing '-' during | |
16572 | # substitution so that $LINENO is not a special case at line end. | |
16573 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16574 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16575 | sed '=' <$as_myself | | |
16576 | sed ' | |
16577 | N | |
16578 | s,$,-, | |
16579 | : loop | |
16580 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16581 | t loop | |
16582 | s,-$,, | |
16583 | s,^['$as_cr_digits']*\n,, | |
16584 | ' >$as_me.lineno && | |
16585 | chmod +x $as_me.lineno || | |
16586 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16587 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16588 | { (exit 1); exit 1; }; } | |
16589 | ||
16590 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16591 | # (the dirname of $[0] is not the place where we might find the | |
16592 | # original and so on. Autoconf is especially sensible to this). | |
16593 | . ./$as_me.lineno | |
16594 | # Exit status is that of the last command. | |
16595 | exit | |
16596 | } | |
16597 | ||
16598 | ||
16599 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16600 | *c*,-n*) ECHO_N= ECHO_C=' | |
16601 | ' ECHO_T=' ' ;; | |
16602 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16603 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16604 | esac | |
16605 | ||
16606 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16607 | as_expr=expr | |
16608 | else | |
16609 | as_expr=false | |
16610 | fi | |
16611 | ||
16612 | rm -f conf$$ conf$$.exe conf$$.file | |
16613 | echo >conf$$.file | |
16614 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16615 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16616 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16617 | if test -f conf$$.exe; then | |
16618 | # Don't use ln at all; we don't have any links | |
16619 | as_ln_s='cp -p' | |
6e3f3080 | 16620 | else |
ba479fd2 | 16621 | as_ln_s='ln -s' |
6e3f3080 | 16622 | fi |
ba479fd2 NN |
16623 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16624 | as_ln_s=ln | |
16625 | else | |
16626 | as_ln_s='cp -p' | |
16627 | fi | |
16628 | rm -f conf$$ conf$$.exe conf$$.file | |
16629 | ||
16630 | if mkdir -p . 2>/dev/null; then | |
16631 | as_mkdir_p=: | |
16632 | else | |
86da66b5 | 16633 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16634 | as_mkdir_p=false |
16635 | fi | |
16636 | ||
16637 | as_executable_p="test -f" | |
16638 | ||
16639 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16640 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16641 | |
16642 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16643 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16644 | |
16645 | ||
16646 | # IFS | |
16647 | # We need space, tab and new line, in precisely that order. | |
16648 | as_nl=' | |
16649 | ' | |
16650 | IFS=" $as_nl" | |
16651 | ||
16652 | # CDPATH. | |
16653 | $as_unset CDPATH | |
16654 | ||
16655 | exec 6>&1 | |
16656 | ||
16657 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16658 | # report actual input values of CONFIG_FILES etc. instead of their | |
16659 | # values after options handling. Logging --version etc. is OK. | |
16660 | exec 5>>config.log | |
16661 | { | |
16662 | echo | |
16663 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16664 | ## Running $as_me. ## | |
16665 | _ASBOX | |
16666 | } >&5 | |
16667 | cat >&5 <<_CSEOF | |
16668 | ||
16669 | This file was extended by $as_me, which was | |
8ab705be | 16670 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16671 | |
16672 | CONFIG_FILES = $CONFIG_FILES | |
16673 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16674 | CONFIG_LINKS = $CONFIG_LINKS | |
16675 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16676 | $ $0 $@ | |
16677 | ||
16678 | _CSEOF | |
16679 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16680 | echo >&5 | |
16681 | _ACEOF | |
16682 | ||
16683 | # Files that config.status was made for. | |
16684 | if test -n "$ac_config_files"; then | |
16685 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16686 | fi | |
16687 | ||
16688 | if test -n "$ac_config_headers"; then | |
16689 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16690 | fi | |
16691 | ||
16692 | if test -n "$ac_config_links"; then | |
16693 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16694 | fi | |
16695 | ||
16696 | if test -n "$ac_config_commands"; then | |
16697 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16698 | fi | |
16699 | ||
16700 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16701 | ||
16702 | ac_cs_usage="\ | |
16703 | \`$as_me' instantiates files from templates according to the | |
16704 | current configuration. | |
16705 | ||
16706 | Usage: $0 [OPTIONS] [FILE]... | |
16707 | ||
16708 | -h, --help print this help, then exit | |
16709 | -V, --version print version number, then exit | |
16710 | -q, --quiet do not print progress messages | |
16711 | -d, --debug don't remove temporary files | |
16712 | --recheck update $as_me by reconfiguring in the same conditions | |
16713 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16714 | instantiate the configuration file FILE |
ba479fd2 | 16715 | --header=FILE[:TEMPLATE] |
86da66b5 | 16716 | instantiate the configuration header FILE |
ba479fd2 NN |
16717 | |
16718 | Configuration files: | |
16719 | $config_files | |
16720 | ||
16721 | Configuration headers: | |
16722 | $config_headers | |
16723 | ||
16724 | Configuration commands: | |
16725 | $config_commands | |
16726 | ||
16727 | Report bugs to <bug-autoconf@gnu.org>." | |
16728 | _ACEOF | |
16729 | ||
16730 | cat >>$CONFIG_STATUS <<_ACEOF | |
16731 | ac_cs_version="\\ | |
16732 | config.status | |
8ab705be | 16733 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16734 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16735 | ||
86da66b5 | 16736 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16737 | This config.status script is free software; the Free Software Foundation |
16738 | gives unlimited permission to copy, distribute and modify it." | |
16739 | srcdir=$srcdir | |
16740 | _ACEOF | |
16741 | ||
16742 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16743 | # If no file are specified by the user, then we need to provide default | |
16744 | # value. By we need to know if files were specified by the user. | |
16745 | ac_need_defaults=: | |
16746 | while test $# != 0 | |
16747 | do | |
16748 | case $1 in | |
16749 | --*=*) | |
16750 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16751 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16752 | ac_shift=: | |
16753 | ;; | |
16754 | -*) | |
16755 | ac_option=$1 | |
16756 | ac_optarg=$2 | |
16757 | ac_shift=shift | |
16758 | ;; | |
16759 | *) # This is not an option, so the user has probably given explicit | |
16760 | # arguments. | |
16761 | ac_option=$1 | |
16762 | ac_need_defaults=false;; | |
16763 | esac | |
16764 | ||
16765 | case $ac_option in | |
16766 | # Handling of the options. | |
16767 | _ACEOF | |
16768 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16769 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16770 | ac_cs_recheck=: ;; | |
16771 | --version | --vers* | -V ) | |
16772 | echo "$ac_cs_version"; exit 0 ;; | |
16773 | --he | --h) | |
16774 | # Conflict between --help and --header | |
16775 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16776 | Try \`$0 --help' for more information." >&5 | |
16777 | echo "$as_me: error: ambiguous option: $1 | |
16778 | Try \`$0 --help' for more information." >&2;} | |
16779 | { (exit 1); exit 1; }; };; | |
16780 | --help | --hel | -h ) | |
16781 | echo "$ac_cs_usage"; exit 0 ;; | |
16782 | --debug | --d* | -d ) | |
16783 | debug=: ;; | |
16784 | --file | --fil | --fi | --f ) | |
16785 | $ac_shift | |
16786 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16787 | ac_need_defaults=false;; | |
16788 | --header | --heade | --head | --hea ) | |
16789 | $ac_shift | |
16790 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16791 | ac_need_defaults=false;; | |
16792 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16793 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16794 | ac_cs_silent=: ;; | |
16795 | ||
16796 | # This is an error. | |
16797 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16798 | Try \`$0 --help' for more information." >&5 | |
16799 | echo "$as_me: error: unrecognized option: $1 | |
16800 | Try \`$0 --help' for more information." >&2;} | |
16801 | { (exit 1); exit 1; }; } ;; | |
16802 | ||
16803 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16804 | ||
16805 | esac | |
16806 | shift | |
6e3f3080 | 16807 | done |
ba479fd2 NN |
16808 | |
16809 | ac_configure_extra_args= | |
16810 | ||
16811 | if $ac_cs_silent; then | |
16812 | exec 6>/dev/null | |
16813 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16814 | fi |
16815 | ||
ba479fd2 NN |
16816 | _ACEOF |
16817 | cat >>$CONFIG_STATUS <<_ACEOF | |
16818 | if \$ac_cs_recheck; then | |
16819 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16820 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16821 | fi | |
861bb6c1 | 16822 | |
ba479fd2 NN |
16823 | _ACEOF |
16824 | ||
16825 | cat >>$CONFIG_STATUS <<_ACEOF | |
16826 | # | |
16827 | # INIT-COMMANDS section. | |
16828 | # | |
16829 | ||
16830 | subdirs='$subdirs' | |
ba479fd2 NN |
16831 | |
16832 | _ACEOF | |
16833 | ||
16834 | ||
16835 | ||
16836 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16837 | for ac_config_target in $ac_config_targets | |
16838 | do | |
16839 | case "$ac_config_target" in | |
16840 | # Handling of arguments. | |
16841 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16842 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16843 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16844 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16845 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16846 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16847 | esac |
ba479fd2 NN |
16848 | done |
16849 | ||
16850 | # If the user did not use the arguments to specify the items to instantiate, | |
16851 | # then the envvar interface is used. Set only those that are not. | |
16852 | # We use the long form for the default assignment because of an extremely | |
16853 | # bizarre bug on SunOS 4.1.3. | |
16854 | if $ac_need_defaults; then | |
16855 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16856 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16857 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16858 | fi | |
16859 | ||
16860 | # Have a temporary directory for convenience. Make it in the build tree | |
16861 | # simply because there is no reason to put it here, and in addition, | |
16862 | # creating and moving files from /tmp can sometimes cause problems. | |
16863 | # Create a temporary directory, and hook for its removal unless debugging. | |
16864 | $debug || | |
16865 | { | |
16866 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
16867 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
16868 | } | |
861bb6c1 | 16869 | |
ba479fd2 | 16870 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 16871 | |
ba479fd2 NN |
16872 | { |
16873 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
16874 | test -n "$tmp" && test -d "$tmp" | |
16875 | } || | |
16876 | { | |
16877 | tmp=./confstat$$-$RANDOM | |
16878 | (umask 077 && mkdir $tmp) | |
16879 | } || | |
16880 | { | |
16881 | echo "$me: cannot create a temporary directory in ." >&2 | |
16882 | { (exit 1); exit 1; } | |
16883 | } | |
16884 | ||
16885 | _ACEOF | |
16886 | ||
16887 | cat >>$CONFIG_STATUS <<_ACEOF | |
16888 | ||
16889 | # | |
16890 | # CONFIG_FILES section. | |
16891 | # | |
16892 | ||
16893 | # No need to generate the scripts if there are no CONFIG_FILES. | |
16894 | # This happens for instance when ./config.status config.h | |
16895 | if test -n "\$CONFIG_FILES"; then | |
16896 | # Protect against being on the right side of a sed subst in config.status. | |
16897 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
16898 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
16899 | s,@SHELL@,$SHELL,;t t | |
16900 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
16901 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
16902 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
16903 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
16904 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
16905 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
16906 | s,@exec_prefix@,$exec_prefix,;t t | |
16907 | s,@prefix@,$prefix,;t t | |
16908 | s,@program_transform_name@,$program_transform_name,;t t | |
16909 | s,@bindir@,$bindir,;t t | |
16910 | s,@sbindir@,$sbindir,;t t | |
16911 | s,@libexecdir@,$libexecdir,;t t | |
16912 | s,@datadir@,$datadir,;t t | |
16913 | s,@sysconfdir@,$sysconfdir,;t t | |
16914 | s,@sharedstatedir@,$sharedstatedir,;t t | |
16915 | s,@localstatedir@,$localstatedir,;t t | |
16916 | s,@libdir@,$libdir,;t t | |
16917 | s,@includedir@,$includedir,;t t | |
16918 | s,@oldincludedir@,$oldincludedir,;t t | |
16919 | s,@infodir@,$infodir,;t t | |
16920 | s,@mandir@,$mandir,;t t | |
16921 | s,@build_alias@,$build_alias,;t t | |
16922 | s,@host_alias@,$host_alias,;t t | |
16923 | s,@target_alias@,$target_alias,;t t | |
16924 | s,@DEFS@,$DEFS,;t t | |
16925 | s,@ECHO_C@,$ECHO_C,;t t | |
16926 | s,@ECHO_N@,$ECHO_N,;t t | |
16927 | s,@ECHO_T@,$ECHO_T,;t t | |
16928 | s,@LIBS@,$LIBS,;t t | |
16929 | s,@build@,$build,;t t | |
16930 | s,@build_cpu@,$build_cpu,;t t | |
16931 | s,@build_vendor@,$build_vendor,;t t | |
16932 | s,@build_os@,$build_os,;t t | |
16933 | s,@host@,$host,;t t | |
16934 | s,@host_cpu@,$host_cpu,;t t | |
16935 | s,@host_vendor@,$host_vendor,;t t | |
16936 | s,@host_os@,$host_os,;t t | |
16937 | s,@target@,$target,;t t | |
16938 | s,@target_cpu@,$target_cpu,;t t | |
16939 | s,@target_vendor@,$target_vendor,;t t | |
16940 | s,@target_os@,$target_os,;t t | |
18fc9bd4 RG |
16941 | s,@target_noncanonical@,$target_noncanonical,;t t |
16942 | s,@build_subdir@,$build_subdir,;t t | |
16943 | s,@host_subdir@,$host_subdir,;t t | |
16944 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 16945 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
16946 | s,@CC@,$CC,;t t |
16947 | s,@CFLAGS@,$CFLAGS,;t t | |
16948 | s,@LDFLAGS@,$LDFLAGS,;t t | |
16949 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
16950 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
16951 | s,@EXEEXT@,$EXEEXT,;t t | |
16952 | s,@OBJEXT@,$OBJEXT,;t t | |
16953 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
16954 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
16955 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 16956 | s,@EGREP@,$EGREP,;t t |
ba479fd2 | 16957 | s,@strict1_warn@,$strict1_warn,;t t |
373477bb | 16958 | s,@cxx_compat_warn@,$cxx_compat_warn,;t t |
ba479fd2 NN |
16959 | s,@warn_cflags@,$warn_cflags,;t t |
16960 | s,@WERROR@,$WERROR,;t t | |
16961 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 16962 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
16963 | s,@valgrind_path@,$valgrind_path,;t t |
16964 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16965 | s,@valgrind_command@,$valgrind_command,;t t | |
16966 | s,@coverage_flags@,$coverage_flags,;t t | |
16967 | s,@enable_multilib@,$enable_multilib,;t t | |
486aa804 | 16968 | s,@enable_decimal_float@,$enable_decimal_float,;t t |
ba479fd2 NN |
16969 | s,@enable_shared@,$enable_shared,;t t |
16970 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16971 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16972 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16973 | s,@onestep@,$onestep,;t t | |
9288b845 CD |
16974 | s,@datarootdir@,$datarootdir,;t t |
16975 | s,@docdir@,$docdir,;t t | |
16976 | s,@htmldir@,$htmldir,;t t | |
ba479fd2 NN |
16977 | s,@SET_MAKE@,$SET_MAKE,;t t |
16978 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16979 | s,@LN_S@,$LN_S,;t t |
18fc9bd4 | 16980 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16981 | s,@RANLIB@,$RANLIB,;t t |
16982 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 16983 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
16984 | s,@INSTALL@,$INSTALL,;t t |
16985 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
16986 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
16987 | s,@make_compare_target@,$make_compare_target,;t t | |
16988 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
16989 | s,@MAKEINFO@,$MAKEINFO,;t t | |
16990 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
16991 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
16992 | s,@FLEX@,$FLEX,;t t | |
16993 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
16994 | s,@NM@,$NM,;t t |
16995 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
16996 | s,@stage1_cflags@,$stage1_cflags,;t t |
16997 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
16998 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
16999 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
17000 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
17001 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 17002 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
17003 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
17004 | s,@manext@,$manext,;t t | |
17005 | s,@objext@,$objext,;t t | |
8bb915b6 | 17006 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 17007 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 17008 | s,@extra_opt_files@,$extra_opt_files,;t t |
18fc9bd4 RG |
17009 | s,@USE_NLS@,$USE_NLS,;t t |
17010 | s,@LIBINTL@,$LIBINTL,;t t | |
17011 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
17012 | s,@INCINTL@,$INCINTL,;t t | |
17013 | s,@XGETTEXT@,$XGETTEXT,;t t | |
17014 | s,@GMSGFMT@,$GMSGFMT,;t t | |
17015 | s,@POSUB@,$POSUB,;t t | |
17016 | s,@CATALOGS@,$CATALOGS,;t t | |
17017 | s,@DATADIRNAME@,$DATADIRNAME,;t t | |
17018 | s,@INSTOBJEXT@,$INSTOBJEXT,;t t | |
17019 | s,@GENCAT@,$GENCAT,;t t | |
17020 | s,@CATOBJEXT@,$CATOBJEXT,;t t | |
5395b47b | 17021 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
17022 | s,@CROSS@,$CROSS,;t t |
17023 | s,@ALL@,$ALL,;t t | |
17024 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
17025 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
17026 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
17027 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
17028 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
17029 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 17030 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
17031 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
17032 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
17033 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
17034 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
17035 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
17036 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
d739199a | 17037 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t |
ba479fd2 | 17038 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
17039 | s,@GGC@,$GGC,;t t |
17040 | s,@zlibdir@,$zlibdir,;t t | |
17041 | s,@zlibinc@,$zlibinc,;t t | |
17042 | s,@MAINT@,$MAINT,;t t | |
17043 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
17044 | s,@dollar@,$dollar,;t t | |
17045 | s,@slibdir@,$slibdir,;t t | |
17046 | s,@objdir@,$objdir,;t t | |
17047 | s,@subdirs@,$subdirs,;t t | |
17048 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
17049 | s,@all_boot_languages@,$all_boot_languages,;t t |
17050 | s,@all_compilers@,$all_compilers,;t t | |
17051 | s,@all_gtfiles@,$all_gtfiles,;t t | |
17052 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
17053 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
17054 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
17055 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
17056 | s,@all_languages@,$all_languages,;t t | |
cc11cc9b | 17057 | s,@all_selected_languages@,$all_selected_languages,;t t |
ba479fd2 NN |
17058 | s,@all_stagestuff@,$all_stagestuff,;t t |
17059 | s,@build_exeext@,$build_exeext,;t t | |
17060 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
17061 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
17062 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
17063 | s,@build_xm_defines@,$build_xm_defines,;t t | |
17064 | s,@check_languages@,$check_languages,;t t | |
17065 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
17066 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
17067 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
17068 | s,@xmake_file@,$xmake_file,;t t | |
17069 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 17070 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
17071 | s,@extra_headers_list@,$extra_headers_list,;t t |
17072 | s,@extra_objs@,$extra_objs,;t t | |
17073 | s,@extra_parts@,$extra_parts,;t t | |
17074 | s,@extra_passes@,$extra_passes,;t t | |
17075 | s,@extra_programs@,$extra_programs,;t t | |
17076 | s,@float_h_file@,$float_h_file,;t t | |
17077 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
17078 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
ba479fd2 | 17079 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
17080 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
17081 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
17082 | s,@host_xm_defines@,$host_xm_defines,;t t | |
17083 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
17084 | s,@install@,$install,;t t | |
17085 | s,@lang_opt_files@,$lang_opt_files,;t t | |
17086 | s,@lang_specs_files@,$lang_specs_files,;t t | |
17087 | s,@lang_tree_files@,$lang_tree_files,;t t | |
17088 | s,@local_prefix@,$local_prefix,;t t | |
17089 | s,@md_file@,$md_file,;t t | |
17090 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
17091 | s,@out_file@,$out_file,;t t | |
17092 | s,@out_object_file@,$out_object_file,;t t | |
17093 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
17094 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
17095 | s,@thread_file@,$thread_file,;t t |
17096 | s,@tm_file_list@,$tm_file_list,;t t | |
17097 | s,@tm_include_list@,$tm_include_list,;t t | |
17098 | s,@tm_defines@,$tm_defines,;t t | |
17099 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
17100 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
17101 | s,@xm_file_list@,$xm_file_list,;t t | |
17102 | s,@xm_include_list@,$xm_include_list,;t t | |
17103 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
17104 | s,@c_target_objs@,$c_target_objs,;t t |
17105 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
17106 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
17107 | s,@GMPLIBS@,$GMPLIBS,;t t |
17108 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
17109 | s,@LIBOBJS@,$LIBOBJS,;t t |
17110 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
17111 | /@language_hooks@/r $language_hooks | |
17112 | s,@language_hooks@,,;t t | |
17113 | CEOF | |
17114 | ||
17115 | _ACEOF | |
17116 | ||
17117 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17118 | # Split the substitutions into bite-sized pieces for seds with | |
17119 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
17120 | ac_max_sed_lines=48 | |
17121 | ac_sed_frag=1 # Number of current file. | |
17122 | ac_beg=1 # First line for current file. | |
17123 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
17124 | ac_more_lines=: | |
17125 | ac_sed_cmds= | |
17126 | while $ac_more_lines; do | |
17127 | if test $ac_beg -gt 1; then | |
17128 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17129 | else | |
17130 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17131 | fi | |
17132 | if test ! -s $tmp/subs.frag; then | |
17133 | ac_more_lines=false | |
17134 | else | |
17135 | # The purpose of the label and of the branching condition is to | |
17136 | # speed up the sed processing (if there are no `@' at all, there | |
17137 | # is no need to browse any of the substitutions). | |
17138 | # These are the two extra sed commands mentioned above. | |
17139 | (echo ':t | |
17140 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
17141 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 17142 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 17143 | else |
86da66b5 | 17144 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
17145 | fi |
17146 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
17147 | ac_beg=$ac_end | |
17148 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
17149 | fi | |
17150 | done | |
17151 | if test -z "$ac_sed_cmds"; then | |
17152 | ac_sed_cmds=cat | |
63cf211a | 17153 | fi |
ba479fd2 | 17154 | fi # test -n "$CONFIG_FILES" |
cafe096b | 17155 | |
ba479fd2 NN |
17156 | _ACEOF |
17157 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17158 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
17159 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
17160 | case $ac_file in | |
17161 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17162 | cat >$tmp/stdin |
17163 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17164 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17165 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17166 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17167 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 17168 | esac |
cafe096b | 17169 | |
ba479fd2 NN |
17170 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
17171 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17172 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17173 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17174 | X"$ac_file" : 'X\(//\)$' \| \ | |
17175 | X"$ac_file" : 'X\(/\)' \| \ | |
17176 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17177 | echo X"$ac_file" | |
17178 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17179 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17180 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17181 | /^X\(\/\).*/{ s//\1/; q; } | |
17182 | s/.*/./; q'` | |
17183 | { if $as_mkdir_p; then | |
17184 | mkdir -p "$ac_dir" | |
17185 | else | |
17186 | as_dir="$ac_dir" | |
17187 | as_dirs= | |
17188 | while test ! -d "$as_dir"; do | |
17189 | as_dirs="$as_dir $as_dirs" | |
17190 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17191 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17192 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17193 | X"$as_dir" : 'X\(//\)$' \| \ | |
17194 | X"$as_dir" : 'X\(/\)' \| \ | |
17195 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17196 | echo X"$as_dir" | |
17197 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17198 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17199 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17200 | /^X\(\/\).*/{ s//\1/; q; } | |
17201 | s/.*/./; q'` | |
17202 | done | |
17203 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17204 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17205 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17206 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 17207 | |
ba479fd2 NN |
17208 | ac_builddir=. |
17209 | ||
17210 | if test "$ac_dir" != .; then | |
17211 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17212 | # A "../" for each directory in $ac_dir_suffix. | |
17213 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17214 | else | |
17215 | ac_dir_suffix= ac_top_builddir= | |
17216 | fi | |
17217 | ||
17218 | case $srcdir in | |
17219 | .) # No --srcdir option. We are building in place. | |
17220 | ac_srcdir=. | |
17221 | if test -z "$ac_top_builddir"; then | |
17222 | ac_top_srcdir=. | |
17223 | else | |
17224 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17225 | fi ;; | |
17226 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17227 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17228 | ac_top_srcdir=$srcdir ;; | |
17229 | *) # Relative path. | |
17230 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17231 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17232 | esac | |
8ab705be KC |
17233 | |
17234 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17235 | # the directories may not exist. | |
17236 | case `pwd` in | |
17237 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17238 | *) |
8ab705be KC |
17239 | case "$ac_dir" in |
17240 | .) ac_abs_builddir=`pwd`;; | |
17241 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17242 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17243 | esac;; |
17244 | esac | |
8ab705be | 17245 | case $ac_abs_builddir in |
86da66b5 HPN |
17246 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17247 | *) | |
17248 | case ${ac_top_builddir}. in | |
8ab705be | 17249 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17250 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17251 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17252 | esac;; |
17253 | esac | |
8ab705be | 17254 | case $ac_abs_builddir in |
86da66b5 HPN |
17255 | .) ac_abs_srcdir=$ac_srcdir;; |
17256 | *) | |
17257 | case $ac_srcdir in | |
8ab705be | 17258 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17259 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17260 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17261 | esac;; |
17262 | esac | |
8ab705be | 17263 | case $ac_abs_builddir in |
86da66b5 HPN |
17264 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17265 | *) | |
17266 | case $ac_top_srcdir in | |
8ab705be | 17267 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17268 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17269 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17270 | esac;; |
17271 | esac | |
ba479fd2 NN |
17272 | |
17273 | ||
17274 | ||
ec6c7392 PB |
17275 | if test x"$ac_file" != x-; then |
17276 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
17277 | echo "$as_me: creating $ac_file" >&6;} | |
17278 | rm -f "$ac_file" | |
17279 | fi | |
ba479fd2 NN |
17280 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
17281 | # use $as_me), people would be surprised to read: | |
17282 | # /* config.h. Generated by config.status. */ | |
17283 | if test x"$ac_file" = x-; then | |
17284 | configure_input= | |
17285 | else | |
17286 | configure_input="$ac_file. " | |
17287 | fi | |
17288 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 17289 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
17290 | |
17291 | # First look for the input files in the build tree, otherwise in the | |
17292 | # src tree. | |
17293 | ac_file_inputs=`IFS=: | |
17294 | for f in $ac_file_in; do | |
17295 | case $f in | |
17296 | -) echo $tmp/stdin ;; | |
17297 | [\\/$]*) | |
86da66b5 HPN |
17298 | # Absolute (can't be DOS-style, as IFS=:) |
17299 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17300 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17301 | { (exit 1); exit 1; }; } | |
86da66b5 | 17302 | echo "$f";; |
ba479fd2 | 17303 | *) # Relative |
86da66b5 HPN |
17304 | if test -f "$f"; then |
17305 | # Build tree | |
17306 | echo "$f" | |
17307 | elif test -f "$srcdir/$f"; then | |
17308 | # Source tree | |
17309 | echo "$srcdir/$f" | |
17310 | else | |
17311 | # /dev/null tree | |
17312 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17313 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17314 | { (exit 1); exit 1; }; } | |
86da66b5 | 17315 | fi;; |
ba479fd2 NN |
17316 | esac |
17317 | done` || { (exit 1); exit 1; } | |
17318 | _ACEOF | |
17319 | cat >>$CONFIG_STATUS <<_ACEOF | |
17320 | sed "$ac_vpsub | |
17321 | $extrasub | |
17322 | _ACEOF | |
17323 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17324 | :t | |
17325 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
17326 | s,@configure_input@,$configure_input,;t t | |
17327 | s,@srcdir@,$ac_srcdir,;t t | |
17328 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
17329 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
17330 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
17331 | s,@builddir@,$ac_builddir,;t t | |
17332 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
17333 | s,@top_builddir@,$ac_top_builddir,;t t | |
17334 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
17335 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
17336 | rm -f $tmp/stdin | |
17337 | if test x"$ac_file" != x-; then | |
17338 | mv $tmp/out $ac_file | |
17339 | else | |
17340 | cat $tmp/out | |
17341 | rm -f $tmp/out | |
17342 | fi | |
17343 | ||
17344 | done | |
17345 | _ACEOF | |
17346 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 17347 | |
ba479fd2 NN |
17348 | # |
17349 | # CONFIG_HEADER section. | |
17350 | # | |
861bb6c1 JL |
17351 | |
17352 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
17353 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
17354 | # | |
17355 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
17356 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
17357 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
17358 | ac_dC=' ' |
17359 | ac_dD=',;t' | |
17360 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 17361 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 17362 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 17363 | ac_uC=' ' |
ba479fd2 NN |
17364 | ac_uD=',;t' |
17365 | ||
17366 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 17367 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
17368 | case $ac_file in |
17369 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17370 | cat >$tmp/stdin |
17371 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17372 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17373 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17374 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17375 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
17376 | esac |
17377 | ||
ba479fd2 NN |
17378 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
17379 | echo "$as_me: creating $ac_file" >&6;} | |
17380 | ||
17381 | # First look for the input files in the build tree, otherwise in the | |
17382 | # src tree. | |
17383 | ac_file_inputs=`IFS=: | |
17384 | for f in $ac_file_in; do | |
17385 | case $f in | |
17386 | -) echo $tmp/stdin ;; | |
17387 | [\\/$]*) | |
86da66b5 HPN |
17388 | # Absolute (can't be DOS-style, as IFS=:) |
17389 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17390 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17391 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17392 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17393 | echo "$f";; | |
ba479fd2 | 17394 | *) # Relative |
86da66b5 HPN |
17395 | if test -f "$f"; then |
17396 | # Build tree | |
17397 | echo "$f" | |
17398 | elif test -f "$srcdir/$f"; then | |
17399 | # Source tree | |
17400 | echo "$srcdir/$f" | |
17401 | else | |
17402 | # /dev/null tree | |
17403 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17404 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17405 | { (exit 1); exit 1; }; } | |
86da66b5 | 17406 | fi;; |
ba479fd2 NN |
17407 | esac |
17408 | done` || { (exit 1); exit 1; } | |
17409 | # Remove the trailing spaces. | |
86da66b5 | 17410 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17411 | |
17412 | _ACEOF | |
17413 | ||
17414 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17415 | # `conftest.undefs', that substitutes the proper values into | |
17416 | # config.h.in to produce config.h. The first handles `#define' | |
17417 | # templates, and the second `#undef' templates. | |
17418 | # And first: Protect against being on the right side of a sed subst in | |
17419 | # config.status. Protect against being in an unquoted here document | |
17420 | # in config.status. | |
17421 | rm -f conftest.defines conftest.undefs | |
17422 | # Using a here document instead of a string reduces the quoting nightmare. | |
17423 | # Putting comments in sed scripts is not portable. | |
17424 | # | |
17425 | # `end' is used to avoid that the second main sed command (meant for | |
17426 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17427 | # See the Autoconf documentation for `clear'. | |
17428 | cat >confdef2sed.sed <<\_ACEOF | |
17429 | s/[\\&,]/\\&/g | |
17430 | s,[\\$`],\\&,g | |
17431 | t clear | |
17432 | : clear | |
86da66b5 | 17433 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17434 | t end |
86da66b5 | 17435 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17436 | : end |
17437 | _ACEOF | |
17438 | # If some macros were called several times there might be several times | |
17439 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17440 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17441 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17442 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17443 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17444 | |
17445 | # This sed command replaces #undef with comments. This is necessary, for | |
17446 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17447 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17448 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17449 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17450 | _ACEOF |
17451 | ||
17452 | # Break up conftest.defines because some shells have a limit on the size | |
17453 | # of here documents, and old seds have small limits too (100 cmds). | |
17454 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17455 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17456 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17457 | echo ' :' >>$CONFIG_STATUS | |
17458 | rm -f conftest.tail | |
17459 | while grep . conftest.defines >/dev/null | |
17460 | do | |
17461 | # Write a limited-size here document to $tmp/defines.sed. | |
17462 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17463 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17464 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17465 | # Work around the forget-to-reset-the-flag bug. |
17466 | echo 't clr' >>$CONFIG_STATUS | |
17467 | echo ': clr' >>$CONFIG_STATUS | |
17468 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17469 | echo 'CEOF | |
17470 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17471 | rm -f $tmp/in | |
17472 | mv $tmp/out $tmp/in | |
17473 | ' >>$CONFIG_STATUS | |
17474 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17475 | rm -f conftest.defines | |
17476 | mv conftest.tail conftest.defines | |
17477 | done | |
17478 | rm -f conftest.defines | |
17479 | echo ' fi # grep' >>$CONFIG_STATUS | |
17480 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17481 | |
ba479fd2 NN |
17482 | # Break up conftest.undefs because some shells have a limit on the size |
17483 | # of here documents, and old seds have small limits too (100 cmds). | |
17484 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17485 | rm -f conftest.tail |
ba479fd2 | 17486 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17487 | do |
ba479fd2 NN |
17488 | # Write a limited-size here document to $tmp/undefs.sed. |
17489 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17490 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17491 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17492 | # Work around the forget-to-reset-the-flag bug. |
17493 | echo 't clr' >>$CONFIG_STATUS | |
17494 | echo ': clr' >>$CONFIG_STATUS | |
17495 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17496 | echo 'CEOF |
ba479fd2 NN |
17497 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17498 | rm -f $tmp/in | |
17499 | mv $tmp/out $tmp/in | |
17500 | ' >>$CONFIG_STATUS | |
17501 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17502 | rm -f conftest.undefs | |
17503 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17504 | done |
ba479fd2 NN |
17505 | rm -f conftest.undefs |
17506 | ||
17507 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17508 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17509 | # use $as_me), people would be surprised to read: | |
17510 | # /* config.h. Generated by config.status. */ | |
17511 | if test x"$ac_file" = x-; then | |
17512 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17513 | else |
ba479fd2 | 17514 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17515 | fi |
ba479fd2 NN |
17516 | cat $tmp/in >>$tmp/config.h |
17517 | rm -f $tmp/in | |
17518 | if test x"$ac_file" != x-; then | |
17519 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17520 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17521 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17522 | else | |
17523 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17524 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17525 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17526 | X"$ac_file" : 'X\(//\)$' \| \ | |
17527 | X"$ac_file" : 'X\(/\)' \| \ | |
17528 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17529 | echo X"$ac_file" | |
17530 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17531 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17532 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17533 | /^X\(\/\).*/{ s//\1/; q; } | |
17534 | s/.*/./; q'` | |
17535 | { if $as_mkdir_p; then | |
17536 | mkdir -p "$ac_dir" | |
17537 | else | |
17538 | as_dir="$ac_dir" | |
17539 | as_dirs= | |
17540 | while test ! -d "$as_dir"; do | |
17541 | as_dirs="$as_dir $as_dirs" | |
17542 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17543 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17544 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17545 | X"$as_dir" : 'X\(//\)$' \| \ | |
17546 | X"$as_dir" : 'X\(/\)' \| \ | |
17547 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17548 | echo X"$as_dir" | |
17549 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17550 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17551 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17552 | /^X\(\/\).*/{ s//\1/; q; } | |
17553 | s/.*/./; q'` | |
17554 | done | |
17555 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17556 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17557 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17558 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17559 | |
ba479fd2 NN |
17560 | rm -f $ac_file |
17561 | mv $tmp/config.h $ac_file | |
17562 | fi | |
17563 | else | |
17564 | cat $tmp/config.h | |
17565 | rm -f $tmp/config.h | |
17566 | fi | |
17567 | done | |
17568 | _ACEOF | |
17569 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17570 | |
ba479fd2 NN |
17571 | # |
17572 | # CONFIG_COMMANDS section. | |
17573 | # | |
17574 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17575 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17576 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17577 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17578 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17579 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17580 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17581 | X"$ac_dest" : 'X\(/\)' \| \ | |
17582 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17583 | echo X"$ac_dest" | |
17584 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17585 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17586 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17587 | /^X\(\/\).*/{ s//\1/; q; } | |
17588 | s/.*/./; q'` | |
86da66b5 HPN |
17589 | { if $as_mkdir_p; then |
17590 | mkdir -p "$ac_dir" | |
17591 | else | |
17592 | as_dir="$ac_dir" | |
17593 | as_dirs= | |
17594 | while test ! -d "$as_dir"; do | |
17595 | as_dirs="$as_dir $as_dirs" | |
17596 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17597 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17598 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17599 | X"$as_dir" : 'X\(//\)$' \| \ | |
17600 | X"$as_dir" : 'X\(/\)' \| \ | |
17601 | . : '\(.\)' 2>/dev/null || | |
17602 | echo X"$as_dir" | | |
17603 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17604 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17605 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17606 | /^X\(\/\).*/{ s//\1/; q; } | |
17607 | s/.*/./; q'` | |
17608 | done | |
17609 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17610 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17611 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17612 | { (exit 1); exit 1; }; }; } | |
17613 | ||
ba479fd2 NN |
17614 | ac_builddir=. |
17615 | ||
17616 | if test "$ac_dir" != .; then | |
17617 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17618 | # A "../" for each directory in $ac_dir_suffix. | |
17619 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17620 | else | |
17621 | ac_dir_suffix= ac_top_builddir= | |
17622 | fi | |
17623 | ||
17624 | case $srcdir in | |
17625 | .) # No --srcdir option. We are building in place. | |
17626 | ac_srcdir=. | |
17627 | if test -z "$ac_top_builddir"; then | |
17628 | ac_top_srcdir=. | |
17629 | else | |
17630 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17631 | fi ;; | |
17632 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17633 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17634 | ac_top_srcdir=$srcdir ;; | |
17635 | *) # Relative path. | |
17636 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17637 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17638 | esac | |
8ab705be KC |
17639 | |
17640 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17641 | # the directories may not exist. | |
17642 | case `pwd` in | |
17643 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17644 | *) |
8ab705be KC |
17645 | case "$ac_dir" in |
17646 | .) ac_abs_builddir=`pwd`;; | |
17647 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17648 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17649 | esac;; |
17650 | esac | |
8ab705be | 17651 | case $ac_abs_builddir in |
86da66b5 HPN |
17652 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17653 | *) | |
17654 | case ${ac_top_builddir}. in | |
8ab705be | 17655 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17656 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17657 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17658 | esac;; |
17659 | esac | |
8ab705be | 17660 | case $ac_abs_builddir in |
86da66b5 HPN |
17661 | .) ac_abs_srcdir=$ac_srcdir;; |
17662 | *) | |
17663 | case $ac_srcdir in | |
8ab705be | 17664 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17665 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17666 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17667 | esac;; |
17668 | esac | |
8ab705be | 17669 | case $ac_abs_builddir in |
86da66b5 HPN |
17670 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17671 | *) | |
17672 | case $ac_top_srcdir in | |
8ab705be | 17673 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17674 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17675 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17676 | esac;; |
17677 | esac | |
ba479fd2 NN |
17678 | |
17679 | ||
17680 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17681 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17682 | case $ac_dest in | |
17683 | default ) | |
f1faaabd NN |
17684 | case ${CONFIG_HEADERS} in |
17685 | *auto-host.h:config.in*) | |
17686 | echo > cstamp-h ;; | |
861bb6c1 | 17687 | esac |
2ed26f6b | 17688 | # Make sure all the subdirs exist. |
3b620440 | 17689 | for d in $subdirs doc build |
2ed26f6b | 17690 | do |
2ed26f6b | 17691 | test -d $d || mkdir $d |
2ed26f6b | 17692 | done |
93cf819d BK |
17693 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17694 | # bootstrapping and the installation procedure can still use | |
17695 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17696 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17697 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17698 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17699 | case "$LN_S" in |
17700 | *-s*) | |
17701 | for d in ${subdirs} ; do | |
1e6347d8 | 17702 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17703 | cd $d |
6a1b7268 | 17704 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17705 | do |
17706 | rm -f $t | |
35f06ae4 | 17707 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17708 | done |
17709 | cd $STARTDIR | |
35f06ae4 PB |
17710 | done |
17711 | ;; | |
17712 | esac | |
ba479fd2 NN |
17713 | ;; |
17714 | esac | |
17715 | done | |
17716 | _ACEOF | |
cafe096b | 17717 | |
ba479fd2 NN |
17718 | cat >>$CONFIG_STATUS <<\_ACEOF |
17719 | ||
17720 | { (exit 0); exit 0; } | |
17721 | _ACEOF | |
861bb6c1 | 17722 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17723 | ac_clean_files=$ac_clean_files_save |
17724 | ||
17725 | ||
17726 | # configure is writing to config.log, and then calls config.status. | |
17727 | # config.status does its own redirection, appending to config.log. | |
17728 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17729 | # by configure, so config.status won't be able to write to it; its | |
17730 | # output is simply discarded. So we exec the FD to /dev/null, | |
17731 | # effectively closing config.log, so it can be properly (re)opened and | |
17732 | # appended to by config.status. When coming back to configure, we | |
17733 | # need to make the FD available again. | |
17734 | if test "$no_create" != yes; then | |
17735 | ac_cs_success=: | |
17736 | ac_config_status_args= | |
17737 | test "$silent" = yes && | |
17738 | ac_config_status_args="$ac_config_status_args --quiet" | |
17739 | exec 5>/dev/null | |
17740 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17741 | exec 5>>config.log | |
17742 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17743 | # would make configure fail if this is the last instruction. | |
17744 | $ac_cs_success || { (exit 1); exit 1; } | |
17745 | fi | |
861bb6c1 | 17746 |