]>
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 | ||
1546bb64 | 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_libsubdir 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) | |
1546bb64 | 915 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
916 | --with-local-prefix=DIR specifies directory to put local include |
917 | --with-gxx-include-dir=DIR | |
918 | specifies directory to put g++ header files | |
919 | --with-cpp-install-dir=DIR | |
920 | install the user visible C preprocessor in DIR | |
921 | (relative to PREFIX) as well as PREFIX/bin | |
922 | --with-gnu-ld arrange to work with GNU ld. | |
923 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 924 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
925 | --with-gnu-as arrange to work with GNU as |
926 | --with-as arrange to use the specified as (full pathname) | |
927 | --with-stabs arrange to use stabs instead of host debug format | |
928 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
929 | --with-build-sysroot=sysroot |
930 | use sysroot as the system root during the build | |
ba479fd2 | 931 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
dfb77e37 KC |
932 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
933 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
934 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 935 | --with-system-libunwind use installed libunwind |
ed965309 | 936 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 937 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
938 | with the compiler |
939 | --with-system-zlib use installed libz | |
22482f74 MS |
940 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
941 | --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] | |
942 | --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] | |
943 | --with-htmldir=DIR html documentation in in DIR [DOCDIR] | |
13c22933 | 944 | |
ba479fd2 NN |
945 | Some influential environment variables: |
946 | CC C compiler command | |
947 | CFLAGS C compiler flags | |
948 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
949 | nonstandard directory <lib dir> | |
950 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
951 | headers in a nonstandard directory <include dir> | |
952 | CPP C preprocessor | |
6de9cd9a DN |
953 | GMPLIBS How to link GMP |
954 | GMPINC How to find GMP include files | |
13c22933 | 955 | |
ba479fd2 NN |
956 | Use these variables to override the choices made by `configure' or to help |
957 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 958 | |
ba479fd2 NN |
959 | _ACEOF |
960 | fi | |
6e3f3080 | 961 | |
ba479fd2 NN |
962 | if test "$ac_init_help" = "recursive"; then |
963 | # If there are subdirs, report their specific --help. | |
964 | ac_popdir=`pwd` | |
965 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
966 | test -d $ac_dir || continue | |
967 | ac_builddir=. | |
968 | ||
969 | if test "$ac_dir" != .; then | |
970 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
971 | # A "../" for each directory in $ac_dir_suffix. | |
972 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
973 | else | |
974 | ac_dir_suffix= ac_top_builddir= | |
975 | fi | |
976 | ||
977 | case $srcdir in | |
978 | .) # No --srcdir option. We are building in place. | |
979 | ac_srcdir=. | |
980 | if test -z "$ac_top_builddir"; then | |
981 | ac_top_srcdir=. | |
982 | else | |
983 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
984 | fi ;; | |
985 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
986 | ac_srcdir=$srcdir$ac_dir_suffix; | |
987 | ac_top_srcdir=$srcdir ;; | |
988 | *) # Relative path. | |
989 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
990 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
991 | esac | |
8ab705be KC |
992 | |
993 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
994 | # the directories may not exist. | |
995 | case `pwd` in | |
996 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 997 | *) |
8ab705be KC |
998 | case "$ac_dir" in |
999 | .) ac_abs_builddir=`pwd`;; | |
1000 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
1001 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
1002 | esac;; |
1003 | esac | |
8ab705be | 1004 | case $ac_abs_builddir in |
86da66b5 HPN |
1005 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
1006 | *) | |
1007 | case ${ac_top_builddir}. in | |
8ab705be | 1008 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 1009 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 1010 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
1011 | esac;; |
1012 | esac | |
8ab705be | 1013 | case $ac_abs_builddir in |
86da66b5 HPN |
1014 | .) ac_abs_srcdir=$ac_srcdir;; |
1015 | *) | |
1016 | case $ac_srcdir in | |
8ab705be | 1017 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 1018 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 1019 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
1020 | esac;; |
1021 | esac | |
8ab705be | 1022 | case $ac_abs_builddir in |
86da66b5 HPN |
1023 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
1024 | *) | |
1025 | case $ac_top_srcdir in | |
8ab705be | 1026 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 1027 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 1028 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
1029 | esac;; |
1030 | esac | |
ba479fd2 NN |
1031 | |
1032 | cd $ac_dir | |
1033 | # Check for guested configure; otherwise get Cygnus style configure. | |
1034 | if test -f $ac_srcdir/configure.gnu; then | |
1035 | echo | |
1036 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1037 | elif test -f $ac_srcdir/configure; then | |
1038 | echo | |
1039 | $SHELL $ac_srcdir/configure --help=recursive | |
1040 | elif test -f $ac_srcdir/configure.ac || | |
86da66b5 | 1041 | test -f $ac_srcdir/configure.in; then |
ba479fd2 NN |
1042 | echo |
1043 | $ac_configure --help | |
1044 | else | |
1045 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1046 | fi | |
ec6c7392 | 1047 | cd $ac_popdir |
ba479fd2 NN |
1048 | done |
1049 | fi | |
1050 | ||
1051 | test -n "$ac_init_help" && exit 0 | |
1052 | if $ac_init_version; then | |
1053 | cat <<\_ACEOF | |
1054 | ||
86da66b5 | 1055 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1056 | This configure script is free software; the Free Software Foundation |
1057 | gives unlimited permission to copy, distribute and modify it. | |
1058 | _ACEOF | |
1059 | exit 0 | |
1060 | fi | |
1061 | exec 5>config.log | |
1062 | cat >&5 <<_ACEOF | |
1063 | This file contains any messages produced by compilers while | |
1064 | running configure, to aid debugging if configure makes a mistake. | |
1065 | ||
1066 | It was created by $as_me, which was | |
8ab705be | 1067 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1068 | |
1069 | $ $0 $@ | |
1070 | ||
1071 | _ACEOF | |
1072 | { | |
1073 | cat <<_ASUNAME | |
1074 | ## --------- ## | |
1075 | ## Platform. ## | |
1076 | ## --------- ## | |
1077 | ||
1078 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1079 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1080 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1081 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1082 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1083 | ||
1084 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1085 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1086 | ||
1087 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1088 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1089 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1090 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1091 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1092 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1093 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1094 | ||
1095 | _ASUNAME | |
1096 | ||
1097 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1098 | for as_dir in $PATH | |
1099 | do | |
1100 | IFS=$as_save_IFS | |
1101 | test -z "$as_dir" && as_dir=. | |
1102 | echo "PATH: $as_dir" | |
1103 | done | |
1104 | ||
1105 | } >&5 | |
1106 | ||
1107 | cat >&5 <<_ACEOF | |
1108 | ||
1109 | ||
1110 | ## ----------- ## | |
1111 | ## Core tests. ## | |
1112 | ## ----------- ## | |
1113 | ||
1114 | _ACEOF | |
1115 | ||
1116 | ||
1117 | # Keep a trace of the command line. | |
1118 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1119 | # Strip out --silent because we don't want to record it for future runs. | |
1120 | # Also quote any args containing shell meta-characters. | |
1121 | # Make two passes to allow for proper duplicate-argument suppression. | |
1122 | ac_configure_args= | |
1123 | ac_configure_args0= | |
1124 | ac_configure_args1= | |
1125 | ac_sep= | |
1126 | ac_must_keep_next=false | |
1127 | for ac_pass in 1 2 | |
1128 | do | |
1129 | for ac_arg | |
1130 | do | |
1131 | case $ac_arg in | |
1132 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1133 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1134 | | -silent | --silent | --silen | --sile | --sil) | |
1135 | continue ;; | |
1136 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1137 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1138 | esac | |
1139 | case $ac_pass in | |
1140 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1141 | 2) | |
1142 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1143 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1144 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1145 | else |
86da66b5 HPN |
1146 | case $ac_arg in |
1147 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1148 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1149 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1150 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1151 | case "$ac_configure_args0 " in | |
1152 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1153 | esac | |
1154 | ;; | |
1155 | -* ) ac_must_keep_next=true ;; | |
1156 | esac | |
ba479fd2 NN |
1157 | fi |
1158 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1159 | # Get rid of the leading space. | |
1160 | ac_sep=" " | |
1161 | ;; | |
1162 | esac | |
1163 | done | |
1164 | done | |
1165 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1166 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1167 | ||
1168 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1169 | # config.log. We remove comments because anyway the quotes in there | |
1170 | # would cause problems or look ugly. | |
1171 | # WARNING: Be sure not to use single quotes in there, as some shells, | |
1172 | # such as our DU 5.0 friend, will then `close' the trap. | |
1173 | trap 'exit_status=$? | |
1174 | # Save into config.log some information that might help in debugging. | |
1175 | { | |
1176 | echo | |
1177 | ||
1178 | cat <<\_ASBOX | |
1179 | ## ---------------- ## | |
1180 | ## Cache variables. ## | |
1181 | ## ---------------- ## | |
1182 | _ASBOX | |
1183 | echo | |
1184 | # The following way of writing the cache mishandles newlines in values, | |
1185 | { | |
1186 | (set) 2>&1 | | |
1187 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1188 | *ac_space=\ *) | |
1189 | sed -n \ | |
86da66b5 HPN |
1190 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1191 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
ba479fd2 NN |
1192 | ;; |
1193 | *) | |
1194 | sed -n \ | |
86da66b5 | 1195 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
1196 | ;; |
1197 | esac; | |
1198 | } | |
1199 | echo | |
1200 | ||
1201 | cat <<\_ASBOX | |
1202 | ## ----------------- ## | |
1203 | ## Output variables. ## | |
1204 | ## ----------------- ## | |
1205 | _ASBOX | |
1206 | echo | |
1207 | for ac_var in $ac_subst_vars | |
1208 | do | |
1209 | eval ac_val=$`echo $ac_var` | |
1210 | echo "$ac_var='"'"'$ac_val'"'"'" | |
1211 | done | sort | |
1212 | echo | |
1213 | ||
1214 | if test -n "$ac_subst_files"; then | |
1215 | cat <<\_ASBOX | |
1216 | ## ------------- ## | |
1217 | ## Output files. ## | |
1218 | ## ------------- ## | |
1219 | _ASBOX | |
1220 | echo | |
1221 | for ac_var in $ac_subst_files | |
1222 | do | |
1223 | eval ac_val=$`echo $ac_var` | |
86da66b5 | 1224 | echo "$ac_var='"'"'$ac_val'"'"'" |
ba479fd2 NN |
1225 | done | sort |
1226 | echo | |
1227 | fi | |
1228 | ||
1229 | if test -s confdefs.h; then | |
1230 | cat <<\_ASBOX | |
1231 | ## ----------- ## | |
1232 | ## confdefs.h. ## | |
1233 | ## ----------- ## | |
1234 | _ASBOX | |
1235 | echo | |
1236 | sed "/^$/d" confdefs.h | sort | |
1237 | echo | |
1238 | fi | |
1239 | test "$ac_signal" != 0 && | |
1240 | echo "$as_me: caught signal $ac_signal" | |
1241 | echo "$as_me: exit $exit_status" | |
1242 | } >&5 | |
86da66b5 | 1243 | rm -f core *.core && |
ba479fd2 NN |
1244 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && |
1245 | exit $exit_status | |
1246 | ' 0 | |
1247 | for ac_signal in 1 2 13 15; do | |
1248 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1249 | done | |
1250 | ac_signal=0 | |
1251 | ||
1252 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1253 | rm -rf conftest* confdefs.h | |
1254 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1255 | echo >confdefs.h | |
1256 | ||
1257 | # Predefined preprocessor variables. | |
1258 | ||
1259 | cat >>confdefs.h <<_ACEOF | |
1260 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1261 | _ACEOF | |
1262 | ||
1263 | ||
1264 | cat >>confdefs.h <<_ACEOF | |
1265 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1266 | _ACEOF | |
1267 | ||
1268 | ||
1269 | cat >>confdefs.h <<_ACEOF | |
1270 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1271 | _ACEOF | |
1272 | ||
1273 | ||
1274 | cat >>confdefs.h <<_ACEOF | |
1275 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1276 | _ACEOF | |
1277 | ||
1278 | ||
1279 | cat >>confdefs.h <<_ACEOF | |
1280 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1281 | _ACEOF | |
1282 | ||
1283 | ||
1284 | # Let the site file select an alternate cache file if it wants to. | |
1285 | # Prefer explicitly selected file to automatically selected ones. | |
1286 | if test -z "$CONFIG_SITE"; then | |
1287 | if test "x$prefix" != xNONE; then | |
1288 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1289 | else | |
1290 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1291 | fi | |
1292 | fi | |
1293 | for ac_site_file in $CONFIG_SITE; do | |
1294 | if test -r "$ac_site_file"; then | |
1295 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1296 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1297 | sed 's/^/| /' "$ac_site_file" >&5 | |
1298 | . "$ac_site_file" | |
1299 | fi | |
1300 | done | |
1301 | ||
1302 | if test -r "$cache_file"; then | |
1303 | # Some versions of bash will fail to source /dev/null (special | |
1304 | # files actually), so we avoid doing that. | |
1305 | if test -f "$cache_file"; then | |
1306 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1307 | echo "$as_me: loading cache $cache_file" >&6;} | |
1308 | case $cache_file in | |
1309 | [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1310 | *) . ./$cache_file;; | |
1311 | esac | |
1312 | fi | |
1313 | else | |
1314 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1315 | echo "$as_me: creating cache $cache_file" >&6;} | |
1316 | >$cache_file | |
1317 | fi | |
1318 | ||
1319 | # Check that the precious variables saved in the cache have kept the same | |
1320 | # value. | |
1321 | ac_cache_corrupted=false | |
1322 | for ac_var in `(set) 2>&1 | | |
86da66b5 | 1323 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do |
ba479fd2 NN |
1324 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1325 | eval ac_new_set=\$ac_env_${ac_var}_set | |
1326 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1327 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
1328 | case $ac_old_set,$ac_new_set in | |
1329 | set,) | |
1330 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1331 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1332 | ac_cache_corrupted=: ;; | |
1333 | ,set) | |
1334 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1335 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1336 | ac_cache_corrupted=: ;; | |
1337 | ,);; | |
1338 | *) | |
1339 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1340 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1341 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1342 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1343 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1344 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1345 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1346 | ac_cache_corrupted=: |
ba479fd2 NN |
1347 | fi;; |
1348 | esac | |
1349 | # Pass precious variables to config.status. | |
1350 | if test "$ac_new_set" = set; then | |
1351 | case $ac_new_val in | |
1352 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1353 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1354 | *) ac_arg=$ac_var=$ac_new_val ;; | |
1355 | esac | |
1356 | case " $ac_configure_args " in | |
1357 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1358 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1359 | esac | |
1360 | fi | |
1361 | done | |
1362 | if $ac_cache_corrupted; then | |
1363 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1364 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1365 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1366 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1367 | { (exit 1); exit 1; }; } | |
1368 | fi | |
1369 | ||
1370 | ac_ext=c | |
1371 | ac_cpp='$CPP $CPPFLAGS' | |
1372 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1373 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1374 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1375 | ||
1376 | ||
1377 | ||
1378 | ||
1379 | ||
1380 | ||
1381 | ||
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | ||
1389 | ||
1390 | ||
1391 | ||
1392 | ||
1393 | ||
914c5af7 | 1394 | |
ba479fd2 NN |
1395 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
1396 | ||
1397 | ||
9f18db39 PB |
1398 | gcc_version=`cat $srcdir/BASE-VER` |
1399 | ||
ba479fd2 NN |
1400 | # Determine the host, build, and target systems |
1401 | ac_aux_dir= | |
1402 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
1403 | if test -f $ac_dir/install-sh; then | |
1404 | ac_aux_dir=$ac_dir | |
1405 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1406 | break | |
1407 | elif test -f $ac_dir/install.sh; then | |
1408 | ac_aux_dir=$ac_dir | |
1409 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1410 | break | |
1411 | elif test -f $ac_dir/shtool; then | |
1412 | ac_aux_dir=$ac_dir | |
1413 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1414 | break | |
1415 | fi | |
1416 | done | |
1417 | if test -z "$ac_aux_dir"; then | |
1418 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
1419 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
1420 | { (exit 1); exit 1; }; } | |
1421 | fi | |
1422 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
1423 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1424 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
1425 | ||
1426 | # Make sure we can run config.sub. | |
1427 | $ac_config_sub sun4 >/dev/null 2>&1 || | |
1428 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1429 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
1430 | { (exit 1); exit 1; }; } | |
1431 | ||
1432 | echo "$as_me:$LINENO: checking build system type" >&5 | |
1433 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
1434 | if test "${ac_cv_build+set}" = set; then | |
1435 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1436 | else | |
1437 | ac_cv_build_alias=$build_alias | |
1438 | test -z "$ac_cv_build_alias" && | |
1439 | ac_cv_build_alias=`$ac_config_guess` | |
1440 | test -z "$ac_cv_build_alias" && | |
1441 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | |
1442 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1443 | { (exit 1); exit 1; }; } | |
1444 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | |
1445 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1446 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
1447 | { (exit 1); exit 1; }; } | |
1448 | ||
1449 | fi | |
1450 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | |
1451 | echo "${ECHO_T}$ac_cv_build" >&6 | |
1452 | build=$ac_cv_build | |
1453 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1454 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1455 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1456 | ||
1457 | ||
1458 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1459 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
1460 | if test "${ac_cv_host+set}" = set; then | |
1461 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1462 | else | |
1463 | ac_cv_host_alias=$host_alias | |
1464 | test -z "$ac_cv_host_alias" && | |
1465 | ac_cv_host_alias=$ac_cv_build_alias | |
1466 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1467 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1468 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
1469 | { (exit 1); exit 1; }; } | |
1470 | ||
1471 | fi | |
1472 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | |
1473 | echo "${ECHO_T}$ac_cv_host" >&6 | |
1474 | host=$ac_cv_host | |
1475 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1476 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1477 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1478 | ||
1479 | ||
1480 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1481 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
1482 | if test "${ac_cv_target+set}" = set; then | |
1483 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1484 | else | |
1485 | ac_cv_target_alias=$target_alias | |
1486 | test "x$ac_cv_target_alias" = "x" && | |
1487 | ac_cv_target_alias=$ac_cv_host_alias | |
1488 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1489 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1490 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
1491 | { (exit 1); exit 1; }; } | |
1492 | ||
1493 | fi | |
1494 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 | |
1495 | echo "${ECHO_T}$ac_cv_target" >&6 | |
1496 | target=$ac_cv_target | |
1497 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
1498 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1499 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1500 | ||
1501 | ||
1502 | # The aliases save the names the user supplied, while $host etc. | |
1503 | # will get canonicalized. | |
1504 | test -n "$target_alias" && | |
1505 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1506 | NONENONEs,x,x, && | |
1507 | program_prefix=${target_alias}- | |
1508 | ||
1509 | # Determine the noncanonical target name, for directory use. | |
18fc9bd4 RG |
1510 | case ${build_alias} in |
1511 | "") build_noncanonical=${build} ;; | |
1512 | *) build_noncanonical=${build_alias} ;; | |
1513 | esac | |
1514 | ||
1515 | case ${host_alias} in | |
1516 | "") host_noncanonical=${build_noncanonical} ;; | |
1517 | *) host_noncanonical=${host_alias} ;; | |
1518 | esac | |
1519 | ||
1520 | case ${target_alias} in | |
1521 | "") target_noncanonical=${host_noncanonical} ;; | |
1522 | *) target_noncanonical=${target_alias} ;; | |
1523 | esac | |
1524 | ||
1525 | ||
1526 | ||
8f1529e6 L |
1527 | |
1528 | # Determine the target- and build-specific subdirectories | |
18fc9bd4 RG |
1529 | # Prefix 'build-' so this never conflicts with target_subdir. |
1530 | build_subdir="build-${build_noncanonical}" | |
1546bb64 PB |
1531 | |
1532 | # Check whether --with-build-libsubdir or --without-build-libsubdir was given. | |
1533 | if test "${with_build_libsubdir+set}" = set; then | |
1534 | withval="$with_build_libsubdir" | |
1535 | build_libsubdir="$withval" | |
1536 | else | |
1537 | build_libsubdir="$build_subdir" | |
1538 | fi; | |
18fc9bd4 RG |
1539 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1540 | if ( test $srcdir = . && test -d gcc ) \ | |
1541 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1542 | host_subdir="host-${host_noncanonical}" | |
1543 | else | |
1544 | host_subdir=. | |
1545 | fi | |
1546 | # No prefix. | |
1547 | target_subdir=${target_noncanonical} | |
1548 | ||
73458fb7 | 1549 | |
093e61a6 | 1550 | # Set program_transform_name |
13c22933 | 1551 | test "$program_prefix" != NONE && |
ba479fd2 | 1552 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1553 | # Use a double $ so make ignores it. |
1554 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1555 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1556 | # Double any \ or $. echo might interpret backslashes. | |
1557 | # By default was `s,x,x', remove it if useless. | |
1558 | cat <<\_ACEOF >conftest.sed | |
1559 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1560 | _ACEOF | |
1561 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1562 | rm conftest.sed | |
13c22933 JJ |
1563 | |
1564 | ||
34a86c2b NN |
1565 | # Check for bogus environment variables. |
1566 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1567 | # since this would lead to problems installing/building glibc. | |
1568 | # LIBRARY_PATH contains the current directory if one of the following | |
1569 | # is true: | |
1570 | # - one of the terminals (":" and ";") is the first or last sign | |
1571 | # - two terminals occur directly after each other | |
1572 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1573 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1574 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1575 | case ${LIBRARY_PATH} in |
1576 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1577 | library_path_setting="contains current directory" | |
1578 | ;; | |
1579 | *) | |
1580 | library_path_setting="ok" | |
1581 | ;; | |
1582 | esac | |
ba479fd2 NN |
1583 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1584 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1585 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1586 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1587 | *** LIBRARY_PATH shouldn't contain the current directory when |
1588 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1589 | *** and run configure again." >&5 |
1590 | echo "$as_me: error: | |
1591 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1592 | *** building gcc. Please change the environment variable | |
1593 | *** and run configure again." >&2;} | |
1594 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1595 | fi |
1596 | ||
34a86c2b NN |
1597 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1598 | # since this would lead to problems installing/building glibc. | |
1599 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1600 | # is true: | |
1601 | # - one of the terminals (":" and ";") is the first or last sign | |
1602 | # - two terminals occur directly after each other | |
1603 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1604 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1605 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1606 | case ${GCC_EXEC_PREFIX} in |
1607 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1608 | gcc_exec_prefix_setting="contains current directory" | |
1609 | ;; | |
1610 | *) | |
1611 | gcc_exec_prefix_setting="ok" | |
1612 | ;; | |
1613 | esac | |
ba479fd2 NN |
1614 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1615 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1616 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1617 | { { echo "$as_me:$LINENO: error: |
1618 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1619 | *** building gcc. Please change the environment variable | |
1620 | *** and run configure again." >&5 | |
1621 | echo "$as_me: error: | |
cafe096b EC |
1622 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1623 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1624 | *** and run configure again." >&2;} |
1625 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1626 | fi |
1627 | ||
1628 | # ----------- | |
1629 | # Directories | |
1630 | # ----------- | |
1631 | ||
1632 | # Specify the local prefix | |
1633 | local_prefix= | |
ba479fd2 | 1634 | |
34a86c2b NN |
1635 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1636 | if test "${with_local_prefix+set}" = set; then | |
1637 | withval="$with_local_prefix" | |
1638 | case "${withval}" in | |
ba479fd2 NN |
1639 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1640 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1641 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1642 | no) ;; |
1643 | *) local_prefix=$with_local_prefix ;; | |
1644 | esac | |
ba479fd2 | 1645 | fi; |
34a86c2b NN |
1646 | |
1647 | # Default local prefix if it is empty | |
1648 | if test x$local_prefix = x; then | |
1649 | local_prefix=/usr/local | |
1650 | fi | |
1651 | ||
1652 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1653 | # passed in by the toplevel make and thus we'd get different behavior | |
1654 | # depending on where we built the sources. | |
1655 | gcc_gxx_include_dir= | |
1656 | # Specify the g++ header file directory | |
ba479fd2 | 1657 | |
34a86c2b NN |
1658 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1659 | if test "${with_gxx_include_dir+set}" = set; then | |
1660 | withval="$with_gxx_include_dir" | |
1661 | case "${withval}" in | |
ba479fd2 NN |
1662 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1663 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1664 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1665 | no) ;; |
1666 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1667 | esac | |
ba479fd2 | 1668 | fi; |
34a86c2b | 1669 | |
0f57bf40 | 1670 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
1671 | if test x${gcc_gxx_include_dir} = x; then |
1672 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1673 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1674 | else | |
0f57bf40 MM |
1675 | libstdcxx_incdir='include/c++/$(version)' |
1676 | if test x$host != x$target; then | |
1677 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
1678 | fi | |
1679 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" | |
34a86c2b NN |
1680 | fi |
1681 | fi | |
1682 | ||
ba479fd2 | 1683 | |
34a86c2b NN |
1684 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1685 | if test "${with_cpp_install_dir+set}" = set; then | |
1686 | withval="$with_cpp_install_dir" | |
1687 | if test x$withval = xyes; then | |
ba479fd2 NN |
1688 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1689 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1690 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1691 | elif test x$withval != xno; then |
1692 | cpp_install_dir=$withval | |
1693 | fi | |
ba479fd2 | 1694 | fi; |
34a86c2b | 1695 | |
51b9ff45 | 1696 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1697 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1698 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1699 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1700 | # just that. |
1701 | ||
03787dfd KC |
1702 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1703 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1704 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1705 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1706 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1707 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1708 | else |
03787dfd | 1709 | generated_files_in_srcdir=no |
ba479fd2 | 1710 | fi; |
51b9ff45 | 1711 | |
03787dfd KC |
1712 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1713 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1714 | ||
1715 | if test "$generated_files_in_srcdir" = "yes"; then | |
1716 | GENINSRC='' | |
03787dfd KC |
1717 | else |
1718 | GENINSRC='#' | |
03787dfd KC |
1719 | fi |
1720 | ||
1721 | ||
34a86c2b NN |
1722 | # ------------------- |
1723 | # Find default linker | |
1724 | # ------------------- | |
1725 | ||
1726 | # With GNU ld | |
ba479fd2 | 1727 | |
34a86c2b NN |
1728 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1729 | if test "${with_gnu_ld+set}" = set; then | |
1730 | withval="$with_gnu_ld" | |
1731 | gnu_ld_flag="$with_gnu_ld" | |
1732 | else | |
1733 | gnu_ld_flag=no | |
ba479fd2 | 1734 | fi; |
6e3f3080 | 1735 | |
63cf211a | 1736 | # With pre-defined ld |
ba479fd2 | 1737 | |
34a86c2b NN |
1738 | # Check whether --with-ld or --without-ld was given. |
1739 | if test "${with_ld+set}" = set; then | |
1740 | withval="$with_ld" | |
1741 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1742 | fi; |
34a86c2b NN |
1743 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1744 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1745 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1746 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1747 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1748 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1749 | gnu_ld_flag=yes | |
1750 | fi | |
ba479fd2 NN |
1751 | |
1752 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1753 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1754 | _ACEOF |
34a86c2b NN |
1755 | |
1756 | fi | |
1757 | ||
ba479fd2 NN |
1758 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1759 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1760 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1761 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1762 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1763 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1764 | else |
ba479fd2 NN |
1765 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1766 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1767 | fi |
1768 | else | |
ba479fd2 NN |
1769 | echo "$as_me:$LINENO: result: no" >&5 |
1770 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1771 | fi |
1772 | ||
d594623a L |
1773 | # With demangler in GNU ld |
1774 | ||
1775 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1776 | if test "${with_demangler_in_ld+set}" = set; then | |
1777 | withval="$with_demangler_in_ld" | |
1778 | demangler_in_ld="$with_demangler_in_ld" | |
1779 | else | |
1780 | demangler_in_ld=no | |
1781 | fi; | |
1782 | ||
34a86c2b NN |
1783 | # ---------------------- |
1784 | # Find default assembler | |
1785 | # ---------------------- | |
1786 | ||
1787 | # With GNU as | |
ba479fd2 | 1788 | |
34a86c2b NN |
1789 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1790 | if test "${with_gnu_as+set}" = set; then | |
1791 | withval="$with_gnu_as" | |
1792 | gas_flag="$with_gnu_as" | |
1793 | else | |
1794 | gas_flag=no | |
ba479fd2 | 1795 | fi; |
34a86c2b NN |
1796 | |
1797 | ||
1798 | # Check whether --with-as or --without-as was given. | |
1799 | if test "${with_as+set}" = set; then | |
1800 | withval="$with_as" | |
1801 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1802 | fi; |
34a86c2b NN |
1803 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1804 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1805 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1806 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1807 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1808 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1809 | gas_flag=yes | |
1810 | fi | |
ba479fd2 NN |
1811 | |
1812 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1813 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1814 | _ACEOF |
34a86c2b NN |
1815 | |
1816 | fi | |
1817 | ||
ba479fd2 NN |
1818 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1819 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1820 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1821 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1822 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1823 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1824 | else |
ba479fd2 NN |
1825 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1826 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1827 | fi |
1828 | else | |
ba479fd2 NN |
1829 | echo "$as_me:$LINENO: result: no" >&5 |
1830 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1831 | fi |
1832 | ||
1833 | # --------------- | |
1834 | # Find C compiler | |
1835 | # --------------- | |
1836 | ||
426ca3ca RO |
1837 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1838 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1839 | # file, even when creating an executable, so an execution test fails. | |
1840 | # Remove possible default executable files to avoid this. | |
1841 | # | |
1842 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1843 | # Autoconf includes it. | |
1844 | rm -f a.out a.exe b.out | |
1845 | ||
34a86c2b | 1846 | # Find the native compiler |
ba479fd2 NN |
1847 | ac_ext=c |
1848 | ac_cpp='$CPP $CPPFLAGS' | |
1849 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1850 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1851 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1852 | if test -n "$ac_tool_prefix"; then | |
1853 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1854 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1855 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1856 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1857 | if test "${ac_cv_prog_CC+set}" = set; then | |
1858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1859 | else | |
1860 | if test -n "$CC"; then | |
1861 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1862 | else | |
1863 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1864 | for as_dir in $PATH | |
1865 | do | |
1866 | IFS=$as_save_IFS | |
1867 | test -z "$as_dir" && as_dir=. | |
1868 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1869 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1870 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1871 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1872 | break 2 | |
1873 | fi | |
1874 | done | |
1875 | done | |
1876 | ||
1877 | fi | |
1878 | fi | |
1879 | CC=$ac_cv_prog_CC | |
1880 | if test -n "$CC"; then | |
1881 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1882 | echo "${ECHO_T}$CC" >&6 | |
1883 | else | |
1884 | echo "$as_me:$LINENO: result: no" >&5 | |
1885 | echo "${ECHO_T}no" >&6 | |
1886 | fi | |
1887 | ||
1888 | fi | |
1889 | if test -z "$ac_cv_prog_CC"; then | |
1890 | ac_ct_CC=$CC | |
1891 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1892 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1893 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1894 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1895 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1896 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1897 | else | |
1898 | if test -n "$ac_ct_CC"; then | |
1899 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1900 | else | |
1901 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1902 | for as_dir in $PATH | |
1903 | do | |
1904 | IFS=$as_save_IFS | |
1905 | test -z "$as_dir" && as_dir=. | |
1906 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1907 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1908 | ac_cv_prog_ac_ct_CC="gcc" | |
1909 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1910 | break 2 | |
1911 | fi | |
1912 | done | |
1913 | done | |
1914 | ||
1915 | fi | |
1916 | fi | |
1917 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1918 | if test -n "$ac_ct_CC"; then | |
1919 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1920 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1921 | else | |
1922 | echo "$as_me:$LINENO: result: no" >&5 | |
1923 | echo "${ECHO_T}no" >&6 | |
1924 | fi | |
1925 | ||
1926 | CC=$ac_ct_CC | |
1927 | else | |
1928 | CC="$ac_cv_prog_CC" | |
1929 | fi | |
1930 | ||
1931 | if test -z "$CC"; then | |
1932 | if test -n "$ac_tool_prefix"; then | |
1933 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1934 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1935 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1936 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1937 | if test "${ac_cv_prog_CC+set}" = set; then | |
1938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1939 | else |
1940 | if test -n "$CC"; then | |
1941 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1942 | else | |
ba479fd2 NN |
1943 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1944 | for as_dir in $PATH | |
1945 | do | |
1946 | IFS=$as_save_IFS | |
1947 | test -z "$as_dir" && as_dir=. | |
1948 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1949 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1950 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1951 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1952 | break 2 | |
1953 | fi | |
1954 | done | |
1955 | done | |
1956 | ||
cd9e5e7c MK |
1957 | fi |
1958 | fi | |
ba479fd2 | 1959 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1960 | if test -n "$CC"; then |
ba479fd2 NN |
1961 | echo "$as_me:$LINENO: result: $CC" >&5 |
1962 | echo "${ECHO_T}$CC" >&6 | |
1963 | else | |
1964 | echo "$as_me:$LINENO: result: no" >&5 | |
1965 | echo "${ECHO_T}no" >&6 | |
1966 | fi | |
1967 | ||
1968 | fi | |
1969 | if test -z "$ac_cv_prog_CC"; then | |
1970 | ac_ct_CC=$CC | |
1971 | # Extract the first word of "cc", so it can be a program name with args. | |
1972 | set dummy cc; ac_word=$2 | |
1973 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1974 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1975 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1976 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1977 | else | |
1978 | if test -n "$ac_ct_CC"; then | |
1979 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1980 | else | |
1981 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1982 | for as_dir in $PATH | |
1983 | do | |
1984 | IFS=$as_save_IFS | |
1985 | test -z "$as_dir" && as_dir=. | |
1986 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1987 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1988 | ac_cv_prog_ac_ct_CC="cc" | |
1989 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1990 | break 2 | |
1991 | fi | |
1992 | done | |
1993 | done | |
1994 | ||
1995 | fi | |
1996 | fi | |
1997 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1998 | if test -n "$ac_ct_CC"; then | |
1999 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2000 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2001 | else | |
2002 | echo "$as_me:$LINENO: result: no" >&5 | |
2003 | echo "${ECHO_T}no" >&6 | |
2004 | fi | |
2005 | ||
2006 | CC=$ac_ct_CC | |
cd9e5e7c | 2007 | else |
ba479fd2 | 2008 | CC="$ac_cv_prog_CC" |
e9a25f70 | 2009 | fi |
6e3f3080 | 2010 | |
ba479fd2 | 2011 | fi |
6e3f3080 NN |
2012 | if test -z "$CC"; then |
2013 | # Extract the first word of "cc", so it can be a program name with args. | |
2014 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
2015 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2016 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2017 | if test "${ac_cv_prog_CC+set}" = set; then | |
2018 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2019 | else |
2020 | if test -n "$CC"; then | |
2021 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2022 | else | |
2023 | ac_prog_rejected=no | |
ba479fd2 NN |
2024 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2025 | for as_dir in $PATH | |
2026 | do | |
2027 | IFS=$as_save_IFS | |
2028 | test -z "$as_dir" && as_dir=. | |
2029 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2030 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2031 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2032 | ac_prog_rejected=yes | |
2033 | continue | |
2034 | fi | |
2035 | ac_cv_prog_CC="cc" | |
2036 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2037 | break 2 | |
2038 | fi | |
2039 | done | |
2040 | done | |
2041 | ||
6e3f3080 NN |
2042 | if test $ac_prog_rejected = yes; then |
2043 | # We found a bogon in the path, so make sure we never use it. | |
2044 | set dummy $ac_cv_prog_CC | |
2045 | shift | |
ba479fd2 | 2046 | if test $# != 0; then |
6e3f3080 NN |
2047 | # We chose a different compiler from the bogus one. |
2048 | # However, it has the same basename, so the bogon will be chosen | |
2049 | # first if we set CC to just the basename; use the full file name. | |
2050 | shift | |
ba479fd2 | 2051 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2052 | fi |
6e3f3080 NN |
2053 | fi |
2054 | fi | |
2055 | fi | |
ba479fd2 | 2056 | CC=$ac_cv_prog_CC |
6e3f3080 | 2057 | if test -n "$CC"; then |
ba479fd2 NN |
2058 | echo "$as_me:$LINENO: result: $CC" >&5 |
2059 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2060 | else |
ba479fd2 NN |
2061 | echo "$as_me:$LINENO: result: no" >&5 |
2062 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2063 | fi |
6e3f3080 | 2064 | |
ba479fd2 NN |
2065 | fi |
2066 | if test -z "$CC"; then | |
2067 | if test -n "$ac_tool_prefix"; then | |
2068 | for ac_prog in cl | |
2069 | do | |
2070 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2071 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2072 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2073 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2074 | if test "${ac_cv_prog_CC+set}" = set; then | |
2075 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2076 | else |
6e3f3080 NN |
2077 | if test -n "$CC"; then |
2078 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2079 | else | |
ba479fd2 NN |
2080 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2081 | for as_dir in $PATH | |
2082 | do | |
2083 | IFS=$as_save_IFS | |
2084 | test -z "$as_dir" && as_dir=. | |
2085 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2086 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2087 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2088 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2089 | break 2 | |
2090 | fi | |
2091 | done | |
2092 | done | |
2093 | ||
093e61a6 | 2094 | fi |
6e3f3080 | 2095 | fi |
ba479fd2 | 2096 | CC=$ac_cv_prog_CC |
6e3f3080 | 2097 | if test -n "$CC"; then |
ba479fd2 NN |
2098 | echo "$as_me:$LINENO: result: $CC" >&5 |
2099 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2100 | else |
ba479fd2 NN |
2101 | echo "$as_me:$LINENO: result: no" >&5 |
2102 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2103 | fi |
cafe096b | 2104 | |
ba479fd2 NN |
2105 | test -n "$CC" && break |
2106 | done | |
2107 | fi | |
2108 | if test -z "$CC"; then | |
2109 | ac_ct_CC=$CC | |
2110 | for ac_prog in cl | |
2111 | do | |
2112 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2113 | set dummy $ac_prog; ac_word=$2 | |
2114 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2115 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2116 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2117 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2118 | else | |
2119 | if test -n "$ac_ct_CC"; then | |
2120 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2121 | else | |
2122 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2123 | for as_dir in $PATH | |
2124 | do | |
2125 | IFS=$as_save_IFS | |
2126 | test -z "$as_dir" && as_dir=. | |
2127 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2128 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2129 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2130 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2131 | break 2 | |
2132 | fi | |
2133 | done | |
2134 | done | |
6e3f3080 | 2135 | |
ba479fd2 NN |
2136 | fi |
2137 | fi | |
2138 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2139 | if test -n "$ac_ct_CC"; then | |
2140 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2141 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2142 | else | |
2143 | echo "$as_me:$LINENO: result: no" >&5 | |
2144 | echo "${ECHO_T}no" >&6 | |
2145 | fi | |
6e3f3080 | 2146 | |
ba479fd2 NN |
2147 | test -n "$ac_ct_CC" && break |
2148 | done | |
63cf211a | 2149 | |
ba479fd2 NN |
2150 | CC=$ac_ct_CC |
2151 | fi | |
2152 | ||
2153 | fi | |
2154 | ||
2155 | ||
2156 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2157 | See \`config.log' for more details." >&5 | |
2158 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2159 | See \`config.log' for more details." >&2;} | |
2160 | { (exit 1); exit 1; }; } | |
2161 | ||
2162 | # Provide some information about the compiler. | |
2163 | echo "$as_me:$LINENO:" \ | |
2164 | "checking for C compiler version" >&5 | |
2165 | ac_compiler=`set X $ac_compile; echo $2` | |
2166 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2167 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2168 | ac_status=$? | |
2169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2170 | (exit $ac_status); } | |
2171 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2172 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2173 | ac_status=$? | |
2174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2175 | (exit $ac_status); } | |
2176 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2177 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2178 | ac_status=$? | |
2179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2180 | (exit $ac_status); } | |
2181 | ||
2182 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2183 | /* confdefs.h. */ |
2184 | _ACEOF | |
2185 | cat confdefs.h >>conftest.$ac_ext | |
2186 | cat >>conftest.$ac_ext <<_ACEOF | |
2187 | /* end confdefs.h. */ | |
2188 | ||
2189 | int | |
2190 | main () | |
2191 | { | |
63cf211a | 2192 | |
ba479fd2 NN |
2193 | ; |
2194 | return 0; | |
2195 | } | |
2196 | _ACEOF | |
2197 | ac_clean_files_save=$ac_clean_files | |
2198 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2199 | # Try to create an executable without -o first, disregard a.out. | |
2200 | # It will help us diagnose broken compilers, and finding out an intuition | |
2201 | # of exeext. | |
86da66b5 HPN |
2202 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2203 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2204 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2205 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2206 | (eval $ac_link_default) 2>&5 | |
2207 | ac_status=$? | |
2208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2209 | (exit $ac_status); }; then | |
2210 | # Find the output, starting from the most likely. This scheme is | |
2211 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2212 | # resort. | |
2213 | ||
2214 | # Be careful to initialize this variable, since it used to be cached. | |
2215 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2216 | ac_cv_exeext= | |
2217 | # b.out is created by i960 compilers. | |
2218 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2219 | do | |
2220 | test -f "$ac_file" || continue | |
2221 | case $ac_file in | |
2222 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2223 | ;; |
ba479fd2 | 2224 | conftest.$ac_ext ) |
86da66b5 HPN |
2225 | # This is the source file. |
2226 | ;; | |
ba479fd2 | 2227 | [ab].out ) |
86da66b5 HPN |
2228 | # We found the default executable, but exeext='' is most |
2229 | # certainly right. | |
2230 | break;; | |
ba479fd2 | 2231 | *.* ) |
86da66b5 HPN |
2232 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2233 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2234 | # but it would be cool to find out if it's true. Does anybody | |
2235 | # maintain Libtool? --akim. | |
2236 | export ac_cv_exeext | |
2237 | break;; | |
ba479fd2 | 2238 | * ) |
86da66b5 | 2239 | break;; |
ba479fd2 NN |
2240 | esac |
2241 | done | |
2242 | else | |
2243 | echo "$as_me: failed program was:" >&5 | |
2244 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2245 | ||
2246 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2247 | See \`config.log' for more details." >&5 | |
2248 | echo "$as_me: error: C compiler cannot create executables | |
2249 | See \`config.log' for more details." >&2;} | |
2250 | { (exit 77); exit 77; }; } | |
2251 | fi | |
2252 | ||
2253 | ac_exeext=$ac_cv_exeext | |
2254 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2255 | echo "${ECHO_T}$ac_file" >&6 | |
2256 | ||
2257 | # Check the compiler produces executables we can run. If not, either | |
2258 | # the compiler is broken, or we cross compile. | |
2259 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2260 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2261 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2262 | # If not cross compiling, check that we can run a simple program. | |
2263 | if test "$cross_compiling" != yes; then | |
2264 | if { ac_try='./$ac_file' | |
2265 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2266 | (eval $ac_try) 2>&5 | |
2267 | ac_status=$? | |
2268 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2269 | (exit $ac_status); }; }; then | |
2270 | cross_compiling=no | |
6e3f3080 | 2271 | else |
ba479fd2 NN |
2272 | if test "$cross_compiling" = maybe; then |
2273 | cross_compiling=yes | |
2274 | else | |
2275 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2276 | If you meant to cross compile, use \`--host'. | |
2277 | See \`config.log' for more details." >&5 | |
2278 | echo "$as_me: error: cannot run C compiled programs. | |
2279 | If you meant to cross compile, use \`--host'. | |
2280 | See \`config.log' for more details." >&2;} | |
2281 | { (exit 1); exit 1; }; } | |
2282 | fi | |
6e3f3080 NN |
2283 | fi |
2284 | fi | |
ba479fd2 NN |
2285 | echo "$as_me:$LINENO: result: yes" >&5 |
2286 | echo "${ECHO_T}yes" >&6 | |
2287 | ||
2288 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2289 | ac_clean_files=$ac_clean_files_save | |
2290 | # Check the compiler produces executables we can run. If not, either | |
2291 | # the compiler is broken, or we cross compile. | |
2292 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2293 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2294 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2295 | echo "${ECHO_T}$cross_compiling" >&6 | |
2296 | ||
2297 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2298 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2299 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2300 | (eval $ac_link) 2>&5 | |
2301 | ac_status=$? | |
2302 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2303 | (exit $ac_status); }; then | |
2304 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2305 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2306 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2307 | # `rm'. | |
2308 | for ac_file in conftest.exe conftest conftest.*; do | |
2309 | test -f "$ac_file" || continue | |
2310 | case $ac_file in | |
2311 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2312 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2313 | export ac_cv_exeext |
2314 | break;; | |
ba479fd2 NN |
2315 | * ) break;; |
2316 | esac | |
2317 | done | |
e9a25f70 | 2318 | else |
ba479fd2 NN |
2319 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2320 | See \`config.log' for more details." >&5 | |
2321 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2322 | See \`config.log' for more details." >&2;} | |
2323 | { (exit 1); exit 1; }; } | |
2324 | fi | |
2325 | ||
2326 | rm -f conftest$ac_cv_exeext | |
2327 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2328 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2329 | ||
2330 | rm -f conftest.$ac_ext | |
2331 | EXEEXT=$ac_cv_exeext | |
2332 | ac_exeext=$EXEEXT | |
2333 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2334 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2335 | if test "${ac_cv_objext+set}" = set; then | |
2336 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2337 | else | |
2338 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2339 | /* confdefs.h. */ |
2340 | _ACEOF | |
2341 | cat confdefs.h >>conftest.$ac_ext | |
2342 | cat >>conftest.$ac_ext <<_ACEOF | |
2343 | /* end confdefs.h. */ | |
2344 | ||
2345 | int | |
2346 | main () | |
2347 | { | |
6e3f3080 | 2348 | |
ba479fd2 NN |
2349 | ; |
2350 | return 0; | |
2351 | } | |
2352 | _ACEOF | |
2353 | rm -f conftest.o conftest.obj | |
2354 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2355 | (eval $ac_compile) 2>&5 | |
2356 | ac_status=$? | |
2357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2358 | (exit $ac_status); }; then | |
2359 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2360 | case $ac_file in | |
2361 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2362 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2363 | break;; | |
2364 | esac | |
2365 | done | |
63cf211a | 2366 | else |
ba479fd2 NN |
2367 | echo "$as_me: failed program was:" >&5 |
2368 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2369 | ||
2370 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2371 | See \`config.log' for more details." >&5 | |
2372 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2373 | See \`config.log' for more details." >&2;} | |
2374 | { (exit 1); exit 1; }; } | |
2375 | fi | |
2376 | ||
2377 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2378 | fi | |
2379 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2380 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2381 | OBJEXT=$ac_cv_objext | |
2382 | ac_objext=$OBJEXT | |
2383 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2384 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2385 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2386 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2387 | else | |
2388 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2389 | /* confdefs.h. */ |
2390 | _ACEOF | |
2391 | cat confdefs.h >>conftest.$ac_ext | |
2392 | cat >>conftest.$ac_ext <<_ACEOF | |
2393 | /* end confdefs.h. */ | |
2394 | ||
2395 | int | |
2396 | main () | |
2397 | { | |
2398 | #ifndef __GNUC__ | |
2399 | choke me | |
2400 | #endif | |
6e3f3080 | 2401 | |
ba479fd2 NN |
2402 | ; |
2403 | return 0; | |
2404 | } | |
2405 | _ACEOF | |
2406 | rm -f conftest.$ac_objext | |
2407 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2408 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2409 | ac_status=$? |
86da66b5 HPN |
2410 | grep -v '^ *+' conftest.er1 >conftest.err |
2411 | rm -f conftest.er1 | |
2412 | cat conftest.err >&5 | |
ba479fd2 NN |
2413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2414 | (exit $ac_status); } && | |
ec6c7392 PB |
2415 | { ac_try='test -z "$ac_c_werror_flag" |
2416 | || test ! -s conftest.err' | |
86da66b5 HPN |
2417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2418 | (eval $ac_try) 2>&5 | |
2419 | ac_status=$? | |
2420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2421 | (exit $ac_status); }; } && | |
2422 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2423 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2424 | (eval $ac_try) 2>&5 | |
2425 | ac_status=$? | |
2426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2427 | (exit $ac_status); }; }; then | |
2428 | ac_compiler_gnu=yes | |
2429 | else | |
2430 | echo "$as_me: failed program was:" >&5 | |
2431 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2432 | ||
2433 | ac_compiler_gnu=no | |
2434 | fi | |
86da66b5 | 2435 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2436 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2437 | ||
2438 | fi | |
2439 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2440 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2441 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2442 | ac_test_CFLAGS=${CFLAGS+set} | |
2443 | ac_save_CFLAGS=$CFLAGS | |
2444 | CFLAGS="-g" | |
2445 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2446 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2447 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2448 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2449 | else | |
2450 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2451 | /* confdefs.h. */ |
2452 | _ACEOF | |
2453 | cat confdefs.h >>conftest.$ac_ext | |
2454 | cat >>conftest.$ac_ext <<_ACEOF | |
2455 | /* end confdefs.h. */ | |
2456 | ||
2457 | int | |
2458 | main () | |
2459 | { | |
2460 | ||
2461 | ; | |
2462 | return 0; | |
2463 | } | |
2464 | _ACEOF | |
2465 | rm -f conftest.$ac_objext | |
2466 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2467 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2468 | ac_status=$? |
86da66b5 HPN |
2469 | grep -v '^ *+' conftest.er1 >conftest.err |
2470 | rm -f conftest.er1 | |
2471 | cat conftest.err >&5 | |
ba479fd2 NN |
2472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2473 | (exit $ac_status); } && | |
ec6c7392 PB |
2474 | { ac_try='test -z "$ac_c_werror_flag" |
2475 | || test ! -s conftest.err' | |
86da66b5 HPN |
2476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2477 | (eval $ac_try) 2>&5 | |
2478 | ac_status=$? | |
2479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2480 | (exit $ac_status); }; } && | |
2481 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2483 | (eval $ac_try) 2>&5 | |
2484 | ac_status=$? | |
2485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2486 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2487 | ac_cv_prog_cc_g=yes |
2488 | else | |
ba479fd2 NN |
2489 | echo "$as_me: failed program was:" >&5 |
2490 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2491 | |
ba479fd2 | 2492 | ac_cv_prog_cc_g=no |
6e3f3080 | 2493 | fi |
86da66b5 | 2494 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2495 | fi |
2496 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2497 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2498 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2499 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2500 | elif test $ac_cv_prog_cc_g = yes; then |
2501 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2502 | CFLAGS="-g -O2" |
2503 | else | |
cd9e5e7c | 2504 | CFLAGS="-g" |
81814e35 | 2505 | fi |
3723cad9 | 2506 | else |
cd9e5e7c MK |
2507 | if test "$GCC" = yes; then |
2508 | CFLAGS="-O2" | |
2509 | else | |
2510 | CFLAGS= | |
2511 | fi | |
e9a25f70 | 2512 | fi |
ba479fd2 NN |
2513 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2514 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2515 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2516 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2517 | else | |
2518 | ac_cv_prog_cc_stdc=no | |
2519 | ac_save_CC=$CC | |
2520 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2521 | /* confdefs.h. */ |
2522 | _ACEOF | |
2523 | cat confdefs.h >>conftest.$ac_ext | |
2524 | cat >>conftest.$ac_ext <<_ACEOF | |
2525 | /* end confdefs.h. */ | |
2526 | #include <stdarg.h> | |
2527 | #include <stdio.h> | |
2528 | #include <sys/types.h> | |
2529 | #include <sys/stat.h> | |
2530 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2531 | struct buf { int x; }; | |
2532 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2533 | static char *e (p, i) | |
2534 | char **p; | |
2535 | int i; | |
2536 | { | |
2537 | return p[i]; | |
2538 | } | |
2539 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2540 | { | |
2541 | char *s; | |
2542 | va_list v; | |
2543 | va_start (v,p); | |
2544 | s = g (p, va_arg (v,int)); | |
2545 | va_end (v); | |
2546 | return s; | |
2547 | } | |
86da66b5 HPN |
2548 | |
2549 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2550 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2551 | These don't provoke an error unfortunately, instead are silently treated | |
2552 | as 'x'. The following induces an error, until -std1 is added to get | |
2553 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2554 | array size at least. It's necessary to write '\x00'==0 to get something | |
2555 | that's true only with -std1. */ | |
2556 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2557 | ||
ba479fd2 NN |
2558 | int test (int i, double x); |
2559 | struct s1 {int (*f) (int a);}; | |
2560 | struct s2 {int (*f) (double a);}; | |
2561 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2562 | int argc; | |
2563 | char **argv; | |
2564 | int | |
2565 | main () | |
2566 | { | |
2567 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2568 | ; | |
2569 | return 0; | |
2570 | } | |
2571 | _ACEOF | |
2572 | # Don't try gcc -ansi; that turns off useful extensions and | |
2573 | # breaks some systems' header files. | |
2574 | # AIX -qlanglvl=ansi | |
2575 | # Ultrix and OSF/1 -std1 | |
2576 | # HP-UX 10.20 and later -Ae | |
2577 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2578 | # SVR4 -Xc -D__EXTENSIONS__ | |
2579 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2580 | do | |
2581 | CC="$ac_save_CC $ac_arg" | |
2582 | rm -f conftest.$ac_objext | |
2583 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2584 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2585 | ac_status=$? |
86da66b5 HPN |
2586 | grep -v '^ *+' conftest.er1 >conftest.err |
2587 | rm -f conftest.er1 | |
2588 | cat conftest.err >&5 | |
ba479fd2 NN |
2589 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2590 | (exit $ac_status); } && | |
ec6c7392 PB |
2591 | { ac_try='test -z "$ac_c_werror_flag" |
2592 | || test ! -s conftest.err' | |
86da66b5 HPN |
2593 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2594 | (eval $ac_try) 2>&5 | |
2595 | ac_status=$? | |
2596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2597 | (exit $ac_status); }; } && | |
2598 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2599 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2600 | (eval $ac_try) 2>&5 | |
2601 | ac_status=$? | |
2602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2603 | (exit $ac_status); }; }; then | |
2604 | ac_cv_prog_cc_stdc=$ac_arg | |
2605 | break | |
2606 | else | |
2607 | echo "$as_me: failed program was:" >&5 | |
2608 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2609 | |
ba479fd2 | 2610 | fi |
86da66b5 | 2611 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2612 | done |
2613 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2614 | CC=$ac_save_CC | |
2615 | ||
2616 | fi | |
2617 | ||
2618 | case "x$ac_cv_prog_cc_stdc" in | |
2619 | x|xno) | |
2620 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2621 | echo "${ECHO_T}none needed" >&6 ;; | |
2622 | *) | |
2623 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2624 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2625 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2626 | esac | |
2627 | ||
2628 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2629 | # in C++ we need to declare it. In case someone uses the same compiler | |
2630 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2631 | # the declaration of exit, since it's the most demanding environment. | |
2632 | cat >conftest.$ac_ext <<_ACEOF | |
2633 | #ifndef __cplusplus | |
2634 | choke me | |
2635 | #endif | |
2636 | _ACEOF | |
2637 | rm -f conftest.$ac_objext | |
2638 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2639 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2640 | ac_status=$? |
86da66b5 HPN |
2641 | grep -v '^ *+' conftest.er1 >conftest.err |
2642 | rm -f conftest.er1 | |
2643 | cat conftest.err >&5 | |
ba479fd2 NN |
2644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2645 | (exit $ac_status); } && | |
ec6c7392 PB |
2646 | { ac_try='test -z "$ac_c_werror_flag" |
2647 | || test ! -s conftest.err' | |
86da66b5 HPN |
2648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2649 | (eval $ac_try) 2>&5 | |
2650 | ac_status=$? | |
2651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2652 | (exit $ac_status); }; } && | |
2653 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2654 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2655 | (eval $ac_try) 2>&5 | |
2656 | ac_status=$? | |
2657 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2658 | (exit $ac_status); }; }; then | |
2659 | for ac_declaration in \ | |
86da66b5 | 2660 | '' \ |
ba479fd2 NN |
2661 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2662 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2663 | 'extern "C" void exit (int) throw ();' \ | |
2664 | 'extern "C" void exit (int);' \ | |
2665 | 'void exit (int);' | |
2666 | do | |
2667 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2668 | /* confdefs.h. */ |
2669 | _ACEOF | |
2670 | cat confdefs.h >>conftest.$ac_ext | |
2671 | cat >>conftest.$ac_ext <<_ACEOF | |
2672 | /* end confdefs.h. */ | |
33e70558 | 2673 | $ac_declaration |
86da66b5 | 2674 | #include <stdlib.h> |
ba479fd2 NN |
2675 | int |
2676 | main () | |
2677 | { | |
2678 | exit (42); | |
2679 | ; | |
2680 | return 0; | |
2681 | } | |
2682 | _ACEOF | |
2683 | rm -f conftest.$ac_objext | |
2684 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2685 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2686 | ac_status=$? |
86da66b5 HPN |
2687 | grep -v '^ *+' conftest.er1 >conftest.err |
2688 | rm -f conftest.er1 | |
2689 | cat conftest.err >&5 | |
ba479fd2 NN |
2690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2691 | (exit $ac_status); } && | |
ec6c7392 PB |
2692 | { ac_try='test -z "$ac_c_werror_flag" |
2693 | || test ! -s conftest.err' | |
86da66b5 HPN |
2694 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2695 | (eval $ac_try) 2>&5 | |
2696 | ac_status=$? | |
2697 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2698 | (exit $ac_status); }; } && | |
2699 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2700 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2701 | (eval $ac_try) 2>&5 | |
2702 | ac_status=$? | |
2703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2704 | (exit $ac_status); }; }; then | |
2705 | : | |
2706 | else | |
2707 | echo "$as_me: failed program was:" >&5 | |
2708 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2709 | ||
2710 | continue | |
2711 | fi | |
86da66b5 | 2712 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2713 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2714 | /* confdefs.h. */ |
2715 | _ACEOF | |
2716 | cat confdefs.h >>conftest.$ac_ext | |
2717 | cat >>conftest.$ac_ext <<_ACEOF | |
2718 | /* end confdefs.h. */ | |
2719 | $ac_declaration | |
2720 | int | |
2721 | main () | |
2722 | { | |
2723 | exit (42); | |
2724 | ; | |
2725 | return 0; | |
2726 | } | |
2727 | _ACEOF | |
2728 | rm -f conftest.$ac_objext | |
2729 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2730 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2731 | ac_status=$? |
86da66b5 HPN |
2732 | grep -v '^ *+' conftest.er1 >conftest.err |
2733 | rm -f conftest.er1 | |
2734 | cat conftest.err >&5 | |
ba479fd2 NN |
2735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2736 | (exit $ac_status); } && | |
ec6c7392 PB |
2737 | { ac_try='test -z "$ac_c_werror_flag" |
2738 | || test ! -s conftest.err' | |
86da66b5 HPN |
2739 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2740 | (eval $ac_try) 2>&5 | |
2741 | ac_status=$? | |
2742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2743 | (exit $ac_status); }; } && | |
2744 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2746 | (eval $ac_try) 2>&5 | |
2747 | ac_status=$? | |
2748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2749 | (exit $ac_status); }; }; then | |
2750 | break | |
3ec83fc2 | 2751 | else |
ba479fd2 NN |
2752 | echo "$as_me: failed program was:" >&5 |
2753 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2754 | ||
6e3f3080 | 2755 | fi |
86da66b5 | 2756 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2757 | done |
2758 | rm -f conftest* | |
2759 | if test -n "$ac_declaration"; then | |
2760 | echo '#ifdef __cplusplus' >>confdefs.h | |
2761 | echo $ac_declaration >>confdefs.h | |
2762 | echo '#endif' >>confdefs.h | |
2763 | fi | |
2764 | ||
3ec83fc2 | 2765 | else |
ba479fd2 NN |
2766 | echo "$as_me: failed program was:" >&5 |
2767 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2768 | ||
2769 | fi | |
86da66b5 | 2770 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2771 | ac_ext=c |
2772 | ac_cpp='$CPP $CPPFLAGS' | |
2773 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2774 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2775 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2776 | ||
2777 | if test "x$CC" != xcc; then | |
2778 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2779 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2780 | else | |
2781 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2782 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2783 | fi | |
2784 | set dummy $CC; ac_cc=`echo $2 | | |
2785 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2786 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2787 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2788 | else | |
2789 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2790 | /* confdefs.h. */ |
2791 | _ACEOF | |
2792 | cat confdefs.h >>conftest.$ac_ext | |
2793 | cat >>conftest.$ac_ext <<_ACEOF | |
2794 | /* end confdefs.h. */ | |
2795 | ||
2796 | int | |
2797 | main () | |
2798 | { | |
2799 | ||
2800 | ; | |
2801 | return 0; | |
2802 | } | |
2803 | _ACEOF | |
3ec83fc2 RH |
2804 | # Make sure it works both with $CC and with simple cc. |
2805 | # We do the test twice because some compilers refuse to overwrite an | |
2806 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2807 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2808 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2809 | (eval $ac_try) 2>&5 | |
2810 | ac_status=$? | |
2811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2812 | (exit $ac_status); } && | |
2813 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2814 | (eval $ac_try) 2>&5 | |
2815 | ac_status=$? | |
2816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2817 | (exit $ac_status); }; | |
3ec83fc2 RH |
2818 | then |
2819 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2820 | if test "x$CC" != xcc; then | |
2821 | # Test first that cc exists at all. | |
ba479fd2 NN |
2822 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2823 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2824 | (eval $ac_try) 2>&5 | |
2825 | ac_status=$? | |
2826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2827 | (exit $ac_status); }; }; then | |
2828 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2829 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2830 | (eval $ac_try) 2>&5 | |
2831 | ac_status=$? | |
2832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2833 | (exit $ac_status); } && | |
2834 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2835 | (eval $ac_try) 2>&5 | |
2836 | ac_status=$? | |
2837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2838 | (exit $ac_status); }; | |
3ec83fc2 | 2839 | then |
86da66b5 HPN |
2840 | # cc works too. |
2841 | : | |
3ec83fc2 | 2842 | else |
86da66b5 HPN |
2843 | # cc exists but doesn't like -o. |
2844 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2845 | fi |
2846 | fi | |
2847 | fi | |
2848 | else | |
2849 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2850 | fi | |
2851 | rm -f conftest* | |
2852 | ||
2853 | fi | |
2854 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2855 | echo "$as_me:$LINENO: result: yes" >&5 |
2856 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2857 | else |
ba479fd2 NN |
2858 | echo "$as_me:$LINENO: result: no" >&5 |
2859 | echo "${ECHO_T}no" >&6 | |
2860 | ||
2861 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2862 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2863 | _ACEOF |
3ec83fc2 RH |
2864 | |
2865 | fi | |
2866 | ||
3b620440 KC |
2867 | # expand $ac_aux_dir to an absolute path |
2868 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2869 | ||
2870 | # FIXME: we rely on the cache variable name because | |
2871 | # there is no other way. | |
2872 | set dummy $CC | |
2873 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2874 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2875 | # Losing compiler, so override with the script. | |
2876 | # FIXME: It is wrong to rewrite CC. | |
2877 | # But if we don't then we get into trouble of one sort or another. | |
2878 | # A longer-term fix would be to have automake use am__CC in this case, | |
2879 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2880 | CC="$am_aux_dir/compile $CC" | |
2881 | fi | |
2882 | ||
414d23ae HPN |
2883 | # autoconf is lame and doesn't give us any substitution variable for this. |
2884 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2885 | NO_MINUS_C_MINUS_O=yes | |
2886 | else | |
2887 | OUTPUT_OPTION='-o $@' | |
2888 | fi | |
2889 | ||
2890 | ||
2891 | ||
ec6c7392 PB |
2892 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
2893 | # optimizations to be activated explicitly by the toplevel. | |
2894 | case "$CC" in | |
2895 | */prev-gcc/xgcc*) ;; | |
2896 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
2897 | esac | |
2898 | ||
2899 | ||
73458fb7 NN |
2900 | # ------------------------- |
2901 | # Check C compiler features | |
2902 | # ------------------------- | |
2903 | ||
ba479fd2 NN |
2904 | ac_ext=c |
2905 | ac_cpp='$CPP $CPPFLAGS' | |
2906 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2907 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2908 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2909 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2910 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2911 | # On Suns, sometimes $CPP names a directory. |
2912 | if test -n "$CPP" && test -d "$CPP"; then | |
2913 | CPP= | |
2914 | fi | |
2915 | if test -z "$CPP"; then | |
ba479fd2 NN |
2916 | if test "${ac_cv_prog_CPP+set}" = set; then |
2917 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2918 | else | |
2919 | # Double quotes because CPP needs to be expanded | |
2920 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2921 | do | |
2922 | ac_preproc_ok=false | |
2923 | for ac_c_preproc_warn_flag in '' yes | |
2924 | do | |
2925 | # Use a header file that comes with gcc, so configuring glibc | |
2926 | # with a fresh cross-compiler works. | |
2927 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2928 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2929 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2930 | # not just through cpp. "Syntax error" is here to catch this case. |
2931 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2932 | /* confdefs.h. */ |
2933 | _ACEOF | |
2934 | cat confdefs.h >>conftest.$ac_ext | |
2935 | cat >>conftest.$ac_ext <<_ACEOF | |
2936 | /* end confdefs.h. */ | |
2937 | #ifdef __STDC__ | |
2938 | # include <limits.h> | |
2939 | #else | |
2940 | # include <assert.h> | |
2941 | #endif | |
86da66b5 | 2942 | Syntax error |
ba479fd2 NN |
2943 | _ACEOF |
2944 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2945 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2946 | ac_status=$? | |
2947 | grep -v '^ *+' conftest.er1 >conftest.err | |
2948 | rm -f conftest.er1 | |
2949 | cat conftest.err >&5 | |
2950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2951 | (exit $ac_status); } >/dev/null; then | |
2952 | if test -s conftest.err; then | |
2953 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2954 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2955 | else |
2956 | ac_cpp_err= | |
2957 | fi | |
2958 | else | |
2959 | ac_cpp_err=yes | |
2960 | fi | |
2961 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2962 | : |
cafe096b | 2963 | else |
ba479fd2 NN |
2964 | echo "$as_me: failed program was:" >&5 |
2965 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2966 | ||
2967 | # Broken: fails on valid input. | |
2968 | continue | |
2969 | fi | |
2970 | rm -f conftest.err conftest.$ac_ext | |
2971 | ||
2972 | # OK, works on sane cases. Now check whether non-existent headers | |
2973 | # can be detected and how. | |
2974 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2975 | /* confdefs.h. */ |
2976 | _ACEOF | |
2977 | cat confdefs.h >>conftest.$ac_ext | |
2978 | cat >>conftest.$ac_ext <<_ACEOF | |
2979 | /* end confdefs.h. */ | |
2980 | #include <ac_nonexistent.h> | |
2981 | _ACEOF | |
2982 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2983 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2984 | ac_status=$? | |
2985 | grep -v '^ *+' conftest.er1 >conftest.err | |
2986 | rm -f conftest.er1 | |
2987 | cat conftest.err >&5 | |
2988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2989 | (exit $ac_status); } >/dev/null; then | |
2990 | if test -s conftest.err; then | |
2991 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2992 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2993 | else |
2994 | ac_cpp_err= | |
2995 | fi | |
2996 | else | |
2997 | ac_cpp_err=yes | |
2998 | fi | |
2999 | if test -z "$ac_cpp_err"; then | |
3000 | # Broken: success on invalid input. | |
3001 | continue | |
3002 | else | |
3003 | echo "$as_me: failed program was:" >&5 | |
3004 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3005 | ||
3006 | # Passes both tests. | |
3007 | ac_preproc_ok=: | |
3008 | break | |
3009 | fi | |
3010 | rm -f conftest.err conftest.$ac_ext | |
3011 | ||
3012 | done | |
3013 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3014 | rm -f conftest.err conftest.$ac_ext | |
3015 | if $ac_preproc_ok; then | |
3016 | break | |
3017 | fi | |
3018 | ||
3019 | done | |
3020 | ac_cv_prog_CPP=$CPP | |
3021 | ||
3022 | fi | |
3023 | CPP=$ac_cv_prog_CPP | |
3024 | else | |
3025 | ac_cv_prog_CPP=$CPP | |
3026 | fi | |
3027 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
3028 | echo "${ECHO_T}$CPP" >&6 | |
3029 | ac_preproc_ok=false | |
3030 | for ac_c_preproc_warn_flag in '' yes | |
3031 | do | |
3032 | # Use a header file that comes with gcc, so configuring glibc | |
3033 | # with a fresh cross-compiler works. | |
3034 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3035 | # <limits.h> exists even on freestanding compilers. | |
3036 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3037 | # not just through cpp. "Syntax error" is here to catch this case. | |
3038 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3039 | /* confdefs.h. */ |
3040 | _ACEOF | |
3041 | cat confdefs.h >>conftest.$ac_ext | |
3042 | cat >>conftest.$ac_ext <<_ACEOF | |
3043 | /* end confdefs.h. */ | |
3044 | #ifdef __STDC__ | |
3045 | # include <limits.h> | |
3046 | #else | |
3047 | # include <assert.h> | |
3048 | #endif | |
86da66b5 | 3049 | Syntax error |
ba479fd2 NN |
3050 | _ACEOF |
3051 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3052 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3053 | ac_status=$? | |
3054 | grep -v '^ *+' conftest.er1 >conftest.err | |
3055 | rm -f conftest.er1 | |
3056 | cat conftest.err >&5 | |
3057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3058 | (exit $ac_status); } >/dev/null; then | |
3059 | if test -s conftest.err; then | |
3060 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3061 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3062 | else |
3063 | ac_cpp_err= | |
3064 | fi | |
3065 | else | |
3066 | ac_cpp_err=yes | |
3067 | fi | |
3068 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3069 | : |
414d23ae | 3070 | else |
ba479fd2 NN |
3071 | echo "$as_me: failed program was:" >&5 |
3072 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3073 | ||
3074 | # Broken: fails on valid input. | |
3075 | continue | |
3076 | fi | |
3077 | rm -f conftest.err conftest.$ac_ext | |
3078 | ||
3079 | # OK, works on sane cases. Now check whether non-existent headers | |
3080 | # can be detected and how. | |
3081 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3082 | /* confdefs.h. */ |
3083 | _ACEOF | |
3084 | cat confdefs.h >>conftest.$ac_ext | |
3085 | cat >>conftest.$ac_ext <<_ACEOF | |
3086 | /* end confdefs.h. */ | |
3087 | #include <ac_nonexistent.h> | |
3088 | _ACEOF | |
3089 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3090 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3091 | ac_status=$? | |
3092 | grep -v '^ *+' conftest.er1 >conftest.err | |
3093 | rm -f conftest.er1 | |
3094 | cat conftest.err >&5 | |
3095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3096 | (exit $ac_status); } >/dev/null; then | |
3097 | if test -s conftest.err; then | |
3098 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3099 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3100 | else |
3101 | ac_cpp_err= | |
3102 | fi | |
6e3f3080 | 3103 | else |
ba479fd2 | 3104 | ac_cpp_err=yes |
63cf211a | 3105 | fi |
ba479fd2 NN |
3106 | if test -z "$ac_cpp_err"; then |
3107 | # Broken: success on invalid input. | |
3108 | continue | |
3109 | else | |
3110 | echo "$as_me: failed program was:" >&5 | |
3111 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3112 | ||
3113 | # Passes both tests. | |
3114 | ac_preproc_ok=: | |
3115 | break | |
63cf211a | 3116 | fi |
ba479fd2 NN |
3117 | rm -f conftest.err conftest.$ac_ext |
3118 | ||
3119 | done | |
3120 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3121 | rm -f conftest.err conftest.$ac_ext | |
3122 | if $ac_preproc_ok; then | |
3123 | : | |
6e3f3080 | 3124 | else |
ba479fd2 NN |
3125 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3126 | See \`config.log' for more details." >&5 | |
3127 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3128 | See \`config.log' for more details." >&2;} | |
3129 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3130 | fi |
3131 | ||
ba479fd2 NN |
3132 | ac_ext=c |
3133 | ac_cpp='$CPP $CPPFLAGS' | |
3134 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3135 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3136 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3137 | ||
b5472e1d | 3138 | |
ba479fd2 NN |
3139 | echo "$as_me:$LINENO: checking for inline" >&5 |
3140 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3141 | if test "${ac_cv_c_inline+set}" = set; then | |
3142 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3143 | else |
3144 | ac_cv_c_inline=no | |
3145 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3146 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3147 | /* confdefs.h. */ |
3148 | _ACEOF | |
3149 | cat confdefs.h >>conftest.$ac_ext | |
3150 | cat >>conftest.$ac_ext <<_ACEOF | |
3151 | /* end confdefs.h. */ | |
3152 | #ifndef __cplusplus | |
3153 | typedef int foo_t; | |
3154 | static $ac_kw foo_t static_foo () {return 0; } | |
3155 | $ac_kw foo_t foo () {return 0; } | |
3156 | #endif | |
414d23ae | 3157 | |
ba479fd2 NN |
3158 | _ACEOF |
3159 | rm -f conftest.$ac_objext | |
3160 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3161 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3162 | ac_status=$? |
86da66b5 HPN |
3163 | grep -v '^ *+' conftest.er1 >conftest.err |
3164 | rm -f conftest.er1 | |
3165 | cat conftest.err >&5 | |
ba479fd2 NN |
3166 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3167 | (exit $ac_status); } && | |
ec6c7392 PB |
3168 | { ac_try='test -z "$ac_c_werror_flag" |
3169 | || test ! -s conftest.err' | |
86da66b5 HPN |
3170 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3171 | (eval $ac_try) 2>&5 | |
3172 | ac_status=$? | |
3173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3174 | (exit $ac_status); }; } && | |
3175 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3176 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3177 | (eval $ac_try) 2>&5 | |
3178 | ac_status=$? | |
3179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3180 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3181 | ac_cv_c_inline=$ac_kw; break |
3182 | else | |
ba479fd2 NN |
3183 | echo "$as_me: failed program was:" >&5 |
3184 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3185 | ||
414d23ae | 3186 | fi |
86da66b5 | 3187 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3188 | done |
3189 | ||
3190 | fi | |
ba479fd2 NN |
3191 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3192 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3193 | |
3194 | ||
ba479fd2 | 3195 | case $ac_cv_c_inline in |
414d23ae | 3196 | inline | yes) ;; |
86da66b5 HPN |
3197 | *) |
3198 | case $ac_cv_c_inline in | |
3199 | no) ac_val=;; | |
3200 | *) ac_val=$ac_cv_c_inline;; | |
3201 | esac | |
3202 | cat >>confdefs.h <<_ACEOF | |
3203 | #ifndef __cplusplus | |
3204 | #define inline $ac_val | |
3205 | #endif | |
ba479fd2 | 3206 | _ACEOF |
86da66b5 | 3207 | ;; |
414d23ae HPN |
3208 | esac |
3209 | ||
414d23ae | 3210 | |
414d23ae | 3211 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3212 | |
3213 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3214 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3215 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3217 | else | |
3218 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3219 | then ac_cv_prog_egrep='grep -E' | |
3220 | else ac_cv_prog_egrep='egrep' | |
3221 | fi | |
3222 | fi | |
3223 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3224 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3225 | EGREP=$ac_cv_prog_egrep | |
3226 | ||
3227 | ||
3228 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3229 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3230 | if test "${ac_cv_header_stdc+set}" = set; then | |
3231 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3232 | else | |
3233 | cat >conftest.$ac_ext <<_ACEOF | |
3234 | /* confdefs.h. */ | |
3235 | _ACEOF | |
3236 | cat confdefs.h >>conftest.$ac_ext | |
3237 | cat >>conftest.$ac_ext <<_ACEOF | |
3238 | /* end confdefs.h. */ | |
3239 | #include <stdlib.h> | |
3240 | #include <stdarg.h> | |
3241 | #include <string.h> | |
3242 | #include <float.h> | |
3243 | ||
3244 | int | |
3245 | main () | |
3246 | { | |
3247 | ||
3248 | ; | |
3249 | return 0; | |
3250 | } | |
3251 | _ACEOF | |
3252 | rm -f conftest.$ac_objext | |
3253 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3254 | (eval $ac_compile) 2>conftest.er1 | |
3255 | ac_status=$? | |
3256 | grep -v '^ *+' conftest.er1 >conftest.err | |
3257 | rm -f conftest.er1 | |
3258 | cat conftest.err >&5 | |
3259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3260 | (exit $ac_status); } && | |
ec6c7392 PB |
3261 | { ac_try='test -z "$ac_c_werror_flag" |
3262 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3263 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3264 | (eval $ac_try) 2>&5 | |
3265 | ac_status=$? | |
3266 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3267 | (exit $ac_status); }; } && | |
3268 | { ac_try='test -s conftest.$ac_objext' | |
3269 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3270 | (eval $ac_try) 2>&5 | |
3271 | ac_status=$? | |
3272 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3273 | (exit $ac_status); }; }; then | |
3274 | ac_cv_header_stdc=yes | |
3275 | else | |
3276 | echo "$as_me: failed program was:" >&5 | |
3277 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3278 | ||
3279 | ac_cv_header_stdc=no | |
3280 | fi | |
3281 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3282 | ||
3283 | if test $ac_cv_header_stdc = yes; then | |
3284 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3285 | cat >conftest.$ac_ext <<_ACEOF | |
3286 | /* confdefs.h. */ | |
3287 | _ACEOF | |
3288 | cat confdefs.h >>conftest.$ac_ext | |
3289 | cat >>conftest.$ac_ext <<_ACEOF | |
3290 | /* end confdefs.h. */ | |
3291 | #include <string.h> | |
3292 | ||
3293 | _ACEOF | |
3294 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3295 | $EGREP "memchr" >/dev/null 2>&1; then | |
3296 | : | |
3297 | else | |
3298 | ac_cv_header_stdc=no | |
3299 | fi | |
3300 | rm -f conftest* | |
3301 | ||
3302 | fi | |
3303 | ||
3304 | if test $ac_cv_header_stdc = yes; then | |
3305 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3306 | cat >conftest.$ac_ext <<_ACEOF | |
3307 | /* confdefs.h. */ | |
3308 | _ACEOF | |
3309 | cat confdefs.h >>conftest.$ac_ext | |
3310 | cat >>conftest.$ac_ext <<_ACEOF | |
3311 | /* end confdefs.h. */ | |
3312 | #include <stdlib.h> | |
3313 | ||
3314 | _ACEOF | |
3315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3316 | $EGREP "free" >/dev/null 2>&1; then | |
3317 | : | |
3318 | else | |
3319 | ac_cv_header_stdc=no | |
3320 | fi | |
3321 | rm -f conftest* | |
3322 | ||
3323 | fi | |
3324 | ||
3325 | if test $ac_cv_header_stdc = yes; then | |
3326 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3327 | if test "$cross_compiling" = yes; then | |
3328 | : | |
3329 | else | |
3330 | cat >conftest.$ac_ext <<_ACEOF | |
3331 | /* confdefs.h. */ | |
3332 | _ACEOF | |
3333 | cat confdefs.h >>conftest.$ac_ext | |
3334 | cat >>conftest.$ac_ext <<_ACEOF | |
3335 | /* end confdefs.h. */ | |
3336 | #include <ctype.h> | |
3337 | #if ((' ' & 0x0FF) == 0x020) | |
3338 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3339 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3340 | #else | |
3341 | # define ISLOWER(c) \ | |
3342 | (('a' <= (c) && (c) <= 'i') \ | |
3343 | || ('j' <= (c) && (c) <= 'r') \ | |
3344 | || ('s' <= (c) && (c) <= 'z')) | |
3345 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3346 | #endif | |
3347 | ||
3348 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3349 | int | |
3350 | main () | |
3351 | { | |
3352 | int i; | |
3353 | for (i = 0; i < 256; i++) | |
3354 | if (XOR (islower (i), ISLOWER (i)) | |
3355 | || toupper (i) != TOUPPER (i)) | |
3356 | exit(2); | |
3357 | exit (0); | |
3358 | } | |
3359 | _ACEOF | |
3360 | rm -f conftest$ac_exeext | |
3361 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3362 | (eval $ac_link) 2>&5 | |
3363 | ac_status=$? | |
3364 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3365 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3367 | (eval $ac_try) 2>&5 | |
3368 | ac_status=$? | |
3369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3370 | (exit $ac_status); }; }; then | |
3371 | : | |
3372 | else | |
3373 | echo "$as_me: program exited with status $ac_status" >&5 | |
3374 | echo "$as_me: failed program was:" >&5 | |
3375 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3376 | ||
3377 | ( exit $ac_status ) | |
3378 | ac_cv_header_stdc=no | |
3379 | fi | |
3380 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3381 | fi | |
3382 | fi | |
3383 | fi | |
3384 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3385 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3386 | if test $ac_cv_header_stdc = yes; then | |
3387 | ||
3388 | cat >>confdefs.h <<\_ACEOF | |
3389 | #define STDC_HEADERS 1 | |
3390 | _ACEOF | |
3391 | ||
3392 | fi | |
3393 | ||
3394 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3395 | ||
3396 | ||
3397 | ||
3398 | ||
3399 | ||
3400 | ||
3401 | ||
3402 | ||
3403 | ||
3404 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3405 | inttypes.h stdint.h unistd.h | |
3406 | do | |
3407 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3408 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3409 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3410 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3411 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3412 | else | |
3413 | cat >conftest.$ac_ext <<_ACEOF | |
3414 | /* confdefs.h. */ | |
3415 | _ACEOF | |
3416 | cat confdefs.h >>conftest.$ac_ext | |
3417 | cat >>conftest.$ac_ext <<_ACEOF | |
3418 | /* end confdefs.h. */ | |
3419 | $ac_includes_default | |
3420 | ||
3421 | #include <$ac_header> | |
3422 | _ACEOF | |
3423 | rm -f conftest.$ac_objext | |
3424 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3425 | (eval $ac_compile) 2>conftest.er1 | |
3426 | ac_status=$? | |
3427 | grep -v '^ *+' conftest.er1 >conftest.err | |
3428 | rm -f conftest.er1 | |
3429 | cat conftest.err >&5 | |
3430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3431 | (exit $ac_status); } && | |
ec6c7392 PB |
3432 | { ac_try='test -z "$ac_c_werror_flag" |
3433 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3434 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3435 | (eval $ac_try) 2>&5 | |
3436 | ac_status=$? | |
3437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3438 | (exit $ac_status); }; } && | |
3439 | { ac_try='test -s conftest.$ac_objext' | |
3440 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3441 | (eval $ac_try) 2>&5 | |
3442 | ac_status=$? | |
3443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3444 | (exit $ac_status); }; }; then | |
3445 | eval "$as_ac_Header=yes" | |
3446 | else | |
3447 | echo "$as_me: failed program was:" >&5 | |
3448 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3449 | ||
3450 | eval "$as_ac_Header=no" | |
3451 | fi | |
3452 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3453 | fi | |
3454 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3455 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3456 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3457 | cat >>confdefs.h <<_ACEOF | |
3458 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3459 | _ACEOF | |
3460 | ||
3461 | fi | |
3462 | ||
3463 | done | |
3464 | ||
3465 | ||
3466 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3467 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3468 | if test "${ac_cv_type_void_p+set}" = set; then | |
3469 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3470 | else | |
3471 | cat >conftest.$ac_ext <<_ACEOF | |
3472 | /* confdefs.h. */ | |
3473 | _ACEOF | |
3474 | cat confdefs.h >>conftest.$ac_ext | |
3475 | cat >>conftest.$ac_ext <<_ACEOF | |
3476 | /* end confdefs.h. */ | |
3477 | $ac_includes_default | |
3478 | int | |
3479 | main () | |
3480 | { | |
3481 | if ((void * *) 0) | |
3482 | return 0; | |
3483 | if (sizeof (void *)) | |
3484 | return 0; | |
3485 | ; | |
3486 | return 0; | |
3487 | } | |
3488 | _ACEOF | |
3489 | rm -f conftest.$ac_objext | |
3490 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3491 | (eval $ac_compile) 2>conftest.er1 | |
3492 | ac_status=$? | |
3493 | grep -v '^ *+' conftest.er1 >conftest.err | |
3494 | rm -f conftest.er1 | |
3495 | cat conftest.err >&5 | |
3496 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3497 | (exit $ac_status); } && | |
ec6c7392 PB |
3498 | { ac_try='test -z "$ac_c_werror_flag" |
3499 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3500 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3501 | (eval $ac_try) 2>&5 | |
3502 | ac_status=$? | |
3503 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3504 | (exit $ac_status); }; } && | |
3505 | { ac_try='test -s conftest.$ac_objext' | |
3506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3507 | (eval $ac_try) 2>&5 | |
3508 | ac_status=$? | |
3509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3510 | (exit $ac_status); }; }; then | |
3511 | ac_cv_type_void_p=yes | |
3512 | else | |
3513 | echo "$as_me: failed program was:" >&5 | |
3514 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3515 | ||
3516 | ac_cv_type_void_p=no | |
3517 | fi | |
3518 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3519 | fi | |
3520 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3521 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3522 | ||
ba479fd2 NN |
3523 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3524 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3525 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3527 | else |
bf3b7cd3 JD |
3528 | if test "$ac_cv_type_void_p" = yes; then |
3529 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3530 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3531 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3532 | # This bug is HP SR number 8606223364. | |
3533 | if test "$cross_compiling" = yes; then | |
3534 | # Depending upon the size, compute the lo and hi bounds. | |
3535 | cat >conftest.$ac_ext <<_ACEOF | |
3536 | /* confdefs.h. */ | |
3537 | _ACEOF | |
3538 | cat confdefs.h >>conftest.$ac_ext | |
3539 | cat >>conftest.$ac_ext <<_ACEOF | |
3540 | /* end confdefs.h. */ | |
3541 | $ac_includes_default | |
3542 | int | |
3543 | main () | |
3544 | { | |
3545 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3546 | test_array [0] = 0 | |
3547 | ||
3548 | ; | |
3549 | return 0; | |
3550 | } | |
3551 | _ACEOF | |
3552 | rm -f conftest.$ac_objext | |
3553 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3554 | (eval $ac_compile) 2>conftest.er1 | |
3555 | ac_status=$? | |
3556 | grep -v '^ *+' conftest.er1 >conftest.err | |
3557 | rm -f conftest.er1 | |
3558 | cat conftest.err >&5 | |
3559 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3560 | (exit $ac_status); } && | |
ec6c7392 PB |
3561 | { ac_try='test -z "$ac_c_werror_flag" |
3562 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3563 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3564 | (eval $ac_try) 2>&5 | |
3565 | ac_status=$? | |
3566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3567 | (exit $ac_status); }; } && | |
3568 | { ac_try='test -s conftest.$ac_objext' | |
3569 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3570 | (eval $ac_try) 2>&5 | |
3571 | ac_status=$? | |
3572 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3573 | (exit $ac_status); }; }; then | |
3574 | ac_lo=0 ac_mid=0 | |
3575 | while :; do | |
3576 | cat >conftest.$ac_ext <<_ACEOF | |
3577 | /* confdefs.h. */ | |
3578 | _ACEOF | |
3579 | cat confdefs.h >>conftest.$ac_ext | |
3580 | cat >>conftest.$ac_ext <<_ACEOF | |
3581 | /* end confdefs.h. */ | |
3582 | $ac_includes_default | |
3583 | int | |
3584 | main () | |
3585 | { | |
3586 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3587 | test_array [0] = 0 | |
3588 | ||
3589 | ; | |
3590 | return 0; | |
3591 | } | |
3592 | _ACEOF | |
3593 | rm -f conftest.$ac_objext | |
3594 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3595 | (eval $ac_compile) 2>conftest.er1 | |
3596 | ac_status=$? | |
3597 | grep -v '^ *+' conftest.er1 >conftest.err | |
3598 | rm -f conftest.er1 | |
3599 | cat conftest.err >&5 | |
3600 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3601 | (exit $ac_status); } && | |
ec6c7392 PB |
3602 | { ac_try='test -z "$ac_c_werror_flag" |
3603 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3604 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3605 | (eval $ac_try) 2>&5 | |
3606 | ac_status=$? | |
3607 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3608 | (exit $ac_status); }; } && | |
3609 | { ac_try='test -s conftest.$ac_objext' | |
3610 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3611 | (eval $ac_try) 2>&5 | |
3612 | ac_status=$? | |
3613 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3614 | (exit $ac_status); }; }; then | |
3615 | ac_hi=$ac_mid; break | |
3616 | else | |
3617 | echo "$as_me: failed program was:" >&5 | |
3618 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3619 | ||
3620 | ac_lo=`expr $ac_mid + 1` | |
3621 | if test $ac_lo -le $ac_mid; then | |
3622 | ac_lo= ac_hi= | |
3623 | break | |
3624 | fi | |
3625 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3626 | fi | |
3627 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3628 | done | |
3629 | else | |
3630 | echo "$as_me: failed program was:" >&5 | |
3631 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3632 | ||
3633 | cat >conftest.$ac_ext <<_ACEOF | |
3634 | /* confdefs.h. */ | |
3635 | _ACEOF | |
3636 | cat confdefs.h >>conftest.$ac_ext | |
3637 | cat >>conftest.$ac_ext <<_ACEOF | |
3638 | /* end confdefs.h. */ | |
3639 | $ac_includes_default | |
3640 | int | |
3641 | main () | |
3642 | { | |
3643 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3644 | test_array [0] = 0 | |
3645 | ||
3646 | ; | |
3647 | return 0; | |
3648 | } | |
3649 | _ACEOF | |
3650 | rm -f conftest.$ac_objext | |
3651 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3652 | (eval $ac_compile) 2>conftest.er1 | |
3653 | ac_status=$? | |
3654 | grep -v '^ *+' conftest.er1 >conftest.err | |
3655 | rm -f conftest.er1 | |
3656 | cat conftest.err >&5 | |
3657 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3658 | (exit $ac_status); } && | |
ec6c7392 PB |
3659 | { ac_try='test -z "$ac_c_werror_flag" |
3660 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3661 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3662 | (eval $ac_try) 2>&5 | |
3663 | ac_status=$? | |
3664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3665 | (exit $ac_status); }; } && | |
3666 | { ac_try='test -s conftest.$ac_objext' | |
3667 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3668 | (eval $ac_try) 2>&5 | |
3669 | ac_status=$? | |
3670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3671 | (exit $ac_status); }; }; then | |
3672 | ac_hi=-1 ac_mid=-1 | |
3673 | while :; do | |
3674 | cat >conftest.$ac_ext <<_ACEOF | |
3675 | /* confdefs.h. */ | |
3676 | _ACEOF | |
3677 | cat confdefs.h >>conftest.$ac_ext | |
3678 | cat >>conftest.$ac_ext <<_ACEOF | |
3679 | /* end confdefs.h. */ | |
3680 | $ac_includes_default | |
3681 | int | |
3682 | main () | |
3683 | { | |
3684 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3685 | test_array [0] = 0 | |
3686 | ||
3687 | ; | |
3688 | return 0; | |
3689 | } | |
3690 | _ACEOF | |
3691 | rm -f conftest.$ac_objext | |
3692 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3693 | (eval $ac_compile) 2>conftest.er1 | |
3694 | ac_status=$? | |
3695 | grep -v '^ *+' conftest.er1 >conftest.err | |
3696 | rm -f conftest.er1 | |
3697 | cat conftest.err >&5 | |
3698 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3699 | (exit $ac_status); } && | |
ec6c7392 PB |
3700 | { ac_try='test -z "$ac_c_werror_flag" |
3701 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3703 | (eval $ac_try) 2>&5 | |
3704 | ac_status=$? | |
3705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3706 | (exit $ac_status); }; } && | |
3707 | { ac_try='test -s conftest.$ac_objext' | |
3708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3709 | (eval $ac_try) 2>&5 | |
3710 | ac_status=$? | |
3711 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3712 | (exit $ac_status); }; }; then | |
3713 | ac_lo=$ac_mid; break | |
3714 | else | |
3715 | echo "$as_me: failed program was:" >&5 | |
3716 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3717 | ||
3718 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3719 | if test $ac_mid -le $ac_hi; then | |
3720 | ac_lo= ac_hi= | |
3721 | break | |
3722 | fi | |
3723 | ac_mid=`expr 2 '*' $ac_mid` | |
3724 | fi | |
3725 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3726 | done | |
3727 | else | |
3728 | echo "$as_me: failed program was:" >&5 | |
3729 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3730 | ||
3731 | ac_lo= ac_hi= | |
3732 | fi | |
3733 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3734 | fi | |
3735 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3736 | # Binary search between lo and hi bounds. | |
3737 | while test "x$ac_lo" != "x$ac_hi"; do | |
3738 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3739 | cat >conftest.$ac_ext <<_ACEOF | |
3740 | /* confdefs.h. */ | |
3741 | _ACEOF | |
3742 | cat confdefs.h >>conftest.$ac_ext | |
3743 | cat >>conftest.$ac_ext <<_ACEOF | |
3744 | /* end confdefs.h. */ | |
3745 | $ac_includes_default | |
3746 | int | |
3747 | main () | |
3748 | { | |
3749 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3750 | test_array [0] = 0 | |
3751 | ||
3752 | ; | |
3753 | return 0; | |
3754 | } | |
3755 | _ACEOF | |
3756 | rm -f conftest.$ac_objext | |
3757 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3758 | (eval $ac_compile) 2>conftest.er1 | |
3759 | ac_status=$? | |
3760 | grep -v '^ *+' conftest.er1 >conftest.err | |
3761 | rm -f conftest.er1 | |
3762 | cat conftest.err >&5 | |
3763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3764 | (exit $ac_status); } && | |
ec6c7392 PB |
3765 | { ac_try='test -z "$ac_c_werror_flag" |
3766 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3768 | (eval $ac_try) 2>&5 | |
3769 | ac_status=$? | |
3770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3771 | (exit $ac_status); }; } && | |
3772 | { ac_try='test -s conftest.$ac_objext' | |
3773 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3774 | (eval $ac_try) 2>&5 | |
3775 | ac_status=$? | |
3776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3777 | (exit $ac_status); }; }; then | |
3778 | ac_hi=$ac_mid | |
3779 | else | |
3780 | echo "$as_me: failed program was:" >&5 | |
3781 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3782 | ||
3783 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3784 | fi | |
3785 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3786 | done | |
3787 | case $ac_lo in | |
3788 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3789 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3790 | See \`config.log' for more details." >&5 | |
3791 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3792 | See \`config.log' for more details." >&2;} | |
3793 | { (exit 1); exit 1; }; } ;; | |
3794 | esac | |
3795 | else | |
3796 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
3797 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
3798 | See \`config.log' for more details." >&5 | |
3799 | echo "$as_me: error: cannot run test program while cross compiling | |
3800 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
3801 | { (exit 1); exit 1; }; } |
3802 | else | |
3803 | cat >conftest.$ac_ext <<_ACEOF | |
3804 | /* confdefs.h. */ | |
3805 | _ACEOF | |
3806 | cat confdefs.h >>conftest.$ac_ext | |
3807 | cat >>conftest.$ac_ext <<_ACEOF | |
3808 | /* end confdefs.h. */ | |
3809 | $ac_includes_default | |
3810 | long longval () { return (long) (sizeof (void *)); } | |
3811 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3812 | #include <stdio.h> | |
3813 | #include <stdlib.h> | |
3814 | int | |
3815 | main () | |
3816 | { | |
3817 | ||
3818 | FILE *f = fopen ("conftest.val", "w"); | |
3819 | if (! f) | |
3820 | exit (1); | |
3821 | if (((long) (sizeof (void *))) < 0) | |
3822 | { | |
3823 | long i = longval (); | |
3824 | if (i != ((long) (sizeof (void *)))) | |
3825 | exit (1); | |
3826 | fprintf (f, "%ld\n", i); | |
3827 | } | |
3828 | else | |
3829 | { | |
3830 | unsigned long i = ulongval (); | |
3831 | if (i != ((long) (sizeof (void *)))) | |
3832 | exit (1); | |
3833 | fprintf (f, "%lu\n", i); | |
3834 | } | |
3835 | exit (ferror (f) || fclose (f) != 0); | |
3836 | ||
3837 | ; | |
3838 | return 0; | |
3839 | } | |
3840 | _ACEOF | |
3841 | rm -f conftest$ac_exeext | |
3842 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3843 | (eval $ac_link) 2>&5 | |
3844 | ac_status=$? | |
3845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3846 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3847 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3848 | (eval $ac_try) 2>&5 | |
3849 | ac_status=$? | |
3850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3851 | (exit $ac_status); }; }; then | |
3852 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3853 | else | |
3854 | echo "$as_me: program exited with status $ac_status" >&5 | |
3855 | echo "$as_me: failed program was:" >&5 | |
3856 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3857 | ||
3858 | ( exit $ac_status ) | |
3859 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3860 | See \`config.log' for more details." >&5 | |
3861 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3862 | See \`config.log' for more details." >&2;} | |
3863 | { (exit 1); exit 1; }; } | |
3864 | fi | |
3865 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3866 | fi | |
3867 | fi | |
3868 | rm -f conftest.val | |
3869 | else | |
3870 | ac_cv_sizeof_void_p=0 | |
3871 | fi | |
3872 | fi | |
3873 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3874 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3875 | cat >>confdefs.h <<_ACEOF | |
3876 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3877 | _ACEOF | |
3878 | ||
3879 | ||
3880 | echo "$as_me:$LINENO: checking for short" >&5 | |
3881 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3882 | if test "${ac_cv_type_short+set}" = set; then | |
3883 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3884 | else | |
3885 | cat >conftest.$ac_ext <<_ACEOF | |
3886 | /* confdefs.h. */ | |
3887 | _ACEOF | |
3888 | cat confdefs.h >>conftest.$ac_ext | |
3889 | cat >>conftest.$ac_ext <<_ACEOF | |
3890 | /* end confdefs.h. */ | |
3891 | $ac_includes_default | |
3892 | int | |
3893 | main () | |
3894 | { | |
3895 | if ((short *) 0) | |
3896 | return 0; | |
3897 | if (sizeof (short)) | |
3898 | return 0; | |
3899 | ; | |
3900 | return 0; | |
3901 | } | |
3902 | _ACEOF | |
3903 | rm -f conftest.$ac_objext | |
3904 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3905 | (eval $ac_compile) 2>conftest.er1 | |
3906 | ac_status=$? | |
3907 | grep -v '^ *+' conftest.er1 >conftest.err | |
3908 | rm -f conftest.er1 | |
3909 | cat conftest.err >&5 | |
3910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3911 | (exit $ac_status); } && | |
ec6c7392 PB |
3912 | { ac_try='test -z "$ac_c_werror_flag" |
3913 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3914 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3915 | (eval $ac_try) 2>&5 | |
3916 | ac_status=$? | |
3917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3918 | (exit $ac_status); }; } && | |
3919 | { ac_try='test -s conftest.$ac_objext' | |
3920 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3921 | (eval $ac_try) 2>&5 | |
3922 | ac_status=$? | |
3923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3924 | (exit $ac_status); }; }; then | |
3925 | ac_cv_type_short=yes | |
3926 | else | |
3927 | echo "$as_me: failed program was:" >&5 | |
3928 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3929 | ||
3930 | ac_cv_type_short=no | |
3931 | fi | |
3932 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3933 | fi | |
3934 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3935 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3936 | ||
3937 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3938 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3939 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3940 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3941 | else | |
3942 | if test "$ac_cv_type_short" = yes; then | |
3943 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3944 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3945 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3946 | # This bug is HP SR number 8606223364. | |
3947 | if test "$cross_compiling" = yes; then | |
3948 | # Depending upon the size, compute the lo and hi bounds. | |
3949 | cat >conftest.$ac_ext <<_ACEOF | |
3950 | /* confdefs.h. */ | |
3951 | _ACEOF | |
3952 | cat confdefs.h >>conftest.$ac_ext | |
3953 | cat >>conftest.$ac_ext <<_ACEOF | |
3954 | /* end confdefs.h. */ | |
3955 | $ac_includes_default | |
3956 | int | |
3957 | main () | |
3958 | { | |
3959 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3960 | test_array [0] = 0 | |
3961 | ||
3962 | ; | |
3963 | return 0; | |
3964 | } | |
3965 | _ACEOF | |
3966 | rm -f conftest.$ac_objext | |
3967 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3968 | (eval $ac_compile) 2>conftest.er1 | |
3969 | ac_status=$? | |
3970 | grep -v '^ *+' conftest.er1 >conftest.err | |
3971 | rm -f conftest.er1 | |
3972 | cat conftest.err >&5 | |
3973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3974 | (exit $ac_status); } && | |
ec6c7392 PB |
3975 | { ac_try='test -z "$ac_c_werror_flag" |
3976 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3977 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3978 | (eval $ac_try) 2>&5 | |
3979 | ac_status=$? | |
3980 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3981 | (exit $ac_status); }; } && | |
3982 | { ac_try='test -s conftest.$ac_objext' | |
3983 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3984 | (eval $ac_try) 2>&5 | |
3985 | ac_status=$? | |
3986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3987 | (exit $ac_status); }; }; then | |
3988 | ac_lo=0 ac_mid=0 | |
3989 | while :; do | |
3990 | cat >conftest.$ac_ext <<_ACEOF | |
3991 | /* confdefs.h. */ | |
3992 | _ACEOF | |
3993 | cat confdefs.h >>conftest.$ac_ext | |
3994 | cat >>conftest.$ac_ext <<_ACEOF | |
3995 | /* end confdefs.h. */ | |
3996 | $ac_includes_default | |
3997 | int | |
3998 | main () | |
3999 | { | |
4000 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4001 | test_array [0] = 0 | |
4002 | ||
4003 | ; | |
4004 | return 0; | |
4005 | } | |
4006 | _ACEOF | |
4007 | rm -f conftest.$ac_objext | |
4008 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4009 | (eval $ac_compile) 2>conftest.er1 | |
4010 | ac_status=$? | |
4011 | grep -v '^ *+' conftest.er1 >conftest.err | |
4012 | rm -f conftest.er1 | |
4013 | cat conftest.err >&5 | |
4014 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4015 | (exit $ac_status); } && | |
ec6c7392 PB |
4016 | { ac_try='test -z "$ac_c_werror_flag" |
4017 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4018 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4019 | (eval $ac_try) 2>&5 | |
4020 | ac_status=$? | |
4021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4022 | (exit $ac_status); }; } && | |
4023 | { ac_try='test -s conftest.$ac_objext' | |
4024 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4025 | (eval $ac_try) 2>&5 | |
4026 | ac_status=$? | |
4027 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4028 | (exit $ac_status); }; }; then | |
4029 | ac_hi=$ac_mid; break | |
4030 | else | |
4031 | echo "$as_me: failed program was:" >&5 | |
4032 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4033 | ||
4034 | ac_lo=`expr $ac_mid + 1` | |
4035 | if test $ac_lo -le $ac_mid; then | |
4036 | ac_lo= ac_hi= | |
4037 | break | |
4038 | fi | |
4039 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4040 | fi | |
4041 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4042 | done | |
4043 | else | |
4044 | echo "$as_me: failed program was:" >&5 | |
4045 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4046 | ||
4047 | cat >conftest.$ac_ext <<_ACEOF | |
4048 | /* confdefs.h. */ | |
4049 | _ACEOF | |
4050 | cat confdefs.h >>conftest.$ac_ext | |
4051 | cat >>conftest.$ac_ext <<_ACEOF | |
4052 | /* end confdefs.h. */ | |
4053 | $ac_includes_default | |
4054 | int | |
4055 | main () | |
4056 | { | |
4057 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4058 | test_array [0] = 0 | |
4059 | ||
4060 | ; | |
4061 | return 0; | |
4062 | } | |
4063 | _ACEOF | |
4064 | rm -f conftest.$ac_objext | |
4065 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4066 | (eval $ac_compile) 2>conftest.er1 | |
4067 | ac_status=$? | |
4068 | grep -v '^ *+' conftest.er1 >conftest.err | |
4069 | rm -f conftest.er1 | |
4070 | cat conftest.err >&5 | |
4071 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4072 | (exit $ac_status); } && | |
ec6c7392 PB |
4073 | { ac_try='test -z "$ac_c_werror_flag" |
4074 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4075 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4076 | (eval $ac_try) 2>&5 | |
4077 | ac_status=$? | |
4078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4079 | (exit $ac_status); }; } && | |
4080 | { ac_try='test -s conftest.$ac_objext' | |
4081 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4082 | (eval $ac_try) 2>&5 | |
4083 | ac_status=$? | |
4084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4085 | (exit $ac_status); }; }; then | |
4086 | ac_hi=-1 ac_mid=-1 | |
4087 | while :; do | |
4088 | cat >conftest.$ac_ext <<_ACEOF | |
4089 | /* confdefs.h. */ | |
4090 | _ACEOF | |
4091 | cat confdefs.h >>conftest.$ac_ext | |
4092 | cat >>conftest.$ac_ext <<_ACEOF | |
4093 | /* end confdefs.h. */ | |
4094 | $ac_includes_default | |
4095 | int | |
4096 | main () | |
4097 | { | |
4098 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4099 | test_array [0] = 0 | |
4100 | ||
4101 | ; | |
4102 | return 0; | |
4103 | } | |
4104 | _ACEOF | |
4105 | rm -f conftest.$ac_objext | |
4106 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4107 | (eval $ac_compile) 2>conftest.er1 | |
4108 | ac_status=$? | |
4109 | grep -v '^ *+' conftest.er1 >conftest.err | |
4110 | rm -f conftest.er1 | |
4111 | cat conftest.err >&5 | |
4112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4113 | (exit $ac_status); } && | |
ec6c7392 PB |
4114 | { ac_try='test -z "$ac_c_werror_flag" |
4115 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4117 | (eval $ac_try) 2>&5 | |
4118 | ac_status=$? | |
4119 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4120 | (exit $ac_status); }; } && | |
4121 | { ac_try='test -s conftest.$ac_objext' | |
4122 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4123 | (eval $ac_try) 2>&5 | |
4124 | ac_status=$? | |
4125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4126 | (exit $ac_status); }; }; then | |
4127 | ac_lo=$ac_mid; break | |
4128 | else | |
4129 | echo "$as_me: failed program was:" >&5 | |
4130 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4131 | ||
4132 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4133 | if test $ac_mid -le $ac_hi; then | |
4134 | ac_lo= ac_hi= | |
4135 | break | |
4136 | fi | |
4137 | ac_mid=`expr 2 '*' $ac_mid` | |
4138 | fi | |
4139 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4140 | done | |
4141 | else | |
4142 | echo "$as_me: failed program was:" >&5 | |
4143 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4144 | ||
4145 | ac_lo= ac_hi= | |
4146 | fi | |
4147 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4148 | fi | |
4149 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4150 | # Binary search between lo and hi bounds. | |
4151 | while test "x$ac_lo" != "x$ac_hi"; do | |
4152 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4153 | cat >conftest.$ac_ext <<_ACEOF | |
4154 | /* confdefs.h. */ | |
4155 | _ACEOF | |
4156 | cat confdefs.h >>conftest.$ac_ext | |
4157 | cat >>conftest.$ac_ext <<_ACEOF | |
4158 | /* end confdefs.h. */ | |
4159 | $ac_includes_default | |
4160 | int | |
4161 | main () | |
4162 | { | |
4163 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4164 | test_array [0] = 0 | |
4165 | ||
4166 | ; | |
4167 | return 0; | |
4168 | } | |
4169 | _ACEOF | |
4170 | rm -f conftest.$ac_objext | |
4171 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4172 | (eval $ac_compile) 2>conftest.er1 | |
4173 | ac_status=$? | |
4174 | grep -v '^ *+' conftest.er1 >conftest.err | |
4175 | rm -f conftest.er1 | |
4176 | cat conftest.err >&5 | |
4177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4178 | (exit $ac_status); } && | |
ec6c7392 PB |
4179 | { ac_try='test -z "$ac_c_werror_flag" |
4180 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4182 | (eval $ac_try) 2>&5 | |
4183 | ac_status=$? | |
4184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4185 | (exit $ac_status); }; } && | |
4186 | { ac_try='test -s conftest.$ac_objext' | |
4187 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4188 | (eval $ac_try) 2>&5 | |
4189 | ac_status=$? | |
4190 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4191 | (exit $ac_status); }; }; then | |
4192 | ac_hi=$ac_mid | |
4193 | else | |
4194 | echo "$as_me: failed program was:" >&5 | |
4195 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4196 | ||
4197 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4198 | fi | |
4199 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4200 | done | |
4201 | case $ac_lo in | |
4202 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4203 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4204 | See \`config.log' for more details." >&5 | |
4205 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4206 | See \`config.log' for more details." >&2;} | |
4207 | { (exit 1); exit 1; }; } ;; | |
4208 | esac | |
4209 | else | |
4210 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4211 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4212 | See \`config.log' for more details." >&5 | |
4213 | echo "$as_me: error: cannot run test program while cross compiling | |
4214 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4215 | { (exit 1); exit 1; }; } |
4216 | else | |
4217 | cat >conftest.$ac_ext <<_ACEOF | |
4218 | /* confdefs.h. */ | |
4219 | _ACEOF | |
4220 | cat confdefs.h >>conftest.$ac_ext | |
4221 | cat >>conftest.$ac_ext <<_ACEOF | |
4222 | /* end confdefs.h. */ | |
4223 | $ac_includes_default | |
4224 | long longval () { return (long) (sizeof (short)); } | |
4225 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4226 | #include <stdio.h> | |
4227 | #include <stdlib.h> | |
4228 | int | |
4229 | main () | |
4230 | { | |
4231 | ||
4232 | FILE *f = fopen ("conftest.val", "w"); | |
4233 | if (! f) | |
4234 | exit (1); | |
4235 | if (((long) (sizeof (short))) < 0) | |
4236 | { | |
4237 | long i = longval (); | |
4238 | if (i != ((long) (sizeof (short)))) | |
4239 | exit (1); | |
4240 | fprintf (f, "%ld\n", i); | |
4241 | } | |
4242 | else | |
4243 | { | |
4244 | unsigned long i = ulongval (); | |
4245 | if (i != ((long) (sizeof (short)))) | |
4246 | exit (1); | |
4247 | fprintf (f, "%lu\n", i); | |
4248 | } | |
4249 | exit (ferror (f) || fclose (f) != 0); | |
4250 | ||
4251 | ; | |
4252 | return 0; | |
4253 | } | |
4254 | _ACEOF | |
4255 | rm -f conftest$ac_exeext | |
4256 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4257 | (eval $ac_link) 2>&5 | |
4258 | ac_status=$? | |
4259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4260 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4261 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4262 | (eval $ac_try) 2>&5 | |
4263 | ac_status=$? | |
4264 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4265 | (exit $ac_status); }; }; then | |
4266 | ac_cv_sizeof_short=`cat conftest.val` | |
4267 | else | |
4268 | echo "$as_me: program exited with status $ac_status" >&5 | |
4269 | echo "$as_me: failed program was:" >&5 | |
4270 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4271 | ||
4272 | ( exit $ac_status ) | |
4273 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4274 | See \`config.log' for more details." >&5 | |
4275 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4276 | See \`config.log' for more details." >&2;} | |
4277 | { (exit 1); exit 1; }; } | |
4278 | fi | |
4279 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4280 | fi | |
4281 | fi | |
4282 | rm -f conftest.val | |
4283 | else | |
4284 | ac_cv_sizeof_short=0 | |
4285 | fi | |
4286 | fi | |
4287 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4288 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4289 | cat >>confdefs.h <<_ACEOF | |
4290 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4291 | _ACEOF | |
4292 | ||
4293 | ||
4294 | echo "$as_me:$LINENO: checking for int" >&5 | |
4295 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4296 | if test "${ac_cv_type_int+set}" = set; then | |
4297 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4298 | else | |
4299 | cat >conftest.$ac_ext <<_ACEOF | |
4300 | /* confdefs.h. */ | |
4301 | _ACEOF | |
4302 | cat confdefs.h >>conftest.$ac_ext | |
4303 | cat >>conftest.$ac_ext <<_ACEOF | |
4304 | /* end confdefs.h. */ | |
4305 | $ac_includes_default | |
4306 | int | |
4307 | main () | |
4308 | { | |
4309 | if ((int *) 0) | |
4310 | return 0; | |
4311 | if (sizeof (int)) | |
4312 | return 0; | |
4313 | ; | |
4314 | return 0; | |
4315 | } | |
4316 | _ACEOF | |
4317 | rm -f conftest.$ac_objext | |
4318 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4319 | (eval $ac_compile) 2>conftest.er1 | |
4320 | ac_status=$? | |
4321 | grep -v '^ *+' conftest.er1 >conftest.err | |
4322 | rm -f conftest.er1 | |
4323 | cat conftest.err >&5 | |
4324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4325 | (exit $ac_status); } && | |
ec6c7392 PB |
4326 | { ac_try='test -z "$ac_c_werror_flag" |
4327 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4328 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4329 | (eval $ac_try) 2>&5 | |
4330 | ac_status=$? | |
4331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4332 | (exit $ac_status); }; } && | |
4333 | { ac_try='test -s conftest.$ac_objext' | |
4334 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4335 | (eval $ac_try) 2>&5 | |
4336 | ac_status=$? | |
4337 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4338 | (exit $ac_status); }; }; then | |
4339 | ac_cv_type_int=yes | |
4340 | else | |
4341 | echo "$as_me: failed program was:" >&5 | |
4342 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4343 | ||
4344 | ac_cv_type_int=no | |
4345 | fi | |
4346 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4347 | fi | |
4348 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4349 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4350 | ||
4351 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4352 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4353 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4354 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4355 | else | |
4356 | if test "$ac_cv_type_int" = yes; then | |
4357 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4358 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4359 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4360 | # This bug is HP SR number 8606223364. | |
4361 | if test "$cross_compiling" = yes; then | |
4362 | # Depending upon the size, compute the lo and hi bounds. | |
4363 | cat >conftest.$ac_ext <<_ACEOF | |
4364 | /* confdefs.h. */ | |
4365 | _ACEOF | |
4366 | cat confdefs.h >>conftest.$ac_ext | |
4367 | cat >>conftest.$ac_ext <<_ACEOF | |
4368 | /* end confdefs.h. */ | |
4369 | $ac_includes_default | |
4370 | int | |
4371 | main () | |
4372 | { | |
4373 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4374 | test_array [0] = 0 | |
4375 | ||
4376 | ; | |
4377 | return 0; | |
4378 | } | |
4379 | _ACEOF | |
4380 | rm -f conftest.$ac_objext | |
4381 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4382 | (eval $ac_compile) 2>conftest.er1 | |
4383 | ac_status=$? | |
4384 | grep -v '^ *+' conftest.er1 >conftest.err | |
4385 | rm -f conftest.er1 | |
4386 | cat conftest.err >&5 | |
4387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4388 | (exit $ac_status); } && | |
ec6c7392 PB |
4389 | { ac_try='test -z "$ac_c_werror_flag" |
4390 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4391 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4392 | (eval $ac_try) 2>&5 | |
4393 | ac_status=$? | |
4394 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4395 | (exit $ac_status); }; } && | |
4396 | { ac_try='test -s conftest.$ac_objext' | |
4397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4398 | (eval $ac_try) 2>&5 | |
4399 | ac_status=$? | |
4400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4401 | (exit $ac_status); }; }; then | |
4402 | ac_lo=0 ac_mid=0 | |
4403 | while :; do | |
4404 | cat >conftest.$ac_ext <<_ACEOF | |
4405 | /* confdefs.h. */ | |
4406 | _ACEOF | |
4407 | cat confdefs.h >>conftest.$ac_ext | |
4408 | cat >>conftest.$ac_ext <<_ACEOF | |
4409 | /* end confdefs.h. */ | |
4410 | $ac_includes_default | |
4411 | int | |
4412 | main () | |
4413 | { | |
4414 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4415 | test_array [0] = 0 | |
4416 | ||
4417 | ; | |
4418 | return 0; | |
4419 | } | |
4420 | _ACEOF | |
4421 | rm -f conftest.$ac_objext | |
4422 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4423 | (eval $ac_compile) 2>conftest.er1 | |
4424 | ac_status=$? | |
4425 | grep -v '^ *+' conftest.er1 >conftest.err | |
4426 | rm -f conftest.er1 | |
4427 | cat conftest.err >&5 | |
4428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4429 | (exit $ac_status); } && | |
ec6c7392 PB |
4430 | { ac_try='test -z "$ac_c_werror_flag" |
4431 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4432 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4433 | (eval $ac_try) 2>&5 | |
4434 | ac_status=$? | |
4435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4436 | (exit $ac_status); }; } && | |
4437 | { ac_try='test -s conftest.$ac_objext' | |
4438 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4439 | (eval $ac_try) 2>&5 | |
4440 | ac_status=$? | |
4441 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4442 | (exit $ac_status); }; }; then | |
4443 | ac_hi=$ac_mid; break | |
4444 | else | |
4445 | echo "$as_me: failed program was:" >&5 | |
4446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4447 | ||
4448 | ac_lo=`expr $ac_mid + 1` | |
4449 | if test $ac_lo -le $ac_mid; then | |
4450 | ac_lo= ac_hi= | |
4451 | break | |
4452 | fi | |
4453 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4454 | fi | |
4455 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4456 | done | |
4457 | else | |
4458 | echo "$as_me: failed program was:" >&5 | |
4459 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4460 | ||
4461 | cat >conftest.$ac_ext <<_ACEOF | |
4462 | /* confdefs.h. */ | |
4463 | _ACEOF | |
4464 | cat confdefs.h >>conftest.$ac_ext | |
4465 | cat >>conftest.$ac_ext <<_ACEOF | |
4466 | /* end confdefs.h. */ | |
4467 | $ac_includes_default | |
4468 | int | |
4469 | main () | |
4470 | { | |
4471 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4472 | test_array [0] = 0 | |
4473 | ||
4474 | ; | |
4475 | return 0; | |
4476 | } | |
4477 | _ACEOF | |
4478 | rm -f conftest.$ac_objext | |
4479 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4480 | (eval $ac_compile) 2>conftest.er1 | |
4481 | ac_status=$? | |
4482 | grep -v '^ *+' conftest.er1 >conftest.err | |
4483 | rm -f conftest.er1 | |
4484 | cat conftest.err >&5 | |
4485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4486 | (exit $ac_status); } && | |
ec6c7392 PB |
4487 | { ac_try='test -z "$ac_c_werror_flag" |
4488 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4489 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4490 | (eval $ac_try) 2>&5 | |
4491 | ac_status=$? | |
4492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4493 | (exit $ac_status); }; } && | |
4494 | { ac_try='test -s conftest.$ac_objext' | |
4495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4496 | (eval $ac_try) 2>&5 | |
4497 | ac_status=$? | |
4498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4499 | (exit $ac_status); }; }; then | |
4500 | ac_hi=-1 ac_mid=-1 | |
4501 | while :; do | |
4502 | cat >conftest.$ac_ext <<_ACEOF | |
4503 | /* confdefs.h. */ | |
4504 | _ACEOF | |
4505 | cat confdefs.h >>conftest.$ac_ext | |
4506 | cat >>conftest.$ac_ext <<_ACEOF | |
4507 | /* end confdefs.h. */ | |
4508 | $ac_includes_default | |
4509 | int | |
4510 | main () | |
4511 | { | |
4512 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4513 | test_array [0] = 0 | |
4514 | ||
4515 | ; | |
4516 | return 0; | |
4517 | } | |
4518 | _ACEOF | |
4519 | rm -f conftest.$ac_objext | |
4520 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4521 | (eval $ac_compile) 2>conftest.er1 | |
4522 | ac_status=$? | |
4523 | grep -v '^ *+' conftest.er1 >conftest.err | |
4524 | rm -f conftest.er1 | |
4525 | cat conftest.err >&5 | |
4526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4527 | (exit $ac_status); } && | |
ec6c7392 PB |
4528 | { ac_try='test -z "$ac_c_werror_flag" |
4529 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4530 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4531 | (eval $ac_try) 2>&5 | |
4532 | ac_status=$? | |
4533 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4534 | (exit $ac_status); }; } && | |
4535 | { ac_try='test -s conftest.$ac_objext' | |
4536 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4537 | (eval $ac_try) 2>&5 | |
4538 | ac_status=$? | |
4539 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4540 | (exit $ac_status); }; }; then | |
4541 | ac_lo=$ac_mid; break | |
4542 | else | |
4543 | echo "$as_me: failed program was:" >&5 | |
4544 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4545 | ||
4546 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4547 | if test $ac_mid -le $ac_hi; then | |
4548 | ac_lo= ac_hi= | |
4549 | break | |
4550 | fi | |
4551 | ac_mid=`expr 2 '*' $ac_mid` | |
4552 | fi | |
4553 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4554 | done | |
4555 | else | |
4556 | echo "$as_me: failed program was:" >&5 | |
4557 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4558 | ||
4559 | ac_lo= ac_hi= | |
4560 | fi | |
4561 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4562 | fi | |
4563 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4564 | # Binary search between lo and hi bounds. | |
4565 | while test "x$ac_lo" != "x$ac_hi"; do | |
4566 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4567 | cat >conftest.$ac_ext <<_ACEOF | |
4568 | /* confdefs.h. */ | |
4569 | _ACEOF | |
4570 | cat confdefs.h >>conftest.$ac_ext | |
4571 | cat >>conftest.$ac_ext <<_ACEOF | |
4572 | /* end confdefs.h. */ | |
4573 | $ac_includes_default | |
4574 | int | |
4575 | main () | |
4576 | { | |
4577 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4578 | test_array [0] = 0 | |
4579 | ||
4580 | ; | |
4581 | return 0; | |
4582 | } | |
4583 | _ACEOF | |
4584 | rm -f conftest.$ac_objext | |
4585 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4586 | (eval $ac_compile) 2>conftest.er1 | |
4587 | ac_status=$? | |
4588 | grep -v '^ *+' conftest.er1 >conftest.err | |
4589 | rm -f conftest.er1 | |
4590 | cat conftest.err >&5 | |
4591 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4592 | (exit $ac_status); } && | |
ec6c7392 PB |
4593 | { ac_try='test -z "$ac_c_werror_flag" |
4594 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4595 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4596 | (eval $ac_try) 2>&5 | |
4597 | ac_status=$? | |
4598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4599 | (exit $ac_status); }; } && | |
4600 | { ac_try='test -s conftest.$ac_objext' | |
4601 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4602 | (eval $ac_try) 2>&5 | |
4603 | ac_status=$? | |
4604 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4605 | (exit $ac_status); }; }; then | |
4606 | ac_hi=$ac_mid | |
4607 | else | |
4608 | echo "$as_me: failed program was:" >&5 | |
4609 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4610 | ||
4611 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4612 | fi | |
4613 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4614 | done | |
4615 | case $ac_lo in | |
4616 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4617 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4618 | See \`config.log' for more details." >&5 | |
4619 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4620 | See \`config.log' for more details." >&2;} | |
4621 | { (exit 1); exit 1; }; } ;; | |
4622 | esac | |
4623 | else | |
4624 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4625 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4626 | See \`config.log' for more details." >&5 | |
4627 | echo "$as_me: error: cannot run test program while cross compiling | |
4628 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4629 | { (exit 1); exit 1; }; } |
4630 | else | |
4631 | cat >conftest.$ac_ext <<_ACEOF | |
4632 | /* confdefs.h. */ | |
4633 | _ACEOF | |
4634 | cat confdefs.h >>conftest.$ac_ext | |
4635 | cat >>conftest.$ac_ext <<_ACEOF | |
4636 | /* end confdefs.h. */ | |
4637 | $ac_includes_default | |
4638 | long longval () { return (long) (sizeof (int)); } | |
4639 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4640 | #include <stdio.h> | |
4641 | #include <stdlib.h> | |
4642 | int | |
4643 | main () | |
4644 | { | |
4645 | ||
4646 | FILE *f = fopen ("conftest.val", "w"); | |
4647 | if (! f) | |
4648 | exit (1); | |
4649 | if (((long) (sizeof (int))) < 0) | |
4650 | { | |
4651 | long i = longval (); | |
4652 | if (i != ((long) (sizeof (int)))) | |
4653 | exit (1); | |
4654 | fprintf (f, "%ld\n", i); | |
4655 | } | |
4656 | else | |
4657 | { | |
4658 | unsigned long i = ulongval (); | |
4659 | if (i != ((long) (sizeof (int)))) | |
4660 | exit (1); | |
4661 | fprintf (f, "%lu\n", i); | |
4662 | } | |
4663 | exit (ferror (f) || fclose (f) != 0); | |
4664 | ||
4665 | ; | |
4666 | return 0; | |
4667 | } | |
4668 | _ACEOF | |
4669 | rm -f conftest$ac_exeext | |
4670 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4671 | (eval $ac_link) 2>&5 | |
4672 | ac_status=$? | |
4673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4674 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4675 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4676 | (eval $ac_try) 2>&5 | |
4677 | ac_status=$? | |
4678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4679 | (exit $ac_status); }; }; then | |
4680 | ac_cv_sizeof_int=`cat conftest.val` | |
4681 | else | |
4682 | echo "$as_me: program exited with status $ac_status" >&5 | |
4683 | echo "$as_me: failed program was:" >&5 | |
4684 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4685 | ||
4686 | ( exit $ac_status ) | |
4687 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4688 | See \`config.log' for more details." >&5 | |
4689 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4690 | See \`config.log' for more details." >&2;} | |
4691 | { (exit 1); exit 1; }; } | |
4692 | fi | |
4693 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4694 | fi | |
4695 | fi | |
4696 | rm -f conftest.val | |
4697 | else | |
4698 | ac_cv_sizeof_int=0 | |
4699 | fi | |
4700 | fi | |
4701 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4702 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4703 | cat >>confdefs.h <<_ACEOF | |
4704 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4705 | _ACEOF | |
4706 | ||
4707 | ||
4708 | echo "$as_me:$LINENO: checking for long" >&5 | |
4709 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4710 | if test "${ac_cv_type_long+set}" = set; then | |
4711 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4712 | else | |
4713 | cat >conftest.$ac_ext <<_ACEOF | |
4714 | /* confdefs.h. */ | |
4715 | _ACEOF | |
4716 | cat confdefs.h >>conftest.$ac_ext | |
4717 | cat >>conftest.$ac_ext <<_ACEOF | |
4718 | /* end confdefs.h. */ | |
4719 | $ac_includes_default | |
4720 | int | |
4721 | main () | |
4722 | { | |
4723 | if ((long *) 0) | |
4724 | return 0; | |
4725 | if (sizeof (long)) | |
4726 | return 0; | |
4727 | ; | |
4728 | return 0; | |
4729 | } | |
4730 | _ACEOF | |
4731 | rm -f conftest.$ac_objext | |
4732 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4733 | (eval $ac_compile) 2>conftest.er1 | |
4734 | ac_status=$? | |
4735 | grep -v '^ *+' conftest.er1 >conftest.err | |
4736 | rm -f conftest.er1 | |
4737 | cat conftest.err >&5 | |
4738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4739 | (exit $ac_status); } && | |
ec6c7392 PB |
4740 | { ac_try='test -z "$ac_c_werror_flag" |
4741 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4742 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4743 | (eval $ac_try) 2>&5 | |
4744 | ac_status=$? | |
4745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4746 | (exit $ac_status); }; } && | |
4747 | { ac_try='test -s conftest.$ac_objext' | |
4748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4749 | (eval $ac_try) 2>&5 | |
4750 | ac_status=$? | |
4751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4752 | (exit $ac_status); }; }; then | |
4753 | ac_cv_type_long=yes | |
4754 | else | |
4755 | echo "$as_me: failed program was:" >&5 | |
4756 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4757 | ||
4758 | ac_cv_type_long=no | |
4759 | fi | |
4760 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4761 | fi | |
4762 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4763 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4764 | ||
4765 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4766 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4767 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4768 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4769 | else | |
4770 | if test "$ac_cv_type_long" = yes; then | |
4771 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4772 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4773 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4774 | # This bug is HP SR number 8606223364. | |
4775 | if test "$cross_compiling" = yes; then | |
4776 | # Depending upon the size, compute the lo and hi bounds. | |
4777 | cat >conftest.$ac_ext <<_ACEOF | |
4778 | /* confdefs.h. */ | |
4779 | _ACEOF | |
4780 | cat confdefs.h >>conftest.$ac_ext | |
4781 | cat >>conftest.$ac_ext <<_ACEOF | |
4782 | /* end confdefs.h. */ | |
4783 | $ac_includes_default | |
4784 | int | |
4785 | main () | |
4786 | { | |
4787 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4788 | test_array [0] = 0 | |
4789 | ||
4790 | ; | |
4791 | return 0; | |
4792 | } | |
4793 | _ACEOF | |
4794 | rm -f conftest.$ac_objext | |
4795 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4796 | (eval $ac_compile) 2>conftest.er1 | |
4797 | ac_status=$? | |
4798 | grep -v '^ *+' conftest.er1 >conftest.err | |
4799 | rm -f conftest.er1 | |
4800 | cat conftest.err >&5 | |
4801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4802 | (exit $ac_status); } && | |
ec6c7392 PB |
4803 | { ac_try='test -z "$ac_c_werror_flag" |
4804 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4805 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4806 | (eval $ac_try) 2>&5 | |
4807 | ac_status=$? | |
4808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4809 | (exit $ac_status); }; } && | |
4810 | { ac_try='test -s conftest.$ac_objext' | |
4811 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4812 | (eval $ac_try) 2>&5 | |
4813 | ac_status=$? | |
4814 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4815 | (exit $ac_status); }; }; then | |
4816 | ac_lo=0 ac_mid=0 | |
4817 | while :; do | |
4818 | cat >conftest.$ac_ext <<_ACEOF | |
4819 | /* confdefs.h. */ | |
4820 | _ACEOF | |
4821 | cat confdefs.h >>conftest.$ac_ext | |
4822 | cat >>conftest.$ac_ext <<_ACEOF | |
4823 | /* end confdefs.h. */ | |
4824 | $ac_includes_default | |
4825 | int | |
4826 | main () | |
4827 | { | |
4828 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4829 | test_array [0] = 0 | |
4830 | ||
4831 | ; | |
4832 | return 0; | |
4833 | } | |
4834 | _ACEOF | |
4835 | rm -f conftest.$ac_objext | |
4836 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4837 | (eval $ac_compile) 2>conftest.er1 | |
4838 | ac_status=$? | |
4839 | grep -v '^ *+' conftest.er1 >conftest.err | |
4840 | rm -f conftest.er1 | |
4841 | cat conftest.err >&5 | |
4842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4843 | (exit $ac_status); } && | |
ec6c7392 PB |
4844 | { ac_try='test -z "$ac_c_werror_flag" |
4845 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4846 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4847 | (eval $ac_try) 2>&5 | |
4848 | ac_status=$? | |
4849 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4850 | (exit $ac_status); }; } && | |
4851 | { ac_try='test -s conftest.$ac_objext' | |
4852 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4853 | (eval $ac_try) 2>&5 | |
4854 | ac_status=$? | |
4855 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4856 | (exit $ac_status); }; }; then | |
4857 | ac_hi=$ac_mid; break | |
4858 | else | |
4859 | echo "$as_me: failed program was:" >&5 | |
4860 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4861 | ||
4862 | ac_lo=`expr $ac_mid + 1` | |
4863 | if test $ac_lo -le $ac_mid; then | |
4864 | ac_lo= ac_hi= | |
4865 | break | |
4866 | fi | |
4867 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4868 | fi | |
4869 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4870 | done | |
4871 | else | |
4872 | echo "$as_me: failed program was:" >&5 | |
4873 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4874 | ||
4875 | cat >conftest.$ac_ext <<_ACEOF | |
4876 | /* confdefs.h. */ | |
4877 | _ACEOF | |
4878 | cat confdefs.h >>conftest.$ac_ext | |
4879 | cat >>conftest.$ac_ext <<_ACEOF | |
4880 | /* end confdefs.h. */ | |
4881 | $ac_includes_default | |
4882 | int | |
4883 | main () | |
4884 | { | |
4885 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4886 | test_array [0] = 0 | |
4887 | ||
4888 | ; | |
4889 | return 0; | |
4890 | } | |
4891 | _ACEOF | |
4892 | rm -f conftest.$ac_objext | |
4893 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4894 | (eval $ac_compile) 2>conftest.er1 | |
4895 | ac_status=$? | |
4896 | grep -v '^ *+' conftest.er1 >conftest.err | |
4897 | rm -f conftest.er1 | |
4898 | cat conftest.err >&5 | |
4899 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4900 | (exit $ac_status); } && | |
ec6c7392 PB |
4901 | { ac_try='test -z "$ac_c_werror_flag" |
4902 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4903 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4904 | (eval $ac_try) 2>&5 | |
4905 | ac_status=$? | |
4906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4907 | (exit $ac_status); }; } && | |
4908 | { ac_try='test -s conftest.$ac_objext' | |
4909 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4910 | (eval $ac_try) 2>&5 | |
4911 | ac_status=$? | |
4912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4913 | (exit $ac_status); }; }; then | |
4914 | ac_hi=-1 ac_mid=-1 | |
4915 | while :; do | |
4916 | cat >conftest.$ac_ext <<_ACEOF | |
4917 | /* confdefs.h. */ | |
4918 | _ACEOF | |
4919 | cat confdefs.h >>conftest.$ac_ext | |
4920 | cat >>conftest.$ac_ext <<_ACEOF | |
4921 | /* end confdefs.h. */ | |
4922 | $ac_includes_default | |
4923 | int | |
4924 | main () | |
4925 | { | |
4926 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4927 | test_array [0] = 0 | |
4928 | ||
4929 | ; | |
4930 | return 0; | |
4931 | } | |
4932 | _ACEOF | |
4933 | rm -f conftest.$ac_objext | |
4934 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4935 | (eval $ac_compile) 2>conftest.er1 | |
4936 | ac_status=$? | |
4937 | grep -v '^ *+' conftest.er1 >conftest.err | |
4938 | rm -f conftest.er1 | |
4939 | cat conftest.err >&5 | |
4940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4941 | (exit $ac_status); } && | |
ec6c7392 PB |
4942 | { ac_try='test -z "$ac_c_werror_flag" |
4943 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4945 | (eval $ac_try) 2>&5 | |
4946 | ac_status=$? | |
4947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4948 | (exit $ac_status); }; } && | |
4949 | { ac_try='test -s conftest.$ac_objext' | |
4950 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4951 | (eval $ac_try) 2>&5 | |
4952 | ac_status=$? | |
4953 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4954 | (exit $ac_status); }; }; then | |
4955 | ac_lo=$ac_mid; break | |
4956 | else | |
4957 | echo "$as_me: failed program was:" >&5 | |
4958 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4959 | ||
4960 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4961 | if test $ac_mid -le $ac_hi; then | |
4962 | ac_lo= ac_hi= | |
4963 | break | |
4964 | fi | |
4965 | ac_mid=`expr 2 '*' $ac_mid` | |
4966 | fi | |
4967 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4968 | done | |
4969 | else | |
4970 | echo "$as_me: failed program was:" >&5 | |
4971 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4972 | ||
4973 | ac_lo= ac_hi= | |
4974 | fi | |
4975 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4976 | fi | |
4977 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4978 | # Binary search between lo and hi bounds. | |
4979 | while test "x$ac_lo" != "x$ac_hi"; do | |
4980 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4981 | cat >conftest.$ac_ext <<_ACEOF | |
4982 | /* confdefs.h. */ | |
4983 | _ACEOF | |
4984 | cat confdefs.h >>conftest.$ac_ext | |
4985 | cat >>conftest.$ac_ext <<_ACEOF | |
4986 | /* end confdefs.h. */ | |
4987 | $ac_includes_default | |
4988 | int | |
4989 | main () | |
4990 | { | |
4991 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4992 | test_array [0] = 0 | |
4993 | ||
4994 | ; | |
4995 | return 0; | |
4996 | } | |
4997 | _ACEOF | |
4998 | rm -f conftest.$ac_objext | |
4999 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5000 | (eval $ac_compile) 2>conftest.er1 | |
5001 | ac_status=$? | |
5002 | grep -v '^ *+' conftest.er1 >conftest.err | |
5003 | rm -f conftest.er1 | |
5004 | cat conftest.err >&5 | |
5005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5006 | (exit $ac_status); } && | |
ec6c7392 PB |
5007 | { ac_try='test -z "$ac_c_werror_flag" |
5008 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5010 | (eval $ac_try) 2>&5 | |
5011 | ac_status=$? | |
5012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5013 | (exit $ac_status); }; } && | |
5014 | { ac_try='test -s conftest.$ac_objext' | |
5015 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5016 | (eval $ac_try) 2>&5 | |
5017 | ac_status=$? | |
5018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5019 | (exit $ac_status); }; }; then | |
5020 | ac_hi=$ac_mid | |
5021 | else | |
5022 | echo "$as_me: failed program was:" >&5 | |
5023 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5024 | ||
5025 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5026 | fi | |
5027 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5028 | done | |
5029 | case $ac_lo in | |
5030 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5031 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5032 | See \`config.log' for more details." >&5 | |
5033 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5034 | See \`config.log' for more details." >&2;} | |
5035 | { (exit 1); exit 1; }; } ;; | |
5036 | esac | |
5037 | else | |
5038 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5039 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5040 | See \`config.log' for more details." >&5 | |
5041 | echo "$as_me: error: cannot run test program while cross compiling | |
5042 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5043 | { (exit 1); exit 1; }; } |
5044 | else | |
5045 | cat >conftest.$ac_ext <<_ACEOF | |
5046 | /* confdefs.h. */ | |
5047 | _ACEOF | |
5048 | cat confdefs.h >>conftest.$ac_ext | |
5049 | cat >>conftest.$ac_ext <<_ACEOF | |
5050 | /* end confdefs.h. */ | |
5051 | $ac_includes_default | |
5052 | long longval () { return (long) (sizeof (long)); } | |
5053 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5054 | #include <stdio.h> | |
5055 | #include <stdlib.h> | |
5056 | int | |
5057 | main () | |
5058 | { | |
5059 | ||
5060 | FILE *f = fopen ("conftest.val", "w"); | |
5061 | if (! f) | |
5062 | exit (1); | |
5063 | if (((long) (sizeof (long))) < 0) | |
5064 | { | |
5065 | long i = longval (); | |
5066 | if (i != ((long) (sizeof (long)))) | |
5067 | exit (1); | |
5068 | fprintf (f, "%ld\n", i); | |
5069 | } | |
5070 | else | |
5071 | { | |
5072 | unsigned long i = ulongval (); | |
5073 | if (i != ((long) (sizeof (long)))) | |
5074 | exit (1); | |
5075 | fprintf (f, "%lu\n", i); | |
5076 | } | |
5077 | exit (ferror (f) || fclose (f) != 0); | |
5078 | ||
5079 | ; | |
5080 | return 0; | |
5081 | } | |
5082 | _ACEOF | |
5083 | rm -f conftest$ac_exeext | |
5084 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5085 | (eval $ac_link) 2>&5 | |
5086 | ac_status=$? | |
5087 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5088 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5090 | (eval $ac_try) 2>&5 | |
5091 | ac_status=$? | |
5092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5093 | (exit $ac_status); }; }; then | |
5094 | ac_cv_sizeof_long=`cat conftest.val` | |
5095 | else | |
5096 | echo "$as_me: program exited with status $ac_status" >&5 | |
5097 | echo "$as_me: failed program was:" >&5 | |
5098 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5099 | ||
5100 | ( exit $ac_status ) | |
5101 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5102 | See \`config.log' for more details." >&5 | |
5103 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5104 | See \`config.log' for more details." >&2;} | |
5105 | { (exit 1); exit 1; }; } | |
5106 | fi | |
5107 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5108 | fi | |
5109 | fi | |
5110 | rm -f conftest.val | |
5111 | else | |
5112 | ac_cv_sizeof_long=0 | |
5113 | fi | |
5114 | fi | |
5115 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5116 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5117 | cat >>confdefs.h <<_ACEOF | |
5118 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5119 | _ACEOF | |
5120 | ||
5121 | ||
5ec1c5e6 KC |
5122 | echo "$as_me:$LINENO: checking for long long" >&5 |
5123 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5124 | if test "${ac_cv_type_long_long+set}" = set; then | |
5125 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5126 | else | |
5127 | cat >conftest.$ac_ext <<_ACEOF | |
5128 | /* confdefs.h. */ | |
5129 | _ACEOF | |
5130 | cat confdefs.h >>conftest.$ac_ext | |
5131 | cat >>conftest.$ac_ext <<_ACEOF | |
5132 | /* end confdefs.h. */ | |
5133 | $ac_includes_default | |
5134 | int | |
5135 | main () | |
5136 | { | |
5137 | if ((long long *) 0) | |
5138 | return 0; | |
5139 | if (sizeof (long long)) | |
5140 | return 0; | |
5141 | ; | |
5142 | return 0; | |
5143 | } | |
5144 | _ACEOF | |
5145 | rm -f conftest.$ac_objext | |
5146 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5147 | (eval $ac_compile) 2>conftest.er1 | |
5148 | ac_status=$? | |
5149 | grep -v '^ *+' conftest.er1 >conftest.err | |
5150 | rm -f conftest.er1 | |
5151 | cat conftest.err >&5 | |
5152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5153 | (exit $ac_status); } && | |
ec6c7392 PB |
5154 | { ac_try='test -z "$ac_c_werror_flag" |
5155 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5157 | (eval $ac_try) 2>&5 | |
5158 | ac_status=$? | |
5159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5160 | (exit $ac_status); }; } && | |
5161 | { ac_try='test -s conftest.$ac_objext' | |
5162 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5163 | (eval $ac_try) 2>&5 | |
5164 | ac_status=$? | |
5165 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5166 | (exit $ac_status); }; }; then | |
5167 | ac_cv_type_long_long=yes | |
5168 | else | |
5169 | echo "$as_me: failed program was:" >&5 | |
5170 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5171 | ||
5172 | ac_cv_type_long_long=no | |
5173 | fi | |
5174 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5175 | fi | |
5176 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5177 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5178 | if test $ac_cv_type_long_long = yes; then | |
5179 | ||
5180 | cat >>confdefs.h <<_ACEOF | |
5181 | #define HAVE_LONG_LONG 1 | |
5182 | _ACEOF | |
5183 | ||
5184 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5185 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5186 | if test "${ac_cv_type_long_long+set}" = set; then | |
5187 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5188 | else | |
5189 | cat >conftest.$ac_ext <<_ACEOF | |
5190 | /* confdefs.h. */ | |
5191 | _ACEOF | |
5192 | cat confdefs.h >>conftest.$ac_ext | |
5193 | cat >>conftest.$ac_ext <<_ACEOF | |
5194 | /* end confdefs.h. */ | |
5195 | $ac_includes_default | |
5196 | int | |
5197 | main () | |
5198 | { | |
5199 | if ((long long *) 0) | |
5200 | return 0; | |
5201 | if (sizeof (long long)) | |
5202 | return 0; | |
5203 | ; | |
5204 | return 0; | |
5205 | } | |
5206 | _ACEOF | |
5207 | rm -f conftest.$ac_objext | |
5208 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5209 | (eval $ac_compile) 2>conftest.er1 | |
5210 | ac_status=$? | |
5211 | grep -v '^ *+' conftest.er1 >conftest.err | |
5212 | rm -f conftest.er1 | |
5213 | cat conftest.err >&5 | |
5214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5215 | (exit $ac_status); } && | |
ec6c7392 PB |
5216 | { ac_try='test -z "$ac_c_werror_flag" |
5217 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5219 | (eval $ac_try) 2>&5 | |
5220 | ac_status=$? | |
5221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5222 | (exit $ac_status); }; } && | |
5223 | { ac_try='test -s conftest.$ac_objext' | |
5224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5225 | (eval $ac_try) 2>&5 | |
5226 | ac_status=$? | |
5227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5228 | (exit $ac_status); }; }; then | |
5229 | ac_cv_type_long_long=yes | |
5230 | else | |
5231 | echo "$as_me: failed program was:" >&5 | |
5232 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5233 | ||
5234 | ac_cv_type_long_long=no | |
5235 | fi | |
5236 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5237 | fi | |
5238 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5239 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5240 | ||
5241 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5242 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5243 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5244 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5245 | else | |
5246 | if test "$ac_cv_type_long_long" = yes; then | |
5247 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5248 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5249 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5250 | # This bug is HP SR number 8606223364. | |
5251 | if test "$cross_compiling" = yes; then | |
5252 | # Depending upon the size, compute the lo and hi bounds. | |
5253 | cat >conftest.$ac_ext <<_ACEOF | |
5254 | /* confdefs.h. */ | |
5255 | _ACEOF | |
5256 | cat confdefs.h >>conftest.$ac_ext | |
5257 | cat >>conftest.$ac_ext <<_ACEOF | |
5258 | /* end confdefs.h. */ | |
5259 | $ac_includes_default | |
5260 | int | |
5261 | main () | |
5262 | { | |
5263 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5264 | test_array [0] = 0 | |
5265 | ||
5266 | ; | |
5267 | return 0; | |
5268 | } | |
5269 | _ACEOF | |
5270 | rm -f conftest.$ac_objext | |
5271 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5272 | (eval $ac_compile) 2>conftest.er1 | |
5273 | ac_status=$? | |
5274 | grep -v '^ *+' conftest.er1 >conftest.err | |
5275 | rm -f conftest.er1 | |
5276 | cat conftest.err >&5 | |
5277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5278 | (exit $ac_status); } && | |
ec6c7392 PB |
5279 | { ac_try='test -z "$ac_c_werror_flag" |
5280 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5281 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5282 | (eval $ac_try) 2>&5 | |
5283 | ac_status=$? | |
5284 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5285 | (exit $ac_status); }; } && | |
5286 | { ac_try='test -s conftest.$ac_objext' | |
5287 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5288 | (eval $ac_try) 2>&5 | |
5289 | ac_status=$? | |
5290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5291 | (exit $ac_status); }; }; then | |
5292 | ac_lo=0 ac_mid=0 | |
5293 | while :; do | |
5294 | cat >conftest.$ac_ext <<_ACEOF | |
5295 | /* confdefs.h. */ | |
5296 | _ACEOF | |
5297 | cat confdefs.h >>conftest.$ac_ext | |
5298 | cat >>conftest.$ac_ext <<_ACEOF | |
5299 | /* end confdefs.h. */ | |
5300 | $ac_includes_default | |
5301 | int | |
5302 | main () | |
5303 | { | |
5304 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5305 | test_array [0] = 0 | |
5306 | ||
5307 | ; | |
5308 | return 0; | |
5309 | } | |
5310 | _ACEOF | |
5311 | rm -f conftest.$ac_objext | |
5312 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5313 | (eval $ac_compile) 2>conftest.er1 | |
5314 | ac_status=$? | |
5315 | grep -v '^ *+' conftest.er1 >conftest.err | |
5316 | rm -f conftest.er1 | |
5317 | cat conftest.err >&5 | |
5318 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5319 | (exit $ac_status); } && | |
ec6c7392 PB |
5320 | { ac_try='test -z "$ac_c_werror_flag" |
5321 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5322 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5323 | (eval $ac_try) 2>&5 | |
5324 | ac_status=$? | |
5325 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5326 | (exit $ac_status); }; } && | |
5327 | { ac_try='test -s conftest.$ac_objext' | |
5328 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5329 | (eval $ac_try) 2>&5 | |
5330 | ac_status=$? | |
5331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5332 | (exit $ac_status); }; }; then | |
5333 | ac_hi=$ac_mid; break | |
5334 | else | |
5335 | echo "$as_me: failed program was:" >&5 | |
5336 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5337 | ||
5338 | ac_lo=`expr $ac_mid + 1` | |
5339 | if test $ac_lo -le $ac_mid; then | |
5340 | ac_lo= ac_hi= | |
5341 | break | |
5342 | fi | |
5343 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5344 | fi | |
5345 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5346 | done | |
5347 | else | |
5348 | echo "$as_me: failed program was:" >&5 | |
5349 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5350 | ||
5351 | cat >conftest.$ac_ext <<_ACEOF | |
5352 | /* confdefs.h. */ | |
5353 | _ACEOF | |
5354 | cat confdefs.h >>conftest.$ac_ext | |
5355 | cat >>conftest.$ac_ext <<_ACEOF | |
5356 | /* end confdefs.h. */ | |
5357 | $ac_includes_default | |
5358 | int | |
5359 | main () | |
5360 | { | |
5361 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5362 | test_array [0] = 0 | |
5363 | ||
5364 | ; | |
5365 | return 0; | |
5366 | } | |
5367 | _ACEOF | |
5368 | rm -f conftest.$ac_objext | |
5369 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5370 | (eval $ac_compile) 2>conftest.er1 | |
5371 | ac_status=$? | |
5372 | grep -v '^ *+' conftest.er1 >conftest.err | |
5373 | rm -f conftest.er1 | |
5374 | cat conftest.err >&5 | |
5375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5376 | (exit $ac_status); } && | |
ec6c7392 PB |
5377 | { ac_try='test -z "$ac_c_werror_flag" |
5378 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5380 | (eval $ac_try) 2>&5 | |
5381 | ac_status=$? | |
5382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5383 | (exit $ac_status); }; } && | |
5384 | { ac_try='test -s conftest.$ac_objext' | |
5385 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5386 | (eval $ac_try) 2>&5 | |
5387 | ac_status=$? | |
5388 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5389 | (exit $ac_status); }; }; then | |
5390 | ac_hi=-1 ac_mid=-1 | |
5391 | while :; do | |
5392 | cat >conftest.$ac_ext <<_ACEOF | |
5393 | /* confdefs.h. */ | |
5394 | _ACEOF | |
5395 | cat confdefs.h >>conftest.$ac_ext | |
5396 | cat >>conftest.$ac_ext <<_ACEOF | |
5397 | /* end confdefs.h. */ | |
5398 | $ac_includes_default | |
5399 | int | |
5400 | main () | |
5401 | { | |
5402 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5403 | test_array [0] = 0 | |
5404 | ||
5405 | ; | |
5406 | return 0; | |
5407 | } | |
5408 | _ACEOF | |
5409 | rm -f conftest.$ac_objext | |
5410 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5411 | (eval $ac_compile) 2>conftest.er1 | |
5412 | ac_status=$? | |
5413 | grep -v '^ *+' conftest.er1 >conftest.err | |
5414 | rm -f conftest.er1 | |
5415 | cat conftest.err >&5 | |
5416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5417 | (exit $ac_status); } && | |
ec6c7392 PB |
5418 | { ac_try='test -z "$ac_c_werror_flag" |
5419 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5421 | (eval $ac_try) 2>&5 | |
5422 | ac_status=$? | |
5423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5424 | (exit $ac_status); }; } && | |
5425 | { ac_try='test -s conftest.$ac_objext' | |
5426 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5427 | (eval $ac_try) 2>&5 | |
5428 | ac_status=$? | |
5429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5430 | (exit $ac_status); }; }; then | |
5431 | ac_lo=$ac_mid; break | |
5432 | else | |
5433 | echo "$as_me: failed program was:" >&5 | |
5434 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5435 | ||
5436 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5437 | if test $ac_mid -le $ac_hi; then | |
5438 | ac_lo= ac_hi= | |
5439 | break | |
5440 | fi | |
5441 | ac_mid=`expr 2 '*' $ac_mid` | |
5442 | fi | |
5443 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5444 | done | |
5445 | else | |
5446 | echo "$as_me: failed program was:" >&5 | |
5447 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5448 | ||
5449 | ac_lo= ac_hi= | |
5450 | fi | |
5451 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5452 | fi | |
5453 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5454 | # Binary search between lo and hi bounds. | |
5455 | while test "x$ac_lo" != "x$ac_hi"; do | |
5456 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5457 | cat >conftest.$ac_ext <<_ACEOF | |
5458 | /* confdefs.h. */ | |
5459 | _ACEOF | |
5460 | cat confdefs.h >>conftest.$ac_ext | |
5461 | cat >>conftest.$ac_ext <<_ACEOF | |
5462 | /* end confdefs.h. */ | |
5463 | $ac_includes_default | |
5464 | int | |
5465 | main () | |
5466 | { | |
5467 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5468 | test_array [0] = 0 | |
5469 | ||
5470 | ; | |
5471 | return 0; | |
5472 | } | |
5473 | _ACEOF | |
5474 | rm -f conftest.$ac_objext | |
5475 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5476 | (eval $ac_compile) 2>conftest.er1 | |
5477 | ac_status=$? | |
5478 | grep -v '^ *+' conftest.er1 >conftest.err | |
5479 | rm -f conftest.er1 | |
5480 | cat conftest.err >&5 | |
5481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5482 | (exit $ac_status); } && | |
ec6c7392 PB |
5483 | { ac_try='test -z "$ac_c_werror_flag" |
5484 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5485 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5486 | (eval $ac_try) 2>&5 | |
5487 | ac_status=$? | |
5488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5489 | (exit $ac_status); }; } && | |
5490 | { ac_try='test -s conftest.$ac_objext' | |
5491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5492 | (eval $ac_try) 2>&5 | |
5493 | ac_status=$? | |
5494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5495 | (exit $ac_status); }; }; then | |
5496 | ac_hi=$ac_mid | |
5497 | else | |
5498 | echo "$as_me: failed program was:" >&5 | |
5499 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5500 | ||
5501 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5502 | fi | |
5503 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5504 | done | |
5505 | case $ac_lo in | |
5506 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5507 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5508 | See \`config.log' for more details." >&5 | |
5509 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5510 | See \`config.log' for more details." >&2;} | |
5511 | { (exit 1); exit 1; }; } ;; | |
5512 | esac | |
5513 | else | |
5514 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5515 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5516 | See \`config.log' for more details." >&5 | |
5517 | echo "$as_me: error: cannot run test program while cross compiling | |
5518 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5519 | { (exit 1); exit 1; }; } |
5520 | else | |
5521 | cat >conftest.$ac_ext <<_ACEOF | |
5522 | /* confdefs.h. */ | |
5523 | _ACEOF | |
5524 | cat confdefs.h >>conftest.$ac_ext | |
5525 | cat >>conftest.$ac_ext <<_ACEOF | |
5526 | /* end confdefs.h. */ | |
5527 | $ac_includes_default | |
5528 | long longval () { return (long) (sizeof (long long)); } | |
5529 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5530 | #include <stdio.h> | |
5531 | #include <stdlib.h> | |
5532 | int | |
5533 | main () | |
5534 | { | |
5535 | ||
5536 | FILE *f = fopen ("conftest.val", "w"); | |
5537 | if (! f) | |
5538 | exit (1); | |
5539 | if (((long) (sizeof (long long))) < 0) | |
5540 | { | |
5541 | long i = longval (); | |
5542 | if (i != ((long) (sizeof (long long)))) | |
5543 | exit (1); | |
5544 | fprintf (f, "%ld\n", i); | |
5545 | } | |
5546 | else | |
5547 | { | |
5548 | unsigned long i = ulongval (); | |
5549 | if (i != ((long) (sizeof (long long)))) | |
5550 | exit (1); | |
5551 | fprintf (f, "%lu\n", i); | |
5552 | } | |
5553 | exit (ferror (f) || fclose (f) != 0); | |
5554 | ||
5555 | ; | |
5556 | return 0; | |
5557 | } | |
5558 | _ACEOF | |
5559 | rm -f conftest$ac_exeext | |
5560 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5561 | (eval $ac_link) 2>&5 | |
5562 | ac_status=$? | |
5563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5564 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5566 | (eval $ac_try) 2>&5 | |
5567 | ac_status=$? | |
5568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5569 | (exit $ac_status); }; }; then | |
5570 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5571 | else | |
5572 | echo "$as_me: program exited with status $ac_status" >&5 | |
5573 | echo "$as_me: failed program was:" >&5 | |
5574 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5575 | ||
5576 | ( exit $ac_status ) | |
5577 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5578 | See \`config.log' for more details." >&5 | |
5579 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5580 | See \`config.log' for more details." >&2;} | |
5581 | { (exit 1); exit 1; }; } | |
5582 | fi | |
5583 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5584 | fi | |
5585 | fi | |
5586 | rm -f conftest.val | |
5587 | else | |
5588 | ac_cv_sizeof_long_long=0 | |
5589 | fi | |
5590 | fi | |
5591 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5592 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5593 | cat >>confdefs.h <<_ACEOF | |
5594 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5595 | _ACEOF | |
5596 | ||
5597 | ||
5598 | fi | |
5ec1c5e6 KC |
5599 | |
5600 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5601 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5602 | if test "${ac_cv_type___int64+set}" = set; then | |
5603 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5604 | else | |
5605 | cat >conftest.$ac_ext <<_ACEOF | |
5606 | /* confdefs.h. */ | |
5607 | _ACEOF | |
5608 | cat confdefs.h >>conftest.$ac_ext | |
5609 | cat >>conftest.$ac_ext <<_ACEOF | |
5610 | /* end confdefs.h. */ | |
5611 | $ac_includes_default | |
5612 | int | |
5613 | main () | |
5614 | { | |
5615 | if ((__int64 *) 0) | |
5616 | return 0; | |
5617 | if (sizeof (__int64)) | |
5618 | return 0; | |
5619 | ; | |
5620 | return 0; | |
5621 | } | |
5622 | _ACEOF | |
5623 | rm -f conftest.$ac_objext | |
5624 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5625 | (eval $ac_compile) 2>conftest.er1 | |
5626 | ac_status=$? | |
5627 | grep -v '^ *+' conftest.er1 >conftest.err | |
5628 | rm -f conftest.er1 | |
5629 | cat conftest.err >&5 | |
5630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5631 | (exit $ac_status); } && | |
ec6c7392 PB |
5632 | { ac_try='test -z "$ac_c_werror_flag" |
5633 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5634 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5635 | (eval $ac_try) 2>&5 | |
5636 | ac_status=$? | |
5637 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5638 | (exit $ac_status); }; } && | |
5639 | { ac_try='test -s conftest.$ac_objext' | |
5640 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5641 | (eval $ac_try) 2>&5 | |
5642 | ac_status=$? | |
5643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5644 | (exit $ac_status); }; }; then | |
5645 | ac_cv_type___int64=yes | |
5646 | else | |
5647 | echo "$as_me: failed program was:" >&5 | |
5648 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5649 | ||
5650 | ac_cv_type___int64=no | |
5651 | fi | |
5652 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5653 | fi | |
5654 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5655 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5656 | if test $ac_cv_type___int64 = yes; then | |
5657 | ||
5658 | cat >>confdefs.h <<_ACEOF | |
5659 | #define HAVE___INT64 1 | |
5660 | _ACEOF | |
5661 | ||
5662 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5663 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5664 | if test "${ac_cv_type___int64+set}" = set; then | |
5665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5666 | else | |
ba479fd2 | 5667 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5668 | /* confdefs.h. */ |
5669 | _ACEOF | |
5670 | cat confdefs.h >>conftest.$ac_ext | |
5671 | cat >>conftest.$ac_ext <<_ACEOF | |
5672 | /* end confdefs.h. */ | |
bf3b7cd3 | 5673 | $ac_includes_default |
ba479fd2 NN |
5674 | int |
5675 | main () | |
5676 | { | |
bf3b7cd3 JD |
5677 | if ((__int64 *) 0) |
5678 | return 0; | |
5679 | if (sizeof (__int64)) | |
5680 | return 0; | |
ba479fd2 NN |
5681 | ; |
5682 | return 0; | |
5683 | } | |
5684 | _ACEOF | |
5685 | rm -f conftest.$ac_objext | |
5686 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5687 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5688 | ac_status=$? |
86da66b5 HPN |
5689 | grep -v '^ *+' conftest.er1 >conftest.err |
5690 | rm -f conftest.er1 | |
5691 | cat conftest.err >&5 | |
ba479fd2 NN |
5692 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5693 | (exit $ac_status); } && | |
ec6c7392 PB |
5694 | { ac_try='test -z "$ac_c_werror_flag" |
5695 | || test ! -s conftest.err' | |
86da66b5 HPN |
5696 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5697 | (eval $ac_try) 2>&5 | |
5698 | ac_status=$? | |
5699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5700 | (exit $ac_status); }; } && | |
5701 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5703 | (eval $ac_try) 2>&5 | |
5704 | ac_status=$? | |
5705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5706 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5707 | ac_cv_type___int64=yes |
75b6f3fd | 5708 | else |
ba479fd2 NN |
5709 | echo "$as_me: failed program was:" >&5 |
5710 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5711 | ||
bf3b7cd3 | 5712 | ac_cv_type___int64=no |
75b6f3fd | 5713 | fi |
86da66b5 | 5714 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5715 | fi |
bf3b7cd3 JD |
5716 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5717 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5718 | |
bf3b7cd3 JD |
5719 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5720 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5721 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5722 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5723 | else |
bf3b7cd3 JD |
5724 | if test "$ac_cv_type___int64" = yes; then |
5725 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5726 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5727 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5728 | # This bug is HP SR number 8606223364. | |
5729 | if test "$cross_compiling" = yes; then | |
5730 | # Depending upon the size, compute the lo and hi bounds. | |
5731 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5732 | /* confdefs.h. */ |
5733 | _ACEOF | |
5734 | cat confdefs.h >>conftest.$ac_ext | |
5735 | cat >>conftest.$ac_ext <<_ACEOF | |
5736 | /* end confdefs.h. */ | |
bf3b7cd3 | 5737 | $ac_includes_default |
ba479fd2 NN |
5738 | int |
5739 | main () | |
5740 | { | |
bf3b7cd3 JD |
5741 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5742 | test_array [0] = 0 | |
5743 | ||
ba479fd2 NN |
5744 | ; |
5745 | return 0; | |
5746 | } | |
5747 | _ACEOF | |
5748 | rm -f conftest.$ac_objext | |
5749 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5750 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5751 | ac_status=$? |
86da66b5 HPN |
5752 | grep -v '^ *+' conftest.er1 >conftest.err |
5753 | rm -f conftest.er1 | |
5754 | cat conftest.err >&5 | |
ba479fd2 NN |
5755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5756 | (exit $ac_status); } && | |
ec6c7392 PB |
5757 | { ac_try='test -z "$ac_c_werror_flag" |
5758 | || test ! -s conftest.err' | |
86da66b5 HPN |
5759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5760 | (eval $ac_try) 2>&5 | |
5761 | ac_status=$? | |
5762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5763 | (exit $ac_status); }; } && | |
5764 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5765 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5766 | (eval $ac_try) 2>&5 | |
5767 | ac_status=$? | |
5768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5769 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5770 | ac_lo=0 ac_mid=0 |
5771 | while :; do | |
5772 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5773 | /* confdefs.h. */ |
5774 | _ACEOF | |
5775 | cat confdefs.h >>conftest.$ac_ext | |
5776 | cat >>conftest.$ac_ext <<_ACEOF | |
5777 | /* end confdefs.h. */ | |
bf3b7cd3 | 5778 | $ac_includes_default |
ba479fd2 NN |
5779 | int |
5780 | main () | |
5781 | { | |
bf3b7cd3 JD |
5782 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5783 | test_array [0] = 0 | |
5784 | ||
ba479fd2 NN |
5785 | ; |
5786 | return 0; | |
5787 | } | |
5788 | _ACEOF | |
5789 | rm -f conftest.$ac_objext | |
5790 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5791 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5792 | ac_status=$? |
86da66b5 HPN |
5793 | grep -v '^ *+' conftest.er1 >conftest.err |
5794 | rm -f conftest.er1 | |
5795 | cat conftest.err >&5 | |
ba479fd2 NN |
5796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5797 | (exit $ac_status); } && | |
ec6c7392 PB |
5798 | { ac_try='test -z "$ac_c_werror_flag" |
5799 | || test ! -s conftest.err' | |
86da66b5 HPN |
5800 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5801 | (eval $ac_try) 2>&5 | |
5802 | ac_status=$? | |
5803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5804 | (exit $ac_status); }; } && | |
5805 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5806 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5807 | (eval $ac_try) 2>&5 | |
5808 | ac_status=$? | |
5809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5810 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5811 | ac_hi=$ac_mid; break |
75e93faa | 5812 | else |
ba479fd2 NN |
5813 | echo "$as_me: failed program was:" >&5 |
5814 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5815 | ||
bf3b7cd3 JD |
5816 | ac_lo=`expr $ac_mid + 1` |
5817 | if test $ac_lo -le $ac_mid; then | |
5818 | ac_lo= ac_hi= | |
5819 | break | |
5820 | fi | |
5821 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5822 | fi |
86da66b5 | 5823 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5824 | done |
75e93faa | 5825 | else |
bf3b7cd3 JD |
5826 | echo "$as_me: failed program was:" >&5 |
5827 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5828 | ||
5829 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5830 | /* confdefs.h. */ |
5831 | _ACEOF | |
5832 | cat confdefs.h >>conftest.$ac_ext | |
5833 | cat >>conftest.$ac_ext <<_ACEOF | |
5834 | /* end confdefs.h. */ | |
bf3b7cd3 | 5835 | $ac_includes_default |
ba479fd2 NN |
5836 | int |
5837 | main () | |
5838 | { | |
bf3b7cd3 JD |
5839 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5840 | test_array [0] = 0 | |
5841 | ||
ba479fd2 NN |
5842 | ; |
5843 | return 0; | |
5844 | } | |
5845 | _ACEOF | |
5846 | rm -f conftest.$ac_objext | |
5847 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5848 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5849 | ac_status=$? |
86da66b5 HPN |
5850 | grep -v '^ *+' conftest.er1 >conftest.err |
5851 | rm -f conftest.er1 | |
5852 | cat conftest.err >&5 | |
ba479fd2 NN |
5853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5854 | (exit $ac_status); } && | |
ec6c7392 PB |
5855 | { ac_try='test -z "$ac_c_werror_flag" |
5856 | || test ! -s conftest.err' | |
86da66b5 HPN |
5857 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5858 | (eval $ac_try) 2>&5 | |
5859 | ac_status=$? | |
5860 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5861 | (exit $ac_status); }; } && | |
5862 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5863 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5864 | (eval $ac_try) 2>&5 | |
5865 | ac_status=$? | |
5866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5867 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5868 | ac_hi=-1 ac_mid=-1 |
5869 | while :; do | |
5870 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5871 | /* confdefs.h. */ |
5872 | _ACEOF | |
5873 | cat confdefs.h >>conftest.$ac_ext | |
5874 | cat >>conftest.$ac_ext <<_ACEOF | |
5875 | /* end confdefs.h. */ | |
bf3b7cd3 | 5876 | $ac_includes_default |
ba479fd2 NN |
5877 | int |
5878 | main () | |
5879 | { | |
bf3b7cd3 JD |
5880 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5881 | test_array [0] = 0 | |
5882 | ||
ba479fd2 NN |
5883 | ; |
5884 | return 0; | |
5885 | } | |
5886 | _ACEOF | |
5887 | rm -f conftest.$ac_objext | |
5888 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5889 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5890 | ac_status=$? |
86da66b5 HPN |
5891 | grep -v '^ *+' conftest.er1 >conftest.err |
5892 | rm -f conftest.er1 | |
5893 | cat conftest.err >&5 | |
ba479fd2 NN |
5894 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5895 | (exit $ac_status); } && | |
ec6c7392 PB |
5896 | { ac_try='test -z "$ac_c_werror_flag" |
5897 | || test ! -s conftest.err' | |
86da66b5 HPN |
5898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5899 | (eval $ac_try) 2>&5 | |
5900 | ac_status=$? | |
5901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5902 | (exit $ac_status); }; } && | |
5903 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5904 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5905 | (eval $ac_try) 2>&5 | |
5906 | ac_status=$? | |
5907 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5908 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5909 | ac_lo=$ac_mid; break |
04cabffc | 5910 | else |
ba479fd2 NN |
5911 | echo "$as_me: failed program was:" >&5 |
5912 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5913 | ||
bf3b7cd3 JD |
5914 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5915 | if test $ac_mid -le $ac_hi; then | |
5916 | ac_lo= ac_hi= | |
5917 | break | |
5918 | fi | |
5919 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5920 | fi |
86da66b5 | 5921 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5922 | done |
5923 | else | |
5924 | echo "$as_me: failed program was:" >&5 | |
5925 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5926 | |
bf3b7cd3 | 5927 | ac_lo= ac_hi= |
414d23ae | 5928 | fi |
bf3b7cd3 | 5929 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5930 | fi |
bf3b7cd3 JD |
5931 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5932 | # Binary search between lo and hi bounds. | |
5933 | while test "x$ac_lo" != "x$ac_hi"; do | |
5934 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5935 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5936 | /* confdefs.h. */ |
5937 | _ACEOF | |
5938 | cat confdefs.h >>conftest.$ac_ext | |
5939 | cat >>conftest.$ac_ext <<_ACEOF | |
5940 | /* end confdefs.h. */ | |
bf3b7cd3 | 5941 | $ac_includes_default |
ba479fd2 NN |
5942 | int |
5943 | main () | |
5944 | { | |
bf3b7cd3 JD |
5945 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5946 | test_array [0] = 0 | |
5947 | ||
ba479fd2 NN |
5948 | ; |
5949 | return 0; | |
5950 | } | |
5951 | _ACEOF | |
5952 | rm -f conftest.$ac_objext | |
5953 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5954 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5955 | ac_status=$? |
86da66b5 HPN |
5956 | grep -v '^ *+' conftest.er1 >conftest.err |
5957 | rm -f conftest.er1 | |
5958 | cat conftest.err >&5 | |
ba479fd2 NN |
5959 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5960 | (exit $ac_status); } && | |
ec6c7392 PB |
5961 | { ac_try='test -z "$ac_c_werror_flag" |
5962 | || test ! -s conftest.err' | |
86da66b5 HPN |
5963 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5964 | (eval $ac_try) 2>&5 | |
5965 | ac_status=$? | |
5966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5967 | (exit $ac_status); }; } && | |
5968 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5969 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5970 | (eval $ac_try) 2>&5 | |
5971 | ac_status=$? | |
5972 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5973 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5974 | ac_hi=$ac_mid |
75e93faa | 5975 | else |
ba479fd2 NN |
5976 | echo "$as_me: failed program was:" >&5 |
5977 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5978 | ||
bf3b7cd3 | 5979 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5980 | fi |
86da66b5 | 5981 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5982 | done |
bf3b7cd3 JD |
5983 | case $ac_lo in |
5984 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5985 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5986 | See \`config.log' for more details." >&5 | |
5987 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5988 | See \`config.log' for more details." >&2;} | |
5989 | { (exit 1); exit 1; }; } ;; | |
5990 | esac | |
5991 | else | |
5992 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5993 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5994 | See \`config.log' for more details." >&5 | |
5995 | echo "$as_me: error: cannot run test program while cross compiling | |
5996 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5997 | { (exit 1); exit 1; }; } |
5998 | else | |
5999 | cat >conftest.$ac_ext <<_ACEOF | |
6000 | /* confdefs.h. */ | |
6001 | _ACEOF | |
6002 | cat confdefs.h >>conftest.$ac_ext | |
6003 | cat >>conftest.$ac_ext <<_ACEOF | |
6004 | /* end confdefs.h. */ | |
6005 | $ac_includes_default | |
6006 | long longval () { return (long) (sizeof (__int64)); } | |
6007 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
6008 | #include <stdio.h> | |
6009 | #include <stdlib.h> | |
6010 | int | |
6011 | main () | |
6012 | { | |
414d23ae | 6013 | |
bf3b7cd3 JD |
6014 | FILE *f = fopen ("conftest.val", "w"); |
6015 | if (! f) | |
6016 | exit (1); | |
6017 | if (((long) (sizeof (__int64))) < 0) | |
6018 | { | |
6019 | long i = longval (); | |
6020 | if (i != ((long) (sizeof (__int64)))) | |
6021 | exit (1); | |
6022 | fprintf (f, "%ld\n", i); | |
6023 | } | |
6024 | else | |
6025 | { | |
6026 | unsigned long i = ulongval (); | |
6027 | if (i != ((long) (sizeof (__int64)))) | |
6028 | exit (1); | |
6029 | fprintf (f, "%lu\n", i); | |
6030 | } | |
6031 | exit (ferror (f) || fclose (f) != 0); | |
6032 | ||
6033 | ; | |
6034 | return 0; | |
6035 | } | |
6036 | _ACEOF | |
6037 | rm -f conftest$ac_exeext | |
6038 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6039 | (eval $ac_link) 2>&5 | |
6040 | ac_status=$? | |
6041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6042 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6043 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6044 | (eval $ac_try) 2>&5 | |
6045 | ac_status=$? | |
6046 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6047 | (exit $ac_status); }; }; then | |
6048 | ac_cv_sizeof___int64=`cat conftest.val` | |
6049 | else | |
6050 | echo "$as_me: program exited with status $ac_status" >&5 | |
6051 | echo "$as_me: failed program was:" >&5 | |
6052 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6053 | |
bf3b7cd3 JD |
6054 | ( exit $ac_status ) |
6055 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
6056 | See \`config.log' for more details." >&5 | |
6057 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
6058 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 6059 | { (exit 1); exit 1; }; } |
414d23ae | 6060 | fi |
bf3b7cd3 JD |
6061 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6062 | fi | |
6063 | fi | |
6064 | rm -f conftest.val | |
6065 | else | |
6066 | ac_cv_sizeof___int64=0 | |
6067 | fi | |
6068 | fi | |
ba479fd2 NN |
6069 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6070 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6071 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6072 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6073 | _ACEOF |
414d23ae | 6074 | |
cafe096b | 6075 | |
414d23ae HPN |
6076 | fi |
6077 | ||
5ec1c5e6 | 6078 | |
34a86c2b NN |
6079 | # --------------------- |
6080 | # Warnings and checking | |
6081 | # --------------------- | |
6082 | ||
b5472e1d NN |
6083 | # Check $CC warning features (if it's GCC). |
6084 | # We want to use -pedantic, but we don't want warnings about | |
6085 | # * 'long long' | |
6086 | # * variadic macros | |
89a42ac8 | 6087 | # * overlong strings |
b5472e1d NN |
6088 | # So, we only use -pedantic if we can disable those warnings. |
6089 | ||
6090 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6091 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6092 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6093 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6094 | else | |
6095 | save_CFLAGS="$CFLAGS" | |
6096 | CFLAGS="-Wno-long-long" | |
6097 | cat >conftest.$ac_ext <<_ACEOF | |
6098 | /* confdefs.h. */ | |
6099 | _ACEOF | |
6100 | cat confdefs.h >>conftest.$ac_ext | |
6101 | cat >>conftest.$ac_ext <<_ACEOF | |
6102 | /* end confdefs.h. */ | |
6103 | ||
6104 | _ACEOF | |
6105 | rm -f conftest.$ac_objext | |
6106 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6107 | (eval $ac_compile) 2>conftest.er1 | |
6108 | ac_status=$? | |
6109 | grep -v '^ *+' conftest.er1 >conftest.err | |
6110 | rm -f conftest.er1 | |
6111 | cat conftest.err >&5 | |
6112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6113 | (exit $ac_status); } && | |
ec6c7392 PB |
6114 | { ac_try='test -z "$ac_c_werror_flag" |
6115 | || test ! -s conftest.err' | |
b5472e1d NN |
6116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6117 | (eval $ac_try) 2>&5 | |
6118 | ac_status=$? | |
6119 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6120 | (exit $ac_status); }; } && | |
6121 | { ac_try='test -s conftest.$ac_objext' | |
6122 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6123 | (eval $ac_try) 2>&5 | |
6124 | ac_status=$? | |
6125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6126 | (exit $ac_status); }; }; then | |
6127 | ac_cv_prog_cc_w_no_long_long=yes | |
6128 | else | |
6129 | echo "$as_me: failed program was:" >&5 | |
6130 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6131 | ||
6132 | ac_cv_prog_cc_w_no_long_long=no | |
6133 | fi | |
6134 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6135 | CFLAGS="$save_CFLAGS" | |
6136 | ||
6137 | fi | |
6138 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6139 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6140 | ||
6141 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6142 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6143 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6144 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6145 | else | |
6146 | save_CFLAGS="$CFLAGS" | |
6147 | CFLAGS="-Wno-variadic-macros" | |
6148 | cat >conftest.$ac_ext <<_ACEOF | |
6149 | /* confdefs.h. */ | |
6150 | _ACEOF | |
6151 | cat confdefs.h >>conftest.$ac_ext | |
6152 | cat >>conftest.$ac_ext <<_ACEOF | |
6153 | /* end confdefs.h. */ | |
6154 | ||
6155 | _ACEOF | |
6156 | rm -f conftest.$ac_objext | |
6157 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6158 | (eval $ac_compile) 2>conftest.er1 | |
6159 | ac_status=$? | |
6160 | grep -v '^ *+' conftest.er1 >conftest.err | |
6161 | rm -f conftest.er1 | |
6162 | cat conftest.err >&5 | |
6163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6164 | (exit $ac_status); } && | |
ec6c7392 PB |
6165 | { ac_try='test -z "$ac_c_werror_flag" |
6166 | || test ! -s conftest.err' | |
b5472e1d NN |
6167 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6168 | (eval $ac_try) 2>&5 | |
6169 | ac_status=$? | |
6170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6171 | (exit $ac_status); }; } && | |
6172 | { ac_try='test -s conftest.$ac_objext' | |
6173 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6174 | (eval $ac_try) 2>&5 | |
6175 | ac_status=$? | |
6176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6177 | (exit $ac_status); }; }; then | |
6178 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6179 | else | |
6180 | echo "$as_me: failed program was:" >&5 | |
6181 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6182 | ||
6183 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6184 | fi | |
6185 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6186 | CFLAGS="$save_CFLAGS" | |
6187 | ||
6188 | fi | |
6189 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6190 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6191 | ||
89a42ac8 ZW |
6192 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 |
6193 | echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 | |
6194 | if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then | |
6195 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6196 | else | |
6197 | save_CFLAGS="$CFLAGS" | |
6198 | CFLAGS="-Wno-overlength-strings" | |
6199 | cat >conftest.$ac_ext <<_ACEOF | |
6200 | /* confdefs.h. */ | |
6201 | _ACEOF | |
6202 | cat confdefs.h >>conftest.$ac_ext | |
6203 | cat >>conftest.$ac_ext <<_ACEOF | |
6204 | /* end confdefs.h. */ | |
6205 | ||
6206 | _ACEOF | |
6207 | rm -f conftest.$ac_objext | |
6208 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6209 | (eval $ac_compile) 2>conftest.er1 | |
6210 | ac_status=$? | |
6211 | grep -v '^ *+' conftest.er1 >conftest.err | |
6212 | rm -f conftest.er1 | |
6213 | cat conftest.err >&5 | |
6214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6215 | (exit $ac_status); } && | |
ec6c7392 PB |
6216 | { ac_try='test -z "$ac_c_werror_flag" |
6217 | || test ! -s conftest.err' | |
89a42ac8 ZW |
6218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6219 | (eval $ac_try) 2>&5 | |
6220 | ac_status=$? | |
6221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6222 | (exit $ac_status); }; } && | |
6223 | { ac_try='test -s conftest.$ac_objext' | |
6224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6225 | (eval $ac_try) 2>&5 | |
6226 | ac_status=$? | |
6227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6228 | (exit $ac_status); }; }; then | |
6229 | ac_cv_prog_cc_w_no_overlength_strings=yes | |
6230 | else | |
6231 | echo "$as_me: failed program was:" >&5 | |
6232 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6233 | ||
6234 | ac_cv_prog_cc_w_no_overlength_strings=no | |
6235 | fi | |
6236 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6237 | CFLAGS="$save_CFLAGS" | |
6238 | ||
6239 | fi | |
6240 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 | |
6241 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 | |
6242 | ||
34a86c2b | 6243 | strict1_warn= |
b5472e1d | 6244 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
89a42ac8 ZW |
6245 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ |
6246 | && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then | |
6247 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
34a86c2b NN |
6248 | fi |
6249 | ||
643d3bd2 NN |
6250 | # Add -Wold-style-definition if it's accepted |
6251 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6252 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6253 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6254 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6255 | else | |
6256 | save_CFLAGS="$CFLAGS" | |
6257 | CFLAGS="-Wold-style-definition" | |
6258 | cat >conftest.$ac_ext <<_ACEOF | |
6259 | /* confdefs.h. */ | |
6260 | _ACEOF | |
6261 | cat confdefs.h >>conftest.$ac_ext | |
6262 | cat >>conftest.$ac_ext <<_ACEOF | |
6263 | /* end confdefs.h. */ | |
6264 | ||
6265 | _ACEOF | |
6266 | rm -f conftest.$ac_objext | |
6267 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6268 | (eval $ac_compile) 2>conftest.er1 | |
6269 | ac_status=$? | |
6270 | grep -v '^ *+' conftest.er1 >conftest.err | |
6271 | rm -f conftest.er1 | |
6272 | cat conftest.err >&5 | |
6273 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6274 | (exit $ac_status); } && | |
ec6c7392 PB |
6275 | { ac_try='test -z "$ac_c_werror_flag" |
6276 | || test ! -s conftest.err' | |
643d3bd2 NN |
6277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6278 | (eval $ac_try) 2>&5 | |
6279 | ac_status=$? | |
6280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6281 | (exit $ac_status); }; } && | |
6282 | { ac_try='test -s conftest.$ac_objext' | |
6283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6284 | (eval $ac_try) 2>&5 | |
6285 | ac_status=$? | |
6286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6287 | (exit $ac_status); }; }; then | |
6288 | ac_cv_prog_cc_w_old_style_definition=yes | |
6289 | else | |
6290 | echo "$as_me: failed program was:" >&5 | |
6291 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6292 | ||
6293 | ac_cv_prog_cc_w_old_style_definition=no | |
6294 | fi | |
6295 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6296 | CFLAGS="$save_CFLAGS" | |
6297 | ||
6298 | fi | |
6299 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6300 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6301 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6302 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6303 | fi | |
6304 | ||
ac0f3f39 KG |
6305 | # Add -Wmissing-format-attribute if it's accepted |
6306 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6307 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6308 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6309 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6310 | else | |
6311 | save_CFLAGS="$CFLAGS" | |
6312 | CFLAGS="-Wmissing-format-attribute" | |
6313 | cat >conftest.$ac_ext <<_ACEOF | |
6314 | /* confdefs.h. */ | |
6315 | _ACEOF | |
6316 | cat confdefs.h >>conftest.$ac_ext | |
6317 | cat >>conftest.$ac_ext <<_ACEOF | |
6318 | /* end confdefs.h. */ | |
6319 | ||
6320 | _ACEOF | |
6321 | rm -f conftest.$ac_objext | |
6322 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6323 | (eval $ac_compile) 2>conftest.er1 | |
6324 | ac_status=$? | |
6325 | grep -v '^ *+' conftest.er1 >conftest.err | |
6326 | rm -f conftest.er1 | |
6327 | cat conftest.err >&5 | |
6328 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6329 | (exit $ac_status); } && | |
ec6c7392 PB |
6330 | { ac_try='test -z "$ac_c_werror_flag" |
6331 | || test ! -s conftest.err' | |
ac0f3f39 KG |
6332 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6333 | (eval $ac_try) 2>&5 | |
6334 | ac_status=$? | |
6335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6336 | (exit $ac_status); }; } && | |
6337 | { ac_try='test -s conftest.$ac_objext' | |
6338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6339 | (eval $ac_try) 2>&5 | |
6340 | ac_status=$? | |
6341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6342 | (exit $ac_status); }; }; then | |
6343 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6344 | else | |
6345 | echo "$as_me: failed program was:" >&5 | |
6346 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6347 | ||
6348 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6349 | fi | |
6350 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6351 | CFLAGS="$save_CFLAGS" | |
6352 | ||
6353 | fi | |
6354 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6355 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6356 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6357 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6358 | fi | |
6359 | ||
09a9c095 NN |
6360 | # Enable -Werror, period. |
6361 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6362 | if test "${enable_werror_always+set}" = set; then | |
6363 | enableval="$enable_werror_always" | |
6364 | ||
6365 | else | |
6366 | enable_werror_always=no | |
6367 | fi; | |
6368 | if test x${enable_werror_always} = xyes ; then | |
6369 | strict1_warn="${strict1_warn} -Werror" | |
6370 | WERROR=-Werror | |
6371 | fi | |
6372 | ||
ac0f3f39 KG |
6373 | |
6374 | ||
373477bb GDR |
6375 | # Get C++ compatibility warning flag, if supported. |
6376 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 | |
6377 | echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 | |
6378 | if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then | |
6379 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6380 | else | |
6381 | save_CFLAGS="$CFLAGS" | |
6382 | CFLAGS="-Wc++-compat" | |
6383 | cat >conftest.$ac_ext <<_ACEOF | |
6384 | /* confdefs.h. */ | |
6385 | _ACEOF | |
6386 | cat confdefs.h >>conftest.$ac_ext | |
6387 | cat >>conftest.$ac_ext <<_ACEOF | |
6388 | /* end confdefs.h. */ | |
6389 | ||
6390 | _ACEOF | |
6391 | rm -f conftest.$ac_objext | |
6392 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6393 | (eval $ac_compile) 2>conftest.er1 | |
6394 | ac_status=$? | |
6395 | grep -v '^ *+' conftest.er1 >conftest.err | |
6396 | rm -f conftest.er1 | |
6397 | cat conftest.err >&5 | |
6398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6399 | (exit $ac_status); } && | |
ec6c7392 PB |
6400 | { ac_try='test -z "$ac_c_werror_flag" |
6401 | || test ! -s conftest.err' | |
373477bb GDR |
6402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6403 | (eval $ac_try) 2>&5 | |
6404 | ac_status=$? | |
6405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6406 | (exit $ac_status); }; } && | |
6407 | { ac_try='test -s conftest.$ac_objext' | |
6408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6409 | (eval $ac_try) 2>&5 | |
6410 | ac_status=$? | |
6411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6412 | (exit $ac_status); }; }; then | |
6413 | ac_cv_prog_cc_w_cxx_compat=yes | |
6414 | else | |
6415 | echo "$as_me: failed program was:" >&5 | |
6416 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6417 | ||
6418 | ac_cv_prog_cc_w_cxx_compat=no | |
6419 | fi | |
6420 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6421 | CFLAGS="$save_CFLAGS" | |
6422 | ||
6423 | fi | |
6424 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 | |
6425 | echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6 | |
6426 | if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then | |
6427 | cxx_compat_warn="-Wc++-compat" | |
6428 | fi | |
6429 | ||
6430 | ||
6431 | ||
ba479fd2 | 6432 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6433 | # That's useful for people building cross-compilers, or just running a |
6434 | # quick `make'. | |
6435 | warn_cflags= | |
6436 | if test "x$GCC" = "xyes"; then | |
6437 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6438 | fi | |
6439 | ||
6440 | ||
dd859b8a | 6441 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6442 | is_release= |
6443 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6444 | is_release=yes | |
6445 | fi | |
dd859b8a KG |
6446 | # Check whether --enable-werror or --disable-werror was given. |
6447 | if test "${enable_werror+set}" = set; then | |
6448 | enableval="$enable_werror" | |
ba479fd2 | 6449 | |
dd859b8a | 6450 | else |
06c37c96 NS |
6451 | if test x$is_release = x ; then |
6452 | # Default to "yes" on development branches. | |
dd859b8a | 6453 | enable_werror=yes |
06c37c96 NS |
6454 | else |
6455 | # Default to "no" on release branches. | |
6456 | enable_werror=no | |
6457 | fi | |
ba479fd2 | 6458 | fi; |
dd859b8a KG |
6459 | if test x$enable_werror = xyes ; then |
6460 | WERROR=-Werror | |
6461 | fi | |
6462 | ||
6463 | ||
414d23ae HPN |
6464 | # Enable expensive internal checks |
6465 | # Check whether --enable-checking or --disable-checking was given. | |
6466 | if test "${enable_checking+set}" = set; then | |
6467 | enableval="$enable_checking" | |
e1bbfc5c NS |
6468 | ac_checking_flags="${enableval}" |
6469 | else | |
6470 | ||
6471 | # Determine the default checks. | |
6472 | if test x$is_release = x ; then | |
6473 | ac_checking_flags=yes | |
6474 | else | |
6475 | ac_checking_flags=release | |
6476 | fi | |
6477 | fi; | |
6478 | ac_assert_checking=1 | |
6479 | ac_checking= | |
cdce5c16 NS |
6480 | ac_fold_checking= |
6481 | ac_gc_checking= | |
6482 | ac_gc_always_collect= | |
414d23ae HPN |
6483 | ac_rtl_checking= |
6484 | ac_rtlflag_checking= | |
b53ef395 | 6485 | ac_runtime_checking=1 |
cdce5c16 NS |
6486 | ac_tree_checking= |
6487 | ac_valgrind_checking= | |
e1bbfc5c NS |
6488 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6489 | for check in $ac_checking_flags | |
6490 | do | |
6491 | case $check in | |
cdce5c16 | 6492 | # these set all the flags to specific states |
e1bbfc5c | 6493 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6494 | ac_fold_checking= ; ac_gc_checking=1 ; |
6495 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6496 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6497 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6498 | no|none) ac_assert_checking= ; ac_checking= ; | |
6499 | ac_fold_checking= ; ac_gc_checking= ; | |
6500 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6501 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6502 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6503 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6504 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6505 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6506 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6507 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6508 | release) ac_assert_checking=1 ; ac_checking= ; | |
6509 | ac_fold_checking= ; ac_gc_checking= ; | |
6510 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6511 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6512 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6513 | # these enable particular checks | |
e1bbfc5c NS |
6514 | assert) ac_assert_checking=1 ;; |
6515 | fold) ac_fold_checking=1 ;; | |
6516 | gc) ac_gc_checking=1 ;; | |
6517 | gcac) ac_gc_always_collect=1 ;; | |
6518 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6519 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6520 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6521 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6522 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6523 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6524 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6525 | echo "$as_me: error: unknown check category $check" >&2;} |
6526 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6527 | esac |
6528 | done | |
6529 | IFS="$ac_save_IFS" | |
06c37c96 | 6530 | |
ba479fd2 NN |
6531 | nocommon_flag="" |
6532 | if test x$ac_checking != x ; then | |
6533 | ||
6534 | cat >>confdefs.h <<\_ACEOF | |
6535 | #define ENABLE_CHECKING 1 | |
6536 | _ACEOF | |
6537 | ||
6538 | nocommon_flag=-fno-common | |
6539 | fi | |
6540 | ||
06c37c96 NS |
6541 | if test x$ac_assert_checking != x ; then |
6542 | ||
6543 | cat >>confdefs.h <<\_ACEOF | |
6544 | #define ENABLE_ASSERT_CHECKING 1 | |
6545 | _ACEOF | |
6546 | ||
b53ef395 | 6547 | fi |
232b67d9 | 6548 | |
b53ef395 NS |
6549 | if test x$ac_runtime_checking != x ; then |
6550 | ||
6551 | cat >>confdefs.h <<\_ACEOF | |
6552 | #define ENABLE_RUNTIME_CHECKING 1 | |
6553 | _ACEOF | |
6554 | ||
06c37c96 | 6555 | fi |
ba479fd2 NN |
6556 | if test x$ac_tree_checking != x ; then |
6557 | ||
6558 | cat >>confdefs.h <<\_ACEOF | |
6559 | #define ENABLE_TREE_CHECKING 1 | |
6560 | _ACEOF | |
6561 | ||
13f05fd0 | 6562 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6563 | fi |
13f05fd0 | 6564 | |
ba479fd2 NN |
6565 | if test x$ac_rtl_checking != x ; then |
6566 | ||
6567 | cat >>confdefs.h <<\_ACEOF | |
6568 | #define ENABLE_RTL_CHECKING 1 | |
6569 | _ACEOF | |
6570 | ||
6571 | fi | |
6572 | if test x$ac_rtlflag_checking != x ; then | |
6573 | ||
6574 | cat >>confdefs.h <<\_ACEOF | |
6575 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6576 | _ACEOF | |
6577 | ||
6578 | fi | |
6579 | if test x$ac_gc_checking != x ; then | |
6580 | ||
6581 | cat >>confdefs.h <<\_ACEOF | |
6582 | #define ENABLE_GC_CHECKING 1 | |
6583 | _ACEOF | |
6584 | ||
6585 | fi | |
6586 | if test x$ac_gc_always_collect != x ; then | |
6587 | ||
6588 | cat >>confdefs.h <<\_ACEOF | |
6589 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6590 | _ACEOF | |
6591 | ||
6592 | fi | |
6593 | if test x$ac_fold_checking != x ; then | |
6594 | ||
6595 | cat >>confdefs.h <<\_ACEOF | |
6596 | #define ENABLE_FOLD_CHECKING 1 | |
6597 | _ACEOF | |
6598 | ||
6599 | fi | |
6600 | valgrind_path_defines= | |
6601 | valgrind_command= | |
6602 | ||
ba479fd2 NN |
6603 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6604 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6605 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6606 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6608 | fi | |
6609 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6610 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6611 | else | |
6612 | # Is the header compilable? | |
6613 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6614 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6615 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6616 | /* confdefs.h. */ |
6617 | _ACEOF | |
6618 | cat confdefs.h >>conftest.$ac_ext | |
6619 | cat >>conftest.$ac_ext <<_ACEOF | |
6620 | /* end confdefs.h. */ | |
6621 | $ac_includes_default | |
63cf211a | 6622 | #include <valgrind.h> |
ba479fd2 NN |
6623 | _ACEOF |
6624 | rm -f conftest.$ac_objext | |
6625 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6626 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6627 | ac_status=$? |
86da66b5 HPN |
6628 | grep -v '^ *+' conftest.er1 >conftest.err |
6629 | rm -f conftest.er1 | |
6630 | cat conftest.err >&5 | |
ba479fd2 NN |
6631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6632 | (exit $ac_status); } && | |
ec6c7392 PB |
6633 | { ac_try='test -z "$ac_c_werror_flag" |
6634 | || test ! -s conftest.err' | |
86da66b5 HPN |
6635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6636 | (eval $ac_try) 2>&5 | |
6637 | ac_status=$? | |
6638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6639 | (exit $ac_status); }; } && | |
6640 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6641 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6642 | (eval $ac_try) 2>&5 | |
6643 | ac_status=$? | |
6644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6645 | (exit $ac_status); }; }; then | |
6646 | ac_header_compiler=yes | |
6647 | else | |
6648 | echo "$as_me: failed program was:" >&5 | |
6649 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6650 | ||
6651 | ac_header_compiler=no | |
6652 | fi | |
86da66b5 | 6653 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6654 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6655 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6656 | ||
6657 | # Is the header present? | |
6658 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6659 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6660 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6661 | /* confdefs.h. */ |
6662 | _ACEOF | |
6663 | cat confdefs.h >>conftest.$ac_ext | |
6664 | cat >>conftest.$ac_ext <<_ACEOF | |
6665 | /* end confdefs.h. */ | |
6666 | #include <valgrind.h> | |
6667 | _ACEOF | |
6668 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6669 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6670 | ac_status=$? | |
6671 | grep -v '^ *+' conftest.er1 >conftest.err | |
6672 | rm -f conftest.er1 | |
6673 | cat conftest.err >&5 | |
6674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6675 | (exit $ac_status); } >/dev/null; then | |
6676 | if test -s conftest.err; then | |
6677 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6678 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6679 | else |
6680 | ac_cpp_err= | |
6681 | fi | |
6682 | else | |
6683 | ac_cpp_err=yes | |
6684 | fi | |
6685 | if test -z "$ac_cpp_err"; then | |
6686 | ac_header_preproc=yes | |
6687 | else | |
6688 | echo "$as_me: failed program was:" >&5 | |
6689 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6690 | ||
6691 | ac_header_preproc=no | |
6692 | fi | |
6693 | rm -f conftest.err conftest.$ac_ext | |
6694 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6695 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6696 | ||
6697 | # So? What about this header? | |
86da66b5 HPN |
6698 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6699 | yes:no: ) | |
ba479fd2 NN |
6700 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6701 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6702 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6703 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6704 | ac_header_preproc=yes | |
ba479fd2 | 6705 | ;; |
86da66b5 | 6706 | no:yes:* ) |
ba479fd2 NN |
6707 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6708 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6709 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6710 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6711 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6712 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6713 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6714 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6715 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6716 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6717 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6718 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6719 | ( |
6720 | cat <<\_ASBOX | |
86da66b5 HPN |
6721 | ## ------------------------------------------ ## |
6722 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6723 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6724 | _ASBOX |
6725 | ) | | |
6726 | sed "s/^/$as_me: WARNING: /" >&2 | |
6727 | ;; | |
6728 | esac | |
6729 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6730 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6731 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6732 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6733 | else | |
6734 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6735 | fi |
ba479fd2 NN |
6736 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6737 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6738 | ||
6e3f3080 | 6739 | fi |
ba479fd2 | 6740 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6741 | have_valgrind_h=yes |
6742 | else | |
ba479fd2 | 6743 | have_valgrind_h=no |
6938ec6c NN |
6744 | fi |
6745 | ||
6746 | ||
ba479fd2 | 6747 | |
cdce5c16 | 6748 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6749 | # It is certainly possible that there's valgrind but no valgrind.h. |
6750 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6751 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6752 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6753 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6754 | /* confdefs.h. */ |
6755 | _ACEOF | |
6756 | cat confdefs.h >>conftest.$ac_ext | |
6757 | cat >>conftest.$ac_ext <<_ACEOF | |
6758 | /* end confdefs.h. */ | |
a207b594 | 6759 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6760 | #ifndef VALGRIND_DISCARD |
6761 | #error VALGRIND_DISCARD not defined | |
6762 | #endif | |
ba479fd2 NN |
6763 | _ACEOF |
6764 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6765 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6766 | ac_status=$? | |
6767 | grep -v '^ *+' conftest.er1 >conftest.err | |
6768 | rm -f conftest.er1 | |
6769 | cat conftest.err >&5 | |
6770 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6771 | (exit $ac_status); } >/dev/null; then | |
6772 | if test -s conftest.err; then | |
6773 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6774 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6775 | else |
6776 | ac_cpp_err= | |
6777 | fi | |
6778 | else | |
6779 | ac_cpp_err=yes | |
6780 | fi | |
6781 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6782 | gcc_cv_header_valgrind_memcheck_h=yes |
6783 | else | |
ba479fd2 NN |
6784 | echo "$as_me: failed program was:" >&5 |
6785 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6786 | ||
a207b594 HPN |
6787 | gcc_cv_header_valgrind_memcheck_h=no |
6788 | fi | |
ba479fd2 NN |
6789 | rm -f conftest.err conftest.$ac_ext |
6790 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6791 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6792 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6793 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6794 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6795 | /* confdefs.h. */ |
6796 | _ACEOF | |
6797 | cat confdefs.h >>conftest.$ac_ext | |
6798 | cat >>conftest.$ac_ext <<_ACEOF | |
6799 | /* end confdefs.h. */ | |
a207b594 HPN |
6800 | #include <memcheck.h> |
6801 | #ifndef VALGRIND_DISCARD | |
6802 | #error VALGRIND_DISCARD not defined | |
6803 | #endif | |
ba479fd2 NN |
6804 | _ACEOF |
6805 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6806 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6807 | ac_status=$? | |
6808 | grep -v '^ *+' conftest.er1 >conftest.err | |
6809 | rm -f conftest.er1 | |
6810 | cat conftest.err >&5 | |
6811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6812 | (exit $ac_status); } >/dev/null; then | |
6813 | if test -s conftest.err; then | |
6814 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6815 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6816 | else |
6817 | ac_cpp_err= | |
6818 | fi | |
6819 | else | |
6820 | ac_cpp_err=yes | |
6821 | fi | |
6822 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6823 | gcc_cv_header_memcheck_h=yes |
6824 | else | |
ba479fd2 NN |
6825 | echo "$as_me: failed program was:" >&5 |
6826 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6827 | ||
cafe096b EC |
6828 | gcc_cv_header_memcheck_h=no |
6829 | fi | |
ba479fd2 NN |
6830 | rm -f conftest.err conftest.$ac_ext |
6831 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6832 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6833 | ||
56694dd9 ZW |
6834 | # Prepare PATH_SEPARATOR. |
6835 | # The user is always right. | |
6836 | if test "${PATH_SEPARATOR+set}" != set; then | |
6837 | echo "#! /bin/sh" >conf$$.sh | |
6838 | echo "exit 0" >>conf$$.sh | |
6839 | chmod +x conf$$.sh | |
6840 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6841 | PATH_SEPARATOR=';' | |
6842 | else | |
6843 | PATH_SEPARATOR=: | |
6844 | fi | |
6845 | rm -f conf$$.sh | |
6846 | fi | |
6847 | ||
6848 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6849 | # as systems may use methods other than mode bits to determine executability. | |
6850 | cat >conf$$.file <<_ASEOF | |
6851 | #! /bin/sh | |
6852 | exit 0 | |
6853 | _ASEOF | |
6854 | chmod +x conf$$.file | |
6855 | if test -x conf$$.file >/dev/null 2>&1; then | |
6856 | ac_executable_p="test -x" | |
6857 | else | |
6858 | ac_executable_p="test -f" | |
6859 | fi | |
6860 | rm -f conf$$.file | |
6861 | ||
6862 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6863 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6864 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6865 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6866 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6867 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6868 | else |
6869 | case "$valgrind_path" in | |
56694dd9 ZW |
6870 | [\\/]* | ?:[\\/]*) |
6871 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6872 | ;; | |
414d23ae | 6873 | *) |
56694dd9 ZW |
6874 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6875 | for ac_dir in $PATH; do | |
6876 | IFS="$ac_save_IFS" | |
6877 | test -z "$ac_dir" && ac_dir=. | |
6878 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6879 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6880 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6881 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6882 | break 2 | |
6883 | fi | |
6884 | fi | |
6885 | done | |
6886 | done | |
6887 | IFS="$ac_save_IFS" | |
6888 | ;; | |
414d23ae | 6889 | esac |
75e93faa | 6890 | fi |
414d23ae HPN |
6891 | valgrind_path="$ac_cv_path_valgrind_path" |
6892 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6893 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6894 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6895 | else |
ba479fd2 NN |
6896 | echo "$as_me:$LINENO: result: no" >&5 |
6897 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6898 | fi |
6899 | ||
a207b594 HPN |
6900 | if test "x$valgrind_path" = "x" \ |
6901 | || (test $have_valgrind_h = no \ | |
6902 | && test $gcc_cv_header_memcheck_h = no \ | |
6903 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6904 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6905 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6906 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6907 | fi |
6908 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6909 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6910 | |
6911 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6912 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6913 | _ACEOF |
75e93faa | 6914 | |
a207b594 | 6915 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6916 | |
6917 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6918 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6919 | _ACEOF |
a207b594 HPN |
6920 | |
6921 | fi | |
14011ca4 | 6922 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6923 | |
6924 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6925 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6926 | _ACEOF |
14011ca4 AJ |
6927 | |
6928 | fi | |
414d23ae | 6929 | fi |
75e93faa | 6930 | |
75e93faa ZW |
6931 | |
6932 | ||
74ee1642 PB |
6933 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6934 | if test "${enable_mapped_location+set}" = set; then | |
6935 | enableval="$enable_mapped_location" | |
6936 | ||
6937 | else | |
6938 | enable_mapped_location=no | |
6939 | fi; | |
6940 | ||
6941 | if test "$enable_mapped_location" = yes ; then | |
6942 | ||
6943 | cat >>confdefs.h <<\_ACEOF | |
6944 | #define USE_MAPPED_LOCATION 1 | |
6945 | _ACEOF | |
6946 | ||
6947 | fi | |
6948 | ||
414d23ae HPN |
6949 | # Enable code coverage collection |
6950 | # Check whether --enable-coverage or --disable-coverage was given. | |
6951 | if test "${enable_coverage+set}" = set; then | |
6952 | enableval="$enable_coverage" | |
6953 | case "${enableval}" in | |
6dd297da NN |
6954 | yes|noopt) |
6955 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6956 | ;; | |
6957 | opt) | |
6958 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6959 | ;; | |
6960 | no) | |
6961 | # a.k.a. --disable-coverage | |
6962 | coverage_flags="" | |
6963 | ;; | |
6964 | *) | |
6965 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6966 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6967 | { (exit 1); exit 1; }; } | |
6dd297da | 6968 | ;; |
414d23ae | 6969 | esac |
75e93faa | 6970 | else |
414d23ae | 6971 | coverage_flags="" |
ba479fd2 | 6972 | fi; |
5c3bc9fb | 6973 | |
414d23ae | 6974 | |
439a7e54 DN |
6975 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6976 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6977 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6978 | |
439a7e54 DN |
6979 | else |
6980 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6981 | fi; |
439a7e54 | 6982 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6983 | |
6984 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6985 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6986 | _ACEOF |
439a7e54 DN |
6987 | |
6988 | fi | |
6989 | ||
73458fb7 NN |
6990 | # ------------------------------- |
6991 | # Miscenalleous configure options | |
6992 | # ------------------------------- | |
34a86c2b NN |
6993 | |
6994 | # With stabs | |
ba479fd2 | 6995 | |
34a86c2b NN |
6996 | # Check whether --with-stabs or --without-stabs was given. |
6997 | if test "${with_stabs+set}" = set; then | |
6998 | withval="$with_stabs" | |
6999 | stabs="$with_stabs" | |
7000 | else | |
7001 | stabs=no | |
ba479fd2 | 7002 | fi; |
cafe096b | 7003 | |
34a86c2b NN |
7004 | # Determine whether or not multilibs are enabled. |
7005 | # Check whether --enable-multilib or --disable-multilib was given. | |
7006 | if test "${enable_multilib+set}" = set; then | |
7007 | enableval="$enable_multilib" | |
ba479fd2 | 7008 | |
34a86c2b NN |
7009 | else |
7010 | enable_multilib=yes | |
ba479fd2 | 7011 | fi; |
75e93faa | 7012 | |
34a86c2b | 7013 | |
414d23ae HPN |
7014 | # Enable __cxa_atexit for C++. |
7015 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
7016 | if test "${enable___cxa_atexit+set}" = set; then | |
7017 | enableval="$enable___cxa_atexit" | |
75e93faa | 7018 | |
ba479fd2 | 7019 | fi; |
75e93faa | 7020 | |
486aa804 BE |
7021 | # Enable C extension for decimal float if target supports it. |
7022 | # Check whether --enable-decimal-float or --disable-decimal-float was given. | |
7023 | if test "${enable_decimal_float+set}" = set; then | |
7024 | enableval="$enable_decimal_float" | |
7025 | ||
7026 | if test x$enablevar = xyes ; then | |
7027 | case $target in | |
7028 | powerpc*-*-linux* | i?86*-*-linux*) | |
a4a9df5f | 7029 | enable_decimal_float=yes |
486aa804 BE |
7030 | ;; |
7031 | *) | |
7032 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7033 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7034 | enable_decimal_float=no | |
7035 | ;; | |
7036 | esac | |
7037 | fi | |
7038 | ||
7039 | else | |
a4a9df5f | 7040 | enable_decimal_float=no |
486aa804 BE |
7041 | fi; |
7042 | ||
7043 | ||
7044 | ||
7045 | dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` | |
7046 | ||
7047 | cat >>confdefs.h <<_ACEOF | |
7048 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7049 | _ACEOF | |
7050 | ||
7051 | ||
414d23ae HPN |
7052 | # Enable threads |
7053 | # Pass with no value to take the default | |
7054 | # Pass with a value to specify a thread package | |
7055 | # Check whether --enable-threads or --disable-threads was given. | |
7056 | if test "${enable_threads+set}" = set; then | |
7057 | enableval="$enable_threads" | |
ba479fd2 | 7058 | |
414d23ae HPN |
7059 | else |
7060 | enable_threads='' | |
ba479fd2 | 7061 | fi; |
414d23ae | 7062 | |
8dea1cca DD |
7063 | # Check whether --enable-tls or --disable-tls was given. |
7064 | if test "${enable_tls+set}" = set; then | |
7065 | enableval="$enable_tls" | |
7066 | ||
7067 | case $enable_tls in | |
7068 | yes | no) ;; | |
7069 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7070 | Valid choices are 'yes' and 'no'." >&5 | |
7071 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7072 | Valid choices are 'yes' and 'no'." >&2;} | |
7073 | { (exit 1); exit 1; }; } ;; | |
7074 | esac | |
7075 | ||
7076 | else | |
7077 | enable_tls='' | |
7078 | fi; | |
7079 | ||
414d23ae HPN |
7080 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
7081 | if test "${enable_objc_gc+set}" = set; then | |
7082 | enableval="$enable_objc_gc" | |
7083 | if test x$enable_objc_gc = xno; then | |
7084 | objc_boehm_gc='' | |
7085 | else | |
7086 | objc_boehm_gc=1 | |
7087 | fi | |
7088 | else | |
7089 | objc_boehm_gc='' | |
ba479fd2 | 7090 | fi; |
75e93faa ZW |
7091 | |
7092 | ||
414d23ae HPN |
7093 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
7094 | if test "${with_dwarf2+set}" = set; then | |
7095 | withval="$with_dwarf2" | |
7096 | dwarf2="$with_dwarf2" | |
75e93faa | 7097 | else |
414d23ae | 7098 | dwarf2=no |
ba479fd2 | 7099 | fi; |
75e93faa | 7100 | |
414d23ae HPN |
7101 | # Check whether --enable-shared or --disable-shared was given. |
7102 | if test "${enable_shared+set}" = set; then | |
7103 | enableval="$enable_shared" | |
ba479fd2 | 7104 | |
414d23ae HPN |
7105 | case $enable_shared in |
7106 | yes | no) ;; | |
7107 | *) | |
7108 | enable_shared=no | |
7109 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7110 | for pkg in $enableval; do | |
7111 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7112 | enable_shared=yes | |
7113 | fi | |
7114 | done | |
7115 | IFS="$ac_save_ifs" | |
7116 | ;; | |
7117 | esac | |
7118 | ||
75e93faa | 7119 | else |
414d23ae | 7120 | enable_shared=yes |
ba479fd2 | 7121 | fi; |
75e93faa | 7122 | |
75e93faa | 7123 | |
75e93faa | 7124 | |
160633c6 MM |
7125 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
7126 | if test "${with_build_sysroot+set}" = set; then | |
7127 | withval="$with_build_sysroot" | |
7128 | ||
7129 | fi; | |
7130 | ||
7131 | ||
4977bab6 ZW |
7132 | # Check whether --with-sysroot or --without-sysroot was given. |
7133 | if test "${with_sysroot+set}" = set; then | |
7134 | withval="$with_sysroot" | |
ba479fd2 | 7135 | |
4977bab6 | 7136 | case ${with_sysroot} in |
caa55b1e | 7137 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7138 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7139 | esac | |
ba479fd2 | 7140 | |
4977bab6 ZW |
7141 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
7142 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
7143 | ||
047d636f DJ |
7144 | if test "x$exec_prefix" = xNONE; then |
7145 | if test "x$prefix" = xNONE; then | |
7146 | test_prefix=/usr/local | |
7147 | else | |
7148 | test_prefix=$prefix | |
7149 | fi | |
7150 | else | |
7151 | test_prefix=$exec_prefix | |
7152 | fi | |
7153 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
7154 | "${test_prefix}"|"${test_prefix}/"*|\ |
7155 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
7156 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7157 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7158 | ;; | |
7159 | esac | |
7160 | ||
4977bab6 | 7161 | else |
ba479fd2 | 7162 | |
4977bab6 | 7163 | TARGET_SYSTEM_ROOT= |
db720d9a | 7164 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7165 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7166 | ||
ba479fd2 | 7167 | fi; |
4977bab6 ZW |
7168 | |
7169 | ||
7170 | ||
7171 | ||
d1bd0ded | 7172 | # Build with intermodule optimisations |
d1bd0ded GK |
7173 | # Check whether --enable-intermodule or --disable-intermodule was given. |
7174 | if test "${enable_intermodule+set}" = set; then | |
7175 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
7176 | case ${enable_intermodule} in |
7177 | yes) onestep="-onestep";; | |
7178 | *) onestep="";; | |
d1bd0ded | 7179 | esac |
0c46c5c7 KC |
7180 | else |
7181 | onestep="" | |
ba479fd2 | 7182 | fi; |
d1bd0ded GK |
7183 | |
7184 | ||
f3c9f174 NN |
7185 | # Sanity check enable_languages in case someone does not run the toplevel |
7186 | # configure # script. | |
7187 | # Check whether --enable-languages or --disable-languages was given. | |
7188 | if test "${enable_languages+set}" = set; then | |
7189 | enableval="$enable_languages" | |
7190 | case ,${enable_languages}, in | |
7191 | ,,|,yes,) | |
7192 | # go safe -- we cannot be much sure without the toplevel | |
7193 | # configure's | |
7194 | # analysis of which target libs are present and usable | |
7195 | enable_languages=c | |
7196 | ;; | |
7197 | *,all,*) | |
7198 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7199 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7200 | { (exit 1); exit 1; }; } | |
7201 | ;; | |
7202 | *,c,*) | |
7203 | ;; | |
7204 | *) | |
7205 | enable_languages=c,${enable_languages} | |
7206 | ;; | |
7207 | esac | |
7208 | else | |
7209 | enable_languages=c | |
7210 | fi; | |
7211 | ||
9288b845 CD |
7212 | # Used by documentation targets |
7213 | ||
7214 | ||
7215 | ||
f3c9f174 | 7216 | |
73458fb7 NN |
7217 | # ------------------------- |
7218 | # Checks for other programs | |
7219 | # ------------------------- | |
5b67ad6f | 7220 | |
ba479fd2 NN |
7221 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7222 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7223 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7224 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7225 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7226 | else |
ba479fd2 | 7227 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7228 | all: |
ba479fd2 NN |
7229 | @echo 'ac_maketemp="$(MAKE)"' |
7230 | _ACEOF | |
e9a25f70 | 7231 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7232 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7233 | if test -n "$ac_maketemp"; then |
7234 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7235 | else | |
7236 | eval ac_cv_prog_make_${ac_make}_set=no | |
7237 | fi | |
ba479fd2 | 7238 | rm -f conftest.make |
e9a25f70 JL |
7239 | fi |
7240 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7241 | echo "$as_me:$LINENO: result: yes" >&5 |
7242 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7243 | SET_MAKE= |
7244 | else | |
ba479fd2 NN |
7245 | echo "$as_me:$LINENO: result: no" >&5 |
7246 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7247 | SET_MAKE="MAKE=${MAKE-make}" |
7248 | fi | |
7249 | ||
7250 | ||
861bb6c1 | 7251 | # Find some useful tools |
ba479fd2 | 7252 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7253 | do |
ba479fd2 | 7254 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7255 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7256 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7257 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7258 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7259 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7260 | else |
7261 | if test -n "$AWK"; then | |
7262 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7263 | else | |
ba479fd2 NN |
7264 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7265 | for as_dir in $PATH | |
7266 | do | |
7267 | IFS=$as_save_IFS | |
7268 | test -z "$as_dir" && as_dir=. | |
7269 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7270 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7271 | ac_cv_prog_AWK="$ac_prog" | |
7272 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7273 | break 2 | |
7274 | fi | |
7275 | done | |
7276 | done | |
7277 | ||
861bb6c1 JL |
7278 | fi |
7279 | fi | |
ba479fd2 | 7280 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7281 | if test -n "$AWK"; then |
ba479fd2 NN |
7282 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7283 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7284 | else |
ba479fd2 NN |
7285 | echo "$as_me:$LINENO: result: no" >&5 |
7286 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7287 | fi |
7288 | ||
ba479fd2 | 7289 | test -n "$AWK" && break |
861bb6c1 JL |
7290 | done |
7291 | ||
776dc15d | 7292 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7293 | # Bail out if it's missing. |
7294 | case ${AWK} in | |
ba479fd2 NN |
7295 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7296 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7297 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7298 | esac |
7299 | ||
ba479fd2 NN |
7300 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7301 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7302 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7303 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7304 | else |
7305 | rm -f conftestdata_t | |
7306 | echo >conftestdata_f | |
7307 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7308 | then | |
7309 | gcc_cv_prog_LN_S="ln -s" | |
7310 | else | |
7311 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7312 | then | |
7313 | gcc_cv_prog_LN_S=ln | |
7314 | else | |
35f06ae4 PB |
7315 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7316 | then | |
06c3418c | 7317 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7318 | else |
7319 | gcc_cv_prog_LN_S=cp | |
7320 | fi | |
0a4b6309 RL |
7321 | fi |
7322 | fi | |
7323 | rm -f conftestdata_f conftestdata_t | |
7324 | ||
7325 | fi | |
7326 | LN_S="$gcc_cv_prog_LN_S" | |
7327 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7328 | echo "$as_me:$LINENO: result: yes" >&5 |
7329 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7330 | else |
7331 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7332 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7333 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7334 | else |
35f06ae4 PB |
7335 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7336 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7337 | fi |
7338 | fi | |
7339 | ||
18fc9bd4 RG |
7340 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7341 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7342 | if test "${acx_cv_prog_LN+set}" = set; then | |
7343 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7344 | else | |
7345 | rm -f conftestdata_t | |
7346 | echo >conftestdata_f | |
7347 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7348 | then | |
7349 | acx_cv_prog_LN=ln | |
7350 | else | |
7351 | acx_cv_prog_LN=no | |
7352 | fi | |
7353 | rm -f conftestdata_f conftestdata_t | |
7354 | ||
7355 | fi | |
7356 | if test $acx_cv_prog_LN = no; then | |
7357 | LN="$LN_S" | |
7358 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7359 | echo "${ECHO_T}no, using $LN" >&6 | |
7360 | else | |
7361 | LN="$acx_cv_prog_LN" | |
7362 | echo "$as_me:$LINENO: result: yes" >&5 | |
7363 | echo "${ECHO_T}yes" >&6 | |
7364 | fi | |
7365 | ||
ba479fd2 NN |
7366 | if test -n "$ac_tool_prefix"; then |
7367 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7368 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7369 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7370 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7371 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7372 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7373 | else |
7374 | if test -n "$RANLIB"; then | |
7375 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7376 | else | |
ba479fd2 NN |
7377 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7378 | for as_dir in $PATH | |
7379 | do | |
7380 | IFS=$as_save_IFS | |
7381 | test -z "$as_dir" && as_dir=. | |
7382 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7383 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7384 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7385 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7386 | break 2 | |
7387 | fi | |
7388 | done | |
7389 | done | |
7390 | ||
6e3f3080 NN |
7391 | fi |
7392 | fi | |
ba479fd2 | 7393 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7394 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7395 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7396 | echo "${ECHO_T}$RANLIB" >&6 | |
7397 | else | |
7398 | echo "$as_me:$LINENO: result: no" >&5 | |
7399 | echo "${ECHO_T}no" >&6 | |
7400 | fi | |
7401 | ||
7402 | fi | |
7403 | if test -z "$ac_cv_prog_RANLIB"; then | |
7404 | ac_ct_RANLIB=$RANLIB | |
7405 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7406 | set dummy ranlib; ac_word=$2 | |
7407 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7408 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7409 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7410 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7411 | else | |
7412 | if test -n "$ac_ct_RANLIB"; then | |
7413 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7414 | else | |
7415 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7416 | for as_dir in $PATH | |
7417 | do | |
7418 | IFS=$as_save_IFS | |
7419 | test -z "$as_dir" && as_dir=. | |
7420 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7421 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7422 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7423 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7424 | break 2 | |
7425 | fi | |
7426 | done | |
7427 | done | |
7428 | ||
7429 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7430 | fi | |
7431 | fi | |
7432 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7433 | if test -n "$ac_ct_RANLIB"; then | |
7434 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7435 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7436 | else |
ba479fd2 NN |
7437 | echo "$as_me:$LINENO: result: no" >&5 |
7438 | echo "${ECHO_T}no" >&6 | |
7439 | fi | |
7440 | ||
7441 | RANLIB=$ac_ct_RANLIB | |
7442 | else | |
7443 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7444 | fi |
7445 | ||
343a6100 MM |
7446 | case "${host}" in |
7447 | *-*-darwin*) | |
7448 | # By default, the Darwin ranlib will not treat common symbols as | |
7449 | # definitions when building the archive table of contents. Other | |
7450 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7451 | # it behave similarly. | |
7452 | ranlib_flags="-c" | |
7453 | ;; | |
7454 | *) | |
7455 | ranlib_flags="" | |
7456 | esac | |
7457 | ||
7458 | ||
0a4b6309 RL |
7459 | # Find a good install program. We prefer a C program (faster), |
7460 | # so one script is as good as another. But avoid the broken or | |
7461 | # incompatible versions: | |
7462 | # SysV /etc/install, /usr/sbin/install | |
7463 | # SunOS /usr/etc/install | |
7464 | # IRIX /sbin/install | |
7465 | # AIX /bin/install | |
7466 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7467 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7468 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7469 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7470 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7471 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7472 | if test "${ac_cv_path_install+set}" = set; then |
7473 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7474 | else |
7475 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7476 | for ac_dir in $PATH; do | |
7477 | # Account for people who put trailing slashes in PATH elements. | |
7478 | case "$ac_dir/" in | |
7479 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7480 | *) | |
7481 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7482 | for ac_prog in ginstall scoinst install; do | |
7483 | if test -f $ac_dir/$ac_prog; then | |
7484 | if test $ac_prog = install && | |
7485 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7486 | # AIX install. It has an incompatible calling convention. | |
7487 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7488 | : | |
7489 | else | |
7490 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7491 | break 2 | |
7492 | fi | |
7493 | fi | |
7494 | done | |
7495 | ;; | |
7496 | esac | |
7497 | done | |
7498 | IFS="$ac_save_IFS" | |
7499 | ||
7500 | fi | |
7501 | if test "${ac_cv_path_install+set}" = set; then | |
7502 | INSTALL="$ac_cv_path_install" | |
7503 | else | |
7504 | # As a last resort, use the slow shell script. We don't cache a | |
7505 | # path for INSTALL within a source directory, because that will | |
7506 | # break other packages using the cache if that directory is | |
7507 | # removed, or if the path is relative. | |
7508 | INSTALL="$ac_install_sh" | |
7509 | fi | |
7510 | fi | |
ba479fd2 NN |
7511 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7512 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7513 | |
7514 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7515 | # It thinks the first close brace ends the variable substitution. | |
7516 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7517 | ||
7518 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7519 | ||
861bb6c1 | 7520 | |
3a000df0 | 7521 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7522 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7523 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7524 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7525 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7526 | else |
7527 | echo abfoo >t1 | |
7528 | echo cdfoo >t2 | |
269a7343 | 7529 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7530 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7531 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7532 | : |
3a000df0 KC |
7533 | else |
7534 | gcc_cv_prog_cmp_skip=gnucompare | |
7535 | fi | |
269a7343 KG |
7536 | fi |
7537 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7538 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7539 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7540 | : | |
7541 | else | |
7542 | gcc_cv_prog_cmp_skip=fastcompare | |
7543 | fi | |
7544 | fi | |
3a000df0 KC |
7545 | fi |
7546 | rm t1 t2 | |
7547 | ||
7548 | fi | |
ba479fd2 NN |
7549 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7550 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7551 | make_compare_target=$gcc_cv_prog_cmp_skip |
7552 | ||
7553 | ||
7554 | ||
73458fb7 NN |
7555 | # See if we have the mktemp command. |
7556 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7557 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7558 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7559 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7560 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7561 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7562 | else |
7563 | if test -n "$have_mktemp_command"; then | |
7564 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7565 | else | |
ba479fd2 NN |
7566 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7567 | for as_dir in $PATH | |
7568 | do | |
7569 | IFS=$as_save_IFS | |
7570 | test -z "$as_dir" && as_dir=. | |
7571 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7572 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7573 | ac_cv_prog_have_mktemp_command="yes" | |
7574 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7575 | break 2 | |
7576 | fi | |
7577 | done | |
7578 | done | |
7579 | ||
73458fb7 NN |
7580 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7581 | fi | |
7582 | fi | |
ba479fd2 | 7583 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7584 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7585 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7586 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7587 | else |
ba479fd2 NN |
7588 | echo "$as_me:$LINENO: result: no" >&5 |
7589 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7590 | fi |
7591 | ||
7592 | ||
7c27e184 PB |
7593 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7594 | ||
7595 | # See if makeinfo has been installed and is modern enough | |
7596 | # that we can use it. | |
9f18db39 PB |
7597 | |
7598 | ac_executable_extensions="$build_exeext" | |
7599 | ||
7c27e184 | 7600 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7601 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7602 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7603 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7604 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7605 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7606 | else |
7607 | if test -n "$MAKEINFO"; then | |
7608 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7609 | else | |
ba479fd2 NN |
7610 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7611 | for as_dir in $PATH | |
7612 | do | |
7613 | IFS=$as_save_IFS | |
7614 | test -z "$as_dir" && as_dir=. | |
7615 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7616 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7617 | ac_cv_prog_MAKEINFO="makeinfo" | |
7618 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7619 | break 2 | |
7620 | fi | |
7621 | done | |
7622 | done | |
7623 | ||
73458fb7 NN |
7624 | fi |
7625 | fi | |
ba479fd2 | 7626 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7627 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7628 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7629 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7630 | else |
ba479fd2 NN |
7631 | echo "$as_me:$LINENO: result: no" >&5 |
7632 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7633 | fi |
7634 | ||
7635 | if test -n "$MAKEINFO"; then | |
7636 | # Found it, now check the version. | |
ba479fd2 NN |
7637 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7638 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7639 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7640 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7641 | else |
7642 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7643 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
1546bb64 | 7644 | echo "configure:7644: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7645 | case $ac_prog_version in |
7646 | '') gcc_cv_prog_makeinfo_modern=no;; | |
1a598a97 | 7647 | 4.[4-9]*) |
73458fb7 NN |
7648 | gcc_cv_prog_makeinfo_modern=yes;; |
7649 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7650 | esac | |
7651 | ||
7652 | fi | |
ba479fd2 NN |
7653 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7654 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7655 | else |
7656 | gcc_cv_prog_makeinfo_modern=no | |
7657 | fi | |
7658 | ||
73458fb7 | 7659 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7660 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7661 | { echo "$as_me:$LINENO: WARNING: |
7662 | *** Makeinfo is missing or too old. | |
7663 | *** Info documentation will not be built." >&5 | |
7664 | echo "$as_me: WARNING: | |
cafe096b | 7665 | *** Makeinfo is missing or too old. |
ba479fd2 | 7666 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7667 | BUILD_INFO= |
7668 | else | |
ba479fd2 | 7669 | BUILD_INFO=info |
73458fb7 NN |
7670 | fi |
7671 | ||
7c27e184 | 7672 | |
73458fb7 | 7673 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7674 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7675 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7676 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7677 | echo "$as_me:$LINENO: result: yes" >&5 |
7678 | echo "${ECHO_T}yes" >&6 | |
7679 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7680 | else |
ba479fd2 NN |
7681 | echo "$as_me:$LINENO: result: no" >&5 |
7682 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7683 | GENERATED_MANPAGES= |
7684 | fi | |
7685 | ||
7c27e184 | 7686 | |
73458fb7 | 7687 | # How about lex? |
7c27e184 PB |
7688 | for ac_prog in flex |
7689 | do | |
7690 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7691 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7692 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7693 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7694 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7695 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7696 | else |
7697 | if test -n "$FLEX"; then | |
7698 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7699 | else | |
ba479fd2 NN |
7700 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7701 | for as_dir in $PATH | |
7702 | do | |
7703 | IFS=$as_save_IFS | |
7704 | test -z "$as_dir" && as_dir=. | |
7705 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7706 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7707 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7708 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7709 | break 2 | |
7710 | fi | |
7711 | done | |
7712 | done | |
7713 | ||
73458fb7 NN |
7714 | fi |
7715 | fi | |
ba479fd2 | 7716 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7717 | if test -n "$FLEX"; then |
ba479fd2 NN |
7718 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7719 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7720 | else |
ba479fd2 NN |
7721 | echo "$as_me:$LINENO: result: no" >&5 |
7722 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7723 | fi |
7724 | ||
7c27e184 PB |
7725 | test -n "$FLEX" && break |
7726 | done | |
7727 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7728 | ||
73458fb7 NN |
7729 | |
7730 | # Bison? | |
7c27e184 PB |
7731 | for ac_prog in bison |
7732 | do | |
7733 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7734 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7735 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7736 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7737 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7739 | else |
7740 | if test -n "$BISON"; then | |
7741 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7742 | else | |
ba479fd2 NN |
7743 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7744 | for as_dir in $PATH | |
7745 | do | |
7746 | IFS=$as_save_IFS | |
7747 | test -z "$as_dir" && as_dir=. | |
7748 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7749 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7750 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7751 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7752 | break 2 | |
7753 | fi | |
7754 | done | |
7755 | done | |
7756 | ||
73458fb7 NN |
7757 | fi |
7758 | fi | |
ba479fd2 | 7759 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7760 | if test -n "$BISON"; then |
ba479fd2 NN |
7761 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7762 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7763 | else |
ba479fd2 NN |
7764 | echo "$as_me:$LINENO: result: no" >&5 |
7765 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7766 | fi |
7767 | ||
7c27e184 PB |
7768 | test -n "$BISON" && break |
7769 | done | |
7770 | test -n "$BISON" || BISON="$MISSING bison" | |
7771 | ||
7772 | ||
7773 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7774 | # check for build == host before using them. | |
73458fb7 | 7775 | |
f6a874ac | 7776 | # NM |
414adbdd GK |
7777 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7778 | && test -d ../binutils ; then | |
f6a874ac JW |
7779 | NM='$(objdir)/../binutils/nm-new' |
7780 | else | |
7781 | # Extract the first word of "nm", so it can be a program name with args. | |
7782 | set dummy nm; ac_word=$2 | |
7783 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7784 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7785 | if test "${ac_cv_prog_NM+set}" = set; then | |
7786 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7787 | else | |
7788 | if test -n "$NM"; then | |
7789 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7790 | else | |
7791 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7792 | for as_dir in $PATH | |
7793 | do | |
7794 | IFS=$as_save_IFS | |
7795 | test -z "$as_dir" && as_dir=. | |
7796 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7797 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7798 | ac_cv_prog_NM="nm" | |
7799 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7800 | break 2 | |
7801 | fi | |
7802 | done | |
7803 | done | |
7804 | ||
7805 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7806 | fi | |
7807 | fi | |
7808 | NM=$ac_cv_prog_NM | |
7809 | if test -n "$NM"; then | |
7810 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7811 | echo "${ECHO_T}$NM" >&6 | |
7812 | else | |
7813 | echo "$as_me:$LINENO: result: no" >&5 | |
7814 | echo "${ECHO_T}no" >&6 | |
7815 | fi | |
7816 | ||
7817 | fi | |
7818 | ||
7819 | # AR | |
414adbdd GK |
7820 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7821 | && test -d ../binutils ; then | |
f6a874ac JW |
7822 | AR='$(objdir)/../binutils/ar' |
7823 | else | |
7824 | # Extract the first word of "ar", so it can be a program name with args. | |
7825 | set dummy ar; ac_word=$2 | |
7826 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7827 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7828 | if test "${ac_cv_prog_AR+set}" = set; then | |
7829 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7830 | else | |
7831 | if test -n "$AR"; then | |
7832 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7833 | else | |
7834 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7835 | for as_dir in $PATH | |
7836 | do | |
7837 | IFS=$as_save_IFS | |
7838 | test -z "$as_dir" && as_dir=. | |
7839 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7840 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7841 | ac_cv_prog_AR="ar" | |
7842 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7843 | break 2 | |
7844 | fi | |
7845 | done | |
7846 | done | |
7847 | ||
7848 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7849 | fi | |
7850 | fi | |
7851 | AR=$ac_cv_prog_AR | |
7852 | if test -n "$AR"; then | |
7853 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7854 | echo "${ECHO_T}$AR" >&6 | |
7855 | else | |
7856 | echo "$as_me:$LINENO: result: no" >&5 | |
7857 | echo "${ECHO_T}no" >&6 | |
7858 | fi | |
7859 | ||
7860 | fi | |
7861 | ||
7862 | ||
73458fb7 NN |
7863 | # -------------------- |
7864 | # Checks for C headers | |
7865 | # -------------------- | |
7866 | ||
ba479fd2 NN |
7867 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7868 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7869 | if test "${gcc_cv_glibc+set}" = set; then | |
7870 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7871 | else | |
7872 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7873 | /* confdefs.h. */ |
7874 | _ACEOF | |
7875 | cat confdefs.h >>conftest.$ac_ext | |
7876 | cat >>conftest.$ac_ext <<_ACEOF | |
7877 | /* end confdefs.h. */ | |
73458fb7 | 7878 | #include <features.h> |
ba479fd2 NN |
7879 | int |
7880 | main () | |
7881 | { | |
73458fb7 NN |
7882 | |
7883 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7884 | #error Not a GNU C library system | |
7885 | #endif | |
ba479fd2 NN |
7886 | ; |
7887 | return 0; | |
7888 | } | |
7889 | _ACEOF | |
7890 | rm -f conftest.$ac_objext | |
7891 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7892 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7893 | ac_status=$? |
86da66b5 HPN |
7894 | grep -v '^ *+' conftest.er1 >conftest.err |
7895 | rm -f conftest.er1 | |
7896 | cat conftest.err >&5 | |
ba479fd2 NN |
7897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7898 | (exit $ac_status); } && | |
ec6c7392 PB |
7899 | { ac_try='test -z "$ac_c_werror_flag" |
7900 | || test ! -s conftest.err' | |
86da66b5 HPN |
7901 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7902 | (eval $ac_try) 2>&5 | |
7903 | ac_status=$? | |
7904 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7905 | (exit $ac_status); }; } && | |
7906 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7907 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7908 | (eval $ac_try) 2>&5 | |
7909 | ac_status=$? | |
7910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7911 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7912 | gcc_cv_glibc=yes |
7913 | else | |
ba479fd2 NN |
7914 | echo "$as_me: failed program was:" >&5 |
7915 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7916 | ||
7917 | gcc_cv_glibc=no | |
73458fb7 | 7918 | fi |
86da66b5 | 7919 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7920 | fi |
7921 | ||
ba479fd2 NN |
7922 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7923 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7924 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7925 | |
7926 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7927 | #define _GNU_SOURCE 1 |
ba479fd2 | 7928 | _ACEOF |
73458fb7 NN |
7929 | |
7930 | fi | |
7931 | ||
ca9bc441 NN |
7932 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7933 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 7934 | |
ca9bc441 NN |
7935 | ac_c_preproc_warn_flag=yes |
7936 | ||
ba479fd2 NN |
7937 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7938 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7939 | if test "${ac_cv_header_stdc+set}" = set; then | |
7940 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7941 | else |
ba479fd2 | 7942 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7943 | /* confdefs.h. */ |
7944 | _ACEOF | |
7945 | cat confdefs.h >>conftest.$ac_ext | |
7946 | cat >>conftest.$ac_ext <<_ACEOF | |
7947 | /* end confdefs.h. */ | |
956d6950 JL |
7948 | #include <stdlib.h> |
7949 | #include <stdarg.h> | |
7950 | #include <string.h> | |
7951 | #include <float.h> | |
ba479fd2 NN |
7952 | |
7953 | int | |
7954 | main () | |
7955 | { | |
7956 | ||
7957 | ; | |
7958 | return 0; | |
7959 | } | |
7960 | _ACEOF | |
7961 | rm -f conftest.$ac_objext | |
7962 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7963 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7964 | ac_status=$? |
86da66b5 HPN |
7965 | grep -v '^ *+' conftest.er1 >conftest.err |
7966 | rm -f conftest.er1 | |
7967 | cat conftest.err >&5 | |
ba479fd2 NN |
7968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7969 | (exit $ac_status); } && | |
ec6c7392 PB |
7970 | { ac_try='test -z "$ac_c_werror_flag" |
7971 | || test ! -s conftest.err' | |
86da66b5 HPN |
7972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7973 | (eval $ac_try) 2>&5 | |
7974 | ac_status=$? | |
7975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7976 | (exit $ac_status); }; } && | |
7977 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7978 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7979 | (eval $ac_try) 2>&5 | |
7980 | ac_status=$? | |
7981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7982 | (exit $ac_status); }; }; then | |
956d6950 JL |
7983 | ac_cv_header_stdc=yes |
7984 | else | |
ba479fd2 NN |
7985 | echo "$as_me: failed program was:" >&5 |
7986 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7987 | ||
7988 | ac_cv_header_stdc=no | |
956d6950 | 7989 | fi |
86da66b5 | 7990 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
7991 | |
7992 | if test $ac_cv_header_stdc = yes; then | |
7993 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 7994 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7995 | /* confdefs.h. */ |
7996 | _ACEOF | |
7997 | cat confdefs.h >>conftest.$ac_ext | |
7998 | cat >>conftest.$ac_ext <<_ACEOF | |
7999 | /* end confdefs.h. */ | |
956d6950 | 8000 | #include <string.h> |
ba479fd2 NN |
8001 | |
8002 | _ACEOF | |
956d6950 | 8003 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8004 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
8005 | : |
8006 | else | |
956d6950 JL |
8007 | ac_cv_header_stdc=no |
8008 | fi | |
8009 | rm -f conftest* | |
8010 | ||
8011 | fi | |
8012 | ||
8013 | if test $ac_cv_header_stdc = yes; then | |
8014 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8015 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8016 | /* confdefs.h. */ |
8017 | _ACEOF | |
8018 | cat confdefs.h >>conftest.$ac_ext | |
8019 | cat >>conftest.$ac_ext <<_ACEOF | |
8020 | /* end confdefs.h. */ | |
956d6950 | 8021 | #include <stdlib.h> |
ba479fd2 NN |
8022 | |
8023 | _ACEOF | |
956d6950 | 8024 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8025 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8026 | : |
8027 | else | |
956d6950 JL |
8028 | ac_cv_header_stdc=no |
8029 | fi | |
8030 | rm -f conftest* | |
8031 | ||
8032 | fi | |
8033 | ||
8034 | if test $ac_cv_header_stdc = yes; then | |
8035 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8036 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8037 | : |
8038 | else | |
ba479fd2 | 8039 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8040 | /* confdefs.h. */ |
8041 | _ACEOF | |
8042 | cat confdefs.h >>conftest.$ac_ext | |
8043 | cat >>conftest.$ac_ext <<_ACEOF | |
8044 | /* end confdefs.h. */ | |
956d6950 | 8045 | #include <ctype.h> |
ba479fd2 NN |
8046 | #if ((' ' & 0x0FF) == 0x020) |
8047 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8048 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8049 | #else | |
8050 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8051 | (('a' <= (c) && (c) <= 'i') \ |
8052 | || ('j' <= (c) && (c) <= 'r') \ | |
8053 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8054 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8055 | #endif | |
63cf211a | 8056 | |
ba479fd2 NN |
8057 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8058 | int | |
8059 | main () | |
8060 | { | |
8061 | int i; | |
8062 | for (i = 0; i < 256; i++) | |
8063 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8064 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
8065 | exit(2); |
8066 | exit (0); | |
8067 | } | |
8068 | _ACEOF | |
8069 | rm -f conftest$ac_exeext | |
8070 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8071 | (eval $ac_link) 2>&5 | |
8072 | ac_status=$? | |
8073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8074 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8075 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8076 | (eval $ac_try) 2>&5 | |
8077 | ac_status=$? | |
8078 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8079 | (exit $ac_status); }; }; then | |
956d6950 JL |
8080 | : |
8081 | else | |
ba479fd2 NN |
8082 | echo "$as_me: program exited with status $ac_status" >&5 |
8083 | echo "$as_me: failed program was:" >&5 | |
8084 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8085 | ||
8086 | ( exit $ac_status ) | |
8087 | ac_cv_header_stdc=no | |
956d6950 | 8088 | fi |
86da66b5 | 8089 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8090 | fi |
956d6950 JL |
8091 | fi |
8092 | fi | |
ba479fd2 NN |
8093 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8094 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 8095 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8096 | |
8097 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8098 | #define STDC_HEADERS 1 |
ba479fd2 | 8099 | _ACEOF |
956d6950 JL |
8100 | |
8101 | fi | |
8102 | ||
ba479fd2 NN |
8103 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8104 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
8105 | if test "${ac_cv_header_time+set}" = set; then | |
8106 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8107 | else |
ba479fd2 | 8108 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8109 | /* confdefs.h. */ |
8110 | _ACEOF | |
8111 | cat confdefs.h >>conftest.$ac_ext | |
8112 | cat >>conftest.$ac_ext <<_ACEOF | |
8113 | /* end confdefs.h. */ | |
956d6950 JL |
8114 | #include <sys/types.h> |
8115 | #include <sys/time.h> | |
8116 | #include <time.h> | |
ba479fd2 NN |
8117 | |
8118 | int | |
8119 | main () | |
8120 | { | |
8121 | if ((struct tm *) 0) | |
8122 | return 0; | |
8123 | ; | |
8124 | return 0; | |
8125 | } | |
8126 | _ACEOF | |
8127 | rm -f conftest.$ac_objext | |
8128 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8129 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8130 | ac_status=$? |
86da66b5 HPN |
8131 | grep -v '^ *+' conftest.er1 >conftest.err |
8132 | rm -f conftest.er1 | |
8133 | cat conftest.err >&5 | |
ba479fd2 NN |
8134 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8135 | (exit $ac_status); } && | |
ec6c7392 PB |
8136 | { ac_try='test -z "$ac_c_werror_flag" |
8137 | || test ! -s conftest.err' | |
86da66b5 HPN |
8138 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8139 | (eval $ac_try) 2>&5 | |
8140 | ac_status=$? | |
8141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8142 | (exit $ac_status); }; } && | |
8143 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8144 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8145 | (eval $ac_try) 2>&5 | |
8146 | ac_status=$? | |
8147 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8148 | (exit $ac_status); }; }; then | |
956d6950 JL |
8149 | ac_cv_header_time=yes |
8150 | else | |
ba479fd2 NN |
8151 | echo "$as_me: failed program was:" >&5 |
8152 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8153 | ||
8154 | ac_cv_header_time=no | |
956d6950 | 8155 | fi |
86da66b5 | 8156 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8157 | fi |
ba479fd2 NN |
8158 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8159 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 8160 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8161 | |
8162 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8163 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8164 | _ACEOF |
956d6950 JL |
8165 | |
8166 | fi | |
8167 | ||
18fc9bd4 RG |
8168 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8169 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
8170 | if test "${gcc_cv_header_string+set}" = set; then | |
8171 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8172 | else | |
8173 | cat >conftest.$ac_ext <<_ACEOF | |
8174 | /* confdefs.h. */ | |
8175 | _ACEOF | |
8176 | cat confdefs.h >>conftest.$ac_ext | |
8177 | cat >>conftest.$ac_ext <<_ACEOF | |
8178 | /* end confdefs.h. */ | |
8179 | #include <string.h> | |
8180 | #include <strings.h> | |
8181 | int | |
8182 | main () | |
8183 | { | |
8184 | ||
8185 | ; | |
8186 | return 0; | |
8187 | } | |
8188 | _ACEOF | |
8189 | rm -f conftest.$ac_objext | |
8190 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8191 | (eval $ac_compile) 2>conftest.er1 | |
8192 | ac_status=$? | |
8193 | grep -v '^ *+' conftest.er1 >conftest.err | |
8194 | rm -f conftest.er1 | |
8195 | cat conftest.err >&5 | |
8196 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8197 | (exit $ac_status); } && | |
8198 | { ac_try='test -z "$ac_c_werror_flag" | |
8199 | || test ! -s conftest.err' | |
8200 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8201 | (eval $ac_try) 2>&5 | |
8202 | ac_status=$? | |
8203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8204 | (exit $ac_status); }; } && | |
8205 | { ac_try='test -s conftest.$ac_objext' | |
8206 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8207 | (eval $ac_try) 2>&5 | |
8208 | ac_status=$? | |
8209 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8210 | (exit $ac_status); }; }; then | |
8211 | gcc_cv_header_string=yes | |
8212 | else | |
8213 | echo "$as_me: failed program was:" >&5 | |
8214 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8215 | ||
8216 | gcc_cv_header_string=no | |
8217 | fi | |
8218 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8219 | fi | |
8220 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8221 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8222 | if test $gcc_cv_header_string = yes; then | |
8223 | ||
8224 | cat >>confdefs.h <<\_ACEOF | |
8225 | #define STRING_WITH_STRINGS 1 | |
8226 | _ACEOF | |
8227 | ||
8228 | fi | |
8229 | ||
ba479fd2 NN |
8230 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8231 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8232 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8233 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8234 | else |
ba479fd2 | 8235 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8236 | /* confdefs.h. */ |
8237 | _ACEOF | |
8238 | cat confdefs.h >>conftest.$ac_ext | |
8239 | cat >>conftest.$ac_ext <<_ACEOF | |
8240 | /* end confdefs.h. */ | |
e9831ca0 KG |
8241 | #include <sys/types.h> |
8242 | #include <sys/wait.h> | |
8243 | #ifndef WEXITSTATUS | |
ba479fd2 | 8244 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8245 | #endif |
8246 | #ifndef WIFEXITED | |
ba479fd2 | 8247 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8248 | #endif |
ba479fd2 NN |
8249 | |
8250 | int | |
8251 | main () | |
8252 | { | |
8253 | int s; | |
8254 | wait (&s); | |
8255 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8256 | ; | |
8257 | return 0; | |
8258 | } | |
8259 | _ACEOF | |
8260 | rm -f conftest.$ac_objext | |
8261 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8262 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8263 | ac_status=$? |
86da66b5 HPN |
8264 | grep -v '^ *+' conftest.er1 >conftest.err |
8265 | rm -f conftest.er1 | |
8266 | cat conftest.err >&5 | |
ba479fd2 NN |
8267 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8268 | (exit $ac_status); } && | |
ec6c7392 PB |
8269 | { ac_try='test -z "$ac_c_werror_flag" |
8270 | || test ! -s conftest.err' | |
86da66b5 HPN |
8271 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8272 | (eval $ac_try) 2>&5 | |
8273 | ac_status=$? | |
8274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8275 | (exit $ac_status); }; } && | |
8276 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8278 | (eval $ac_try) 2>&5 | |
8279 | ac_status=$? | |
8280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8281 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8282 | ac_cv_header_sys_wait_h=yes |
8283 | else | |
ba479fd2 NN |
8284 | echo "$as_me: failed program was:" >&5 |
8285 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8286 | ||
8287 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8288 | fi |
86da66b5 | 8289 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8290 | fi |
ba479fd2 NN |
8291 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8292 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8293 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8294 | |
8295 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8296 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8297 | _ACEOF |
6e3f3080 | 8298 | |
63cf211a | 8299 | fi |
6e3f3080 | 8300 | |
ba479fd2 NN |
8301 | |
8302 | ||
8303 | ||
8304 | ||
8305 | ||
8306 | ||
8307 | ||
8308 | ||
8309 | ||
8310 | ||
8311 | ||
8312 | ||
8313 | ||
8314 | ||
8315 | ||
8316 | ||
8317 | ||
8318 | ||
8319 | ||
8320 | ||
8321 | ||
dfb77e37 KC |
8322 | |
8323 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8324 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8325 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8326 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8327 | do |
ba479fd2 | 8328 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
18fc9bd4 | 8329 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8330 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8331 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8332 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8333 | else |
18fc9bd4 | 8334 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8335 | /* confdefs.h. */ |
8336 | _ACEOF | |
8337 | cat confdefs.h >>conftest.$ac_ext | |
8338 | cat >>conftest.$ac_ext <<_ACEOF | |
8339 | /* end confdefs.h. */ | |
8340 | #include <$ac_header> | |
8341 | _ACEOF | |
8342 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8343 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8344 | ac_status=$? | |
8345 | grep -v '^ *+' conftest.er1 >conftest.err | |
8346 | rm -f conftest.er1 | |
8347 | cat conftest.err >&5 | |
8348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8349 | (exit $ac_status); } >/dev/null; then | |
8350 | if test -s conftest.err; then | |
8351 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8352 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8353 | else |
8354 | ac_cpp_err= | |
8355 | fi | |
8356 | else | |
8357 | ac_cpp_err=yes | |
8358 | fi | |
8359 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8360 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8361 | else |
8362 | echo "$as_me: failed program was:" >&5 | |
8363 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8364 | ||
18fc9bd4 | 8365 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8366 | fi |
8367 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8368 | fi |
ba479fd2 NN |
8369 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8370 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8371 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8372 | cat >>confdefs.h <<_ACEOF | |
8373 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8374 | _ACEOF | |
8375 | ||
956d6950 JL |
8376 | fi |
8377 | done | |
8378 | ||
8379 | ||
f24af81b | 8380 | # Check for thread headers. |
18fc9bd4 | 8381 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8382 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8383 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8384 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8385 | else |
18fc9bd4 | 8386 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8387 | /* confdefs.h. */ |
8388 | _ACEOF | |
8389 | cat confdefs.h >>conftest.$ac_ext | |
8390 | cat >>conftest.$ac_ext <<_ACEOF | |
8391 | /* end confdefs.h. */ | |
8392 | #include <thread.h> | |
8393 | _ACEOF | |
8394 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8395 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8396 | ac_status=$? | |
8397 | grep -v '^ *+' conftest.er1 >conftest.err | |
8398 | rm -f conftest.er1 | |
8399 | cat conftest.err >&5 | |
8400 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8401 | (exit $ac_status); } >/dev/null; then | |
8402 | if test -s conftest.err; then | |
8403 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8404 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8405 | else |
8406 | ac_cpp_err= | |
8407 | fi | |
8408 | else | |
8409 | ac_cpp_err=yes | |
8410 | fi | |
8411 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8412 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8413 | else |
8414 | echo "$as_me: failed program was:" >&5 | |
8415 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8416 | ||
18fc9bd4 | 8417 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8418 | fi |
8419 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8420 | fi |
ba479fd2 NN |
8421 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8422 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8423 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8424 | have_thread_h=yes |
8425 | else | |
ba479fd2 | 8426 | have_thread_h= |
f24af81b TT |
8427 | fi |
8428 | ||
18fc9bd4 | 8429 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8430 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8431 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8432 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 8433 | else |
18fc9bd4 | 8434 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8435 | /* confdefs.h. */ |
8436 | _ACEOF | |
8437 | cat confdefs.h >>conftest.$ac_ext | |
8438 | cat >>conftest.$ac_ext <<_ACEOF | |
8439 | /* end confdefs.h. */ | |
8440 | #include <pthread.h> | |
8441 | _ACEOF | |
8442 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8443 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8444 | ac_status=$? | |
8445 | grep -v '^ *+' conftest.er1 >conftest.err | |
8446 | rm -f conftest.er1 | |
8447 | cat conftest.err >&5 | |
8448 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8449 | (exit $ac_status); } >/dev/null; then | |
8450 | if test -s conftest.err; then | |
8451 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8452 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8453 | else |
8454 | ac_cpp_err= | |
8455 | fi | |
8456 | else | |
8457 | ac_cpp_err=yes | |
8458 | fi | |
18fc9bd4 RG |
8459 | if test -z "$ac_cpp_err"; then |
8460 | ac_cv_header_pthread_h=yes | |
ba479fd2 | 8461 | else |
18fc9bd4 RG |
8462 | echo "$as_me: failed program was:" >&5 |
8463 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8464 | ||
8465 | ac_cv_header_pthread_h=no | |
8466 | fi | |
8467 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8468 | fi |
ba479fd2 NN |
8469 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8470 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8471 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8472 | have_pthread_h=yes |
8473 | else | |
ba479fd2 | 8474 | have_pthread_h= |
f24af81b TT |
8475 | fi |
8476 | ||
8477 | ||
84c041a1 | 8478 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8479 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8480 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8481 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8482 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8483 | else | |
8484 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8485 | /* confdefs.h. */ |
8486 | _ACEOF | |
8487 | cat confdefs.h >>conftest.$ac_ext | |
8488 | cat >>conftest.$ac_ext <<_ACEOF | |
8489 | /* end confdefs.h. */ | |
75e93faa ZW |
8490 | #ifdef HAVE_LIMITS_H |
8491 | #include <limits.h> | |
8492 | #endif | |
8493 | #ifdef CHAR_BIT | |
8494 | found | |
8495 | #endif | |
ba479fd2 | 8496 | _ACEOF |
75e93faa | 8497 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8498 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8499 | gcc_cv_decl_char_bit=yes |
8500 | else | |
75e93faa ZW |
8501 | gcc_cv_decl_char_bit=no |
8502 | fi | |
8503 | rm -f conftest* | |
8504 | ||
8505 | ||
8506 | fi | |
ba479fd2 NN |
8507 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8508 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8509 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8510 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8511 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8512 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8513 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8514 | else |
8515 | i=8 | |
8516 | gcc_cv_c_nbby= | |
8517 | while test $i -lt 65; do | |
ba479fd2 | 8518 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8519 | /* confdefs.h. */ |
8520 | _ACEOF | |
8521 | cat confdefs.h >>conftest.$ac_ext | |
8522 | cat >>conftest.$ac_ext <<_ACEOF | |
8523 | /* end confdefs.h. */ | |
8524 | ||
8525 | int | |
8526 | main () | |
8527 | { | |
4e70264f ZW |
8528 | switch(0) { |
8529 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8530 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8531 | ; } | |
ba479fd2 NN |
8532 | ; |
8533 | return 0; | |
8534 | } | |
8535 | _ACEOF | |
8536 | rm -f conftest.$ac_objext | |
8537 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8538 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8539 | ac_status=$? |
86da66b5 HPN |
8540 | grep -v '^ *+' conftest.er1 >conftest.err |
8541 | rm -f conftest.er1 | |
8542 | cat conftest.err >&5 | |
ba479fd2 NN |
8543 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8544 | (exit $ac_status); } && | |
ec6c7392 PB |
8545 | { ac_try='test -z "$ac_c_werror_flag" |
8546 | || test ! -s conftest.err' | |
86da66b5 HPN |
8547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8548 | (eval $ac_try) 2>&5 | |
8549 | ac_status=$? | |
8550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8551 | (exit $ac_status); }; } && | |
8552 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8553 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8554 | (eval $ac_try) 2>&5 | |
8555 | ac_status=$? | |
8556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8557 | (exit $ac_status); }; }; then | |
4e70264f | 8558 | gcc_cv_c_nbby=$i; break |
75e93faa | 8559 | else |
ba479fd2 NN |
8560 | echo "$as_me: failed program was:" >&5 |
8561 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8562 | ||
75e93faa | 8563 | fi |
86da66b5 | 8564 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8565 | i=`expr $i + 1` |
8566 | done | |
8567 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8568 | ||
8569 | fi | |
ba479fd2 NN |
8570 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8571 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8572 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8573 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8574 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8575 | { (exit 1); exit 1; }; } | |
75e93faa | 8576 | else |
ba479fd2 NN |
8577 | |
8578 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8579 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8580 | _ACEOF |
75e93faa ZW |
8581 | |
8582 | fi | |
8583 | fi | |
ba479fd2 NN |
8584 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8585 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8586 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8587 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8588 | else |
9791c75c | 8589 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8590 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8591 | /* confdefs.h. */ |
8592 | _ACEOF | |
8593 | cat confdefs.h >>conftest.$ac_ext | |
8594 | cat >>conftest.$ac_ext <<_ACEOF | |
8595 | /* end confdefs.h. */ | |
4977bab6 ZW |
8596 | #include <sys/types.h> |
8597 | #include <sys/param.h> | |
9791c75c | 8598 | |
ba479fd2 NN |
8599 | int |
8600 | main () | |
8601 | { | |
4977bab6 ZW |
8602 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8603 | bogus endian macros | |
84c041a1 | 8604 | #endif |
9791c75c | 8605 | |
ba479fd2 NN |
8606 | ; |
8607 | return 0; | |
8608 | } | |
8609 | _ACEOF | |
8610 | rm -f conftest.$ac_objext | |
8611 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8612 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8613 | ac_status=$? |
86da66b5 HPN |
8614 | grep -v '^ *+' conftest.er1 >conftest.err |
8615 | rm -f conftest.er1 | |
8616 | cat conftest.err >&5 | |
ba479fd2 NN |
8617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8618 | (exit $ac_status); } && | |
ec6c7392 PB |
8619 | { ac_try='test -z "$ac_c_werror_flag" |
8620 | || test ! -s conftest.err' | |
86da66b5 HPN |
8621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8622 | (eval $ac_try) 2>&5 | |
8623 | ac_status=$? | |
8624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8625 | (exit $ac_status); }; } && | |
8626 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8628 | (eval $ac_try) 2>&5 | |
8629 | ac_status=$? | |
8630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8631 | (exit $ac_status); }; }; then | |
4977bab6 | 8632 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8633 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8634 | /* confdefs.h. */ |
8635 | _ACEOF | |
8636 | cat confdefs.h >>conftest.$ac_ext | |
8637 | cat >>conftest.$ac_ext <<_ACEOF | |
8638 | /* end confdefs.h. */ | |
4977bab6 ZW |
8639 | #include <sys/types.h> |
8640 | #include <sys/param.h> | |
9791c75c | 8641 | |
ba479fd2 NN |
8642 | int |
8643 | main () | |
8644 | { | |
4977bab6 ZW |
8645 | #if BYTE_ORDER != BIG_ENDIAN |
8646 | not big endian | |
84c041a1 | 8647 | #endif |
9791c75c | 8648 | |
ba479fd2 NN |
8649 | ; |
8650 | return 0; | |
8651 | } | |
8652 | _ACEOF | |
8653 | rm -f conftest.$ac_objext | |
8654 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8655 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8656 | ac_status=$? |
86da66b5 HPN |
8657 | grep -v '^ *+' conftest.er1 >conftest.err |
8658 | rm -f conftest.er1 | |
8659 | cat conftest.err >&5 | |
ba479fd2 NN |
8660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8661 | (exit $ac_status); } && | |
ec6c7392 PB |
8662 | { ac_try='test -z "$ac_c_werror_flag" |
8663 | || test ! -s conftest.err' | |
86da66b5 HPN |
8664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8665 | (eval $ac_try) 2>&5 | |
8666 | ac_status=$? | |
8667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8668 | (exit $ac_status); }; } && | |
8669 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8670 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8671 | (eval $ac_try) 2>&5 | |
8672 | ac_status=$? | |
8673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8674 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8675 | ac_cv_c_bigendian=yes |
8676 | else | |
ba479fd2 NN |
8677 | echo "$as_me: failed program was:" >&5 |
8678 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8679 | ||
8680 | ac_cv_c_bigendian=no | |
4977bab6 | 8681 | fi |
86da66b5 | 8682 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8683 | else |
ba479fd2 NN |
8684 | echo "$as_me: failed program was:" >&5 |
8685 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8686 | ||
9791c75c KC |
8687 | # It does not; compile a test program. |
8688 | if test "$cross_compiling" = yes; then | |
8689 | # try to guess the endianness by grepping values into an object file | |
8690 | ac_cv_c_bigendian=unknown | |
8691 | cat >conftest.$ac_ext <<_ACEOF | |
8692 | /* confdefs.h. */ | |
8693 | _ACEOF | |
8694 | cat confdefs.h >>conftest.$ac_ext | |
8695 | cat >>conftest.$ac_ext <<_ACEOF | |
8696 | /* end confdefs.h. */ | |
8697 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8698 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8699 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8700 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8701 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8702 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8703 | int | |
8704 | main () | |
8705 | { | |
8706 | _ascii (); _ebcdic (); | |
8707 | ; | |
8708 | return 0; | |
8709 | } | |
8710 | _ACEOF | |
8711 | rm -f conftest.$ac_objext | |
8712 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8713 | (eval $ac_compile) 2>conftest.er1 | |
8714 | ac_status=$? | |
8715 | grep -v '^ *+' conftest.er1 >conftest.err | |
8716 | rm -f conftest.er1 | |
8717 | cat conftest.err >&5 | |
8718 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8719 | (exit $ac_status); } && | |
ec6c7392 PB |
8720 | { ac_try='test -z "$ac_c_werror_flag" |
8721 | || test ! -s conftest.err' | |
9791c75c KC |
8722 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8723 | (eval $ac_try) 2>&5 | |
8724 | ac_status=$? | |
8725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8726 | (exit $ac_status); }; } && | |
8727 | { ac_try='test -s conftest.$ac_objext' | |
8728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8729 | (eval $ac_try) 2>&5 | |
8730 | ac_status=$? | |
8731 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8732 | (exit $ac_status); }; }; then | |
8733 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8734 | ac_cv_c_bigendian=yes | |
8735 | fi | |
8736 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8737 | if test "$ac_cv_c_bigendian" = unknown; then | |
8738 | ac_cv_c_bigendian=no | |
8739 | else | |
8740 | # finding both strings is unlikely to happen, but who knows? | |
8741 | ac_cv_c_bigendian=unknown | |
8742 | fi | |
8743 | fi | |
8744 | else | |
8745 | echo "$as_me: failed program was:" >&5 | |
8746 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8747 | ||
4977bab6 | 8748 | fi |
86da66b5 | 8749 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8750 | else |
8751 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8752 | /* confdefs.h. */ |
8753 | _ACEOF | |
8754 | cat confdefs.h >>conftest.$ac_ext | |
8755 | cat >>conftest.$ac_ext <<_ACEOF | |
8756 | /* end confdefs.h. */ | |
9791c75c KC |
8757 | int |
8758 | main () | |
8759 | { | |
4977bab6 ZW |
8760 | /* Are we little or big endian? From Harbison&Steele. */ |
8761 | union | |
8762 | { | |
8763 | long l; | |
8764 | char c[sizeof (long)]; | |
8765 | } u; | |
8766 | u.l = 1; | |
8767 | exit (u.c[sizeof (long) - 1] == 1); | |
8768 | } | |
ba479fd2 NN |
8769 | _ACEOF |
8770 | rm -f conftest$ac_exeext | |
8771 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8772 | (eval $ac_link) 2>&5 | |
8773 | ac_status=$? | |
8774 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8775 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8777 | (eval $ac_try) 2>&5 | |
8778 | ac_status=$? | |
8779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8780 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8781 | ac_cv_c_bigendian=no |
8782 | else | |
ba479fd2 NN |
8783 | echo "$as_me: program exited with status $ac_status" >&5 |
8784 | echo "$as_me: failed program was:" >&5 | |
8785 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8786 | ||
8787 | ( exit $ac_status ) | |
8788 | ac_cv_c_bigendian=yes | |
4977bab6 | 8789 | fi |
86da66b5 | 8790 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8791 | fi |
4977bab6 | 8792 | fi |
9791c75c | 8793 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8794 | fi |
ba479fd2 NN |
8795 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8796 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8797 | case $ac_cv_c_bigendian in |
8798 | yes) | |
ba479fd2 NN |
8799 | |
8800 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8801 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8802 | _ACEOF |
9791c75c KC |
8803 | ;; |
8804 | no) | |
8805 | ;; | |
8806 | *) | |
8807 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8808 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8809 | echo "$as_me: error: unknown endianness | |
8810 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8811 | { (exit 1); exit 1; }; } ;; | |
8812 | esac | |
84c041a1 | 8813 | |
75e93faa | 8814 | |
73458fb7 NN |
8815 | # -------- |
8816 | # UNSORTED | |
8817 | # -------- | |
1e608388 | 8818 | |
73458fb7 NN |
8819 | # Stage specific cflags for build. |
8820 | stage1_cflags= | |
8821 | case $build in | |
8822 | vax-*-*) | |
8823 | if test x$GCC = xyes | |
8824 | then | |
8825 | stage1_cflags="-Wa,-J" | |
8826 | else | |
8827 | stage1_cflags="-J" | |
8828 | fi | |
8829 | ;; | |
8830 | powerpc-*-darwin*) | |
8831 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8832 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8833 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8834 | # that too. | |
8835 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8836 | ;; | |
8837 | esac | |
1e608388 | 8838 | |
1e608388 | 8839 | |
4e70264f ZW |
8840 | # These libraries may be used by collect2. |
8841 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8842 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8843 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8844 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8845 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8846 | else |
8847 | save_LIBS="$LIBS" | |
7f2749d4 | 8848 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8849 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8850 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8851 | do | |
8852 | LIBS="$libs" | |
ba479fd2 | 8853 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8854 | /* confdefs.h. */ |
8855 | _ACEOF | |
8856 | cat confdefs.h >>conftest.$ac_ext | |
8857 | cat >>conftest.$ac_ext <<_ACEOF | |
8858 | /* end confdefs.h. */ | |
8859 | ||
4e70264f | 8860 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8861 | #ifdef __cplusplus |
8862 | extern "C" | |
8863 | #endif | |
4e70264f | 8864 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8865 | builtin and then its argument prototype would still apply. */ |
8866 | char ldopen (); | |
8867 | int | |
8868 | main () | |
8869 | { | |
8870 | ldopen (); | |
8871 | ; | |
8872 | return 0; | |
8873 | } | |
8874 | _ACEOF | |
8875 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8876 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8877 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8878 | ac_status=$? |
86da66b5 HPN |
8879 | grep -v '^ *+' conftest.er1 >conftest.err |
8880 | rm -f conftest.er1 | |
8881 | cat conftest.err >&5 | |
ba479fd2 NN |
8882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8883 | (exit $ac_status); } && | |
ec6c7392 PB |
8884 | { ac_try='test -z "$ac_c_werror_flag" |
8885 | || test ! -s conftest.err' | |
86da66b5 HPN |
8886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8887 | (eval $ac_try) 2>&5 | |
8888 | ac_status=$? | |
8889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8890 | (exit $ac_status); }; } && | |
8891 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8893 | (eval $ac_try) 2>&5 | |
8894 | ac_status=$? | |
8895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8896 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8897 | gcc_cv_collect2_libs="$libs"; break |
8898 | else | |
ba479fd2 NN |
8899 | echo "$as_me: failed program was:" >&5 |
8900 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8901 | ||
4e70264f | 8902 | fi |
86da66b5 HPN |
8903 | rm -f conftest.err conftest.$ac_objext \ |
8904 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8905 | done |
8906 | LIBS="$save_LIBS" | |
8907 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8908 | fi | |
ba479fd2 NN |
8909 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8910 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8911 | case $gcc_cv_collect2_libs in |
8912 | "none required") ;; | |
8913 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8914 | esac | |
8915 | ||
8916 | ||
7f2749d4 RK |
8917 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8918 | # -lexc. So test for it. | |
8919 | save_LIBS="$LIBS" | |
8920 | LIBS= | |
ba479fd2 NN |
8921 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8922 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8923 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8924 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8925 | else | |
8926 | ac_func_search_save_LIBS=$LIBS | |
8927 | ac_cv_search_exc_resume=no | |
8928 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8929 | /* confdefs.h. */ |
8930 | _ACEOF | |
8931 | cat confdefs.h >>conftest.$ac_ext | |
8932 | cat >>conftest.$ac_ext <<_ACEOF | |
8933 | /* end confdefs.h. */ | |
7f2749d4 | 8934 | |
7f2749d4 | 8935 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8936 | #ifdef __cplusplus |
8937 | extern "C" | |
8938 | #endif | |
7f2749d4 | 8939 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8940 | builtin and then its argument prototype would still apply. */ |
8941 | char exc_resume (); | |
8942 | int | |
8943 | main () | |
8944 | { | |
8945 | exc_resume (); | |
8946 | ; | |
8947 | return 0; | |
8948 | } | |
8949 | _ACEOF | |
8950 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8951 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8952 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8953 | ac_status=$? |
86da66b5 HPN |
8954 | grep -v '^ *+' conftest.er1 >conftest.err |
8955 | rm -f conftest.er1 | |
8956 | cat conftest.err >&5 | |
ba479fd2 NN |
8957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8958 | (exit $ac_status); } && | |
ec6c7392 PB |
8959 | { ac_try='test -z "$ac_c_werror_flag" |
8960 | || test ! -s conftest.err' | |
86da66b5 HPN |
8961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8962 | (eval $ac_try) 2>&5 | |
8963 | ac_status=$? | |
8964 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8965 | (exit $ac_status); }; } && | |
8966 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8967 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8968 | (eval $ac_try) 2>&5 | |
8969 | ac_status=$? | |
8970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8971 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8972 | ac_cv_search_exc_resume="none required" |
8973 | else | |
ba479fd2 NN |
8974 | echo "$as_me: failed program was:" >&5 |
8975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8976 | ||
7f2749d4 | 8977 | fi |
86da66b5 HPN |
8978 | rm -f conftest.err conftest.$ac_objext \ |
8979 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8980 | if test "$ac_cv_search_exc_resume" = no; then |
8981 | for ac_lib in exc; do | |
8982 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8983 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8984 | /* confdefs.h. */ |
8985 | _ACEOF | |
8986 | cat confdefs.h >>conftest.$ac_ext | |
8987 | cat >>conftest.$ac_ext <<_ACEOF | |
8988 | /* end confdefs.h. */ | |
8989 | ||
7f2749d4 | 8990 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8991 | #ifdef __cplusplus |
8992 | extern "C" | |
8993 | #endif | |
7f2749d4 | 8994 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8995 | builtin and then its argument prototype would still apply. */ |
8996 | char exc_resume (); | |
8997 | int | |
8998 | main () | |
8999 | { | |
9000 | exc_resume (); | |
9001 | ; | |
9002 | return 0; | |
9003 | } | |
9004 | _ACEOF | |
9005 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9006 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9007 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9008 | ac_status=$? |
86da66b5 HPN |
9009 | grep -v '^ *+' conftest.er1 >conftest.err |
9010 | rm -f conftest.er1 | |
9011 | cat conftest.err >&5 | |
ba479fd2 NN |
9012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9013 | (exit $ac_status); } && | |
ec6c7392 PB |
9014 | { ac_try='test -z "$ac_c_werror_flag" |
9015 | || test ! -s conftest.err' | |
86da66b5 HPN |
9016 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9017 | (eval $ac_try) 2>&5 | |
9018 | ac_status=$? | |
9019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9020 | (exit $ac_status); }; } && | |
9021 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9023 | (eval $ac_try) 2>&5 | |
9024 | ac_status=$? | |
9025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9026 | (exit $ac_status); }; }; then | |
9027 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
9028 | break |
9029 | else | |
ba479fd2 NN |
9030 | echo "$as_me: failed program was:" >&5 |
9031 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9032 | ||
cafe096b | 9033 | fi |
86da66b5 HPN |
9034 | rm -f conftest.err conftest.$ac_objext \ |
9035 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9036 | done |
6e3f3080 | 9037 | fi |
ba479fd2 NN |
9038 | LIBS=$ac_func_search_save_LIBS |
9039 | fi | |
9040 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
9041 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
9042 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 9043 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 9044 | |
7f2749d4 | 9045 | fi |
ba479fd2 | 9046 | |
7f2749d4 RK |
9047 | GNAT_LIBEXC="$LIBS" |
9048 | LIBS="$save_LIBS" | |
9049 | ||
9050 | ||
62c9aa5f ZW |
9051 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9052 | # they're both in the same place. jcf-dump needs them. | |
9053 | save_LIBS="$LIBS" | |
9054 | LIBS= | |
ba479fd2 NN |
9055 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9056 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
9057 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9058 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9059 | else | |
9060 | ac_func_search_save_LIBS=$LIBS | |
9061 | ac_cv_search_ldexp=no | |
9062 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9063 | /* confdefs.h. */ |
9064 | _ACEOF | |
9065 | cat confdefs.h >>conftest.$ac_ext | |
9066 | cat >>conftest.$ac_ext <<_ACEOF | |
9067 | /* end confdefs.h. */ | |
62c9aa5f | 9068 | |
62c9aa5f | 9069 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9070 | #ifdef __cplusplus |
9071 | extern "C" | |
9072 | #endif | |
62c9aa5f | 9073 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9074 | builtin and then its argument prototype would still apply. */ |
9075 | char ldexp (); | |
9076 | int | |
9077 | main () | |
9078 | { | |
9079 | ldexp (); | |
9080 | ; | |
9081 | return 0; | |
9082 | } | |
9083 | _ACEOF | |
9084 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9085 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9086 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9087 | ac_status=$? |
86da66b5 HPN |
9088 | grep -v '^ *+' conftest.er1 >conftest.err |
9089 | rm -f conftest.er1 | |
9090 | cat conftest.err >&5 | |
ba479fd2 NN |
9091 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9092 | (exit $ac_status); } && | |
ec6c7392 PB |
9093 | { ac_try='test -z "$ac_c_werror_flag" |
9094 | || test ! -s conftest.err' | |
86da66b5 HPN |
9095 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9096 | (eval $ac_try) 2>&5 | |
9097 | ac_status=$? | |
9098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9099 | (exit $ac_status); }; } && | |
9100 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9101 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9102 | (eval $ac_try) 2>&5 | |
9103 | ac_status=$? | |
9104 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9105 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
9106 | ac_cv_search_ldexp="none required" |
9107 | else | |
ba479fd2 NN |
9108 | echo "$as_me: failed program was:" >&5 |
9109 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9110 | ||
62c9aa5f | 9111 | fi |
86da66b5 HPN |
9112 | rm -f conftest.err conftest.$ac_objext \ |
9113 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9114 | if test "$ac_cv_search_ldexp" = no; then |
9115 | for ac_lib in m; do | |
9116 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9117 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9118 | /* confdefs.h. */ |
9119 | _ACEOF | |
9120 | cat confdefs.h >>conftest.$ac_ext | |
9121 | cat >>conftest.$ac_ext <<_ACEOF | |
9122 | /* end confdefs.h. */ | |
9123 | ||
62c9aa5f | 9124 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9125 | #ifdef __cplusplus |
9126 | extern "C" | |
9127 | #endif | |
62c9aa5f | 9128 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9129 | builtin and then its argument prototype would still apply. */ |
9130 | char ldexp (); | |
9131 | int | |
9132 | main () | |
9133 | { | |
9134 | ldexp (); | |
9135 | ; | |
9136 | return 0; | |
9137 | } | |
9138 | _ACEOF | |
9139 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9140 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9141 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9142 | ac_status=$? |
86da66b5 HPN |
9143 | grep -v '^ *+' conftest.er1 >conftest.err |
9144 | rm -f conftest.er1 | |
9145 | cat conftest.err >&5 | |
ba479fd2 NN |
9146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9147 | (exit $ac_status); } && | |
ec6c7392 PB |
9148 | { ac_try='test -z "$ac_c_werror_flag" |
9149 | || test ! -s conftest.err' | |
86da66b5 HPN |
9150 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9151 | (eval $ac_try) 2>&5 | |
9152 | ac_status=$? | |
9153 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9154 | (exit $ac_status); }; } && | |
9155 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9157 | (eval $ac_try) 2>&5 | |
9158 | ac_status=$? | |
9159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9160 | (exit $ac_status); }; }; then | |
9161 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
9162 | break |
9163 | else | |
ba479fd2 NN |
9164 | echo "$as_me: failed program was:" >&5 |
9165 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9166 | ||
cafe096b | 9167 | fi |
86da66b5 HPN |
9168 | rm -f conftest.err conftest.$ac_objext \ |
9169 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9170 | done |
6e3f3080 | 9171 | fi |
ba479fd2 NN |
9172 | LIBS=$ac_func_search_save_LIBS |
9173 | fi | |
9174 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
9175 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9176 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9177 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9178 | |
62c9aa5f | 9179 | fi |
ba479fd2 | 9180 | |
62c9aa5f ZW |
9181 | LDEXP_LIB="$LIBS" |
9182 | LIBS="$save_LIBS" | |
9183 | ||
9184 | ||
956d6950 JL |
9185 | # Use <inttypes.h> only if it exists, |
9186 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9187 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9188 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9189 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9190 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9191 | else | |
9192 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9193 | /* confdefs.h. */ |
9194 | _ACEOF | |
9195 | cat confdefs.h >>conftest.$ac_ext | |
9196 | cat >>conftest.$ac_ext <<_ACEOF | |
9197 | /* end confdefs.h. */ | |
956d6950 JL |
9198 | #include <sys/types.h> |
9199 | #include <inttypes.h> | |
ba479fd2 NN |
9200 | int |
9201 | main () | |
9202 | { | |
956d6950 | 9203 | intmax_t i = -1; |
ba479fd2 NN |
9204 | ; |
9205 | return 0; | |
9206 | } | |
9207 | _ACEOF | |
9208 | rm -f conftest.$ac_objext | |
9209 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9210 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9211 | ac_status=$? |
86da66b5 HPN |
9212 | grep -v '^ *+' conftest.er1 >conftest.err |
9213 | rm -f conftest.er1 | |
9214 | cat conftest.err >&5 | |
ba479fd2 NN |
9215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9216 | (exit $ac_status); } && | |
ec6c7392 PB |
9217 | { ac_try='test -z "$ac_c_werror_flag" |
9218 | || test ! -s conftest.err' | |
86da66b5 HPN |
9219 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9220 | (eval $ac_try) 2>&5 | |
9221 | ac_status=$? | |
9222 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9223 | (exit $ac_status); }; } && | |
9224 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9225 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9226 | (eval $ac_try) 2>&5 | |
9227 | ac_status=$? | |
9228 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9229 | (exit $ac_status); }; }; then | |
0056a9b5 | 9230 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9231 | else |
ba479fd2 NN |
9232 | echo "$as_me: failed program was:" >&5 |
9233 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9234 | ||
9235 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9236 | fi |
86da66b5 | 9237 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9238 | fi |
9239 | ||
ba479fd2 NN |
9240 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9241 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9242 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9243 | |
9244 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9245 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9246 | _ACEOF |
0056a9b5 KG |
9247 | |
9248 | fi | |
956d6950 | 9249 | |
c149cc37 | 9250 | |
ba479fd2 NN |
9251 | |
9252 | ||
9253 | ||
9254 | ||
9255 | ||
9256 | ||
9257 | ||
9258 | ||
9259 | ||
9260 | ||
9261 | ||
9262 | ||
9263 | ||
9264 | ||
9265 | ||
9266 | ||
0d667716 KG |
9267 | |
9268 | ||
9269 | ||
9270 | ||
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
9276 | ||
9277 | ||
9278 | ||
ba479fd2 NN |
9279 | |
9280 | ||
9281 | ||
9282 | ||
9283 | ||
9284 | ||
9285 | ||
9286 | ||
52a6edcc | 9287 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9288 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9289 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9290 | 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 | 9291 | do |
ba479fd2 NN |
9292 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9293 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9294 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9295 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9297 | else | |
9298 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9299 | /* confdefs.h. */ |
9300 | _ACEOF | |
9301 | cat confdefs.h >>conftest.$ac_ext | |
9302 | cat >>conftest.$ac_ext <<_ACEOF | |
9303 | /* end confdefs.h. */ | |
86da66b5 HPN |
9304 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9305 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9306 | #define $ac_func innocuous_$ac_func | |
9307 | ||
956d6950 | 9308 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9309 | which can conflict with char $ac_func (); below. |
9310 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9311 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9312 | |
ba479fd2 NN |
9313 | #ifdef __STDC__ |
9314 | # include <limits.h> | |
9315 | #else | |
9316 | # include <assert.h> | |
9317 | #endif | |
86da66b5 HPN |
9318 | |
9319 | #undef $ac_func | |
9320 | ||
6e3f3080 | 9321 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9322 | #ifdef __cplusplus |
9323 | extern "C" | |
9324 | { | |
9325 | #endif | |
6e3f3080 | 9326 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9327 | builtin and then its argument prototype would still apply. */ |
9328 | char $ac_func (); | |
956d6950 JL |
9329 | /* The GNU C library defines this for functions which it implements |
9330 | to always fail with ENOSYS. Some functions are actually named | |
9331 | something starting with __ and the normal name is an alias. */ | |
9332 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9333 | choke me | |
9334 | #else | |
ba479fd2 NN |
9335 | char (*f) () = $ac_func; |
9336 | #endif | |
9337 | #ifdef __cplusplus | |
9338 | } | |
956d6950 JL |
9339 | #endif |
9340 | ||
ba479fd2 NN |
9341 | int |
9342 | main () | |
9343 | { | |
9344 | return f != $ac_func; | |
9345 | ; | |
9346 | return 0; | |
9347 | } | |
9348 | _ACEOF | |
9349 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9350 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9351 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9352 | ac_status=$? |
86da66b5 HPN |
9353 | grep -v '^ *+' conftest.er1 >conftest.err |
9354 | rm -f conftest.er1 | |
9355 | cat conftest.err >&5 | |
ba479fd2 NN |
9356 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9357 | (exit $ac_status); } && | |
ec6c7392 PB |
9358 | { ac_try='test -z "$ac_c_werror_flag" |
9359 | || test ! -s conftest.err' | |
86da66b5 HPN |
9360 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9361 | (eval $ac_try) 2>&5 | |
9362 | ac_status=$? | |
9363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9364 | (exit $ac_status); }; } && | |
9365 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9367 | (eval $ac_try) 2>&5 | |
9368 | ac_status=$? | |
9369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9370 | (exit $ac_status); }; }; then | |
9371 | eval "$as_ac_var=yes" | |
9372 | else | |
9373 | echo "$as_me: failed program was:" >&5 | |
9374 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9375 | ||
9376 | eval "$as_ac_var=no" | |
9377 | fi | |
86da66b5 HPN |
9378 | rm -f conftest.err conftest.$ac_objext \ |
9379 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9380 | fi |
9381 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9382 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9383 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9384 | cat >>confdefs.h <<_ACEOF | |
9385 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9386 | _ACEOF | |
956d6950 | 9387 | |
956d6950 JL |
9388 | fi |
9389 | done | |
9390 | ||
6885fc87 | 9391 | |
39f6c4c8 | 9392 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9393 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9394 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9395 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9396 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9397 | else |
9398 | if test "$cross_compiling" = yes; then | |
9399 | gcc_cv_func_mbstowcs_works=yes | |
9400 | else | |
ba479fd2 | 9401 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9402 | /* confdefs.h. */ |
9403 | _ACEOF | |
9404 | cat confdefs.h >>conftest.$ac_ext | |
9405 | cat >>conftest.$ac_ext <<_ACEOF | |
9406 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9407 | #include <stdlib.h> |
9408 | int main() | |
9409 | { | |
9410 | mbstowcs(0, "", 0); | |
9411 | return 0; | |
9412 | } | |
ba479fd2 NN |
9413 | _ACEOF |
9414 | rm -f conftest$ac_exeext | |
9415 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9416 | (eval $ac_link) 2>&5 | |
9417 | ac_status=$? | |
9418 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9419 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9421 | (eval $ac_try) 2>&5 | |
9422 | ac_status=$? | |
9423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9424 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9425 | gcc_cv_func_mbstowcs_works=yes |
9426 | else | |
ba479fd2 NN |
9427 | echo "$as_me: program exited with status $ac_status" >&5 |
9428 | echo "$as_me: failed program was:" >&5 | |
9429 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9430 | ||
9431 | ( exit $ac_status ) | |
9432 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9433 | fi |
86da66b5 | 9434 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9435 | fi |
39f6c4c8 | 9436 | fi |
ba479fd2 NN |
9437 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9438 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9439 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9440 | |
9441 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9442 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9443 | _ACEOF |
39f6c4c8 KW |
9444 | |
9445 | fi | |
9446 | fi | |
9447 | ||
ba479fd2 NN |
9448 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9449 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9450 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9452 | else |
ba479fd2 | 9453 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9454 | /* confdefs.h. */ |
9455 | _ACEOF | |
9456 | cat confdefs.h >>conftest.$ac_ext | |
9457 | cat >>conftest.$ac_ext <<_ACEOF | |
9458 | /* end confdefs.h. */ | |
8b4fc07a NN |
9459 | $ac_includes_default |
9460 | int | |
9461 | main () | |
9462 | { | |
9463 | if ((ssize_t *) 0) | |
9464 | return 0; | |
9465 | if (sizeof (ssize_t)) | |
9466 | return 0; | |
9467 | ; | |
9468 | return 0; | |
9469 | } | |
ba479fd2 | 9470 | _ACEOF |
8b4fc07a NN |
9471 | rm -f conftest.$ac_objext |
9472 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9473 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9474 | ac_status=$? |
86da66b5 HPN |
9475 | grep -v '^ *+' conftest.er1 >conftest.err |
9476 | rm -f conftest.er1 | |
9477 | cat conftest.err >&5 | |
8b4fc07a NN |
9478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9479 | (exit $ac_status); } && | |
ec6c7392 PB |
9480 | { ac_try='test -z "$ac_c_werror_flag" |
9481 | || test ! -s conftest.err' | |
86da66b5 HPN |
9482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9483 | (eval $ac_try) 2>&5 | |
9484 | ac_status=$? | |
9485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9486 | (exit $ac_status); }; } && | |
9487 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9489 | (eval $ac_try) 2>&5 | |
9490 | ac_status=$? | |
9491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9492 | (exit $ac_status); }; }; then | |
cb65112a | 9493 | ac_cv_type_ssize_t=yes |
f12bc141 | 9494 | else |
8b4fc07a NN |
9495 | echo "$as_me: failed program was:" >&5 |
9496 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9497 | |
8b4fc07a NN |
9498 | ac_cv_type_ssize_t=no |
9499 | fi | |
86da66b5 | 9500 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9501 | fi |
ba479fd2 NN |
9502 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9503 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9504 | if test $ac_cv_type_ssize_t = yes; then |
9505 | : | |
9506 | else | |
ba479fd2 | 9507 | |
8b4fc07a | 9508 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9509 | #define ssize_t int |
ba479fd2 | 9510 | _ACEOF |
f12bc141 ZW |
9511 | |
9512 | fi | |
9513 | ||
0b9d02c6 | 9514 | |
e256b8b6 DA |
9515 | # Try to determine the array type of the second argument of getgroups |
9516 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9517 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9518 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9519 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9520 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9521 | else | |
9522 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9523 | /* confdefs.h. */ |
9524 | _ACEOF | |
9525 | cat confdefs.h >>conftest.$ac_ext | |
9526 | cat >>conftest.$ac_ext <<_ACEOF | |
9527 | /* end confdefs.h. */ | |
e256b8b6 | 9528 | #include <sys/types.h> |
ba479fd2 NN |
9529 | |
9530 | _ACEOF | |
e256b8b6 | 9531 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9532 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9533 | ac_cv_type_uid_t=yes |
9534 | else | |
e256b8b6 DA |
9535 | ac_cv_type_uid_t=no |
9536 | fi | |
9537 | rm -f conftest* | |
9538 | ||
9539 | fi | |
ba479fd2 NN |
9540 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9541 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9542 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9543 | |
9544 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9545 | #define uid_t int |
ba479fd2 | 9546 | _ACEOF |
cafe096b | 9547 | |
ba479fd2 NN |
9548 | |
9549 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9550 | #define gid_t int |
ba479fd2 | 9551 | _ACEOF |
e256b8b6 DA |
9552 | |
9553 | fi | |
9554 | ||
ba479fd2 NN |
9555 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9556 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9557 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9558 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9559 | else |
9560 | if test "$cross_compiling" = yes; then | |
9561 | ac_cv_type_getgroups=cross | |
9562 | else | |
ba479fd2 | 9563 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9564 | /* confdefs.h. */ |
9565 | _ACEOF | |
9566 | cat confdefs.h >>conftest.$ac_ext | |
9567 | cat >>conftest.$ac_ext <<_ACEOF | |
9568 | /* end confdefs.h. */ | |
e256b8b6 DA |
9569 | /* Thanks to Mike Rendell for this test. */ |
9570 | #include <sys/types.h> | |
9571 | #define NGID 256 | |
9572 | #undef MAX | |
9573 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9574 | |
9575 | int | |
9576 | main () | |
e256b8b6 DA |
9577 | { |
9578 | gid_t gidset[NGID]; | |
9579 | int i, n; | |
9580 | union { gid_t gval; long lval; } val; | |
9581 | ||
9582 | val.lval = -1; | |
9583 | for (i = 0; i < NGID; i++) | |
9584 | gidset[i] = val.gval; | |
9585 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9586 | gidset); |
e256b8b6 DA |
9587 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9588 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9589 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9590 | } |
ba479fd2 NN |
9591 | _ACEOF |
9592 | rm -f conftest$ac_exeext | |
9593 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9594 | (eval $ac_link) 2>&5 | |
9595 | ac_status=$? | |
9596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9597 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9599 | (eval $ac_try) 2>&5 | |
9600 | ac_status=$? | |
9601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9602 | (exit $ac_status); }; }; then | |
9603 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9604 | else |
ba479fd2 NN |
9605 | echo "$as_me: program exited with status $ac_status" >&5 |
9606 | echo "$as_me: failed program was:" >&5 | |
9607 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9608 | ||
9609 | ( exit $ac_status ) | |
9610 | ac_cv_type_getgroups=int | |
e256b8b6 | 9611 | fi |
86da66b5 | 9612 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9613 | fi |
e256b8b6 | 9614 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9615 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9616 | /* confdefs.h. */ |
9617 | _ACEOF | |
9618 | cat confdefs.h >>conftest.$ac_ext | |
9619 | cat >>conftest.$ac_ext <<_ACEOF | |
9620 | /* end confdefs.h. */ | |
e256b8b6 | 9621 | #include <unistd.h> |
ba479fd2 NN |
9622 | |
9623 | _ACEOF | |
e256b8b6 | 9624 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9625 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9626 | ac_cv_type_getgroups=gid_t |
9627 | else | |
e256b8b6 DA |
9628 | ac_cv_type_getgroups=int |
9629 | fi | |
9630 | rm -f conftest* | |
9631 | ||
9632 | fi | |
9633 | fi | |
ba479fd2 NN |
9634 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9635 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9636 | |
ba479fd2 | 9637 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9638 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9639 | _ACEOF |
e256b8b6 DA |
9640 | |
9641 | ||
9642 | if test "${target}" = "${build}"; then | |
9643 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9644 | else | |
9645 | case "${target}" in | |
9646 | # This condition may need some tweaking. It should include all | |
9647 | # targets where the array type of the second argument of getgroups | |
9648 | # is int and the type of gid_t is not equivalent to int. | |
9649 | *-*-sunos* | *-*-ultrix*) | |
9650 | TARGET_GETGROUPS_T=int | |
9651 | ;; | |
9652 | *) | |
9653 | TARGET_GETGROUPS_T=gid_t | |
9654 | ;; | |
9655 | esac | |
9656 | fi | |
9657 | ||
9658 | ||
3b0727a0 | 9659 | |
18fc9bd4 | 9660 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
3b0727a0 MR |
9661 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 |
9662 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9663 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9664 | else |
18fc9bd4 | 9665 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
9666 | /* confdefs.h. */ |
9667 | _ACEOF | |
9668 | cat confdefs.h >>conftest.$ac_ext | |
9669 | cat >>conftest.$ac_ext <<_ACEOF | |
9670 | /* end confdefs.h. */ | |
9671 | #include <sys/mman.h> | |
9672 | _ACEOF | |
9673 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9674 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9675 | ac_status=$? | |
9676 | grep -v '^ *+' conftest.er1 >conftest.err | |
9677 | rm -f conftest.er1 | |
9678 | cat conftest.err >&5 | |
9679 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9680 | (exit $ac_status); } >/dev/null; then | |
9681 | if test -s conftest.err; then | |
9682 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9683 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9684 | else | |
9685 | ac_cpp_err= | |
9686 | fi | |
9687 | else | |
9688 | ac_cpp_err=yes | |
9689 | fi | |
9690 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 9691 | ac_cv_header_sys_mman_h=yes |
3b0727a0 MR |
9692 | else |
9693 | echo "$as_me: failed program was:" >&5 | |
9694 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9695 | ||
18fc9bd4 | 9696 | ac_cv_header_sys_mman_h=no |
3b0727a0 MR |
9697 | fi |
9698 | rm -f conftest.err conftest.$ac_ext | |
9699 | fi | |
9700 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9701 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9702 | if test $ac_cv_header_sys_mman_h = yes; then | |
9703 | gcc_header_sys_mman_h=yes | |
9704 | else | |
9705 | gcc_header_sys_mman_h=no | |
9706 | fi | |
9707 | ||
9708 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9709 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9710 | if test "${ac_cv_func_mmap+set}" = set; then | |
9711 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9712 | else | |
9713 | cat >conftest.$ac_ext <<_ACEOF | |
9714 | /* confdefs.h. */ | |
9715 | _ACEOF | |
9716 | cat confdefs.h >>conftest.$ac_ext | |
9717 | cat >>conftest.$ac_ext <<_ACEOF | |
9718 | /* end confdefs.h. */ | |
9719 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9720 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9721 | #define mmap innocuous_mmap | |
9722 | ||
9723 | /* System header to define __stub macros and hopefully few prototypes, | |
9724 | which can conflict with char mmap (); below. | |
9725 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9726 | <limits.h> exists even on freestanding compilers. */ | |
9727 | ||
9728 | #ifdef __STDC__ | |
9729 | # include <limits.h> | |
9730 | #else | |
9731 | # include <assert.h> | |
9732 | #endif | |
9733 | ||
9734 | #undef mmap | |
9735 | ||
9736 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9737 | #ifdef __cplusplus | |
9738 | extern "C" | |
9739 | { | |
9740 | #endif | |
9741 | /* We use char because int might match the return type of a gcc2 | |
9742 | builtin and then its argument prototype would still apply. */ | |
9743 | char mmap (); | |
9744 | /* The GNU C library defines this for functions which it implements | |
9745 | to always fail with ENOSYS. Some functions are actually named | |
9746 | something starting with __ and the normal name is an alias. */ | |
9747 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9748 | choke me | |
9749 | #else | |
9750 | char (*f) () = mmap; | |
9751 | #endif | |
9752 | #ifdef __cplusplus | |
9753 | } | |
9754 | #endif | |
9755 | ||
9756 | int | |
9757 | main () | |
9758 | { | |
9759 | return f != mmap; | |
9760 | ; | |
9761 | return 0; | |
9762 | } | |
9763 | _ACEOF | |
9764 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9765 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9766 | (eval $ac_link) 2>conftest.er1 | |
9767 | ac_status=$? | |
9768 | grep -v '^ *+' conftest.er1 >conftest.err | |
9769 | rm -f conftest.er1 | |
9770 | cat conftest.err >&5 | |
9771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9772 | (exit $ac_status); } && | |
ec6c7392 PB |
9773 | { ac_try='test -z "$ac_c_werror_flag" |
9774 | || test ! -s conftest.err' | |
3b0727a0 MR |
9775 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9776 | (eval $ac_try) 2>&5 | |
9777 | ac_status=$? | |
9778 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9779 | (exit $ac_status); }; } && | |
9780 | { ac_try='test -s conftest$ac_exeext' | |
9781 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9782 | (eval $ac_try) 2>&5 | |
9783 | ac_status=$? | |
9784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9785 | (exit $ac_status); }; }; then | |
9786 | ac_cv_func_mmap=yes | |
9787 | else | |
9788 | echo "$as_me: failed program was:" >&5 | |
9789 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9790 | ||
9791 | ac_cv_func_mmap=no | |
9792 | fi | |
9793 | rm -f conftest.err conftest.$ac_objext \ | |
9794 | conftest$ac_exeext conftest.$ac_ext | |
9795 | fi | |
9796 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9797 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9798 | if test $ac_cv_func_mmap = yes; then | |
9799 | gcc_func_mmap=yes | |
9800 | else | |
9801 | gcc_func_mmap=no | |
9802 | fi | |
9803 | ||
9804 | if test "$gcc_header_sys_mman_h" != yes \ | |
9805 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9806 | gcc_cv_func_mmap_file=no |
9807 | gcc_cv_func_mmap_dev_zero=no | |
9808 | gcc_cv_func_mmap_anon=no | |
9809 | else | |
ba479fd2 NN |
9810 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9811 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9812 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9813 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9814 | else |
ba479fd2 | 9815 | # Add a system to this blacklist if |
1072ec3f ZW |
9816 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9817 | # memory area containing the same data that you'd get if you applied | |
9818 | # read() to the same fd. The only system known to have a problem here | |
9819 | # is VMS, where text files have record structure. | |
9820 | case "$host_os" in | |
ba479fd2 | 9821 | vms* | ultrix*) |
1072ec3f ZW |
9822 | gcc_cv_func_mmap_file=no ;; |
9823 | *) | |
9824 | gcc_cv_func_mmap_file=yes;; | |
9825 | esac | |
9826 | fi | |
ba479fd2 NN |
9827 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9828 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9829 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9830 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9831 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9832 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9833 | else |
9834 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9835 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9836 | # zeroed pages with both the following properties: | |
9837 | # 1. If you map N consecutive pages in with one call, and then | |
9838 | # unmap any subset of those pages, the pages that were not | |
9839 | # explicitly unmapped remain accessible. | |
9840 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9841 | # both at once, they must both go away. | |
9842 | # Systems known to be in this category are Windows (all variants), | |
9843 | # VMS, and Darwin. | |
9844 | case "$host_os" in | |
2ce240d3 | 9845 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9846 | gcc_cv_func_mmap_dev_zero=no ;; |
9847 | *) | |
9848 | gcc_cv_func_mmap_dev_zero=yes;; | |
9849 | esac | |
9850 | fi | |
ba479fd2 NN |
9851 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9852 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9853 | |
9854 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9855 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9856 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9857 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9858 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9859 | else | |
9860 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9861 | /* confdefs.h. */ |
9862 | _ACEOF | |
9863 | cat confdefs.h >>conftest.$ac_ext | |
9864 | cat >>conftest.$ac_ext <<_ACEOF | |
9865 | /* end confdefs.h. */ | |
1072ec3f ZW |
9866 | #include <sys/types.h> |
9867 | #include <sys/mman.h> | |
9868 | #include <unistd.h> | |
9869 | ||
9870 | #ifndef MAP_ANONYMOUS | |
9871 | #define MAP_ANONYMOUS MAP_ANON | |
9872 | #endif | |
9873 | ||
ba479fd2 NN |
9874 | int |
9875 | main () | |
9876 | { | |
1072ec3f | 9877 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9878 | ; |
9879 | return 0; | |
9880 | } | |
9881 | _ACEOF | |
9882 | rm -f conftest.$ac_objext | |
9883 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9884 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9885 | ac_status=$? |
86da66b5 HPN |
9886 | grep -v '^ *+' conftest.er1 >conftest.err |
9887 | rm -f conftest.er1 | |
9888 | cat conftest.err >&5 | |
ba479fd2 NN |
9889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9890 | (exit $ac_status); } && | |
ec6c7392 PB |
9891 | { ac_try='test -z "$ac_c_werror_flag" |
9892 | || test ! -s conftest.err' | |
86da66b5 HPN |
9893 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9894 | (eval $ac_try) 2>&5 | |
9895 | ac_status=$? | |
9896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9897 | (exit $ac_status); }; } && | |
9898 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9899 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9900 | (eval $ac_try) 2>&5 | |
9901 | ac_status=$? | |
9902 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9903 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9904 | gcc_cv_decl_map_anon=yes |
9905 | else | |
ba479fd2 NN |
9906 | echo "$as_me: failed program was:" >&5 |
9907 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9908 | ||
9909 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9910 | fi |
86da66b5 | 9911 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9912 | fi |
ba479fd2 NN |
9913 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9914 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9915 | |
9916 | if test $gcc_cv_decl_map_anon = no; then | |
9917 | gcc_cv_func_mmap_anon=no | |
9918 | else | |
ba479fd2 NN |
9919 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9920 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9921 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9922 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9923 | else |
9924 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9925 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9926 | # doesn't give anonymous zeroed pages with the same properties listed | |
9927 | # above for use of /dev/zero. | |
9928 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9929 | case "$host_os" in | |
9930 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9931 | gcc_cv_func_mmap_anon=no ;; | |
9932 | *) | |
9933 | gcc_cv_func_mmap_anon=yes;; | |
9934 | esac | |
9935 | fi | |
ba479fd2 NN |
9936 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9937 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9938 | fi |
9939 | fi | |
9940 | ||
9941 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9942 | |
9943 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9944 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9945 | _ACEOF |
1072ec3f ZW |
9946 | |
9947 | fi | |
9948 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9949 | |
9950 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9951 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9952 | _ACEOF |
1072ec3f ZW |
9953 | |
9954 | fi | |
9955 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9956 | |
9957 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9958 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9959 | _ACEOF |
1072ec3f ZW |
9960 | |
9961 | fi | |
9962 | ||
b27d2bd5 MK |
9963 | |
9964 | case "${host}" in | |
ee262b6f | 9965 | *-*-*vms*) |
ba479fd2 | 9966 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9967 | # won't work, and it isn't easily adaptable. It makes more sense to |
9968 | # just force it. | |
9969 | ac_cv_func_vfork_works=yes | |
9970 | ;; | |
b27d2bd5 | 9971 | esac |
ba479fd2 NN |
9972 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9973 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9974 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9975 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9976 | else | |
9977 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9978 | /* confdefs.h. */ |
9979 | _ACEOF | |
9980 | cat confdefs.h >>conftest.$ac_ext | |
9981 | cat >>conftest.$ac_ext <<_ACEOF | |
9982 | /* end confdefs.h. */ | |
9983 | $ac_includes_default | |
9984 | int | |
9985 | main () | |
9986 | { | |
9987 | if ((pid_t *) 0) | |
9988 | return 0; | |
9989 | if (sizeof (pid_t)) | |
9990 | return 0; | |
9991 | ; | |
9992 | return 0; | |
9993 | } | |
9994 | _ACEOF | |
9995 | rm -f conftest.$ac_objext | |
9996 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9997 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9998 | ac_status=$? |
86da66b5 HPN |
9999 | grep -v '^ *+' conftest.er1 >conftest.err |
10000 | rm -f conftest.er1 | |
10001 | cat conftest.err >&5 | |
ba479fd2 NN |
10002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10003 | (exit $ac_status); } && | |
ec6c7392 PB |
10004 | { ac_try='test -z "$ac_c_werror_flag" |
10005 | || test ! -s conftest.err' | |
86da66b5 HPN |
10006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10007 | (eval $ac_try) 2>&5 | |
10008 | ac_status=$? | |
10009 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10010 | (exit $ac_status); }; } && | |
10011 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
10012 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10013 | (eval $ac_try) 2>&5 | |
10014 | ac_status=$? | |
10015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10016 | (exit $ac_status); }; }; then | |
cb65112a | 10017 | ac_cv_type_pid_t=yes |
c375c43b | 10018 | else |
ba479fd2 NN |
10019 | echo "$as_me: failed program was:" >&5 |
10020 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10021 | |
ba479fd2 NN |
10022 | ac_cv_type_pid_t=no |
10023 | fi | |
86da66b5 | 10024 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 10025 | fi |
ba479fd2 NN |
10026 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10027 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
10028 | if test $ac_cv_type_pid_t = yes; then | |
10029 | : | |
10030 | else | |
10031 | ||
10032 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10033 | #define pid_t int |
ba479fd2 | 10034 | _ACEOF |
c375c43b KG |
10035 | |
10036 | fi | |
10037 | ||
ba479fd2 NN |
10038 | |
10039 | ||
10040 | for ac_header in unistd.h vfork.h | |
10041 | do | |
10042 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
18fc9bd4 | 10043 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
10044 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
10045 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
10046 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 10047 | else |
18fc9bd4 | 10048 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10049 | /* confdefs.h. */ |
10050 | _ACEOF | |
10051 | cat confdefs.h >>conftest.$ac_ext | |
10052 | cat >>conftest.$ac_ext <<_ACEOF | |
10053 | /* end confdefs.h. */ | |
10054 | #include <$ac_header> | |
10055 | _ACEOF | |
10056 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
10057 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
10058 | ac_status=$? | |
10059 | grep -v '^ *+' conftest.er1 >conftest.err | |
10060 | rm -f conftest.er1 | |
10061 | cat conftest.err >&5 | |
10062 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10063 | (exit $ac_status); } >/dev/null; then | |
10064 | if test -s conftest.err; then | |
10065 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 10066 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
10067 | else |
10068 | ac_cpp_err= | |
10069 | fi | |
093e61a6 | 10070 | else |
ba479fd2 NN |
10071 | ac_cpp_err=yes |
10072 | fi | |
10073 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 10074 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10075 | else |
10076 | echo "$as_me: failed program was:" >&5 | |
10077 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10078 | ||
18fc9bd4 | 10079 | eval "$as_ac_Header=no" |
ba479fd2 NN |
10080 | fi |
10081 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 10082 | fi |
ba479fd2 NN |
10083 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
10084 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
10085 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10086 | cat >>confdefs.h <<_ACEOF | |
10087 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10088 | _ACEOF | |
6e3f3080 NN |
10089 | |
10090 | fi | |
ba479fd2 NN |
10091 | done |
10092 | ||
10093 | ||
10094 | ||
10095 | for ac_func in fork vfork | |
10096 | do | |
10097 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10098 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
10099 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
10100 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
10101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10102 | else | |
10103 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10104 | /* confdefs.h. */ |
10105 | _ACEOF | |
10106 | cat confdefs.h >>conftest.$ac_ext | |
10107 | cat >>conftest.$ac_ext <<_ACEOF | |
10108 | /* end confdefs.h. */ | |
86da66b5 HPN |
10109 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10110 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10111 | #define $ac_func innocuous_$ac_func | |
10112 | ||
c375c43b | 10113 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10114 | which can conflict with char $ac_func (); below. |
10115 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10116 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10117 | |
ba479fd2 NN |
10118 | #ifdef __STDC__ |
10119 | # include <limits.h> | |
10120 | #else | |
10121 | # include <assert.h> | |
10122 | #endif | |
86da66b5 HPN |
10123 | |
10124 | #undef $ac_func | |
10125 | ||
6e3f3080 | 10126 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
10127 | #ifdef __cplusplus |
10128 | extern "C" | |
10129 | { | |
10130 | #endif | |
6e3f3080 | 10131 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
10132 | builtin and then its argument prototype would still apply. */ |
10133 | char $ac_func (); | |
c375c43b KG |
10134 | /* The GNU C library defines this for functions which it implements |
10135 | to always fail with ENOSYS. Some functions are actually named | |
10136 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 10137 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
10138 | choke me |
10139 | #else | |
ba479fd2 NN |
10140 | char (*f) () = $ac_func; |
10141 | #endif | |
10142 | #ifdef __cplusplus | |
10143 | } | |
c375c43b KG |
10144 | #endif |
10145 | ||
ba479fd2 NN |
10146 | int |
10147 | main () | |
10148 | { | |
10149 | return f != $ac_func; | |
10150 | ; | |
10151 | return 0; | |
10152 | } | |
10153 | _ACEOF | |
10154 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10155 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10156 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10157 | ac_status=$? |
86da66b5 HPN |
10158 | grep -v '^ *+' conftest.er1 >conftest.err |
10159 | rm -f conftest.er1 | |
10160 | cat conftest.err >&5 | |
ba479fd2 NN |
10161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10162 | (exit $ac_status); } && | |
ec6c7392 PB |
10163 | { ac_try='test -z "$ac_c_werror_flag" |
10164 | || test ! -s conftest.err' | |
86da66b5 HPN |
10165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10166 | (eval $ac_try) 2>&5 | |
10167 | ac_status=$? | |
10168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10169 | (exit $ac_status); }; } && | |
10170 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10172 | (eval $ac_try) 2>&5 | |
10173 | ac_status=$? | |
10174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10175 | (exit $ac_status); }; }; then | |
10176 | eval "$as_ac_var=yes" | |
10177 | else | |
10178 | echo "$as_me: failed program was:" >&5 | |
10179 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10180 | ||
10181 | eval "$as_ac_var=no" | |
10182 | fi | |
86da66b5 HPN |
10183 | rm -f conftest.err conftest.$ac_objext \ |
10184 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10185 | fi |
10186 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10187 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10188 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10189 | cat >>confdefs.h <<_ACEOF | |
10190 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10191 | _ACEOF | |
10192 | ||
c375c43b | 10193 | fi |
ba479fd2 | 10194 | done |
c375c43b | 10195 | |
ba479fd2 NN |
10196 | if test "x$ac_cv_func_fork" = xyes; then |
10197 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10198 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10199 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10200 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10201 | else |
ba479fd2 NN |
10202 | if test "$cross_compiling" = yes; then |
10203 | ac_cv_func_fork_works=cross | |
10204 | else | |
10205 | cat >conftest.$ac_ext <<_ACEOF | |
ec6c7392 PB |
10206 | /* By Ruediger Kuhlmann. */ |
10207 | #include <sys/types.h> | |
10208 | #if HAVE_UNISTD_H | |
10209 | # include <unistd.h> | |
10210 | #endif | |
10211 | /* Some systems only have a dummy stub for fork() */ | |
10212 | int main () | |
10213 | { | |
10214 | if (fork() < 0) | |
10215 | exit (1); | |
10216 | exit (0); | |
10217 | } | |
ba479fd2 NN |
10218 | _ACEOF |
10219 | rm -f conftest$ac_exeext | |
10220 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10221 | (eval $ac_link) 2>&5 | |
10222 | ac_status=$? | |
10223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10224 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10225 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10226 | (eval $ac_try) 2>&5 | |
10227 | ac_status=$? | |
10228 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10229 | (exit $ac_status); }; }; then | |
10230 | ac_cv_func_fork_works=yes | |
10231 | else | |
10232 | echo "$as_me: program exited with status $ac_status" >&5 | |
10233 | echo "$as_me: failed program was:" >&5 | |
10234 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10235 | ||
10236 | ( exit $ac_status ) | |
10237 | ac_cv_func_fork_works=no | |
10238 | fi | |
86da66b5 | 10239 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10240 | fi |
10241 | fi | |
10242 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10243 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10244 | ||
10245 | else | |
10246 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10247 | fi | |
10248 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10249 | case $host in | |
10250 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10251 | # Override, as these systems have only a dummy fork() stub | |
10252 | ac_cv_func_fork_works=no | |
10253 | ;; | |
10254 | *) | |
10255 | ac_cv_func_fork_works=yes | |
10256 | ;; | |
10257 | esac | |
10258 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10259 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10260 | fi |
c375c43b | 10261 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10262 | if test "x$ac_cv_func_vfork" = xyes; then |
10263 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10264 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10265 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10267 | else |
ba479fd2 NN |
10268 | if test "$cross_compiling" = yes; then |
10269 | ac_cv_func_vfork_works=cross | |
10270 | else | |
10271 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10272 | /* confdefs.h. */ |
10273 | _ACEOF | |
10274 | cat confdefs.h >>conftest.$ac_ext | |
10275 | cat >>conftest.$ac_ext <<_ACEOF | |
10276 | /* end confdefs.h. */ | |
c375c43b KG |
10277 | /* Thanks to Paul Eggert for this test. */ |
10278 | #include <stdio.h> | |
ba479fd2 | 10279 | #include <stdlib.h> |
c375c43b KG |
10280 | #include <sys/types.h> |
10281 | #include <sys/stat.h> | |
ba479fd2 NN |
10282 | #include <sys/wait.h> |
10283 | #if HAVE_UNISTD_H | |
10284 | # include <unistd.h> | |
c375c43b | 10285 | #endif |
ba479fd2 NN |
10286 | #if HAVE_VFORK_H |
10287 | # include <vfork.h> | |
c375c43b KG |
10288 | #endif |
10289 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10290 | argument registers are propagated back to the parent. The compiler |
10291 | is told about this with #include <vfork.h>, but some compilers | |
10292 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10293 | static variable whose address is put into a register that is | |
10294 | clobbered by the vfork. */ | |
10295 | static void | |
c375c43b KG |
10296 | #ifdef __cplusplus |
10297 | sparc_address_test (int arg) | |
ba479fd2 | 10298 | # else |
c375c43b KG |
10299 | sparc_address_test (arg) int arg; |
10300 | #endif | |
10301 | { | |
10302 | static pid_t child; | |
10303 | if (!child) { | |
10304 | child = vfork (); | |
10305 | if (child < 0) { | |
10306 | perror ("vfork"); | |
10307 | _exit(2); | |
10308 | } | |
10309 | if (!child) { | |
10310 | arg = getpid(); | |
10311 | write(-1, "", 0); | |
10312 | _exit (arg); | |
10313 | } | |
10314 | } | |
10315 | } | |
ba479fd2 NN |
10316 | |
10317 | int | |
10318 | main () | |
10319 | { | |
c375c43b KG |
10320 | pid_t parent = getpid (); |
10321 | pid_t child; | |
10322 | ||
ba479fd2 | 10323 | sparc_address_test (0); |
c375c43b KG |
10324 | |
10325 | child = vfork (); | |
10326 | ||
10327 | if (child == 0) { | |
ba479fd2 NN |
10328 | /* Here is another test for sparc vfork register problems. This |
10329 | test uses lots of local variables, at least as many local | |
10330 | variables as main has allocated so far including compiler | |
10331 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10332 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10333 | reuse the register of parent for one of the local variables, | |
10334 | since it will think that parent can't possibly be used any more | |
10335 | in this routine. Assigning to the local variable will thus | |
10336 | munge parent in the parent process. */ | |
c375c43b KG |
10337 | pid_t |
10338 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10339 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10340 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10341 | use the same hardware register for all 8 local variables. */ | |
10342 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10343 | || p != p5 || p != p6 || p != p7) | |
10344 | _exit(1); | |
10345 | ||
ba479fd2 NN |
10346 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10347 | from child file descriptors. If the child closes a descriptor | |
10348 | before it execs or exits, this munges the parent's descriptor | |
10349 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10350 | _exit(close(fileno(stdout)) != 0); |
10351 | } else { | |
10352 | int status; | |
10353 | struct stat st; | |
10354 | ||
10355 | while (wait(&status) != child) | |
10356 | ; | |
10357 | exit( | |
10358 | /* Was there some problem with vforking? */ | |
10359 | child < 0 | |
10360 | ||
10361 | /* Did the child fail? (This shouldn't happen.) */ | |
10362 | || status | |
10363 | ||
10364 | /* Did the vfork/compiler bug occur? */ | |
10365 | || parent != getpid() | |
10366 | ||
10367 | /* Did the file descriptor bug occur? */ | |
10368 | || fstat(fileno(stdout), &st) != 0 | |
10369 | ); | |
10370 | } | |
10371 | } | |
ba479fd2 NN |
10372 | _ACEOF |
10373 | rm -f conftest$ac_exeext | |
10374 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10375 | (eval $ac_link) 2>&5 | |
10376 | ac_status=$? | |
10377 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10378 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10380 | (eval $ac_try) 2>&5 | |
10381 | ac_status=$? | |
10382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10383 | (exit $ac_status); }; }; then | |
c375c43b KG |
10384 | ac_cv_func_vfork_works=yes |
10385 | else | |
ba479fd2 NN |
10386 | echo "$as_me: program exited with status $ac_status" >&5 |
10387 | echo "$as_me: failed program was:" >&5 | |
10388 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10389 | ||
10390 | ( exit $ac_status ) | |
10391 | ac_cv_func_vfork_works=no | |
cafe096b | 10392 | fi |
86da66b5 | 10393 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10394 | fi |
ba479fd2 NN |
10395 | fi |
10396 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10397 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10398 | |
ba479fd2 NN |
10399 | fi; |
10400 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10401 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10402 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10403 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10404 | fi |
10405 | ||
ba479fd2 NN |
10406 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10407 | ||
10408 | cat >>confdefs.h <<\_ACEOF | |
10409 | #define HAVE_WORKING_VFORK 1 | |
10410 | _ACEOF | |
10411 | ||
10412 | else | |
10413 | ||
10414 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10415 | #define vfork fork |
ba479fd2 | 10416 | _ACEOF |
c375c43b KG |
10417 | |
10418 | fi | |
ba479fd2 NN |
10419 | if test "x$ac_cv_func_fork_works" = xyes; then |
10420 | ||
10421 | cat >>confdefs.h <<\_ACEOF | |
10422 | #define HAVE_WORKING_FORK 1 | |
10423 | _ACEOF | |
10424 | ||
10425 | fi | |
10426 | ||
c375c43b | 10427 | |
81bf3d9e | 10428 | |
dfb77e37 KC |
10429 | if test "X$prefix" = "XNONE"; then |
10430 | acl_final_prefix="$ac_default_prefix" | |
10431 | else | |
10432 | acl_final_prefix="$prefix" | |
10433 | fi | |
10434 | if test "X$exec_prefix" = "XNONE"; then | |
10435 | acl_final_exec_prefix='${prefix}' | |
10436 | else | |
10437 | acl_final_exec_prefix="$exec_prefix" | |
10438 | fi | |
10439 | acl_save_prefix="$prefix" | |
10440 | prefix="$acl_final_prefix" | |
10441 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10442 | prefix="$acl_save_prefix" | |
f91abfce TT |
10443 | |
10444 | ||
dfb77e37 KC |
10445 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10446 | if test "${with_gnu_ld+set}" = set; then | |
10447 | withval="$with_gnu_ld" | |
10448 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10449 | else |
dfb77e37 KC |
10450 | with_gnu_ld=no |
10451 | fi; | |
10452 | # Prepare PATH_SEPARATOR. | |
10453 | # The user is always right. | |
10454 | if test "${PATH_SEPARATOR+set}" != set; then | |
10455 | echo "#! /bin/sh" >conf$$.sh | |
10456 | echo "exit 0" >>conf$$.sh | |
10457 | chmod +x conf$$.sh | |
10458 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10459 | PATH_SEPARATOR=';' | |
ba479fd2 | 10460 | else |
dfb77e37 | 10461 | PATH_SEPARATOR=: |
ba479fd2 | 10462 | fi |
dfb77e37 KC |
10463 | rm -f conf$$.sh |
10464 | fi | |
10465 | ac_prog=ld | |
10466 | if test "$GCC" = yes; then | |
10467 | # Check if gcc -print-prog-name=ld gives a path. | |
10468 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10469 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10470 | case $host in | |
10471 | *-*-mingw*) | |
10472 | # gcc leaves a trailing carriage return which upsets mingw | |
10473 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10474 | *) | |
10475 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10476 | esac | |
10477 | case $ac_prog in | |
10478 | # Accept absolute paths. | |
10479 | [\\/]* | [A-Za-z]:[\\/]*) | |
10480 | re_direlt='/[^/][^/]*/\.\./' | |
10481 | # Canonicalize the path of ld | |
10482 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10483 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10484 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10485 | done | |
10486 | test -z "$LD" && LD="$ac_prog" | |
10487 | ;; | |
10488 | "") | |
10489 | # If it fails, then pretend we aren't using GCC. | |
10490 | ac_prog=ld | |
10491 | ;; | |
10492 | *) | |
10493 | # If it is relative, then search for the first ld in PATH. | |
10494 | with_gnu_ld=unknown | |
10495 | ;; | |
10496 | esac | |
10497 | elif test "$with_gnu_ld" = yes; then | |
10498 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10499 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10500 | else |
dfb77e37 KC |
10501 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10502 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10503 | fi |
dfb77e37 KC |
10504 | if test "${acl_cv_path_LD+set}" = set; then |
10505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10506 | else |
dfb77e37 KC |
10507 | if test -z "$LD"; then |
10508 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10509 | for ac_dir in $PATH; do | |
10510 | test -z "$ac_dir" && ac_dir=. | |
10511 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10512 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10513 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10514 | # but apparently some GNU ld's only accept -v. | |
10515 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
10516 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
10517 | test "$with_gnu_ld" != no && break | |
10518 | else | |
10519 | test "$with_gnu_ld" != yes && break | |
10520 | fi | |
dfb77e37 KC |
10521 | fi |
10522 | done | |
10523 | IFS="$ac_save_ifs" | |
10524 | else | |
10525 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10526 | fi | |
10527 | fi | |
ba479fd2 | 10528 | |
dfb77e37 KC |
10529 | LD="$acl_cv_path_LD" |
10530 | if test -n "$LD"; then | |
10531 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10532 | echo "${ECHO_T}$LD" >&6 | |
10533 | else | |
10534 | echo "$as_me:$LINENO: result: no" >&5 | |
10535 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10536 | fi |
dfb77e37 KC |
10537 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10538 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10539 | { (exit 1); exit 1; }; } | |
10540 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10541 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10542 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10543 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10544 | else | |
10545 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
10546 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
10547 | acl_cv_prog_gnu_ld=yes | |
10548 | else | |
10549 | acl_cv_prog_gnu_ld=no | |
10550 | fi | |
dfb77e37 KC |
10551 | fi |
10552 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10553 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10554 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10555 | ||
10556 | ||
10557 | ||
10558 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10559 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10560 | if test "${acl_cv_rpath+set}" = set; then | |
10561 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10562 | else | |
10563 | ||
10564 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10565 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10566 | . ./conftest.sh | |
10567 | rm -f ./conftest.sh | |
10568 | acl_cv_rpath=done | |
ba479fd2 | 10569 | |
eb158727 | 10570 | fi |
dfb77e37 KC |
10571 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10572 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10573 | wl="$acl_cv_wl" | |
10574 | libext="$acl_cv_libext" | |
10575 | shlibext="$acl_cv_shlibext" | |
10576 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10577 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10578 | hardcode_direct="$acl_cv_hardcode_direct" | |
10579 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10580 | # Check whether --enable-rpath or --disable-rpath was given. | |
10581 | if test "${enable_rpath+set}" = set; then | |
10582 | enableval="$enable_rpath" | |
10583 | : | |
10584 | else | |
10585 | enable_rpath=yes | |
10586 | fi; | |
10587 | ||
10588 | ||
10589 | ||
10590 | ||
10591 | ||
10592 | ||
10593 | ||
10594 | use_additional=yes | |
10595 | ||
10596 | acl_save_prefix="$prefix" | |
10597 | prefix="$acl_final_prefix" | |
10598 | acl_save_exec_prefix="$exec_prefix" | |
10599 | exec_prefix="$acl_final_exec_prefix" | |
10600 | ||
10601 | eval additional_includedir=\"$includedir\" | |
10602 | eval additional_libdir=\"$libdir\" | |
10603 | ||
10604 | exec_prefix="$acl_save_exec_prefix" | |
10605 | prefix="$acl_save_prefix" | |
10606 | ||
10607 | ||
10608 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10609 | if test "${with_libiconv_prefix+set}" = set; then | |
10610 | withval="$with_libiconv_prefix" | |
10611 | ||
10612 | if test "X$withval" = "Xno"; then | |
10613 | use_additional=no | |
10614 | else | |
10615 | if test "X$withval" = "X"; then | |
10616 | ||
10617 | acl_save_prefix="$prefix" | |
10618 | prefix="$acl_final_prefix" | |
10619 | acl_save_exec_prefix="$exec_prefix" | |
10620 | exec_prefix="$acl_final_exec_prefix" | |
10621 | ||
10622 | eval additional_includedir=\"$includedir\" | |
10623 | eval additional_libdir=\"$libdir\" | |
10624 | ||
10625 | exec_prefix="$acl_save_exec_prefix" | |
10626 | prefix="$acl_save_prefix" | |
10627 | ||
10628 | else | |
10629 | additional_includedir="$withval/include" | |
10630 | additional_libdir="$withval/lib" | |
10631 | fi | |
10632 | fi | |
10633 | ||
10634 | fi; | |
10635 | LIBICONV= | |
10636 | LTLIBICONV= | |
10637 | INCICONV= | |
10638 | rpathdirs= | |
10639 | ltrpathdirs= | |
10640 | names_already_handled= | |
10641 | names_next_round='iconv ' | |
10642 | while test -n "$names_next_round"; do | |
10643 | names_this_round="$names_next_round" | |
10644 | names_next_round= | |
10645 | for name in $names_this_round; do | |
10646 | already_handled= | |
10647 | for n in $names_already_handled; do | |
10648 | if test "$n" = "$name"; then | |
10649 | already_handled=yes | |
10650 | break | |
10651 | fi | |
10652 | done | |
10653 | if test -z "$already_handled"; then | |
10654 | names_already_handled="$names_already_handled $name" | |
10655 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10656 | eval value=\"\$HAVE_LIB$uppername\" | |
10657 | if test -n "$value"; then | |
10658 | if test "$value" = yes; then | |
10659 | eval value=\"\$LIB$uppername\" | |
10660 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10661 | eval value=\"\$LTLIB$uppername\" | |
10662 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10663 | else | |
10664 | : | |
10665 | fi | |
10666 | else | |
10667 | found_dir= | |
10668 | found_la= | |
10669 | found_so= | |
10670 | found_a= | |
10671 | if test $use_additional = yes; then | |
10672 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10673 | found_dir="$additional_libdir" | |
10674 | found_so="$additional_libdir/lib$name.$shlibext" | |
10675 | if test -f "$additional_libdir/lib$name.la"; then | |
10676 | found_la="$additional_libdir/lib$name.la" | |
10677 | fi | |
10678 | else | |
10679 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10680 | found_dir="$additional_libdir" | |
10681 | found_a="$additional_libdir/lib$name.$libext" | |
10682 | if test -f "$additional_libdir/lib$name.la"; then | |
10683 | found_la="$additional_libdir/lib$name.la" | |
10684 | fi | |
10685 | fi | |
10686 | fi | |
10687 | fi | |
10688 | if test "X$found_dir" = "X"; then | |
10689 | for x in $LDFLAGS $LTLIBICONV; do | |
10690 | ||
10691 | acl_save_prefix="$prefix" | |
10692 | prefix="$acl_final_prefix" | |
10693 | acl_save_exec_prefix="$exec_prefix" | |
10694 | exec_prefix="$acl_final_exec_prefix" | |
10695 | eval x=\"$x\" | |
10696 | exec_prefix="$acl_save_exec_prefix" | |
10697 | prefix="$acl_save_prefix" | |
10698 | ||
10699 | case "$x" in | |
10700 | -L*) | |
10701 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10702 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10703 | found_dir="$dir" | |
10704 | found_so="$dir/lib$name.$shlibext" | |
10705 | if test -f "$dir/lib$name.la"; then | |
10706 | found_la="$dir/lib$name.la" | |
10707 | fi | |
10708 | else | |
10709 | if test -f "$dir/lib$name.$libext"; then | |
10710 | found_dir="$dir" | |
10711 | found_a="$dir/lib$name.$libext" | |
10712 | if test -f "$dir/lib$name.la"; then | |
10713 | found_la="$dir/lib$name.la" | |
10714 | fi | |
10715 | fi | |
10716 | fi | |
10717 | ;; | |
10718 | esac | |
10719 | if test "X$found_dir" != "X"; then | |
10720 | break | |
10721 | fi | |
10722 | done | |
10723 | fi | |
10724 | if test "X$found_dir" != "X"; then | |
10725 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10726 | if test "X$found_so" != "X"; then | |
10727 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10728 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10729 | else | |
10730 | haveit= | |
10731 | for x in $ltrpathdirs; do | |
10732 | if test "X$x" = "X$found_dir"; then | |
10733 | haveit=yes | |
10734 | break | |
10735 | fi | |
10736 | done | |
10737 | if test -z "$haveit"; then | |
10738 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10739 | fi | |
10740 | if test "$hardcode_direct" = yes; then | |
10741 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10742 | else | |
10743 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10744 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10745 | haveit= | |
10746 | for x in $rpathdirs; do | |
10747 | if test "X$x" = "X$found_dir"; then | |
10748 | haveit=yes | |
10749 | break | |
10750 | fi | |
10751 | done | |
10752 | if test -z "$haveit"; then | |
10753 | rpathdirs="$rpathdirs $found_dir" | |
10754 | fi | |
10755 | else | |
10756 | haveit= | |
10757 | for x in $LDFLAGS $LIBICONV; do | |
10758 | ||
10759 | acl_save_prefix="$prefix" | |
10760 | prefix="$acl_final_prefix" | |
10761 | acl_save_exec_prefix="$exec_prefix" | |
10762 | exec_prefix="$acl_final_exec_prefix" | |
10763 | eval x=\"$x\" | |
10764 | exec_prefix="$acl_save_exec_prefix" | |
10765 | prefix="$acl_save_prefix" | |
10766 | ||
10767 | if test "X$x" = "X-L$found_dir"; then | |
10768 | haveit=yes | |
10769 | break | |
10770 | fi | |
10771 | done | |
10772 | if test -z "$haveit"; then | |
10773 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10774 | fi | |
10775 | if test "$hardcode_minus_L" != no; then | |
10776 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10777 | else | |
10778 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10779 | fi | |
10780 | fi | |
10781 | fi | |
10782 | fi | |
10783 | else | |
10784 | if test "X$found_a" != "X"; then | |
10785 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10786 | else | |
10787 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10788 | fi | |
10789 | fi | |
10790 | additional_includedir= | |
10791 | case "$found_dir" in | |
10792 | */lib | */lib/) | |
10793 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10794 | additional_includedir="$basedir/include" | |
10795 | ;; | |
10796 | esac | |
10797 | if test "X$additional_includedir" != "X"; then | |
10798 | if test "X$additional_includedir" != "X/usr/include"; then | |
10799 | haveit= | |
10800 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10801 | if test -n "$GCC"; then | |
10802 | case $host_os in | |
18fc9bd4 | 10803 | linux*) haveit=yes;; |
dfb77e37 KC |
10804 | esac |
10805 | fi | |
10806 | fi | |
10807 | if test -z "$haveit"; then | |
10808 | for x in $CPPFLAGS $INCICONV; do | |
10809 | ||
10810 | acl_save_prefix="$prefix" | |
10811 | prefix="$acl_final_prefix" | |
10812 | acl_save_exec_prefix="$exec_prefix" | |
10813 | exec_prefix="$acl_final_exec_prefix" | |
10814 | eval x=\"$x\" | |
10815 | exec_prefix="$acl_save_exec_prefix" | |
10816 | prefix="$acl_save_prefix" | |
10817 | ||
10818 | if test "X$x" = "X-I$additional_includedir"; then | |
10819 | haveit=yes | |
10820 | break | |
10821 | fi | |
10822 | done | |
10823 | if test -z "$haveit"; then | |
10824 | if test -d "$additional_includedir"; then | |
10825 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10826 | fi | |
10827 | fi | |
10828 | fi | |
10829 | fi | |
10830 | fi | |
10831 | if test -n "$found_la"; then | |
10832 | save_libdir="$libdir" | |
10833 | case "$found_la" in | |
10834 | */* | *\\*) . "$found_la" ;; | |
10835 | *) . "./$found_la" ;; | |
10836 | esac | |
10837 | libdir="$save_libdir" | |
10838 | for dep in $dependency_libs; do | |
10839 | case "$dep" in | |
10840 | -L*) | |
10841 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10842 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10843 | haveit= | |
10844 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10845 | if test -n "$GCC"; then | |
10846 | case $host_os in | |
18fc9bd4 | 10847 | linux*) haveit=yes;; |
dfb77e37 KC |
10848 | esac |
10849 | fi | |
10850 | fi | |
10851 | if test -z "$haveit"; then | |
10852 | haveit= | |
10853 | for x in $LDFLAGS $LIBICONV; do | |
10854 | ||
10855 | acl_save_prefix="$prefix" | |
10856 | prefix="$acl_final_prefix" | |
10857 | acl_save_exec_prefix="$exec_prefix" | |
10858 | exec_prefix="$acl_final_exec_prefix" | |
10859 | eval x=\"$x\" | |
10860 | exec_prefix="$acl_save_exec_prefix" | |
10861 | prefix="$acl_save_prefix" | |
10862 | ||
10863 | if test "X$x" = "X-L$additional_libdir"; then | |
10864 | haveit=yes | |
10865 | break | |
10866 | fi | |
10867 | done | |
10868 | if test -z "$haveit"; then | |
10869 | if test -d "$additional_libdir"; then | |
10870 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10871 | fi | |
10872 | fi | |
10873 | haveit= | |
10874 | for x in $LDFLAGS $LTLIBICONV; do | |
10875 | ||
10876 | acl_save_prefix="$prefix" | |
10877 | prefix="$acl_final_prefix" | |
10878 | acl_save_exec_prefix="$exec_prefix" | |
10879 | exec_prefix="$acl_final_exec_prefix" | |
10880 | eval x=\"$x\" | |
10881 | exec_prefix="$acl_save_exec_prefix" | |
10882 | prefix="$acl_save_prefix" | |
10883 | ||
10884 | if test "X$x" = "X-L$additional_libdir"; then | |
10885 | haveit=yes | |
10886 | break | |
10887 | fi | |
10888 | done | |
10889 | if test -z "$haveit"; then | |
10890 | if test -d "$additional_libdir"; then | |
10891 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10892 | fi | |
10893 | fi | |
10894 | fi | |
10895 | fi | |
10896 | ;; | |
10897 | -R*) | |
10898 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10899 | if test "$enable_rpath" != no; then | |
10900 | haveit= | |
10901 | for x in $rpathdirs; do | |
10902 | if test "X$x" = "X$dir"; then | |
10903 | haveit=yes | |
10904 | break | |
10905 | fi | |
10906 | done | |
10907 | if test -z "$haveit"; then | |
10908 | rpathdirs="$rpathdirs $dir" | |
10909 | fi | |
10910 | haveit= | |
10911 | for x in $ltrpathdirs; do | |
10912 | if test "X$x" = "X$dir"; then | |
10913 | haveit=yes | |
10914 | break | |
10915 | fi | |
10916 | done | |
10917 | if test -z "$haveit"; then | |
10918 | ltrpathdirs="$ltrpathdirs $dir" | |
10919 | fi | |
10920 | fi | |
10921 | ;; | |
10922 | -l*) | |
10923 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10924 | ;; | |
10925 | *.la) | |
10926 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10927 | ;; | |
10928 | *) | |
10929 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10930 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10931 | ;; | |
10932 | esac | |
10933 | done | |
10934 | fi | |
10935 | else | |
10936 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10937 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10938 | fi | |
10939 | fi | |
10940 | fi | |
10941 | done | |
10942 | done | |
10943 | if test "X$rpathdirs" != "X"; then | |
10944 | if test -n "$hardcode_libdir_separator"; then | |
10945 | alldirs= | |
10946 | for found_dir in $rpathdirs; do | |
10947 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10948 | done | |
10949 | acl_save_libdir="$libdir" | |
10950 | libdir="$alldirs" | |
10951 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10952 | libdir="$acl_save_libdir" | |
10953 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10954 | else | |
10955 | for found_dir in $rpathdirs; do | |
10956 | acl_save_libdir="$libdir" | |
10957 | libdir="$found_dir" | |
10958 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10959 | libdir="$acl_save_libdir" | |
10960 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10961 | done | |
10962 | fi | |
10963 | fi | |
10964 | if test "X$ltrpathdirs" != "X"; then | |
10965 | for found_dir in $ltrpathdirs; do | |
10966 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10967 | done | |
10968 | fi | |
10969 | ||
10970 | ||
10971 | ||
10972 | ||
10973 | ||
10974 | ||
10975 | ||
10976 | am_save_CPPFLAGS="$CPPFLAGS" | |
10977 | ||
10978 | for element in $INCICONV; do | |
10979 | haveit= | |
10980 | for x in $CPPFLAGS; do | |
10981 | ||
10982 | acl_save_prefix="$prefix" | |
10983 | prefix="$acl_final_prefix" | |
10984 | acl_save_exec_prefix="$exec_prefix" | |
10985 | exec_prefix="$acl_final_exec_prefix" | |
10986 | eval x=\"$x\" | |
10987 | exec_prefix="$acl_save_exec_prefix" | |
10988 | prefix="$acl_save_prefix" | |
10989 | ||
10990 | if test "X$x" = "X$element"; then | |
10991 | haveit=yes | |
10992 | break | |
10993 | fi | |
10994 | done | |
10995 | if test -z "$haveit"; then | |
10996 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
10997 | fi | |
10998 | done | |
eb158727 ZW |
10999 | |
11000 | ||
ba479fd2 NN |
11001 | echo "$as_me:$LINENO: checking for iconv" >&5 |
11002 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
11003 | if test "${am_cv_func_iconv+set}" = set; then | |
11004 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11005 | else |
ba479fd2 | 11006 | |
f91abfce TT |
11007 | am_cv_func_iconv="no, consider installing GNU libiconv" |
11008 | am_cv_lib_iconv=no | |
ba479fd2 | 11009 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11010 | /* confdefs.h. */ |
11011 | _ACEOF | |
11012 | cat confdefs.h >>conftest.$ac_ext | |
11013 | cat >>conftest.$ac_ext <<_ACEOF | |
11014 | /* end confdefs.h. */ | |
f91abfce TT |
11015 | #include <stdlib.h> |
11016 | #include <iconv.h> | |
ba479fd2 NN |
11017 | int |
11018 | main () | |
11019 | { | |
f91abfce TT |
11020 | iconv_t cd = iconv_open("",""); |
11021 | iconv(cd,NULL,NULL,NULL,NULL); | |
11022 | iconv_close(cd); | |
ba479fd2 NN |
11023 | ; |
11024 | return 0; | |
11025 | } | |
11026 | _ACEOF | |
11027 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11028 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11029 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11030 | ac_status=$? |
86da66b5 HPN |
11031 | grep -v '^ *+' conftest.er1 >conftest.err |
11032 | rm -f conftest.er1 | |
11033 | cat conftest.err >&5 | |
ba479fd2 NN |
11034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11035 | (exit $ac_status); } && | |
ec6c7392 PB |
11036 | { ac_try='test -z "$ac_c_werror_flag" |
11037 | || test ! -s conftest.err' | |
86da66b5 HPN |
11038 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11039 | (eval $ac_try) 2>&5 | |
11040 | ac_status=$? | |
11041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11042 | (exit $ac_status); }; } && | |
11043 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11044 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11045 | (eval $ac_try) 2>&5 | |
11046 | ac_status=$? | |
11047 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11048 | (exit $ac_status); }; }; then | |
f91abfce TT |
11049 | am_cv_func_iconv=yes |
11050 | else | |
ba479fd2 NN |
11051 | echo "$as_me: failed program was:" >&5 |
11052 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11053 | ||
f91abfce | 11054 | fi |
86da66b5 HPN |
11055 | rm -f conftest.err conftest.$ac_objext \ |
11056 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11057 | if test "$am_cv_func_iconv" != yes; then |
11058 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11059 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11060 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11061 | /* confdefs.h. */ |
11062 | _ACEOF | |
11063 | cat confdefs.h >>conftest.$ac_ext | |
11064 | cat >>conftest.$ac_ext <<_ACEOF | |
11065 | /* end confdefs.h. */ | |
f91abfce TT |
11066 | #include <stdlib.h> |
11067 | #include <iconv.h> | |
ba479fd2 NN |
11068 | int |
11069 | main () | |
11070 | { | |
f91abfce TT |
11071 | iconv_t cd = iconv_open("",""); |
11072 | iconv(cd,NULL,NULL,NULL,NULL); | |
11073 | iconv_close(cd); | |
ba479fd2 NN |
11074 | ; |
11075 | return 0; | |
11076 | } | |
11077 | _ACEOF | |
11078 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11079 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11080 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11081 | ac_status=$? |
86da66b5 HPN |
11082 | grep -v '^ *+' conftest.er1 >conftest.err |
11083 | rm -f conftest.er1 | |
11084 | cat conftest.err >&5 | |
ba479fd2 NN |
11085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11086 | (exit $ac_status); } && | |
ec6c7392 PB |
11087 | { ac_try='test -z "$ac_c_werror_flag" |
11088 | || test ! -s conftest.err' | |
86da66b5 HPN |
11089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11090 | (eval $ac_try) 2>&5 | |
11091 | ac_status=$? | |
11092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11093 | (exit $ac_status); }; } && | |
11094 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11095 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11096 | (eval $ac_try) 2>&5 | |
11097 | ac_status=$? | |
11098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11099 | (exit $ac_status); }; }; then | |
f91abfce TT |
11100 | am_cv_lib_iconv=yes |
11101 | am_cv_func_iconv=yes | |
11102 | else | |
ba479fd2 NN |
11103 | echo "$as_me: failed program was:" >&5 |
11104 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11105 | ||
f91abfce | 11106 | fi |
86da66b5 HPN |
11107 | rm -f conftest.err conftest.$ac_objext \ |
11108 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11109 | LIBS="$am_save_LIBS" |
11110 | fi | |
6e3f3080 | 11111 | |
ba479fd2 NN |
11112 | fi |
11113 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
11114 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 11115 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11116 | |
11117 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11118 | #define HAVE_ICONV 1 |
ba479fd2 | 11119 | _ACEOF |
f91abfce | 11120 | |
dfb77e37 KC |
11121 | fi |
11122 | if test "$am_cv_lib_iconv" = yes; then | |
11123 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
11124 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
11125 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11126 | echo "${ECHO_T}$LIBICONV" >&6 | |
11127 | else | |
11128 | CPPFLAGS="$am_save_CPPFLAGS" | |
11129 | LIBICONV= | |
11130 | LTLIBICONV= | |
11131 | fi | |
11132 | ||
11133 | ||
11134 | ||
11135 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
11136 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11137 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
11138 | if test "${am_cv_proto_iconv+set}" = set; then | |
11139 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11140 | else |
ba479fd2 NN |
11141 | |
11142 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11143 | /* confdefs.h. */ |
11144 | _ACEOF | |
11145 | cat confdefs.h >>conftest.$ac_ext | |
11146 | cat >>conftest.$ac_ext <<_ACEOF | |
11147 | /* end confdefs.h. */ | |
f91abfce TT |
11148 | |
11149 | #include <stdlib.h> | |
11150 | #include <iconv.h> | |
11151 | extern | |
11152 | #ifdef __cplusplus | |
11153 | "C" | |
11154 | #endif | |
11155 | #if defined(__STDC__) || defined(__cplusplus) | |
11156 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11157 | #else | |
11158 | size_t iconv(); | |
11159 | #endif | |
11160 | ||
ba479fd2 NN |
11161 | int |
11162 | main () | |
11163 | { | |
f91abfce | 11164 | |
ba479fd2 NN |
11165 | ; |
11166 | return 0; | |
11167 | } | |
11168 | _ACEOF | |
11169 | rm -f conftest.$ac_objext | |
11170 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11171 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11172 | ac_status=$? |
86da66b5 HPN |
11173 | grep -v '^ *+' conftest.er1 >conftest.err |
11174 | rm -f conftest.er1 | |
11175 | cat conftest.err >&5 | |
ba479fd2 NN |
11176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11177 | (exit $ac_status); } && | |
ec6c7392 PB |
11178 | { ac_try='test -z "$ac_c_werror_flag" |
11179 | || test ! -s conftest.err' | |
86da66b5 HPN |
11180 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11181 | (eval $ac_try) 2>&5 | |
11182 | ac_status=$? | |
11183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11184 | (exit $ac_status); }; } && | |
11185 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11186 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11187 | (eval $ac_try) 2>&5 | |
11188 | ac_status=$? | |
11189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11190 | (exit $ac_status); }; }; then | |
f91abfce TT |
11191 | am_cv_proto_iconv_arg1="" |
11192 | else | |
ba479fd2 NN |
11193 | echo "$as_me: failed program was:" >&5 |
11194 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11195 | ||
11196 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11197 | fi |
86da66b5 | 11198 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11199 | 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);" |
11200 | fi | |
11201 | ||
11202 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11203 | echo "$as_me:$LINENO: result: ${ac_t:- |
11204 | }$am_cv_proto_iconv" >&5 | |
11205 | echo "${ECHO_T}${ac_t:- | |
11206 | }$am_cv_proto_iconv" >&6 | |
11207 | ||
11208 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11209 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11210 | _ACEOF |
f91abfce TT |
11211 | |
11212 | fi | |
f91abfce | 11213 | |
56694dd9 ZW |
11214 | # Until we have in-tree GNU iconv: |
11215 | LIBICONV_DEP= | |
11216 | ||
11217 | ||
18fc9bd4 RG |
11218 | |
11219 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 | |
11220 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11221 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11222 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11223 | else | |
11224 | cat >conftest.$ac_ext <<_ACEOF | |
11225 | /* confdefs.h. */ | |
11226 | _ACEOF | |
11227 | cat confdefs.h >>conftest.$ac_ext | |
11228 | cat >>conftest.$ac_ext <<_ACEOF | |
11229 | /* end confdefs.h. */ | |
11230 | #include <locale.h> | |
11231 | int | |
11232 | main () | |
11233 | { | |
11234 | return LC_MESSAGES | |
11235 | ; | |
11236 | return 0; | |
11237 | } | |
11238 | _ACEOF | |
11239 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11240 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11241 | (eval $ac_link) 2>conftest.er1 | |
11242 | ac_status=$? | |
11243 | grep -v '^ *+' conftest.er1 >conftest.err | |
11244 | rm -f conftest.er1 | |
11245 | cat conftest.err >&5 | |
11246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11247 | (exit $ac_status); } && | |
11248 | { ac_try='test -z "$ac_c_werror_flag" | |
11249 | || test ! -s conftest.err' | |
11250 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11251 | (eval $ac_try) 2>&5 | |
11252 | ac_status=$? | |
11253 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11254 | (exit $ac_status); }; } && | |
11255 | { ac_try='test -s conftest$ac_exeext' | |
11256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11257 | (eval $ac_try) 2>&5 | |
11258 | ac_status=$? | |
11259 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11260 | (exit $ac_status); }; }; then | |
11261 | am_cv_val_LC_MESSAGES=yes | |
11262 | else | |
11263 | echo "$as_me: failed program was:" >&5 | |
11264 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11265 | ||
11266 | am_cv_val_LC_MESSAGES=no | |
11267 | fi | |
11268 | rm -f conftest.err conftest.$ac_objext \ | |
11269 | conftest$ac_exeext conftest.$ac_ext | |
11270 | fi | |
11271 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 | |
11272 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
11273 | if test $am_cv_val_LC_MESSAGES = yes; then | |
11274 | ||
11275 | cat >>confdefs.h <<\_ACEOF | |
11276 | #define HAVE_LC_MESSAGES 1 | |
11277 | _ACEOF | |
11278 | ||
11279 | fi | |
11280 | ||
f91abfce | 11281 | |
a03ea89b BM |
11282 | |
11283 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11284 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11285 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11286 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11287 | else | |
11288 | cat >conftest.$ac_ext <<_ACEOF | |
11289 | /* confdefs.h. */ | |
11290 | _ACEOF | |
11291 | cat confdefs.h >>conftest.$ac_ext | |
11292 | cat >>conftest.$ac_ext <<_ACEOF | |
11293 | /* end confdefs.h. */ | |
11294 | #include <langinfo.h> | |
11295 | int | |
11296 | main () | |
11297 | { | |
11298 | char* cs = nl_langinfo(CODESET); | |
11299 | ; | |
11300 | return 0; | |
11301 | } | |
11302 | _ACEOF | |
11303 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11304 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11305 | (eval $ac_link) 2>conftest.er1 | |
11306 | ac_status=$? | |
11307 | grep -v '^ *+' conftest.er1 >conftest.err | |
11308 | rm -f conftest.er1 | |
11309 | cat conftest.err >&5 | |
11310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11311 | (exit $ac_status); } && | |
ec6c7392 PB |
11312 | { ac_try='test -z "$ac_c_werror_flag" |
11313 | || test ! -s conftest.err' | |
a03ea89b BM |
11314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11315 | (eval $ac_try) 2>&5 | |
11316 | ac_status=$? | |
11317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11318 | (exit $ac_status); }; } && | |
11319 | { ac_try='test -s conftest$ac_exeext' | |
11320 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11321 | (eval $ac_try) 2>&5 | |
11322 | ac_status=$? | |
11323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11324 | (exit $ac_status); }; }; then | |
11325 | am_cv_langinfo_codeset=yes | |
11326 | else | |
11327 | echo "$as_me: failed program was:" >&5 | |
11328 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11329 | ||
11330 | am_cv_langinfo_codeset=no | |
11331 | fi | |
11332 | rm -f conftest.err conftest.$ac_objext \ | |
11333 | conftest$ac_exeext conftest.$ac_ext | |
11334 | ||
11335 | fi | |
11336 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11337 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11338 | if test $am_cv_langinfo_codeset = yes; then | |
11339 | ||
11340 | cat >>confdefs.h <<\_ACEOF | |
11341 | #define HAVE_LANGINFO_CODESET 1 | |
11342 | _ACEOF | |
11343 | ||
11344 | fi | |
11345 | ||
11346 | ||
86cf1cbd KG |
11347 | # We will need to find libiberty.h and ansidecl.h |
11348 | saved_CFLAGS="$CFLAGS" | |
11349 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11350 | |
11351 | ||
11352 | ||
11353 | ||
11354 | ||
11355 | ||
11356 | ||
11357 | ||
11358 | ||
11359 | ||
11360 | ||
11361 | ||
11362 | ||
11363 | ||
11364 | ||
11365 | ||
11366 | ||
11367 | ||
11368 | ||
11369 | ||
11370 | ||
6a257778 | 11371 | |
ad6717df PB |
11372 | |
11373 | ||
0d667716 KG |
11374 | |
11375 | ||
11376 | ||
11377 | ||
11378 | ||
11379 | ||
11380 | ||
11381 | ||
11382 | ||
11383 | ||
367e8319 | 11384 | |
0d667716 KG |
11385 | |
11386 | ||
7391b66c | 11387 | |
ed5b9f96 GK |
11388 | |
11389 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11390 | strsignal strstr strverscmp \ | |
11391 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11392 | 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 | 11393 | do |
ad6717df | 11394 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11395 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11396 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11397 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11398 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11399 | else | |
11400 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11401 | /* confdefs.h. */ |
11402 | _ACEOF | |
11403 | cat confdefs.h >>conftest.$ac_ext | |
11404 | cat >>conftest.$ac_ext <<_ACEOF | |
11405 | /* end confdefs.h. */ | |
7afe8c41 KG |
11406 | #undef $ac_tr_decl |
11407 | #define $ac_tr_decl 1 | |
ba479fd2 | 11408 | |
d02af173 | 11409 | #include "ansidecl.h" |
86cf1cbd | 11410 | #include "system.h" |
f31e826b | 11411 | |
ba479fd2 NN |
11412 | int |
11413 | main () | |
11414 | { | |
86cf1cbd KG |
11415 | #ifndef $ac_func |
11416 | char *(*pfn) = (char *(*)) $ac_func ; | |
11417 | #endif | |
ba479fd2 NN |
11418 | ; |
11419 | return 0; | |
11420 | } | |
11421 | _ACEOF | |
11422 | rm -f conftest.$ac_objext | |
11423 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11424 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11425 | ac_status=$? |
86da66b5 HPN |
11426 | grep -v '^ *+' conftest.er1 >conftest.err |
11427 | rm -f conftest.er1 | |
11428 | cat conftest.err >&5 | |
ba479fd2 NN |
11429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11430 | (exit $ac_status); } && | |
ec6c7392 PB |
11431 | { ac_try='test -z "$ac_c_werror_flag" |
11432 | || test ! -s conftest.err' | |
86da66b5 HPN |
11433 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11434 | (eval $ac_try) 2>&5 | |
11435 | ac_status=$? | |
11436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11437 | (exit $ac_status); }; } && | |
11438 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11439 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11440 | (eval $ac_try) 2>&5 | |
11441 | ac_status=$? | |
11442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11443 | (exit $ac_status); }; }; then | |
f31e826b | 11444 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11445 | else |
ba479fd2 NN |
11446 | echo "$as_me: failed program was:" >&5 |
11447 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11448 | ||
11449 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11450 | fi |
86da66b5 | 11451 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11452 | fi |
11453 | ||
f31e826b | 11454 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11455 | echo "$as_me:$LINENO: result: yes" >&5 |
11456 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11457 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11458 | _ACEOF |
11459 | ||
81bf3d9e | 11460 | else |
ba479fd2 NN |
11461 | echo "$as_me:$LINENO: result: no" >&5 |
11462 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11463 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11464 | _ACEOF |
11465 | ||
81bf3d9e RH |
11466 | fi |
11467 | ||
11468 | done | |
ba479fd2 | 11469 | |
ba479fd2 | 11470 | |
ba479fd2 | 11471 | |
81bf3d9e | 11472 | |
81bf3d9e RH |
11473 | |
11474 | for ac_func in getrlimit setrlimit getrusage | |
11475 | do | |
ad6717df | 11476 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11477 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11478 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11479 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11480 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11481 | else | |
11482 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11483 | /* confdefs.h. */ |
11484 | _ACEOF | |
11485 | cat confdefs.h >>conftest.$ac_ext | |
11486 | cat >>conftest.$ac_ext <<_ACEOF | |
11487 | /* end confdefs.h. */ | |
7afe8c41 KG |
11488 | #undef $ac_tr_decl |
11489 | #define $ac_tr_decl 1 | |
ba479fd2 | 11490 | |
d02af173 | 11491 | #include "ansidecl.h" |
86cf1cbd | 11492 | #include "system.h" |
81bf3d9e RH |
11493 | #ifdef HAVE_SYS_RESOURCE_H |
11494 | #include <sys/resource.h> | |
11495 | #endif | |
11496 | ||
f31e826b | 11497 | |
ba479fd2 NN |
11498 | int |
11499 | main () | |
11500 | { | |
86cf1cbd KG |
11501 | #ifndef $ac_func |
11502 | char *(*pfn) = (char *(*)) $ac_func ; | |
11503 | #endif | |
ba479fd2 NN |
11504 | ; |
11505 | return 0; | |
11506 | } | |
11507 | _ACEOF | |
11508 | rm -f conftest.$ac_objext | |
11509 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11510 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11511 | ac_status=$? |
86da66b5 HPN |
11512 | grep -v '^ *+' conftest.er1 >conftest.err |
11513 | rm -f conftest.er1 | |
11514 | cat conftest.err >&5 | |
ba479fd2 NN |
11515 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11516 | (exit $ac_status); } && | |
ec6c7392 PB |
11517 | { ac_try='test -z "$ac_c_werror_flag" |
11518 | || test ! -s conftest.err' | |
86da66b5 HPN |
11519 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11520 | (eval $ac_try) 2>&5 | |
11521 | ac_status=$? | |
11522 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11523 | (exit $ac_status); }; } && | |
11524 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11525 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11526 | (eval $ac_try) 2>&5 | |
11527 | ac_status=$? | |
11528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11529 | (exit $ac_status); }; }; then | |
f31e826b | 11530 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11531 | else |
ba479fd2 NN |
11532 | echo "$as_me: failed program was:" >&5 |
11533 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11534 | ||
11535 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11536 | fi |
86da66b5 | 11537 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11538 | fi |
11539 | ||
f31e826b | 11540 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11541 | echo "$as_me:$LINENO: result: yes" >&5 |
11542 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11543 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11544 | _ACEOF |
11545 | ||
81bf3d9e | 11546 | else |
ba479fd2 NN |
11547 | echo "$as_me:$LINENO: result: no" >&5 |
11548 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11549 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11550 | _ACEOF |
11551 | ||
81bf3d9e RH |
11552 | fi |
11553 | ||
11554 | done | |
86cf1cbd | 11555 | |
81bf3d9e | 11556 | |
ba479fd2 | 11557 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11558 | /* confdefs.h. */ |
11559 | _ACEOF | |
11560 | cat confdefs.h >>conftest.$ac_ext | |
11561 | cat >>conftest.$ac_ext <<_ACEOF | |
11562 | /* end confdefs.h. */ | |
b2522d2b HPN |
11563 | |
11564 | #include "ansidecl.h" | |
11565 | #include "system.h" | |
11566 | #ifdef HAVE_SYS_RESOURCE_H | |
11567 | #include <sys/resource.h> | |
11568 | #endif | |
11569 | ||
ba479fd2 NN |
11570 | int |
11571 | main () | |
11572 | { | |
b2522d2b | 11573 | rlim_t l = 0; |
ba479fd2 NN |
11574 | ; |
11575 | return 0; | |
11576 | } | |
11577 | _ACEOF | |
11578 | rm -f conftest.$ac_objext | |
11579 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11580 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11581 | ac_status=$? |
86da66b5 HPN |
11582 | grep -v '^ *+' conftest.er1 >conftest.err |
11583 | rm -f conftest.er1 | |
11584 | cat conftest.err >&5 | |
ba479fd2 NN |
11585 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11586 | (exit $ac_status); } && | |
ec6c7392 PB |
11587 | { ac_try='test -z "$ac_c_werror_flag" |
11588 | || test ! -s conftest.err' | |
86da66b5 HPN |
11589 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11590 | (eval $ac_try) 2>&5 | |
11591 | ac_status=$? | |
11592 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11593 | (exit $ac_status); }; } && | |
11594 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11595 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11596 | (eval $ac_try) 2>&5 | |
11597 | ac_status=$? | |
11598 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11599 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11600 | : |
11601 | else | |
ba479fd2 NN |
11602 | echo "$as_me: failed program was:" >&5 |
11603 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11604 | ||
11605 | ||
11606 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11607 | #define rlim_t long |
ba479fd2 | 11608 | _ACEOF |
b2522d2b HPN |
11609 | |
11610 | fi | |
86da66b5 | 11611 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11612 | |
2102b2fe RS |
11613 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11614 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11615 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11616 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11617 | |
351df804 | 11618 | for ac_func in ldgetname |
c1800ec8 | 11619 | do |
ad6717df | 11620 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11621 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11622 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11623 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11624 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11625 | else | |
11626 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11627 | /* confdefs.h. */ |
11628 | _ACEOF | |
11629 | cat confdefs.h >>conftest.$ac_ext | |
11630 | cat >>conftest.$ac_ext <<_ACEOF | |
11631 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11632 | #undef $ac_tr_decl |
11633 | #define $ac_tr_decl 1 | |
ba479fd2 | 11634 | |
351df804 KG |
11635 | #include "ansidecl.h" |
11636 | #include "system.h" | |
11637 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11638 | #undef FREAD |
11639 | #undef FWRITE | |
351df804 KG |
11640 | #include <ldfcn.h> |
11641 | #endif | |
11642 | ||
11643 | ||
ba479fd2 NN |
11644 | int |
11645 | main () | |
11646 | { | |
351df804 KG |
11647 | #ifndef $ac_func |
11648 | char *(*pfn) = (char *(*)) $ac_func ; | |
11649 | #endif | |
ba479fd2 NN |
11650 | ; |
11651 | return 0; | |
11652 | } | |
11653 | _ACEOF | |
11654 | rm -f conftest.$ac_objext | |
11655 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11656 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11657 | ac_status=$? |
86da66b5 HPN |
11658 | grep -v '^ *+' conftest.er1 >conftest.err |
11659 | rm -f conftest.er1 | |
11660 | cat conftest.err >&5 | |
ba479fd2 NN |
11661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11662 | (exit $ac_status); } && | |
ec6c7392 PB |
11663 | { ac_try='test -z "$ac_c_werror_flag" |
11664 | || test ! -s conftest.err' | |
86da66b5 HPN |
11665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11666 | (eval $ac_try) 2>&5 | |
11667 | ac_status=$? | |
11668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11669 | (exit $ac_status); }; } && | |
11670 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11672 | (eval $ac_try) 2>&5 | |
11673 | ac_status=$? | |
11674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11675 | (exit $ac_status); }; }; then | |
351df804 KG |
11676 | eval "gcc_cv_have_decl_$ac_func=yes" |
11677 | else | |
ba479fd2 NN |
11678 | echo "$as_me: failed program was:" >&5 |
11679 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11680 | ||
11681 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11682 | fi |
86da66b5 | 11683 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11684 | fi |
11685 | ||
11686 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11687 | echo "$as_me:$LINENO: result: yes" >&5 |
11688 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11689 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11690 | _ACEOF |
11691 | ||
351df804 | 11692 | else |
ba479fd2 NN |
11693 | echo "$as_me:$LINENO: result: no" >&5 |
11694 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11695 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11696 | _ACEOF |
11697 | ||
351df804 KG |
11698 | fi |
11699 | ||
11700 | done | |
ba479fd2 | 11701 | |
351df804 KG |
11702 | |
11703 | ||
11704 | for ac_func in times | |
11705 | do | |
ad6717df | 11706 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11707 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11708 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11709 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11710 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11711 | else | |
11712 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11713 | /* confdefs.h. */ |
11714 | _ACEOF | |
11715 | cat confdefs.h >>conftest.$ac_ext | |
11716 | cat >>conftest.$ac_ext <<_ACEOF | |
11717 | /* end confdefs.h. */ | |
351df804 KG |
11718 | #undef $ac_tr_decl |
11719 | #define $ac_tr_decl 1 | |
ba479fd2 | 11720 | |
c1800ec8 ZW |
11721 | #include "ansidecl.h" |
11722 | #include "system.h" | |
11723 | #ifdef HAVE_SYS_TIMES_H | |
11724 | #include <sys/times.h> | |
11725 | #endif | |
11726 | ||
11727 | ||
ba479fd2 NN |
11728 | int |
11729 | main () | |
11730 | { | |
c1800ec8 ZW |
11731 | #ifndef $ac_func |
11732 | char *(*pfn) = (char *(*)) $ac_func ; | |
11733 | #endif | |
ba479fd2 NN |
11734 | ; |
11735 | return 0; | |
11736 | } | |
11737 | _ACEOF | |
11738 | rm -f conftest.$ac_objext | |
11739 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11740 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11741 | ac_status=$? |
86da66b5 HPN |
11742 | grep -v '^ *+' conftest.er1 >conftest.err |
11743 | rm -f conftest.er1 | |
11744 | cat conftest.err >&5 | |
ba479fd2 NN |
11745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11746 | (exit $ac_status); } && | |
ec6c7392 PB |
11747 | { ac_try='test -z "$ac_c_werror_flag" |
11748 | || test ! -s conftest.err' | |
86da66b5 HPN |
11749 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11750 | (eval $ac_try) 2>&5 | |
11751 | ac_status=$? | |
11752 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11753 | (exit $ac_status); }; } && | |
11754 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11755 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11756 | (eval $ac_try) 2>&5 | |
11757 | ac_status=$? | |
11758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11759 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11760 | eval "gcc_cv_have_decl_$ac_func=yes" |
11761 | else | |
ba479fd2 NN |
11762 | echo "$as_me: failed program was:" >&5 |
11763 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11764 | ||
11765 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11766 | fi |
86da66b5 | 11767 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11768 | fi |
11769 | ||
11770 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11771 | echo "$as_me:$LINENO: result: yes" >&5 |
11772 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11773 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11774 | _ACEOF |
11775 | ||
c1800ec8 | 11776 | else |
ba479fd2 NN |
11777 | echo "$as_me:$LINENO: result: no" >&5 |
11778 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11779 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11780 | _ACEOF |
11781 | ||
c1800ec8 ZW |
11782 | fi |
11783 | ||
11784 | done | |
c1800ec8 ZW |
11785 | |
11786 | ||
4f6d8cc8 GK |
11787 | |
11788 | for ac_func in sigaltstack | |
11789 | do | |
11790 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
11791 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 | |
11792 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11793 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11794 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11795 | else | |
11796 | cat >conftest.$ac_ext <<_ACEOF | |
11797 | /* confdefs.h. */ | |
11798 | _ACEOF | |
11799 | cat confdefs.h >>conftest.$ac_ext | |
11800 | cat >>conftest.$ac_ext <<_ACEOF | |
11801 | /* end confdefs.h. */ | |
11802 | #undef $ac_tr_decl | |
11803 | #define $ac_tr_decl 1 | |
11804 | ||
11805 | #include "ansidecl.h" | |
11806 | #include "system.h" | |
11807 | #include <signal.h> | |
11808 | ||
11809 | ||
11810 | int | |
11811 | main () | |
11812 | { | |
11813 | #ifndef $ac_func | |
11814 | char *(*pfn) = (char *(*)) $ac_func ; | |
11815 | #endif | |
11816 | ; | |
11817 | return 0; | |
11818 | } | |
11819 | _ACEOF | |
11820 | rm -f conftest.$ac_objext | |
11821 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
11822 | (eval $ac_compile) 2>conftest.er1 | |
11823 | ac_status=$? | |
11824 | grep -v '^ *+' conftest.er1 >conftest.err | |
11825 | rm -f conftest.er1 | |
11826 | cat conftest.err >&5 | |
11827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11828 | (exit $ac_status); } && | |
ec6c7392 PB |
11829 | { ac_try='test -z "$ac_c_werror_flag" |
11830 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
11831 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11832 | (eval $ac_try) 2>&5 | |
11833 | ac_status=$? | |
11834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11835 | (exit $ac_status); }; } && | |
11836 | { ac_try='test -s conftest.$ac_objext' | |
11837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11838 | (eval $ac_try) 2>&5 | |
11839 | ac_status=$? | |
11840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11841 | (exit $ac_status); }; }; then | |
11842 | eval "gcc_cv_have_decl_$ac_func=yes" | |
11843 | else | |
11844 | echo "$as_me: failed program was:" >&5 | |
11845 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11846 | ||
11847 | eval "gcc_cv_have_decl_$ac_func=no" | |
11848 | fi | |
11849 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
11850 | fi | |
11851 | ||
11852 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
11853 | echo "$as_me:$LINENO: result: yes" >&5 | |
11854 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
11855 | #define $ac_tr_decl 1 | |
11856 | _ACEOF | |
11857 | ||
11858 | else | |
11859 | echo "$as_me:$LINENO: result: no" >&5 | |
11860 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
11861 | #define $ac_tr_decl 0 | |
11862 | _ACEOF | |
11863 | ||
11864 | fi | |
11865 | ||
11866 | done | |
11867 | ||
11868 | ||
c1800ec8 | 11869 | # More time-related stuff. |
ba479fd2 NN |
11870 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11871 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11872 | if test "${ac_cv_struct_tms+set}" = set; then | |
11873 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11874 | else | |
11875 | ||
11876 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11877 | /* confdefs.h. */ |
11878 | _ACEOF | |
11879 | cat confdefs.h >>conftest.$ac_ext | |
11880 | cat >>conftest.$ac_ext <<_ACEOF | |
11881 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11882 | |
11883 | #include "ansidecl.h" | |
11884 | #include "system.h" | |
11885 | #ifdef HAVE_SYS_TIMES_H | |
11886 | #include <sys/times.h> | |
11887 | #endif | |
11888 | ||
ba479fd2 NN |
11889 | int |
11890 | main () | |
11891 | { | |
c1800ec8 | 11892 | struct tms tms; |
ba479fd2 NN |
11893 | ; |
11894 | return 0; | |
11895 | } | |
11896 | _ACEOF | |
11897 | rm -f conftest.$ac_objext | |
11898 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11899 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11900 | ac_status=$? |
86da66b5 HPN |
11901 | grep -v '^ *+' conftest.er1 >conftest.err |
11902 | rm -f conftest.er1 | |
11903 | cat conftest.err >&5 | |
ba479fd2 NN |
11904 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11905 | (exit $ac_status); } && | |
ec6c7392 PB |
11906 | { ac_try='test -z "$ac_c_werror_flag" |
11907 | || test ! -s conftest.err' | |
86da66b5 HPN |
11908 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11909 | (eval $ac_try) 2>&5 | |
11910 | ac_status=$? | |
11911 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11912 | (exit $ac_status); }; } && | |
11913 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11914 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11915 | (eval $ac_try) 2>&5 | |
11916 | ac_status=$? | |
11917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11918 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11919 | ac_cv_struct_tms=yes |
11920 | else | |
ba479fd2 NN |
11921 | echo "$as_me: failed program was:" >&5 |
11922 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11923 | ||
11924 | ac_cv_struct_tms=no | |
c1800ec8 | 11925 | fi |
86da66b5 | 11926 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11927 | fi |
ba479fd2 NN |
11928 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11929 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11930 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11931 | |
11932 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11933 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11934 | _ACEOF |
c1800ec8 ZW |
11935 | |
11936 | fi | |
11937 | ||
11938 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11939 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11940 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11941 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11942 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11943 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11944 | else | |
11945 | ||
11946 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11947 | /* confdefs.h. */ |
11948 | _ACEOF | |
11949 | cat confdefs.h >>conftest.$ac_ext | |
11950 | cat >>conftest.$ac_ext <<_ACEOF | |
11951 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11952 | |
11953 | #include "ansidecl.h" | |
11954 | #include "system.h" | |
11955 | ||
ba479fd2 NN |
11956 | int |
11957 | main () | |
11958 | { | |
c1800ec8 | 11959 | clock_t x; |
ba479fd2 NN |
11960 | ; |
11961 | return 0; | |
11962 | } | |
11963 | _ACEOF | |
11964 | rm -f conftest.$ac_objext | |
11965 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11966 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11967 | ac_status=$? |
86da66b5 HPN |
11968 | grep -v '^ *+' conftest.er1 >conftest.err |
11969 | rm -f conftest.er1 | |
11970 | cat conftest.err >&5 | |
ba479fd2 NN |
11971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11972 | (exit $ac_status); } && | |
ec6c7392 PB |
11973 | { ac_try='test -z "$ac_c_werror_flag" |
11974 | || test ! -s conftest.err' | |
86da66b5 HPN |
11975 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11976 | (eval $ac_try) 2>&5 | |
11977 | ac_status=$? | |
11978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11979 | (exit $ac_status); }; } && | |
11980 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11982 | (eval $ac_try) 2>&5 | |
11983 | ac_status=$? | |
11984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11985 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11986 | gcc_cv_type_clock_t=yes |
11987 | else | |
ba479fd2 NN |
11988 | echo "$as_me: failed program was:" >&5 |
11989 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11990 | ||
11991 | gcc_cv_type_clock_t=no | |
c1800ec8 | 11992 | fi |
86da66b5 | 11993 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11994 | fi |
ba479fd2 NN |
11995 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
11996 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 11997 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
11998 | |
11999 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12000 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 12001 | _ACEOF |
c1800ec8 ZW |
12002 | |
12003 | fi | |
12004 | ||
eb70d86d AS |
12005 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
12006 | CFLAGS="$saved_CFLAGS" | |
12007 | ||
07cf4226 DM |
12008 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
12009 | if test "${enable_initfini_array+set}" = set; then | |
12010 | enableval="$enable_initfini_array" | |
ba479fd2 | 12011 | |
07cf4226 | 12012 | else |
ba479fd2 NN |
12013 | |
12014 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
12015 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
12016 | if test "${gcc_cv_initfini_array+set}" = set; then | |
12017 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12018 | else |
eb70d86d | 12019 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12020 | gcc_cv_initfini_array=no |
eb70d86d | 12021 | else |
ba479fd2 | 12022 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12023 | /* confdefs.h. */ |
12024 | _ACEOF | |
12025 | cat confdefs.h >>conftest.$ac_ext | |
12026 | cat >>conftest.$ac_ext <<_ACEOF | |
12027 | /* end confdefs.h. */ | |
eb70d86d | 12028 | |
07cf4226 DM |
12029 | static int x = -1; |
12030 | int main (void) { return x; } | |
12031 | int foo (void) { x = 0; } | |
12032 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12033 | _ACEOF |
12034 | rm -f conftest$ac_exeext | |
12035 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12036 | (eval $ac_link) 2>&5 | |
12037 | ac_status=$? | |
12038 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12039 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
12040 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12041 | (eval $ac_try) 2>&5 | |
12042 | ac_status=$? | |
12043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12044 | (exit $ac_status); }; }; then | |
918c4fe4 | 12045 | gcc_cv_initfini_array=yes |
eb70d86d | 12046 | else |
ba479fd2 NN |
12047 | echo "$as_me: program exited with status $ac_status" >&5 |
12048 | echo "$as_me: failed program was:" >&5 | |
12049 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12050 | ||
12051 | ( exit $ac_status ) | |
12052 | gcc_cv_initfini_array=no | |
eb70d86d | 12053 | fi |
86da66b5 | 12054 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12055 | fi |
07cf4226 | 12056 | fi |
ba479fd2 NN |
12057 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12058 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 12059 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12060 | |
ba479fd2 | 12061 | fi; |
63cf211a | 12062 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12063 | |
12064 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12065 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12066 | _ACEOF |
07cf4226 | 12067 | |
eb70d86d | 12068 | fi |
81bf3d9e | 12069 | |
ba479fd2 NN |
12070 | # mkdir takes a single argument on some systems. |
12071 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
12072 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
12073 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
12074 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12075 | else |
ba479fd2 | 12076 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12077 | /* confdefs.h. */ |
12078 | _ACEOF | |
12079 | cat confdefs.h >>conftest.$ac_ext | |
12080 | cat >>conftest.$ac_ext <<_ACEOF | |
12081 | /* end confdefs.h. */ | |
75923b2f MK |
12082 | |
12083 | #include <sys/types.h> | |
12084 | #ifdef HAVE_SYS_STAT_H | |
12085 | # include <sys/stat.h> | |
12086 | #endif | |
12087 | #ifdef HAVE_UNISTD_H | |
12088 | # include <unistd.h> | |
12089 | #endif | |
12090 | #ifdef HAVE_DIRECT_H | |
12091 | # include <direct.h> | |
12092 | #endif | |
ba479fd2 NN |
12093 | int |
12094 | main () | |
12095 | { | |
75923b2f | 12096 | mkdir ("foo", 0); |
ba479fd2 NN |
12097 | ; |
12098 | return 0; | |
12099 | } | |
12100 | _ACEOF | |
12101 | rm -f conftest.$ac_objext | |
12102 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 12103 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 12104 | ac_status=$? |
86da66b5 HPN |
12105 | grep -v '^ *+' conftest.er1 >conftest.err |
12106 | rm -f conftest.er1 | |
12107 | cat conftest.err >&5 | |
ba479fd2 NN |
12108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12109 | (exit $ac_status); } && | |
ec6c7392 PB |
12110 | { ac_try='test -z "$ac_c_werror_flag" |
12111 | || test ! -s conftest.err' | |
86da66b5 HPN |
12112 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12113 | (eval $ac_try) 2>&5 | |
12114 | ac_status=$? | |
12115 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12116 | (exit $ac_status); }; } && | |
12117 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
12118 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12119 | (eval $ac_try) 2>&5 | |
12120 | ac_status=$? | |
12121 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12122 | (exit $ac_status); }; }; then | |
75923b2f MK |
12123 | gcc_cv_mkdir_takes_one_arg=no |
12124 | else | |
ba479fd2 NN |
12125 | echo "$as_me: failed program was:" >&5 |
12126 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12127 | ||
12128 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 12129 | fi |
86da66b5 | 12130 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 12131 | fi |
ba479fd2 NN |
12132 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12133 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 12134 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12135 | |
12136 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12137 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12138 | _ACEOF |
75923b2f MK |
12139 | |
12140 | fi | |
12141 | ||
12142 | ||
861bb6c1 JL |
12143 | # File extensions |
12144 | manext='.1' | |
12145 | objext='.o' | |
12146 | ||
12147 | ||
12148 | ||
4977bab6 ZW |
12149 | # With Setjmp/Longjmp based exception handling. |
12150 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
12151 | if test "${enable_sjlj_exceptions+set}" = set; then | |
12152 | enableval="$enable_sjlj_exceptions" | |
12153 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 12154 | |
ba479fd2 NN |
12155 | cat >>confdefs.h <<_ACEOF |
12156 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12157 | _ACEOF | |
4977bab6 | 12158 | |
ba479fd2 | 12159 | fi; |
4977bab6 | 12160 | |
443728bb L |
12161 | # For platforms with the unwind ABI which includes an unwind library, |
12162 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12163 | |
443728bb L |
12164 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
12165 | if test "${with_system_libunwind+set}" = set; then | |
12166 | withval="$with_system_libunwind" | |
4977bab6 | 12167 | |
ba479fd2 | 12168 | fi; |
4977bab6 | 12169 | |
34a86c2b NN |
12170 | # -------------------------------------------------------- |
12171 | # Build, host, and target specific configuration fragments | |
12172 | # -------------------------------------------------------- | |
12173 | ||
5b28c537 NN |
12174 | # Collect build-machine-specific information. |
12175 | . ${srcdir}/config.build | |
12176 | ||
a89ea0df NN |
12177 | # Collect host-machine-specific information. |
12178 | . ${srcdir}/config.host | |
12179 | ||
ef69da62 | 12180 | target_gtfiles= |
a89ea0df NN |
12181 | |
12182 | # Collect target-machine-specific information. | |
8ad9fb33 | 12183 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12184 | |
12185 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12186 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12187 | |
12188 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12189 | if test x"$tm_file" = x |
861bb6c1 JL |
12190 | then tm_file=$cpu_type/$cpu_type.h; fi |
12191 | ||
6b2adea9 | 12192 | if test x"$extra_headers" = x |
861bb6c1 JL |
12193 | then extra_headers=; fi |
12194 | ||
75bffa71 | 12195 | if test x$md_file = x |
e98e406f | 12196 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12197 | |
75bffa71 | 12198 | if test x$out_file = x |
861bb6c1 JL |
12199 | then out_file=$cpu_type/$cpu_type.c; fi |
12200 | ||
75bffa71 | 12201 | if test x"$tmake_file" = x |
861bb6c1 JL |
12202 | then tmake_file=$cpu_type/t-$cpu_type |
12203 | fi | |
12204 | ||
90e6a802 | 12205 | if test x"$dwarf2" = xyes |
756ee602 | 12206 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12207 | fi |
12208 | ||
861bb6c1 | 12209 | # Say what files are being used for the output code and MD file. |
11642c3a | 12210 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12211 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12212 | ||
11642c3a | 12213 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12214 | # about them and drop them. |
12215 | ||
11642c3a ZW |
12216 | bx= |
12217 | for x in $build_xm_file; do | |
12218 | if test -f $srcdir/config/$x | |
12219 | then bx="$bx $x" | |
ba479fd2 NN |
12220 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12221 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12222 | fi |
12223 | done | |
12224 | build_xm_file="$bx" | |
12225 | ||
12226 | hx= | |
12227 | for x in $host_xm_file; do | |
12228 | if test -f $srcdir/config/$x | |
12229 | then hx="$hx $x" | |
ba479fd2 NN |
12230 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12231 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12232 | fi |
12233 | done | |
12234 | host_xm_file="$hx" | |
12235 | ||
12236 | tx= | |
12237 | for x in $xm_file; do | |
12238 | if test -f $srcdir/config/$x | |
12239 | then tx="$tx $x" | |
ba479fd2 NN |
12240 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12241 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12242 | fi |
12243 | done | |
12244 | xm_file="$tx" | |
12245 | ||
861bb6c1 JL |
12246 | count=a |
12247 | for f in $tm_file; do | |
12248 | count=${count}x | |
12249 | done | |
75bffa71 | 12250 | if test $count = ax; then |
861bb6c1 JL |
12251 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12252 | else | |
12253 | echo "Using the following target machine macro files:" | |
12254 | for f in $tm_file; do | |
12255 | echo " $srcdir/config/$f" | |
12256 | done | |
12257 | fi | |
12258 | ||
4977bab6 | 12259 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12260 | |
12261 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12262 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12263 | _ACEOF |
4977bab6 ZW |
12264 | |
12265 | fi | |
12266 | ||
99fa8911 AP |
12267 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12268 | ||
12269 | cat >>confdefs.h <<\_ACEOF | |
12270 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12271 | _ACEOF | |
12272 | ||
12273 | fi | |
12274 | ||
861bb6c1 JL |
12275 | count=a |
12276 | for f in $host_xm_file; do | |
12277 | count=${count}x | |
12278 | done | |
11642c3a ZW |
12279 | if test $count = a; then |
12280 | : | |
12281 | elif test $count = ax; then | |
861bb6c1 JL |
12282 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12283 | else | |
12284 | echo "Using the following host machine macro files:" | |
12285 | for f in $host_xm_file; do | |
12286 | echo " $srcdir/config/$f" | |
12287 | done | |
12288 | fi | |
476d9098 | 12289 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12290 | |
75bffa71 | 12291 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12292 | count=a |
12293 | for f in $build_xm_file; do | |
12294 | count=${count}x | |
12295 | done | |
11642c3a ZW |
12296 | if test $count = a; then |
12297 | : | |
12298 | elif test $count = ax; then | |
861bb6c1 JL |
12299 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12300 | else | |
12301 | echo "Using the following build machine macro files:" | |
12302 | for f in $build_xm_file; do | |
12303 | echo " $srcdir/config/$f" | |
12304 | done | |
12305 | fi | |
12306 | fi | |
12307 | ||
4f6d8cc8 GK |
12308 | case ${host} in |
12309 | powerpc-*-darwin*) | |
12310 | echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 | |
12311 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 | |
12312 | if test "${gcc_cv_mcontext_underscores+set}" = set; then | |
12313 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12314 | else | |
12315 | cat >conftest.$ac_ext <<_ACEOF | |
12316 | ||
de4fb767 | 12317 | #include <sys/signal.h> |
4f6d8cc8 GK |
12318 | #include <ucontext.h> |
12319 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12320 | ||
12321 | _ACEOF | |
12322 | rm -f conftest.$ac_objext | |
12323 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12324 | (eval $ac_compile) 2>conftest.er1 | |
12325 | ac_status=$? | |
12326 | grep -v '^ *+' conftest.er1 >conftest.err | |
12327 | rm -f conftest.er1 | |
12328 | cat conftest.err >&5 | |
12329 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12330 | (exit $ac_status); } && | |
ec6c7392 PB |
12331 | { ac_try='test -z "$ac_c_werror_flag" |
12332 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
12333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12334 | (eval $ac_try) 2>&5 | |
12335 | ac_status=$? | |
12336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12337 | (exit $ac_status); }; } && | |
12338 | { ac_try='test -s conftest.$ac_objext' | |
12339 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12340 | (eval $ac_try) 2>&5 | |
12341 | ac_status=$? | |
12342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12343 | (exit $ac_status); }; }; then | |
12344 | gcc_cv_mcontext_underscores=no | |
12345 | else | |
12346 | echo "$as_me: failed program was:" >&5 | |
12347 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12348 | ||
12349 | gcc_cv_mcontext_underscores=yes | |
12350 | fi | |
12351 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
12352 | fi | |
12353 | echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 | |
12354 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 | |
12355 | if test $gcc_cv_mcontext_underscores = yes; then | |
12356 | ||
12357 | cat >>confdefs.h <<\_ACEOF | |
12358 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12359 | _ACEOF | |
12360 | ||
12361 | fi | |
12362 | ;; | |
12363 | esac | |
12364 | ||
8bb915b6 NN |
12365 | # --------- |
12366 | # Threading | |
12367 | # --------- | |
12368 | ||
c2e494a8 | 12369 | # Check if a valid thread package |
615be2cf | 12370 | case ${enable_threads} in |
c2e494a8 NN |
12371 | "" | no) |
12372 | # No threads | |
12373 | target_thread_file='single' | |
12374 | ;; | |
12375 | yes) | |
12376 | # default | |
12377 | target_thread_file='single' | |
12378 | ;; | |
18167442 | 12379 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12380 | single | solaris | vxworks | win32 ) |
615be2cf | 12381 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12382 | ;; |
12383 | *) | |
615be2cf | 12384 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12385 | exit 1 |
12386 | ;; | |
12387 | esac | |
12388 | ||
12389 | if test x${thread_file} = x; then | |
12390 | # No thread file set by target-specific clauses in config.gcc, | |
12391 | # so use file chosen by default logic above | |
12392 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12393 | fi |
12394 | ||
8bb915b6 NN |
12395 | # Make gthr-default.h if we have a thread file. |
12396 | gthread_flags= | |
12397 | if test $thread_file != single; then | |
12398 | rm -f gthr-default.h | |
12399 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12400 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12401 | fi | |
12402 | ||
12403 | ||
12404 | # -------- | |
12405 | # UNSORTED | |
12406 | # -------- | |
12407 | ||
18fbf599 | 12408 | use_cxa_atexit=no |
2121a768 JT |
12409 | if test x$enable___cxa_atexit = xyes || \ |
12410 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12411 | if test x$host = x$target; then |
12412 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12413 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12414 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12415 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12416 | else | |
12417 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12418 | /* confdefs.h. */ |
12419 | _ACEOF | |
12420 | cat confdefs.h >>conftest.$ac_ext | |
12421 | cat >>conftest.$ac_ext <<_ACEOF | |
12422 | /* end confdefs.h. */ | |
86da66b5 HPN |
12423 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12424 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12425 | #define __cxa_atexit innocuous___cxa_atexit | |
12426 | ||
354b7da5 DH |
12427 | /* System header to define __stub macros and hopefully few prototypes, |
12428 | which can conflict with char __cxa_atexit (); below. | |
12429 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12430 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12431 | |
354b7da5 DH |
12432 | #ifdef __STDC__ |
12433 | # include <limits.h> | |
12434 | #else | |
12435 | # include <assert.h> | |
12436 | #endif | |
86da66b5 HPN |
12437 | |
12438 | #undef __cxa_atexit | |
12439 | ||
354b7da5 DH |
12440 | /* Override any gcc2 internal prototype to avoid an error. */ |
12441 | #ifdef __cplusplus | |
12442 | extern "C" | |
12443 | { | |
12444 | #endif | |
12445 | /* We use char because int might match the return type of a gcc2 | |
12446 | builtin and then its argument prototype would still apply. */ | |
12447 | char __cxa_atexit (); | |
12448 | /* The GNU C library defines this for functions which it implements | |
12449 | to always fail with ENOSYS. Some functions are actually named | |
12450 | something starting with __ and the normal name is an alias. */ | |
12451 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12452 | choke me | |
12453 | #else | |
12454 | char (*f) () = __cxa_atexit; | |
12455 | #endif | |
12456 | #ifdef __cplusplus | |
12457 | } | |
12458 | #endif | |
12459 | ||
12460 | int | |
12461 | main () | |
12462 | { | |
12463 | return f != __cxa_atexit; | |
12464 | ; | |
12465 | return 0; | |
12466 | } | |
12467 | _ACEOF | |
12468 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12469 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12470 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12471 | ac_status=$? |
86da66b5 HPN |
12472 | grep -v '^ *+' conftest.er1 >conftest.err |
12473 | rm -f conftest.er1 | |
12474 | cat conftest.err >&5 | |
354b7da5 DH |
12475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12476 | (exit $ac_status); } && | |
ec6c7392 PB |
12477 | { ac_try='test -z "$ac_c_werror_flag" |
12478 | || test ! -s conftest.err' | |
86da66b5 HPN |
12479 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12480 | (eval $ac_try) 2>&5 | |
12481 | ac_status=$? | |
12482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12483 | (exit $ac_status); }; } && | |
12484 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12485 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12486 | (eval $ac_try) 2>&5 | |
12487 | ac_status=$? | |
12488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12489 | (exit $ac_status); }; }; then | |
12490 | ac_cv_func___cxa_atexit=yes | |
12491 | else | |
12492 | echo "$as_me: failed program was:" >&5 | |
12493 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12494 | ||
12495 | ac_cv_func___cxa_atexit=no | |
12496 | fi | |
86da66b5 HPN |
12497 | rm -f conftest.err conftest.$ac_objext \ |
12498 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12499 | fi |
12500 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12501 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12502 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12503 | use_cxa_atexit=yes |
12504 | else | |
12505 | echo "__cxa_atexit can't be enabled on this target" | |
12506 | fi | |
12507 | ||
12508 | else | |
12509 | # We can't check for __cxa_atexit when building a cross, so assume | |
12510 | # it is available | |
12511 | use_cxa_atexit=yes | |
12512 | fi | |
12513 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12514 | |
12515 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 12516 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 12517 | _ACEOF |
2121a768 | 12518 | |
18fbf599 | 12519 | fi |
2121a768 JT |
12520 | fi |
12521 | ||
a5381466 | 12522 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12523 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12524 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12525 | |
12526 | ||
12527 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12528 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12529 | _ACEOF |
a5381466 ZW |
12530 | |
12531 | fi | |
12532 | ||
75685792 RS |
12533 | # Convert extra_options into a form suitable for Makefile use. |
12534 | extra_opt_files= | |
12535 | for f in $extra_options; do | |
12536 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12537 | done | |
12538 | ||
12539 | ||
b7cb92ad | 12540 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12541 | # the first file included by config.h. |
4977bab6 | 12542 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12543 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12544 | # work to find out the build config parameters. |
75bffa71 | 12545 | if test x$host = x$build |
db81d74a | 12546 | then |
eaf4e618 | 12547 | build_auto=auto-host.h |
b7cb92ad JL |
12548 | else |
12549 | # We create a subdir, then run autoconf in the subdir. | |
12550 | # To prevent recursion we set host and build for the new | |
12551 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12552 | # of configure. |
b7cb92ad JL |
12553 | tempdir=build.$$ |
12554 | rm -rf $tempdir | |
12555 | mkdir $tempdir | |
12556 | cd $tempdir | |
12557 | case ${srcdir} in | |
255b8a49 | 12558 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12559 | *) realsrcdir=../${srcdir};; |
12560 | esac | |
d920e825 L |
12561 | saved_CFLAGS="${CFLAGS}" |
12562 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12563 | ${realsrcdir}/configure \ | |
33e70558 | 12564 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12565 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12566 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12567 | |
12568 | # We just finished tests for the build machine, so rename | |
12569 | # the file auto-build.h in the gcc directory. | |
12570 | mv auto-host.h ../auto-build.h | |
12571 | cd .. | |
12572 | rm -rf $tempdir | |
eaf4e618 | 12573 | build_auto=auto-build.h |
db81d74a RH |
12574 | fi |
12575 | ||
06f0b04c | 12576 | |
eaf4e618 | 12577 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12578 | tm_p_file="${tm_p_file} tm-preds.h" |
12579 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12580 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12581 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12582 | # put this back in temporarily. |
232b67d9 | 12583 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12584 | |
34a86c2b NN |
12585 | # -------- |
12586 | # UNSORTED | |
12587 | # -------- | |
12588 | ||
cc1e60ea | 12589 | # Compile in configure arguments. |
8105825d | 12590 | if test -f configargs.h ; then |
cc1e60ea | 12591 | # Being re-configured. |
022dae81 | 12592 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12593 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12594 | else | |
12595 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12596 | fi | |
eeae7b41 DJ |
12597 | |
12598 | # Double all backslashes and backslash all quotes to turn | |
12599 | # gcc_config_arguments into a C string. | |
12600 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12601 | $gcc_config_arguments | |
12602 | EOF | |
12603 | gcc_config_arguments_str=`cat conftest.out` | |
12604 | rm -f conftest.out | |
12605 | ||
cc1e60ea JM |
12606 | cat > configargs.h <<EOF |
12607 | /* Generated automatically. */ | |
eeae7b41 | 12608 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12609 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12610 | |
12611 | static const struct { | |
12612 | const char *name, *value; | |
12613 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12614 | EOF |
12615 | ||
ab87f8c8 | 12616 | # Internationalization |
18fc9bd4 RG |
12617 | # If we haven't got the data from the intl directory, |
12618 | # assume NLS is disabled. | |
12619 | USE_NLS=no | |
12620 | LIBINTL= | |
12621 | LIBINTL_DEP= | |
12622 | INCINTL= | |
12623 | XGETTEXT= | |
12624 | GMSGFMT= | |
12625 | POSUB= | |
12626 | ||
12627 | if test -f ../intl/config.intl; then | |
12628 | . ../intl/config.intl | |
12629 | fi | |
12630 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 | |
12631 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
12632 | if test x"$USE_NLS" != xyes; then | |
12633 | echo "$as_me:$LINENO: result: no" >&5 | |
12634 | echo "${ECHO_T}no" >&6 | |
12635 | else | |
12636 | echo "$as_me:$LINENO: result: yes" >&5 | |
12637 | echo "${ECHO_T}yes" >&6 | |
12638 | ||
12639 | cat >>confdefs.h <<\_ACEOF | |
12640 | #define ENABLE_NLS 1 | |
12641 | _ACEOF | |
12642 | ||
12643 | ||
12644 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 | |
12645 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
12646 | # Look for .po and .gmo files in the source directory. | |
12647 | CATALOGS= | |
12648 | XLINGUAS= | |
12649 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12650 | # If there aren't any .gmo files the shell will give us the | |
12651 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12652 | # weeded out. | |
12653 | case "$cat" in *\**) | |
12654 | continue;; | |
12655 | esac | |
12656 | # The quadruple backslash is collapsed to a double backslash | |
12657 | # by the backticks, then collapsed again by the double quotes, | |
12658 | # leaving us with one backslash in the sed expression (right | |
12659 | # before the dot that mustn't act as a wildcard). | |
12660 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
12661 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
12662 | # The user is allowed to set LINGUAS to a list of languages to | |
12663 | # install catalogs for. If it's empty that means "all of them." | |
12664 | if test "x$LINGUAS" = x; then | |
12665 | CATALOGS="$CATALOGS $cat" | |
12666 | XLINGUAS="$XLINGUAS $lang" | |
12667 | else | |
12668 | case "$LINGUAS" in *$lang*) | |
12669 | CATALOGS="$CATALOGS $cat" | |
12670 | XLINGUAS="$XLINGUAS $lang" | |
12671 | ;; | |
12672 | esac | |
12673 | fi | |
12674 | done | |
12675 | LINGUAS="$XLINGUAS" | |
12676 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 | |
12677 | echo "${ECHO_T}$LINGUAS" >&6 | |
12678 | ||
12679 | ||
12680 | DATADIRNAME=share | |
12681 | ||
12682 | INSTOBJEXT=.mo | |
12683 | ||
12684 | GENCAT=gencat | |
12685 | ||
12686 | CATOBJEXT=.gmo | |
12687 | ||
12688 | fi | |
861bb6c1 | 12689 | |
56694dd9 ZW |
12690 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12691 | # -liconv on the link line twice. | |
12692 | case "$LIBINTL" in *$LIBICONV*) | |
12693 | LIBICONV= ;; | |
12694 | esac | |
dc6746e7 | 12695 | |
7f970b70 AM |
12696 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12697 | if test "${enable_secureplt+set}" = set; then | |
12698 | enableval="$enable_secureplt" | |
12699 | ||
12700 | fi; | |
12701 | ||
56694dd9 ZW |
12702 | # Windows32 Registry support for specifying GCC installation paths. |
12703 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12704 | if test "${enable_win32_registry+set}" = set; then | |
12705 | enableval="$enable_win32_registry" | |
dc6746e7 | 12706 | |
ba479fd2 | 12707 | fi; |
ba479fd2 | 12708 | |
a1286ef5 ZW |
12709 | case $host_os in |
12710 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12711 | if test "x$enable_win32_registry" != xno; then | |
12712 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12713 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12714 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12715 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12716 | else | |
12717 | ac_func_search_save_LIBS=$LIBS | |
12718 | ac_cv_search_RegOpenKeyExA=no | |
12719 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12720 | /* confdefs.h. */ |
12721 | _ACEOF | |
12722 | cat confdefs.h >>conftest.$ac_ext | |
12723 | cat >>conftest.$ac_ext <<_ACEOF | |
12724 | /* end confdefs.h. */ | |
861bb6c1 | 12725 | |
ab87f8c8 | 12726 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12727 | #ifdef __cplusplus |
12728 | extern "C" | |
12729 | #endif | |
ab87f8c8 | 12730 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12731 | builtin and then its argument prototype would still apply. */ |
12732 | char RegOpenKeyExA (); | |
12733 | int | |
12734 | main () | |
12735 | { | |
12736 | RegOpenKeyExA (); | |
12737 | ; | |
12738 | return 0; | |
12739 | } | |
12740 | _ACEOF | |
12741 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12742 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12743 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12744 | ac_status=$? |
86da66b5 HPN |
12745 | grep -v '^ *+' conftest.er1 >conftest.err |
12746 | rm -f conftest.er1 | |
12747 | cat conftest.err >&5 | |
ba479fd2 NN |
12748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12749 | (exit $ac_status); } && | |
ec6c7392 PB |
12750 | { ac_try='test -z "$ac_c_werror_flag" |
12751 | || test ! -s conftest.err' | |
86da66b5 HPN |
12752 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12753 | (eval $ac_try) 2>&5 | |
12754 | ac_status=$? | |
12755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12756 | (exit $ac_status); }; } && | |
12757 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12758 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12759 | (eval $ac_try) 2>&5 | |
12760 | ac_status=$? | |
12761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12762 | (exit $ac_status); }; }; then | |
56694dd9 | 12763 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12764 | else |
ba479fd2 NN |
12765 | echo "$as_me: failed program was:" >&5 |
12766 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12767 | ||
861bb6c1 | 12768 | fi |
86da66b5 HPN |
12769 | rm -f conftest.err conftest.$ac_objext \ |
12770 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12771 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12772 | for ac_lib in advapi32; do | |
12773 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12774 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12775 | /* confdefs.h. */ |
12776 | _ACEOF | |
12777 | cat confdefs.h >>conftest.$ac_ext | |
12778 | cat >>conftest.$ac_ext <<_ACEOF | |
12779 | /* end confdefs.h. */ | |
12780 | ||
56694dd9 | 12781 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12782 | #ifdef __cplusplus |
12783 | extern "C" | |
12784 | #endif | |
56694dd9 | 12785 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12786 | builtin and then its argument prototype would still apply. */ |
12787 | char RegOpenKeyExA (); | |
12788 | int | |
12789 | main () | |
12790 | { | |
12791 | RegOpenKeyExA (); | |
12792 | ; | |
12793 | return 0; | |
12794 | } | |
12795 | _ACEOF | |
12796 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12797 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12798 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12799 | ac_status=$? |
86da66b5 HPN |
12800 | grep -v '^ *+' conftest.er1 >conftest.err |
12801 | rm -f conftest.er1 | |
12802 | cat conftest.err >&5 | |
ba479fd2 NN |
12803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12804 | (exit $ac_status); } && | |
ec6c7392 PB |
12805 | { ac_try='test -z "$ac_c_werror_flag" |
12806 | || test ! -s conftest.err' | |
86da66b5 HPN |
12807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12808 | (eval $ac_try) 2>&5 | |
12809 | ac_status=$? | |
12810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12811 | (exit $ac_status); }; } && | |
12812 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12814 | (eval $ac_try) 2>&5 | |
12815 | ac_status=$? | |
12816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12817 | (exit $ac_status); }; }; then | |
12818 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12819 | break |
861bb6c1 | 12820 | else |
ba479fd2 NN |
12821 | echo "$as_me: failed program was:" >&5 |
12822 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12823 | ||
861bb6c1 | 12824 | fi |
86da66b5 HPN |
12825 | rm -f conftest.err conftest.$ac_objext \ |
12826 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12827 | done |
6e3f3080 | 12828 | fi |
ba479fd2 NN |
12829 | LIBS=$ac_func_search_save_LIBS |
12830 | fi | |
12831 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12832 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12833 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12834 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12835 | |
cafe096b | 12836 | else |
a1286ef5 | 12837 | enable_win32_registry=no |
093e61a6 | 12838 | fi |
ab87f8c8 | 12839 | |
a1286ef5 ZW |
12840 | fi |
12841 | ||
12842 | if test "x$enable_win32_registry" != xno; then | |
12843 | ||
12844 | cat >>confdefs.h <<\_ACEOF | |
12845 | #define ENABLE_WIN32_REGISTRY 1 | |
12846 | _ACEOF | |
ab87f8c8 | 12847 | |
a1286ef5 ZW |
12848 | |
12849 | if test "x$enable_win32_registry" != xyes \ | |
12850 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
12851 | |
12852 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 12853 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 12854 | _ACEOF |
cafe096b | 12855 | |
a1286ef5 ZW |
12856 | fi |
12857 | fi | |
12858 | ;; | |
56694dd9 | 12859 | esac |
ab87f8c8 | 12860 | |
56694dd9 ZW |
12861 | # Get an absolute path to the GCC top-level source directory |
12862 | holddir=`${PWDCMD-pwd}` | |
12863 | cd $srcdir | |
12864 | topdir=`${PWDCMD-pwd}` | |
12865 | cd $holddir | |
ab87f8c8 | 12866 | |
56694dd9 | 12867 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 12868 | xmake_file= |
c406e779 | 12869 | for f in ${host_xmake_file} |
56694dd9 ZW |
12870 | do |
12871 | if test -f ${srcdir}/config/$f | |
12872 | then | |
2ed26f6b | 12873 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
12874 | fi |
12875 | done | |
093e61a6 | 12876 | |
56694dd9 | 12877 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 12878 | tmake_file_= |
c406e779 | 12879 | for f in ${tmake_file} |
56694dd9 ZW |
12880 | do |
12881 | if test -f ${srcdir}/config/$f | |
12882 | then | |
2ed26f6b | 12883 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
12884 | fi |
12885 | done | |
2ed26f6b | 12886 | tmake_file="${tmake_file_}" |
71a94577 | 12887 | |
ab87f8c8 JL |
12888 | # If the host doesn't support symlinks, modify CC in |
12889 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
12890 | # Otherwise, we can use "CC=$(CC)". | |
12891 | rm -f symtest.tem | |
35f06ae4 PB |
12892 | case "$LN_S" in |
12893 | *-s*) | |
12894 | cc_set_by_configure="\$(CC)" | |
12895 | quoted_cc_set_by_configure="\$(CC)" | |
12896 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12897 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
12898 | ;; | |
12899 | *) | |
12900 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
12901 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
12902 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
12903 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
12904 | ;; | |
12905 | esac | |
ab87f8c8 | 12906 | |
5395b47b NN |
12907 | # This is a terrible hack which will go away some day. |
12908 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
12909 | |
12910 | ||
ab87f8c8 JL |
12911 | out_object_file=`basename $out_file .c`.o |
12912 | ||
75685792 RS |
12913 | tm_file_list="options.h" |
12914 | tm_include_list="options.h" | |
ab87f8c8 | 12915 | for f in $tm_file; do |
64ccbc99 | 12916 | case $f in |
d02af173 | 12917 | defaults.h ) |
e22340b0 ZW |
12918 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
12919 | tm_include_list="${tm_include_list} $f" | |
12920 | ;; | |
12921 | * ) | |
12922 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
12923 | tm_include_list="${tm_include_list} config/$f" | |
12924 | ;; | |
64ccbc99 | 12925 | esac |
ab87f8c8 JL |
12926 | done |
12927 | ||
11642c3a | 12928 | tm_p_file_list= |
e22340b0 | 12929 | tm_p_include_list= |
11642c3a | 12930 | for f in $tm_p_file; do |
4977bab6 ZW |
12931 | case $f in |
12932 | tm-preds.h ) | |
e22340b0 ZW |
12933 | tm_p_file_list="${tm_p_file_list} $f" |
12934 | tm_p_include_list="${tm_p_include_list} $f" | |
12935 | ;; | |
12936 | * ) | |
12937 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
12938 | tm_p_include_list="${tm_p_include_list} config/$f" | |
12939 | esac | |
12940 | done | |
12941 | ||
12942 | xm_file_list= | |
12943 | xm_include_list= | |
12944 | for f in $xm_file; do | |
12945 | case $f in | |
12946 | ansidecl.h ) | |
12947 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
12948 | xm_include_list="${xm_include_list} $f" | |
12949 | ;; | |
12950 | auto-host.h ) | |
12951 | xm_file_list="${xm_file_list} $f" | |
12952 | xm_include_list="${xm_include_list} $f" | |
12953 | ;; | |
12954 | * ) | |
12955 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
12956 | xm_include_list="${xm_include_list} config/$f" | |
12957 | ;; | |
4977bab6 | 12958 | esac |
11642c3a ZW |
12959 | done |
12960 | ||
ab87f8c8 | 12961 | host_xm_file_list= |
e22340b0 | 12962 | host_xm_include_list= |
ab87f8c8 | 12963 | for f in $host_xm_file; do |
64ccbc99 | 12964 | case $f in |
d02af173 | 12965 | ansidecl.h ) |
e22340b0 ZW |
12966 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
12967 | host_xm_include_list="${host_xm_include_list} $f" | |
12968 | ;; | |
e2500fed | 12969 | auto-host.h ) |
e22340b0 ZW |
12970 | host_xm_file_list="${host_xm_file_list} $f" |
12971 | host_xm_include_list="${host_xm_include_list} $f" | |
12972 | ;; | |
12973 | * ) | |
12974 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
12975 | host_xm_include_list="${host_xm_include_list} config/$f" | |
12976 | ;; | |
64ccbc99 | 12977 | esac |
ab87f8c8 JL |
12978 | done |
12979 | ||
12980 | build_xm_file_list= | |
12981 | for f in $build_xm_file; do | |
64ccbc99 | 12982 | case $f in |
d02af173 | 12983 | ansidecl.h ) |
e22340b0 ZW |
12984 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
12985 | build_xm_include_list="${build_xm_include_list} $f" | |
12986 | ;; | |
e2500fed | 12987 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
12988 | build_xm_file_list="${build_xm_file_list} $f" |
12989 | build_xm_include_list="${build_xm_include_list} $f" | |
12990 | ;; | |
12991 | * ) | |
12992 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
12993 | build_xm_include_list="${build_xm_include_list} config/$f" | |
12994 | ;; | |
64ccbc99 | 12995 | esac |
ab87f8c8 JL |
12996 | done |
12997 | ||
a078a589 ZW |
12998 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
12999 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
13000 | CROSS= |
13001 | ALL=all.internal | |
13002 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
13003 | |
13004 | if test "x$with_build_sysroot" != x; then | |
13005 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
13006 | else | |
13007 | # This value is used, even on a native system, because | |
13008 | # CROSS_SYSTEM_HEADER_DIR is just | |
13009 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13010 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13011 | fi | |
13012 | ||
ab87f8c8 JL |
13013 | if test x$host != x$target |
13014 | then | |
a078a589 ZW |
13015 | CROSS="-DCROSS_COMPILE" |
13016 | ALL=all.cross | |
160633c6 | 13017 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13018 | case "$host","$target" in |
3a7e8b87 GK |
13019 | # Darwin crosses can use the host system's libraries and headers, |
13020 | # because of the fat library support. Of course, it must be the | |
13021 | # same version of Darwin on both sides. Allow the user to | |
13022 | # just say --target=foo-darwin without a version number to mean | |
13023 | # "the version on this system". | |
13024 | *-*-darwin*,*-*-darwin*) | |
13025 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13026 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13027 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13028 | CROSS= | |
13029 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13030 | with_headers=yes | |
13031 | fi | |
13032 | ;; | |
13033 | ||
343f59d9 AM |
13034 | i?86-*-*,x86_64-*-* \ |
13035 | | powerpc*-*-*,powerpc64*-*-*) | |
13036 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13037 | esac | |
7a615b25 | 13038 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13039 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13040 | fi |
13041 | ||
b39d221a EC |
13042 | # If this is a cross-compiler that does not |
13043 | # have its own set of headers then define | |
13044 | # inhibit_libc | |
13045 | ||
dc06db20 R |
13046 | # If this is using newlib, without having the headers available now, |
13047 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13048 | # This prevents libgcc2 from containing any code which requires libc |
13049 | # support. | |
160633c6 | 13050 | inhibit_libc=false |
dc06db20 R |
13051 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13052 | test x$with_newlib = xyes ; } && | |
e50084fa | 13053 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13054 | inhibit_libc=true |
b39d221a EC |
13055 | fi |
13056 | ||
13057 | ||
a078a589 ZW |
13058 | # When building gcc with a cross-compiler, we need to adjust things so |
13059 | # that the generator programs are still built with the native compiler. | |
13060 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13061 | |
13062 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13063 | CC_FOR_BUILD='$(CC)' |
13064 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13065 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13066 | |
13067 | # Possibly disable fixproto, on a per-target basis. | |
13068 | case ${use_fixproto} in | |
13069 | no) | |
13070 | STMP_FIXPROTO= | |
13071 | ;; | |
13072 | yes) | |
13073 | STMP_FIXPROTO=stmp-fixproto | |
13074 | ;; | |
13075 | esac | |
13076 | ||
a078a589 | 13077 | |
83599948 NS |
13078 | # And these apply if build != host, or we are generating coverage data |
13079 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13080 | then |
b11e4747 | 13081 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13082 | |
7a615b25 | 13083 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13084 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13085 | STMP_FIXPROTO=stmp-install-fixproto |
13086 | fi | |
7a615b25 | 13087 | fi |
ab87f8c8 JL |
13088 | fi |
13089 | ||
13090 | # Expand extra_headers to include complete path. | |
13091 | # This substitutes for lots of t-* files. | |
13092 | extra_headers_list= | |
b1ef58c8 NN |
13093 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13094 | for file in ${extra_headers} ; do | |
13095 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13096 | done | |
ab87f8c8 | 13097 | |
c38f02df ILT |
13098 | # Define collect2 in Makefile. |
13099 | case $host_can_use_collect2 in | |
13100 | no) collect2= ;; | |
13101 | *) collect2='collect2$(exeext)' ;; | |
13102 | esac | |
13103 | ||
13104 | ||
ab87f8c8 | 13105 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13106 | case $use_collect2 in |
13107 | no) use_collect2= ;; | |
13108 | "") ;; | |
ba479fd2 | 13109 | *) |
34a86c2b NN |
13110 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13111 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13112 | case $host_can_use_collect2 in |
13113 | no) | |
13114 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13115 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13116 | { (exit 1); exit 1; }; } | |
13117 | ;; | |
13118 | esac | |
34a86c2b NN |
13119 | ;; |
13120 | esac | |
ab87f8c8 | 13121 | |
8bb915b6 NN |
13122 | # --------------------------- |
13123 | # Assembler & linker features | |
13124 | # --------------------------- | |
13125 | ||
d869a8c4 NN |
13126 | # Identify the assembler which will work hand-in-glove with the newly |
13127 | # built GCC, so that we can examine its features. This is the assembler | |
13128 | # which will be driven by the driver program. | |
13129 | # | |
13130 | # If build != host, and we aren't building gas in-tree, we identify a | |
13131 | # build->target assembler and hope that it will have the same features | |
13132 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13133 | gcc_cv_gas_major_version= |
13134 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13135 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13136 | |
13137 | if test "${gcc_cv_as+set}" = set; then | |
13138 | : | |
13139 | else | |
13140 | ||
ab87f8c8 JL |
13141 | if test -x "$DEFAULT_ASSEMBLER"; then |
13142 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13143 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13144 | && test -f ../gas/Makefile \ |
13145 | && test x$build = x$host; then | |
e8b05380 PB |
13146 | gcc_cv_as=../gas/as-new$build_exeext |
13147 | elif test -x as$build_exeext; then | |
13148 | # Build using assembler in the current directory. | |
13149 | gcc_cv_as=./as$build_exeext | |
13150 | elif test -x $AS_FOR_TARGET; then | |
13151 | gcc_cv_as="$AS_FOR_TARGET" | |
13152 | else | |
13153 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13154 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
13155 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13156 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13157 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13158 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13159 | else | |
13160 | case $gcc_cv_as in | |
13161 | [\\/]* | ?:[\\/]*) | |
13162 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13163 | ;; | |
13164 | *) | |
13165 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13166 | for as_dir in $PATH | |
13167 | do | |
13168 | IFS=$as_save_IFS | |
13169 | test -z "$as_dir" && as_dir=. | |
13170 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13171 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13172 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13173 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13174 | break 2 | |
13175 | fi | |
13176 | done | |
13177 | done | |
13178 | ||
13179 | ;; | |
13180 | esac | |
13181 | fi | |
13182 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
13183 | ||
13184 | if test -n "$gcc_cv_as"; then | |
13185 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13186 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13187 | else | |
13188 | echo "$as_me:$LINENO: result: no" >&5 | |
13189 | echo "${ECHO_T}no" >&6 | |
13190 | fi | |
13191 | ||
13192 | fi | |
13193 | fi | |
13194 | ||
13195 | ||
13196 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13197 | ||
13198 | ||
13199 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13200 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
13201 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then | |
08d105fa AO |
13202 | # Single tree build which includes gas. We want to prefer it |
13203 | # over whatever linker top-level may have detected, since | |
13204 | # we'll use what we're building after installation anyway. | |
e8b05380 PB |
13205 | echo "$as_me:$LINENO: result: newly built gas" >&5 |
13206 | echo "${ECHO_T}newly built gas" >&6 | |
ad9c4d9f NN |
13207 | in_tree_gas=yes |
13208 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13209 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13210 | $gcc_cv_as_gas_srcdir/configure \ | |
13211 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13212 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13213 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13214 | if test x$gcc_cv_gas_version != x; then |
13215 | break | |
13216 | fi | |
13217 | done | |
13218 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13219 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13220 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13221 | case $gcc_cv_gas_patch_version in |
13222 | "") gcc_cv_gas_patch_version="0" ;; | |
13223 | esac | |
8ada417f ZW |
13224 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13225 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13226 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13227 | |
5408ac6c HPN |
13228 | in_tree_gas_is_elf=no |
13229 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13230 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13231 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13232 | then | |
13233 | in_tree_gas_is_elf=yes | |
13234 | fi | |
e8b05380 PB |
13235 | else |
13236 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13237 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13238 | in_tree_gas=no | |
981d4858 | 13239 | fi |
9e423e6d | 13240 | |
e8b05380 PB |
13241 | # Identify the linker which will work hand-in-glove with the newly |
13242 | # built GCC, so that we can examine its features. This is the linker | |
13243 | # which will be driven by the driver program. | |
9f18db39 | 13244 | # |
e8b05380 PB |
13245 | # If build != host, and we aren't building gas in-tree, we identify a |
13246 | # build->target linker and hope that it will have the same features | |
13247 | # as the host->target linker we'll be using. | |
13248 | gcc_cv_gld_major_version= | |
13249 | gcc_cv_gld_minor_version= | |
13250 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13251 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13252 | |
e8b05380 PB |
13253 | if test "${gcc_cv_ld+set}" = set; then |
13254 | : | |
9f18db39 | 13255 | else |
9f18db39 | 13256 | |
e8b05380 PB |
13257 | if test -x "$DEFAULT_LINKER"; then |
13258 | gcc_cv_ld="$DEFAULT_LINKER" | |
13259 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13260 | && test -f ../ld/Makefile \ | |
13261 | && test x$build = x$host; then | |
13262 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13263 | elif test -x collect-ld$build_exeext; then | |
13264 | # Build using linker in the current directory. | |
13265 | gcc_cv_ld=./collect-ld$build_exeext | |
13266 | elif test -x $LD_FOR_TARGET; then | |
13267 | gcc_cv_ld="$LD_FOR_TARGET" | |
13268 | else | |
13269 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13270 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13271 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13272 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13273 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13274 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13275 | else | |
e8b05380 | 13276 | case $gcc_cv_ld in |
d739199a | 13277 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13278 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13279 | ;; |
13280 | *) | |
13281 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13282 | for as_dir in $PATH | |
13283 | do | |
13284 | IFS=$as_save_IFS | |
13285 | test -z "$as_dir" && as_dir=. | |
13286 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13287 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13288 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13289 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13290 | break 2 | |
13291 | fi | |
13292 | done | |
13293 | done | |
13294 | ||
13295 | ;; | |
13296 | esac | |
13297 | fi | |
e8b05380 | 13298 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
d739199a | 13299 | |
e8b05380 PB |
13300 | if test -n "$gcc_cv_ld"; then |
13301 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13302 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
d739199a DJ |
13303 | else |
13304 | echo "$as_me:$LINENO: result: no" >&5 | |
13305 | echo "${ECHO_T}no" >&6 | |
13306 | fi | |
13307 | ||
13308 | fi | |
e8b05380 PB |
13309 | fi |
13310 | ||
13311 | ||
13312 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13313 | ||
13314 | ||
13315 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13316 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
13317 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then | |
13318 | # Single tree build which includes ld. We want to prefer it | |
13319 | # over whatever linker top-level may have detected, since | |
13320 | # we'll use what we're building after installation anyway. | |
13321 | echo "$as_me:$LINENO: result: newly built ld" >&5 | |
13322 | echo "${ECHO_T}newly built ld" >&6 | |
13323 | in_tree_ld=yes | |
13324 | in_tree_ld_is_elf=no | |
13325 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13326 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13327 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13328 | in_tree_ld_is_elf=yes | |
13329 | fi | |
13330 | 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 | |
13331 | do | |
13332 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13333 | if test x$gcc_cv_gld_version != x; then | |
13334 | break | |
13335 | fi | |
13336 | done | |
13337 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13338 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13339 | else | |
13340 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13341 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13342 | in_tree_ld=no | |
13343 | fi | |
13344 | ||
13345 | # Figure out what nm we will be using. | |
13346 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13347 | if test "${gcc_cv_nm+set}" = set; then | |
13348 | : | |
13349 | else | |
13350 | ||
13351 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13352 | && test -f ../binutils/Makefile \ |
13353 | && test x$build = x$host; then | |
e8b05380 PB |
13354 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13355 | elif test -x nm$build_exeext; then | |
13356 | gcc_cv_nm=./nm$build_exeext | |
13357 | elif test -x $NM_FOR_TARGET; then | |
13358 | gcc_cv_nm="$NM_FOR_TARGET" | |
13359 | else | |
13360 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13361 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13362 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13363 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13364 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13365 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13366 | else | |
e8b05380 | 13367 | case $gcc_cv_nm in |
d739199a | 13368 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13369 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13370 | ;; |
13371 | *) | |
13372 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13373 | for as_dir in $PATH | |
13374 | do | |
13375 | IFS=$as_save_IFS | |
13376 | test -z "$as_dir" && as_dir=. | |
13377 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13378 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13379 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13380 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13381 | break 2 | |
13382 | fi | |
13383 | done | |
13384 | done | |
13385 | ||
13386 | ;; | |
13387 | esac | |
13388 | fi | |
e8b05380 | 13389 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
d739199a | 13390 | |
e8b05380 PB |
13391 | if test -n "$gcc_cv_nm"; then |
13392 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13393 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
d739199a DJ |
13394 | else |
13395 | echo "$as_me:$LINENO: result: no" >&5 | |
13396 | echo "${ECHO_T}no" >&6 | |
13397 | fi | |
13398 | ||
13399 | fi | |
e8b05380 | 13400 | fi |
d739199a | 13401 | |
e8b05380 PB |
13402 | |
13403 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13404 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
13405 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then | |
13406 | # Single tree build which includes binutils. | |
13407 | echo "$as_me:$LINENO: result: newly built nm" >&5 | |
13408 | echo "${ECHO_T}newly built nm" >&6 | |
13409 | in_tree_nm=yes | |
13410 | else | |
13411 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13412 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13413 | in_tree_nm=no | |
13414 | fi | |
13415 | ||
13416 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
13417 | ||
13418 | ||
13419 | # Figure out what objdump we will be using. | |
13420 | if test "${gcc_cv_objdump+set}" = set; then | |
13421 | : | |
13422 | else | |
13423 | ||
13424 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13425 | && test -f ../binutils/Makefile \ |
13426 | && test x$build = x$host; then | |
e8b05380 PB |
13427 | # Single tree build which includes binutils. |
13428 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
13429 | elif test -x objdump$build_exeext; then | |
13430 | gcc_cv_objdump=./objdump$build_exeext | |
13431 | elif test -x $OBJDUMP_FOR_TARGET; then | |
13432 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
13433 | else | |
13434 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13435 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
9f18db39 PB |
13436 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13437 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13438 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
13439 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13440 | else | |
e8b05380 | 13441 | case $gcc_cv_objdump in |
9f18db39 | 13442 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13443 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
13444 | ;; |
13445 | *) | |
13446 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 13447 | for as_dir in $PATH |
9f18db39 PB |
13448 | do |
13449 | IFS=$as_save_IFS | |
13450 | test -z "$as_dir" && as_dir=. | |
13451 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13452 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13453 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
13454 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13455 | break 2 | |
13456 | fi | |
13457 | done | |
13458 | done | |
779243f7 | 13459 | |
9f18db39 PB |
13460 | ;; |
13461 | esac | |
13462 | fi | |
e8b05380 | 13463 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
9f18db39 | 13464 | |
e8b05380 PB |
13465 | if test -n "$gcc_cv_objdump"; then |
13466 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13467 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
9f18db39 PB |
13468 | else |
13469 | echo "$as_me:$LINENO: result: no" >&5 | |
13470 | echo "${ECHO_T}no" >&6 | |
13471 | fi | |
13472 | ||
e8b05380 PB |
13473 | fi |
13474 | fi | |
9f18db39 | 13475 | |
e8b05380 PB |
13476 | |
13477 | echo "$as_me:$LINENO: checking what objdump to use" >&5 | |
13478 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
13479 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then | |
13480 | # Single tree build which includes binutils. | |
13481 | echo "$as_me:$LINENO: result: newly built objdump" >&5 | |
13482 | echo "${ECHO_T}newly built objdump" >&6 | |
13483 | elif test x$gcc_cv_objdump = x; then | |
13484 | echo "$as_me:$LINENO: result: not found" >&5 | |
13485 | echo "${ECHO_T}not found" >&6 | |
13486 | else | |
13487 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13488 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
a2eafc76 | 13489 | fi |
3cae5780 | 13490 | |
981d4858 | 13491 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13492 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13493 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13494 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13495 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13496 | else |
13497 | gcc_cv_as_balign_and_p2align=no | |
13498 | if test $in_tree_gas = yes; then | |
13499 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13500 | then gcc_cv_as_balign_and_p2align=yes | |
13501 | fi | |
13502 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13503 | echo '.balign 4 |
8ada417f | 13504 | .p2align 2' > conftest.s |
ba479fd2 NN |
13505 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13507 | (eval $ac_try) 2>&5 | |
13508 | ac_status=$? | |
13509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13510 | (exit $ac_status); }; } | |
8ada417f ZW |
13511 | then |
13512 | gcc_cv_as_balign_and_p2align=yes | |
13513 | else | |
13514 | echo "configure: failed program was" >&5 | |
13515 | cat conftest.s >&5 | |
13516 | fi | |
13517 | rm -f conftest.o conftest.s | |
13518 | fi | |
13519 | fi | |
ba479fd2 NN |
13520 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13521 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13522 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13523 | |
13524 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13525 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13526 | _ACEOF |
981d4858 | 13527 | |
ad9c4d9f NN |
13528 | fi |
13529 | ||
ba479fd2 NN |
13530 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13531 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13532 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13533 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13534 | else |
13535 | gcc_cv_as_max_skip_p2align=no | |
13536 | if test $in_tree_gas = yes; then | |
13537 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13538 | then gcc_cv_as_max_skip_p2align=yes | |
13539 | fi | |
13540 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13541 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13542 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13543 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13544 | (eval $ac_try) 2>&5 | |
13545 | ac_status=$? | |
13546 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13547 | (exit $ac_status); }; } | |
8ada417f ZW |
13548 | then |
13549 | gcc_cv_as_max_skip_p2align=yes | |
13550 | else | |
13551 | echo "configure: failed program was" >&5 | |
13552 | cat conftest.s >&5 | |
13553 | fi | |
13554 | rm -f conftest.o conftest.s | |
13555 | fi | |
ad9c4d9f | 13556 | fi |
ba479fd2 NN |
13557 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13558 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13559 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13560 | |
13561 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13562 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13563 | _ACEOF |
9e423e6d | 13564 | |
9e423e6d | 13565 | fi |
ad9c4d9f | 13566 | |
ba479fd2 NN |
13567 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13568 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13569 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13570 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13571 | else |
13572 | gcc_cv_as_subsection_m1=no | |
13573 | if test $in_tree_gas = yes; then | |
13574 | if test $in_tree_gas_is_elf = yes \ | |
13575 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13576 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13577 | fi |
8ada417f | 13578 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13579 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13580 | .subsection -1 |
13581 | conftest_label2: .word 0 | |
8ada417f | 13582 | .previous' > conftest.s |
ba479fd2 NN |
13583 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13584 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13585 | (eval $ac_try) 2>&5 | |
13586 | ac_status=$? | |
13587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13588 | (exit $ac_status); }; } | |
8ada417f ZW |
13589 | then |
13590 | if test x$gcc_cv_nm != x; then | |
13591 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13592 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13593 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13594 | then : | |
13595 | else gcc_cv_as_subsection_m1=yes | |
13596 | fi | |
13597 | rm -f conftest.nm1 conftest.nm2 | |
13598 | fi | |
13599 | else | |
13600 | echo "configure: failed program was" >&5 | |
13601 | cat conftest.s >&5 | |
13602 | fi | |
13603 | rm -f conftest.o conftest.s | |
13604 | fi | |
981d4858 | 13605 | fi |
ba479fd2 NN |
13606 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13607 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13608 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13609 | |
13610 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13611 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13612 | _ACEOF |
981d4858 | 13613 | |
d1accaa3 | 13614 | fi |
ad9c4d9f | 13615 | |
ba479fd2 NN |
13616 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13617 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13618 | if test "${gcc_cv_as_weak+set}" = set; then | |
13619 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13620 | else |
13621 | gcc_cv_as_weak=no | |
13622 | if test $in_tree_gas = yes; then | |
13623 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13624 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13625 | fi |
8ada417f | 13626 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13627 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13628 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13629 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13630 | (eval $ac_try) 2>&5 | |
13631 | ac_status=$? | |
13632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13633 | (exit $ac_status); }; } | |
8ada417f ZW |
13634 | then |
13635 | gcc_cv_as_weak=yes | |
13636 | else | |
13637 | echo "configure: failed program was" >&5 | |
13638 | cat conftest.s >&5 | |
13639 | fi | |
13640 | rm -f conftest.o conftest.s | |
13641 | fi | |
981d4858 | 13642 | fi |
ba479fd2 NN |
13643 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13644 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13645 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13646 | |
13647 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13648 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13649 | _ACEOF |
981d4858 | 13650 | |
12822146 | 13651 | fi |
ad9c4d9f | 13652 | |
a0203ca7 AO |
13653 | echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
13654 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 | |
13655 | if test "${gcc_cv_as_weakref+set}" = set; then | |
13656 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13657 | else | |
13658 | gcc_cv_as_weakref=no | |
13659 | if test $in_tree_gas = yes; then | |
13660 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
13661 | then gcc_cv_as_weakref=yes | |
13662 | fi | |
13663 | elif test x$gcc_cv_as != x; then | |
13664 | echo ' .weakref foobar, barfnot' > conftest.s | |
13665 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13666 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13667 | (eval $ac_try) 2>&5 | |
13668 | ac_status=$? | |
13669 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13670 | (exit $ac_status); }; } | |
13671 | then | |
13672 | gcc_cv_as_weakref=yes | |
13673 | else | |
13674 | echo "configure: failed program was" >&5 | |
13675 | cat conftest.s >&5 | |
13676 | fi | |
13677 | rm -f conftest.o conftest.s | |
13678 | fi | |
13679 | fi | |
13680 | echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 | |
13681 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6 | |
13682 | if test $gcc_cv_as_weakref = yes; then | |
13683 | ||
13684 | cat >>confdefs.h <<\_ACEOF | |
13685 | #define HAVE_GAS_WEAKREF 1 | |
13686 | _ACEOF | |
13687 | ||
13688 | fi | |
13689 | ||
e41f3691 JDA |
13690 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13691 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13692 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13693 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13694 | else | |
13695 | gcc_cv_as_nsubspa_comdat=no | |
13696 | if test $in_tree_gas = yes; then | |
13697 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13698 | then gcc_cv_as_nsubspa_comdat=yes | |
13699 | fi | |
13700 | elif test x$gcc_cv_as != x; then | |
13701 | echo ' .SPACE $TEXT$ | |
13702 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13703 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13705 | (eval $ac_try) 2>&5 | |
13706 | ac_status=$? | |
13707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13708 | (exit $ac_status); }; } | |
13709 | then | |
13710 | gcc_cv_as_nsubspa_comdat=yes | |
13711 | else | |
13712 | echo "configure: failed program was" >&5 | |
13713 | cat conftest.s >&5 | |
13714 | fi | |
13715 | rm -f conftest.o conftest.s | |
13716 | fi | |
13717 | fi | |
13718 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13719 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13720 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13721 | ||
13722 | cat >>confdefs.h <<\_ACEOF | |
13723 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13724 | _ACEOF | |
13725 | ||
13726 | fi | |
13727 | ||
8ada417f ZW |
13728 | # .hidden needs to be supported in both the assembler and the linker, |
13729 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13730 | # This is irritatingly difficult to feature test for; we have to check the | |
13731 | # date string after the version number. If we've got an in-tree | |
13732 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13733 | # to be safe. | |
13734 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13735 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13736 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13737 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13739 | else |
13740 | gcc_cv_as_hidden=no | |
13741 | if test $in_tree_gas = yes; then | |
13742 | if test $in_tree_gas_is_elf = yes \ | |
13743 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13744 | then gcc_cv_as_hidden=yes | |
13745 | fi | |
13746 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13747 | echo ' .hidden foobar |
8ada417f | 13748 | foobar:' > conftest.s |
ba479fd2 NN |
13749 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13750 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13751 | (eval $ac_try) 2>&5 | |
13752 | ac_status=$? | |
13753 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13754 | (exit $ac_status); }; } | |
8ada417f ZW |
13755 | then |
13756 | gcc_cv_as_hidden=yes | |
13757 | else | |
13758 | echo "configure: failed program was" >&5 | |
13759 | cat conftest.s >&5 | |
13760 | fi | |
13761 | rm -f conftest.o conftest.s | |
13762 | fi | |
13763 | fi | |
ba479fd2 NN |
13764 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13765 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13766 | |
ad9c4d9f | 13767 | |
ba479fd2 NN |
13768 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13769 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13770 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13771 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13772 | else |
13773 | if test $in_tree_ld = yes ; then | |
13774 | gcc_cv_ld_hidden=no | |
13775 | 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 \ | |
13776 | && test $in_tree_ld_is_elf = yes; then | |
13777 | gcc_cv_ld_hidden=yes | |
13778 | fi | |
13779 | else | |
13780 | gcc_cv_ld_hidden=yes | |
bace148a | 13781 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13782 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13783 | ld_vers=`echo $ld_ver | sed -n \ | |
13784 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13785 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13786 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13787 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13788 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13789 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13790 | -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 | 13791 | 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 |
13792 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13793 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13794 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13795 | if test 0"$ld_date" -lt 20020404; then |
13796 | if test -n "$ld_date"; then | |
13797 | # If there was date string, but was earlier than 2002-04-04, fail | |
13798 | gcc_cv_ld_hidden=no | |
13799 | elif test -z "$ld_vers"; then | |
13800 | # If there was no date string nor ld version number, something is wrong | |
13801 | gcc_cv_ld_hidden=no | |
13802 | else | |
8ada417f ZW |
13803 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13804 | if test "$ld_vers_major" -lt 2; then | |
13805 | gcc_cv_ld_hidden=no | |
13806 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13807 | gcc_cv_ld_hidden="no" | |
13808 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13809 | gcc_cv_ld_hidden=no | |
c72931a6 | 13810 | fi |
8ada417f | 13811 | fi |
789b7de5 | 13812 | fi |
8ada417f | 13813 | else |
28690784 | 13814 | case "${target}" in |
b0fd7d27 | 13815 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13816 | gcc_cv_ld_hidden=yes |
13817 | ;; | |
13818 | *) | |
13819 | gcc_cv_ld_hidden=no | |
13820 | ;; | |
13821 | esac | |
8ada417f ZW |
13822 | fi |
13823 | fi | |
6d07784a | 13824 | fi |
ba479fd2 NN |
13825 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13826 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13827 | libgcc_visibility=no |
ad9c4d9f | 13828 | |
232b67d9 | 13829 | |
8e3940b2 | 13830 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13831 | libgcc_visibility=yes |
ba479fd2 NN |
13832 | |
13833 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13834 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13835 | _ACEOF |
ad9c4d9f NN |
13836 | |
13837 | fi | |
13838 | ||
8ada417f | 13839 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
13840 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
13841 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
13842 | if test "${gcc_cv_as_leb128+set}" = set; then | |
13843 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13844 | else |
13845 | gcc_cv_as_leb128=no | |
13846 | if test $in_tree_gas = yes; then | |
13847 | if test $in_tree_gas_is_elf = yes \ | |
13848 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
13849 | then gcc_cv_as_leb128=yes | |
13850 | fi | |
13851 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13852 | echo ' .data |
b7460f24 RH |
13853 | .uleb128 L2 - L1 |
13854 | L1: | |
13855 | .uleb128 1280 | |
13856 | .sleb128 -1010 | |
8ada417f | 13857 | L2:' > conftest.s |
ba479fd2 NN |
13858 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13859 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13860 | (eval $ac_try) 2>&5 | |
13861 | ac_status=$? | |
13862 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13863 | (exit $ac_status); }; } | |
8ada417f ZW |
13864 | then |
13865 | # GAS versions before 2.11 do not support uleb128, | |
13866 | # despite appearing to. | |
13867 | # ??? There exists an elf-specific test that will crash | |
13868 | # the assembler. Perhaps it's better to figure out whether | |
13869 | # arbitrary sections are supported and try the test. | |
bace148a | 13870 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13871 | if echo "$as_ver" | grep GNU > /dev/null; then |
13872 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
13873 | as_major=`echo $as_ver | sed 's/\..*//'` | |
13874 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
13875 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
13876 | then : | |
13877 | else gcc_cv_as_leb128=yes | |
13878 | fi | |
13879 | fi | |
13880 | else | |
13881 | echo "configure: failed program was" >&5 | |
13882 | cat conftest.s >&5 | |
13883 | fi | |
13884 | rm -f conftest.o conftest.s | |
13885 | fi | |
b7460f24 | 13886 | fi |
ba479fd2 NN |
13887 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
13888 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 13889 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
13890 | |
13891 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 13892 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 13893 | _ACEOF |
b7460f24 RH |
13894 | |
13895 | fi | |
ad9c4d9f | 13896 | |
8ada417f ZW |
13897 | # GAS versions up to and including 2.11.0 may mis-optimize |
13898 | # .eh_frame data. | |
ba479fd2 NN |
13899 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
13900 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
13901 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
13902 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13903 | else |
13904 | gcc_cv_as_eh_frame=no | |
13905 | if test $in_tree_gas = yes; then | |
13906 | if test $in_tree_gas_is_elf = yes \ | |
13907 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
13908 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 13909 | fi |
8ada417f | 13910 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13911 | echo ' .text |
c64688ae RH |
13912 | .LFB1: |
13913 | .4byte 0 | |
13914 | .L1: | |
13915 | .4byte 0 | |
13916 | .LFE1: | |
13917 | .section .eh_frame,"aw",@progbits | |
13918 | __FRAME_BEGIN__: | |
13919 | .4byte .LECIE1-.LSCIE1 | |
13920 | .LSCIE1: | |
13921 | .4byte 0x0 | |
13922 | .byte 0x1 | |
13923 | .ascii "z\0" | |
13924 | .byte 0x1 | |
13925 | .byte 0x78 | |
13926 | .byte 0x1a | |
13927 | .byte 0x0 | |
13928 | .byte 0x4 | |
13929 | .4byte 1 | |
13930 | .p2align 1 | |
13931 | .LECIE1: | |
13932 | .LSFDE1: | |
13933 | .4byte .LEFDE1-.LASFDE1 | |
13934 | .LASFDE1: | |
13935 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
13936 | .4byte .LFB1 | |
13937 | .4byte .LFE1-.LFB1 | |
13938 | .byte 0x4 | |
13939 | .4byte .LFE1-.LFB1 | |
13940 | .byte 0x4 | |
13941 | .4byte .L1-.LFB1 | |
8ada417f | 13942 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
13943 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13945 | (eval $ac_try) 2>&5 | |
13946 | ac_status=$? | |
13947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13948 | (exit $ac_status); }; } | |
8ada417f ZW |
13949 | then |
13950 | cat > conftest.lit <<EOF | |
c64688ae RH |
13951 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
13952 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 13953 | 0020 08000000 04080000 0044 .........D |
01efb963 | 13954 | EOF |
ba479fd2 | 13955 | cat > conftest.big <<EOF |
01efb963 AS |
13956 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
13957 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 13958 | 0020 00000008 04000000 0844 .........D |
c64688ae | 13959 | EOF |
8ada417f ZW |
13960 | # If the assembler didn't choke, and we can objdump, |
13961 | # and we got the correct data, then succeed. | |
13962 | if test x$gcc_cv_objdump != x \ | |
13963 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
13964 | | tail -3 > conftest.got \ | |
13965 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ | |
13966 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
13967 | then | |
13968 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
13969 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
13970 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13971 | (eval $ac_try) 2>&5 | |
13972 | ac_status=$? | |
13973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13974 | (exit $ac_status); }; }; then | |
8ada417f ZW |
13975 | gcc_cv_as_eh_frame=buggy |
13976 | else | |
13977 | # Uh oh, what do we do now? | |
13978 | gcc_cv_as_eh_frame=no | |
13979 | fi | |
13980 | else | |
13981 | echo "configure: failed program was" >&5 | |
13982 | cat conftest.s >&5 | |
13983 | fi | |
13984 | rm -f conftest.o conftest.s | |
13985 | fi | |
c64688ae | 13986 | fi |
ba479fd2 NN |
13987 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
13988 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 13989 | |
6e3f3080 | 13990 | |
63cf211a | 13991 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
13992 | |
13993 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13994 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 13995 | _ACEOF |
ad9c4d9f NN |
13996 | |
13997 | fi | |
13998 | ||
ba479fd2 NN |
13999 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14000 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14001 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14002 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14003 | else |
14004 | gcc_cv_as_shf_merge=no | |
14005 | if test $in_tree_gas = yes; then | |
14006 | if test $in_tree_gas_is_elf = yes \ | |
14007 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14008 | then gcc_cv_as_shf_merge=yes | |
14009 | fi | |
14010 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14011 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14012 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14013 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14014 | (eval $ac_try) 2>&5 | |
14015 | ac_status=$? | |
14016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14017 | (exit $ac_status); }; } | |
8ada417f ZW |
14018 | then |
14019 | gcc_cv_as_shf_merge=yes | |
14020 | else | |
14021 | echo "configure: failed program was" >&5 | |
14022 | cat conftest.s >&5 | |
14023 | fi | |
14024 | rm -f conftest.o conftest.s | |
14025 | fi | |
201556f0 | 14026 | fi |
ba479fd2 NN |
14027 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14028 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 14029 | |
c18a5b6c MM |
14030 | if test $gcc_cv_as_shf_merge = no; then |
14031 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
14032 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14033 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14034 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14035 | else | |
14036 | gcc_cv_as_shf_merge=no | |
14037 | if test $in_tree_gas = yes; then | |
14038 | if test $in_tree_gas_is_elf = yes \ | |
14039 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14040 | then gcc_cv_as_shf_merge=yes | |
14041 | fi | |
14042 | elif test x$gcc_cv_as != x; then | |
14043 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14044 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14045 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14046 | (eval $ac_try) 2>&5 | |
14047 | ac_status=$? | |
14048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14049 | (exit $ac_status); }; } | |
14050 | then | |
14051 | gcc_cv_as_shf_merge=yes | |
14052 | else | |
14053 | echo "configure: failed program was" >&5 | |
14054 | cat conftest.s >&5 | |
14055 | fi | |
14056 | rm -f conftest.o conftest.s | |
14057 | fi | |
14058 | fi | |
14059 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
14060 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
14061 | ||
14062 | fi | |
8ad9fb33 | 14063 | |
ba479fd2 | 14064 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14065 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14066 | _ACEOF |
201556f0 | 14067 | |
201556f0 | 14068 | |
c18a5b6c MM |
14069 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14070 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14071 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
14072 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14073 | else | |
14074 | gcc_cv_as_comdat_group=no | |
14075 | if test $in_tree_gas = yes; then | |
14076 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14077 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14078 | then gcc_cv_as_comdat_group=yes |
14079 | fi | |
14080 | elif test x$gcc_cv_as != x; then | |
14081 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14082 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14083 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14084 | (eval $ac_try) 2>&5 | |
14085 | ac_status=$? | |
14086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14087 | (exit $ac_status); }; } | |
14088 | then | |
14089 | gcc_cv_as_comdat_group=yes | |
14090 | else | |
14091 | echo "configure: failed program was" >&5 | |
14092 | cat conftest.s >&5 | |
14093 | fi | |
14094 | rm -f conftest.o conftest.s | |
14095 | fi | |
14096 | fi | |
14097 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
14098 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
14099 | ||
14100 | if test $gcc_cv_as_comdat_group = yes; then | |
14101 | gcc_cv_as_comdat_group_percent=no | |
14102 | else | |
14103 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
14104 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14105 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
14106 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14107 | else | |
14108 | gcc_cv_as_comdat_group_percent=no | |
14109 | if test $in_tree_gas = yes; then | |
14110 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14111 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14112 | then gcc_cv_as_comdat_group_percent=yes |
14113 | fi | |
14114 | elif test x$gcc_cv_as != x; then | |
14115 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14116 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14117 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14118 | (eval $ac_try) 2>&5 | |
14119 | ac_status=$? | |
14120 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14121 | (exit $ac_status); }; } | |
14122 | then | |
14123 | gcc_cv_as_comdat_group_percent=yes | |
14124 | else | |
14125 | echo "configure: failed program was" >&5 | |
14126 | cat conftest.s >&5 | |
14127 | fi | |
14128 | rm -f conftest.o conftest.s | |
14129 | fi | |
14130 | fi | |
14131 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
14132 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
14133 | ||
14134 | fi | |
11176d2a JB |
14135 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14136 | comdat_group=yes | |
14137 | if test 0"$ld_date" -lt 20050308; then | |
14138 | if test -n "$ld_date"; then | |
14139 | # If there was date string, but was earlier than 2005-03-08, fail | |
14140 | comdat_group=no | |
14141 | elif test "$ld_vers_major" -lt 2; then | |
14142 | comdat_group=no | |
14143 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14144 | comdat_group=no | |
14145 | fi | |
14146 | fi | |
1cf0118d RO |
14147 | else |
14148 | # assume linkers other than GNU ld don't support COMDAT group | |
14149 | comdat_group=no | |
14150 | fi | |
14151 | if test $comdat_group = no; then | |
14152 | gcc_cv_as_comdat_group=no | |
14153 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14154 | fi |
c18a5b6c MM |
14155 | |
14156 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14157 | #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 |
14158 | _ACEOF |
14159 | ||
14160 | ||
8ada417f | 14161 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14162 | conftest_s= |
14163 | tls_first_major= | |
14164 | tls_first_minor= | |
9739c90c | 14165 | tls_as_opt= |
f996902d | 14166 | case "$target" in |
6f9b006d RH |
14167 | alpha*-*-*) |
14168 | conftest_s=' | |
14169 | .section ".tdata","awT",@progbits | |
14170 | foo: .long 25 | |
14171 | .text | |
14172 | ldq $27,__tls_get_addr($29) !literal!1 | |
14173 | lda $16,foo($29) !tlsgd!1 | |
14174 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14175 | ldq $27,__tls_get_addr($29) !literal!2 | |
14176 | lda $16,foo($29) !tlsldm!2 | |
14177 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14178 | ldq $1,foo($29) !gotdtprel | |
14179 | ldah $2,foo($29) !dtprelhi | |
14180 | lda $3,foo($2) !dtprello | |
14181 | lda $4,foo($29) !dtprel | |
14182 | ldq $1,foo($29) !gottprel | |
14183 | ldah $2,foo($29) !tprelhi | |
14184 | lda $3,foo($2) !tprello | |
14185 | lda $4,foo($29) !tprel' | |
14186 | tls_first_major=2 | |
14187 | tls_first_minor=13 | |
2f3321ca | 14188 | tls_as_opt=--fatal-warnings |
6f9b006d | 14189 | ;; |
e4dd71de AH |
14190 | frv*-*-*) |
14191 | conftest_s=' | |
14192 | .section ".tdata","awT",@progbits | |
14193 | x: .long 25 | |
14194 | .text | |
14195 | call #gettlsoff(x)' | |
14196 | tls_first_major=2 | |
14197 | tls_first_minor=14 | |
14198 | ;; | |
51076f96 RC |
14199 | hppa*-*-linux*) |
14200 | conftest_s=' | |
14201 | t1: .reg %r20 | |
14202 | t2: .reg %r21 | |
14203 | gp: .reg %r19 | |
14204 | .section ".tdata","awT",@progbits | |
14205 | foo: .long 25 | |
14206 | .text | |
14207 | .align 4 | |
14208 | addil LT%foo-$tls_gdidx$,gp | |
14209 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14210 | b __tls_get_addr | |
14211 | nop | |
14212 | addil LT%foo-$tls_ldidx$,gp | |
14213 | b __tls_get_addr | |
14214 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14215 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14216 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14217 | mfctl %cr27,%t1 | |
14218 | addil LT%foo-$tls_ieoff$,gp | |
14219 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14220 | add %t1,%t2,%t3 | |
14221 | mfctl %cr27,%t1 | |
14222 | addil LR%foo-$tls_leoff$,%t1 | |
14223 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14224 | tls_first_major=2 | |
14225 | tls_first_minor=15 | |
14226 | tls_as_opt=--fatal-warnings | |
14227 | ;; | |
d3585b76 DJ |
14228 | arm*-*-*) |
14229 | conftest_s=' | |
14230 | .section ".tdata","awT",%progbits | |
14231 | foo: .long 25 | |
14232 | .text | |
14233 | .word foo(gottpoff) | |
14234 | .word foo(tpoff) | |
14235 | .word foo(tlsgd) | |
14236 | .word foo(tlsldm) | |
14237 | .word foo(tlsldo)' | |
14238 | tls_first_major=2 | |
14239 | tls_first_minor=17 | |
14240 | ;; | |
f996902d RH |
14241 | i[34567]86-*-*) |
14242 | conftest_s=' | |
14243 | .section ".tdata","awT",@progbits | |
14244 | foo: .long 25 | |
14245 | .text | |
14246 | movl %gs:0, %eax | |
14247 | leal foo@TLSGD(,%ebx,1), %eax | |
14248 | leal foo@TLSLDM(%ebx), %eax | |
14249 | leal foo@DTPOFF(%eax), %edx | |
14250 | movl foo@GOTTPOFF(%ebx), %eax | |
14251 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14252 | addl foo@GOTNTPOFF(%ebx), %eax |
14253 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14254 | movl $foo@TPOFF, %eax |
14255 | subl $foo@TPOFF, %eax | |
14256 | leal foo@NTPOFF(%ecx), %eax' | |
14257 | tls_first_major=2 | |
75d38379 | 14258 | tls_first_minor=14 |
2f3321ca | 14259 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14260 | ;; |
14261 | x86_64-*-*) | |
14262 | conftest_s=' | |
14263 | .section ".tdata","awT",@progbits | |
14264 | foo: .long 25 | |
14265 | .text | |
14266 | movq %fs:0, %rax | |
14267 | leaq foo@TLSGD(%rip), %rdi | |
14268 | leaq foo@TLSLD(%rip), %rdi | |
14269 | leaq foo@DTPOFF(%rax), %rdx | |
14270 | movq foo@GOTTPOFF(%rip), %rax | |
14271 | movq $foo@TPOFF, %rax' | |
14272 | tls_first_major=2 | |
14273 | tls_first_minor=14 | |
2f3321ca | 14274 | tls_as_opt=--fatal-warnings |
f996902d | 14275 | ;; |
7b6e506e RH |
14276 | ia64-*-*) |
14277 | conftest_s=' | |
14278 | .section ".tdata","awT",@progbits | |
14279 | foo: data8 25 | |
14280 | .text | |
14281 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14282 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14283 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14284 | addl r19 = @dtprel(foo#), gp | |
14285 | adds r21 = @dtprel(foo#), r13 | |
14286 | movl r23 = @dtprel(foo#) | |
14287 | addl r20 = @tprel(foo#), gp | |
14288 | adds r22 = @tprel(foo#), r13 | |
14289 | movl r24 = @tprel(foo#)' | |
14290 | tls_first_major=2 | |
14291 | tls_first_minor=13 | |
2f3321ca | 14292 | tls_as_opt=--fatal-warnings |
7b6e506e | 14293 | ;; |
69229b81 DJ |
14294 | mips*-*-*) |
14295 | conftest_s=' | |
14296 | .section .tdata,"awT",@progbits | |
14297 | x: | |
14298 | .word 2 | |
14299 | .text | |
14300 | addiu $4, $28, %tlsgd(x) | |
14301 | addiu $4, $28, %tlsldm(x) | |
14302 | lui $4, %dtprel_hi(x) | |
14303 | addiu $4, $4, %dtprel_lo(x) | |
14304 | lw $4, %gottprel(x)($28) | |
14305 | lui $4, %tprel_hi(x) | |
14306 | addiu $4, $4, %tprel_lo(x)' | |
14307 | tls_first_major=2 | |
14308 | tls_first_minor=16 | |
14309 | tls_as_opt='-32 --fatal-warnings' | |
14310 | ;; | |
c4501e62 JJ |
14311 | powerpc-*-*) |
14312 | conftest_s=' | |
14313 | .section ".tdata","awT",@progbits | |
14314 | .align 2 | |
14315 | ld0: .space 4 | |
14316 | ld1: .space 4 | |
14317 | x1: .space 4 | |
14318 | x2: .space 4 | |
14319 | x3: .space 4 | |
14320 | .text | |
14321 | addi 3,31,ld0@got@tlsgd | |
14322 | bl __tls_get_addr | |
14323 | addi 3,31,x1@got@tlsld | |
14324 | bl __tls_get_addr | |
14325 | addi 9,3,x1@dtprel | |
14326 | addis 9,3,x2@dtprel@ha | |
14327 | addi 9,9,x2@dtprel@l | |
14328 | lwz 9,x3@got@tprel(31) | |
14329 | add 9,9,x@tls | |
14330 | addi 9,2,x1@tprel | |
14331 | addis 9,2,x2@tprel@ha | |
14332 | addi 9,9,x2@tprel@l' | |
14333 | tls_first_major=2 | |
14334 | tls_first_minor=14 | |
2f3321ca | 14335 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14336 | ;; |
14337 | powerpc64-*-*) | |
14338 | conftest_s=' | |
14339 | .section ".tdata","awT",@progbits | |
14340 | .align 3 | |
14341 | ld0: .space 8 | |
14342 | ld1: .space 8 | |
14343 | x1: .space 8 | |
14344 | x2: .space 8 | |
14345 | x3: .space 8 | |
14346 | .text | |
14347 | addi 3,2,ld0@got@tlsgd | |
14348 | bl .__tls_get_addr | |
14349 | nop | |
14350 | addi 3,2,ld1@toc | |
14351 | bl .__tls_get_addr | |
14352 | nop | |
14353 | addi 3,2,x1@got@tlsld | |
14354 | bl .__tls_get_addr | |
14355 | nop | |
14356 | addi 9,3,x1@dtprel | |
14357 | bl .__tls_get_addr | |
14358 | nop | |
14359 | addis 9,3,x2@dtprel@ha | |
14360 | addi 9,9,x2@dtprel@l | |
14361 | bl .__tls_get_addr | |
14362 | nop | |
14363 | ld 9,x3@got@dtprel(2) | |
14364 | add 9,9,3 | |
14365 | bl .__tls_get_addr | |
14366 | nop' | |
14367 | tls_first_major=2 | |
14368 | tls_first_minor=14 | |
2f3321ca | 14369 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14370 | ;; |
fd3cd001 UW |
14371 | s390-*-*) |
14372 | conftest_s=' | |
14373 | .section ".tdata","awT",@progbits | |
14374 | foo: .long 25 | |
14375 | .text | |
14376 | .long foo@TLSGD | |
14377 | .long foo@TLSLDM | |
14378 | .long foo@DTPOFF | |
14379 | .long foo@NTPOFF | |
14380 | .long foo@GOTNTPOFF | |
14381 | .long foo@INDNTPOFF | |
14382 | l %r1,foo@GOTNTPOFF(%r12) | |
14383 | l %r1,0(%r1):tls_load:foo | |
14384 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14385 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14386 | tls_first_major=2 | |
14387 | tls_first_minor=14 | |
2f3321ca | 14388 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14389 | ;; |
14390 | s390x-*-*) | |
14391 | conftest_s=' | |
14392 | .section ".tdata","awT",@progbits | |
14393 | foo: .long 25 | |
14394 | .text | |
14395 | .quad foo@TLSGD | |
14396 | .quad foo@TLSLDM | |
14397 | .quad foo@DTPOFF | |
14398 | .quad foo@NTPOFF | |
14399 | .quad foo@GOTNTPOFF | |
14400 | lg %r1,foo@GOTNTPOFF(%r12) | |
14401 | larl %r1,foo@INDNTPOFF | |
14402 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14403 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14404 | tls_first_major=2 | |
14405 | tls_first_minor=14 | |
2f3321ca | 14406 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14407 | ;; |
9ff13962 KK |
14408 | sh-*-* | sh[34]-*-*) |
14409 | conftest_s=' | |
14410 | .section ".tdata","awT",@progbits | |
14411 | foo: .long 25 | |
14412 | .text | |
14413 | .long foo@TLSGD | |
14414 | .long foo@TLSLDM | |
14415 | .long foo@DTPOFF | |
14416 | .long foo@GOTTPOFF | |
14417 | .long foo@TPOFF' | |
14418 | tls_first_major=2 | |
14419 | tls_first_minor=13 | |
2f3321ca | 14420 | tls_as_opt=--fatal-warnings |
9ff13962 | 14421 | ;; |
5751a10b | 14422 | sparc*-*-*) |
2f3321ca | 14423 | case "$target" in |
7935dc1b EB |
14424 | sparc*-sun-solaris2.[56789]*) |
14425 | # TLS was introduced in the Solaris 9 4/04 release but | |
14426 | # we do not enable it by default on Solaris 9 either. | |
14427 | if test "x$enable_tls" = xyes ; then | |
14428 | on_solaris=yes | |
14429 | else | |
14430 | enable_tls=no; | |
14431 | fi | |
14432 | ;; | |
2f3321ca EB |
14433 | sparc*-sun-solaris2.*) |
14434 | on_solaris=yes | |
14435 | ;; | |
14436 | *) | |
14437 | on_solaris=no | |
14438 | ;; | |
14439 | esac | |
14440 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14441 | conftest_s=' | |
14442 | .section ".tdata",#alloc,#write,#tls | |
14443 | foo: .long 25 | |
14444 | .text | |
14445 | sethi %tgd_hi22(foo), %o0 | |
14446 | add %o0, %tgd_lo10(foo), %o1 | |
14447 | add %l7, %o1, %o0, %tgd_add(foo) | |
14448 | call __tls_get_addr, %tgd_call(foo) | |
14449 | sethi %tldm_hi22(foo), %l1 | |
14450 | add %l1, %tldm_lo10(foo), %l2 | |
14451 | add %l7, %l2, %o0, %tldm_add(foo) | |
14452 | call __tls_get_addr, %tldm_call(foo) | |
14453 | sethi %tldo_hix22(foo), %l3 | |
14454 | xor %l3, %tldo_lox10(foo), %l4 | |
14455 | add %o0, %l4, %l5, %tldo_add(foo) | |
14456 | sethi %tie_hi22(foo), %o3 | |
14457 | add %o3, %tie_lo10(foo), %o3 | |
14458 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14459 | add %g7, %o2, %o4, %tie_add(foo) | |
14460 | sethi %tle_hix22(foo), %l1 | |
14461 | xor %l1, %tle_lox10(foo), %o5 | |
14462 | ld [%g7 + %o5], %o1' | |
14463 | tls_first_major=0 | |
14464 | tls_first_minor=0 | |
14465 | else | |
14466 | conftest_s=' | |
5751a10b JJ |
14467 | .section ".tdata","awT",@progbits |
14468 | foo: .long 25 | |
14469 | .text | |
14470 | sethi %tgd_hi22(foo), %o0 | |
14471 | add %o0, %tgd_lo10(foo), %o1 | |
14472 | add %l7, %o1, %o0, %tgd_add(foo) | |
14473 | call __tls_get_addr, %tgd_call(foo) | |
14474 | sethi %tldm_hi22(foo), %l1 | |
14475 | add %l1, %tldm_lo10(foo), %l2 | |
14476 | add %l7, %l2, %o0, %tldm_add(foo) | |
14477 | call __tls_get_addr, %tldm_call(foo) | |
14478 | sethi %tldo_hix22(foo), %l3 | |
14479 | xor %l3, %tldo_lox10(foo), %l4 | |
14480 | add %o0, %l4, %l5, %tldo_add(foo) | |
14481 | sethi %tie_hi22(foo), %o3 | |
14482 | add %o3, %tie_lo10(foo), %o3 | |
14483 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14484 | add %g7, %o2, %o4, %tie_add(foo) | |
14485 | sethi %tle_hix22(foo), %l1 | |
14486 | xor %l1, %tle_lox10(foo), %o5 | |
14487 | ld [%g7 + %o5], %o1' | |
14488 | tls_first_major=2 | |
14489 | tls_first_minor=14 | |
2f3321ca EB |
14490 | tls_as_opt="-32 --fatal-warnings" |
14491 | fi | |
5751a10b | 14492 | ;; |
f996902d | 14493 | esac |
8dea1cca DD |
14494 | set_have_as_tls=no |
14495 | if test "x$enable_tls" = xno ; then | |
14496 | : # TLS explicitly disabled. | |
14497 | elif test "x$enable_tls" = xyes ; then | |
14498 | set_have_as_tls=yes # TLS explicitly enabled. | |
14499 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
14500 | : # If we don't have a check, assume no support. |
14501 | else | |
ba479fd2 NN |
14502 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14503 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14504 | if test "${gcc_cv_as_tls+set}" = set; then | |
14505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14506 | else |
14507 | gcc_cv_as_tls=no | |
14508 | if test $in_tree_gas = yes; then | |
14509 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14510 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14511 | fi |
8ada417f | 14512 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14513 | echo "$conftest_s" > conftest.s |
2f3321ca | 14514 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14515 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14516 | (eval $ac_try) 2>&5 | |
14517 | ac_status=$? | |
14518 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14519 | (exit $ac_status); }; } | |
8ada417f ZW |
14520 | then |
14521 | gcc_cv_as_tls=yes | |
14522 | else | |
14523 | echo "configure: failed program was" >&5 | |
14524 | cat conftest.s >&5 | |
14525 | fi | |
14526 | rm -f conftest.o conftest.s | |
f996902d | 14527 | fi |
f996902d | 14528 | fi |
ba479fd2 NN |
14529 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14530 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14531 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
14532 | set_have_as_tls=yes |
14533 | fi | |
14534 | fi | |
14535 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
14536 | |
14537 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14538 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14539 | _ACEOF |
f996902d | 14540 | |
8ada417f ZW |
14541 | fi |
14542 | ||
14543 | # Target-specific assembler checks. | |
f996902d | 14544 | |
7e9d8517 L |
14545 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14546 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14547 | gcc_cv_ld_static_dynamic=no | |
14548 | if test $in_tree_ld = yes ; then | |
14549 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14550 | gcc_cv_ld_static_dynamic=yes | |
14551 | fi | |
14552 | elif test x$gcc_cv_ld != x; then | |
14553 | # Check if linker supports -Bstatic/-Bdynamic option | |
14554 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14555 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14556 | gcc_cv_ld_static_dynamic=yes | |
14557 | fi | |
14558 | fi | |
14559 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14560 | ||
14561 | cat >>confdefs.h <<\_ACEOF | |
14562 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14563 | _ACEOF | |
14564 | ||
14565 | fi | |
14566 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14567 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14568 | ||
d594623a L |
14569 | if test x"$demangler_in_ld" = xyes; then |
14570 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14571 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14572 | gcc_cv_ld_demangle=no | |
14573 | if test $in_tree_ld = yes; then | |
14574 | 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 \ | |
14575 | gcc_cv_ld_demangle=yes | |
14576 | fi | |
14577 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14578 | # Check if the GNU linker supports --demangle option | |
14579 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14580 | gcc_cv_ld_demangle=yes | |
14581 | fi | |
14582 | fi | |
14583 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14584 | ||
14585 | cat >>confdefs.h <<\_ACEOF | |
14586 | #define HAVE_LD_DEMANGLE 1 | |
14587 | _ACEOF | |
14588 | ||
14589 | fi | |
14590 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14591 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14592 | fi | |
14593 | ||
3a37b08e RH |
14594 | case "$target" in |
14595 | # All TARGET_ABI_OSF targets. | |
14596 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14597 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14598 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14599 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14600 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14601 | else |
8ada417f ZW |
14602 | gcc_cv_as_alpha_explicit_relocs=no |
14603 | if test $in_tree_gas = yes; then | |
14604 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14605 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14606 | fi |
8ada417f | 14607 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14608 | echo ' .set nomacro |
3a37b08e RH |
14609 | .text |
14610 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14611 | ldq $2, a($29) !literal!1 | |
14612 | ldq $4, b($29) !literal!2 | |
14613 | ldq_u $3, 0($2) !lituse_base!1 | |
14614 | ldq $27, f($29) !literal!5 | |
14615 | jsr $26, ($27), f !lituse_jsr!5 | |
14616 | ldah $29, 0($26) !gpdisp!3 | |
14617 | lda $0, c($29) !gprel | |
14618 | ldah $1, d($29) !gprelhigh | |
14619 | lda $1, d($1) !gprellow | |
8ada417f | 14620 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14621 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14622 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14623 | (eval $ac_try) 2>&5 | |
14624 | ac_status=$? | |
14625 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14626 | (exit $ac_status); }; } | |
8ada417f ZW |
14627 | then |
14628 | gcc_cv_as_alpha_explicit_relocs=yes | |
14629 | else | |
14630 | echo "configure: failed program was" >&5 | |
14631 | cat conftest.s >&5 | |
14632 | fi | |
14633 | rm -f conftest.o conftest.s | |
14634 | fi | |
cafe096b | 14635 | fi |
ba479fd2 NN |
14636 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14637 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14638 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14639 | |
14640 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14641 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14642 | _ACEOF |
3a37b08e | 14643 | |
d006f5eb RH |
14644 | fi |
14645 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14646 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14647 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14648 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14649 | else | |
14650 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14651 | if test $in_tree_gas = yes; then | |
14652 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14653 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14654 | fi | |
14655 | elif test x$gcc_cv_as != x; then | |
14656 | echo ' .set nomacro | |
14657 | .text | |
14658 | ldq $27, a($29) !literal!1 | |
14659 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14660 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14661 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14662 | (eval $ac_try) 2>&5 | |
14663 | ac_status=$? | |
14664 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14665 | (exit $ac_status); }; } | |
14666 | then | |
14667 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14668 | else | |
14669 | echo "configure: failed program was" >&5 | |
14670 | cat conftest.s >&5 | |
14671 | fi | |
14672 | rm -f conftest.o conftest.s | |
14673 | fi | |
14674 | fi | |
14675 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14676 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14677 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14678 | ||
14679 | cat >>confdefs.h <<\_ACEOF | |
14680 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14681 | _ACEOF | |
14682 | ||
86da66b5 HPN |
14683 | fi |
14684 | ;; | |
14685 | ||
14686 | cris-*-*) | |
14687 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14688 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14689 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14690 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14691 | else | |
14692 | gcc_cv_as_cris_no_mul_bug=no | |
14693 | if test $in_tree_gas = yes; then | |
14694 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14695 | then gcc_cv_as_cris_no_mul_bug=yes | |
14696 | fi | |
14697 | elif test x$gcc_cv_as != x; then | |
14698 | echo '.text' > conftest.s | |
14699 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14700 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14701 | (eval $ac_try) 2>&5 | |
14702 | ac_status=$? | |
14703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14704 | (exit $ac_status); }; } | |
14705 | then | |
14706 | gcc_cv_as_cris_no_mul_bug=yes | |
14707 | else | |
14708 | echo "configure: failed program was" >&5 | |
14709 | cat conftest.s >&5 | |
14710 | fi | |
14711 | rm -f conftest.o conftest.s | |
14712 | fi | |
14713 | fi | |
14714 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14715 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14716 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14717 | ||
14718 | cat >>confdefs.h <<\_ACEOF | |
14719 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14720 | _ACEOF | |
14721 | ||
8ada417f | 14722 | fi |
3a37b08e | 14723 | ;; |
8ada417f | 14724 | |
1cb36a98 | 14725 | sparc*-*-*) |
ba479fd2 NN |
14726 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14727 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14728 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14730 | else |
8ada417f ZW |
14731 | gcc_cv_as_sparc_register_op=no |
14732 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14733 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14734 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14736 | (eval $ac_try) 2>&5 | |
14737 | ac_status=$? | |
14738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14739 | (exit $ac_status); }; } | |
8ada417f ZW |
14740 | then |
14741 | gcc_cv_as_sparc_register_op=yes | |
14742 | else | |
14743 | echo "configure: failed program was" >&5 | |
14744 | cat conftest.s >&5 | |
14745 | fi | |
14746 | rm -f conftest.o conftest.s | |
14747 | fi | |
cafe096b | 14748 | fi |
ba479fd2 NN |
14749 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14750 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14751 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14752 | |
14753 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14754 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14755 | _ACEOF |
1cb36a98 | 14756 | |
8ada417f | 14757 | fi |
1cb36a98 | 14758 | |
ba479fd2 NN |
14759 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14760 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14761 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14762 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14763 | else |
8ada417f ZW |
14764 | gcc_cv_as_sparc_relax=no |
14765 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14766 | echo '.text' > conftest.s |
ba479fd2 NN |
14767 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14769 | (eval $ac_try) 2>&5 | |
14770 | ac_status=$? | |
14771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14772 | (exit $ac_status); }; } | |
8ada417f ZW |
14773 | then |
14774 | gcc_cv_as_sparc_relax=yes | |
14775 | else | |
14776 | echo "configure: failed program was" >&5 | |
14777 | cat conftest.s >&5 | |
14778 | fi | |
14779 | rm -f conftest.o conftest.s | |
14780 | fi | |
cafe096b | 14781 | fi |
ba479fd2 NN |
14782 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14783 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14784 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14785 | |
14786 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14787 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14788 | _ACEOF |
e95b1e6a | 14789 | |
8ada417f | 14790 | fi |
e95b1e6a | 14791 | |
ba479fd2 NN |
14792 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14793 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14794 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14795 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14796 | else |
8ada417f ZW |
14797 | gcc_cv_as_sparc_ua_pcrel=no |
14798 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14799 | echo '.text |
8ada417f ZW |
14800 | foo: |
14801 | nop | |
14802 | .data | |
14803 | .align 4 | |
14804 | .byte 0 | |
14805 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14806 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14808 | (eval $ac_try) 2>&5 | |
14809 | ac_status=$? | |
14810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14811 | (exit $ac_status); }; } | |
8ada417f ZW |
14812 | then |
14813 | if test x$gcc_cv_ld != x \ | |
14814 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14815 | gcc_cv_as_sparc_ua_pcrel=yes | |
14816 | fi | |
14817 | rm -f conftest | |
14818 | else | |
14819 | echo "configure: failed program was" >&5 | |
14820 | cat conftest.s >&5 | |
14821 | fi | |
14822 | rm -f conftest.o conftest.s | |
14823 | fi | |
cafe096b | 14824 | fi |
ba479fd2 NN |
14825 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14826 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14827 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14828 | |
14829 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14830 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14831 | _ACEOF |
17e9e88c | 14832 | |
17e9e88c | 14833 | |
ba479fd2 NN |
14834 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
14835 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
14836 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
14837 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 14838 | else |
8ada417f ZW |
14839 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
14840 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14841 | echo '.data |
8ada417f ZW |
14842 | .align 4 |
14843 | .byte 0x31 | |
14844 | .uaword %r_disp32(foo) | |
14845 | .byte 0x32, 0x33, 0x34 | |
14846 | .global foo | |
14847 | .hidden foo | |
14848 | foo: | |
14849 | .skip 4' > conftest.s | |
ba479fd2 NN |
14850 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14851 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14852 | (eval $ac_try) 2>&5 | |
14853 | ac_status=$? | |
14854 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14855 | (exit $ac_status); }; } | |
8ada417f ZW |
14856 | then |
14857 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
14858 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
14859 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
14860 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
14861 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
14862 | | grep 'DISP32' > /dev/null 2>&1; then | |
14863 | : | |
14864 | else | |
14865 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 14866 | fi |
8ada417f ZW |
14867 | fi |
14868 | rm -f conftest | |
14869 | else | |
14870 | echo "configure: failed program was" >&5 | |
14871 | cat conftest.s >&5 | |
14872 | fi | |
14873 | rm -f conftest.o conftest.s | |
14874 | fi | |
cafe096b | 14875 | fi |
ba479fd2 NN |
14876 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
14877 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 14878 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
14879 | |
14880 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 14881 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 14882 | _ACEOF |
cf7b8b0d | 14883 | |
8ada417f | 14884 | fi |
ba479fd2 | 14885 | |
8ada417f | 14886 | fi # unaligned pcrel relocs |
cf7b8b0d | 14887 | |
ba479fd2 NN |
14888 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
14889 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
14890 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
14891 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14892 | else |
8ada417f ZW |
14893 | gcc_cv_as_sparc_offsetable_lo10=no |
14894 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14895 | echo '.text |
8ada417f ZW |
14896 | or %g1, %lo(ab) + 12, %g1 |
14897 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
14898 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
14899 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14900 | (eval $ac_try) 2>&5 | |
14901 | ac_status=$? | |
14902 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14903 | (exit $ac_status); }; } | |
8ada417f ZW |
14904 | then |
14905 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 14906 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 14907 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 14908 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
14909 | fi |
14910 | else | |
14911 | echo "configure: failed program was" >&5 | |
14912 | cat conftest.s >&5 | |
14913 | fi | |
14914 | rm -f conftest.o conftest.s | |
14915 | fi | |
cafe096b | 14916 | fi |
ba479fd2 NN |
14917 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
14918 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 14919 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
14920 | |
14921 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14922 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 14923 | _ACEOF |
1cb36a98 | 14924 | |
8ada417f | 14925 | fi |
1cb36a98 RH |
14926 | ;; |
14927 | ||
c307e6dd | 14928 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
14929 | case $target_os in |
14930 | cygwin* | pe | mingw32*) | |
14931 | # Used for DWARF 2 in PE | |
14932 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
14933 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
14934 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
14935 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14936 | else | |
14937 | gcc_cv_as_ix86_pe_secrel32=no | |
14938 | if test $in_tree_gas = yes; then | |
14939 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14940 | then gcc_cv_as_ix86_pe_secrel32=yes | |
14941 | fi | |
14942 | elif test x$gcc_cv_as != x; then | |
14943 | echo '.text | |
14944 | foo: nop | |
14945 | .data | |
14946 | .secrel32 foo' > conftest.s | |
14947 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14948 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14949 | (eval $ac_try) 2>&5 | |
14950 | ac_status=$? | |
14951 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14952 | (exit $ac_status); }; } | |
14953 | then | |
14954 | if test x$gcc_cv_ld != x \ | |
14955 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
14956 | gcc_cv_as_ix86_pe_secrel32=yes | |
14957 | fi | |
14958 | rm -f conftest | |
14959 | else | |
14960 | echo "configure: failed program was" >&5 | |
14961 | cat conftest.s >&5 | |
14962 | fi | |
14963 | rm -f conftest.o conftest.s | |
14964 | fi | |
14965 | fi | |
14966 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
14967 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
14968 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
14969 | ||
14970 | cat >>confdefs.h <<\_ACEOF | |
14971 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
14972 | _ACEOF | |
14973 | ||
14974 | fi | |
14975 | ;; | |
14976 | esac | |
14977 | ||
ba479fd2 NN |
14978 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
14979 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
14980 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
14981 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14982 | else |
14983 | gcc_cv_as_ix86_filds_fists=no | |
14984 | if test $in_tree_gas = yes; then | |
14985 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
14986 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 14987 | fi |
8ada417f | 14988 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14989 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
14990 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14991 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14992 | (eval $ac_try) 2>&5 | |
14993 | ac_status=$? | |
14994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14995 | (exit $ac_status); }; } | |
8ada417f ZW |
14996 | then |
14997 | gcc_cv_as_ix86_filds_fists=yes | |
14998 | else | |
14999 | echo "configure: failed program was" >&5 | |
15000 | cat conftest.s >&5 | |
981d4858 | 15001 | fi |
8ada417f ZW |
15002 | rm -f conftest.o conftest.s |
15003 | fi | |
15004 | fi | |
ba479fd2 NN |
15005 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15006 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 15007 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15008 | |
15009 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15010 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15011 | _ACEOF |
ad9c4d9f | 15012 | |
f6f5dff2 RO |
15013 | fi |
15014 | ||
ba479fd2 NN |
15015 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15016 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
15017 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
15018 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15019 | else |
15020 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15021 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15022 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15023 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15024 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15025 | (eval $ac_try) 2>&5 | |
15026 | ac_status=$? | |
15027 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15028 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15029 | then |
15030 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15031 | else | |
15032 | echo "configure: failed program was" >&5 | |
15033 | cat conftest.s >&5 | |
15034 | fi | |
15035 | rm -f conftest.o conftest.s | |
15036 | fi | |
15037 | fi | |
ba479fd2 NN |
15038 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15039 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 15040 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15041 | |
15042 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15043 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15044 | _ACEOF |
f6f5dff2 | 15045 | |
ad9c4d9f NN |
15046 | fi |
15047 | ||
6f3ca281 ZW |
15048 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15049 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
15050 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15051 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
15052 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
15053 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15054 | else |
15055 | gcc_cv_as_ix86_gotoff_in_data=no | |
15056 | if test $in_tree_gas = yes; then | |
15057 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15058 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15059 | fi | |
15060 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15061 | echo ' .text |
f88c65f7 RH |
15062 | .L0: |
15063 | nop | |
15064 | .data | |
8ada417f | 15065 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15066 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15067 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15068 | (eval $ac_try) 2>&5 | |
15069 | ac_status=$? | |
15070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15071 | (exit $ac_status); }; } | |
8ada417f ZW |
15072 | then |
15073 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15074 | else | |
15075 | echo "configure: failed program was" >&5 | |
15076 | cat conftest.s >&5 | |
f88c65f7 | 15077 | fi |
8ada417f ZW |
15078 | rm -f conftest.o conftest.s |
15079 | fi | |
15080 | fi | |
ba479fd2 NN |
15081 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15082 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 15083 | |
6f3ca281 | 15084 | |
ba479fd2 | 15085 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15086 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15087 | _ACEOF |
f88c65f7 | 15088 | |
1cb36a98 | 15089 | ;; |
ef1ecf87 RH |
15090 | |
15091 | ia64*-*-*) | |
ba479fd2 NN |
15092 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15093 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
15094 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
15095 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15096 | else |
8ada417f ZW |
15097 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15098 | if test $in_tree_gas = yes; then | |
15099 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15100 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15101 | fi |
8ada417f | 15102 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15103 | echo ' .text |
ef1ecf87 RH |
15104 | addl r15 = @ltoffx(x#), gp |
15105 | ;; | |
cfa9ee99 | 15106 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15107 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15108 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15109 | (eval $ac_try) 2>&5 | |
15110 | ac_status=$? | |
15111 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15112 | (exit $ac_status); }; } | |
8ada417f | 15113 | then |
cfa9ee99 | 15114 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15115 | else |
15116 | echo "configure: failed program was" >&5 | |
15117 | cat conftest.s >&5 | |
2c4a9cff | 15118 | fi |
8ada417f ZW |
15119 | rm -f conftest.o conftest.s |
15120 | fi | |
15121 | fi | |
ba479fd2 NN |
15122 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15123 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 15124 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15125 | |
15126 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15127 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15128 | _ACEOF |
8ada417f | 15129 | |
cfa9ee99 | 15130 | fi |
8ada417f | 15131 | |
2c4a9cff | 15132 | ;; |
8ada417f | 15133 | |
2c4a9cff | 15134 | powerpc*-*-*) |
8ada417f | 15135 | case $target in |
432218ba DE |
15136 | *-*-aix*) conftest_s=' .machine "pwr5" |
15137 | .csect .text[PR] | |
6b37db3c | 15138 | mfcr 3,128';; |
8af4d362 PB |
15139 | *-*-darwin*) |
15140 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
15141 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
15142 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
15143 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15144 | else | |
15145 | gcc_cv_as_machine_directive=no | |
15146 | if test x$gcc_cv_as != x; then | |
15147 | echo ' .machine ppc7400' > conftest.s | |
15148 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15150 | (eval $ac_try) 2>&5 | |
15151 | ac_status=$? | |
15152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15153 | (exit $ac_status); }; } | |
15154 | then | |
15155 | gcc_cv_as_machine_directive=yes | |
15156 | else | |
15157 | echo "configure: failed program was" >&5 | |
15158 | cat conftest.s >&5 | |
15159 | fi | |
15160 | rm -f conftest.o conftest.s | |
15161 | fi | |
15162 | fi | |
15163 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
15164 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
15165 | ||
15166 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15167 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15168 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15169 | test x$build = x$target && exit 1 | |
15170 | fi | |
15171 | conftest_s=' .text | |
6b37db3c | 15172 | mfcr r3,128';; |
4c67db14 | 15173 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15174 | .text |
6b37db3c | 15175 | mfcr 3,128';; |
8ada417f | 15176 | esac |
8ada417f | 15177 | |
ba479fd2 NN |
15178 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15179 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
15180 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
15181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15182 | else |
8ada417f ZW |
15183 | gcc_cv_as_powerpc_mfcrf=no |
15184 | if test $in_tree_gas = yes; then | |
15185 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15186 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15187 | fi |
8ada417f | 15188 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15189 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15190 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15192 | (eval $ac_try) 2>&5 | |
15193 | ac_status=$? | |
15194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15195 | (exit $ac_status); }; } | |
8ada417f ZW |
15196 | then |
15197 | gcc_cv_as_powerpc_mfcrf=yes | |
15198 | else | |
15199 | echo "configure: failed program was" >&5 | |
15200 | cat conftest.s >&5 | |
15201 | fi | |
15202 | rm -f conftest.o conftest.s | |
15203 | fi | |
2c4a9cff | 15204 | fi |
ba479fd2 NN |
15205 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15206 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15207 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15208 | |
15209 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15210 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15211 | _ACEOF |
ef1ecf87 | 15212 | |
8ada417f | 15213 | fi |
432218ba DE |
15214 | |
15215 | case $target in | |
15216 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15217 | .csect .text[PR] | |
15218 | popcntb 3,3';; | |
15219 | *) conftest_s=' .machine power5 | |
15220 | .text | |
15221 | popcntb 3,3';; | |
15222 | esac | |
15223 | ||
15224 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
15225 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
15226 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
15227 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15228 | else | |
15229 | gcc_cv_as_powerpc_popcntb=no | |
15230 | if test $in_tree_gas = yes; then | |
15231 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15232 | then gcc_cv_as_powerpc_popcntb=yes | |
15233 | fi | |
15234 | elif test x$gcc_cv_as != x; then | |
15235 | echo "$conftest_s" > conftest.s | |
15236 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15237 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15238 | (eval $ac_try) 2>&5 | |
15239 | ac_status=$? | |
15240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15241 | (exit $ac_status); }; } | |
15242 | then | |
15243 | gcc_cv_as_powerpc_popcntb=yes | |
15244 | else | |
15245 | echo "configure: failed program was" >&5 | |
15246 | cat conftest.s >&5 | |
15247 | fi | |
15248 | rm -f conftest.o conftest.s | |
15249 | fi | |
15250 | fi | |
15251 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15252 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15253 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15254 | ||
15255 | cat >>confdefs.h <<\_ACEOF | |
15256 | #define HAVE_AS_POPCNTB 1 | |
15257 | _ACEOF | |
15258 | ||
9719f3b7 DE |
15259 | fi |
15260 | ||
15261 | case $target in | |
15262 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
15263 | .csect .text[PR] | |
15264 | frin 1,1';; | |
1e04bfdc | 15265 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
15266 | .text |
15267 | frin 1,1';; | |
15268 | esac | |
15269 | ||
15270 | echo "$as_me:$LINENO: checking assembler for fp round support" >&5 | |
15271 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 | |
15272 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then | |
15273 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15274 | else | |
15275 | gcc_cv_as_powerpc_fprnd=no | |
15276 | if test $in_tree_gas = yes; then | |
15277 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15278 | then gcc_cv_as_powerpc_fprnd=yes | |
15279 | fi | |
15280 | elif test x$gcc_cv_as != x; then | |
15281 | echo "$conftest_s" > conftest.s | |
15282 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15284 | (eval $ac_try) 2>&5 | |
15285 | ac_status=$? | |
15286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15287 | (exit $ac_status); }; } | |
15288 | then | |
15289 | gcc_cv_as_powerpc_fprnd=yes | |
15290 | else | |
15291 | echo "configure: failed program was" >&5 | |
15292 | cat conftest.s >&5 | |
15293 | fi | |
15294 | rm -f conftest.o conftest.s | |
15295 | fi | |
15296 | fi | |
15297 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 | |
15298 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 | |
15299 | if test $gcc_cv_as_powerpc_fprnd = yes; then | |
15300 | ||
15301 | cat >>confdefs.h <<\_ACEOF | |
15302 | #define HAVE_AS_FPRND 1 | |
15303 | _ACEOF | |
15304 | ||
432218ba DE |
15305 | fi |
15306 | ||
7f970b70 AM |
15307 | case $target in |
15308 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15309 | LCF..0: | |
15310 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15311 | *-*-darwin*) | |
15312 | conftest_s=' .text | |
15313 | LCF0: | |
15314 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15315 | *) conftest_s=' .text | |
15316 | .LCF0: | |
15317 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15318 | esac | |
15319 | ||
15320 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15321 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15322 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15323 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15324 | else | |
15325 | gcc_cv_as_powerpc_rel16=no | |
15326 | if test $in_tree_gas = yes; then | |
15327 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15328 | then gcc_cv_as_powerpc_rel16=yes | |
15329 | fi | |
15330 | elif test x$gcc_cv_as != x; then | |
15331 | echo "$conftest_s" > conftest.s | |
15332 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15334 | (eval $ac_try) 2>&5 | |
15335 | ac_status=$? | |
15336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15337 | (exit $ac_status); }; } | |
15338 | then | |
15339 | gcc_cv_as_powerpc_rel16=yes | |
15340 | else | |
15341 | echo "configure: failed program was" >&5 | |
15342 | cat conftest.s >&5 | |
15343 | fi | |
15344 | rm -f conftest.o conftest.s | |
15345 | fi | |
15346 | fi | |
15347 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15348 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15349 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15350 | ||
15351 | cat >>confdefs.h <<\_ACEOF | |
15352 | #define HAVE_AS_REL16 1 | |
15353 | _ACEOF | |
15354 | ||
15355 | fi | |
8ada417f ZW |
15356 | ;; |
15357 | ||
15358 | mips*-*-*) | |
ba479fd2 NN |
15359 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15360 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15361 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15362 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15363 | else |
15364 | gcc_cv_as_mips_explicit_relocs=no | |
15365 | if test $in_tree_gas = yes; then | |
15366 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15367 | then gcc_cv_as_mips_explicit_relocs=yes | |
15368 | fi | |
15369 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15370 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15371 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15372 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15373 | (eval $ac_try) 2>&5 | |
15374 | ac_status=$? | |
15375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15376 | (exit $ac_status); }; } | |
8ada417f ZW |
15377 | then |
15378 | gcc_cv_as_mips_explicit_relocs=yes | |
15379 | else | |
15380 | echo "configure: failed program was" >&5 | |
15381 | cat conftest.s >&5 | |
ef1ecf87 | 15382 | fi |
8ada417f ZW |
15383 | rm -f conftest.o conftest.s |
15384 | fi | |
15385 | fi | |
ba479fd2 NN |
15386 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15387 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15388 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15389 | if test x$target_cpu_default = x | |
15390 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15391 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15392 | fi | |
15393 | fi | |
dbad5e72 SE |
15394 | ;; |
15395 | esac | |
8ada417f | 15396 | |
dbad5e72 SE |
15397 | # Mips and HP-UX need the GNU assembler. |
15398 | # Linux on IA64 might be able to use the Intel assembler. | |
15399 | ||
15400 | case "$target" in | |
15401 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
15402 | if test x$gas_flag = xyes \ |
15403 | || test x"$host" != x"$build" \ | |
15404 | || test ! -x "$gcc_cv_as" \ | |
15405 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15406 | : | |
15407 | else | |
15408 | echo "*** This configuration requires the GNU assembler" >&2 | |
15409 | exit 1 | |
15410 | fi | |
ef1ecf87 | 15411 | ;; |
1cb36a98 | 15412 | esac |
dbad5e72 | 15413 | |
9d147085 RH |
15414 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15415 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15416 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15417 | # add some instruction here to (also) show we expect this might work. | |
15418 | # ??? Once 2.11 is released, probably need to add first known working | |
15419 | # version to the per-target configury. | |
15420 | case "$target" in | |
80486e06 | 15421 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15422 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
6afdc741 | 15423 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-*) |
9d147085 RH |
15424 | insn="nop" |
15425 | ;; | |
57116d8d | 15426 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15427 | insn="nop 0" |
15428 | ;; | |
2853bc5a HPN |
15429 | mmix-*-*) |
15430 | insn="swym 0" | |
15431 | ;; | |
8ada417f ZW |
15432 | esac |
15433 | if test x"$insn" != x; then | |
15434 | conftest_s="\ | |
15435 | .file 1 \"conftest.s\" | |
15436 | .loc 1 3 0 | |
15437 | $insn" | |
ba479fd2 NN |
15438 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15439 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15440 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15441 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15442 | else |
15443 | gcc_cv_as_dwarf2_debug_line=no | |
15444 | if test $in_tree_gas = yes; then | |
15445 | if test $in_tree_gas_is_elf = yes \ | |
15446 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15447 | then gcc_cv_as_dwarf2_debug_line=yes | |
15448 | fi | |
15449 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15450 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15451 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15452 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15453 | (eval $ac_try) 2>&5 | |
15454 | ac_status=$? | |
15455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15456 | (exit $ac_status); }; } | |
8ada417f | 15457 | then |
080a5bb0 EB |
15458 | if test x$gcc_cv_objdump != x \ |
15459 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15460 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15461 | gcc_cv_as_dwarf2_debug_line=yes |
15462 | fi | |
15463 | else | |
15464 | echo "configure: failed program was" >&5 | |
15465 | cat conftest.s >&5 | |
15466 | fi | |
15467 | rm -f conftest.o conftest.s | |
15468 | fi | |
15469 | fi | |
ba479fd2 NN |
15470 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15471 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15472 | |
ad9c4d9f | 15473 | |
8ada417f ZW |
15474 | # The .debug_line file table must be in the exact order that |
15475 | # we specified the files, since these indices are also used | |
15476 | # by DW_AT_decl_file. Approximate this test by testing if | |
15477 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15478 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15479 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15480 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15481 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15482 | else |
15483 | gcc_cv_as_dwarf2_file_buggy=no | |
15484 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15485 | echo ' .file 1 "foo.s" |
8ada417f | 15486 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15487 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15489 | (eval $ac_try) 2>&5 | |
15490 | ac_status=$? | |
15491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15492 | (exit $ac_status); }; } | |
8ada417f ZW |
15493 | then |
15494 | gcc_cv_as_dwarf2_file_buggy=yes | |
15495 | else | |
15496 | echo "configure: failed program was" >&5 | |
15497 | cat conftest.s >&5 | |
15498 | fi | |
15499 | rm -f conftest.o conftest.s | |
15500 | fi | |
ad9c4d9f | 15501 | fi |
ba479fd2 NN |
15502 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15503 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15504 | |
15505 | ||
15506 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15507 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15508 | |
15509 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15510 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15511 | _ACEOF |
9d147085 | 15512 | |
8ada417f | 15513 | fi |
ad9c4d9f | 15514 | |
ba479fd2 NN |
15515 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15516 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15517 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15519 | else |
15520 | gcc_cv_as_gdwarf2_flag=no | |
15521 | if test $in_tree_gas = yes; then | |
15522 | if test $in_tree_gas_is_elf = yes \ | |
15523 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15524 | then gcc_cv_as_gdwarf2_flag=yes | |
15525 | fi | |
15526 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15527 | echo "$insn" > conftest.s |
ba479fd2 NN |
15528 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15530 | (eval $ac_try) 2>&5 | |
15531 | ac_status=$? | |
15532 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15533 | (exit $ac_status); }; } | |
8ada417f ZW |
15534 | then |
15535 | gcc_cv_as_gdwarf2_flag=yes | |
15536 | else | |
15537 | echo "configure: failed program was" >&5 | |
15538 | cat conftest.s >&5 | |
15539 | fi | |
15540 | rm -f conftest.o conftest.s | |
15541 | fi | |
ad9c4d9f | 15542 | fi |
ba479fd2 NN |
15543 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15544 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15545 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15546 | |
15547 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15548 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15549 | _ACEOF |
5f0e9ea2 GK |
15550 | |
15551 | fi | |
ad9c4d9f | 15552 | |
ba479fd2 NN |
15553 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15554 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15555 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15556 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15557 | else |
15558 | gcc_cv_as_gstabs_flag=no | |
15559 | if test $in_tree_gas = yes; then | |
15560 | if test $in_tree_gas_is_elf = yes \ | |
15561 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15562 | then gcc_cv_as_gstabs_flag=yes | |
15563 | fi | |
15564 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15565 | echo "$insn" > conftest.s |
ba479fd2 NN |
15566 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15567 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15568 | (eval $ac_try) 2>&5 | |
15569 | ac_status=$? | |
15570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15571 | (exit $ac_status); }; } | |
8ada417f ZW |
15572 | then |
15573 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15574 | # and warns about it, but still exits successfully. So check for | |
15575 | # this. | |
ba479fd2 NN |
15576 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15578 | (eval $ac_try) 2>&5 | |
15579 | ac_status=$? | |
15580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15581 | (exit $ac_status); }; } | |
8ada417f ZW |
15582 | then : |
15583 | else gcc_cv_as_gstabs_flag=yes | |
15584 | fi | |
15585 | else | |
15586 | echo "configure: failed program was" >&5 | |
15587 | cat conftest.s >&5 | |
15588 | fi | |
15589 | rm -f conftest.o conftest.s | |
15590 | fi | |
ad9c4d9f | 15591 | fi |
ba479fd2 NN |
15592 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15593 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15594 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15595 | |
15596 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15597 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15598 | _ACEOF |
5f0e9ea2 GK |
15599 | |
15600 | fi | |
8ada417f | 15601 | fi |
5f0e9ea2 | 15602 | |
ba479fd2 NN |
15603 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15604 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15605 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15606 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15607 | 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 \ |
15608 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15609 | gcc_cv_ld_ro_rw_mix=read-write |
15610 | fi | |
15611 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15612 | echo '.section myfoosect, "a"' > conftest1.s |
15613 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15614 | echo '.byte 1' >> conftest2.s |
90e145da | 15615 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15616 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15617 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15618 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15619 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15620 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15621 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15622 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15623 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15624 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15625 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15626 | gcc_cv_ld_ro_rw_mix=read-only | |
15627 | else | |
15628 | gcc_cv_ld_ro_rw_mix=read-write | |
15629 | fi | |
15630 | fi | |
15631 | fi | |
15632 | rm -f conftest.* conftest[123].* | |
15633 | fi | |
15634 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15635 | |
15636 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15637 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15638 | _ACEOF |
96d0f4dc JJ |
15639 | |
15640 | fi | |
ba479fd2 NN |
15641 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15642 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15643 | |
ba479fd2 NN |
15644 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15645 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15646 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15647 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15648 | 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 \ |
15649 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15650 | gcc_cv_ld_eh_frame_hdr=yes |
15651 | fi | |
15652 | elif test x$gcc_cv_ld != x; then | |
15653 | # Check if linker supports --eh-frame-hdr option | |
15654 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15655 | gcc_cv_ld_eh_frame_hdr=yes | |
15656 | fi | |
15657 | fi | |
232b67d9 | 15658 | |
275b60d6 | 15659 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15660 | |
15661 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15662 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15663 | _ACEOF |
275b60d6 JJ |
15664 | |
15665 | fi | |
ba479fd2 NN |
15666 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15667 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15668 | |
ba479fd2 NN |
15669 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15670 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15671 | gcc_cv_ld_pie=no |
15672 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15673 | 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 \ |
15674 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15675 | gcc_cv_ld_pie=yes |
15676 | fi | |
15677 | elif test x$gcc_cv_ld != x; then | |
15678 | # Check if linker supports -pie option | |
15679 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15680 | gcc_cv_ld_pie=yes | |
15681 | fi | |
15682 | fi | |
15683 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15684 | |
15685 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15686 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15687 | _ACEOF |
24a4dd31 JJ |
15688 | |
15689 | fi | |
ba479fd2 NN |
15690 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15691 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15692 | |
8bb915b6 NN |
15693 | # -------- |
15694 | # UNSORTED | |
15695 | # -------- | |
15696 | ||
765f1bf9 AM |
15697 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15698 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15699 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15700 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15701 | else | |
15702 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15703 | if test $in_tree_ld = yes ; then |
15704 | 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 \ | |
15705 | && test $in_tree_ld_is_elf = yes; then | |
15706 | gcc_cv_ld_as_needed=yes | |
15707 | fi | |
15708 | elif test x$gcc_cv_ld != x; then | |
15709 | # Check if linker supports --as-needed and --no-as-needed options | |
15710 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15711 | gcc_cv_ld_as_needed=yes | |
15712 | fi | |
15713 | fi | |
82e923f6 RS |
15714 | |
15715 | fi | |
15716 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15717 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15718 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15719 | ||
15720 | cat >>confdefs.h <<\_ACEOF | |
15721 | #define HAVE_LD_AS_NEEDED 1 | |
15722 | _ACEOF | |
15723 | ||
15724 | fi | |
765f1bf9 | 15725 | |
d82bf747 AM |
15726 | case "$target:$tm_file" in |
15727 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
85b776df AM |
15728 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
15729 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15730 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15731 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15732 | else | |
15733 | gcc_cv_ld_no_dot_syms=no | |
15734 | if test $in_tree_ld = yes ; then | |
15735 | 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 | |
15736 | gcc_cv_ld_no_dot_syms=yes | |
15737 | fi | |
15738 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15739 | cat > conftest1.s <<EOF | |
15740 | .text | |
15741 | bl .foo | |
15742 | EOF | |
15743 | cat > conftest2.s <<EOF | |
15744 | .section ".opd","aw" | |
15745 | .align 3 | |
15746 | .globl foo | |
15747 | .type foo,@function | |
15748 | foo: | |
15749 | .quad .LEfoo,.TOC.@tocbase,0 | |
15750 | .text | |
15751 | .LEfoo: | |
15752 | blr | |
15753 | .size foo,.-.LEfoo | |
15754 | EOF | |
15755 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
15756 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15757 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
15758 | gcc_cv_ld_no_dot_syms=yes | |
15759 | fi | |
15760 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
15761 | fi | |
15762 | ||
15763 | fi | |
15764 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
15765 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
15766 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
15767 | ||
15768 | cat >>confdefs.h <<\_ACEOF | |
15769 | #define HAVE_LD_NO_DOT_SYMS 1 | |
15770 | _ACEOF | |
15771 | ||
15772 | fi | |
15773 | ;; | |
15774 | esac | |
15775 | ||
380e5ca4 MM |
15776 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
15777 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
15778 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
15779 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15780 | else | |
15781 | gcc_cv_ld_sysroot=no | |
15782 | if test $in_tree_ld = yes ; then | |
15783 | 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 | 15784 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
15785 | fi |
15786 | elif test x$gcc_cv_ld != x; then | |
15787 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
15788 | gcc_cv_ld_sysroot=yes | |
15789 | fi | |
15790 | fi | |
15791 | fi | |
15792 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
15793 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
15794 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
15795 | ||
15796 | cat >>confdefs.h <<\_ACEOF | |
15797 | #define HAVE_LD_SYSROOT 1 | |
15798 | _ACEOF | |
15799 | ||
15800 | fi | |
15801 | ||
9fb28a67 | 15802 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 15803 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
15804 | |
15805 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 15806 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 15807 | _ACEOF |
793e9558 PB |
15808 | |
15809 | fi | |
15810 | ||
77008252 JJ |
15811 | # Test for stack protector support in target C library. |
15812 | case "$target" in | |
15813 | *-*-linux*) | |
15814 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
15815 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
15816 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
15817 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15818 | else | |
15819 | gcc_cv_libc_provides_ssp=no | |
15820 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15821 | if test "x$with_sysroot" = x; then | |
15822 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15823 | elif test "x$with_sysroot" = xyes; then | |
15824 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15825 | else | |
15826 | glibc_header_dir="${with_sysroot}/usr/include" | |
15827 | fi | |
15828 | else | |
15829 | glibc_header_dir=/usr/include | |
15830 | fi | |
15831 | # glibc 2.4 and later provides __stack_chk_fail and | |
15832 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
15833 | if test -f $glibc_header_dir/features.h \ | |
15834 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
15835 | $glibc_header_dir/features.h > /dev/null; then | |
15836 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
15837 | $glibc_header_dir/features.h > /dev/null; then | |
15838 | gcc_cv_libc_provides_ssp=yes | |
15839 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
15840 | $glibc_header_dir/features.h > /dev/null \ | |
15841 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
15842 | $glibc_header_dir/features.h > /dev/null; then | |
15843 | gcc_cv_libc_provides_ssp=yes | |
15844 | fi | |
15845 | fi | |
15846 | fi | |
15847 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
15848 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
15849 | *) gcc_cv_libc_provides_ssp=no ;; | |
15850 | esac | |
15851 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
15852 | ||
15853 | cat >>confdefs.h <<\_ACEOF | |
15854 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
15855 | _ACEOF | |
15856 | ||
15857 | fi | |
15858 | ||
ed965309 JJ |
15859 | # Check if TFmode long double should be used by default or not. |
15860 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
15861 | # and later they can use TFmode. | |
15862 | case "$target" in | |
15863 | powerpc*-*-*gnu* | \ | |
15864 | sparc*-*-linux* | \ | |
15865 | s390*-*-linux* | \ | |
15866 | alpha*-*-linux*) | |
15867 | ||
15868 | # Check whether --with-long-double-128 or --without-long-double-128 was given. | |
15869 | if test "${with_long_double_128+set}" = set; then | |
15870 | withval="$with_long_double_128" | |
15871 | gcc_cv_target_ldbl128="$with_long_double_128" | |
15872 | else | |
15873 | gcc_cv_target_ldbl128=no | |
15874 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
15875 | if test "x$with_sysroot" = x; then | |
15876 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
15877 | elif test "x$with_sysroot" = xyes; then | |
15878 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
15879 | else | |
15880 | glibc_header_dir="${with_sysroot}/usr/include" | |
15881 | fi | |
15882 | else | |
15883 | glibc_header_dir=/usr/include | |
15884 | fi | |
15885 | grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ | |
15886 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ | |
15887 | && gcc_cv_target_ldbl128=yes | |
15888 | fi; | |
15889 | ;; | |
15890 | esac | |
15891 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
15892 | ||
15893 | cat >>confdefs.h <<\_ACEOF | |
15894 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
15895 | _ACEOF | |
15896 | ||
15897 | fi | |
15898 | ||
81bf3d9e | 15899 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 15900 | |
81bf3d9e RH |
15901 | # Check whether --with-gc or --without-gc was given. |
15902 | if test "${with_gc+set}" = set; then | |
15903 | withval="$with_gc" | |
15904 | case "$withval" in | |
08cee789 | 15905 | page) |
81bf3d9e | 15906 | GGC=ggc-$withval |
08cee789 DJ |
15907 | ;; |
15908 | zone) | |
15909 | GGC=ggc-$withval | |
15910 | ||
15911 | cat >>confdefs.h <<\_ACEOF | |
15912 | #define GGC_ZONE 1 | |
15913 | _ACEOF | |
15914 | ||
81bf3d9e RH |
15915 | ;; |
15916 | *) | |
ba479fd2 NN |
15917 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
15918 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
15919 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
15920 | ;; |
15921 | esac | |
15922 | else | |
005537df | 15923 | GGC=ggc-page |
ba479fd2 | 15924 | fi; |
81bf3d9e RH |
15925 | |
15926 | echo "Using $GGC for garbage collection." | |
15927 | ||
3c809ba4 | 15928 | # Use the system's zlib library. |
b8dad04b ZW |
15929 | zlibdir=-L../zlib |
15930 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 15931 | |
3c809ba4 AG |
15932 | # Check whether --with-system-zlib or --without-system-zlib was given. |
15933 | if test "${with_system_zlib+set}" = set; then | |
15934 | withval="$with_system_zlib" | |
15935 | zlibdir= | |
15936 | zlibinc= | |
15937 | ||
ba479fd2 | 15938 | fi; |
3c809ba4 AG |
15939 | |
15940 | ||
15941 | ||
dc6746e7 | 15942 | |
ba479fd2 NN |
15943 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
15944 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
15945 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
15946 | if test "${enable_maintainer_mode+set}" = set; then | |
15947 | enableval="$enable_maintainer_mode" | |
15948 | maintainer_mode=$enableval | |
15949 | else | |
15950 | maintainer_mode=no | |
ba479fd2 | 15951 | fi; |
63cf211a | 15952 | |
ba479fd2 NN |
15953 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
15954 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
15955 | |
15956 | if test "$maintainer_mode" = "yes"; then | |
15957 | MAINT='' | |
15958 | else | |
15959 | MAINT='#' | |
15960 | fi | |
15961 | ||
8bb915b6 NN |
15962 | # -------------- |
15963 | # Language hooks | |
15964 | # -------------- | |
15965 | ||
861bb6c1 JL |
15966 | # Make empty files to contain the specs and options for each language. |
15967 | # Then add #include lines to for a compiler that has specs and/or options. | |
15968 | ||
cc11cc9b | 15969 | subdirs= |
d7b42618 | 15970 | lang_opt_files= |
861bb6c1 | 15971 | lang_specs_files= |
3103b7db | 15972 | lang_tree_files= |
861bb6c1 JL |
15973 | # These (without "all_") are set in each config-lang.in. |
15974 | # `language' must be a single word so is spelled singularly. | |
15975 | all_languages= | |
15976 | all_boot_languages= | |
15977 | all_compilers= | |
15978 | all_stagestuff= | |
53c7ffe7 | 15979 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 15980 | # List of language makefile fragments. |
2ed26f6b ZW |
15981 | all_lang_makefrags= |
15982 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 15983 | all_lang_makefiles= |
e2500fed | 15984 | # Files for gengtype |
ef69da62 | 15985 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
15986 | # Files for gengtype with language |
15987 | all_gtfiles_files_langs= | |
15988 | all_gtfiles_files_files= | |
861bb6c1 | 15989 | |
cc11cc9b PB |
15990 | # These are the languages that are set in --enable-languages, |
15991 | # and are available in the GCC tree. | |
15992 | all_selected_languages= | |
15993 | ||
861bb6c1 JL |
15994 | # Add the language fragments. |
15995 | # Languages are added via two mechanisms. Some information must be | |
15996 | # recorded in makefile variables, these are defined in config-lang.in. | |
15997 | # We accumulate them and plug them into the main Makefile. | |
15998 | # The other mechanism is a set of hooks for each of the main targets | |
15999 | # like `clean', `install', etc. | |
16000 | ||
861bb6c1 | 16001 | language_hooks="Make-hooks" |
861bb6c1 | 16002 | |
cc11cc9b | 16003 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 16004 | do |
1546bb64 PB |
16005 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
16006 | ||
cc11cc9b PB |
16007 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
16008 | if test "x$lang_alias" = x | |
16009 | then | |
16010 | echo "$lang doesn't set \$language." 1>&2 | |
16011 | exit 1 | |
16012 | fi | |
16013 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
16014 | subdirs="$subdirs $subdir" | |
16015 | case ",$enable_languages," in | |
16016 | *,$lang_alias,*) | |
16017 | all_selected_languages="$all_selected_languages $lang_alias" | |
16018 | if test -f $srcdir/$subdir/lang-specs.h; then | |
16019 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
16020 | fi | |
16021 | ;; | |
16022 | esac | |
16023 | ||
cc11cc9b PB |
16024 | language= |
16025 | boot_language= | |
16026 | compilers= | |
16027 | stagestuff= | |
16028 | outputs= | |
16029 | gtfiles= | |
1546bb64 | 16030 | subdir_requires= |
cc11cc9b PB |
16031 | . ${srcdir}/$subdir/config-lang.in |
16032 | if test "x$language" = x | |
16033 | then | |
16034 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
16035 | exit 1 | |
16036 | fi | |
1546bb64 PB |
16037 | |
16038 | ok=: | |
16039 | case ",$enable_languages," in | |
16040 | *,$lang_alias,*) ;; | |
16041 | *) | |
16042 | for i in $subdir_requires; do | |
b6348cb3 | 16043 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
16044 | ok=false |
16045 | break | |
16046 | done | |
16047 | ;; | |
16048 | esac | |
16049 | $ok || continue | |
16050 | ||
cc11cc9b | 16051 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" |
1546bb64 PB |
16052 | if test -f $srcdir/$subdir/lang.opt; then |
16053 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
16054 | fi | |
16055 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
16056 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
16057 | fi | |
cc11cc9b PB |
16058 | if test -f ${srcdir}/$subdir/Makefile.in |
16059 | then all_lang_makefiles="$subdir/Makefile" | |
16060 | fi | |
16061 | all_languages="$all_languages $language" | |
16062 | if test "x$boot_language" = xyes | |
16063 | then | |
16064 | all_boot_languages="$all_boot_languages $language" | |
16065 | fi | |
16066 | all_compilers="$all_compilers $compilers" | |
16067 | all_stagestuff="$all_stagestuff $stagestuff" | |
16068 | all_outputs="$all_outputs $outputs" | |
16069 | all_gtfiles="$all_gtfiles $gtfiles" | |
1546bb64 PB |
16070 | for f in $gtfiles |
16071 | do | |
16072 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " | |
16073 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
16074 | done | |
861bb6c1 JL |
16075 | done |
16076 | ||
8ac9d31f TJ |
16077 | # Pick up gtfiles for c |
16078 | gtfiles= | |
cc11cc9b | 16079 | subdir="c" |
8ac9d31f TJ |
16080 | . ${srcdir}/c-config-lang.in |
16081 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 16082 | for f in $gtfiles |
8ac9d31f | 16083 | do |
cc11cc9b | 16084 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " |
8ac9d31f | 16085 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " |
8ac9d31f TJ |
16086 | done |
16087 | ||
cbc59f01 | 16088 | check_languages= |
cc11cc9b | 16089 | for language in $all_selected_languages |
cbc59f01 | 16090 | do |
cc11cc9b | 16091 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
16092 | done |
16093 | ||
62b81e45 | 16094 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 16095 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
16096 | |
16097 | rm -f Make-hooks | |
16098 | touch Make-hooks | |
bd97af06 | 16099 | target_list="all.cross start.encap rest.encap tags \ |
b2d7fd7b | 16100 | install-common install-man install-info dvi html \ |
a541f69d | 16101 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 16102 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 16103 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
cc11cc9b | 16104 | |
861bb6c1 JL |
16105 | for t in $target_list |
16106 | do | |
16107 | x= | |
cc11cc9b | 16108 | for lang in $all_selected_languages |
861bb6c1 | 16109 | do |
cc11cc9b | 16110 | x="$x $lang.$t" |
861bb6c1 JL |
16111 | done |
16112 | echo "lang.$t: $x" >> Make-hooks | |
16113 | done | |
16114 | ||
8bb915b6 NN |
16115 | # -------- |
16116 | # UNSORTED | |
16117 | # -------- | |
16118 | ||
cc06d68c | 16119 | # Create .gdbinit. |
861bb6c1 | 16120 | |
cc06d68c GP |
16121 | echo "dir ." > .gdbinit |
16122 | echo "dir ${srcdir}" >> .gdbinit | |
16123 | if test x$gdb_needs_out_file_path = xyes | |
16124 | then | |
16125 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
16126 | fi | |
16127 | if test "x$subdirs" != x; then | |
16128 | for s in $subdirs | |
16129 | do | |
16130 | echo "dir ${srcdir}/$s" >> .gdbinit | |
16131 | done | |
861bb6c1 | 16132 | fi |
cc06d68c | 16133 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 16134 | |
8f8d3278 NC |
16135 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
16136 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
16137 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
16138 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
16139 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
16140 | # make and thus we'd get different behavior depending on where we built the | |
16141 | # sources. | |
5949a9fc | 16142 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 16143 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 16144 | else |
8f8d3278 NC |
16145 | # An explanation of the sed strings: |
16146 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
16147 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
16148 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 16149 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
16150 | # |
16151 | # (*) Note this pattern overwrites the first character of the string | |
16152 | # with a forward slash if one is not already present. This is not a | |
16153 | # problem because the exact names of the sub-directories concerned is | |
16154 | # unimportant, just the number of them matters. | |
16155 | # | |
16156 | # The practical upshot of these patterns is like this: | |
16157 | # | |
16158 | # prefix exec_prefix result | |
16159 | # ------ ----------- ------ | |
16160 | # /foo /foo/bar ../ | |
16161 | # /foo/ /foo/bar ../ | |
16162 | # /foo /foo/bar/ ../ | |
16163 | # /foo/ /foo/bar/ ../ | |
16164 | # /foo /foo/bar/ugg ../../ | |
16165 | # | |
4c112cda | 16166 | dollar='$$' |
caa55b1e | 16167 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
16168 | fi |
16169 | ||
16170 | ||
2ce3c6c6 | 16171 | |
2bbea3a6 RH |
16172 | # Find a directory in which to install a shared libgcc. |
16173 | ||
16174 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
16175 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
16176 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
16177 | |
16178 | fi; | |
2bbea3a6 RH |
16179 | |
16180 | ||
5b15f277 RH |
16181 | # Check whether --with-slibdir or --without-slibdir was given. |
16182 | if test "${with_slibdir+set}" = set; then | |
16183 | withval="$with_slibdir" | |
16184 | slibdir="$with_slibdir" | |
16185 | else | |
16186 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 16187 | slibdir='$(libsubdir)' |
5b15f277 | 16188 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
16189 | slibdir='$(build_tooldir)/lib' |
16190 | else | |
5b15f277 | 16191 | slibdir='$(libdir)' |
2bbea3a6 | 16192 | fi |
ba479fd2 | 16193 | fi; |
2bbea3a6 RH |
16194 | |
16195 | ||
1e6347d8 | 16196 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
16197 | |
16198 | ||
22482f74 MS |
16199 | |
16200 | # Check whether --with-datarootdir or --without-datarootdir was given. | |
16201 | if test "${with_datarootdir+set}" = set; then | |
16202 | withval="$with_datarootdir" | |
16203 | datarootdir="\${prefix}/$with_datarootdir" | |
16204 | else | |
16205 | datarootdir='$(prefix)/share' | |
16206 | fi; | |
16207 | ||
16208 | ||
16209 | ||
16210 | # Check whether --with-docdir or --without-docdir was given. | |
16211 | if test "${with_docdir+set}" = set; then | |
16212 | withval="$with_docdir" | |
16213 | docdir="\${prefix}/$with_docdir" | |
16214 | else | |
16215 | docdir='$(datarootdir)' | |
16216 | fi; | |
16217 | ||
16218 | ||
16219 | ||
16220 | # Check whether --with-htmldir or --without-htmldir was given. | |
16221 | if test "${with_htmldir+set}" = set; then | |
16222 | withval="$with_htmldir" | |
16223 | htmldir="\${prefix}/$with_htmldir" | |
16224 | else | |
16225 | htmldir='$(docdir)' | |
16226 | fi; | |
16227 | ||
16228 | ||
861bb6c1 JL |
16229 | # Substitute configuration variables |
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 | ||
16259 | ||
16260 | ||
16261 | ||
16262 | ||
16263 | ||
16264 | ||
16265 | ||
16266 | ||
16267 | ||
16268 | ||
16269 | ||
16270 | ||
16271 | ||
16272 | ||
16273 | ||
16274 | ||
16275 | ||
9b16d2c4 | 16276 | |
e9a25f70 | 16277 | |
6e26218f | 16278 | |
c8724862 | 16279 | |
e061d1ce | 16280 | |
d8bb17c8 | 16281 | |
11642c3a ZW |
16282 | |
16283 | ||
16284 | ||
16285 | ||
16286 | ||
16287 | ||
16288 | ||
3d9d2476 | 16289 | |
e2500fed | 16290 | |
51b9ff45 | 16291 | |
861bb6c1 | 16292 | |
6e3f3080 NN |
16293 | # Echo link setup. |
16294 | if test x${build} = x${host} ; then | |
16295 | if test x${host} = x${target} ; then | |
16296 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
16297 | else | |
16298 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
16299 | echo " from ${host} to ${target}." 1>&2 | |
16300 | fi | |
16301 | else | |
16302 | if test x${host} = x${target} ; then | |
16303 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
16304 | echo " for ${target}." 1>&2 | |
16305 | else | |
16306 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
16307 | echo " from ${host} to ${target}." 1>&2 | |
16308 | fi | |
16309 | fi | |
16310 | ||
6de9cd9a DN |
16311 | |
16312 | ||
16313 | ||
6e3f3080 NN |
16314 | # Configure the subdirectories |
16315 | # AC_CONFIG_SUBDIRS($subdirs) | |
16316 | ||
16317 | # Create the Makefile | |
16318 | # and configure language subdirectories | |
ba479fd2 | 16319 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
16320 | |
16321 | ||
ba479fd2 | 16322 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 16323 | |
ba479fd2 | 16324 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
16325 | # This file is a shell script that caches the results of configure |
16326 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
16327 | # scripts and configure runs, see configure's option --config-cache. |
16328 | # It is not useful on other systems. If it contains results you don't | |
16329 | # want to keep, you may remove or edit it. | |
6e3f3080 | 16330 | # |
ba479fd2 NN |
16331 | # config.status only pays attention to the cache file if you give it |
16332 | # the --recheck option to rerun configure. | |
6e3f3080 | 16333 | # |
ba479fd2 NN |
16334 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
16335 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16336 | # following values. | |
16337 | ||
16338 | _ACEOF | |
16339 | ||
6e3f3080 NN |
16340 | # The following way of writing the cache mishandles newlines in values, |
16341 | # but we know of no workaround that is simple, portable, and efficient. | |
16342 | # So, don't put newlines in cache variables' values. | |
16343 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
16344 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
16345 | { |
16346 | (set) 2>&1 | | |
16347 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
16348 | *ac_space=\ *) | |
16349 | # `set' does not quote correctly, so add quotes (double-quote | |
16350 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
16351 | sed -n \ | |
86da66b5 HPN |
16352 | "s/'/'\\\\''/g; |
16353 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
16354 | ;; |
16355 | *) | |
16356 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
16357 | sed -n \ | |
86da66b5 | 16358 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
16359 | ;; |
16360 | esac; | |
16361 | } | | |
16362 | sed ' | |
16363 | t clear | |
16364 | : clear | |
16365 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
16366 | t end | |
16367 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
16368 | : end' >>confcache | |
16369 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 16370 | if test -w $cache_file; then |
ba479fd2 NN |
16371 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
16372 | cat confcache >$cache_file | |
6e3f3080 NN |
16373 | else |
16374 | echo "not updating unwritable cache $cache_file" | |
16375 | fi | |
16376 | fi | |
16377 | rm -f confcache | |
16378 | ||
16379 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16380 | # Let make expand exec_prefix. | |
16381 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16382 | ||
ba479fd2 NN |
16383 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
16384 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16385 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16386 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 16387 | if test "x$srcdir" = x.; then |
86da66b5 | 16388 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
16389 | s/:*\$(srcdir):*/:/; |
16390 | s/:*\${srcdir}:*/:/; | |
16391 | s/:*@srcdir@:*/:/; | |
86da66b5 | 16392 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 16393 | s/:*$//; |
86da66b5 | 16394 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 16395 | }' |
6e3f3080 NN |
16396 | fi |
16397 | ||
63cf211a | 16398 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16399 | |
ba479fd2 NN |
16400 | ac_libobjs= |
16401 | ac_ltlibobjs= | |
16402 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16403 | # 1. Remove the extension, and $U if already installed. | |
16404 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16405 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16406 | # 2. Add them. |
16407 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16408 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16409 | done | |
16410 | LIBOBJS=$ac_libobjs | |
63cf211a | 16411 | |
ba479fd2 NN |
16412 | LTLIBOBJS=$ac_ltlibobjs |
16413 | ||
16414 | ||
16415 | ||
16416 | : ${CONFIG_STATUS=./config.status} | |
16417 | ac_clean_files_save=$ac_clean_files | |
16418 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16419 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16420 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16421 | cat >$CONFIG_STATUS <<_ACEOF | |
16422 | #! $SHELL | |
16423 | # Generated by $as_me. | |
6e3f3080 NN |
16424 | # Run this file to recreate the current configuration. |
16425 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16426 | # configure, is in config.log if it exists. |
6e3f3080 | 16427 | |
ba479fd2 NN |
16428 | debug=false |
16429 | ac_cs_recheck=false | |
16430 | ac_cs_silent=false | |
16431 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16432 | _ACEOF | |
16433 | ||
16434 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16435 | ## --------------------- ## | |
16436 | ## M4sh Initialization. ## | |
16437 | ## --------------------- ## | |
16438 | ||
16439 | # Be Bourne compatible | |
16440 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16441 | emulate sh | |
16442 | NULLCMD=: | |
16443 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16444 | # is contrary to our usage. Disable this feature. | |
16445 | alias -g '${1+"$@"}'='"$@"' | |
16446 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16447 | set -o posix | |
16448 | fi | |
86da66b5 | 16449 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16450 | |
16451 | # Support unset when possible. | |
86da66b5 | 16452 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16453 | as_unset=unset |
16454 | else | |
16455 | as_unset=false | |
16456 | fi | |
16457 | ||
16458 | ||
16459 | # Work around bugs in pre-3.0 UWIN ksh. | |
16460 | $as_unset ENV MAIL MAILPATH | |
16461 | PS1='$ ' | |
16462 | PS2='> ' | |
16463 | PS4='+ ' | |
16464 | ||
16465 | # NLS nuisances. | |
16466 | for as_var in \ | |
16467 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16468 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16469 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16470 | do |
86da66b5 | 16471 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16472 | eval $as_var=C; export $as_var |
16473 | else | |
16474 | $as_unset $as_var | |
16475 | fi | |
6e3f3080 NN |
16476 | done |
16477 | ||
ba479fd2 NN |
16478 | # Required to use basename. |
16479 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16480 | as_expr=expr | |
16481 | else | |
16482 | as_expr=false | |
16483 | fi | |
6e3f3080 | 16484 | |
ba479fd2 NN |
16485 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16486 | as_basename=basename | |
16487 | else | |
16488 | as_basename=false | |
16489 | fi | |
6e3f3080 NN |
16490 | |
16491 | ||
ba479fd2 NN |
16492 | # Name of the executable. |
16493 | as_me=`$as_basename "$0" || | |
16494 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16495 | X"$0" : 'X\(//\)$' \| \ | |
16496 | X"$0" : 'X\(/\)$' \| \ | |
16497 | . : '\(.\)' 2>/dev/null || | |
16498 | echo X/"$0" | | |
16499 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16500 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16501 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16502 | s/.*/./; q'` | |
16503 | ||
6e3f3080 | 16504 | |
ba479fd2 NN |
16505 | # PATH needs CR, and LINENO needs CR and PATH. |
16506 | # Avoid depending upon Character Ranges. | |
16507 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16508 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16509 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16510 | as_cr_digits='0123456789' | |
16511 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16512 | ||
16513 | # The user is always right. | |
16514 | if test "${PATH_SEPARATOR+set}" != set; then | |
16515 | echo "#! /bin/sh" >conf$$.sh | |
16516 | echo "exit 0" >>conf$$.sh | |
16517 | chmod +x conf$$.sh | |
16518 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16519 | PATH_SEPARATOR=';' | |
6e3f3080 | 16520 | else |
ba479fd2 NN |
16521 | PATH_SEPARATOR=: |
16522 | fi | |
16523 | rm -f conf$$.sh | |
16524 | fi | |
16525 | ||
16526 | ||
16527 | as_lineno_1=$LINENO | |
16528 | as_lineno_2=$LINENO | |
16529 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16530 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16531 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16532 | # Find who we are. Look in the path if we contain no path at all | |
16533 | # relative or not. | |
16534 | case $0 in | |
16535 | *[\\/]* ) as_myself=$0 ;; | |
16536 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16537 | for as_dir in $PATH | |
16538 | do | |
16539 | IFS=$as_save_IFS | |
16540 | test -z "$as_dir" && as_dir=. | |
16541 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16542 | done | |
16543 | ||
16544 | ;; | |
16545 | esac | |
16546 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16547 | # in which case we are not to be found in the path. | |
16548 | if test "x$as_myself" = x; then | |
16549 | as_myself=$0 | |
16550 | fi | |
16551 | if test ! -f "$as_myself"; then | |
16552 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16553 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16554 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16555 | fi |
ba479fd2 NN |
16556 | case $CONFIG_SHELL in |
16557 | '') | |
16558 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16559 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16560 | do | |
16561 | IFS=$as_save_IFS | |
16562 | test -z "$as_dir" && as_dir=. | |
16563 | for as_base in sh bash ksh sh5; do | |
16564 | case $as_dir in | |
16565 | /*) | |
16566 | if ("$as_dir/$as_base" -c ' | |
16567 | as_lineno_1=$LINENO | |
16568 | as_lineno_2=$LINENO | |
16569 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16570 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16571 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16572 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16573 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16574 | CONFIG_SHELL=$as_dir/$as_base | |
16575 | export CONFIG_SHELL | |
16576 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16577 | fi;; | |
16578 | esac | |
16579 | done | |
16580 | done | |
16581 | ;; | |
16582 | esac | |
16583 | ||
16584 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16585 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16586 | # line-number line before each line; the second 'sed' does the real | |
16587 | # work. The second script uses 'N' to pair each line-number line | |
16588 | # with the numbered line, and appends trailing '-' during | |
16589 | # substitution so that $LINENO is not a special case at line end. | |
16590 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16591 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16592 | sed '=' <$as_myself | | |
16593 | sed ' | |
16594 | N | |
16595 | s,$,-, | |
16596 | : loop | |
16597 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16598 | t loop | |
16599 | s,-$,, | |
16600 | s,^['$as_cr_digits']*\n,, | |
16601 | ' >$as_me.lineno && | |
16602 | chmod +x $as_me.lineno || | |
16603 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16604 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16605 | { (exit 1); exit 1; }; } | |
16606 | ||
16607 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16608 | # (the dirname of $[0] is not the place where we might find the | |
16609 | # original and so on. Autoconf is especially sensible to this). | |
16610 | . ./$as_me.lineno | |
16611 | # Exit status is that of the last command. | |
16612 | exit | |
16613 | } | |
16614 | ||
16615 | ||
16616 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16617 | *c*,-n*) ECHO_N= ECHO_C=' | |
16618 | ' ECHO_T=' ' ;; | |
16619 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16620 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16621 | esac | |
16622 | ||
16623 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16624 | as_expr=expr | |
16625 | else | |
16626 | as_expr=false | |
16627 | fi | |
16628 | ||
16629 | rm -f conf$$ conf$$.exe conf$$.file | |
16630 | echo >conf$$.file | |
16631 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16632 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16633 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16634 | if test -f conf$$.exe; then | |
16635 | # Don't use ln at all; we don't have any links | |
16636 | as_ln_s='cp -p' | |
6e3f3080 | 16637 | else |
ba479fd2 | 16638 | as_ln_s='ln -s' |
6e3f3080 | 16639 | fi |
ba479fd2 NN |
16640 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16641 | as_ln_s=ln | |
16642 | else | |
16643 | as_ln_s='cp -p' | |
16644 | fi | |
16645 | rm -f conf$$ conf$$.exe conf$$.file | |
16646 | ||
16647 | if mkdir -p . 2>/dev/null; then | |
16648 | as_mkdir_p=: | |
16649 | else | |
86da66b5 | 16650 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16651 | as_mkdir_p=false |
16652 | fi | |
16653 | ||
16654 | as_executable_p="test -f" | |
16655 | ||
16656 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16657 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16658 | |
16659 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16660 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16661 | |
16662 | ||
16663 | # IFS | |
16664 | # We need space, tab and new line, in precisely that order. | |
16665 | as_nl=' | |
16666 | ' | |
16667 | IFS=" $as_nl" | |
16668 | ||
16669 | # CDPATH. | |
16670 | $as_unset CDPATH | |
16671 | ||
16672 | exec 6>&1 | |
16673 | ||
16674 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16675 | # report actual input values of CONFIG_FILES etc. instead of their | |
16676 | # values after options handling. Logging --version etc. is OK. | |
16677 | exec 5>>config.log | |
16678 | { | |
16679 | echo | |
16680 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16681 | ## Running $as_me. ## | |
16682 | _ASBOX | |
16683 | } >&5 | |
16684 | cat >&5 <<_CSEOF | |
16685 | ||
16686 | This file was extended by $as_me, which was | |
8ab705be | 16687 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16688 | |
16689 | CONFIG_FILES = $CONFIG_FILES | |
16690 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16691 | CONFIG_LINKS = $CONFIG_LINKS | |
16692 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16693 | $ $0 $@ | |
16694 | ||
16695 | _CSEOF | |
16696 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16697 | echo >&5 | |
16698 | _ACEOF | |
16699 | ||
16700 | # Files that config.status was made for. | |
16701 | if test -n "$ac_config_files"; then | |
16702 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16703 | fi | |
16704 | ||
16705 | if test -n "$ac_config_headers"; then | |
16706 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16707 | fi | |
16708 | ||
16709 | if test -n "$ac_config_links"; then | |
16710 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16711 | fi | |
16712 | ||
16713 | if test -n "$ac_config_commands"; then | |
16714 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16715 | fi | |
16716 | ||
16717 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16718 | ||
16719 | ac_cs_usage="\ | |
16720 | \`$as_me' instantiates files from templates according to the | |
16721 | current configuration. | |
16722 | ||
16723 | Usage: $0 [OPTIONS] [FILE]... | |
16724 | ||
16725 | -h, --help print this help, then exit | |
16726 | -V, --version print version number, then exit | |
16727 | -q, --quiet do not print progress messages | |
16728 | -d, --debug don't remove temporary files | |
16729 | --recheck update $as_me by reconfiguring in the same conditions | |
16730 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16731 | instantiate the configuration file FILE |
ba479fd2 | 16732 | --header=FILE[:TEMPLATE] |
86da66b5 | 16733 | instantiate the configuration header FILE |
ba479fd2 NN |
16734 | |
16735 | Configuration files: | |
16736 | $config_files | |
16737 | ||
16738 | Configuration headers: | |
16739 | $config_headers | |
16740 | ||
16741 | Configuration commands: | |
16742 | $config_commands | |
16743 | ||
16744 | Report bugs to <bug-autoconf@gnu.org>." | |
16745 | _ACEOF | |
16746 | ||
16747 | cat >>$CONFIG_STATUS <<_ACEOF | |
16748 | ac_cs_version="\\ | |
16749 | config.status | |
8ab705be | 16750 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16751 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16752 | ||
86da66b5 | 16753 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
16754 | This config.status script is free software; the Free Software Foundation |
16755 | gives unlimited permission to copy, distribute and modify it." | |
16756 | srcdir=$srcdir | |
16757 | _ACEOF | |
16758 | ||
16759 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16760 | # If no file are specified by the user, then we need to provide default | |
16761 | # value. By we need to know if files were specified by the user. | |
16762 | ac_need_defaults=: | |
16763 | while test $# != 0 | |
16764 | do | |
16765 | case $1 in | |
16766 | --*=*) | |
16767 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
16768 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
16769 | ac_shift=: | |
16770 | ;; | |
16771 | -*) | |
16772 | ac_option=$1 | |
16773 | ac_optarg=$2 | |
16774 | ac_shift=shift | |
16775 | ;; | |
16776 | *) # This is not an option, so the user has probably given explicit | |
16777 | # arguments. | |
16778 | ac_option=$1 | |
16779 | ac_need_defaults=false;; | |
16780 | esac | |
16781 | ||
16782 | case $ac_option in | |
16783 | # Handling of the options. | |
16784 | _ACEOF | |
16785 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16786 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
16787 | ac_cs_recheck=: ;; | |
16788 | --version | --vers* | -V ) | |
16789 | echo "$ac_cs_version"; exit 0 ;; | |
16790 | --he | --h) | |
16791 | # Conflict between --help and --header | |
16792 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
16793 | Try \`$0 --help' for more information." >&5 | |
16794 | echo "$as_me: error: ambiguous option: $1 | |
16795 | Try \`$0 --help' for more information." >&2;} | |
16796 | { (exit 1); exit 1; }; };; | |
16797 | --help | --hel | -h ) | |
16798 | echo "$ac_cs_usage"; exit 0 ;; | |
16799 | --debug | --d* | -d ) | |
16800 | debug=: ;; | |
16801 | --file | --fil | --fi | --f ) | |
16802 | $ac_shift | |
16803 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
16804 | ac_need_defaults=false;; | |
16805 | --header | --heade | --head | --hea ) | |
16806 | $ac_shift | |
16807 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
16808 | ac_need_defaults=false;; | |
16809 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
16810 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
16811 | ac_cs_silent=: ;; | |
16812 | ||
16813 | # This is an error. | |
16814 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
16815 | Try \`$0 --help' for more information." >&5 | |
16816 | echo "$as_me: error: unrecognized option: $1 | |
16817 | Try \`$0 --help' for more information." >&2;} | |
16818 | { (exit 1); exit 1; }; } ;; | |
16819 | ||
16820 | *) ac_config_targets="$ac_config_targets $1" ;; | |
16821 | ||
16822 | esac | |
16823 | shift | |
6e3f3080 | 16824 | done |
ba479fd2 NN |
16825 | |
16826 | ac_configure_extra_args= | |
16827 | ||
16828 | if $ac_cs_silent; then | |
16829 | exec 6>/dev/null | |
16830 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
16831 | fi |
16832 | ||
ba479fd2 NN |
16833 | _ACEOF |
16834 | cat >>$CONFIG_STATUS <<_ACEOF | |
16835 | if \$ac_cs_recheck; then | |
16836 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
16837 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
16838 | fi | |
861bb6c1 | 16839 | |
ba479fd2 NN |
16840 | _ACEOF |
16841 | ||
16842 | cat >>$CONFIG_STATUS <<_ACEOF | |
16843 | # | |
16844 | # INIT-COMMANDS section. | |
16845 | # | |
16846 | ||
16847 | subdirs='$subdirs' | |
ba479fd2 NN |
16848 | |
16849 | _ACEOF | |
16850 | ||
16851 | ||
16852 | ||
16853 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16854 | for ac_config_target in $ac_config_targets | |
16855 | do | |
16856 | case "$ac_config_target" in | |
16857 | # Handling of arguments. | |
16858 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
16859 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
16860 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
16861 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
16862 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
16863 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 16864 | esac |
ba479fd2 NN |
16865 | done |
16866 | ||
16867 | # If the user did not use the arguments to specify the items to instantiate, | |
16868 | # then the envvar interface is used. Set only those that are not. | |
16869 | # We use the long form for the default assignment because of an extremely | |
16870 | # bizarre bug on SunOS 4.1.3. | |
16871 | if $ac_need_defaults; then | |
16872 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
16873 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
16874 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
16875 | fi | |
16876 | ||
16877 | # Have a temporary directory for convenience. Make it in the build tree | |
16878 | # simply because there is no reason to put it here, and in addition, | |
16879 | # creating and moving files from /tmp can sometimes cause problems. | |
16880 | # Create a temporary directory, and hook for its removal unless debugging. | |
16881 | $debug || | |
16882 | { | |
16883 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
16884 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
16885 | } | |
861bb6c1 | 16886 | |
ba479fd2 | 16887 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 16888 | |
ba479fd2 NN |
16889 | { |
16890 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
16891 | test -n "$tmp" && test -d "$tmp" | |
16892 | } || | |
16893 | { | |
16894 | tmp=./confstat$$-$RANDOM | |
16895 | (umask 077 && mkdir $tmp) | |
16896 | } || | |
16897 | { | |
16898 | echo "$me: cannot create a temporary directory in ." >&2 | |
16899 | { (exit 1); exit 1; } | |
16900 | } | |
16901 | ||
16902 | _ACEOF | |
16903 | ||
16904 | cat >>$CONFIG_STATUS <<_ACEOF | |
16905 | ||
16906 | # | |
16907 | # CONFIG_FILES section. | |
16908 | # | |
16909 | ||
16910 | # No need to generate the scripts if there are no CONFIG_FILES. | |
16911 | # This happens for instance when ./config.status config.h | |
16912 | if test -n "\$CONFIG_FILES"; then | |
16913 | # Protect against being on the right side of a sed subst in config.status. | |
16914 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
16915 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
16916 | s,@SHELL@,$SHELL,;t t | |
16917 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
16918 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
16919 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
16920 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
16921 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
16922 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
16923 | s,@exec_prefix@,$exec_prefix,;t t | |
16924 | s,@prefix@,$prefix,;t t | |
16925 | s,@program_transform_name@,$program_transform_name,;t t | |
16926 | s,@bindir@,$bindir,;t t | |
16927 | s,@sbindir@,$sbindir,;t t | |
16928 | s,@libexecdir@,$libexecdir,;t t | |
16929 | s,@datadir@,$datadir,;t t | |
16930 | s,@sysconfdir@,$sysconfdir,;t t | |
16931 | s,@sharedstatedir@,$sharedstatedir,;t t | |
16932 | s,@localstatedir@,$localstatedir,;t t | |
16933 | s,@libdir@,$libdir,;t t | |
16934 | s,@includedir@,$includedir,;t t | |
16935 | s,@oldincludedir@,$oldincludedir,;t t | |
16936 | s,@infodir@,$infodir,;t t | |
16937 | s,@mandir@,$mandir,;t t | |
16938 | s,@build_alias@,$build_alias,;t t | |
16939 | s,@host_alias@,$host_alias,;t t | |
16940 | s,@target_alias@,$target_alias,;t t | |
16941 | s,@DEFS@,$DEFS,;t t | |
16942 | s,@ECHO_C@,$ECHO_C,;t t | |
16943 | s,@ECHO_N@,$ECHO_N,;t t | |
16944 | s,@ECHO_T@,$ECHO_T,;t t | |
16945 | s,@LIBS@,$LIBS,;t t | |
16946 | s,@build@,$build,;t t | |
16947 | s,@build_cpu@,$build_cpu,;t t | |
16948 | s,@build_vendor@,$build_vendor,;t t | |
16949 | s,@build_os@,$build_os,;t t | |
16950 | s,@host@,$host,;t t | |
16951 | s,@host_cpu@,$host_cpu,;t t | |
16952 | s,@host_vendor@,$host_vendor,;t t | |
16953 | s,@host_os@,$host_os,;t t | |
16954 | s,@target@,$target,;t t | |
16955 | s,@target_cpu@,$target_cpu,;t t | |
16956 | s,@target_vendor@,$target_vendor,;t t | |
16957 | s,@target_os@,$target_os,;t t | |
18fc9bd4 | 16958 | s,@target_noncanonical@,$target_noncanonical,;t t |
1546bb64 | 16959 | s,@build_libsubdir@,$build_libsubdir,;t t |
18fc9bd4 RG |
16960 | s,@build_subdir@,$build_subdir,;t t |
16961 | s,@host_subdir@,$host_subdir,;t t | |
16962 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 16963 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
16964 | s,@CC@,$CC,;t t |
16965 | s,@CFLAGS@,$CFLAGS,;t t | |
16966 | s,@LDFLAGS@,$LDFLAGS,;t t | |
16967 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
16968 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
16969 | s,@EXEEXT@,$EXEEXT,;t t | |
16970 | s,@OBJEXT@,$OBJEXT,;t t | |
16971 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
16972 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
16973 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 16974 | s,@EGREP@,$EGREP,;t t |
ba479fd2 | 16975 | s,@strict1_warn@,$strict1_warn,;t t |
373477bb | 16976 | s,@cxx_compat_warn@,$cxx_compat_warn,;t t |
ba479fd2 NN |
16977 | s,@warn_cflags@,$warn_cflags,;t t |
16978 | s,@WERROR@,$WERROR,;t t | |
16979 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 16980 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
16981 | s,@valgrind_path@,$valgrind_path,;t t |
16982 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
16983 | s,@valgrind_command@,$valgrind_command,;t t | |
16984 | s,@coverage_flags@,$coverage_flags,;t t | |
16985 | s,@enable_multilib@,$enable_multilib,;t t | |
486aa804 | 16986 | s,@enable_decimal_float@,$enable_decimal_float,;t t |
ba479fd2 NN |
16987 | s,@enable_shared@,$enable_shared,;t t |
16988 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
16989 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
16990 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
16991 | s,@onestep@,$onestep,;t t | |
9288b845 CD |
16992 | s,@datarootdir@,$datarootdir,;t t |
16993 | s,@docdir@,$docdir,;t t | |
16994 | s,@htmldir@,$htmldir,;t t | |
ba479fd2 NN |
16995 | s,@SET_MAKE@,$SET_MAKE,;t t |
16996 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 16997 | s,@LN_S@,$LN_S,;t t |
18fc9bd4 | 16998 | s,@LN@,$LN,;t t |
ba479fd2 NN |
16999 | s,@RANLIB@,$RANLIB,;t t |
17000 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 17001 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
17002 | s,@INSTALL@,$INSTALL,;t t |
17003 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
17004 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
17005 | s,@make_compare_target@,$make_compare_target,;t t | |
17006 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
17007 | s,@MAKEINFO@,$MAKEINFO,;t t | |
17008 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
17009 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
17010 | s,@FLEX@,$FLEX,;t t | |
17011 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
17012 | s,@NM@,$NM,;t t |
17013 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
17014 | s,@stage1_cflags@,$stage1_cflags,;t t |
17015 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
17016 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
17017 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
17018 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
17019 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 17020 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
17021 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
17022 | s,@manext@,$manext,;t t | |
17023 | s,@objext@,$objext,;t t | |
8bb915b6 | 17024 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 17025 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 17026 | s,@extra_opt_files@,$extra_opt_files,;t t |
18fc9bd4 RG |
17027 | s,@USE_NLS@,$USE_NLS,;t t |
17028 | s,@LIBINTL@,$LIBINTL,;t t | |
17029 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
17030 | s,@INCINTL@,$INCINTL,;t t | |
17031 | s,@XGETTEXT@,$XGETTEXT,;t t | |
17032 | s,@GMSGFMT@,$GMSGFMT,;t t | |
17033 | s,@POSUB@,$POSUB,;t t | |
17034 | s,@CATALOGS@,$CATALOGS,;t t | |
17035 | s,@DATADIRNAME@,$DATADIRNAME,;t t | |
17036 | s,@INSTOBJEXT@,$INSTOBJEXT,;t t | |
17037 | s,@GENCAT@,$GENCAT,;t t | |
17038 | s,@CATOBJEXT@,$CATOBJEXT,;t t | |
5395b47b | 17039 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
17040 | s,@CROSS@,$CROSS,;t t |
17041 | s,@ALL@,$ALL,;t t | |
17042 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
17043 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
17044 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
17045 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
17046 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
17047 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 17048 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
17049 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
17050 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
17051 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
17052 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
17053 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
17054 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
d739199a | 17055 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t |
ba479fd2 | 17056 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
17057 | s,@GGC@,$GGC,;t t |
17058 | s,@zlibdir@,$zlibdir,;t t | |
17059 | s,@zlibinc@,$zlibinc,;t t | |
17060 | s,@MAINT@,$MAINT,;t t | |
17061 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
17062 | s,@dollar@,$dollar,;t t | |
17063 | s,@slibdir@,$slibdir,;t t | |
17064 | s,@objdir@,$objdir,;t t | |
17065 | s,@subdirs@,$subdirs,;t t | |
17066 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
17067 | s,@all_boot_languages@,$all_boot_languages,;t t |
17068 | s,@all_compilers@,$all_compilers,;t t | |
17069 | s,@all_gtfiles@,$all_gtfiles,;t t | |
17070 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
17071 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
17072 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
17073 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
17074 | s,@all_languages@,$all_languages,;t t | |
cc11cc9b | 17075 | s,@all_selected_languages@,$all_selected_languages,;t t |
ba479fd2 NN |
17076 | s,@all_stagestuff@,$all_stagestuff,;t t |
17077 | s,@build_exeext@,$build_exeext,;t t | |
17078 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
17079 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
17080 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
17081 | s,@build_xm_defines@,$build_xm_defines,;t t | |
17082 | s,@check_languages@,$check_languages,;t t | |
17083 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
17084 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
17085 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
17086 | s,@xmake_file@,$xmake_file,;t t | |
17087 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 17088 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
17089 | s,@extra_headers_list@,$extra_headers_list,;t t |
17090 | s,@extra_objs@,$extra_objs,;t t | |
17091 | s,@extra_parts@,$extra_parts,;t t | |
17092 | s,@extra_passes@,$extra_passes,;t t | |
17093 | s,@extra_programs@,$extra_programs,;t t | |
17094 | s,@float_h_file@,$float_h_file,;t t | |
17095 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
17096 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
ba479fd2 | 17097 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
17098 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
17099 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
17100 | s,@host_xm_defines@,$host_xm_defines,;t t | |
17101 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
17102 | s,@install@,$install,;t t | |
17103 | s,@lang_opt_files@,$lang_opt_files,;t t | |
17104 | s,@lang_specs_files@,$lang_specs_files,;t t | |
17105 | s,@lang_tree_files@,$lang_tree_files,;t t | |
17106 | s,@local_prefix@,$local_prefix,;t t | |
17107 | s,@md_file@,$md_file,;t t | |
17108 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
17109 | s,@out_file@,$out_file,;t t | |
17110 | s,@out_object_file@,$out_object_file,;t t | |
17111 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
17112 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
17113 | s,@thread_file@,$thread_file,;t t |
17114 | s,@tm_file_list@,$tm_file_list,;t t | |
17115 | s,@tm_include_list@,$tm_include_list,;t t | |
17116 | s,@tm_defines@,$tm_defines,;t t | |
17117 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
17118 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
17119 | s,@xm_file_list@,$xm_file_list,;t t | |
17120 | s,@xm_include_list@,$xm_include_list,;t t | |
17121 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
17122 | s,@c_target_objs@,$c_target_objs,;t t |
17123 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
17124 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
17125 | s,@GMPLIBS@,$GMPLIBS,;t t |
17126 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
17127 | s,@LIBOBJS@,$LIBOBJS,;t t |
17128 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
17129 | /@language_hooks@/r $language_hooks | |
17130 | s,@language_hooks@,,;t t | |
17131 | CEOF | |
17132 | ||
17133 | _ACEOF | |
17134 | ||
17135 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17136 | # Split the substitutions into bite-sized pieces for seds with | |
17137 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
17138 | ac_max_sed_lines=48 | |
17139 | ac_sed_frag=1 # Number of current file. | |
17140 | ac_beg=1 # First line for current file. | |
17141 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
17142 | ac_more_lines=: | |
17143 | ac_sed_cmds= | |
17144 | while $ac_more_lines; do | |
17145 | if test $ac_beg -gt 1; then | |
17146 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17147 | else | |
17148 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17149 | fi | |
17150 | if test ! -s $tmp/subs.frag; then | |
17151 | ac_more_lines=false | |
17152 | else | |
17153 | # The purpose of the label and of the branching condition is to | |
17154 | # speed up the sed processing (if there are no `@' at all, there | |
17155 | # is no need to browse any of the substitutions). | |
17156 | # These are the two extra sed commands mentioned above. | |
17157 | (echo ':t | |
17158 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
17159 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 17160 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 17161 | else |
86da66b5 | 17162 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
17163 | fi |
17164 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
17165 | ac_beg=$ac_end | |
17166 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
17167 | fi | |
17168 | done | |
17169 | if test -z "$ac_sed_cmds"; then | |
17170 | ac_sed_cmds=cat | |
63cf211a | 17171 | fi |
ba479fd2 | 17172 | fi # test -n "$CONFIG_FILES" |
cafe096b | 17173 | |
ba479fd2 NN |
17174 | _ACEOF |
17175 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17176 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
17177 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
17178 | case $ac_file in | |
17179 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17180 | cat >$tmp/stdin |
17181 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17182 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17183 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17184 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17185 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 17186 | esac |
cafe096b | 17187 | |
ba479fd2 NN |
17188 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
17189 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17190 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17191 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17192 | X"$ac_file" : 'X\(//\)$' \| \ | |
17193 | X"$ac_file" : 'X\(/\)' \| \ | |
17194 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17195 | echo X"$ac_file" | |
17196 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17197 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17198 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17199 | /^X\(\/\).*/{ s//\1/; q; } | |
17200 | s/.*/./; q'` | |
17201 | { if $as_mkdir_p; then | |
17202 | mkdir -p "$ac_dir" | |
17203 | else | |
17204 | as_dir="$ac_dir" | |
17205 | as_dirs= | |
17206 | while test ! -d "$as_dir"; do | |
17207 | as_dirs="$as_dir $as_dirs" | |
17208 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17209 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17210 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17211 | X"$as_dir" : 'X\(//\)$' \| \ | |
17212 | X"$as_dir" : 'X\(/\)' \| \ | |
17213 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17214 | echo X"$as_dir" | |
17215 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17216 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17217 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17218 | /^X\(\/\).*/{ s//\1/; q; } | |
17219 | s/.*/./; q'` | |
17220 | done | |
17221 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17222 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17223 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17224 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 17225 | |
ba479fd2 NN |
17226 | ac_builddir=. |
17227 | ||
17228 | if test "$ac_dir" != .; then | |
17229 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17230 | # A "../" for each directory in $ac_dir_suffix. | |
17231 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17232 | else | |
17233 | ac_dir_suffix= ac_top_builddir= | |
17234 | fi | |
17235 | ||
17236 | case $srcdir in | |
17237 | .) # No --srcdir option. We are building in place. | |
17238 | ac_srcdir=. | |
17239 | if test -z "$ac_top_builddir"; then | |
17240 | ac_top_srcdir=. | |
17241 | else | |
17242 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17243 | fi ;; | |
17244 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17245 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17246 | ac_top_srcdir=$srcdir ;; | |
17247 | *) # Relative path. | |
17248 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17249 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17250 | esac | |
8ab705be KC |
17251 | |
17252 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17253 | # the directories may not exist. | |
17254 | case `pwd` in | |
17255 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17256 | *) |
8ab705be KC |
17257 | case "$ac_dir" in |
17258 | .) ac_abs_builddir=`pwd`;; | |
17259 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17260 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17261 | esac;; |
17262 | esac | |
8ab705be | 17263 | case $ac_abs_builddir in |
86da66b5 HPN |
17264 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17265 | *) | |
17266 | case ${ac_top_builddir}. in | |
8ab705be | 17267 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17268 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17269 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17270 | esac;; |
17271 | esac | |
8ab705be | 17272 | case $ac_abs_builddir in |
86da66b5 HPN |
17273 | .) ac_abs_srcdir=$ac_srcdir;; |
17274 | *) | |
17275 | case $ac_srcdir in | |
8ab705be | 17276 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17277 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17278 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17279 | esac;; |
17280 | esac | |
8ab705be | 17281 | case $ac_abs_builddir in |
86da66b5 HPN |
17282 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17283 | *) | |
17284 | case $ac_top_srcdir in | |
8ab705be | 17285 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17286 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17287 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17288 | esac;; |
17289 | esac | |
ba479fd2 NN |
17290 | |
17291 | ||
17292 | ||
ec6c7392 PB |
17293 | if test x"$ac_file" != x-; then |
17294 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
17295 | echo "$as_me: creating $ac_file" >&6;} | |
17296 | rm -f "$ac_file" | |
17297 | fi | |
ba479fd2 NN |
17298 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
17299 | # use $as_me), people would be surprised to read: | |
17300 | # /* config.h. Generated by config.status. */ | |
17301 | if test x"$ac_file" = x-; then | |
17302 | configure_input= | |
17303 | else | |
17304 | configure_input="$ac_file. " | |
17305 | fi | |
17306 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 17307 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
17308 | |
17309 | # First look for the input files in the build tree, otherwise in the | |
17310 | # src tree. | |
17311 | ac_file_inputs=`IFS=: | |
17312 | for f in $ac_file_in; do | |
17313 | case $f in | |
17314 | -) echo $tmp/stdin ;; | |
17315 | [\\/$]*) | |
86da66b5 HPN |
17316 | # Absolute (can't be DOS-style, as IFS=:) |
17317 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17318 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17319 | { (exit 1); exit 1; }; } | |
86da66b5 | 17320 | echo "$f";; |
ba479fd2 | 17321 | *) # Relative |
86da66b5 HPN |
17322 | if test -f "$f"; then |
17323 | # Build tree | |
17324 | echo "$f" | |
17325 | elif test -f "$srcdir/$f"; then | |
17326 | # Source tree | |
17327 | echo "$srcdir/$f" | |
17328 | else | |
17329 | # /dev/null tree | |
17330 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17331 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17332 | { (exit 1); exit 1; }; } | |
86da66b5 | 17333 | fi;; |
ba479fd2 NN |
17334 | esac |
17335 | done` || { (exit 1); exit 1; } | |
17336 | _ACEOF | |
17337 | cat >>$CONFIG_STATUS <<_ACEOF | |
17338 | sed "$ac_vpsub | |
17339 | $extrasub | |
17340 | _ACEOF | |
17341 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17342 | :t | |
17343 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
17344 | s,@configure_input@,$configure_input,;t t | |
17345 | s,@srcdir@,$ac_srcdir,;t t | |
17346 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
17347 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
17348 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
17349 | s,@builddir@,$ac_builddir,;t t | |
17350 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
17351 | s,@top_builddir@,$ac_top_builddir,;t t | |
17352 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
17353 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
17354 | rm -f $tmp/stdin | |
17355 | if test x"$ac_file" != x-; then | |
17356 | mv $tmp/out $ac_file | |
17357 | else | |
17358 | cat $tmp/out | |
17359 | rm -f $tmp/out | |
17360 | fi | |
17361 | ||
17362 | done | |
17363 | _ACEOF | |
17364 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 17365 | |
ba479fd2 NN |
17366 | # |
17367 | # CONFIG_HEADER section. | |
17368 | # | |
861bb6c1 JL |
17369 | |
17370 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
17371 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
17372 | # | |
17373 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
17374 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
17375 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
17376 | ac_dC=' ' |
17377 | ac_dD=',;t' | |
17378 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 17379 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 17380 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 17381 | ac_uC=' ' |
ba479fd2 NN |
17382 | ac_uD=',;t' |
17383 | ||
17384 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 17385 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
17386 | case $ac_file in |
17387 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17388 | cat >$tmp/stdin |
17389 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17390 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17391 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17392 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17393 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
17394 | esac |
17395 | ||
ba479fd2 NN |
17396 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
17397 | echo "$as_me: creating $ac_file" >&6;} | |
17398 | ||
17399 | # First look for the input files in the build tree, otherwise in the | |
17400 | # src tree. | |
17401 | ac_file_inputs=`IFS=: | |
17402 | for f in $ac_file_in; do | |
17403 | case $f in | |
17404 | -) echo $tmp/stdin ;; | |
17405 | [\\/$]*) | |
86da66b5 HPN |
17406 | # Absolute (can't be DOS-style, as IFS=:) |
17407 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17408 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17409 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17410 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17411 | echo "$f";; | |
ba479fd2 | 17412 | *) # Relative |
86da66b5 HPN |
17413 | if test -f "$f"; then |
17414 | # Build tree | |
17415 | echo "$f" | |
17416 | elif test -f "$srcdir/$f"; then | |
17417 | # Source tree | |
17418 | echo "$srcdir/$f" | |
17419 | else | |
17420 | # /dev/null tree | |
17421 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17422 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17423 | { (exit 1); exit 1; }; } | |
86da66b5 | 17424 | fi;; |
ba479fd2 NN |
17425 | esac |
17426 | done` || { (exit 1); exit 1; } | |
17427 | # Remove the trailing spaces. | |
86da66b5 | 17428 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17429 | |
17430 | _ACEOF | |
17431 | ||
17432 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17433 | # `conftest.undefs', that substitutes the proper values into | |
17434 | # config.h.in to produce config.h. The first handles `#define' | |
17435 | # templates, and the second `#undef' templates. | |
17436 | # And first: Protect against being on the right side of a sed subst in | |
17437 | # config.status. Protect against being in an unquoted here document | |
17438 | # in config.status. | |
17439 | rm -f conftest.defines conftest.undefs | |
17440 | # Using a here document instead of a string reduces the quoting nightmare. | |
17441 | # Putting comments in sed scripts is not portable. | |
17442 | # | |
17443 | # `end' is used to avoid that the second main sed command (meant for | |
17444 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17445 | # See the Autoconf documentation for `clear'. | |
17446 | cat >confdef2sed.sed <<\_ACEOF | |
17447 | s/[\\&,]/\\&/g | |
17448 | s,[\\$`],\\&,g | |
17449 | t clear | |
17450 | : clear | |
86da66b5 | 17451 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17452 | t end |
86da66b5 | 17453 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17454 | : end |
17455 | _ACEOF | |
17456 | # If some macros were called several times there might be several times | |
17457 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17458 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17459 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17460 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17461 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17462 | |
17463 | # This sed command replaces #undef with comments. This is necessary, for | |
17464 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17465 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17466 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17467 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17468 | _ACEOF |
17469 | ||
17470 | # Break up conftest.defines because some shells have a limit on the size | |
17471 | # of here documents, and old seds have small limits too (100 cmds). | |
17472 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17473 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17474 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17475 | echo ' :' >>$CONFIG_STATUS | |
17476 | rm -f conftest.tail | |
17477 | while grep . conftest.defines >/dev/null | |
17478 | do | |
17479 | # Write a limited-size here document to $tmp/defines.sed. | |
17480 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17481 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17482 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17483 | # Work around the forget-to-reset-the-flag bug. |
17484 | echo 't clr' >>$CONFIG_STATUS | |
17485 | echo ': clr' >>$CONFIG_STATUS | |
17486 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17487 | echo 'CEOF | |
17488 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17489 | rm -f $tmp/in | |
17490 | mv $tmp/out $tmp/in | |
17491 | ' >>$CONFIG_STATUS | |
17492 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17493 | rm -f conftest.defines | |
17494 | mv conftest.tail conftest.defines | |
17495 | done | |
17496 | rm -f conftest.defines | |
17497 | echo ' fi # grep' >>$CONFIG_STATUS | |
17498 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17499 | |
ba479fd2 NN |
17500 | # Break up conftest.undefs because some shells have a limit on the size |
17501 | # of here documents, and old seds have small limits too (100 cmds). | |
17502 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17503 | rm -f conftest.tail |
ba479fd2 | 17504 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17505 | do |
ba479fd2 NN |
17506 | # Write a limited-size here document to $tmp/undefs.sed. |
17507 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17508 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17509 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17510 | # Work around the forget-to-reset-the-flag bug. |
17511 | echo 't clr' >>$CONFIG_STATUS | |
17512 | echo ': clr' >>$CONFIG_STATUS | |
17513 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17514 | echo 'CEOF |
ba479fd2 NN |
17515 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17516 | rm -f $tmp/in | |
17517 | mv $tmp/out $tmp/in | |
17518 | ' >>$CONFIG_STATUS | |
17519 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17520 | rm -f conftest.undefs | |
17521 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17522 | done |
ba479fd2 NN |
17523 | rm -f conftest.undefs |
17524 | ||
17525 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17526 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17527 | # use $as_me), people would be surprised to read: | |
17528 | # /* config.h. Generated by config.status. */ | |
17529 | if test x"$ac_file" = x-; then | |
17530 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17531 | else |
ba479fd2 | 17532 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17533 | fi |
ba479fd2 NN |
17534 | cat $tmp/in >>$tmp/config.h |
17535 | rm -f $tmp/in | |
17536 | if test x"$ac_file" != x-; then | |
17537 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17538 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17539 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17540 | else | |
17541 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17542 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17543 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17544 | X"$ac_file" : 'X\(//\)$' \| \ | |
17545 | X"$ac_file" : 'X\(/\)' \| \ | |
17546 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17547 | echo X"$ac_file" | |
17548 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17549 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17550 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17551 | /^X\(\/\).*/{ s//\1/; q; } | |
17552 | s/.*/./; q'` | |
17553 | { if $as_mkdir_p; then | |
17554 | mkdir -p "$ac_dir" | |
17555 | else | |
17556 | as_dir="$ac_dir" | |
17557 | as_dirs= | |
17558 | while test ! -d "$as_dir"; do | |
17559 | as_dirs="$as_dir $as_dirs" | |
17560 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17561 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17562 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17563 | X"$as_dir" : 'X\(//\)$' \| \ | |
17564 | X"$as_dir" : 'X\(/\)' \| \ | |
17565 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17566 | echo X"$as_dir" | |
17567 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17568 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17569 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17570 | /^X\(\/\).*/{ s//\1/; q; } | |
17571 | s/.*/./; q'` | |
17572 | done | |
17573 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17574 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17575 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17576 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17577 | |
ba479fd2 NN |
17578 | rm -f $ac_file |
17579 | mv $tmp/config.h $ac_file | |
17580 | fi | |
17581 | else | |
17582 | cat $tmp/config.h | |
17583 | rm -f $tmp/config.h | |
17584 | fi | |
17585 | done | |
17586 | _ACEOF | |
17587 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17588 | |
ba479fd2 NN |
17589 | # |
17590 | # CONFIG_COMMANDS section. | |
17591 | # | |
17592 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17593 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17594 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17595 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17596 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17597 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17598 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17599 | X"$ac_dest" : 'X\(/\)' \| \ | |
17600 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17601 | echo X"$ac_dest" | |
17602 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17603 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17604 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17605 | /^X\(\/\).*/{ s//\1/; q; } | |
17606 | s/.*/./; q'` | |
86da66b5 HPN |
17607 | { if $as_mkdir_p; then |
17608 | mkdir -p "$ac_dir" | |
17609 | else | |
17610 | as_dir="$ac_dir" | |
17611 | as_dirs= | |
17612 | while test ! -d "$as_dir"; do | |
17613 | as_dirs="$as_dir $as_dirs" | |
17614 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17615 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17616 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17617 | X"$as_dir" : 'X\(//\)$' \| \ | |
17618 | X"$as_dir" : 'X\(/\)' \| \ | |
17619 | . : '\(.\)' 2>/dev/null || | |
17620 | echo X"$as_dir" | | |
17621 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17622 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17623 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17624 | /^X\(\/\).*/{ s//\1/; q; } | |
17625 | s/.*/./; q'` | |
17626 | done | |
17627 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17628 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17629 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17630 | { (exit 1); exit 1; }; }; } | |
17631 | ||
ba479fd2 NN |
17632 | ac_builddir=. |
17633 | ||
17634 | if test "$ac_dir" != .; then | |
17635 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17636 | # A "../" for each directory in $ac_dir_suffix. | |
17637 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17638 | else | |
17639 | ac_dir_suffix= ac_top_builddir= | |
17640 | fi | |
17641 | ||
17642 | case $srcdir in | |
17643 | .) # No --srcdir option. We are building in place. | |
17644 | ac_srcdir=. | |
17645 | if test -z "$ac_top_builddir"; then | |
17646 | ac_top_srcdir=. | |
17647 | else | |
17648 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17649 | fi ;; | |
17650 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17651 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17652 | ac_top_srcdir=$srcdir ;; | |
17653 | *) # Relative path. | |
17654 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17655 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17656 | esac | |
8ab705be KC |
17657 | |
17658 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17659 | # the directories may not exist. | |
17660 | case `pwd` in | |
17661 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17662 | *) |
8ab705be KC |
17663 | case "$ac_dir" in |
17664 | .) ac_abs_builddir=`pwd`;; | |
17665 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17666 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17667 | esac;; |
17668 | esac | |
8ab705be | 17669 | case $ac_abs_builddir in |
86da66b5 HPN |
17670 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17671 | *) | |
17672 | case ${ac_top_builddir}. in | |
8ab705be | 17673 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17674 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17675 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17676 | esac;; |
17677 | esac | |
8ab705be | 17678 | case $ac_abs_builddir in |
86da66b5 HPN |
17679 | .) ac_abs_srcdir=$ac_srcdir;; |
17680 | *) | |
17681 | case $ac_srcdir in | |
8ab705be | 17682 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17683 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17684 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17685 | esac;; |
17686 | esac | |
8ab705be | 17687 | case $ac_abs_builddir in |
86da66b5 HPN |
17688 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17689 | *) | |
17690 | case $ac_top_srcdir in | |
8ab705be | 17691 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17692 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17693 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17694 | esac;; |
17695 | esac | |
ba479fd2 NN |
17696 | |
17697 | ||
17698 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17699 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17700 | case $ac_dest in | |
17701 | default ) | |
f1faaabd NN |
17702 | case ${CONFIG_HEADERS} in |
17703 | *auto-host.h:config.in*) | |
17704 | echo > cstamp-h ;; | |
861bb6c1 | 17705 | esac |
2ed26f6b | 17706 | # Make sure all the subdirs exist. |
3b620440 | 17707 | for d in $subdirs doc build |
2ed26f6b | 17708 | do |
2ed26f6b | 17709 | test -d $d || mkdir $d |
2ed26f6b | 17710 | done |
93cf819d BK |
17711 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17712 | # bootstrapping and the installation procedure can still use | |
17713 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17714 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17715 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17716 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17717 | case "$LN_S" in |
17718 | *-s*) | |
17719 | for d in ${subdirs} ; do | |
1e6347d8 | 17720 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17721 | cd $d |
6a1b7268 | 17722 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17723 | do |
17724 | rm -f $t | |
35f06ae4 | 17725 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17726 | done |
17727 | cd $STARTDIR | |
35f06ae4 PB |
17728 | done |
17729 | ;; | |
17730 | esac | |
ba479fd2 NN |
17731 | ;; |
17732 | esac | |
17733 | done | |
17734 | _ACEOF | |
cafe096b | 17735 | |
ba479fd2 NN |
17736 | cat >>$CONFIG_STATUS <<\_ACEOF |
17737 | ||
17738 | { (exit 0); exit 0; } | |
17739 | _ACEOF | |
861bb6c1 | 17740 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17741 | ac_clean_files=$ac_clean_files_save |
17742 | ||
17743 | ||
17744 | # configure is writing to config.log, and then calls config.status. | |
17745 | # config.status does its own redirection, appending to config.log. | |
17746 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17747 | # by configure, so config.status won't be able to write to it; its | |
17748 | # output is simply discarded. So we exec the FD to /dev/null, | |
17749 | # effectively closing config.log, so it can be properly (re)opened and | |
17750 | # appended to by config.status. When coming back to configure, we | |
17751 | # need to make the FD available again. | |
17752 | if test "$no_create" != yes; then | |
17753 | ac_cs_success=: | |
17754 | ac_config_status_args= | |
17755 | test "$silent" = yes && | |
17756 | ac_config_status_args="$ac_config_status_args --quiet" | |
17757 | exec 5>/dev/null | |
17758 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
17759 | exec 5>>config.log | |
17760 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
17761 | # would make configure fail if this is the last instruction. | |
17762 | $ac_cs_success || { (exit 1); exit 1; } | |
17763 | fi | |
861bb6c1 | 17764 |