]>
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 | |
57255173 PB |
1529 | |
1530 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to | |
1531 | # have matching libraries, they should use host libraries: Makefile.tpl | |
1532 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
1533 | # However, they still use the build modules, because the corresponding | |
1534 | # host modules (e.g. bison) are only built for the host when bootstrap | |
1535 | # finishes. So: | |
1536 | # - build_subdir is where we find build modules, and never changes. | |
1537 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
1538 | ||
1539 | # Prefix 'build-' so this never conflicts with target_subdir. | |
18fc9bd4 | 1540 | build_subdir="build-${build_noncanonical}" |
1546bb64 PB |
1541 | |
1542 | # Check whether --with-build-libsubdir or --without-build-libsubdir was given. | |
1543 | if test "${with_build_libsubdir+set}" = set; then | |
1544 | withval="$with_build_libsubdir" | |
1545 | build_libsubdir="$withval" | |
1546 | else | |
1547 | build_libsubdir="$build_subdir" | |
1548 | fi; | |
18fc9bd4 RG |
1549 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1550 | if ( test $srcdir = . && test -d gcc ) \ | |
1551 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1552 | host_subdir="host-${host_noncanonical}" | |
1553 | else | |
1554 | host_subdir=. | |
1555 | fi | |
1556 | # No prefix. | |
1557 | target_subdir=${target_noncanonical} | |
1558 | ||
73458fb7 | 1559 | |
093e61a6 | 1560 | # Set program_transform_name |
13c22933 | 1561 | test "$program_prefix" != NONE && |
ba479fd2 | 1562 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1563 | # Use a double $ so make ignores it. |
1564 | test "$program_suffix" != NONE && | |
ba479fd2 NN |
1565 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
1566 | # Double any \ or $. echo might interpret backslashes. | |
1567 | # By default was `s,x,x', remove it if useless. | |
1568 | cat <<\_ACEOF >conftest.sed | |
1569 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1570 | _ACEOF | |
1571 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
1572 | rm conftest.sed | |
13c22933 JJ |
1573 | |
1574 | ||
34a86c2b NN |
1575 | # Check for bogus environment variables. |
1576 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1577 | # since this would lead to problems installing/building glibc. | |
1578 | # LIBRARY_PATH contains the current directory if one of the following | |
1579 | # is true: | |
1580 | # - one of the terminals (":" and ";") is the first or last sign | |
1581 | # - two terminals occur directly after each other | |
1582 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1583 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1584 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1585 | case ${LIBRARY_PATH} in |
1586 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1587 | library_path_setting="contains current directory" | |
1588 | ;; | |
1589 | *) | |
1590 | library_path_setting="ok" | |
1591 | ;; | |
1592 | esac | |
ba479fd2 NN |
1593 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1594 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1595 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1596 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1597 | *** LIBRARY_PATH shouldn't contain the current directory when |
1598 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1599 | *** and run configure again." >&5 |
1600 | echo "$as_me: error: | |
1601 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1602 | *** building gcc. Please change the environment variable | |
1603 | *** and run configure again." >&2;} | |
1604 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1605 | fi |
1606 | ||
34a86c2b NN |
1607 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1608 | # since this would lead to problems installing/building glibc. | |
1609 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1610 | # is true: | |
1611 | # - one of the terminals (":" and ";") is the first or last sign | |
1612 | # - two terminals occur directly after each other | |
1613 | # - the path contains an element with a dot in it | |
ba479fd2 NN |
1614 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1615 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1616 | case ${GCC_EXEC_PREFIX} in |
1617 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1618 | gcc_exec_prefix_setting="contains current directory" | |
1619 | ;; | |
1620 | *) | |
1621 | gcc_exec_prefix_setting="ok" | |
1622 | ;; | |
1623 | esac | |
ba479fd2 NN |
1624 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1625 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1626 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1627 | { { echo "$as_me:$LINENO: error: |
1628 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1629 | *** building gcc. Please change the environment variable | |
1630 | *** and run configure again." >&5 | |
1631 | echo "$as_me: error: | |
cafe096b EC |
1632 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1633 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1634 | *** and run configure again." >&2;} |
1635 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1636 | fi |
1637 | ||
1638 | # ----------- | |
1639 | # Directories | |
1640 | # ----------- | |
1641 | ||
1642 | # Specify the local prefix | |
1643 | local_prefix= | |
ba479fd2 | 1644 | |
34a86c2b NN |
1645 | # Check whether --with-local-prefix or --without-local-prefix was given. |
1646 | if test "${with_local_prefix+set}" = set; then | |
1647 | withval="$with_local_prefix" | |
1648 | case "${withval}" in | |
ba479fd2 NN |
1649 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1650 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1651 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1652 | no) ;; |
1653 | *) local_prefix=$with_local_prefix ;; | |
1654 | esac | |
ba479fd2 | 1655 | fi; |
34a86c2b NN |
1656 | |
1657 | # Default local prefix if it is empty | |
1658 | if test x$local_prefix = x; then | |
1659 | local_prefix=/usr/local | |
1660 | fi | |
1661 | ||
1662 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1663 | # passed in by the toplevel make and thus we'd get different behavior | |
1664 | # depending on where we built the sources. | |
1665 | gcc_gxx_include_dir= | |
1666 | # Specify the g++ header file directory | |
ba479fd2 | 1667 | |
34a86c2b NN |
1668 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
1669 | if test "${with_gxx_include_dir+set}" = set; then | |
1670 | withval="$with_gxx_include_dir" | |
1671 | case "${withval}" in | |
ba479fd2 NN |
1672 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1673 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1674 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1675 | no) ;; |
1676 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1677 | esac | |
ba479fd2 | 1678 | fi; |
34a86c2b | 1679 | |
0f57bf40 | 1680 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
1681 | if test x${gcc_gxx_include_dir} = x; then |
1682 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1683 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1684 | else | |
0f57bf40 MM |
1685 | libstdcxx_incdir='include/c++/$(version)' |
1686 | if test x$host != x$target; then | |
1687 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
1688 | fi | |
1689 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" | |
34a86c2b NN |
1690 | fi |
1691 | fi | |
1692 | ||
ba479fd2 | 1693 | |
34a86c2b NN |
1694 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
1695 | if test "${with_cpp_install_dir+set}" = set; then | |
1696 | withval="$with_cpp_install_dir" | |
1697 | if test x$withval = xyes; then | |
ba479fd2 NN |
1698 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1699 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1700 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1701 | elif test x$withval != xno; then |
1702 | cpp_install_dir=$withval | |
1703 | fi | |
ba479fd2 | 1704 | fi; |
34a86c2b | 1705 | |
51b9ff45 | 1706 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1707 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1708 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1709 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1710 | # just that. |
1711 | ||
03787dfd KC |
1712 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1713 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1714 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 KC |
1715 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
1716 | enableval="$enable_generated_files_in_srcdir" | |
03787dfd | 1717 | generated_files_in_srcdir=$enableval |
51b9ff45 | 1718 | else |
03787dfd | 1719 | generated_files_in_srcdir=no |
ba479fd2 | 1720 | fi; |
51b9ff45 | 1721 | |
03787dfd KC |
1722 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1723 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
1724 | ||
1725 | if test "$generated_files_in_srcdir" = "yes"; then | |
1726 | GENINSRC='' | |
03787dfd KC |
1727 | else |
1728 | GENINSRC='#' | |
03787dfd KC |
1729 | fi |
1730 | ||
1731 | ||
34a86c2b NN |
1732 | # ------------------- |
1733 | # Find default linker | |
1734 | # ------------------- | |
1735 | ||
1736 | # With GNU ld | |
ba479fd2 | 1737 | |
34a86c2b NN |
1738 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
1739 | if test "${with_gnu_ld+set}" = set; then | |
1740 | withval="$with_gnu_ld" | |
1741 | gnu_ld_flag="$with_gnu_ld" | |
1742 | else | |
1743 | gnu_ld_flag=no | |
ba479fd2 | 1744 | fi; |
6e3f3080 | 1745 | |
63cf211a | 1746 | # With pre-defined ld |
ba479fd2 | 1747 | |
34a86c2b NN |
1748 | # Check whether --with-ld or --without-ld was given. |
1749 | if test "${with_ld+set}" = set; then | |
1750 | withval="$with_ld" | |
1751 | DEFAULT_LINKER="$with_ld" | |
ba479fd2 | 1752 | fi; |
34a86c2b NN |
1753 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1754 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1755 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1756 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1757 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1758 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1759 | gnu_ld_flag=yes | |
1760 | fi | |
ba479fd2 NN |
1761 | |
1762 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1763 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1764 | _ACEOF |
34a86c2b NN |
1765 | |
1766 | fi | |
1767 | ||
ba479fd2 NN |
1768 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1769 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1770 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1771 | if test x"$gnu_ld_flag" = x"no"; then | |
ba479fd2 NN |
1772 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1773 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1774 | else |
ba479fd2 NN |
1775 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1776 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1777 | fi |
1778 | else | |
ba479fd2 NN |
1779 | echo "$as_me:$LINENO: result: no" >&5 |
1780 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1781 | fi |
1782 | ||
d594623a L |
1783 | # With demangler in GNU ld |
1784 | ||
1785 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. | |
1786 | if test "${with_demangler_in_ld+set}" = set; then | |
1787 | withval="$with_demangler_in_ld" | |
1788 | demangler_in_ld="$with_demangler_in_ld" | |
1789 | else | |
1790 | demangler_in_ld=no | |
1791 | fi; | |
1792 | ||
34a86c2b NN |
1793 | # ---------------------- |
1794 | # Find default assembler | |
1795 | # ---------------------- | |
1796 | ||
1797 | # With GNU as | |
ba479fd2 | 1798 | |
34a86c2b NN |
1799 | # Check whether --with-gnu-as or --without-gnu-as was given. |
1800 | if test "${with_gnu_as+set}" = set; then | |
1801 | withval="$with_gnu_as" | |
1802 | gas_flag="$with_gnu_as" | |
1803 | else | |
1804 | gas_flag=no | |
ba479fd2 | 1805 | fi; |
34a86c2b NN |
1806 | |
1807 | ||
1808 | # Check whether --with-as or --without-as was given. | |
1809 | if test "${with_as+set}" = set; then | |
1810 | withval="$with_as" | |
1811 | DEFAULT_ASSEMBLER="$with_as" | |
ba479fd2 | 1812 | fi; |
34a86c2b NN |
1813 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1814 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1815 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1816 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1817 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1818 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1819 | gas_flag=yes | |
1820 | fi | |
ba479fd2 NN |
1821 | |
1822 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1823 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1824 | _ACEOF |
34a86c2b NN |
1825 | |
1826 | fi | |
1827 | ||
ba479fd2 NN |
1828 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1829 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1830 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1831 | if test x"$gas_flag" = x"no"; then | |
ba479fd2 NN |
1832 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1833 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1834 | else |
ba479fd2 NN |
1835 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1836 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1837 | fi |
1838 | else | |
ba479fd2 NN |
1839 | echo "$as_me:$LINENO: result: no" >&5 |
1840 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1841 | fi |
1842 | ||
1843 | # --------------- | |
1844 | # Find C compiler | |
1845 | # --------------- | |
1846 | ||
426ca3ca RO |
1847 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1848 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1849 | # file, even when creating an executable, so an execution test fails. | |
1850 | # Remove possible default executable files to avoid this. | |
1851 | # | |
1852 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1853 | # Autoconf includes it. | |
1854 | rm -f a.out a.exe b.out | |
1855 | ||
34a86c2b | 1856 | # Find the native compiler |
ba479fd2 NN |
1857 | ac_ext=c |
1858 | ac_cpp='$CPP $CPPFLAGS' | |
1859 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1860 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1861 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1862 | if test -n "$ac_tool_prefix"; then | |
1863 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1864 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1865 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1866 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1867 | if test "${ac_cv_prog_CC+set}" = set; then | |
1868 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1869 | else | |
1870 | if test -n "$CC"; then | |
1871 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1872 | else | |
1873 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1874 | for as_dir in $PATH | |
1875 | do | |
1876 | IFS=$as_save_IFS | |
1877 | test -z "$as_dir" && as_dir=. | |
1878 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1879 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1880 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1881 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1882 | break 2 | |
1883 | fi | |
1884 | done | |
1885 | done | |
1886 | ||
1887 | fi | |
1888 | fi | |
1889 | CC=$ac_cv_prog_CC | |
1890 | if test -n "$CC"; then | |
1891 | echo "$as_me:$LINENO: result: $CC" >&5 | |
1892 | echo "${ECHO_T}$CC" >&6 | |
1893 | else | |
1894 | echo "$as_me:$LINENO: result: no" >&5 | |
1895 | echo "${ECHO_T}no" >&6 | |
1896 | fi | |
1897 | ||
1898 | fi | |
1899 | if test -z "$ac_cv_prog_CC"; then | |
1900 | ac_ct_CC=$CC | |
1901 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1902 | set dummy gcc; ac_word=$2 |
ba479fd2 NN |
1903 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1904 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1905 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1906 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1907 | else | |
1908 | if test -n "$ac_ct_CC"; then | |
1909 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1910 | else | |
1911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1912 | for as_dir in $PATH | |
1913 | do | |
1914 | IFS=$as_save_IFS | |
1915 | test -z "$as_dir" && as_dir=. | |
1916 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1917 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1918 | ac_cv_prog_ac_ct_CC="gcc" | |
1919 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1920 | break 2 | |
1921 | fi | |
1922 | done | |
1923 | done | |
1924 | ||
1925 | fi | |
1926 | fi | |
1927 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1928 | if test -n "$ac_ct_CC"; then | |
1929 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1930 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
1931 | else | |
1932 | echo "$as_me:$LINENO: result: no" >&5 | |
1933 | echo "${ECHO_T}no" >&6 | |
1934 | fi | |
1935 | ||
1936 | CC=$ac_ct_CC | |
1937 | else | |
1938 | CC="$ac_cv_prog_CC" | |
1939 | fi | |
1940 | ||
1941 | if test -z "$CC"; then | |
1942 | if test -n "$ac_tool_prefix"; then | |
1943 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1944 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1945 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1946 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1947 | if test "${ac_cv_prog_CC+set}" = set; then | |
1948 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1949 | else |
1950 | if test -n "$CC"; then | |
1951 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1952 | else | |
ba479fd2 NN |
1953 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1954 | for as_dir in $PATH | |
1955 | do | |
1956 | IFS=$as_save_IFS | |
1957 | test -z "$as_dir" && as_dir=. | |
1958 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1959 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1960 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1961 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1962 | break 2 | |
1963 | fi | |
1964 | done | |
1965 | done | |
1966 | ||
cd9e5e7c MK |
1967 | fi |
1968 | fi | |
ba479fd2 | 1969 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1970 | if test -n "$CC"; then |
ba479fd2 NN |
1971 | echo "$as_me:$LINENO: result: $CC" >&5 |
1972 | echo "${ECHO_T}$CC" >&6 | |
1973 | else | |
1974 | echo "$as_me:$LINENO: result: no" >&5 | |
1975 | echo "${ECHO_T}no" >&6 | |
1976 | fi | |
1977 | ||
1978 | fi | |
1979 | if test -z "$ac_cv_prog_CC"; then | |
1980 | ac_ct_CC=$CC | |
1981 | # Extract the first word of "cc", so it can be a program name with args. | |
1982 | set dummy cc; ac_word=$2 | |
1983 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1984 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1985 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1986 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1987 | else | |
1988 | if test -n "$ac_ct_CC"; then | |
1989 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1990 | else | |
1991 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1992 | for as_dir in $PATH | |
1993 | do | |
1994 | IFS=$as_save_IFS | |
1995 | test -z "$as_dir" && as_dir=. | |
1996 | for ac_exec_ext in '' $ac_executable_extensions; do | |
1997 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1998 | ac_cv_prog_ac_ct_CC="cc" | |
1999 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2000 | break 2 | |
2001 | fi | |
2002 | done | |
2003 | done | |
2004 | ||
2005 | fi | |
2006 | fi | |
2007 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2008 | if test -n "$ac_ct_CC"; then | |
2009 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2010 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2011 | else | |
2012 | echo "$as_me:$LINENO: result: no" >&5 | |
2013 | echo "${ECHO_T}no" >&6 | |
2014 | fi | |
2015 | ||
2016 | CC=$ac_ct_CC | |
cd9e5e7c | 2017 | else |
ba479fd2 | 2018 | CC="$ac_cv_prog_CC" |
e9a25f70 | 2019 | fi |
6e3f3080 | 2020 | |
ba479fd2 | 2021 | fi |
6e3f3080 NN |
2022 | if test -z "$CC"; then |
2023 | # Extract the first word of "cc", so it can be a program name with args. | |
2024 | set dummy cc; ac_word=$2 | |
ba479fd2 NN |
2025 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2026 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2027 | if test "${ac_cv_prog_CC+set}" = set; then | |
2028 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2029 | else |
2030 | if test -n "$CC"; then | |
2031 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2032 | else | |
2033 | ac_prog_rejected=no | |
ba479fd2 NN |
2034 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2035 | for as_dir in $PATH | |
2036 | do | |
2037 | IFS=$as_save_IFS | |
2038 | test -z "$as_dir" && as_dir=. | |
2039 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2040 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2041 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
2042 | ac_prog_rejected=yes | |
2043 | continue | |
2044 | fi | |
2045 | ac_cv_prog_CC="cc" | |
2046 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2047 | break 2 | |
2048 | fi | |
2049 | done | |
2050 | done | |
2051 | ||
6e3f3080 NN |
2052 | if test $ac_prog_rejected = yes; then |
2053 | # We found a bogon in the path, so make sure we never use it. | |
2054 | set dummy $ac_cv_prog_CC | |
2055 | shift | |
ba479fd2 | 2056 | if test $# != 0; then |
6e3f3080 NN |
2057 | # We chose a different compiler from the bogus one. |
2058 | # However, it has the same basename, so the bogon will be chosen | |
2059 | # first if we set CC to just the basename; use the full file name. | |
2060 | shift | |
ba479fd2 | 2061 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2062 | fi |
6e3f3080 NN |
2063 | fi |
2064 | fi | |
2065 | fi | |
ba479fd2 | 2066 | CC=$ac_cv_prog_CC |
6e3f3080 | 2067 | if test -n "$CC"; then |
ba479fd2 NN |
2068 | echo "$as_me:$LINENO: result: $CC" >&5 |
2069 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2070 | else |
ba479fd2 NN |
2071 | echo "$as_me:$LINENO: result: no" >&5 |
2072 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2073 | fi |
6e3f3080 | 2074 | |
ba479fd2 NN |
2075 | fi |
2076 | if test -z "$CC"; then | |
2077 | if test -n "$ac_tool_prefix"; then | |
2078 | for ac_prog in cl | |
2079 | do | |
2080 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2081 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2082 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2083 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2084 | if test "${ac_cv_prog_CC+set}" = set; then | |
2085 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2086 | else |
6e3f3080 NN |
2087 | if test -n "$CC"; then |
2088 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2089 | else | |
ba479fd2 NN |
2090 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2091 | for as_dir in $PATH | |
2092 | do | |
2093 | IFS=$as_save_IFS | |
2094 | test -z "$as_dir" && as_dir=. | |
2095 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2096 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2097 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2098 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2099 | break 2 | |
2100 | fi | |
2101 | done | |
2102 | done | |
2103 | ||
093e61a6 | 2104 | fi |
6e3f3080 | 2105 | fi |
ba479fd2 | 2106 | CC=$ac_cv_prog_CC |
6e3f3080 | 2107 | if test -n "$CC"; then |
ba479fd2 NN |
2108 | echo "$as_me:$LINENO: result: $CC" >&5 |
2109 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2110 | else |
ba479fd2 NN |
2111 | echo "$as_me:$LINENO: result: no" >&5 |
2112 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2113 | fi |
cafe096b | 2114 | |
ba479fd2 NN |
2115 | test -n "$CC" && break |
2116 | done | |
2117 | fi | |
2118 | if test -z "$CC"; then | |
2119 | ac_ct_CC=$CC | |
2120 | for ac_prog in cl | |
2121 | do | |
2122 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2123 | set dummy $ac_prog; ac_word=$2 | |
2124 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2125 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2126 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2127 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2128 | else | |
2129 | if test -n "$ac_ct_CC"; then | |
2130 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2131 | else | |
2132 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2133 | for as_dir in $PATH | |
2134 | do | |
2135 | IFS=$as_save_IFS | |
2136 | test -z "$as_dir" && as_dir=. | |
2137 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2138 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2139 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
2140 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2141 | break 2 | |
2142 | fi | |
2143 | done | |
2144 | done | |
6e3f3080 | 2145 | |
ba479fd2 NN |
2146 | fi |
2147 | fi | |
2148 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2149 | if test -n "$ac_ct_CC"; then | |
2150 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2151 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2152 | else | |
2153 | echo "$as_me:$LINENO: result: no" >&5 | |
2154 | echo "${ECHO_T}no" >&6 | |
2155 | fi | |
6e3f3080 | 2156 | |
ba479fd2 NN |
2157 | test -n "$ac_ct_CC" && break |
2158 | done | |
63cf211a | 2159 | |
ba479fd2 NN |
2160 | CC=$ac_ct_CC |
2161 | fi | |
2162 | ||
2163 | fi | |
2164 | ||
2165 | ||
2166 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2167 | See \`config.log' for more details." >&5 | |
2168 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2169 | See \`config.log' for more details." >&2;} | |
2170 | { (exit 1); exit 1; }; } | |
2171 | ||
2172 | # Provide some information about the compiler. | |
2173 | echo "$as_me:$LINENO:" \ | |
2174 | "checking for C compiler version" >&5 | |
2175 | ac_compiler=`set X $ac_compile; echo $2` | |
2176 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2177 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2178 | ac_status=$? | |
2179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2180 | (exit $ac_status); } | |
2181 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2182 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2183 | ac_status=$? | |
2184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2185 | (exit $ac_status); } | |
2186 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2187 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2188 | ac_status=$? | |
2189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2190 | (exit $ac_status); } | |
2191 | ||
2192 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2193 | /* confdefs.h. */ |
2194 | _ACEOF | |
2195 | cat confdefs.h >>conftest.$ac_ext | |
2196 | cat >>conftest.$ac_ext <<_ACEOF | |
2197 | /* end confdefs.h. */ | |
2198 | ||
2199 | int | |
2200 | main () | |
2201 | { | |
63cf211a | 2202 | |
ba479fd2 NN |
2203 | ; |
2204 | return 0; | |
2205 | } | |
2206 | _ACEOF | |
2207 | ac_clean_files_save=$ac_clean_files | |
2208 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2209 | # Try to create an executable without -o first, disregard a.out. | |
2210 | # It will help us diagnose broken compilers, and finding out an intuition | |
2211 | # of exeext. | |
86da66b5 HPN |
2212 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2213 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 NN |
2214 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
2215 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2216 | (eval $ac_link_default) 2>&5 | |
2217 | ac_status=$? | |
2218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2219 | (exit $ac_status); }; then | |
2220 | # Find the output, starting from the most likely. This scheme is | |
2221 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2222 | # resort. | |
2223 | ||
2224 | # Be careful to initialize this variable, since it used to be cached. | |
2225 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2226 | ac_cv_exeext= | |
2227 | # b.out is created by i960 compilers. | |
2228 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2229 | do | |
2230 | test -f "$ac_file" || continue | |
2231 | case $ac_file in | |
2232 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
86da66b5 | 2233 | ;; |
ba479fd2 | 2234 | conftest.$ac_ext ) |
86da66b5 HPN |
2235 | # This is the source file. |
2236 | ;; | |
ba479fd2 | 2237 | [ab].out ) |
86da66b5 HPN |
2238 | # We found the default executable, but exeext='' is most |
2239 | # certainly right. | |
2240 | break;; | |
ba479fd2 | 2241 | *.* ) |
86da66b5 HPN |
2242 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2243 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2244 | # but it would be cool to find out if it's true. Does anybody | |
2245 | # maintain Libtool? --akim. | |
2246 | export ac_cv_exeext | |
2247 | break;; | |
ba479fd2 | 2248 | * ) |
86da66b5 | 2249 | break;; |
ba479fd2 NN |
2250 | esac |
2251 | done | |
2252 | else | |
2253 | echo "$as_me: failed program was:" >&5 | |
2254 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2255 | ||
2256 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2257 | See \`config.log' for more details." >&5 | |
2258 | echo "$as_me: error: C compiler cannot create executables | |
2259 | See \`config.log' for more details." >&2;} | |
2260 | { (exit 77); exit 77; }; } | |
2261 | fi | |
2262 | ||
2263 | ac_exeext=$ac_cv_exeext | |
2264 | echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2265 | echo "${ECHO_T}$ac_file" >&6 | |
2266 | ||
2267 | # Check the compiler produces executables we can run. If not, either | |
2268 | # the compiler is broken, or we cross compile. | |
2269 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2270 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2271 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2272 | # If not cross compiling, check that we can run a simple program. | |
2273 | if test "$cross_compiling" != yes; then | |
2274 | if { ac_try='./$ac_file' | |
2275 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2276 | (eval $ac_try) 2>&5 | |
2277 | ac_status=$? | |
2278 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2279 | (exit $ac_status); }; }; then | |
2280 | cross_compiling=no | |
6e3f3080 | 2281 | else |
ba479fd2 NN |
2282 | if test "$cross_compiling" = maybe; then |
2283 | cross_compiling=yes | |
2284 | else | |
2285 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2286 | If you meant to cross compile, use \`--host'. | |
2287 | See \`config.log' for more details." >&5 | |
2288 | echo "$as_me: error: cannot run C compiled programs. | |
2289 | If you meant to cross compile, use \`--host'. | |
2290 | See \`config.log' for more details." >&2;} | |
2291 | { (exit 1); exit 1; }; } | |
2292 | fi | |
6e3f3080 NN |
2293 | fi |
2294 | fi | |
ba479fd2 NN |
2295 | echo "$as_me:$LINENO: result: yes" >&5 |
2296 | echo "${ECHO_T}yes" >&6 | |
2297 | ||
2298 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2299 | ac_clean_files=$ac_clean_files_save | |
2300 | # Check the compiler produces executables we can run. If not, either | |
2301 | # the compiler is broken, or we cross compile. | |
2302 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2303 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2304 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2305 | echo "${ECHO_T}$cross_compiling" >&6 | |
2306 | ||
2307 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2308 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2309 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2310 | (eval $ac_link) 2>&5 | |
2311 | ac_status=$? | |
2312 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2313 | (exit $ac_status); }; then | |
2314 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2315 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2316 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2317 | # `rm'. | |
2318 | for ac_file in conftest.exe conftest conftest.*; do | |
2319 | test -f "$ac_file" || continue | |
2320 | case $ac_file in | |
2321 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2322 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
86da66b5 HPN |
2323 | export ac_cv_exeext |
2324 | break;; | |
ba479fd2 NN |
2325 | * ) break;; |
2326 | esac | |
2327 | done | |
e9a25f70 | 2328 | else |
ba479fd2 NN |
2329 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2330 | See \`config.log' for more details." >&5 | |
2331 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2332 | See \`config.log' for more details." >&2;} | |
2333 | { (exit 1); exit 1; }; } | |
2334 | fi | |
2335 | ||
2336 | rm -f conftest$ac_cv_exeext | |
2337 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2338 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2339 | ||
2340 | rm -f conftest.$ac_ext | |
2341 | EXEEXT=$ac_cv_exeext | |
2342 | ac_exeext=$EXEEXT | |
2343 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2344 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2345 | if test "${ac_cv_objext+set}" = set; then | |
2346 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2347 | else | |
2348 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2349 | /* confdefs.h. */ |
2350 | _ACEOF | |
2351 | cat confdefs.h >>conftest.$ac_ext | |
2352 | cat >>conftest.$ac_ext <<_ACEOF | |
2353 | /* end confdefs.h. */ | |
2354 | ||
2355 | int | |
2356 | main () | |
2357 | { | |
6e3f3080 | 2358 | |
ba479fd2 NN |
2359 | ; |
2360 | return 0; | |
2361 | } | |
2362 | _ACEOF | |
2363 | rm -f conftest.o conftest.obj | |
2364 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2365 | (eval $ac_compile) 2>&5 | |
2366 | ac_status=$? | |
2367 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2368 | (exit $ac_status); }; then | |
2369 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2370 | case $ac_file in | |
2371 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2372 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2373 | break;; | |
2374 | esac | |
2375 | done | |
63cf211a | 2376 | else |
ba479fd2 NN |
2377 | echo "$as_me: failed program was:" >&5 |
2378 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2379 | ||
2380 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2381 | See \`config.log' for more details." >&5 | |
2382 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2383 | See \`config.log' for more details." >&2;} | |
2384 | { (exit 1); exit 1; }; } | |
2385 | fi | |
2386 | ||
2387 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2388 | fi | |
2389 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2390 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
2391 | OBJEXT=$ac_cv_objext | |
2392 | ac_objext=$OBJEXT | |
2393 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2394 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2395 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2396 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2397 | else | |
2398 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2399 | /* confdefs.h. */ |
2400 | _ACEOF | |
2401 | cat confdefs.h >>conftest.$ac_ext | |
2402 | cat >>conftest.$ac_ext <<_ACEOF | |
2403 | /* end confdefs.h. */ | |
2404 | ||
2405 | int | |
2406 | main () | |
2407 | { | |
2408 | #ifndef __GNUC__ | |
2409 | choke me | |
2410 | #endif | |
6e3f3080 | 2411 | |
ba479fd2 NN |
2412 | ; |
2413 | return 0; | |
2414 | } | |
2415 | _ACEOF | |
2416 | rm -f conftest.$ac_objext | |
2417 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2418 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2419 | ac_status=$? |
86da66b5 HPN |
2420 | grep -v '^ *+' conftest.er1 >conftest.err |
2421 | rm -f conftest.er1 | |
2422 | cat conftest.err >&5 | |
ba479fd2 NN |
2423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2424 | (exit $ac_status); } && | |
ec6c7392 PB |
2425 | { ac_try='test -z "$ac_c_werror_flag" |
2426 | || test ! -s conftest.err' | |
86da66b5 HPN |
2427 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2428 | (eval $ac_try) 2>&5 | |
2429 | ac_status=$? | |
2430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2431 | (exit $ac_status); }; } && | |
2432 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2433 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2434 | (eval $ac_try) 2>&5 | |
2435 | ac_status=$? | |
2436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2437 | (exit $ac_status); }; }; then | |
2438 | ac_compiler_gnu=yes | |
2439 | else | |
2440 | echo "$as_me: failed program was:" >&5 | |
2441 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2442 | ||
2443 | ac_compiler_gnu=no | |
2444 | fi | |
86da66b5 | 2445 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2446 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2447 | ||
2448 | fi | |
2449 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2450 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2451 | GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2452 | ac_test_CFLAGS=${CFLAGS+set} | |
2453 | ac_save_CFLAGS=$CFLAGS | |
2454 | CFLAGS="-g" | |
2455 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2456 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2457 | if test "${ac_cv_prog_cc_g+set}" = set; then | |
2458 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2459 | else | |
2460 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2461 | /* confdefs.h. */ |
2462 | _ACEOF | |
2463 | cat confdefs.h >>conftest.$ac_ext | |
2464 | cat >>conftest.$ac_ext <<_ACEOF | |
2465 | /* end confdefs.h. */ | |
2466 | ||
2467 | int | |
2468 | main () | |
2469 | { | |
2470 | ||
2471 | ; | |
2472 | return 0; | |
2473 | } | |
2474 | _ACEOF | |
2475 | rm -f conftest.$ac_objext | |
2476 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2477 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2478 | ac_status=$? |
86da66b5 HPN |
2479 | grep -v '^ *+' conftest.er1 >conftest.err |
2480 | rm -f conftest.er1 | |
2481 | cat conftest.err >&5 | |
ba479fd2 NN |
2482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2483 | (exit $ac_status); } && | |
ec6c7392 PB |
2484 | { ac_try='test -z "$ac_c_werror_flag" |
2485 | || test ! -s conftest.err' | |
86da66b5 HPN |
2486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2487 | (eval $ac_try) 2>&5 | |
2488 | ac_status=$? | |
2489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2490 | (exit $ac_status); }; } && | |
2491 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2492 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2493 | (eval $ac_try) 2>&5 | |
2494 | ac_status=$? | |
2495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2496 | (exit $ac_status); }; }; then | |
6e3f3080 NN |
2497 | ac_cv_prog_cc_g=yes |
2498 | else | |
ba479fd2 NN |
2499 | echo "$as_me: failed program was:" >&5 |
2500 | sed 's/^/| /' conftest.$ac_ext >&5 | |
63cf211a | 2501 | |
ba479fd2 | 2502 | ac_cv_prog_cc_g=no |
6e3f3080 | 2503 | fi |
86da66b5 | 2504 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2505 | fi |
2506 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2507 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
cd9e5e7c | 2508 | if test "$ac_test_CFLAGS" = set; then |
ba479fd2 | 2509 | CFLAGS=$ac_save_CFLAGS |
cd9e5e7c MK |
2510 | elif test $ac_cv_prog_cc_g = yes; then |
2511 | if test "$GCC" = yes; then | |
e9a25f70 JL |
2512 | CFLAGS="-g -O2" |
2513 | else | |
cd9e5e7c | 2514 | CFLAGS="-g" |
81814e35 | 2515 | fi |
3723cad9 | 2516 | else |
cd9e5e7c MK |
2517 | if test "$GCC" = yes; then |
2518 | CFLAGS="-O2" | |
2519 | else | |
2520 | CFLAGS= | |
2521 | fi | |
e9a25f70 | 2522 | fi |
ba479fd2 NN |
2523 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 |
2524 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2525 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2526 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2527 | else | |
2528 | ac_cv_prog_cc_stdc=no | |
2529 | ac_save_CC=$CC | |
2530 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2531 | /* confdefs.h. */ |
2532 | _ACEOF | |
2533 | cat confdefs.h >>conftest.$ac_ext | |
2534 | cat >>conftest.$ac_ext <<_ACEOF | |
2535 | /* end confdefs.h. */ | |
2536 | #include <stdarg.h> | |
2537 | #include <stdio.h> | |
2538 | #include <sys/types.h> | |
2539 | #include <sys/stat.h> | |
2540 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2541 | struct buf { int x; }; | |
2542 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2543 | static char *e (p, i) | |
2544 | char **p; | |
2545 | int i; | |
2546 | { | |
2547 | return p[i]; | |
2548 | } | |
2549 | static char *f (char * (*g) (char **, int), char **p, ...) | |
2550 | { | |
2551 | char *s; | |
2552 | va_list v; | |
2553 | va_start (v,p); | |
2554 | s = g (p, va_arg (v,int)); | |
2555 | va_end (v); | |
2556 | return s; | |
2557 | } | |
86da66b5 HPN |
2558 | |
2559 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2560 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2561 | These don't provoke an error unfortunately, instead are silently treated | |
2562 | as 'x'. The following induces an error, until -std1 is added to get | |
2563 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2564 | array size at least. It's necessary to write '\x00'==0 to get something | |
2565 | that's true only with -std1. */ | |
2566 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2567 | ||
ba479fd2 NN |
2568 | int test (int i, double x); |
2569 | struct s1 {int (*f) (int a);}; | |
2570 | struct s2 {int (*f) (double a);}; | |
2571 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2572 | int argc; | |
2573 | char **argv; | |
2574 | int | |
2575 | main () | |
2576 | { | |
2577 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2578 | ; | |
2579 | return 0; | |
2580 | } | |
2581 | _ACEOF | |
2582 | # Don't try gcc -ansi; that turns off useful extensions and | |
2583 | # breaks some systems' header files. | |
2584 | # AIX -qlanglvl=ansi | |
2585 | # Ultrix and OSF/1 -std1 | |
2586 | # HP-UX 10.20 and later -Ae | |
2587 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2588 | # SVR4 -Xc -D__EXTENSIONS__ | |
2589 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2590 | do | |
2591 | CC="$ac_save_CC $ac_arg" | |
2592 | rm -f conftest.$ac_objext | |
2593 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2594 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2595 | ac_status=$? |
86da66b5 HPN |
2596 | grep -v '^ *+' conftest.er1 >conftest.err |
2597 | rm -f conftest.er1 | |
2598 | cat conftest.err >&5 | |
ba479fd2 NN |
2599 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2600 | (exit $ac_status); } && | |
ec6c7392 PB |
2601 | { ac_try='test -z "$ac_c_werror_flag" |
2602 | || test ! -s conftest.err' | |
86da66b5 HPN |
2603 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2604 | (eval $ac_try) 2>&5 | |
2605 | ac_status=$? | |
2606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2607 | (exit $ac_status); }; } && | |
2608 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2609 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2610 | (eval $ac_try) 2>&5 | |
2611 | ac_status=$? | |
2612 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2613 | (exit $ac_status); }; }; then | |
2614 | ac_cv_prog_cc_stdc=$ac_arg | |
2615 | break | |
2616 | else | |
2617 | echo "$as_me: failed program was:" >&5 | |
2618 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 2619 | |
ba479fd2 | 2620 | fi |
86da66b5 | 2621 | rm -f conftest.err conftest.$ac_objext |
ba479fd2 NN |
2622 | done |
2623 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2624 | CC=$ac_save_CC | |
2625 | ||
2626 | fi | |
2627 | ||
2628 | case "x$ac_cv_prog_cc_stdc" in | |
2629 | x|xno) | |
2630 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2631 | echo "${ECHO_T}none needed" >&6 ;; | |
2632 | *) | |
2633 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2634 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2635 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2636 | esac | |
2637 | ||
2638 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2639 | # in C++ we need to declare it. In case someone uses the same compiler | |
2640 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2641 | # the declaration of exit, since it's the most demanding environment. | |
2642 | cat >conftest.$ac_ext <<_ACEOF | |
2643 | #ifndef __cplusplus | |
2644 | choke me | |
2645 | #endif | |
2646 | _ACEOF | |
2647 | rm -f conftest.$ac_objext | |
2648 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2649 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2650 | ac_status=$? |
86da66b5 HPN |
2651 | grep -v '^ *+' conftest.er1 >conftest.err |
2652 | rm -f conftest.er1 | |
2653 | cat conftest.err >&5 | |
ba479fd2 NN |
2654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2655 | (exit $ac_status); } && | |
ec6c7392 PB |
2656 | { ac_try='test -z "$ac_c_werror_flag" |
2657 | || test ! -s conftest.err' | |
86da66b5 HPN |
2658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2659 | (eval $ac_try) 2>&5 | |
2660 | ac_status=$? | |
2661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2662 | (exit $ac_status); }; } && | |
2663 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2665 | (eval $ac_try) 2>&5 | |
2666 | ac_status=$? | |
2667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2668 | (exit $ac_status); }; }; then | |
2669 | for ac_declaration in \ | |
86da66b5 | 2670 | '' \ |
ba479fd2 NN |
2671 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ |
2672 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2673 | 'extern "C" void exit (int) throw ();' \ | |
2674 | 'extern "C" void exit (int);' \ | |
2675 | 'void exit (int);' | |
2676 | do | |
2677 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2678 | /* confdefs.h. */ |
2679 | _ACEOF | |
2680 | cat confdefs.h >>conftest.$ac_ext | |
2681 | cat >>conftest.$ac_ext <<_ACEOF | |
2682 | /* end confdefs.h. */ | |
33e70558 | 2683 | $ac_declaration |
86da66b5 | 2684 | #include <stdlib.h> |
ba479fd2 NN |
2685 | int |
2686 | main () | |
2687 | { | |
2688 | exit (42); | |
2689 | ; | |
2690 | return 0; | |
2691 | } | |
2692 | _ACEOF | |
2693 | rm -f conftest.$ac_objext | |
2694 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2695 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2696 | ac_status=$? |
86da66b5 HPN |
2697 | grep -v '^ *+' conftest.er1 >conftest.err |
2698 | rm -f conftest.er1 | |
2699 | cat conftest.err >&5 | |
ba479fd2 NN |
2700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2701 | (exit $ac_status); } && | |
ec6c7392 PB |
2702 | { ac_try='test -z "$ac_c_werror_flag" |
2703 | || test ! -s conftest.err' | |
86da66b5 HPN |
2704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2705 | (eval $ac_try) 2>&5 | |
2706 | ac_status=$? | |
2707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2708 | (exit $ac_status); }; } && | |
2709 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2710 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2711 | (eval $ac_try) 2>&5 | |
2712 | ac_status=$? | |
2713 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2714 | (exit $ac_status); }; }; then | |
2715 | : | |
2716 | else | |
2717 | echo "$as_me: failed program was:" >&5 | |
2718 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2719 | ||
2720 | continue | |
2721 | fi | |
86da66b5 | 2722 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 | 2723 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2724 | /* confdefs.h. */ |
2725 | _ACEOF | |
2726 | cat confdefs.h >>conftest.$ac_ext | |
2727 | cat >>conftest.$ac_ext <<_ACEOF | |
2728 | /* end confdefs.h. */ | |
2729 | $ac_declaration | |
2730 | int | |
2731 | main () | |
2732 | { | |
2733 | exit (42); | |
2734 | ; | |
2735 | return 0; | |
2736 | } | |
2737 | _ACEOF | |
2738 | rm -f conftest.$ac_objext | |
2739 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 2740 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 2741 | ac_status=$? |
86da66b5 HPN |
2742 | grep -v '^ *+' conftest.er1 >conftest.err |
2743 | rm -f conftest.er1 | |
2744 | cat conftest.err >&5 | |
ba479fd2 NN |
2745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
2746 | (exit $ac_status); } && | |
ec6c7392 PB |
2747 | { ac_try='test -z "$ac_c_werror_flag" |
2748 | || test ! -s conftest.err' | |
86da66b5 HPN |
2749 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2750 | (eval $ac_try) 2>&5 | |
2751 | ac_status=$? | |
2752 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2753 | (exit $ac_status); }; } && | |
2754 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
2755 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2756 | (eval $ac_try) 2>&5 | |
2757 | ac_status=$? | |
2758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2759 | (exit $ac_status); }; }; then | |
2760 | break | |
3ec83fc2 | 2761 | else |
ba479fd2 NN |
2762 | echo "$as_me: failed program was:" >&5 |
2763 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2764 | ||
6e3f3080 | 2765 | fi |
86da66b5 | 2766 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2767 | done |
2768 | rm -f conftest* | |
2769 | if test -n "$ac_declaration"; then | |
2770 | echo '#ifdef __cplusplus' >>confdefs.h | |
2771 | echo $ac_declaration >>confdefs.h | |
2772 | echo '#endif' >>confdefs.h | |
2773 | fi | |
2774 | ||
3ec83fc2 | 2775 | else |
ba479fd2 NN |
2776 | echo "$as_me: failed program was:" >&5 |
2777 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2778 | ||
2779 | fi | |
86da66b5 | 2780 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2781 | ac_ext=c |
2782 | ac_cpp='$CPP $CPPFLAGS' | |
2783 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2784 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2785 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2786 | ||
2787 | if test "x$CC" != xcc; then | |
2788 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 | |
2789 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
2790 | else | |
2791 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 | |
2792 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
2793 | fi | |
2794 | set dummy $CC; ac_cc=`echo $2 | | |
2795 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2796 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then | |
2797 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2798 | else | |
2799 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2800 | /* confdefs.h. */ |
2801 | _ACEOF | |
2802 | cat confdefs.h >>conftest.$ac_ext | |
2803 | cat >>conftest.$ac_ext <<_ACEOF | |
2804 | /* end confdefs.h. */ | |
2805 | ||
2806 | int | |
2807 | main () | |
2808 | { | |
2809 | ||
2810 | ; | |
2811 | return 0; | |
2812 | } | |
2813 | _ACEOF | |
3ec83fc2 RH |
2814 | # Make sure it works both with $CC and with simple cc. |
2815 | # We do the test twice because some compilers refuse to overwrite an | |
2816 | # existing .o file with -o, though they will create one. | |
ba479fd2 NN |
2817 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2818 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2819 | (eval $ac_try) 2>&5 | |
2820 | ac_status=$? | |
2821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2822 | (exit $ac_status); } && | |
2823 | test -f conftest.$ac_objext && { (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); }; | |
3ec83fc2 RH |
2828 | then |
2829 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2830 | if test "x$CC" != xcc; then | |
2831 | # Test first that cc exists at all. | |
ba479fd2 NN |
2832 | if { ac_try='cc -c conftest.$ac_ext >&5' |
2833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2834 | (eval $ac_try) 2>&5 | |
2835 | ac_status=$? | |
2836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2837 | (exit $ac_status); }; }; then | |
2838 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' | |
2839 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2840 | (eval $ac_try) 2>&5 | |
2841 | ac_status=$? | |
2842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2843 | (exit $ac_status); } && | |
2844 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2845 | (eval $ac_try) 2>&5 | |
2846 | ac_status=$? | |
2847 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2848 | (exit $ac_status); }; | |
3ec83fc2 | 2849 | then |
86da66b5 HPN |
2850 | # cc works too. |
2851 | : | |
3ec83fc2 | 2852 | else |
86da66b5 HPN |
2853 | # cc exists but doesn't like -o. |
2854 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2855 | fi |
2856 | fi | |
2857 | fi | |
2858 | else | |
2859 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2860 | fi | |
2861 | rm -f conftest* | |
2862 | ||
2863 | fi | |
2864 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
ba479fd2 NN |
2865 | echo "$as_me:$LINENO: result: yes" >&5 |
2866 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2867 | else |
ba479fd2 NN |
2868 | echo "$as_me:$LINENO: result: no" >&5 |
2869 | echo "${ECHO_T}no" >&6 | |
2870 | ||
2871 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2872 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2873 | _ACEOF |
3ec83fc2 RH |
2874 | |
2875 | fi | |
2876 | ||
3b620440 KC |
2877 | # expand $ac_aux_dir to an absolute path |
2878 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2879 | ||
2880 | # FIXME: we rely on the cache variable name because | |
2881 | # there is no other way. | |
2882 | set dummy $CC | |
2883 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2884 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2885 | # Losing compiler, so override with the script. | |
2886 | # FIXME: It is wrong to rewrite CC. | |
2887 | # But if we don't then we get into trouble of one sort or another. | |
2888 | # A longer-term fix would be to have automake use am__CC in this case, | |
2889 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2890 | CC="$am_aux_dir/compile $CC" | |
2891 | fi | |
2892 | ||
414d23ae HPN |
2893 | # autoconf is lame and doesn't give us any substitution variable for this. |
2894 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2895 | NO_MINUS_C_MINUS_O=yes | |
2896 | else | |
2897 | OUTPUT_OPTION='-o $@' | |
2898 | fi | |
2899 | ||
2900 | ||
2901 | ||
ec6c7392 PB |
2902 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
2903 | # optimizations to be activated explicitly by the toplevel. | |
2904 | case "$CC" in | |
2905 | */prev-gcc/xgcc*) ;; | |
2906 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
2907 | esac | |
2908 | ||
2909 | ||
73458fb7 NN |
2910 | # ------------------------- |
2911 | # Check C compiler features | |
2912 | # ------------------------- | |
2913 | ||
ba479fd2 NN |
2914 | ac_ext=c |
2915 | ac_cpp='$CPP $CPPFLAGS' | |
2916 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2917 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2918 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2919 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2920 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2921 | # On Suns, sometimes $CPP names a directory. |
2922 | if test -n "$CPP" && test -d "$CPP"; then | |
2923 | CPP= | |
2924 | fi | |
2925 | if test -z "$CPP"; then | |
ba479fd2 NN |
2926 | if test "${ac_cv_prog_CPP+set}" = set; then |
2927 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2928 | else | |
2929 | # Double quotes because CPP needs to be expanded | |
2930 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2931 | do | |
2932 | ac_preproc_ok=false | |
2933 | for ac_c_preproc_warn_flag in '' yes | |
2934 | do | |
2935 | # Use a header file that comes with gcc, so configuring glibc | |
2936 | # with a fresh cross-compiler works. | |
2937 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2938 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2939 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2940 | # not just through cpp. "Syntax error" is here to catch this case. |
2941 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2942 | /* confdefs.h. */ |
2943 | _ACEOF | |
2944 | cat confdefs.h >>conftest.$ac_ext | |
2945 | cat >>conftest.$ac_ext <<_ACEOF | |
2946 | /* end confdefs.h. */ | |
2947 | #ifdef __STDC__ | |
2948 | # include <limits.h> | |
2949 | #else | |
2950 | # include <assert.h> | |
2951 | #endif | |
86da66b5 | 2952 | Syntax error |
ba479fd2 NN |
2953 | _ACEOF |
2954 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2955 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2956 | ac_status=$? | |
2957 | grep -v '^ *+' conftest.er1 >conftest.err | |
2958 | rm -f conftest.er1 | |
2959 | cat conftest.err >&5 | |
2960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2961 | (exit $ac_status); } >/dev/null; then | |
2962 | if test -s conftest.err; then | |
2963 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 2964 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
2965 | else |
2966 | ac_cpp_err= | |
2967 | fi | |
2968 | else | |
2969 | ac_cpp_err=yes | |
2970 | fi | |
2971 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2972 | : |
cafe096b | 2973 | else |
ba479fd2 NN |
2974 | echo "$as_me: failed program was:" >&5 |
2975 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2976 | ||
2977 | # Broken: fails on valid input. | |
2978 | continue | |
2979 | fi | |
2980 | rm -f conftest.err conftest.$ac_ext | |
2981 | ||
2982 | # OK, works on sane cases. Now check whether non-existent headers | |
2983 | # can be detected and how. | |
2984 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2985 | /* confdefs.h. */ |
2986 | _ACEOF | |
2987 | cat confdefs.h >>conftest.$ac_ext | |
2988 | cat >>conftest.$ac_ext <<_ACEOF | |
2989 | /* end confdefs.h. */ | |
2990 | #include <ac_nonexistent.h> | |
2991 | _ACEOF | |
2992 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2993 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2994 | ac_status=$? | |
2995 | grep -v '^ *+' conftest.er1 >conftest.err | |
2996 | rm -f conftest.er1 | |
2997 | cat conftest.err >&5 | |
2998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2999 | (exit $ac_status); } >/dev/null; then | |
3000 | if test -s conftest.err; then | |
3001 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3002 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3003 | else |
3004 | ac_cpp_err= | |
3005 | fi | |
3006 | else | |
3007 | ac_cpp_err=yes | |
3008 | fi | |
3009 | if test -z "$ac_cpp_err"; then | |
3010 | # Broken: success on invalid input. | |
3011 | continue | |
3012 | else | |
3013 | echo "$as_me: failed program was:" >&5 | |
3014 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3015 | ||
3016 | # Passes both tests. | |
3017 | ac_preproc_ok=: | |
3018 | break | |
3019 | fi | |
3020 | rm -f conftest.err conftest.$ac_ext | |
3021 | ||
3022 | done | |
3023 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3024 | rm -f conftest.err conftest.$ac_ext | |
3025 | if $ac_preproc_ok; then | |
3026 | break | |
3027 | fi | |
3028 | ||
3029 | done | |
3030 | ac_cv_prog_CPP=$CPP | |
3031 | ||
3032 | fi | |
3033 | CPP=$ac_cv_prog_CPP | |
3034 | else | |
3035 | ac_cv_prog_CPP=$CPP | |
3036 | fi | |
3037 | echo "$as_me:$LINENO: result: $CPP" >&5 | |
3038 | echo "${ECHO_T}$CPP" >&6 | |
3039 | ac_preproc_ok=false | |
3040 | for ac_c_preproc_warn_flag in '' yes | |
3041 | do | |
3042 | # Use a header file that comes with gcc, so configuring glibc | |
3043 | # with a fresh cross-compiler works. | |
3044 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3045 | # <limits.h> exists even on freestanding compilers. | |
3046 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3047 | # not just through cpp. "Syntax error" is here to catch this case. | |
3048 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3049 | /* confdefs.h. */ |
3050 | _ACEOF | |
3051 | cat confdefs.h >>conftest.$ac_ext | |
3052 | cat >>conftest.$ac_ext <<_ACEOF | |
3053 | /* end confdefs.h. */ | |
3054 | #ifdef __STDC__ | |
3055 | # include <limits.h> | |
3056 | #else | |
3057 | # include <assert.h> | |
3058 | #endif | |
86da66b5 | 3059 | Syntax error |
ba479fd2 NN |
3060 | _ACEOF |
3061 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3062 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3063 | ac_status=$? | |
3064 | grep -v '^ *+' conftest.er1 >conftest.err | |
3065 | rm -f conftest.er1 | |
3066 | cat conftest.err >&5 | |
3067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3068 | (exit $ac_status); } >/dev/null; then | |
3069 | if test -s conftest.err; then | |
3070 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3071 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3072 | else |
3073 | ac_cpp_err= | |
3074 | fi | |
3075 | else | |
3076 | ac_cpp_err=yes | |
3077 | fi | |
3078 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3079 | : |
414d23ae | 3080 | else |
ba479fd2 NN |
3081 | echo "$as_me: failed program was:" >&5 |
3082 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3083 | ||
3084 | # Broken: fails on valid input. | |
3085 | continue | |
3086 | fi | |
3087 | rm -f conftest.err conftest.$ac_ext | |
3088 | ||
3089 | # OK, works on sane cases. Now check whether non-existent headers | |
3090 | # can be detected and how. | |
3091 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3092 | /* confdefs.h. */ |
3093 | _ACEOF | |
3094 | cat confdefs.h >>conftest.$ac_ext | |
3095 | cat >>conftest.$ac_ext <<_ACEOF | |
3096 | /* end confdefs.h. */ | |
3097 | #include <ac_nonexistent.h> | |
3098 | _ACEOF | |
3099 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3100 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3101 | ac_status=$? | |
3102 | grep -v '^ *+' conftest.er1 >conftest.err | |
3103 | rm -f conftest.er1 | |
3104 | cat conftest.err >&5 | |
3105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3106 | (exit $ac_status); } >/dev/null; then | |
3107 | if test -s conftest.err; then | |
3108 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 3109 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
3110 | else |
3111 | ac_cpp_err= | |
3112 | fi | |
6e3f3080 | 3113 | else |
ba479fd2 | 3114 | ac_cpp_err=yes |
63cf211a | 3115 | fi |
ba479fd2 NN |
3116 | if test -z "$ac_cpp_err"; then |
3117 | # Broken: success on invalid input. | |
3118 | continue | |
3119 | else | |
3120 | echo "$as_me: failed program was:" >&5 | |
3121 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3122 | ||
3123 | # Passes both tests. | |
3124 | ac_preproc_ok=: | |
3125 | break | |
63cf211a | 3126 | fi |
ba479fd2 NN |
3127 | rm -f conftest.err conftest.$ac_ext |
3128 | ||
3129 | done | |
3130 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3131 | rm -f conftest.err conftest.$ac_ext | |
3132 | if $ac_preproc_ok; then | |
3133 | : | |
6e3f3080 | 3134 | else |
ba479fd2 NN |
3135 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3136 | See \`config.log' for more details." >&5 | |
3137 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3138 | See \`config.log' for more details." >&2;} | |
3139 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3140 | fi |
3141 | ||
ba479fd2 NN |
3142 | ac_ext=c |
3143 | ac_cpp='$CPP $CPPFLAGS' | |
3144 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3145 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3146 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3147 | ||
b5472e1d | 3148 | |
ba479fd2 NN |
3149 | echo "$as_me:$LINENO: checking for inline" >&5 |
3150 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
3151 | if test "${ac_cv_c_inline+set}" = set; then | |
3152 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3153 | else |
3154 | ac_cv_c_inline=no | |
3155 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3156 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3157 | /* confdefs.h. */ |
3158 | _ACEOF | |
3159 | cat confdefs.h >>conftest.$ac_ext | |
3160 | cat >>conftest.$ac_ext <<_ACEOF | |
3161 | /* end confdefs.h. */ | |
3162 | #ifndef __cplusplus | |
3163 | typedef int foo_t; | |
3164 | static $ac_kw foo_t static_foo () {return 0; } | |
3165 | $ac_kw foo_t foo () {return 0; } | |
3166 | #endif | |
414d23ae | 3167 | |
ba479fd2 NN |
3168 | _ACEOF |
3169 | rm -f conftest.$ac_objext | |
3170 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 3171 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 3172 | ac_status=$? |
86da66b5 HPN |
3173 | grep -v '^ *+' conftest.er1 >conftest.err |
3174 | rm -f conftest.er1 | |
3175 | cat conftest.err >&5 | |
ba479fd2 NN |
3176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
3177 | (exit $ac_status); } && | |
ec6c7392 PB |
3178 | { ac_try='test -z "$ac_c_werror_flag" |
3179 | || test ! -s conftest.err' | |
86da66b5 HPN |
3180 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3181 | (eval $ac_try) 2>&5 | |
3182 | ac_status=$? | |
3183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3184 | (exit $ac_status); }; } && | |
3185 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
3186 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3187 | (eval $ac_try) 2>&5 | |
3188 | ac_status=$? | |
3189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3190 | (exit $ac_status); }; }; then | |
414d23ae HPN |
3191 | ac_cv_c_inline=$ac_kw; break |
3192 | else | |
ba479fd2 NN |
3193 | echo "$as_me: failed program was:" >&5 |
3194 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3195 | ||
414d23ae | 3196 | fi |
86da66b5 | 3197 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3198 | done |
3199 | ||
3200 | fi | |
ba479fd2 NN |
3201 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3202 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3203 | |
3204 | ||
ba479fd2 | 3205 | case $ac_cv_c_inline in |
414d23ae | 3206 | inline | yes) ;; |
86da66b5 HPN |
3207 | *) |
3208 | case $ac_cv_c_inline in | |
3209 | no) ac_val=;; | |
3210 | *) ac_val=$ac_cv_c_inline;; | |
3211 | esac | |
3212 | cat >>confdefs.h <<_ACEOF | |
3213 | #ifndef __cplusplus | |
3214 | #define inline $ac_val | |
3215 | #endif | |
ba479fd2 | 3216 | _ACEOF |
86da66b5 | 3217 | ;; |
414d23ae HPN |
3218 | esac |
3219 | ||
414d23ae | 3220 | |
414d23ae | 3221 | # sizeof(char) is 1 by definition. |
bf3b7cd3 JD |
3222 | |
3223 | echo "$as_me:$LINENO: checking for egrep" >&5 | |
3224 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3225 | if test "${ac_cv_prog_egrep+set}" = set; then | |
3226 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3227 | else | |
3228 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3229 | then ac_cv_prog_egrep='grep -E' | |
3230 | else ac_cv_prog_egrep='egrep' | |
3231 | fi | |
3232 | fi | |
3233 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3234 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3235 | EGREP=$ac_cv_prog_egrep | |
3236 | ||
3237 | ||
3238 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3239 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3240 | if test "${ac_cv_header_stdc+set}" = set; then | |
3241 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3242 | else | |
3243 | cat >conftest.$ac_ext <<_ACEOF | |
3244 | /* confdefs.h. */ | |
3245 | _ACEOF | |
3246 | cat confdefs.h >>conftest.$ac_ext | |
3247 | cat >>conftest.$ac_ext <<_ACEOF | |
3248 | /* end confdefs.h. */ | |
3249 | #include <stdlib.h> | |
3250 | #include <stdarg.h> | |
3251 | #include <string.h> | |
3252 | #include <float.h> | |
3253 | ||
3254 | int | |
3255 | main () | |
3256 | { | |
3257 | ||
3258 | ; | |
3259 | return 0; | |
3260 | } | |
3261 | _ACEOF | |
3262 | rm -f conftest.$ac_objext | |
3263 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3264 | (eval $ac_compile) 2>conftest.er1 | |
3265 | ac_status=$? | |
3266 | grep -v '^ *+' conftest.er1 >conftest.err | |
3267 | rm -f conftest.er1 | |
3268 | cat conftest.err >&5 | |
3269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3270 | (exit $ac_status); } && | |
ec6c7392 PB |
3271 | { ac_try='test -z "$ac_c_werror_flag" |
3272 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3274 | (eval $ac_try) 2>&5 | |
3275 | ac_status=$? | |
3276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3277 | (exit $ac_status); }; } && | |
3278 | { ac_try='test -s conftest.$ac_objext' | |
3279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3280 | (eval $ac_try) 2>&5 | |
3281 | ac_status=$? | |
3282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3283 | (exit $ac_status); }; }; then | |
3284 | ac_cv_header_stdc=yes | |
3285 | else | |
3286 | echo "$as_me: failed program was:" >&5 | |
3287 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3288 | ||
3289 | ac_cv_header_stdc=no | |
3290 | fi | |
3291 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3292 | ||
3293 | if test $ac_cv_header_stdc = yes; then | |
3294 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3295 | cat >conftest.$ac_ext <<_ACEOF | |
3296 | /* confdefs.h. */ | |
3297 | _ACEOF | |
3298 | cat confdefs.h >>conftest.$ac_ext | |
3299 | cat >>conftest.$ac_ext <<_ACEOF | |
3300 | /* end confdefs.h. */ | |
3301 | #include <string.h> | |
3302 | ||
3303 | _ACEOF | |
3304 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3305 | $EGREP "memchr" >/dev/null 2>&1; then | |
3306 | : | |
3307 | else | |
3308 | ac_cv_header_stdc=no | |
3309 | fi | |
3310 | rm -f conftest* | |
3311 | ||
3312 | fi | |
3313 | ||
3314 | if test $ac_cv_header_stdc = yes; then | |
3315 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3316 | cat >conftest.$ac_ext <<_ACEOF | |
3317 | /* confdefs.h. */ | |
3318 | _ACEOF | |
3319 | cat confdefs.h >>conftest.$ac_ext | |
3320 | cat >>conftest.$ac_ext <<_ACEOF | |
3321 | /* end confdefs.h. */ | |
3322 | #include <stdlib.h> | |
3323 | ||
3324 | _ACEOF | |
3325 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3326 | $EGREP "free" >/dev/null 2>&1; then | |
3327 | : | |
3328 | else | |
3329 | ac_cv_header_stdc=no | |
3330 | fi | |
3331 | rm -f conftest* | |
3332 | ||
3333 | fi | |
3334 | ||
3335 | if test $ac_cv_header_stdc = yes; then | |
3336 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3337 | if test "$cross_compiling" = yes; then | |
3338 | : | |
3339 | else | |
3340 | cat >conftest.$ac_ext <<_ACEOF | |
3341 | /* confdefs.h. */ | |
3342 | _ACEOF | |
3343 | cat confdefs.h >>conftest.$ac_ext | |
3344 | cat >>conftest.$ac_ext <<_ACEOF | |
3345 | /* end confdefs.h. */ | |
3346 | #include <ctype.h> | |
3347 | #if ((' ' & 0x0FF) == 0x020) | |
3348 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3349 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3350 | #else | |
3351 | # define ISLOWER(c) \ | |
3352 | (('a' <= (c) && (c) <= 'i') \ | |
3353 | || ('j' <= (c) && (c) <= 'r') \ | |
3354 | || ('s' <= (c) && (c) <= 'z')) | |
3355 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3356 | #endif | |
3357 | ||
3358 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3359 | int | |
3360 | main () | |
3361 | { | |
3362 | int i; | |
3363 | for (i = 0; i < 256; i++) | |
3364 | if (XOR (islower (i), ISLOWER (i)) | |
3365 | || toupper (i) != TOUPPER (i)) | |
3366 | exit(2); | |
3367 | exit (0); | |
3368 | } | |
3369 | _ACEOF | |
3370 | rm -f conftest$ac_exeext | |
3371 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3372 | (eval $ac_link) 2>&5 | |
3373 | ac_status=$? | |
3374 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3375 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3377 | (eval $ac_try) 2>&5 | |
3378 | ac_status=$? | |
3379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3380 | (exit $ac_status); }; }; then | |
3381 | : | |
3382 | else | |
3383 | echo "$as_me: program exited with status $ac_status" >&5 | |
3384 | echo "$as_me: failed program was:" >&5 | |
3385 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3386 | ||
3387 | ( exit $ac_status ) | |
3388 | ac_cv_header_stdc=no | |
3389 | fi | |
3390 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3391 | fi | |
3392 | fi | |
3393 | fi | |
3394 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3395 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3396 | if test $ac_cv_header_stdc = yes; then | |
3397 | ||
3398 | cat >>confdefs.h <<\_ACEOF | |
3399 | #define STDC_HEADERS 1 | |
3400 | _ACEOF | |
3401 | ||
3402 | fi | |
3403 | ||
3404 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3405 | ||
3406 | ||
3407 | ||
3408 | ||
3409 | ||
3410 | ||
3411 | ||
3412 | ||
3413 | ||
3414 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3415 | inttypes.h stdint.h unistd.h | |
3416 | do | |
3417 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
3418 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
3419 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3420 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
3421 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3422 | else | |
3423 | cat >conftest.$ac_ext <<_ACEOF | |
3424 | /* confdefs.h. */ | |
3425 | _ACEOF | |
3426 | cat confdefs.h >>conftest.$ac_ext | |
3427 | cat >>conftest.$ac_ext <<_ACEOF | |
3428 | /* end confdefs.h. */ | |
3429 | $ac_includes_default | |
3430 | ||
3431 | #include <$ac_header> | |
3432 | _ACEOF | |
3433 | rm -f conftest.$ac_objext | |
3434 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3435 | (eval $ac_compile) 2>conftest.er1 | |
3436 | ac_status=$? | |
3437 | grep -v '^ *+' conftest.er1 >conftest.err | |
3438 | rm -f conftest.er1 | |
3439 | cat conftest.err >&5 | |
3440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3441 | (exit $ac_status); } && | |
ec6c7392 PB |
3442 | { ac_try='test -z "$ac_c_werror_flag" |
3443 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3444 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3445 | (eval $ac_try) 2>&5 | |
3446 | ac_status=$? | |
3447 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3448 | (exit $ac_status); }; } && | |
3449 | { ac_try='test -s conftest.$ac_objext' | |
3450 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3451 | (eval $ac_try) 2>&5 | |
3452 | ac_status=$? | |
3453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3454 | (exit $ac_status); }; }; then | |
3455 | eval "$as_ac_Header=yes" | |
3456 | else | |
3457 | echo "$as_me: failed program was:" >&5 | |
3458 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3459 | ||
3460 | eval "$as_ac_Header=no" | |
3461 | fi | |
3462 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3463 | fi | |
3464 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
3465 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
3466 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
3467 | cat >>confdefs.h <<_ACEOF | |
3468 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3469 | _ACEOF | |
3470 | ||
3471 | fi | |
3472 | ||
3473 | done | |
3474 | ||
3475 | ||
3476 | echo "$as_me:$LINENO: checking for void *" >&5 | |
3477 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
3478 | if test "${ac_cv_type_void_p+set}" = set; then | |
3479 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3480 | else | |
3481 | cat >conftest.$ac_ext <<_ACEOF | |
3482 | /* confdefs.h. */ | |
3483 | _ACEOF | |
3484 | cat confdefs.h >>conftest.$ac_ext | |
3485 | cat >>conftest.$ac_ext <<_ACEOF | |
3486 | /* end confdefs.h. */ | |
3487 | $ac_includes_default | |
3488 | int | |
3489 | main () | |
3490 | { | |
3491 | if ((void * *) 0) | |
3492 | return 0; | |
3493 | if (sizeof (void *)) | |
3494 | return 0; | |
3495 | ; | |
3496 | return 0; | |
3497 | } | |
3498 | _ACEOF | |
3499 | rm -f conftest.$ac_objext | |
3500 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3501 | (eval $ac_compile) 2>conftest.er1 | |
3502 | ac_status=$? | |
3503 | grep -v '^ *+' conftest.er1 >conftest.err | |
3504 | rm -f conftest.er1 | |
3505 | cat conftest.err >&5 | |
3506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3507 | (exit $ac_status); } && | |
ec6c7392 PB |
3508 | { ac_try='test -z "$ac_c_werror_flag" |
3509 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3511 | (eval $ac_try) 2>&5 | |
3512 | ac_status=$? | |
3513 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3514 | (exit $ac_status); }; } && | |
3515 | { ac_try='test -s conftest.$ac_objext' | |
3516 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3517 | (eval $ac_try) 2>&5 | |
3518 | ac_status=$? | |
3519 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3520 | (exit $ac_status); }; }; then | |
3521 | ac_cv_type_void_p=yes | |
3522 | else | |
3523 | echo "$as_me: failed program was:" >&5 | |
3524 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3525 | ||
3526 | ac_cv_type_void_p=no | |
3527 | fi | |
3528 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3529 | fi | |
3530 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 | |
3531 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
3532 | ||
ba479fd2 NN |
3533 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3534 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
3535 | if test "${ac_cv_sizeof_void_p+set}" = set; then | |
3536 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3537 | else |
bf3b7cd3 JD |
3538 | if test "$ac_cv_type_void_p" = yes; then |
3539 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3540 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3541 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3542 | # This bug is HP SR number 8606223364. | |
3543 | if test "$cross_compiling" = yes; then | |
3544 | # Depending upon the size, compute the lo and hi bounds. | |
3545 | cat >conftest.$ac_ext <<_ACEOF | |
3546 | /* confdefs.h. */ | |
3547 | _ACEOF | |
3548 | cat confdefs.h >>conftest.$ac_ext | |
3549 | cat >>conftest.$ac_ext <<_ACEOF | |
3550 | /* end confdefs.h. */ | |
3551 | $ac_includes_default | |
3552 | int | |
3553 | main () | |
3554 | { | |
3555 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; | |
3556 | test_array [0] = 0 | |
3557 | ||
3558 | ; | |
3559 | return 0; | |
3560 | } | |
3561 | _ACEOF | |
3562 | rm -f conftest.$ac_objext | |
3563 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3564 | (eval $ac_compile) 2>conftest.er1 | |
3565 | ac_status=$? | |
3566 | grep -v '^ *+' conftest.er1 >conftest.err | |
3567 | rm -f conftest.er1 | |
3568 | cat conftest.err >&5 | |
3569 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3570 | (exit $ac_status); } && | |
ec6c7392 PB |
3571 | { ac_try='test -z "$ac_c_werror_flag" |
3572 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3574 | (eval $ac_try) 2>&5 | |
3575 | ac_status=$? | |
3576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3577 | (exit $ac_status); }; } && | |
3578 | { ac_try='test -s conftest.$ac_objext' | |
3579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3580 | (eval $ac_try) 2>&5 | |
3581 | ac_status=$? | |
3582 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3583 | (exit $ac_status); }; }; then | |
3584 | ac_lo=0 ac_mid=0 | |
3585 | while :; do | |
3586 | cat >conftest.$ac_ext <<_ACEOF | |
3587 | /* confdefs.h. */ | |
3588 | _ACEOF | |
3589 | cat confdefs.h >>conftest.$ac_ext | |
3590 | cat >>conftest.$ac_ext <<_ACEOF | |
3591 | /* end confdefs.h. */ | |
3592 | $ac_includes_default | |
3593 | int | |
3594 | main () | |
3595 | { | |
3596 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3597 | test_array [0] = 0 | |
3598 | ||
3599 | ; | |
3600 | return 0; | |
3601 | } | |
3602 | _ACEOF | |
3603 | rm -f conftest.$ac_objext | |
3604 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3605 | (eval $ac_compile) 2>conftest.er1 | |
3606 | ac_status=$? | |
3607 | grep -v '^ *+' conftest.er1 >conftest.err | |
3608 | rm -f conftest.er1 | |
3609 | cat conftest.err >&5 | |
3610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3611 | (exit $ac_status); } && | |
ec6c7392 PB |
3612 | { ac_try='test -z "$ac_c_werror_flag" |
3613 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3614 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3615 | (eval $ac_try) 2>&5 | |
3616 | ac_status=$? | |
3617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3618 | (exit $ac_status); }; } && | |
3619 | { ac_try='test -s conftest.$ac_objext' | |
3620 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3621 | (eval $ac_try) 2>&5 | |
3622 | ac_status=$? | |
3623 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3624 | (exit $ac_status); }; }; then | |
3625 | ac_hi=$ac_mid; break | |
3626 | else | |
3627 | echo "$as_me: failed program was:" >&5 | |
3628 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3629 | ||
3630 | ac_lo=`expr $ac_mid + 1` | |
3631 | if test $ac_lo -le $ac_mid; then | |
3632 | ac_lo= ac_hi= | |
3633 | break | |
3634 | fi | |
3635 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
3636 | fi | |
3637 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3638 | done | |
3639 | else | |
3640 | echo "$as_me: failed program was:" >&5 | |
3641 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3642 | ||
3643 | cat >conftest.$ac_ext <<_ACEOF | |
3644 | /* confdefs.h. */ | |
3645 | _ACEOF | |
3646 | cat confdefs.h >>conftest.$ac_ext | |
3647 | cat >>conftest.$ac_ext <<_ACEOF | |
3648 | /* end confdefs.h. */ | |
3649 | $ac_includes_default | |
3650 | int | |
3651 | main () | |
3652 | { | |
3653 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; | |
3654 | test_array [0] = 0 | |
3655 | ||
3656 | ; | |
3657 | return 0; | |
3658 | } | |
3659 | _ACEOF | |
3660 | rm -f conftest.$ac_objext | |
3661 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3662 | (eval $ac_compile) 2>conftest.er1 | |
3663 | ac_status=$? | |
3664 | grep -v '^ *+' conftest.er1 >conftest.err | |
3665 | rm -f conftest.er1 | |
3666 | cat conftest.err >&5 | |
3667 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3668 | (exit $ac_status); } && | |
ec6c7392 PB |
3669 | { ac_try='test -z "$ac_c_werror_flag" |
3670 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3672 | (eval $ac_try) 2>&5 | |
3673 | ac_status=$? | |
3674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3675 | (exit $ac_status); }; } && | |
3676 | { ac_try='test -s conftest.$ac_objext' | |
3677 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3678 | (eval $ac_try) 2>&5 | |
3679 | ac_status=$? | |
3680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3681 | (exit $ac_status); }; }; then | |
3682 | ac_hi=-1 ac_mid=-1 | |
3683 | while :; do | |
3684 | cat >conftest.$ac_ext <<_ACEOF | |
3685 | /* confdefs.h. */ | |
3686 | _ACEOF | |
3687 | cat confdefs.h >>conftest.$ac_ext | |
3688 | cat >>conftest.$ac_ext <<_ACEOF | |
3689 | /* end confdefs.h. */ | |
3690 | $ac_includes_default | |
3691 | int | |
3692 | main () | |
3693 | { | |
3694 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; | |
3695 | test_array [0] = 0 | |
3696 | ||
3697 | ; | |
3698 | return 0; | |
3699 | } | |
3700 | _ACEOF | |
3701 | rm -f conftest.$ac_objext | |
3702 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3703 | (eval $ac_compile) 2>conftest.er1 | |
3704 | ac_status=$? | |
3705 | grep -v '^ *+' conftest.er1 >conftest.err | |
3706 | rm -f conftest.er1 | |
3707 | cat conftest.err >&5 | |
3708 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3709 | (exit $ac_status); } && | |
ec6c7392 PB |
3710 | { ac_try='test -z "$ac_c_werror_flag" |
3711 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3712 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3713 | (eval $ac_try) 2>&5 | |
3714 | ac_status=$? | |
3715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3716 | (exit $ac_status); }; } && | |
3717 | { ac_try='test -s conftest.$ac_objext' | |
3718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3719 | (eval $ac_try) 2>&5 | |
3720 | ac_status=$? | |
3721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3722 | (exit $ac_status); }; }; then | |
3723 | ac_lo=$ac_mid; break | |
3724 | else | |
3725 | echo "$as_me: failed program was:" >&5 | |
3726 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3727 | ||
3728 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
3729 | if test $ac_mid -le $ac_hi; then | |
3730 | ac_lo= ac_hi= | |
3731 | break | |
3732 | fi | |
3733 | ac_mid=`expr 2 '*' $ac_mid` | |
3734 | fi | |
3735 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3736 | done | |
3737 | else | |
3738 | echo "$as_me: failed program was:" >&5 | |
3739 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3740 | ||
3741 | ac_lo= ac_hi= | |
3742 | fi | |
3743 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3744 | fi | |
3745 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3746 | # Binary search between lo and hi bounds. | |
3747 | while test "x$ac_lo" != "x$ac_hi"; do | |
3748 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3749 | cat >conftest.$ac_ext <<_ACEOF | |
3750 | /* confdefs.h. */ | |
3751 | _ACEOF | |
3752 | cat confdefs.h >>conftest.$ac_ext | |
3753 | cat >>conftest.$ac_ext <<_ACEOF | |
3754 | /* end confdefs.h. */ | |
3755 | $ac_includes_default | |
3756 | int | |
3757 | main () | |
3758 | { | |
3759 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; | |
3760 | test_array [0] = 0 | |
3761 | ||
3762 | ; | |
3763 | return 0; | |
3764 | } | |
3765 | _ACEOF | |
3766 | rm -f conftest.$ac_objext | |
3767 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3768 | (eval $ac_compile) 2>conftest.er1 | |
3769 | ac_status=$? | |
3770 | grep -v '^ *+' conftest.er1 >conftest.err | |
3771 | rm -f conftest.er1 | |
3772 | cat conftest.err >&5 | |
3773 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3774 | (exit $ac_status); } && | |
ec6c7392 PB |
3775 | { ac_try='test -z "$ac_c_werror_flag" |
3776 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3777 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3778 | (eval $ac_try) 2>&5 | |
3779 | ac_status=$? | |
3780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3781 | (exit $ac_status); }; } && | |
3782 | { ac_try='test -s conftest.$ac_objext' | |
3783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3784 | (eval $ac_try) 2>&5 | |
3785 | ac_status=$? | |
3786 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3787 | (exit $ac_status); }; }; then | |
3788 | ac_hi=$ac_mid | |
3789 | else | |
3790 | echo "$as_me: failed program was:" >&5 | |
3791 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3792 | ||
3793 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
3794 | fi | |
3795 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3796 | done | |
3797 | case $ac_lo in | |
3798 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
3799 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3800 | See \`config.log' for more details." >&5 | |
3801 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3802 | See \`config.log' for more details." >&2;} | |
3803 | { (exit 1); exit 1; }; } ;; | |
3804 | esac | |
3805 | else | |
3806 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
3807 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
3808 | See \`config.log' for more details." >&5 | |
3809 | echo "$as_me: error: cannot run test program while cross compiling | |
3810 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
3811 | { (exit 1); exit 1; }; } |
3812 | else | |
3813 | cat >conftest.$ac_ext <<_ACEOF | |
3814 | /* confdefs.h. */ | |
3815 | _ACEOF | |
3816 | cat confdefs.h >>conftest.$ac_ext | |
3817 | cat >>conftest.$ac_ext <<_ACEOF | |
3818 | /* end confdefs.h. */ | |
3819 | $ac_includes_default | |
3820 | long longval () { return (long) (sizeof (void *)); } | |
3821 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
3822 | #include <stdio.h> | |
3823 | #include <stdlib.h> | |
3824 | int | |
3825 | main () | |
3826 | { | |
3827 | ||
3828 | FILE *f = fopen ("conftest.val", "w"); | |
3829 | if (! f) | |
3830 | exit (1); | |
3831 | if (((long) (sizeof (void *))) < 0) | |
3832 | { | |
3833 | long i = longval (); | |
3834 | if (i != ((long) (sizeof (void *)))) | |
3835 | exit (1); | |
3836 | fprintf (f, "%ld\n", i); | |
3837 | } | |
3838 | else | |
3839 | { | |
3840 | unsigned long i = ulongval (); | |
3841 | if (i != ((long) (sizeof (void *)))) | |
3842 | exit (1); | |
3843 | fprintf (f, "%lu\n", i); | |
3844 | } | |
3845 | exit (ferror (f) || fclose (f) != 0); | |
3846 | ||
3847 | ; | |
3848 | return 0; | |
3849 | } | |
3850 | _ACEOF | |
3851 | rm -f conftest$ac_exeext | |
3852 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3853 | (eval $ac_link) 2>&5 | |
3854 | ac_status=$? | |
3855 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3856 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3857 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3858 | (eval $ac_try) 2>&5 | |
3859 | ac_status=$? | |
3860 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3861 | (exit $ac_status); }; }; then | |
3862 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3863 | else | |
3864 | echo "$as_me: program exited with status $ac_status" >&5 | |
3865 | echo "$as_me: failed program was:" >&5 | |
3866 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3867 | ||
3868 | ( exit $ac_status ) | |
3869 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 | |
3870 | See \`config.log' for more details." >&5 | |
3871 | echo "$as_me: error: cannot compute sizeof (void *), 77 | |
3872 | See \`config.log' for more details." >&2;} | |
3873 | { (exit 1); exit 1; }; } | |
3874 | fi | |
3875 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3876 | fi | |
3877 | fi | |
3878 | rm -f conftest.val | |
3879 | else | |
3880 | ac_cv_sizeof_void_p=0 | |
3881 | fi | |
3882 | fi | |
3883 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3884 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
3885 | cat >>confdefs.h <<_ACEOF | |
3886 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3887 | _ACEOF | |
3888 | ||
3889 | ||
3890 | echo "$as_me:$LINENO: checking for short" >&5 | |
3891 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
3892 | if test "${ac_cv_type_short+set}" = set; then | |
3893 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3894 | else | |
3895 | cat >conftest.$ac_ext <<_ACEOF | |
3896 | /* confdefs.h. */ | |
3897 | _ACEOF | |
3898 | cat confdefs.h >>conftest.$ac_ext | |
3899 | cat >>conftest.$ac_ext <<_ACEOF | |
3900 | /* end confdefs.h. */ | |
3901 | $ac_includes_default | |
3902 | int | |
3903 | main () | |
3904 | { | |
3905 | if ((short *) 0) | |
3906 | return 0; | |
3907 | if (sizeof (short)) | |
3908 | return 0; | |
3909 | ; | |
3910 | return 0; | |
3911 | } | |
3912 | _ACEOF | |
3913 | rm -f conftest.$ac_objext | |
3914 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3915 | (eval $ac_compile) 2>conftest.er1 | |
3916 | ac_status=$? | |
3917 | grep -v '^ *+' conftest.er1 >conftest.err | |
3918 | rm -f conftest.er1 | |
3919 | cat conftest.err >&5 | |
3920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3921 | (exit $ac_status); } && | |
ec6c7392 PB |
3922 | { ac_try='test -z "$ac_c_werror_flag" |
3923 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3924 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3925 | (eval $ac_try) 2>&5 | |
3926 | ac_status=$? | |
3927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3928 | (exit $ac_status); }; } && | |
3929 | { ac_try='test -s conftest.$ac_objext' | |
3930 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3931 | (eval $ac_try) 2>&5 | |
3932 | ac_status=$? | |
3933 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3934 | (exit $ac_status); }; }; then | |
3935 | ac_cv_type_short=yes | |
3936 | else | |
3937 | echo "$as_me: failed program was:" >&5 | |
3938 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3939 | ||
3940 | ac_cv_type_short=no | |
3941 | fi | |
3942 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3943 | fi | |
3944 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 | |
3945 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
3946 | ||
3947 | echo "$as_me:$LINENO: checking size of short" >&5 | |
3948 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
3949 | if test "${ac_cv_sizeof_short+set}" = set; then | |
3950 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3951 | else | |
3952 | if test "$ac_cv_type_short" = yes; then | |
3953 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3954 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3955 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3956 | # This bug is HP SR number 8606223364. | |
3957 | if test "$cross_compiling" = yes; then | |
3958 | # Depending upon the size, compute the lo and hi bounds. | |
3959 | cat >conftest.$ac_ext <<_ACEOF | |
3960 | /* confdefs.h. */ | |
3961 | _ACEOF | |
3962 | cat confdefs.h >>conftest.$ac_ext | |
3963 | cat >>conftest.$ac_ext <<_ACEOF | |
3964 | /* end confdefs.h. */ | |
3965 | $ac_includes_default | |
3966 | int | |
3967 | main () | |
3968 | { | |
3969 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; | |
3970 | test_array [0] = 0 | |
3971 | ||
3972 | ; | |
3973 | return 0; | |
3974 | } | |
3975 | _ACEOF | |
3976 | rm -f conftest.$ac_objext | |
3977 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3978 | (eval $ac_compile) 2>conftest.er1 | |
3979 | ac_status=$? | |
3980 | grep -v '^ *+' conftest.er1 >conftest.err | |
3981 | rm -f conftest.er1 | |
3982 | cat conftest.err >&5 | |
3983 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3984 | (exit $ac_status); } && | |
ec6c7392 PB |
3985 | { ac_try='test -z "$ac_c_werror_flag" |
3986 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
3987 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3988 | (eval $ac_try) 2>&5 | |
3989 | ac_status=$? | |
3990 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3991 | (exit $ac_status); }; } && | |
3992 | { ac_try='test -s conftest.$ac_objext' | |
3993 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3994 | (eval $ac_try) 2>&5 | |
3995 | ac_status=$? | |
3996 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3997 | (exit $ac_status); }; }; then | |
3998 | ac_lo=0 ac_mid=0 | |
3999 | while :; do | |
4000 | cat >conftest.$ac_ext <<_ACEOF | |
4001 | /* confdefs.h. */ | |
4002 | _ACEOF | |
4003 | cat confdefs.h >>conftest.$ac_ext | |
4004 | cat >>conftest.$ac_ext <<_ACEOF | |
4005 | /* end confdefs.h. */ | |
4006 | $ac_includes_default | |
4007 | int | |
4008 | main () | |
4009 | { | |
4010 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4011 | test_array [0] = 0 | |
4012 | ||
4013 | ; | |
4014 | return 0; | |
4015 | } | |
4016 | _ACEOF | |
4017 | rm -f conftest.$ac_objext | |
4018 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4019 | (eval $ac_compile) 2>conftest.er1 | |
4020 | ac_status=$? | |
4021 | grep -v '^ *+' conftest.er1 >conftest.err | |
4022 | rm -f conftest.er1 | |
4023 | cat conftest.err >&5 | |
4024 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4025 | (exit $ac_status); } && | |
ec6c7392 PB |
4026 | { ac_try='test -z "$ac_c_werror_flag" |
4027 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4028 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4029 | (eval $ac_try) 2>&5 | |
4030 | ac_status=$? | |
4031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4032 | (exit $ac_status); }; } && | |
4033 | { ac_try='test -s conftest.$ac_objext' | |
4034 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4035 | (eval $ac_try) 2>&5 | |
4036 | ac_status=$? | |
4037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4038 | (exit $ac_status); }; }; then | |
4039 | ac_hi=$ac_mid; break | |
4040 | else | |
4041 | echo "$as_me: failed program was:" >&5 | |
4042 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4043 | ||
4044 | ac_lo=`expr $ac_mid + 1` | |
4045 | if test $ac_lo -le $ac_mid; then | |
4046 | ac_lo= ac_hi= | |
4047 | break | |
4048 | fi | |
4049 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4050 | fi | |
4051 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4052 | done | |
4053 | else | |
4054 | echo "$as_me: failed program was:" >&5 | |
4055 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4056 | ||
4057 | cat >conftest.$ac_ext <<_ACEOF | |
4058 | /* confdefs.h. */ | |
4059 | _ACEOF | |
4060 | cat confdefs.h >>conftest.$ac_ext | |
4061 | cat >>conftest.$ac_ext <<_ACEOF | |
4062 | /* end confdefs.h. */ | |
4063 | $ac_includes_default | |
4064 | int | |
4065 | main () | |
4066 | { | |
4067 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; | |
4068 | test_array [0] = 0 | |
4069 | ||
4070 | ; | |
4071 | return 0; | |
4072 | } | |
4073 | _ACEOF | |
4074 | rm -f conftest.$ac_objext | |
4075 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4076 | (eval $ac_compile) 2>conftest.er1 | |
4077 | ac_status=$? | |
4078 | grep -v '^ *+' conftest.er1 >conftest.err | |
4079 | rm -f conftest.er1 | |
4080 | cat conftest.err >&5 | |
4081 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4082 | (exit $ac_status); } && | |
ec6c7392 PB |
4083 | { ac_try='test -z "$ac_c_werror_flag" |
4084 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4085 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4086 | (eval $ac_try) 2>&5 | |
4087 | ac_status=$? | |
4088 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4089 | (exit $ac_status); }; } && | |
4090 | { ac_try='test -s conftest.$ac_objext' | |
4091 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4092 | (eval $ac_try) 2>&5 | |
4093 | ac_status=$? | |
4094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4095 | (exit $ac_status); }; }; then | |
4096 | ac_hi=-1 ac_mid=-1 | |
4097 | while :; do | |
4098 | cat >conftest.$ac_ext <<_ACEOF | |
4099 | /* confdefs.h. */ | |
4100 | _ACEOF | |
4101 | cat confdefs.h >>conftest.$ac_ext | |
4102 | cat >>conftest.$ac_ext <<_ACEOF | |
4103 | /* end confdefs.h. */ | |
4104 | $ac_includes_default | |
4105 | int | |
4106 | main () | |
4107 | { | |
4108 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; | |
4109 | test_array [0] = 0 | |
4110 | ||
4111 | ; | |
4112 | return 0; | |
4113 | } | |
4114 | _ACEOF | |
4115 | rm -f conftest.$ac_objext | |
4116 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4117 | (eval $ac_compile) 2>conftest.er1 | |
4118 | ac_status=$? | |
4119 | grep -v '^ *+' conftest.er1 >conftest.err | |
4120 | rm -f conftest.er1 | |
4121 | cat conftest.err >&5 | |
4122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4123 | (exit $ac_status); } && | |
ec6c7392 PB |
4124 | { ac_try='test -z "$ac_c_werror_flag" |
4125 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4126 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4127 | (eval $ac_try) 2>&5 | |
4128 | ac_status=$? | |
4129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4130 | (exit $ac_status); }; } && | |
4131 | { ac_try='test -s conftest.$ac_objext' | |
4132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4133 | (eval $ac_try) 2>&5 | |
4134 | ac_status=$? | |
4135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4136 | (exit $ac_status); }; }; then | |
4137 | ac_lo=$ac_mid; break | |
4138 | else | |
4139 | echo "$as_me: failed program was:" >&5 | |
4140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4141 | ||
4142 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4143 | if test $ac_mid -le $ac_hi; then | |
4144 | ac_lo= ac_hi= | |
4145 | break | |
4146 | fi | |
4147 | ac_mid=`expr 2 '*' $ac_mid` | |
4148 | fi | |
4149 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4150 | done | |
4151 | else | |
4152 | echo "$as_me: failed program was:" >&5 | |
4153 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4154 | ||
4155 | ac_lo= ac_hi= | |
4156 | fi | |
4157 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4158 | fi | |
4159 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4160 | # Binary search between lo and hi bounds. | |
4161 | while test "x$ac_lo" != "x$ac_hi"; do | |
4162 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4163 | cat >conftest.$ac_ext <<_ACEOF | |
4164 | /* confdefs.h. */ | |
4165 | _ACEOF | |
4166 | cat confdefs.h >>conftest.$ac_ext | |
4167 | cat >>conftest.$ac_ext <<_ACEOF | |
4168 | /* end confdefs.h. */ | |
4169 | $ac_includes_default | |
4170 | int | |
4171 | main () | |
4172 | { | |
4173 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; | |
4174 | test_array [0] = 0 | |
4175 | ||
4176 | ; | |
4177 | return 0; | |
4178 | } | |
4179 | _ACEOF | |
4180 | rm -f conftest.$ac_objext | |
4181 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4182 | (eval $ac_compile) 2>conftest.er1 | |
4183 | ac_status=$? | |
4184 | grep -v '^ *+' conftest.er1 >conftest.err | |
4185 | rm -f conftest.er1 | |
4186 | cat conftest.err >&5 | |
4187 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4188 | (exit $ac_status); } && | |
ec6c7392 PB |
4189 | { ac_try='test -z "$ac_c_werror_flag" |
4190 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4192 | (eval $ac_try) 2>&5 | |
4193 | ac_status=$? | |
4194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4195 | (exit $ac_status); }; } && | |
4196 | { ac_try='test -s conftest.$ac_objext' | |
4197 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4198 | (eval $ac_try) 2>&5 | |
4199 | ac_status=$? | |
4200 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4201 | (exit $ac_status); }; }; then | |
4202 | ac_hi=$ac_mid | |
4203 | else | |
4204 | echo "$as_me: failed program was:" >&5 | |
4205 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4206 | ||
4207 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4208 | fi | |
4209 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4210 | done | |
4211 | case $ac_lo in | |
4212 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
4213 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4214 | See \`config.log' for more details." >&5 | |
4215 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4216 | See \`config.log' for more details." >&2;} | |
4217 | { (exit 1); exit 1; }; } ;; | |
4218 | esac | |
4219 | else | |
4220 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4221 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4222 | See \`config.log' for more details." >&5 | |
4223 | echo "$as_me: error: cannot run test program while cross compiling | |
4224 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4225 | { (exit 1); exit 1; }; } |
4226 | else | |
4227 | cat >conftest.$ac_ext <<_ACEOF | |
4228 | /* confdefs.h. */ | |
4229 | _ACEOF | |
4230 | cat confdefs.h >>conftest.$ac_ext | |
4231 | cat >>conftest.$ac_ext <<_ACEOF | |
4232 | /* end confdefs.h. */ | |
4233 | $ac_includes_default | |
4234 | long longval () { return (long) (sizeof (short)); } | |
4235 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
4236 | #include <stdio.h> | |
4237 | #include <stdlib.h> | |
4238 | int | |
4239 | main () | |
4240 | { | |
4241 | ||
4242 | FILE *f = fopen ("conftest.val", "w"); | |
4243 | if (! f) | |
4244 | exit (1); | |
4245 | if (((long) (sizeof (short))) < 0) | |
4246 | { | |
4247 | long i = longval (); | |
4248 | if (i != ((long) (sizeof (short)))) | |
4249 | exit (1); | |
4250 | fprintf (f, "%ld\n", i); | |
4251 | } | |
4252 | else | |
4253 | { | |
4254 | unsigned long i = ulongval (); | |
4255 | if (i != ((long) (sizeof (short)))) | |
4256 | exit (1); | |
4257 | fprintf (f, "%lu\n", i); | |
4258 | } | |
4259 | exit (ferror (f) || fclose (f) != 0); | |
4260 | ||
4261 | ; | |
4262 | return 0; | |
4263 | } | |
4264 | _ACEOF | |
4265 | rm -f conftest$ac_exeext | |
4266 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4267 | (eval $ac_link) 2>&5 | |
4268 | ac_status=$? | |
4269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4270 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4271 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4272 | (eval $ac_try) 2>&5 | |
4273 | ac_status=$? | |
4274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4275 | (exit $ac_status); }; }; then | |
4276 | ac_cv_sizeof_short=`cat conftest.val` | |
4277 | else | |
4278 | echo "$as_me: program exited with status $ac_status" >&5 | |
4279 | echo "$as_me: failed program was:" >&5 | |
4280 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4281 | ||
4282 | ( exit $ac_status ) | |
4283 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 | |
4284 | See \`config.log' for more details." >&5 | |
4285 | echo "$as_me: error: cannot compute sizeof (short), 77 | |
4286 | See \`config.log' for more details." >&2;} | |
4287 | { (exit 1); exit 1; }; } | |
4288 | fi | |
4289 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4290 | fi | |
4291 | fi | |
4292 | rm -f conftest.val | |
4293 | else | |
4294 | ac_cv_sizeof_short=0 | |
4295 | fi | |
4296 | fi | |
4297 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4298 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
4299 | cat >>confdefs.h <<_ACEOF | |
4300 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4301 | _ACEOF | |
4302 | ||
4303 | ||
4304 | echo "$as_me:$LINENO: checking for int" >&5 | |
4305 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
4306 | if test "${ac_cv_type_int+set}" = set; then | |
4307 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4308 | else | |
4309 | cat >conftest.$ac_ext <<_ACEOF | |
4310 | /* confdefs.h. */ | |
4311 | _ACEOF | |
4312 | cat confdefs.h >>conftest.$ac_ext | |
4313 | cat >>conftest.$ac_ext <<_ACEOF | |
4314 | /* end confdefs.h. */ | |
4315 | $ac_includes_default | |
4316 | int | |
4317 | main () | |
4318 | { | |
4319 | if ((int *) 0) | |
4320 | return 0; | |
4321 | if (sizeof (int)) | |
4322 | return 0; | |
4323 | ; | |
4324 | return 0; | |
4325 | } | |
4326 | _ACEOF | |
4327 | rm -f conftest.$ac_objext | |
4328 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4329 | (eval $ac_compile) 2>conftest.er1 | |
4330 | ac_status=$? | |
4331 | grep -v '^ *+' conftest.er1 >conftest.err | |
4332 | rm -f conftest.er1 | |
4333 | cat conftest.err >&5 | |
4334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4335 | (exit $ac_status); } && | |
ec6c7392 PB |
4336 | { ac_try='test -z "$ac_c_werror_flag" |
4337 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4339 | (eval $ac_try) 2>&5 | |
4340 | ac_status=$? | |
4341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4342 | (exit $ac_status); }; } && | |
4343 | { ac_try='test -s conftest.$ac_objext' | |
4344 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4345 | (eval $ac_try) 2>&5 | |
4346 | ac_status=$? | |
4347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4348 | (exit $ac_status); }; }; then | |
4349 | ac_cv_type_int=yes | |
4350 | else | |
4351 | echo "$as_me: failed program was:" >&5 | |
4352 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4353 | ||
4354 | ac_cv_type_int=no | |
4355 | fi | |
4356 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4357 | fi | |
4358 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 | |
4359 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
4360 | ||
4361 | echo "$as_me:$LINENO: checking size of int" >&5 | |
4362 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
4363 | if test "${ac_cv_sizeof_int+set}" = set; then | |
4364 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4365 | else | |
4366 | if test "$ac_cv_type_int" = yes; then | |
4367 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4368 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4369 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4370 | # This bug is HP SR number 8606223364. | |
4371 | if test "$cross_compiling" = yes; then | |
4372 | # Depending upon the size, compute the lo and hi bounds. | |
4373 | cat >conftest.$ac_ext <<_ACEOF | |
4374 | /* confdefs.h. */ | |
4375 | _ACEOF | |
4376 | cat confdefs.h >>conftest.$ac_ext | |
4377 | cat >>conftest.$ac_ext <<_ACEOF | |
4378 | /* end confdefs.h. */ | |
4379 | $ac_includes_default | |
4380 | int | |
4381 | main () | |
4382 | { | |
4383 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; | |
4384 | test_array [0] = 0 | |
4385 | ||
4386 | ; | |
4387 | return 0; | |
4388 | } | |
4389 | _ACEOF | |
4390 | rm -f conftest.$ac_objext | |
4391 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4392 | (eval $ac_compile) 2>conftest.er1 | |
4393 | ac_status=$? | |
4394 | grep -v '^ *+' conftest.er1 >conftest.err | |
4395 | rm -f conftest.er1 | |
4396 | cat conftest.err >&5 | |
4397 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4398 | (exit $ac_status); } && | |
ec6c7392 PB |
4399 | { ac_try='test -z "$ac_c_werror_flag" |
4400 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4402 | (eval $ac_try) 2>&5 | |
4403 | ac_status=$? | |
4404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4405 | (exit $ac_status); }; } && | |
4406 | { ac_try='test -s conftest.$ac_objext' | |
4407 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4408 | (eval $ac_try) 2>&5 | |
4409 | ac_status=$? | |
4410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4411 | (exit $ac_status); }; }; then | |
4412 | ac_lo=0 ac_mid=0 | |
4413 | while :; do | |
4414 | cat >conftest.$ac_ext <<_ACEOF | |
4415 | /* confdefs.h. */ | |
4416 | _ACEOF | |
4417 | cat confdefs.h >>conftest.$ac_ext | |
4418 | cat >>conftest.$ac_ext <<_ACEOF | |
4419 | /* end confdefs.h. */ | |
4420 | $ac_includes_default | |
4421 | int | |
4422 | main () | |
4423 | { | |
4424 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4425 | test_array [0] = 0 | |
4426 | ||
4427 | ; | |
4428 | return 0; | |
4429 | } | |
4430 | _ACEOF | |
4431 | rm -f conftest.$ac_objext | |
4432 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4433 | (eval $ac_compile) 2>conftest.er1 | |
4434 | ac_status=$? | |
4435 | grep -v '^ *+' conftest.er1 >conftest.err | |
4436 | rm -f conftest.er1 | |
4437 | cat conftest.err >&5 | |
4438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4439 | (exit $ac_status); } && | |
ec6c7392 PB |
4440 | { ac_try='test -z "$ac_c_werror_flag" |
4441 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4443 | (eval $ac_try) 2>&5 | |
4444 | ac_status=$? | |
4445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4446 | (exit $ac_status); }; } && | |
4447 | { ac_try='test -s conftest.$ac_objext' | |
4448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4449 | (eval $ac_try) 2>&5 | |
4450 | ac_status=$? | |
4451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4452 | (exit $ac_status); }; }; then | |
4453 | ac_hi=$ac_mid; break | |
4454 | else | |
4455 | echo "$as_me: failed program was:" >&5 | |
4456 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4457 | ||
4458 | ac_lo=`expr $ac_mid + 1` | |
4459 | if test $ac_lo -le $ac_mid; then | |
4460 | ac_lo= ac_hi= | |
4461 | break | |
4462 | fi | |
4463 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4464 | fi | |
4465 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4466 | done | |
4467 | else | |
4468 | echo "$as_me: failed program was:" >&5 | |
4469 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4470 | ||
4471 | cat >conftest.$ac_ext <<_ACEOF | |
4472 | /* confdefs.h. */ | |
4473 | _ACEOF | |
4474 | cat confdefs.h >>conftest.$ac_ext | |
4475 | cat >>conftest.$ac_ext <<_ACEOF | |
4476 | /* end confdefs.h. */ | |
4477 | $ac_includes_default | |
4478 | int | |
4479 | main () | |
4480 | { | |
4481 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; | |
4482 | test_array [0] = 0 | |
4483 | ||
4484 | ; | |
4485 | return 0; | |
4486 | } | |
4487 | _ACEOF | |
4488 | rm -f conftest.$ac_objext | |
4489 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4490 | (eval $ac_compile) 2>conftest.er1 | |
4491 | ac_status=$? | |
4492 | grep -v '^ *+' conftest.er1 >conftest.err | |
4493 | rm -f conftest.er1 | |
4494 | cat conftest.err >&5 | |
4495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4496 | (exit $ac_status); } && | |
ec6c7392 PB |
4497 | { ac_try='test -z "$ac_c_werror_flag" |
4498 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4499 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4500 | (eval $ac_try) 2>&5 | |
4501 | ac_status=$? | |
4502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4503 | (exit $ac_status); }; } && | |
4504 | { ac_try='test -s conftest.$ac_objext' | |
4505 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4506 | (eval $ac_try) 2>&5 | |
4507 | ac_status=$? | |
4508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4509 | (exit $ac_status); }; }; then | |
4510 | ac_hi=-1 ac_mid=-1 | |
4511 | while :; do | |
4512 | cat >conftest.$ac_ext <<_ACEOF | |
4513 | /* confdefs.h. */ | |
4514 | _ACEOF | |
4515 | cat confdefs.h >>conftest.$ac_ext | |
4516 | cat >>conftest.$ac_ext <<_ACEOF | |
4517 | /* end confdefs.h. */ | |
4518 | $ac_includes_default | |
4519 | int | |
4520 | main () | |
4521 | { | |
4522 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; | |
4523 | test_array [0] = 0 | |
4524 | ||
4525 | ; | |
4526 | return 0; | |
4527 | } | |
4528 | _ACEOF | |
4529 | rm -f conftest.$ac_objext | |
4530 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4531 | (eval $ac_compile) 2>conftest.er1 | |
4532 | ac_status=$? | |
4533 | grep -v '^ *+' conftest.er1 >conftest.err | |
4534 | rm -f conftest.er1 | |
4535 | cat conftest.err >&5 | |
4536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4537 | (exit $ac_status); } && | |
ec6c7392 PB |
4538 | { ac_try='test -z "$ac_c_werror_flag" |
4539 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4540 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4541 | (eval $ac_try) 2>&5 | |
4542 | ac_status=$? | |
4543 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4544 | (exit $ac_status); }; } && | |
4545 | { ac_try='test -s conftest.$ac_objext' | |
4546 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4547 | (eval $ac_try) 2>&5 | |
4548 | ac_status=$? | |
4549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4550 | (exit $ac_status); }; }; then | |
4551 | ac_lo=$ac_mid; break | |
4552 | else | |
4553 | echo "$as_me: failed program was:" >&5 | |
4554 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4555 | ||
4556 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4557 | if test $ac_mid -le $ac_hi; then | |
4558 | ac_lo= ac_hi= | |
4559 | break | |
4560 | fi | |
4561 | ac_mid=`expr 2 '*' $ac_mid` | |
4562 | fi | |
4563 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4564 | done | |
4565 | else | |
4566 | echo "$as_me: failed program was:" >&5 | |
4567 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4568 | ||
4569 | ac_lo= ac_hi= | |
4570 | fi | |
4571 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4572 | fi | |
4573 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4574 | # Binary search between lo and hi bounds. | |
4575 | while test "x$ac_lo" != "x$ac_hi"; do | |
4576 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4577 | cat >conftest.$ac_ext <<_ACEOF | |
4578 | /* confdefs.h. */ | |
4579 | _ACEOF | |
4580 | cat confdefs.h >>conftest.$ac_ext | |
4581 | cat >>conftest.$ac_ext <<_ACEOF | |
4582 | /* end confdefs.h. */ | |
4583 | $ac_includes_default | |
4584 | int | |
4585 | main () | |
4586 | { | |
4587 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; | |
4588 | test_array [0] = 0 | |
4589 | ||
4590 | ; | |
4591 | return 0; | |
4592 | } | |
4593 | _ACEOF | |
4594 | rm -f conftest.$ac_objext | |
4595 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4596 | (eval $ac_compile) 2>conftest.er1 | |
4597 | ac_status=$? | |
4598 | grep -v '^ *+' conftest.er1 >conftest.err | |
4599 | rm -f conftest.er1 | |
4600 | cat conftest.err >&5 | |
4601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4602 | (exit $ac_status); } && | |
ec6c7392 PB |
4603 | { ac_try='test -z "$ac_c_werror_flag" |
4604 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4605 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4606 | (eval $ac_try) 2>&5 | |
4607 | ac_status=$? | |
4608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4609 | (exit $ac_status); }; } && | |
4610 | { ac_try='test -s conftest.$ac_objext' | |
4611 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4612 | (eval $ac_try) 2>&5 | |
4613 | ac_status=$? | |
4614 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4615 | (exit $ac_status); }; }; then | |
4616 | ac_hi=$ac_mid | |
4617 | else | |
4618 | echo "$as_me: failed program was:" >&5 | |
4619 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4620 | ||
4621 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
4622 | fi | |
4623 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4624 | done | |
4625 | case $ac_lo in | |
4626 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
4627 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4628 | See \`config.log' for more details." >&5 | |
4629 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4630 | See \`config.log' for more details." >&2;} | |
4631 | { (exit 1); exit 1; }; } ;; | |
4632 | esac | |
4633 | else | |
4634 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
4635 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
4636 | See \`config.log' for more details." >&5 | |
4637 | echo "$as_me: error: cannot run test program while cross compiling | |
4638 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
4639 | { (exit 1); exit 1; }; } |
4640 | else | |
4641 | cat >conftest.$ac_ext <<_ACEOF | |
4642 | /* confdefs.h. */ | |
4643 | _ACEOF | |
4644 | cat confdefs.h >>conftest.$ac_ext | |
4645 | cat >>conftest.$ac_ext <<_ACEOF | |
4646 | /* end confdefs.h. */ | |
4647 | $ac_includes_default | |
4648 | long longval () { return (long) (sizeof (int)); } | |
4649 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
4650 | #include <stdio.h> | |
4651 | #include <stdlib.h> | |
4652 | int | |
4653 | main () | |
4654 | { | |
4655 | ||
4656 | FILE *f = fopen ("conftest.val", "w"); | |
4657 | if (! f) | |
4658 | exit (1); | |
4659 | if (((long) (sizeof (int))) < 0) | |
4660 | { | |
4661 | long i = longval (); | |
4662 | if (i != ((long) (sizeof (int)))) | |
4663 | exit (1); | |
4664 | fprintf (f, "%ld\n", i); | |
4665 | } | |
4666 | else | |
4667 | { | |
4668 | unsigned long i = ulongval (); | |
4669 | if (i != ((long) (sizeof (int)))) | |
4670 | exit (1); | |
4671 | fprintf (f, "%lu\n", i); | |
4672 | } | |
4673 | exit (ferror (f) || fclose (f) != 0); | |
4674 | ||
4675 | ; | |
4676 | return 0; | |
4677 | } | |
4678 | _ACEOF | |
4679 | rm -f conftest$ac_exeext | |
4680 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4681 | (eval $ac_link) 2>&5 | |
4682 | ac_status=$? | |
4683 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4684 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
4685 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4686 | (eval $ac_try) 2>&5 | |
4687 | ac_status=$? | |
4688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4689 | (exit $ac_status); }; }; then | |
4690 | ac_cv_sizeof_int=`cat conftest.val` | |
4691 | else | |
4692 | echo "$as_me: program exited with status $ac_status" >&5 | |
4693 | echo "$as_me: failed program was:" >&5 | |
4694 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4695 | ||
4696 | ( exit $ac_status ) | |
4697 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 | |
4698 | See \`config.log' for more details." >&5 | |
4699 | echo "$as_me: error: cannot compute sizeof (int), 77 | |
4700 | See \`config.log' for more details." >&2;} | |
4701 | { (exit 1); exit 1; }; } | |
4702 | fi | |
4703 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
4704 | fi | |
4705 | fi | |
4706 | rm -f conftest.val | |
4707 | else | |
4708 | ac_cv_sizeof_int=0 | |
4709 | fi | |
4710 | fi | |
4711 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4712 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
4713 | cat >>confdefs.h <<_ACEOF | |
4714 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4715 | _ACEOF | |
4716 | ||
4717 | ||
4718 | echo "$as_me:$LINENO: checking for long" >&5 | |
4719 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
4720 | if test "${ac_cv_type_long+set}" = set; then | |
4721 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4722 | else | |
4723 | cat >conftest.$ac_ext <<_ACEOF | |
4724 | /* confdefs.h. */ | |
4725 | _ACEOF | |
4726 | cat confdefs.h >>conftest.$ac_ext | |
4727 | cat >>conftest.$ac_ext <<_ACEOF | |
4728 | /* end confdefs.h. */ | |
4729 | $ac_includes_default | |
4730 | int | |
4731 | main () | |
4732 | { | |
4733 | if ((long *) 0) | |
4734 | return 0; | |
4735 | if (sizeof (long)) | |
4736 | return 0; | |
4737 | ; | |
4738 | return 0; | |
4739 | } | |
4740 | _ACEOF | |
4741 | rm -f conftest.$ac_objext | |
4742 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4743 | (eval $ac_compile) 2>conftest.er1 | |
4744 | ac_status=$? | |
4745 | grep -v '^ *+' conftest.er1 >conftest.err | |
4746 | rm -f conftest.er1 | |
4747 | cat conftest.err >&5 | |
4748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4749 | (exit $ac_status); } && | |
ec6c7392 PB |
4750 | { ac_try='test -z "$ac_c_werror_flag" |
4751 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4752 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4753 | (eval $ac_try) 2>&5 | |
4754 | ac_status=$? | |
4755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4756 | (exit $ac_status); }; } && | |
4757 | { ac_try='test -s conftest.$ac_objext' | |
4758 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4759 | (eval $ac_try) 2>&5 | |
4760 | ac_status=$? | |
4761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4762 | (exit $ac_status); }; }; then | |
4763 | ac_cv_type_long=yes | |
4764 | else | |
4765 | echo "$as_me: failed program was:" >&5 | |
4766 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4767 | ||
4768 | ac_cv_type_long=no | |
4769 | fi | |
4770 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4771 | fi | |
4772 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 | |
4773 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
4774 | ||
4775 | echo "$as_me:$LINENO: checking size of long" >&5 | |
4776 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
4777 | if test "${ac_cv_sizeof_long+set}" = set; then | |
4778 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4779 | else | |
4780 | if test "$ac_cv_type_long" = yes; then | |
4781 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4782 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4783 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4784 | # This bug is HP SR number 8606223364. | |
4785 | if test "$cross_compiling" = yes; then | |
4786 | # Depending upon the size, compute the lo and hi bounds. | |
4787 | cat >conftest.$ac_ext <<_ACEOF | |
4788 | /* confdefs.h. */ | |
4789 | _ACEOF | |
4790 | cat confdefs.h >>conftest.$ac_ext | |
4791 | cat >>conftest.$ac_ext <<_ACEOF | |
4792 | /* end confdefs.h. */ | |
4793 | $ac_includes_default | |
4794 | int | |
4795 | main () | |
4796 | { | |
4797 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; | |
4798 | test_array [0] = 0 | |
4799 | ||
4800 | ; | |
4801 | return 0; | |
4802 | } | |
4803 | _ACEOF | |
4804 | rm -f conftest.$ac_objext | |
4805 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4806 | (eval $ac_compile) 2>conftest.er1 | |
4807 | ac_status=$? | |
4808 | grep -v '^ *+' conftest.er1 >conftest.err | |
4809 | rm -f conftest.er1 | |
4810 | cat conftest.err >&5 | |
4811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4812 | (exit $ac_status); } && | |
ec6c7392 PB |
4813 | { ac_try='test -z "$ac_c_werror_flag" |
4814 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4815 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4816 | (eval $ac_try) 2>&5 | |
4817 | ac_status=$? | |
4818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4819 | (exit $ac_status); }; } && | |
4820 | { ac_try='test -s conftest.$ac_objext' | |
4821 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4822 | (eval $ac_try) 2>&5 | |
4823 | ac_status=$? | |
4824 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4825 | (exit $ac_status); }; }; then | |
4826 | ac_lo=0 ac_mid=0 | |
4827 | while :; do | |
4828 | cat >conftest.$ac_ext <<_ACEOF | |
4829 | /* confdefs.h. */ | |
4830 | _ACEOF | |
4831 | cat confdefs.h >>conftest.$ac_ext | |
4832 | cat >>conftest.$ac_ext <<_ACEOF | |
4833 | /* end confdefs.h. */ | |
4834 | $ac_includes_default | |
4835 | int | |
4836 | main () | |
4837 | { | |
4838 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
4839 | test_array [0] = 0 | |
4840 | ||
4841 | ; | |
4842 | return 0; | |
4843 | } | |
4844 | _ACEOF | |
4845 | rm -f conftest.$ac_objext | |
4846 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4847 | (eval $ac_compile) 2>conftest.er1 | |
4848 | ac_status=$? | |
4849 | grep -v '^ *+' conftest.er1 >conftest.err | |
4850 | rm -f conftest.er1 | |
4851 | cat conftest.err >&5 | |
4852 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4853 | (exit $ac_status); } && | |
ec6c7392 PB |
4854 | { ac_try='test -z "$ac_c_werror_flag" |
4855 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4856 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4857 | (eval $ac_try) 2>&5 | |
4858 | ac_status=$? | |
4859 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4860 | (exit $ac_status); }; } && | |
4861 | { ac_try='test -s conftest.$ac_objext' | |
4862 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4863 | (eval $ac_try) 2>&5 | |
4864 | ac_status=$? | |
4865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4866 | (exit $ac_status); }; }; then | |
4867 | ac_hi=$ac_mid; break | |
4868 | else | |
4869 | echo "$as_me: failed program was:" >&5 | |
4870 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4871 | ||
4872 | ac_lo=`expr $ac_mid + 1` | |
4873 | if test $ac_lo -le $ac_mid; then | |
4874 | ac_lo= ac_hi= | |
4875 | break | |
4876 | fi | |
4877 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
4878 | fi | |
4879 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4880 | done | |
4881 | else | |
4882 | echo "$as_me: failed program was:" >&5 | |
4883 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4884 | ||
4885 | cat >conftest.$ac_ext <<_ACEOF | |
4886 | /* confdefs.h. */ | |
4887 | _ACEOF | |
4888 | cat confdefs.h >>conftest.$ac_ext | |
4889 | cat >>conftest.$ac_ext <<_ACEOF | |
4890 | /* end confdefs.h. */ | |
4891 | $ac_includes_default | |
4892 | int | |
4893 | main () | |
4894 | { | |
4895 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; | |
4896 | test_array [0] = 0 | |
4897 | ||
4898 | ; | |
4899 | return 0; | |
4900 | } | |
4901 | _ACEOF | |
4902 | rm -f conftest.$ac_objext | |
4903 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4904 | (eval $ac_compile) 2>conftest.er1 | |
4905 | ac_status=$? | |
4906 | grep -v '^ *+' conftest.er1 >conftest.err | |
4907 | rm -f conftest.er1 | |
4908 | cat conftest.err >&5 | |
4909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4910 | (exit $ac_status); } && | |
ec6c7392 PB |
4911 | { ac_try='test -z "$ac_c_werror_flag" |
4912 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4914 | (eval $ac_try) 2>&5 | |
4915 | ac_status=$? | |
4916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4917 | (exit $ac_status); }; } && | |
4918 | { ac_try='test -s conftest.$ac_objext' | |
4919 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4920 | (eval $ac_try) 2>&5 | |
4921 | ac_status=$? | |
4922 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4923 | (exit $ac_status); }; }; then | |
4924 | ac_hi=-1 ac_mid=-1 | |
4925 | while :; do | |
4926 | cat >conftest.$ac_ext <<_ACEOF | |
4927 | /* confdefs.h. */ | |
4928 | _ACEOF | |
4929 | cat confdefs.h >>conftest.$ac_ext | |
4930 | cat >>conftest.$ac_ext <<_ACEOF | |
4931 | /* end confdefs.h. */ | |
4932 | $ac_includes_default | |
4933 | int | |
4934 | main () | |
4935 | { | |
4936 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; | |
4937 | test_array [0] = 0 | |
4938 | ||
4939 | ; | |
4940 | return 0; | |
4941 | } | |
4942 | _ACEOF | |
4943 | rm -f conftest.$ac_objext | |
4944 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4945 | (eval $ac_compile) 2>conftest.er1 | |
4946 | ac_status=$? | |
4947 | grep -v '^ *+' conftest.er1 >conftest.err | |
4948 | rm -f conftest.er1 | |
4949 | cat conftest.err >&5 | |
4950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4951 | (exit $ac_status); } && | |
ec6c7392 PB |
4952 | { ac_try='test -z "$ac_c_werror_flag" |
4953 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
4954 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4955 | (eval $ac_try) 2>&5 | |
4956 | ac_status=$? | |
4957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4958 | (exit $ac_status); }; } && | |
4959 | { ac_try='test -s conftest.$ac_objext' | |
4960 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4961 | (eval $ac_try) 2>&5 | |
4962 | ac_status=$? | |
4963 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4964 | (exit $ac_status); }; }; then | |
4965 | ac_lo=$ac_mid; break | |
4966 | else | |
4967 | echo "$as_me: failed program was:" >&5 | |
4968 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4969 | ||
4970 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
4971 | if test $ac_mid -le $ac_hi; then | |
4972 | ac_lo= ac_hi= | |
4973 | break | |
4974 | fi | |
4975 | ac_mid=`expr 2 '*' $ac_mid` | |
4976 | fi | |
4977 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4978 | done | |
4979 | else | |
4980 | echo "$as_me: failed program was:" >&5 | |
4981 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4982 | ||
4983 | ac_lo= ac_hi= | |
4984 | fi | |
4985 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4986 | fi | |
4987 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4988 | # Binary search between lo and hi bounds. | |
4989 | while test "x$ac_lo" != "x$ac_hi"; do | |
4990 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4991 | cat >conftest.$ac_ext <<_ACEOF | |
4992 | /* confdefs.h. */ | |
4993 | _ACEOF | |
4994 | cat confdefs.h >>conftest.$ac_ext | |
4995 | cat >>conftest.$ac_ext <<_ACEOF | |
4996 | /* end confdefs.h. */ | |
4997 | $ac_includes_default | |
4998 | int | |
4999 | main () | |
5000 | { | |
5001 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; | |
5002 | test_array [0] = 0 | |
5003 | ||
5004 | ; | |
5005 | return 0; | |
5006 | } | |
5007 | _ACEOF | |
5008 | rm -f conftest.$ac_objext | |
5009 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5010 | (eval $ac_compile) 2>conftest.er1 | |
5011 | ac_status=$? | |
5012 | grep -v '^ *+' conftest.er1 >conftest.err | |
5013 | rm -f conftest.er1 | |
5014 | cat conftest.err >&5 | |
5015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5016 | (exit $ac_status); } && | |
ec6c7392 PB |
5017 | { ac_try='test -z "$ac_c_werror_flag" |
5018 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5019 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5020 | (eval $ac_try) 2>&5 | |
5021 | ac_status=$? | |
5022 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5023 | (exit $ac_status); }; } && | |
5024 | { ac_try='test -s conftest.$ac_objext' | |
5025 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5026 | (eval $ac_try) 2>&5 | |
5027 | ac_status=$? | |
5028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5029 | (exit $ac_status); }; }; then | |
5030 | ac_hi=$ac_mid | |
5031 | else | |
5032 | echo "$as_me: failed program was:" >&5 | |
5033 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5034 | ||
5035 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5036 | fi | |
5037 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5038 | done | |
5039 | case $ac_lo in | |
5040 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
5041 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5042 | See \`config.log' for more details." >&5 | |
5043 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5044 | See \`config.log' for more details." >&2;} | |
5045 | { (exit 1); exit 1; }; } ;; | |
5046 | esac | |
5047 | else | |
5048 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5049 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5050 | See \`config.log' for more details." >&5 | |
5051 | echo "$as_me: error: cannot run test program while cross compiling | |
5052 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5053 | { (exit 1); exit 1; }; } |
5054 | else | |
5055 | cat >conftest.$ac_ext <<_ACEOF | |
5056 | /* confdefs.h. */ | |
5057 | _ACEOF | |
5058 | cat confdefs.h >>conftest.$ac_ext | |
5059 | cat >>conftest.$ac_ext <<_ACEOF | |
5060 | /* end confdefs.h. */ | |
5061 | $ac_includes_default | |
5062 | long longval () { return (long) (sizeof (long)); } | |
5063 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
5064 | #include <stdio.h> | |
5065 | #include <stdlib.h> | |
5066 | int | |
5067 | main () | |
5068 | { | |
5069 | ||
5070 | FILE *f = fopen ("conftest.val", "w"); | |
5071 | if (! f) | |
5072 | exit (1); | |
5073 | if (((long) (sizeof (long))) < 0) | |
5074 | { | |
5075 | long i = longval (); | |
5076 | if (i != ((long) (sizeof (long)))) | |
5077 | exit (1); | |
5078 | fprintf (f, "%ld\n", i); | |
5079 | } | |
5080 | else | |
5081 | { | |
5082 | unsigned long i = ulongval (); | |
5083 | if (i != ((long) (sizeof (long)))) | |
5084 | exit (1); | |
5085 | fprintf (f, "%lu\n", i); | |
5086 | } | |
5087 | exit (ferror (f) || fclose (f) != 0); | |
5088 | ||
5089 | ; | |
5090 | return 0; | |
5091 | } | |
5092 | _ACEOF | |
5093 | rm -f conftest$ac_exeext | |
5094 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5095 | (eval $ac_link) 2>&5 | |
5096 | ac_status=$? | |
5097 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5098 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5099 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5100 | (eval $ac_try) 2>&5 | |
5101 | ac_status=$? | |
5102 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5103 | (exit $ac_status); }; }; then | |
5104 | ac_cv_sizeof_long=`cat conftest.val` | |
5105 | else | |
5106 | echo "$as_me: program exited with status $ac_status" >&5 | |
5107 | echo "$as_me: failed program was:" >&5 | |
5108 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5109 | ||
5110 | ( exit $ac_status ) | |
5111 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 | |
5112 | See \`config.log' for more details." >&5 | |
5113 | echo "$as_me: error: cannot compute sizeof (long), 77 | |
5114 | See \`config.log' for more details." >&2;} | |
5115 | { (exit 1); exit 1; }; } | |
5116 | fi | |
5117 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5118 | fi | |
5119 | fi | |
5120 | rm -f conftest.val | |
5121 | else | |
5122 | ac_cv_sizeof_long=0 | |
5123 | fi | |
5124 | fi | |
5125 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5126 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
5127 | cat >>confdefs.h <<_ACEOF | |
5128 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5129 | _ACEOF | |
5130 | ||
5131 | ||
5ec1c5e6 KC |
5132 | echo "$as_me:$LINENO: checking for long long" >&5 |
5133 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5134 | if test "${ac_cv_type_long_long+set}" = set; then | |
5135 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5136 | else | |
5137 | cat >conftest.$ac_ext <<_ACEOF | |
5138 | /* confdefs.h. */ | |
5139 | _ACEOF | |
5140 | cat confdefs.h >>conftest.$ac_ext | |
5141 | cat >>conftest.$ac_ext <<_ACEOF | |
5142 | /* end confdefs.h. */ | |
5143 | $ac_includes_default | |
5144 | int | |
5145 | main () | |
5146 | { | |
5147 | if ((long long *) 0) | |
5148 | return 0; | |
5149 | if (sizeof (long long)) | |
5150 | return 0; | |
5151 | ; | |
5152 | return 0; | |
5153 | } | |
5154 | _ACEOF | |
5155 | rm -f conftest.$ac_objext | |
5156 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5157 | (eval $ac_compile) 2>conftest.er1 | |
5158 | ac_status=$? | |
5159 | grep -v '^ *+' conftest.er1 >conftest.err | |
5160 | rm -f conftest.er1 | |
5161 | cat conftest.err >&5 | |
5162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5163 | (exit $ac_status); } && | |
ec6c7392 PB |
5164 | { ac_try='test -z "$ac_c_werror_flag" |
5165 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5167 | (eval $ac_try) 2>&5 | |
5168 | ac_status=$? | |
5169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5170 | (exit $ac_status); }; } && | |
5171 | { ac_try='test -s conftest.$ac_objext' | |
5172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5173 | (eval $ac_try) 2>&5 | |
5174 | ac_status=$? | |
5175 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5176 | (exit $ac_status); }; }; then | |
5177 | ac_cv_type_long_long=yes | |
5178 | else | |
5179 | echo "$as_me: failed program was:" >&5 | |
5180 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5181 | ||
5182 | ac_cv_type_long_long=no | |
5183 | fi | |
5184 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5185 | fi | |
5186 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5187 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5188 | if test $ac_cv_type_long_long = yes; then | |
5189 | ||
5190 | cat >>confdefs.h <<_ACEOF | |
5191 | #define HAVE_LONG_LONG 1 | |
5192 | _ACEOF | |
5193 | ||
5194 | echo "$as_me:$LINENO: checking for long long" >&5 | |
bf3b7cd3 JD |
5195 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 |
5196 | if test "${ac_cv_type_long_long+set}" = set; then | |
5197 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5198 | else | |
5199 | cat >conftest.$ac_ext <<_ACEOF | |
5200 | /* confdefs.h. */ | |
5201 | _ACEOF | |
5202 | cat confdefs.h >>conftest.$ac_ext | |
5203 | cat >>conftest.$ac_ext <<_ACEOF | |
5204 | /* end confdefs.h. */ | |
5205 | $ac_includes_default | |
5206 | int | |
5207 | main () | |
5208 | { | |
5209 | if ((long long *) 0) | |
5210 | return 0; | |
5211 | if (sizeof (long long)) | |
5212 | return 0; | |
5213 | ; | |
5214 | return 0; | |
5215 | } | |
5216 | _ACEOF | |
5217 | rm -f conftest.$ac_objext | |
5218 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5219 | (eval $ac_compile) 2>conftest.er1 | |
5220 | ac_status=$? | |
5221 | grep -v '^ *+' conftest.er1 >conftest.err | |
5222 | rm -f conftest.er1 | |
5223 | cat conftest.err >&5 | |
5224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5225 | (exit $ac_status); } && | |
ec6c7392 PB |
5226 | { ac_try='test -z "$ac_c_werror_flag" |
5227 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5228 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5229 | (eval $ac_try) 2>&5 | |
5230 | ac_status=$? | |
5231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5232 | (exit $ac_status); }; } && | |
5233 | { ac_try='test -s conftest.$ac_objext' | |
5234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5235 | (eval $ac_try) 2>&5 | |
5236 | ac_status=$? | |
5237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5238 | (exit $ac_status); }; }; then | |
5239 | ac_cv_type_long_long=yes | |
5240 | else | |
5241 | echo "$as_me: failed program was:" >&5 | |
5242 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5243 | ||
5244 | ac_cv_type_long_long=no | |
5245 | fi | |
5246 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5247 | fi | |
5248 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 | |
5249 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5250 | ||
5251 | echo "$as_me:$LINENO: checking size of long long" >&5 | |
5252 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
5253 | if test "${ac_cv_sizeof_long_long+set}" = set; then | |
5254 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5255 | else | |
5256 | if test "$ac_cv_type_long_long" = yes; then | |
5257 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5258 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5259 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5260 | # This bug is HP SR number 8606223364. | |
5261 | if test "$cross_compiling" = yes; then | |
5262 | # Depending upon the size, compute the lo and hi bounds. | |
5263 | cat >conftest.$ac_ext <<_ACEOF | |
5264 | /* confdefs.h. */ | |
5265 | _ACEOF | |
5266 | cat confdefs.h >>conftest.$ac_ext | |
5267 | cat >>conftest.$ac_ext <<_ACEOF | |
5268 | /* end confdefs.h. */ | |
5269 | $ac_includes_default | |
5270 | int | |
5271 | main () | |
5272 | { | |
5273 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; | |
5274 | test_array [0] = 0 | |
5275 | ||
5276 | ; | |
5277 | return 0; | |
5278 | } | |
5279 | _ACEOF | |
5280 | rm -f conftest.$ac_objext | |
5281 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5282 | (eval $ac_compile) 2>conftest.er1 | |
5283 | ac_status=$? | |
5284 | grep -v '^ *+' conftest.er1 >conftest.err | |
5285 | rm -f conftest.er1 | |
5286 | cat conftest.err >&5 | |
5287 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5288 | (exit $ac_status); } && | |
ec6c7392 PB |
5289 | { ac_try='test -z "$ac_c_werror_flag" |
5290 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5291 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5292 | (eval $ac_try) 2>&5 | |
5293 | ac_status=$? | |
5294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5295 | (exit $ac_status); }; } && | |
5296 | { ac_try='test -s conftest.$ac_objext' | |
5297 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5298 | (eval $ac_try) 2>&5 | |
5299 | ac_status=$? | |
5300 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5301 | (exit $ac_status); }; }; then | |
5302 | ac_lo=0 ac_mid=0 | |
5303 | while :; do | |
5304 | cat >conftest.$ac_ext <<_ACEOF | |
5305 | /* confdefs.h. */ | |
5306 | _ACEOF | |
5307 | cat confdefs.h >>conftest.$ac_ext | |
5308 | cat >>conftest.$ac_ext <<_ACEOF | |
5309 | /* end confdefs.h. */ | |
5310 | $ac_includes_default | |
5311 | int | |
5312 | main () | |
5313 | { | |
5314 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5315 | test_array [0] = 0 | |
5316 | ||
5317 | ; | |
5318 | return 0; | |
5319 | } | |
5320 | _ACEOF | |
5321 | rm -f conftest.$ac_objext | |
5322 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5323 | (eval $ac_compile) 2>conftest.er1 | |
5324 | ac_status=$? | |
5325 | grep -v '^ *+' conftest.er1 >conftest.err | |
5326 | rm -f conftest.er1 | |
5327 | cat conftest.err >&5 | |
5328 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5329 | (exit $ac_status); } && | |
ec6c7392 PB |
5330 | { ac_try='test -z "$ac_c_werror_flag" |
5331 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5332 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5333 | (eval $ac_try) 2>&5 | |
5334 | ac_status=$? | |
5335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5336 | (exit $ac_status); }; } && | |
5337 | { ac_try='test -s conftest.$ac_objext' | |
5338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5339 | (eval $ac_try) 2>&5 | |
5340 | ac_status=$? | |
5341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5342 | (exit $ac_status); }; }; then | |
5343 | ac_hi=$ac_mid; break | |
5344 | else | |
5345 | echo "$as_me: failed program was:" >&5 | |
5346 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5347 | ||
5348 | ac_lo=`expr $ac_mid + 1` | |
5349 | if test $ac_lo -le $ac_mid; then | |
5350 | ac_lo= ac_hi= | |
5351 | break | |
5352 | fi | |
5353 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
5354 | fi | |
5355 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5356 | done | |
5357 | else | |
5358 | echo "$as_me: failed program was:" >&5 | |
5359 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5360 | ||
5361 | cat >conftest.$ac_ext <<_ACEOF | |
5362 | /* confdefs.h. */ | |
5363 | _ACEOF | |
5364 | cat confdefs.h >>conftest.$ac_ext | |
5365 | cat >>conftest.$ac_ext <<_ACEOF | |
5366 | /* end confdefs.h. */ | |
5367 | $ac_includes_default | |
5368 | int | |
5369 | main () | |
5370 | { | |
5371 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; | |
5372 | test_array [0] = 0 | |
5373 | ||
5374 | ; | |
5375 | return 0; | |
5376 | } | |
5377 | _ACEOF | |
5378 | rm -f conftest.$ac_objext | |
5379 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5380 | (eval $ac_compile) 2>conftest.er1 | |
5381 | ac_status=$? | |
5382 | grep -v '^ *+' conftest.er1 >conftest.err | |
5383 | rm -f conftest.er1 | |
5384 | cat conftest.err >&5 | |
5385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5386 | (exit $ac_status); } && | |
ec6c7392 PB |
5387 | { ac_try='test -z "$ac_c_werror_flag" |
5388 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5390 | (eval $ac_try) 2>&5 | |
5391 | ac_status=$? | |
5392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5393 | (exit $ac_status); }; } && | |
5394 | { ac_try='test -s conftest.$ac_objext' | |
5395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5396 | (eval $ac_try) 2>&5 | |
5397 | ac_status=$? | |
5398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5399 | (exit $ac_status); }; }; then | |
5400 | ac_hi=-1 ac_mid=-1 | |
5401 | while :; do | |
5402 | cat >conftest.$ac_ext <<_ACEOF | |
5403 | /* confdefs.h. */ | |
5404 | _ACEOF | |
5405 | cat confdefs.h >>conftest.$ac_ext | |
5406 | cat >>conftest.$ac_ext <<_ACEOF | |
5407 | /* end confdefs.h. */ | |
5408 | $ac_includes_default | |
5409 | int | |
5410 | main () | |
5411 | { | |
5412 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; | |
5413 | test_array [0] = 0 | |
5414 | ||
5415 | ; | |
5416 | return 0; | |
5417 | } | |
5418 | _ACEOF | |
5419 | rm -f conftest.$ac_objext | |
5420 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5421 | (eval $ac_compile) 2>conftest.er1 | |
5422 | ac_status=$? | |
5423 | grep -v '^ *+' conftest.er1 >conftest.err | |
5424 | rm -f conftest.er1 | |
5425 | cat conftest.err >&5 | |
5426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5427 | (exit $ac_status); } && | |
ec6c7392 PB |
5428 | { ac_try='test -z "$ac_c_werror_flag" |
5429 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5431 | (eval $ac_try) 2>&5 | |
5432 | ac_status=$? | |
5433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5434 | (exit $ac_status); }; } && | |
5435 | { ac_try='test -s conftest.$ac_objext' | |
5436 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5437 | (eval $ac_try) 2>&5 | |
5438 | ac_status=$? | |
5439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5440 | (exit $ac_status); }; }; then | |
5441 | ac_lo=$ac_mid; break | |
5442 | else | |
5443 | echo "$as_me: failed program was:" >&5 | |
5444 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5445 | ||
5446 | ac_hi=`expr '(' $ac_mid ')' - 1` | |
5447 | if test $ac_mid -le $ac_hi; then | |
5448 | ac_lo= ac_hi= | |
5449 | break | |
5450 | fi | |
5451 | ac_mid=`expr 2 '*' $ac_mid` | |
5452 | fi | |
5453 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5454 | done | |
5455 | else | |
5456 | echo "$as_me: failed program was:" >&5 | |
5457 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5458 | ||
5459 | ac_lo= ac_hi= | |
5460 | fi | |
5461 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5462 | fi | |
5463 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5464 | # Binary search between lo and hi bounds. | |
5465 | while test "x$ac_lo" != "x$ac_hi"; do | |
5466 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5467 | cat >conftest.$ac_ext <<_ACEOF | |
5468 | /* confdefs.h. */ | |
5469 | _ACEOF | |
5470 | cat confdefs.h >>conftest.$ac_ext | |
5471 | cat >>conftest.$ac_ext <<_ACEOF | |
5472 | /* end confdefs.h. */ | |
5473 | $ac_includes_default | |
5474 | int | |
5475 | main () | |
5476 | { | |
5477 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; | |
5478 | test_array [0] = 0 | |
5479 | ||
5480 | ; | |
5481 | return 0; | |
5482 | } | |
5483 | _ACEOF | |
5484 | rm -f conftest.$ac_objext | |
5485 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5486 | (eval $ac_compile) 2>conftest.er1 | |
5487 | ac_status=$? | |
5488 | grep -v '^ *+' conftest.er1 >conftest.err | |
5489 | rm -f conftest.er1 | |
5490 | cat conftest.err >&5 | |
5491 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5492 | (exit $ac_status); } && | |
ec6c7392 PB |
5493 | { ac_try='test -z "$ac_c_werror_flag" |
5494 | || test ! -s conftest.err' | |
bf3b7cd3 JD |
5495 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5496 | (eval $ac_try) 2>&5 | |
5497 | ac_status=$? | |
5498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5499 | (exit $ac_status); }; } && | |
5500 | { ac_try='test -s conftest.$ac_objext' | |
5501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5502 | (eval $ac_try) 2>&5 | |
5503 | ac_status=$? | |
5504 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5505 | (exit $ac_status); }; }; then | |
5506 | ac_hi=$ac_mid | |
5507 | else | |
5508 | echo "$as_me: failed program was:" >&5 | |
5509 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5510 | ||
5511 | ac_lo=`expr '(' $ac_mid ')' + 1` | |
5512 | fi | |
5513 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5514 | done | |
5515 | case $ac_lo in | |
5516 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
5517 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5518 | See \`config.log' for more details." >&5 | |
5519 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5520 | See \`config.log' for more details." >&2;} | |
5521 | { (exit 1); exit 1; }; } ;; | |
5522 | esac | |
5523 | else | |
5524 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
5525 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
5526 | See \`config.log' for more details." >&5 | |
5527 | echo "$as_me: error: cannot run test program while cross compiling | |
5528 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
5529 | { (exit 1); exit 1; }; } |
5530 | else | |
5531 | cat >conftest.$ac_ext <<_ACEOF | |
5532 | /* confdefs.h. */ | |
5533 | _ACEOF | |
5534 | cat confdefs.h >>conftest.$ac_ext | |
5535 | cat >>conftest.$ac_ext <<_ACEOF | |
5536 | /* end confdefs.h. */ | |
5537 | $ac_includes_default | |
5538 | long longval () { return (long) (sizeof (long long)); } | |
5539 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
5540 | #include <stdio.h> | |
5541 | #include <stdlib.h> | |
5542 | int | |
5543 | main () | |
5544 | { | |
5545 | ||
5546 | FILE *f = fopen ("conftest.val", "w"); | |
5547 | if (! f) | |
5548 | exit (1); | |
5549 | if (((long) (sizeof (long long))) < 0) | |
5550 | { | |
5551 | long i = longval (); | |
5552 | if (i != ((long) (sizeof (long long)))) | |
5553 | exit (1); | |
5554 | fprintf (f, "%ld\n", i); | |
5555 | } | |
5556 | else | |
5557 | { | |
5558 | unsigned long i = ulongval (); | |
5559 | if (i != ((long) (sizeof (long long)))) | |
5560 | exit (1); | |
5561 | fprintf (f, "%lu\n", i); | |
5562 | } | |
5563 | exit (ferror (f) || fclose (f) != 0); | |
5564 | ||
5565 | ; | |
5566 | return 0; | |
5567 | } | |
5568 | _ACEOF | |
5569 | rm -f conftest$ac_exeext | |
5570 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5571 | (eval $ac_link) 2>&5 | |
5572 | ac_status=$? | |
5573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5574 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
5575 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5576 | (eval $ac_try) 2>&5 | |
5577 | ac_status=$? | |
5578 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5579 | (exit $ac_status); }; }; then | |
5580 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5581 | else | |
5582 | echo "$as_me: program exited with status $ac_status" >&5 | |
5583 | echo "$as_me: failed program was:" >&5 | |
5584 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5585 | ||
5586 | ( exit $ac_status ) | |
5587 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 | |
5588 | See \`config.log' for more details." >&5 | |
5589 | echo "$as_me: error: cannot compute sizeof (long long), 77 | |
5590 | See \`config.log' for more details." >&2;} | |
5591 | { (exit 1); exit 1; }; } | |
5592 | fi | |
5593 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
5594 | fi | |
5595 | fi | |
5596 | rm -f conftest.val | |
5597 | else | |
5598 | ac_cv_sizeof_long_long=0 | |
5599 | fi | |
5600 | fi | |
5601 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5602 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
5603 | cat >>confdefs.h <<_ACEOF | |
5604 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5605 | _ACEOF | |
5606 | ||
5607 | ||
5608 | fi | |
5ec1c5e6 KC |
5609 | |
5610 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
5611 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5612 | if test "${ac_cv_type___int64+set}" = set; then | |
5613 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5614 | else | |
5615 | cat >conftest.$ac_ext <<_ACEOF | |
5616 | /* confdefs.h. */ | |
5617 | _ACEOF | |
5618 | cat confdefs.h >>conftest.$ac_ext | |
5619 | cat >>conftest.$ac_ext <<_ACEOF | |
5620 | /* end confdefs.h. */ | |
5621 | $ac_includes_default | |
5622 | int | |
5623 | main () | |
5624 | { | |
5625 | if ((__int64 *) 0) | |
5626 | return 0; | |
5627 | if (sizeof (__int64)) | |
5628 | return 0; | |
5629 | ; | |
5630 | return 0; | |
5631 | } | |
5632 | _ACEOF | |
5633 | rm -f conftest.$ac_objext | |
5634 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5635 | (eval $ac_compile) 2>conftest.er1 | |
5636 | ac_status=$? | |
5637 | grep -v '^ *+' conftest.er1 >conftest.err | |
5638 | rm -f conftest.er1 | |
5639 | cat conftest.err >&5 | |
5640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5641 | (exit $ac_status); } && | |
ec6c7392 PB |
5642 | { ac_try='test -z "$ac_c_werror_flag" |
5643 | || test ! -s conftest.err' | |
5ec1c5e6 KC |
5644 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5645 | (eval $ac_try) 2>&5 | |
5646 | ac_status=$? | |
5647 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5648 | (exit $ac_status); }; } && | |
5649 | { ac_try='test -s conftest.$ac_objext' | |
5650 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5651 | (eval $ac_try) 2>&5 | |
5652 | ac_status=$? | |
5653 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5654 | (exit $ac_status); }; }; then | |
5655 | ac_cv_type___int64=yes | |
5656 | else | |
5657 | echo "$as_me: failed program was:" >&5 | |
5658 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5659 | ||
5660 | ac_cv_type___int64=no | |
5661 | fi | |
5662 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5663 | fi | |
5664 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 | |
5665 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5666 | if test $ac_cv_type___int64 = yes; then | |
5667 | ||
5668 | cat >>confdefs.h <<_ACEOF | |
5669 | #define HAVE___INT64 1 | |
5670 | _ACEOF | |
5671 | ||
5672 | echo "$as_me:$LINENO: checking for __int64" >&5 | |
bf3b7cd3 JD |
5673 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 |
5674 | if test "${ac_cv_type___int64+set}" = set; then | |
5675 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5676 | else | |
ba479fd2 | 5677 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5678 | /* confdefs.h. */ |
5679 | _ACEOF | |
5680 | cat confdefs.h >>conftest.$ac_ext | |
5681 | cat >>conftest.$ac_ext <<_ACEOF | |
5682 | /* end confdefs.h. */ | |
bf3b7cd3 | 5683 | $ac_includes_default |
ba479fd2 NN |
5684 | int |
5685 | main () | |
5686 | { | |
bf3b7cd3 JD |
5687 | if ((__int64 *) 0) |
5688 | return 0; | |
5689 | if (sizeof (__int64)) | |
5690 | return 0; | |
ba479fd2 NN |
5691 | ; |
5692 | return 0; | |
5693 | } | |
5694 | _ACEOF | |
5695 | rm -f conftest.$ac_objext | |
5696 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5697 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5698 | ac_status=$? |
86da66b5 HPN |
5699 | grep -v '^ *+' conftest.er1 >conftest.err |
5700 | rm -f conftest.er1 | |
5701 | cat conftest.err >&5 | |
ba479fd2 NN |
5702 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5703 | (exit $ac_status); } && | |
ec6c7392 PB |
5704 | { ac_try='test -z "$ac_c_werror_flag" |
5705 | || test ! -s conftest.err' | |
86da66b5 HPN |
5706 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5707 | (eval $ac_try) 2>&5 | |
5708 | ac_status=$? | |
5709 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5710 | (exit $ac_status); }; } && | |
5711 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5712 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5713 | (eval $ac_try) 2>&5 | |
5714 | ac_status=$? | |
5715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5716 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5717 | ac_cv_type___int64=yes |
75b6f3fd | 5718 | else |
ba479fd2 NN |
5719 | echo "$as_me: failed program was:" >&5 |
5720 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5721 | ||
bf3b7cd3 | 5722 | ac_cv_type___int64=no |
75b6f3fd | 5723 | fi |
86da66b5 | 5724 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5725 | fi |
bf3b7cd3 JD |
5726 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5727 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5728 | |
bf3b7cd3 JD |
5729 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5730 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
5731 | if test "${ac_cv_sizeof___int64+set}" = set; then | |
ba479fd2 | 5732 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5733 | else |
bf3b7cd3 JD |
5734 | if test "$ac_cv_type___int64" = yes; then |
5735 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5736 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5737 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5738 | # This bug is HP SR number 8606223364. | |
5739 | if test "$cross_compiling" = yes; then | |
5740 | # Depending upon the size, compute the lo and hi bounds. | |
5741 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5742 | /* confdefs.h. */ |
5743 | _ACEOF | |
5744 | cat confdefs.h >>conftest.$ac_ext | |
5745 | cat >>conftest.$ac_ext <<_ACEOF | |
5746 | /* end confdefs.h. */ | |
bf3b7cd3 | 5747 | $ac_includes_default |
ba479fd2 NN |
5748 | int |
5749 | main () | |
5750 | { | |
bf3b7cd3 JD |
5751 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
5752 | test_array [0] = 0 | |
5753 | ||
ba479fd2 NN |
5754 | ; |
5755 | return 0; | |
5756 | } | |
5757 | _ACEOF | |
5758 | rm -f conftest.$ac_objext | |
5759 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5760 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5761 | ac_status=$? |
86da66b5 HPN |
5762 | grep -v '^ *+' conftest.er1 >conftest.err |
5763 | rm -f conftest.er1 | |
5764 | cat conftest.err >&5 | |
ba479fd2 NN |
5765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5766 | (exit $ac_status); } && | |
ec6c7392 PB |
5767 | { ac_try='test -z "$ac_c_werror_flag" |
5768 | || test ! -s conftest.err' | |
86da66b5 HPN |
5769 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5770 | (eval $ac_try) 2>&5 | |
5771 | ac_status=$? | |
5772 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5773 | (exit $ac_status); }; } && | |
5774 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5775 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5776 | (eval $ac_try) 2>&5 | |
5777 | ac_status=$? | |
5778 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5779 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5780 | ac_lo=0 ac_mid=0 |
5781 | while :; do | |
5782 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5783 | /* confdefs.h. */ |
5784 | _ACEOF | |
5785 | cat confdefs.h >>conftest.$ac_ext | |
5786 | cat >>conftest.$ac_ext <<_ACEOF | |
5787 | /* end confdefs.h. */ | |
bf3b7cd3 | 5788 | $ac_includes_default |
ba479fd2 NN |
5789 | int |
5790 | main () | |
5791 | { | |
bf3b7cd3 JD |
5792 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5793 | test_array [0] = 0 | |
5794 | ||
ba479fd2 NN |
5795 | ; |
5796 | return 0; | |
5797 | } | |
5798 | _ACEOF | |
5799 | rm -f conftest.$ac_objext | |
5800 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5801 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5802 | ac_status=$? |
86da66b5 HPN |
5803 | grep -v '^ *+' conftest.er1 >conftest.err |
5804 | rm -f conftest.er1 | |
5805 | cat conftest.err >&5 | |
ba479fd2 NN |
5806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5807 | (exit $ac_status); } && | |
ec6c7392 PB |
5808 | { ac_try='test -z "$ac_c_werror_flag" |
5809 | || test ! -s conftest.err' | |
86da66b5 HPN |
5810 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5811 | (eval $ac_try) 2>&5 | |
5812 | ac_status=$? | |
5813 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5814 | (exit $ac_status); }; } && | |
5815 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5816 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5817 | (eval $ac_try) 2>&5 | |
5818 | ac_status=$? | |
5819 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5820 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5821 | ac_hi=$ac_mid; break |
75e93faa | 5822 | else |
ba479fd2 NN |
5823 | echo "$as_me: failed program was:" >&5 |
5824 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5825 | ||
bf3b7cd3 JD |
5826 | ac_lo=`expr $ac_mid + 1` |
5827 | if test $ac_lo -le $ac_mid; then | |
5828 | ac_lo= ac_hi= | |
5829 | break | |
5830 | fi | |
5831 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5832 | fi |
86da66b5 | 5833 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5834 | done |
75e93faa | 5835 | else |
bf3b7cd3 JD |
5836 | echo "$as_me: failed program was:" >&5 |
5837 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5838 | ||
5839 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5840 | /* confdefs.h. */ |
5841 | _ACEOF | |
5842 | cat confdefs.h >>conftest.$ac_ext | |
5843 | cat >>conftest.$ac_ext <<_ACEOF | |
5844 | /* end confdefs.h. */ | |
bf3b7cd3 | 5845 | $ac_includes_default |
ba479fd2 NN |
5846 | int |
5847 | main () | |
5848 | { | |
bf3b7cd3 JD |
5849 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
5850 | test_array [0] = 0 | |
5851 | ||
ba479fd2 NN |
5852 | ; |
5853 | return 0; | |
5854 | } | |
5855 | _ACEOF | |
5856 | rm -f conftest.$ac_objext | |
5857 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5858 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5859 | ac_status=$? |
86da66b5 HPN |
5860 | grep -v '^ *+' conftest.er1 >conftest.err |
5861 | rm -f conftest.er1 | |
5862 | cat conftest.err >&5 | |
ba479fd2 NN |
5863 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5864 | (exit $ac_status); } && | |
ec6c7392 PB |
5865 | { ac_try='test -z "$ac_c_werror_flag" |
5866 | || test ! -s conftest.err' | |
86da66b5 HPN |
5867 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5868 | (eval $ac_try) 2>&5 | |
5869 | ac_status=$? | |
5870 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5871 | (exit $ac_status); }; } && | |
5872 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5873 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5874 | (eval $ac_try) 2>&5 | |
5875 | ac_status=$? | |
5876 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5877 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5878 | ac_hi=-1 ac_mid=-1 |
5879 | while :; do | |
5880 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5881 | /* confdefs.h. */ |
5882 | _ACEOF | |
5883 | cat confdefs.h >>conftest.$ac_ext | |
5884 | cat >>conftest.$ac_ext <<_ACEOF | |
5885 | /* end confdefs.h. */ | |
bf3b7cd3 | 5886 | $ac_includes_default |
ba479fd2 NN |
5887 | int |
5888 | main () | |
5889 | { | |
bf3b7cd3 JD |
5890 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
5891 | test_array [0] = 0 | |
5892 | ||
ba479fd2 NN |
5893 | ; |
5894 | return 0; | |
5895 | } | |
5896 | _ACEOF | |
5897 | rm -f conftest.$ac_objext | |
5898 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5899 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5900 | ac_status=$? |
86da66b5 HPN |
5901 | grep -v '^ *+' conftest.er1 >conftest.err |
5902 | rm -f conftest.er1 | |
5903 | cat conftest.err >&5 | |
ba479fd2 NN |
5904 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5905 | (exit $ac_status); } && | |
ec6c7392 PB |
5906 | { ac_try='test -z "$ac_c_werror_flag" |
5907 | || test ! -s conftest.err' | |
86da66b5 HPN |
5908 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5909 | (eval $ac_try) 2>&5 | |
5910 | ac_status=$? | |
5911 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5912 | (exit $ac_status); }; } && | |
5913 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5914 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5915 | (eval $ac_try) 2>&5 | |
5916 | ac_status=$? | |
5917 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5918 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5919 | ac_lo=$ac_mid; break |
04cabffc | 5920 | else |
ba479fd2 NN |
5921 | echo "$as_me: failed program was:" >&5 |
5922 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5923 | ||
bf3b7cd3 JD |
5924 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5925 | if test $ac_mid -le $ac_hi; then | |
5926 | ac_lo= ac_hi= | |
5927 | break | |
5928 | fi | |
5929 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5930 | fi |
86da66b5 | 5931 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5932 | done |
5933 | else | |
5934 | echo "$as_me: failed program was:" >&5 | |
5935 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5936 | |
bf3b7cd3 | 5937 | ac_lo= ac_hi= |
414d23ae | 5938 | fi |
bf3b7cd3 | 5939 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5940 | fi |
bf3b7cd3 JD |
5941 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5942 | # Binary search between lo and hi bounds. | |
5943 | while test "x$ac_lo" != "x$ac_hi"; do | |
5944 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5945 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5946 | /* confdefs.h. */ |
5947 | _ACEOF | |
5948 | cat confdefs.h >>conftest.$ac_ext | |
5949 | cat >>conftest.$ac_ext <<_ACEOF | |
5950 | /* end confdefs.h. */ | |
bf3b7cd3 | 5951 | $ac_includes_default |
ba479fd2 NN |
5952 | int |
5953 | main () | |
5954 | { | |
bf3b7cd3 JD |
5955 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
5956 | test_array [0] = 0 | |
5957 | ||
ba479fd2 NN |
5958 | ; |
5959 | return 0; | |
5960 | } | |
5961 | _ACEOF | |
5962 | rm -f conftest.$ac_objext | |
5963 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 5964 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 5965 | ac_status=$? |
86da66b5 HPN |
5966 | grep -v '^ *+' conftest.er1 >conftest.err |
5967 | rm -f conftest.er1 | |
5968 | cat conftest.err >&5 | |
ba479fd2 NN |
5969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
5970 | (exit $ac_status); } && | |
ec6c7392 PB |
5971 | { ac_try='test -z "$ac_c_werror_flag" |
5972 | || test ! -s conftest.err' | |
86da66b5 HPN |
5973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5974 | (eval $ac_try) 2>&5 | |
5975 | ac_status=$? | |
5976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5977 | (exit $ac_status); }; } && | |
5978 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
5979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5980 | (eval $ac_try) 2>&5 | |
5981 | ac_status=$? | |
5982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5983 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5984 | ac_hi=$ac_mid |
75e93faa | 5985 | else |
ba479fd2 NN |
5986 | echo "$as_me: failed program was:" >&5 |
5987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5988 | ||
bf3b7cd3 | 5989 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 5990 | fi |
86da66b5 | 5991 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5992 | done |
bf3b7cd3 JD |
5993 | case $ac_lo in |
5994 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
5995 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
5996 | See \`config.log' for more details." >&5 | |
5997 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
5998 | See \`config.log' for more details." >&2;} | |
5999 | { (exit 1); exit 1; }; } ;; | |
6000 | esac | |
6001 | else | |
6002 | if test "$cross_compiling" = yes; then | |
ec6c7392 PB |
6003 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling |
6004 | See \`config.log' for more details." >&5 | |
6005 | echo "$as_me: error: cannot run test program while cross compiling | |
6006 | See \`config.log' for more details." >&2;} | |
bf3b7cd3 JD |
6007 | { (exit 1); exit 1; }; } |
6008 | else | |
6009 | cat >conftest.$ac_ext <<_ACEOF | |
6010 | /* confdefs.h. */ | |
6011 | _ACEOF | |
6012 | cat confdefs.h >>conftest.$ac_ext | |
6013 | cat >>conftest.$ac_ext <<_ACEOF | |
6014 | /* end confdefs.h. */ | |
6015 | $ac_includes_default | |
6016 | long longval () { return (long) (sizeof (__int64)); } | |
6017 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
6018 | #include <stdio.h> | |
6019 | #include <stdlib.h> | |
6020 | int | |
6021 | main () | |
6022 | { | |
414d23ae | 6023 | |
bf3b7cd3 JD |
6024 | FILE *f = fopen ("conftest.val", "w"); |
6025 | if (! f) | |
6026 | exit (1); | |
6027 | if (((long) (sizeof (__int64))) < 0) | |
6028 | { | |
6029 | long i = longval (); | |
6030 | if (i != ((long) (sizeof (__int64)))) | |
6031 | exit (1); | |
6032 | fprintf (f, "%ld\n", i); | |
6033 | } | |
6034 | else | |
6035 | { | |
6036 | unsigned long i = ulongval (); | |
6037 | if (i != ((long) (sizeof (__int64)))) | |
6038 | exit (1); | |
6039 | fprintf (f, "%lu\n", i); | |
6040 | } | |
6041 | exit (ferror (f) || fclose (f) != 0); | |
6042 | ||
6043 | ; | |
6044 | return 0; | |
6045 | } | |
6046 | _ACEOF | |
6047 | rm -f conftest$ac_exeext | |
6048 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6049 | (eval $ac_link) 2>&5 | |
6050 | ac_status=$? | |
6051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6052 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6053 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6054 | (eval $ac_try) 2>&5 | |
6055 | ac_status=$? | |
6056 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6057 | (exit $ac_status); }; }; then | |
6058 | ac_cv_sizeof___int64=`cat conftest.val` | |
6059 | else | |
6060 | echo "$as_me: program exited with status $ac_status" >&5 | |
6061 | echo "$as_me: failed program was:" >&5 | |
6062 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6063 | |
bf3b7cd3 JD |
6064 | ( exit $ac_status ) |
6065 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 | |
6066 | See \`config.log' for more details." >&5 | |
6067 | echo "$as_me: error: cannot compute sizeof (__int64), 77 | |
6068 | See \`config.log' for more details." >&2;} | |
ba479fd2 | 6069 | { (exit 1); exit 1; }; } |
414d23ae | 6070 | fi |
bf3b7cd3 JD |
6071 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6072 | fi | |
6073 | fi | |
6074 | rm -f conftest.val | |
6075 | else | |
6076 | ac_cv_sizeof___int64=0 | |
6077 | fi | |
6078 | fi | |
ba479fd2 NN |
6079 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 |
6080 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6081 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6082 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6083 | _ACEOF |
414d23ae | 6084 | |
cafe096b | 6085 | |
414d23ae HPN |
6086 | fi |
6087 | ||
5ec1c5e6 | 6088 | |
34a86c2b NN |
6089 | # --------------------- |
6090 | # Warnings and checking | |
6091 | # --------------------- | |
6092 | ||
b5472e1d NN |
6093 | # Check $CC warning features (if it's GCC). |
6094 | # We want to use -pedantic, but we don't want warnings about | |
6095 | # * 'long long' | |
6096 | # * variadic macros | |
89a42ac8 | 6097 | # * overlong strings |
b5472e1d NN |
6098 | # So, we only use -pedantic if we can disable those warnings. |
6099 | ||
6100 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-long-long" >&5 | |
6101 | echo $ECHO_N "checking whether ${CC} accepts -Wno-long-long... $ECHO_C" >&6 | |
6102 | if test "${ac_cv_prog_cc_w_no_long_long+set}" = set; then | |
6103 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6104 | else | |
6105 | save_CFLAGS="$CFLAGS" | |
6106 | CFLAGS="-Wno-long-long" | |
6107 | cat >conftest.$ac_ext <<_ACEOF | |
6108 | /* confdefs.h. */ | |
6109 | _ACEOF | |
6110 | cat confdefs.h >>conftest.$ac_ext | |
6111 | cat >>conftest.$ac_ext <<_ACEOF | |
6112 | /* end confdefs.h. */ | |
6113 | ||
6114 | _ACEOF | |
6115 | rm -f conftest.$ac_objext | |
6116 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6117 | (eval $ac_compile) 2>conftest.er1 | |
6118 | ac_status=$? | |
6119 | grep -v '^ *+' conftest.er1 >conftest.err | |
6120 | rm -f conftest.er1 | |
6121 | cat conftest.err >&5 | |
6122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6123 | (exit $ac_status); } && | |
ec6c7392 PB |
6124 | { ac_try='test -z "$ac_c_werror_flag" |
6125 | || test ! -s conftest.err' | |
b5472e1d NN |
6126 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6127 | (eval $ac_try) 2>&5 | |
6128 | ac_status=$? | |
6129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6130 | (exit $ac_status); }; } && | |
6131 | { ac_try='test -s conftest.$ac_objext' | |
6132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6133 | (eval $ac_try) 2>&5 | |
6134 | ac_status=$? | |
6135 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6136 | (exit $ac_status); }; }; then | |
6137 | ac_cv_prog_cc_w_no_long_long=yes | |
6138 | else | |
6139 | echo "$as_me: failed program was:" >&5 | |
6140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6141 | ||
6142 | ac_cv_prog_cc_w_no_long_long=no | |
6143 | fi | |
6144 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6145 | CFLAGS="$save_CFLAGS" | |
6146 | ||
6147 | fi | |
6148 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_long_long" >&5 | |
6149 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_long_long" >&6 | |
6150 | ||
6151 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-variadic-macros" >&5 | |
6152 | echo $ECHO_N "checking whether ${CC} accepts -Wno-variadic-macros... $ECHO_C" >&6 | |
6153 | if test "${ac_cv_prog_cc_w_no_variadic_macros+set}" = set; then | |
6154 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6155 | else | |
6156 | save_CFLAGS="$CFLAGS" | |
6157 | CFLAGS="-Wno-variadic-macros" | |
6158 | cat >conftest.$ac_ext <<_ACEOF | |
6159 | /* confdefs.h. */ | |
6160 | _ACEOF | |
6161 | cat confdefs.h >>conftest.$ac_ext | |
6162 | cat >>conftest.$ac_ext <<_ACEOF | |
6163 | /* end confdefs.h. */ | |
6164 | ||
6165 | _ACEOF | |
6166 | rm -f conftest.$ac_objext | |
6167 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6168 | (eval $ac_compile) 2>conftest.er1 | |
6169 | ac_status=$? | |
6170 | grep -v '^ *+' conftest.er1 >conftest.err | |
6171 | rm -f conftest.er1 | |
6172 | cat conftest.err >&5 | |
6173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6174 | (exit $ac_status); } && | |
ec6c7392 PB |
6175 | { ac_try='test -z "$ac_c_werror_flag" |
6176 | || test ! -s conftest.err' | |
b5472e1d NN |
6177 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6178 | (eval $ac_try) 2>&5 | |
6179 | ac_status=$? | |
6180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6181 | (exit $ac_status); }; } && | |
6182 | { ac_try='test -s conftest.$ac_objext' | |
6183 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6184 | (eval $ac_try) 2>&5 | |
6185 | ac_status=$? | |
6186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6187 | (exit $ac_status); }; }; then | |
6188 | ac_cv_prog_cc_w_no_variadic_macros=yes | |
6189 | else | |
6190 | echo "$as_me: failed program was:" >&5 | |
6191 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6192 | ||
6193 | ac_cv_prog_cc_w_no_variadic_macros=no | |
6194 | fi | |
6195 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6196 | CFLAGS="$save_CFLAGS" | |
6197 | ||
6198 | fi | |
6199 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_variadic_macros" >&5 | |
6200 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_variadic_macros" >&6 | |
6201 | ||
89a42ac8 ZW |
6202 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wno-overlength-strings" >&5 |
6203 | echo $ECHO_N "checking whether ${CC} accepts -Wno-overlength-strings... $ECHO_C" >&6 | |
6204 | if test "${ac_cv_prog_cc_w_no_overlength_strings+set}" = set; then | |
6205 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6206 | else | |
6207 | save_CFLAGS="$CFLAGS" | |
6208 | CFLAGS="-Wno-overlength-strings" | |
6209 | cat >conftest.$ac_ext <<_ACEOF | |
6210 | /* confdefs.h. */ | |
6211 | _ACEOF | |
6212 | cat confdefs.h >>conftest.$ac_ext | |
6213 | cat >>conftest.$ac_ext <<_ACEOF | |
6214 | /* end confdefs.h. */ | |
6215 | ||
6216 | _ACEOF | |
6217 | rm -f conftest.$ac_objext | |
6218 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6219 | (eval $ac_compile) 2>conftest.er1 | |
6220 | ac_status=$? | |
6221 | grep -v '^ *+' conftest.er1 >conftest.err | |
6222 | rm -f conftest.er1 | |
6223 | cat conftest.err >&5 | |
6224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6225 | (exit $ac_status); } && | |
ec6c7392 PB |
6226 | { ac_try='test -z "$ac_c_werror_flag" |
6227 | || test ! -s conftest.err' | |
89a42ac8 ZW |
6228 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6229 | (eval $ac_try) 2>&5 | |
6230 | ac_status=$? | |
6231 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6232 | (exit $ac_status); }; } && | |
6233 | { ac_try='test -s conftest.$ac_objext' | |
6234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6235 | (eval $ac_try) 2>&5 | |
6236 | ac_status=$? | |
6237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6238 | (exit $ac_status); }; }; then | |
6239 | ac_cv_prog_cc_w_no_overlength_strings=yes | |
6240 | else | |
6241 | echo "$as_me: failed program was:" >&5 | |
6242 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6243 | ||
6244 | ac_cv_prog_cc_w_no_overlength_strings=no | |
6245 | fi | |
6246 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6247 | CFLAGS="$save_CFLAGS" | |
6248 | ||
6249 | fi | |
6250 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_no_overlength_strings" >&5 | |
6251 | echo "${ECHO_T}$ac_cv_prog_cc_w_no_overlength_strings" >&6 | |
6252 | ||
34a86c2b | 6253 | strict1_warn= |
b5472e1d | 6254 | if test $ac_cv_prog_cc_w_no_long_long = yes \ |
89a42ac8 ZW |
6255 | && test $ac_cv_prog_cc_w_no_variadic_macros = yes \ |
6256 | && test $ac_cv_prog_cc_w_no_overlength_strings = yes ; then | |
6257 | strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings" | |
34a86c2b NN |
6258 | fi |
6259 | ||
643d3bd2 NN |
6260 | # Add -Wold-style-definition if it's accepted |
6261 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wold-style-definition" >&5 | |
6262 | echo $ECHO_N "checking whether ${CC} accepts -Wold-style-definition... $ECHO_C" >&6 | |
6263 | if test "${ac_cv_prog_cc_w_old_style_definition+set}" = set; then | |
6264 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6265 | else | |
6266 | save_CFLAGS="$CFLAGS" | |
6267 | CFLAGS="-Wold-style-definition" | |
6268 | cat >conftest.$ac_ext <<_ACEOF | |
6269 | /* confdefs.h. */ | |
6270 | _ACEOF | |
6271 | cat confdefs.h >>conftest.$ac_ext | |
6272 | cat >>conftest.$ac_ext <<_ACEOF | |
6273 | /* end confdefs.h. */ | |
6274 | ||
6275 | _ACEOF | |
6276 | rm -f conftest.$ac_objext | |
6277 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6278 | (eval $ac_compile) 2>conftest.er1 | |
6279 | ac_status=$? | |
6280 | grep -v '^ *+' conftest.er1 >conftest.err | |
6281 | rm -f conftest.er1 | |
6282 | cat conftest.err >&5 | |
6283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6284 | (exit $ac_status); } && | |
ec6c7392 PB |
6285 | { ac_try='test -z "$ac_c_werror_flag" |
6286 | || test ! -s conftest.err' | |
643d3bd2 NN |
6287 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6288 | (eval $ac_try) 2>&5 | |
6289 | ac_status=$? | |
6290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6291 | (exit $ac_status); }; } && | |
6292 | { ac_try='test -s conftest.$ac_objext' | |
6293 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6294 | (eval $ac_try) 2>&5 | |
6295 | ac_status=$? | |
6296 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6297 | (exit $ac_status); }; }; then | |
6298 | ac_cv_prog_cc_w_old_style_definition=yes | |
6299 | else | |
6300 | echo "$as_me: failed program was:" >&5 | |
6301 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6302 | ||
6303 | ac_cv_prog_cc_w_old_style_definition=no | |
6304 | fi | |
6305 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6306 | CFLAGS="$save_CFLAGS" | |
6307 | ||
6308 | fi | |
6309 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_old_style_definition" >&5 | |
6310 | echo "${ECHO_T}$ac_cv_prog_cc_w_old_style_definition" >&6 | |
6311 | if test $ac_cv_prog_cc_w_old_style_definition = yes ; then | |
6312 | strict1_warn="${strict1_warn} -Wold-style-definition" | |
6313 | fi | |
6314 | ||
ac0f3f39 KG |
6315 | # Add -Wmissing-format-attribute if it's accepted |
6316 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wmissing-format-attribute" >&5 | |
6317 | echo $ECHO_N "checking whether ${CC} accepts -Wmissing-format-attribute... $ECHO_C" >&6 | |
6318 | if test "${ac_cv_prog_cc_w_missing_format_attribute+set}" = set; then | |
6319 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6320 | else | |
6321 | save_CFLAGS="$CFLAGS" | |
6322 | CFLAGS="-Wmissing-format-attribute" | |
6323 | cat >conftest.$ac_ext <<_ACEOF | |
6324 | /* confdefs.h. */ | |
6325 | _ACEOF | |
6326 | cat confdefs.h >>conftest.$ac_ext | |
6327 | cat >>conftest.$ac_ext <<_ACEOF | |
6328 | /* end confdefs.h. */ | |
6329 | ||
6330 | _ACEOF | |
6331 | rm -f conftest.$ac_objext | |
6332 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6333 | (eval $ac_compile) 2>conftest.er1 | |
6334 | ac_status=$? | |
6335 | grep -v '^ *+' conftest.er1 >conftest.err | |
6336 | rm -f conftest.er1 | |
6337 | cat conftest.err >&5 | |
6338 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6339 | (exit $ac_status); } && | |
ec6c7392 PB |
6340 | { ac_try='test -z "$ac_c_werror_flag" |
6341 | || test ! -s conftest.err' | |
ac0f3f39 KG |
6342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6343 | (eval $ac_try) 2>&5 | |
6344 | ac_status=$? | |
6345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6346 | (exit $ac_status); }; } && | |
6347 | { ac_try='test -s conftest.$ac_objext' | |
6348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6349 | (eval $ac_try) 2>&5 | |
6350 | ac_status=$? | |
6351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6352 | (exit $ac_status); }; }; then | |
6353 | ac_cv_prog_cc_w_missing_format_attribute=yes | |
6354 | else | |
6355 | echo "$as_me: failed program was:" >&5 | |
6356 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6357 | ||
6358 | ac_cv_prog_cc_w_missing_format_attribute=no | |
6359 | fi | |
6360 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6361 | CFLAGS="$save_CFLAGS" | |
6362 | ||
6363 | fi | |
6364 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_missing_format_attribute" >&5 | |
6365 | echo "${ECHO_T}$ac_cv_prog_cc_w_missing_format_attribute" >&6 | |
6366 | if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then | |
6367 | strict1_warn="${strict1_warn} -Wmissing-format-attribute" | |
6368 | fi | |
6369 | ||
09a9c095 NN |
6370 | # Enable -Werror, period. |
6371 | # Check whether --enable-werror_always or --disable-werror_always was given. | |
6372 | if test "${enable_werror_always+set}" = set; then | |
6373 | enableval="$enable_werror_always" | |
6374 | ||
6375 | else | |
6376 | enable_werror_always=no | |
6377 | fi; | |
6378 | if test x${enable_werror_always} = xyes ; then | |
6379 | strict1_warn="${strict1_warn} -Werror" | |
6380 | WERROR=-Werror | |
6381 | fi | |
6382 | ||
ac0f3f39 KG |
6383 | |
6384 | ||
373477bb GDR |
6385 | # Get C++ compatibility warning flag, if supported. |
6386 | echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5 | |
6387 | echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6 | |
6388 | if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then | |
6389 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6390 | else | |
6391 | save_CFLAGS="$CFLAGS" | |
6392 | CFLAGS="-Wc++-compat" | |
6393 | cat >conftest.$ac_ext <<_ACEOF | |
6394 | /* confdefs.h. */ | |
6395 | _ACEOF | |
6396 | cat confdefs.h >>conftest.$ac_ext | |
6397 | cat >>conftest.$ac_ext <<_ACEOF | |
6398 | /* end confdefs.h. */ | |
6399 | ||
6400 | _ACEOF | |
6401 | rm -f conftest.$ac_objext | |
6402 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6403 | (eval $ac_compile) 2>conftest.er1 | |
6404 | ac_status=$? | |
6405 | grep -v '^ *+' conftest.er1 >conftest.err | |
6406 | rm -f conftest.er1 | |
6407 | cat conftest.err >&5 | |
6408 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6409 | (exit $ac_status); } && | |
ec6c7392 PB |
6410 | { ac_try='test -z "$ac_c_werror_flag" |
6411 | || test ! -s conftest.err' | |
373477bb GDR |
6412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6413 | (eval $ac_try) 2>&5 | |
6414 | ac_status=$? | |
6415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6416 | (exit $ac_status); }; } && | |
6417 | { ac_try='test -s conftest.$ac_objext' | |
6418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6419 | (eval $ac_try) 2>&5 | |
6420 | ac_status=$? | |
6421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6422 | (exit $ac_status); }; }; then | |
6423 | ac_cv_prog_cc_w_cxx_compat=yes | |
6424 | else | |
6425 | echo "$as_me: failed program was:" >&5 | |
6426 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6427 | ||
6428 | ac_cv_prog_cc_w_cxx_compat=no | |
6429 | fi | |
6430 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6431 | CFLAGS="$save_CFLAGS" | |
6432 | ||
6433 | fi | |
6434 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5 | |
6435 | echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6 | |
6436 | if test x${ac_cv_prog_cc_w_cxx_compat} = xyes; then | |
6437 | cxx_compat_warn="-Wc++-compat" | |
6438 | fi | |
6439 | ||
6440 | ||
6441 | ||
ba479fd2 | 6442 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
6443 | # That's useful for people building cross-compilers, or just running a |
6444 | # quick `make'. | |
6445 | warn_cflags= | |
6446 | if test "x$GCC" = "xyes"; then | |
6447 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6448 | fi | |
6449 | ||
6450 | ||
dd859b8a | 6451 | # Enable -Werror in bootstrap stage2 and later. |
a1286ef5 ZW |
6452 | is_release= |
6453 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6454 | is_release=yes | |
6455 | fi | |
dd859b8a KG |
6456 | # Check whether --enable-werror or --disable-werror was given. |
6457 | if test "${enable_werror+set}" = set; then | |
6458 | enableval="$enable_werror" | |
ba479fd2 | 6459 | |
dd859b8a | 6460 | else |
06c37c96 NS |
6461 | if test x$is_release = x ; then |
6462 | # Default to "yes" on development branches. | |
dd859b8a | 6463 | enable_werror=yes |
06c37c96 NS |
6464 | else |
6465 | # Default to "no" on release branches. | |
6466 | enable_werror=no | |
6467 | fi | |
ba479fd2 | 6468 | fi; |
dd859b8a KG |
6469 | if test x$enable_werror = xyes ; then |
6470 | WERROR=-Werror | |
6471 | fi | |
6472 | ||
6473 | ||
414d23ae HPN |
6474 | # Enable expensive internal checks |
6475 | # Check whether --enable-checking or --disable-checking was given. | |
6476 | if test "${enable_checking+set}" = set; then | |
6477 | enableval="$enable_checking" | |
e1bbfc5c NS |
6478 | ac_checking_flags="${enableval}" |
6479 | else | |
6480 | ||
6481 | # Determine the default checks. | |
6482 | if test x$is_release = x ; then | |
6483 | ac_checking_flags=yes | |
6484 | else | |
6485 | ac_checking_flags=release | |
6486 | fi | |
6487 | fi; | |
6488 | ac_assert_checking=1 | |
6489 | ac_checking= | |
cdce5c16 NS |
6490 | ac_fold_checking= |
6491 | ac_gc_checking= | |
6492 | ac_gc_always_collect= | |
414d23ae HPN |
6493 | ac_rtl_checking= |
6494 | ac_rtlflag_checking= | |
b53ef395 | 6495 | ac_runtime_checking=1 |
cdce5c16 NS |
6496 | ac_tree_checking= |
6497 | ac_valgrind_checking= | |
e1bbfc5c NS |
6498 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
6499 | for check in $ac_checking_flags | |
6500 | do | |
6501 | case $check in | |
cdce5c16 | 6502 | # these set all the flags to specific states |
e1bbfc5c | 6503 | yes) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6504 | ac_fold_checking= ; ac_gc_checking=1 ; |
6505 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6506 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
cdce5c16 NS |
6507 | ac_tree_checking=1 ; ac_valgrind_checking= ;; |
6508 | no|none) ac_assert_checking= ; ac_checking= ; | |
6509 | ac_fold_checking= ; ac_gc_checking= ; | |
6510 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6511 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
cdce5c16 | 6512 | ac_tree_checking= ; ac_valgrind_checking= ;; |
e1bbfc5c | 6513 | all) ac_assert_checking=1 ; ac_checking=1 ; |
cdce5c16 NS |
6514 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6515 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6516 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
6517 | ac_tree_checking=1 ; ac_valgrind_checking= ;; | |
6518 | release) ac_assert_checking=1 ; ac_checking= ; | |
6519 | ac_fold_checking= ; ac_gc_checking= ; | |
6520 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6521 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
6522 | ac_tree_checking= ; ac_valgrind_checking= ;; | |
6523 | # these enable particular checks | |
e1bbfc5c NS |
6524 | assert) ac_assert_checking=1 ;; |
6525 | fold) ac_fold_checking=1 ;; | |
6526 | gc) ac_gc_checking=1 ;; | |
6527 | gcac) ac_gc_always_collect=1 ;; | |
6528 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6529 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6530 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6531 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6532 | tree) ac_tree_checking=1 ;; |
cdce5c16 | 6533 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6534 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6535 | echo "$as_me: error: unknown check category $check" >&2;} |
6536 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6537 | esac |
6538 | done | |
6539 | IFS="$ac_save_IFS" | |
06c37c96 | 6540 | |
ba479fd2 NN |
6541 | nocommon_flag="" |
6542 | if test x$ac_checking != x ; then | |
6543 | ||
6544 | cat >>confdefs.h <<\_ACEOF | |
6545 | #define ENABLE_CHECKING 1 | |
6546 | _ACEOF | |
6547 | ||
6548 | nocommon_flag=-fno-common | |
6549 | fi | |
6550 | ||
06c37c96 NS |
6551 | if test x$ac_assert_checking != x ; then |
6552 | ||
6553 | cat >>confdefs.h <<\_ACEOF | |
6554 | #define ENABLE_ASSERT_CHECKING 1 | |
6555 | _ACEOF | |
6556 | ||
b53ef395 | 6557 | fi |
232b67d9 | 6558 | |
b53ef395 NS |
6559 | if test x$ac_runtime_checking != x ; then |
6560 | ||
6561 | cat >>confdefs.h <<\_ACEOF | |
6562 | #define ENABLE_RUNTIME_CHECKING 1 | |
6563 | _ACEOF | |
6564 | ||
06c37c96 | 6565 | fi |
ba479fd2 NN |
6566 | if test x$ac_tree_checking != x ; then |
6567 | ||
6568 | cat >>confdefs.h <<\_ACEOF | |
6569 | #define ENABLE_TREE_CHECKING 1 | |
6570 | _ACEOF | |
6571 | ||
13f05fd0 | 6572 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6573 | fi |
13f05fd0 | 6574 | |
ba479fd2 NN |
6575 | if test x$ac_rtl_checking != x ; then |
6576 | ||
6577 | cat >>confdefs.h <<\_ACEOF | |
6578 | #define ENABLE_RTL_CHECKING 1 | |
6579 | _ACEOF | |
6580 | ||
6581 | fi | |
6582 | if test x$ac_rtlflag_checking != x ; then | |
6583 | ||
6584 | cat >>confdefs.h <<\_ACEOF | |
6585 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6586 | _ACEOF | |
6587 | ||
6588 | fi | |
6589 | if test x$ac_gc_checking != x ; then | |
6590 | ||
6591 | cat >>confdefs.h <<\_ACEOF | |
6592 | #define ENABLE_GC_CHECKING 1 | |
6593 | _ACEOF | |
6594 | ||
6595 | fi | |
6596 | if test x$ac_gc_always_collect != x ; then | |
6597 | ||
6598 | cat >>confdefs.h <<\_ACEOF | |
6599 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6600 | _ACEOF | |
6601 | ||
6602 | fi | |
6603 | if test x$ac_fold_checking != x ; then | |
6604 | ||
6605 | cat >>confdefs.h <<\_ACEOF | |
6606 | #define ENABLE_FOLD_CHECKING 1 | |
6607 | _ACEOF | |
6608 | ||
6609 | fi | |
6610 | valgrind_path_defines= | |
6611 | valgrind_command= | |
6612 | ||
ba479fd2 NN |
6613 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6614 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6615 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6616 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6617 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6618 | fi | |
6619 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 | |
6620 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6621 | else | |
6622 | # Is the header compilable? | |
6623 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 | |
6624 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
6625 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6626 | /* confdefs.h. */ |
6627 | _ACEOF | |
6628 | cat confdefs.h >>conftest.$ac_ext | |
6629 | cat >>conftest.$ac_ext <<_ACEOF | |
6630 | /* end confdefs.h. */ | |
6631 | $ac_includes_default | |
63cf211a | 6632 | #include <valgrind.h> |
ba479fd2 NN |
6633 | _ACEOF |
6634 | rm -f conftest.$ac_objext | |
6635 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 6636 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 6637 | ac_status=$? |
86da66b5 HPN |
6638 | grep -v '^ *+' conftest.er1 >conftest.err |
6639 | rm -f conftest.er1 | |
6640 | cat conftest.err >&5 | |
ba479fd2 NN |
6641 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
6642 | (exit $ac_status); } && | |
ec6c7392 PB |
6643 | { ac_try='test -z "$ac_c_werror_flag" |
6644 | || test ! -s conftest.err' | |
86da66b5 HPN |
6645 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6646 | (eval $ac_try) 2>&5 | |
6647 | ac_status=$? | |
6648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6649 | (exit $ac_status); }; } && | |
6650 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
6651 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6652 | (eval $ac_try) 2>&5 | |
6653 | ac_status=$? | |
6654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6655 | (exit $ac_status); }; }; then | |
6656 | ac_header_compiler=yes | |
6657 | else | |
6658 | echo "$as_me: failed program was:" >&5 | |
6659 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6660 | ||
6661 | ac_header_compiler=no | |
6662 | fi | |
86da66b5 | 6663 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
6664 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 |
6665 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
6666 | ||
6667 | # Is the header present? | |
6668 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 | |
6669 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
6670 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6671 | /* confdefs.h. */ |
6672 | _ACEOF | |
6673 | cat confdefs.h >>conftest.$ac_ext | |
6674 | cat >>conftest.$ac_ext <<_ACEOF | |
6675 | /* end confdefs.h. */ | |
6676 | #include <valgrind.h> | |
6677 | _ACEOF | |
6678 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6679 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6680 | ac_status=$? | |
6681 | grep -v '^ *+' conftest.er1 >conftest.err | |
6682 | rm -f conftest.er1 | |
6683 | cat conftest.err >&5 | |
6684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6685 | (exit $ac_status); } >/dev/null; then | |
6686 | if test -s conftest.err; then | |
6687 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6688 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6689 | else |
6690 | ac_cpp_err= | |
6691 | fi | |
6692 | else | |
6693 | ac_cpp_err=yes | |
6694 | fi | |
6695 | if test -z "$ac_cpp_err"; then | |
6696 | ac_header_preproc=yes | |
6697 | else | |
6698 | echo "$as_me: failed program was:" >&5 | |
6699 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6700 | ||
6701 | ac_header_preproc=no | |
6702 | fi | |
6703 | rm -f conftest.err conftest.$ac_ext | |
6704 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6705 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
6706 | ||
6707 | # So? What about this header? | |
86da66b5 HPN |
6708 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6709 | yes:no: ) | |
ba479fd2 NN |
6710 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6711 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6712 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6713 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6714 | ac_header_preproc=yes | |
ba479fd2 | 6715 | ;; |
86da66b5 | 6716 | no:yes:* ) |
ba479fd2 NN |
6717 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6718 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6719 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6720 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6721 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6722 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6723 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6724 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6725 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6726 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6727 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6728 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
ba479fd2 NN |
6729 | ( |
6730 | cat <<\_ASBOX | |
86da66b5 HPN |
6731 | ## ------------------------------------------ ## |
6732 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6733 | ## ------------------------------------------ ## | |
ba479fd2 NN |
6734 | _ASBOX |
6735 | ) | | |
6736 | sed "s/^/$as_me: WARNING: /" >&2 | |
6737 | ;; | |
6738 | esac | |
6739 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 | |
6740 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
6741 | if test "${ac_cv_header_valgrind_h+set}" = set; then | |
6742 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6743 | else | |
6744 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6745 | fi |
ba479fd2 NN |
6746 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6747 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
6748 | ||
6e3f3080 | 6749 | fi |
ba479fd2 | 6750 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6751 | have_valgrind_h=yes |
6752 | else | |
ba479fd2 | 6753 | have_valgrind_h=no |
6938ec6c NN |
6754 | fi |
6755 | ||
6756 | ||
ba479fd2 | 6757 | |
cdce5c16 | 6758 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6759 | # It is certainly possible that there's valgrind but no valgrind.h. |
6760 | # GCC relies on making annotations so we must have both. | |
ba479fd2 NN |
6761 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6762 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
6763 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6764 | /* confdefs.h. */ |
6765 | _ACEOF | |
6766 | cat confdefs.h >>conftest.$ac_ext | |
6767 | cat >>conftest.$ac_ext <<_ACEOF | |
6768 | /* end confdefs.h. */ | |
a207b594 | 6769 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6770 | #ifndef VALGRIND_DISCARD |
6771 | #error VALGRIND_DISCARD not defined | |
6772 | #endif | |
ba479fd2 NN |
6773 | _ACEOF |
6774 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6775 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6776 | ac_status=$? | |
6777 | grep -v '^ *+' conftest.er1 >conftest.err | |
6778 | rm -f conftest.er1 | |
6779 | cat conftest.err >&5 | |
6780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6781 | (exit $ac_status); } >/dev/null; then | |
6782 | if test -s conftest.err; then | |
6783 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6784 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6785 | else |
6786 | ac_cpp_err= | |
6787 | fi | |
6788 | else | |
6789 | ac_cpp_err=yes | |
6790 | fi | |
6791 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6792 | gcc_cv_header_valgrind_memcheck_h=yes |
6793 | else | |
ba479fd2 NN |
6794 | echo "$as_me: failed program was:" >&5 |
6795 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6796 | ||
a207b594 HPN |
6797 | gcc_cv_header_valgrind_memcheck_h=no |
6798 | fi | |
ba479fd2 NN |
6799 | rm -f conftest.err conftest.$ac_ext |
6800 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 | |
6801 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6802 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6803 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
6804 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
6805 | /* confdefs.h. */ |
6806 | _ACEOF | |
6807 | cat confdefs.h >>conftest.$ac_ext | |
6808 | cat >>conftest.$ac_ext <<_ACEOF | |
6809 | /* end confdefs.h. */ | |
a207b594 HPN |
6810 | #include <memcheck.h> |
6811 | #ifndef VALGRIND_DISCARD | |
6812 | #error VALGRIND_DISCARD not defined | |
6813 | #endif | |
ba479fd2 NN |
6814 | _ACEOF |
6815 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6816 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6817 | ac_status=$? | |
6818 | grep -v '^ *+' conftest.er1 >conftest.err | |
6819 | rm -f conftest.er1 | |
6820 | cat conftest.err >&5 | |
6821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6822 | (exit $ac_status); } >/dev/null; then | |
6823 | if test -s conftest.err; then | |
6824 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 6825 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
6826 | else |
6827 | ac_cpp_err= | |
6828 | fi | |
6829 | else | |
6830 | ac_cpp_err=yes | |
6831 | fi | |
6832 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6833 | gcc_cv_header_memcheck_h=yes |
6834 | else | |
ba479fd2 NN |
6835 | echo "$as_me: failed program was:" >&5 |
6836 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6837 | ||
cafe096b EC |
6838 | gcc_cv_header_memcheck_h=no |
6839 | fi | |
ba479fd2 NN |
6840 | rm -f conftest.err conftest.$ac_ext |
6841 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 | |
6842 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
6843 | ||
56694dd9 ZW |
6844 | # Prepare PATH_SEPARATOR. |
6845 | # The user is always right. | |
6846 | if test "${PATH_SEPARATOR+set}" != set; then | |
6847 | echo "#! /bin/sh" >conf$$.sh | |
6848 | echo "exit 0" >>conf$$.sh | |
6849 | chmod +x conf$$.sh | |
6850 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6851 | PATH_SEPARATOR=';' | |
6852 | else | |
6853 | PATH_SEPARATOR=: | |
6854 | fi | |
6855 | rm -f conf$$.sh | |
6856 | fi | |
6857 | ||
6858 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6859 | # as systems may use methods other than mode bits to determine executability. | |
6860 | cat >conf$$.file <<_ASEOF | |
6861 | #! /bin/sh | |
6862 | exit 0 | |
6863 | _ASEOF | |
6864 | chmod +x conf$$.file | |
6865 | if test -x conf$$.file >/dev/null 2>&1; then | |
6866 | ac_executable_p="test -x" | |
6867 | else | |
6868 | ac_executable_p="test -f" | |
6869 | fi | |
6870 | rm -f conf$$.file | |
6871 | ||
6872 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6873 | set dummy valgrind; ac_word=$2 |
ba479fd2 NN |
6874 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6875 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
6876 | if test "${ac_cv_path_valgrind_path+set}" = set; then | |
6877 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6878 | else |
6879 | case "$valgrind_path" in | |
56694dd9 ZW |
6880 | [\\/]* | ?:[\\/]*) |
6881 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6882 | ;; | |
414d23ae | 6883 | *) |
56694dd9 ZW |
6884 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6885 | for ac_dir in $PATH; do | |
6886 | IFS="$ac_save_IFS" | |
6887 | test -z "$ac_dir" && ac_dir=. | |
6888 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6889 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6890 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6891 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6892 | break 2 | |
6893 | fi | |
6894 | fi | |
6895 | done | |
6896 | done | |
6897 | IFS="$ac_save_IFS" | |
6898 | ;; | |
414d23ae | 6899 | esac |
75e93faa | 6900 | fi |
414d23ae HPN |
6901 | valgrind_path="$ac_cv_path_valgrind_path" |
6902 | if test -n "$valgrind_path"; then | |
ba479fd2 NN |
6903 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6904 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6905 | else |
ba479fd2 NN |
6906 | echo "$as_me:$LINENO: result: no" >&5 |
6907 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6908 | fi |
6909 | ||
a207b594 HPN |
6910 | if test "x$valgrind_path" = "x" \ |
6911 | || (test $have_valgrind_h = no \ | |
6912 | && test $gcc_cv_header_memcheck_h = no \ | |
6913 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6914 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6915 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6916 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6917 | fi |
6918 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6919 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6920 | |
6921 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6922 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6923 | _ACEOF |
75e93faa | 6924 | |
a207b594 | 6925 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6926 | |
6927 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6928 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6929 | _ACEOF |
a207b594 HPN |
6930 | |
6931 | fi | |
14011ca4 | 6932 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6933 | |
6934 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6935 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6936 | _ACEOF |
14011ca4 AJ |
6937 | |
6938 | fi | |
414d23ae | 6939 | fi |
75e93faa | 6940 | |
75e93faa ZW |
6941 | |
6942 | ||
74ee1642 PB |
6943 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
6944 | if test "${enable_mapped_location+set}" = set; then | |
6945 | enableval="$enable_mapped_location" | |
6946 | ||
6947 | else | |
6948 | enable_mapped_location=no | |
6949 | fi; | |
6950 | ||
6951 | if test "$enable_mapped_location" = yes ; then | |
6952 | ||
6953 | cat >>confdefs.h <<\_ACEOF | |
6954 | #define USE_MAPPED_LOCATION 1 | |
6955 | _ACEOF | |
6956 | ||
6957 | fi | |
6958 | ||
414d23ae HPN |
6959 | # Enable code coverage collection |
6960 | # Check whether --enable-coverage or --disable-coverage was given. | |
6961 | if test "${enable_coverage+set}" = set; then | |
6962 | enableval="$enable_coverage" | |
6963 | case "${enableval}" in | |
6dd297da NN |
6964 | yes|noopt) |
6965 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6966 | ;; | |
6967 | opt) | |
6968 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6969 | ;; | |
6970 | no) | |
6971 | # a.k.a. --disable-coverage | |
6972 | coverage_flags="" | |
6973 | ;; | |
6974 | *) | |
6975 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6976 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6977 | { (exit 1); exit 1; }; } | |
6dd297da | 6978 | ;; |
414d23ae | 6979 | esac |
75e93faa | 6980 | else |
414d23ae | 6981 | coverage_flags="" |
ba479fd2 | 6982 | fi; |
5c3bc9fb | 6983 | |
414d23ae | 6984 | |
439a7e54 DN |
6985 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
6986 | if test "${enable_gather_detailed_mem_stats+set}" = set; then | |
6987 | enableval="$enable_gather_detailed_mem_stats" | |
ba479fd2 | 6988 | |
439a7e54 DN |
6989 | else |
6990 | enable_gather_detailed_mem_stats=no | |
ba479fd2 | 6991 | fi; |
439a7e54 | 6992 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6993 | |
6994 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6995 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6996 | _ACEOF |
439a7e54 DN |
6997 | |
6998 | fi | |
6999 | ||
73458fb7 NN |
7000 | # ------------------------------- |
7001 | # Miscenalleous configure options | |
7002 | # ------------------------------- | |
34a86c2b NN |
7003 | |
7004 | # With stabs | |
ba479fd2 | 7005 | |
34a86c2b NN |
7006 | # Check whether --with-stabs or --without-stabs was given. |
7007 | if test "${with_stabs+set}" = set; then | |
7008 | withval="$with_stabs" | |
7009 | stabs="$with_stabs" | |
7010 | else | |
7011 | stabs=no | |
ba479fd2 | 7012 | fi; |
cafe096b | 7013 | |
34a86c2b NN |
7014 | # Determine whether or not multilibs are enabled. |
7015 | # Check whether --enable-multilib or --disable-multilib was given. | |
7016 | if test "${enable_multilib+set}" = set; then | |
7017 | enableval="$enable_multilib" | |
ba479fd2 | 7018 | |
34a86c2b NN |
7019 | else |
7020 | enable_multilib=yes | |
ba479fd2 | 7021 | fi; |
75e93faa | 7022 | |
34a86c2b | 7023 | |
414d23ae HPN |
7024 | # Enable __cxa_atexit for C++. |
7025 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
7026 | if test "${enable___cxa_atexit+set}" = set; then | |
7027 | enableval="$enable___cxa_atexit" | |
75e93faa | 7028 | |
ba479fd2 | 7029 | fi; |
75e93faa | 7030 | |
486aa804 BE |
7031 | # Enable C extension for decimal float if target supports it. |
7032 | # Check whether --enable-decimal-float or --disable-decimal-float was given. | |
7033 | if test "${enable_decimal_float+set}" = set; then | |
7034 | enableval="$enable_decimal_float" | |
7035 | ||
7036 | if test x$enablevar = xyes ; then | |
7037 | case $target in | |
7038 | powerpc*-*-linux* | i?86*-*-linux*) | |
a4a9df5f | 7039 | enable_decimal_float=yes |
486aa804 BE |
7040 | ;; |
7041 | *) | |
7042 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7043 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7044 | enable_decimal_float=no | |
7045 | ;; | |
7046 | esac | |
7047 | fi | |
7048 | ||
7049 | else | |
a4a9df5f | 7050 | enable_decimal_float=no |
486aa804 BE |
7051 | fi; |
7052 | ||
7053 | ||
7054 | ||
7055 | dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi` | |
7056 | ||
7057 | cat >>confdefs.h <<_ACEOF | |
7058 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7059 | _ACEOF | |
7060 | ||
7061 | ||
414d23ae HPN |
7062 | # Enable threads |
7063 | # Pass with no value to take the default | |
7064 | # Pass with a value to specify a thread package | |
7065 | # Check whether --enable-threads or --disable-threads was given. | |
7066 | if test "${enable_threads+set}" = set; then | |
7067 | enableval="$enable_threads" | |
ba479fd2 | 7068 | |
414d23ae HPN |
7069 | else |
7070 | enable_threads='' | |
ba479fd2 | 7071 | fi; |
414d23ae | 7072 | |
8dea1cca DD |
7073 | # Check whether --enable-tls or --disable-tls was given. |
7074 | if test "${enable_tls+set}" = set; then | |
7075 | enableval="$enable_tls" | |
7076 | ||
7077 | case $enable_tls in | |
7078 | yes | no) ;; | |
7079 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7080 | Valid choices are 'yes' and 'no'." >&5 | |
7081 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7082 | Valid choices are 'yes' and 'no'." >&2;} | |
7083 | { (exit 1); exit 1; }; } ;; | |
7084 | esac | |
7085 | ||
7086 | else | |
7087 | enable_tls='' | |
7088 | fi; | |
7089 | ||
414d23ae HPN |
7090 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
7091 | if test "${enable_objc_gc+set}" = set; then | |
7092 | enableval="$enable_objc_gc" | |
7093 | if test x$enable_objc_gc = xno; then | |
7094 | objc_boehm_gc='' | |
7095 | else | |
7096 | objc_boehm_gc=1 | |
7097 | fi | |
7098 | else | |
7099 | objc_boehm_gc='' | |
ba479fd2 | 7100 | fi; |
75e93faa ZW |
7101 | |
7102 | ||
414d23ae HPN |
7103 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
7104 | if test "${with_dwarf2+set}" = set; then | |
7105 | withval="$with_dwarf2" | |
7106 | dwarf2="$with_dwarf2" | |
75e93faa | 7107 | else |
414d23ae | 7108 | dwarf2=no |
ba479fd2 | 7109 | fi; |
75e93faa | 7110 | |
414d23ae HPN |
7111 | # Check whether --enable-shared or --disable-shared was given. |
7112 | if test "${enable_shared+set}" = set; then | |
7113 | enableval="$enable_shared" | |
ba479fd2 | 7114 | |
414d23ae HPN |
7115 | case $enable_shared in |
7116 | yes | no) ;; | |
7117 | *) | |
7118 | enable_shared=no | |
7119 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7120 | for pkg in $enableval; do | |
7121 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7122 | enable_shared=yes | |
7123 | fi | |
7124 | done | |
7125 | IFS="$ac_save_ifs" | |
7126 | ;; | |
7127 | esac | |
7128 | ||
75e93faa | 7129 | else |
414d23ae | 7130 | enable_shared=yes |
ba479fd2 | 7131 | fi; |
75e93faa | 7132 | |
75e93faa | 7133 | |
75e93faa | 7134 | |
160633c6 MM |
7135 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
7136 | if test "${with_build_sysroot+set}" = set; then | |
7137 | withval="$with_build_sysroot" | |
7138 | ||
7139 | fi; | |
7140 | ||
7141 | ||
4977bab6 ZW |
7142 | # Check whether --with-sysroot or --without-sysroot was given. |
7143 | if test "${with_sysroot+set}" = set; then | |
7144 | withval="$with_sysroot" | |
ba479fd2 | 7145 | |
4977bab6 | 7146 | case ${with_sysroot} in |
caa55b1e | 7147 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7148 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7149 | esac | |
ba479fd2 | 7150 | |
4977bab6 ZW |
7151 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
7152 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
7153 | ||
047d636f DJ |
7154 | if test "x$exec_prefix" = xNONE; then |
7155 | if test "x$prefix" = xNONE; then | |
7156 | test_prefix=/usr/local | |
7157 | else | |
7158 | test_prefix=$prefix | |
7159 | fi | |
7160 | else | |
7161 | test_prefix=$exec_prefix | |
7162 | fi | |
7163 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
7164 | "${test_prefix}"|"${test_prefix}/"*|\ |
7165 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
7166 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7167 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7168 | ;; | |
7169 | esac | |
7170 | ||
4977bab6 | 7171 | else |
ba479fd2 | 7172 | |
4977bab6 | 7173 | TARGET_SYSTEM_ROOT= |
db720d9a | 7174 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7175 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7176 | ||
ba479fd2 | 7177 | fi; |
4977bab6 ZW |
7178 | |
7179 | ||
7180 | ||
7181 | ||
d1bd0ded | 7182 | # Build with intermodule optimisations |
d1bd0ded GK |
7183 | # Check whether --enable-intermodule or --disable-intermodule was given. |
7184 | if test "${enable_intermodule+set}" = set; then | |
7185 | enableval="$enable_intermodule" | |
0c46c5c7 KC |
7186 | case ${enable_intermodule} in |
7187 | yes) onestep="-onestep";; | |
7188 | *) onestep="";; | |
d1bd0ded | 7189 | esac |
0c46c5c7 KC |
7190 | else |
7191 | onestep="" | |
ba479fd2 | 7192 | fi; |
d1bd0ded GK |
7193 | |
7194 | ||
f3c9f174 NN |
7195 | # Sanity check enable_languages in case someone does not run the toplevel |
7196 | # configure # script. | |
7197 | # Check whether --enable-languages or --disable-languages was given. | |
7198 | if test "${enable_languages+set}" = set; then | |
7199 | enableval="$enable_languages" | |
7200 | case ,${enable_languages}, in | |
7201 | ,,|,yes,) | |
7202 | # go safe -- we cannot be much sure without the toplevel | |
7203 | # configure's | |
7204 | # analysis of which target libs are present and usable | |
7205 | enable_languages=c | |
7206 | ;; | |
7207 | *,all,*) | |
7208 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7209 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7210 | { (exit 1); exit 1; }; } | |
7211 | ;; | |
7212 | *,c,*) | |
7213 | ;; | |
7214 | *) | |
7215 | enable_languages=c,${enable_languages} | |
7216 | ;; | |
7217 | esac | |
7218 | else | |
7219 | enable_languages=c | |
7220 | fi; | |
7221 | ||
9288b845 CD |
7222 | # Used by documentation targets |
7223 | ||
7224 | ||
7225 | ||
f3c9f174 | 7226 | |
73458fb7 NN |
7227 | # ------------------------- |
7228 | # Checks for other programs | |
7229 | # ------------------------- | |
5b67ad6f | 7230 | |
ba479fd2 NN |
7231 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7232 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
86da66b5 | 7233 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` |
ba479fd2 NN |
7234 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then |
7235 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9a25f70 | 7236 | else |
ba479fd2 | 7237 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7238 | all: |
ba479fd2 NN |
7239 | @echo 'ac_maketemp="$(MAKE)"' |
7240 | _ACEOF | |
e9a25f70 | 7241 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
ba479fd2 | 7242 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
e9a25f70 JL |
7243 | if test -n "$ac_maketemp"; then |
7244 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7245 | else | |
7246 | eval ac_cv_prog_make_${ac_make}_set=no | |
7247 | fi | |
ba479fd2 | 7248 | rm -f conftest.make |
e9a25f70 JL |
7249 | fi |
7250 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
ba479fd2 NN |
7251 | echo "$as_me:$LINENO: result: yes" >&5 |
7252 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7253 | SET_MAKE= |
7254 | else | |
ba479fd2 NN |
7255 | echo "$as_me:$LINENO: result: no" >&5 |
7256 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7257 | SET_MAKE="MAKE=${MAKE-make}" |
7258 | fi | |
7259 | ||
7260 | ||
861bb6c1 | 7261 | # Find some useful tools |
ba479fd2 | 7262 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7263 | do |
ba479fd2 | 7264 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7265 | set dummy $ac_prog; ac_word=$2 |
ba479fd2 NN |
7266 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7267 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7268 | if test "${ac_cv_prog_AWK+set}" = set; then | |
7269 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7270 | else |
7271 | if test -n "$AWK"; then | |
7272 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7273 | else | |
ba479fd2 NN |
7274 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7275 | for as_dir in $PATH | |
7276 | do | |
7277 | IFS=$as_save_IFS | |
7278 | test -z "$as_dir" && as_dir=. | |
7279 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7280 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7281 | ac_cv_prog_AWK="$ac_prog" | |
7282 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7283 | break 2 | |
7284 | fi | |
7285 | done | |
7286 | done | |
7287 | ||
861bb6c1 JL |
7288 | fi |
7289 | fi | |
ba479fd2 | 7290 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7291 | if test -n "$AWK"; then |
ba479fd2 NN |
7292 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7293 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7294 | else |
ba479fd2 NN |
7295 | echo "$as_me:$LINENO: result: no" >&5 |
7296 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7297 | fi |
7298 | ||
ba479fd2 | 7299 | test -n "$AWK" && break |
861bb6c1 JL |
7300 | done |
7301 | ||
776dc15d | 7302 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7303 | # Bail out if it's missing. |
7304 | case ${AWK} in | |
ba479fd2 NN |
7305 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7306 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7307 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7308 | esac |
7309 | ||
ba479fd2 NN |
7310 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7311 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
7312 | if test "${gcc_cv_prog_LN_S+set}" = set; then | |
7313 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7314 | else |
7315 | rm -f conftestdata_t | |
7316 | echo >conftestdata_f | |
7317 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7318 | then | |
7319 | gcc_cv_prog_LN_S="ln -s" | |
7320 | else | |
7321 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7322 | then | |
7323 | gcc_cv_prog_LN_S=ln | |
7324 | else | |
35f06ae4 PB |
7325 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7326 | then | |
06c3418c | 7327 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7328 | else |
7329 | gcc_cv_prog_LN_S=cp | |
7330 | fi | |
0a4b6309 RL |
7331 | fi |
7332 | fi | |
7333 | rm -f conftestdata_f conftestdata_t | |
7334 | ||
7335 | fi | |
7336 | LN_S="$gcc_cv_prog_LN_S" | |
7337 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
ba479fd2 NN |
7338 | echo "$as_me:$LINENO: result: yes" >&5 |
7339 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7340 | else |
7341 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
ba479fd2 NN |
7342 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7343 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7344 | else |
35f06ae4 PB |
7345 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7346 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7347 | fi |
7348 | fi | |
7349 | ||
18fc9bd4 RG |
7350 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7351 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
7352 | if test "${acx_cv_prog_LN+set}" = set; then | |
7353 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7354 | else | |
7355 | rm -f conftestdata_t | |
7356 | echo >conftestdata_f | |
7357 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7358 | then | |
7359 | acx_cv_prog_LN=ln | |
7360 | else | |
7361 | acx_cv_prog_LN=no | |
7362 | fi | |
7363 | rm -f conftestdata_f conftestdata_t | |
7364 | ||
7365 | fi | |
7366 | if test $acx_cv_prog_LN = no; then | |
7367 | LN="$LN_S" | |
7368 | echo "$as_me:$LINENO: result: no, using $LN" >&5 | |
7369 | echo "${ECHO_T}no, using $LN" >&6 | |
7370 | else | |
7371 | LN="$acx_cv_prog_LN" | |
7372 | echo "$as_me:$LINENO: result: yes" >&5 | |
7373 | echo "${ECHO_T}yes" >&6 | |
7374 | fi | |
7375 | ||
ba479fd2 NN |
7376 | if test -n "$ac_tool_prefix"; then |
7377 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7378 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
7379 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7380 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7381 | if test "${ac_cv_prog_RANLIB+set}" = set; then | |
7382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7383 | else |
7384 | if test -n "$RANLIB"; then | |
7385 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7386 | else | |
ba479fd2 NN |
7387 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7388 | for as_dir in $PATH | |
7389 | do | |
7390 | IFS=$as_save_IFS | |
7391 | test -z "$as_dir" && as_dir=. | |
7392 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7393 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7394 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
7395 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7396 | break 2 | |
7397 | fi | |
7398 | done | |
7399 | done | |
7400 | ||
6e3f3080 NN |
7401 | fi |
7402 | fi | |
ba479fd2 | 7403 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7404 | if test -n "$RANLIB"; then |
ba479fd2 NN |
7405 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7406 | echo "${ECHO_T}$RANLIB" >&6 | |
7407 | else | |
7408 | echo "$as_me:$LINENO: result: no" >&5 | |
7409 | echo "${ECHO_T}no" >&6 | |
7410 | fi | |
7411 | ||
7412 | fi | |
7413 | if test -z "$ac_cv_prog_RANLIB"; then | |
7414 | ac_ct_RANLIB=$RANLIB | |
7415 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7416 | set dummy ranlib; ac_word=$2 | |
7417 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7418 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7419 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
7420 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7421 | else | |
7422 | if test -n "$ac_ct_RANLIB"; then | |
7423 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7424 | else | |
7425 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7426 | for as_dir in $PATH | |
7427 | do | |
7428 | IFS=$as_save_IFS | |
7429 | test -z "$as_dir" && as_dir=. | |
7430 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7431 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7432 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
7433 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7434 | break 2 | |
7435 | fi | |
7436 | done | |
7437 | done | |
7438 | ||
7439 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
7440 | fi | |
7441 | fi | |
7442 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7443 | if test -n "$ac_ct_RANLIB"; then | |
7444 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
7445 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7446 | else |
ba479fd2 NN |
7447 | echo "$as_me:$LINENO: result: no" >&5 |
7448 | echo "${ECHO_T}no" >&6 | |
7449 | fi | |
7450 | ||
7451 | RANLIB=$ac_ct_RANLIB | |
7452 | else | |
7453 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7454 | fi |
7455 | ||
343a6100 MM |
7456 | case "${host}" in |
7457 | *-*-darwin*) | |
7458 | # By default, the Darwin ranlib will not treat common symbols as | |
7459 | # definitions when building the archive table of contents. Other | |
7460 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7461 | # it behave similarly. | |
7462 | ranlib_flags="-c" | |
7463 | ;; | |
7464 | *) | |
7465 | ranlib_flags="" | |
7466 | esac | |
7467 | ||
7468 | ||
0a4b6309 RL |
7469 | # Find a good install program. We prefer a C program (faster), |
7470 | # so one script is as good as another. But avoid the broken or | |
7471 | # incompatible versions: | |
7472 | # SysV /etc/install, /usr/sbin/install | |
7473 | # SunOS /usr/etc/install | |
7474 | # IRIX /sbin/install | |
7475 | # AIX /bin/install | |
7476 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7477 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7478 | # ./install, which can be erroneously created by make from ./install.sh. | |
ba479fd2 NN |
7479 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7480 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7481 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7482 | if test "${ac_cv_path_install+set}" = set; then |
7483 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7484 | else |
7485 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7486 | for ac_dir in $PATH; do | |
7487 | # Account for people who put trailing slashes in PATH elements. | |
7488 | case "$ac_dir/" in | |
7489 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7490 | *) | |
7491 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7492 | for ac_prog in ginstall scoinst install; do | |
7493 | if test -f $ac_dir/$ac_prog; then | |
7494 | if test $ac_prog = install && | |
7495 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7496 | # AIX install. It has an incompatible calling convention. | |
7497 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7498 | : | |
7499 | else | |
7500 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7501 | break 2 | |
7502 | fi | |
7503 | fi | |
7504 | done | |
7505 | ;; | |
7506 | esac | |
7507 | done | |
7508 | IFS="$ac_save_IFS" | |
7509 | ||
7510 | fi | |
7511 | if test "${ac_cv_path_install+set}" = set; then | |
7512 | INSTALL="$ac_cv_path_install" | |
7513 | else | |
7514 | # As a last resort, use the slow shell script. We don't cache a | |
7515 | # path for INSTALL within a source directory, because that will | |
7516 | # break other packages using the cache if that directory is | |
7517 | # removed, or if the path is relative. | |
7518 | INSTALL="$ac_install_sh" | |
7519 | fi | |
7520 | fi | |
ba479fd2 NN |
7521 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7522 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7523 | |
7524 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7525 | # It thinks the first close brace ends the variable substitution. | |
7526 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7527 | ||
7528 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7529 | ||
861bb6c1 | 7530 | |
3a000df0 | 7531 | # See if cmp has --ignore-initial. |
ba479fd2 NN |
7532 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7533 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
7534 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then | |
7535 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7536 | else |
7537 | echo abfoo >t1 | |
7538 | echo cdfoo >t2 | |
269a7343 | 7539 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7540 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7541 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7542 | : |
3a000df0 KC |
7543 | else |
7544 | gcc_cv_prog_cmp_skip=gnucompare | |
7545 | fi | |
269a7343 KG |
7546 | fi |
7547 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7548 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7549 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7550 | : | |
7551 | else | |
7552 | gcc_cv_prog_cmp_skip=fastcompare | |
7553 | fi | |
7554 | fi | |
3a000df0 KC |
7555 | fi |
7556 | rm t1 t2 | |
7557 | ||
7558 | fi | |
ba479fd2 NN |
7559 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7560 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7561 | make_compare_target=$gcc_cv_prog_cmp_skip |
7562 | ||
7563 | ||
7564 | ||
73458fb7 NN |
7565 | # See if we have the mktemp command. |
7566 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7567 | set dummy mktemp; ac_word=$2 | |
ba479fd2 NN |
7568 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7569 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7570 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then | |
7571 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7572 | else |
7573 | if test -n "$have_mktemp_command"; then | |
7574 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7575 | else | |
ba479fd2 NN |
7576 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7577 | for as_dir in $PATH | |
7578 | do | |
7579 | IFS=$as_save_IFS | |
7580 | test -z "$as_dir" && as_dir=. | |
7581 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7582 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7583 | ac_cv_prog_have_mktemp_command="yes" | |
7584 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7585 | break 2 | |
7586 | fi | |
7587 | done | |
7588 | done | |
7589 | ||
73458fb7 NN |
7590 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7591 | fi | |
7592 | fi | |
ba479fd2 | 7593 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7594 | if test -n "$have_mktemp_command"; then |
ba479fd2 NN |
7595 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7596 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7597 | else |
ba479fd2 NN |
7598 | echo "$as_me:$LINENO: result: no" >&5 |
7599 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7600 | fi |
7601 | ||
7602 | ||
7c27e184 PB |
7603 | MISSING="${CONFIG_SHELL-/bin/sh} $srcdir/../missing" |
7604 | ||
7605 | # See if makeinfo has been installed and is modern enough | |
7606 | # that we can use it. | |
9f18db39 PB |
7607 | |
7608 | ac_executable_extensions="$build_exeext" | |
7609 | ||
7c27e184 | 7610 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7611 | set dummy makeinfo; ac_word=$2 |
ba479fd2 NN |
7612 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7613 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7614 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then | |
7615 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7616 | else |
7617 | if test -n "$MAKEINFO"; then | |
7618 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7619 | else | |
ba479fd2 NN |
7620 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7621 | for as_dir in $PATH | |
7622 | do | |
7623 | IFS=$as_save_IFS | |
7624 | test -z "$as_dir" && as_dir=. | |
7625 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7626 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7627 | ac_cv_prog_MAKEINFO="makeinfo" | |
7628 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7629 | break 2 | |
7630 | fi | |
7631 | done | |
7632 | done | |
7633 | ||
73458fb7 NN |
7634 | fi |
7635 | fi | |
ba479fd2 | 7636 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7637 | if test -n "$MAKEINFO"; then |
ba479fd2 NN |
7638 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7639 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7640 | else |
ba479fd2 NN |
7641 | echo "$as_me:$LINENO: result: no" >&5 |
7642 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7643 | fi |
7644 | ||
7645 | if test -n "$MAKEINFO"; then | |
7646 | # Found it, now check the version. | |
ba479fd2 NN |
7647 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7648 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
7649 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then | |
7650 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7651 | else |
7652 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
7653 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
57255173 | 7654 | echo "configure:7654: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
7655 | case $ac_prog_version in |
7656 | '') gcc_cv_prog_makeinfo_modern=no;; | |
1a598a97 | 7657 | 4.[4-9]*) |
73458fb7 NN |
7658 | gcc_cv_prog_makeinfo_modern=yes;; |
7659 | *) gcc_cv_prog_makeinfo_modern=no;; | |
7660 | esac | |
7661 | ||
7662 | fi | |
ba479fd2 NN |
7663 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7664 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
73458fb7 NN |
7665 | else |
7666 | gcc_cv_prog_makeinfo_modern=no | |
7667 | fi | |
7668 | ||
73458fb7 | 7669 | if test $gcc_cv_prog_makeinfo_modern = no; then |
7c27e184 | 7670 | MAKEINFO="$MISSING makeinfo" |
ba479fd2 NN |
7671 | { echo "$as_me:$LINENO: WARNING: |
7672 | *** Makeinfo is missing or too old. | |
7673 | *** Info documentation will not be built." >&5 | |
7674 | echo "$as_me: WARNING: | |
cafe096b | 7675 | *** Makeinfo is missing or too old. |
ba479fd2 | 7676 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7677 | BUILD_INFO= |
7678 | else | |
ba479fd2 | 7679 | BUILD_INFO=info |
73458fb7 NN |
7680 | fi |
7681 | ||
7c27e184 | 7682 | |
73458fb7 | 7683 | # Is pod2man recent enough to regenerate manpages? |
ba479fd2 NN |
7684 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7685 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7686 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
ba479fd2 NN |
7687 | echo "$as_me:$LINENO: result: yes" >&5 |
7688 | echo "${ECHO_T}yes" >&6 | |
7689 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 7690 | else |
ba479fd2 NN |
7691 | echo "$as_me:$LINENO: result: no" >&5 |
7692 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7693 | GENERATED_MANPAGES= |
7694 | fi | |
7695 | ||
7c27e184 | 7696 | |
73458fb7 | 7697 | # How about lex? |
7c27e184 PB |
7698 | for ac_prog in flex |
7699 | do | |
7700 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7701 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7702 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7703 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7704 | if test "${ac_cv_prog_FLEX+set}" = set; then | |
7705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7706 | else |
7707 | if test -n "$FLEX"; then | |
7708 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7709 | else | |
ba479fd2 NN |
7710 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7711 | for as_dir in $PATH | |
7712 | do | |
7713 | IFS=$as_save_IFS | |
7714 | test -z "$as_dir" && as_dir=. | |
7715 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7716 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7717 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7718 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7719 | break 2 | |
7720 | fi | |
7721 | done | |
7722 | done | |
7723 | ||
73458fb7 NN |
7724 | fi |
7725 | fi | |
ba479fd2 | 7726 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7727 | if test -n "$FLEX"; then |
ba479fd2 NN |
7728 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7729 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7730 | else |
ba479fd2 NN |
7731 | echo "$as_me:$LINENO: result: no" >&5 |
7732 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7733 | fi |
7734 | ||
7c27e184 PB |
7735 | test -n "$FLEX" && break |
7736 | done | |
7737 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7738 | ||
73458fb7 NN |
7739 | |
7740 | # Bison? | |
7c27e184 PB |
7741 | for ac_prog in bison |
7742 | do | |
7743 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7744 | set dummy $ac_prog; ac_word=$2 | |
ba479fd2 NN |
7745 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7746 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7747 | if test "${ac_cv_prog_BISON+set}" = set; then | |
7748 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7749 | else |
7750 | if test -n "$BISON"; then | |
7751 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7752 | else | |
ba479fd2 NN |
7753 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7754 | for as_dir in $PATH | |
7755 | do | |
7756 | IFS=$as_save_IFS | |
7757 | test -z "$as_dir" && as_dir=. | |
7758 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7759 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7c27e184 | 7760 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7761 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7762 | break 2 | |
7763 | fi | |
7764 | done | |
7765 | done | |
7766 | ||
73458fb7 NN |
7767 | fi |
7768 | fi | |
ba479fd2 | 7769 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7770 | if test -n "$BISON"; then |
ba479fd2 NN |
7771 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7772 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7773 | else |
ba479fd2 NN |
7774 | echo "$as_me:$LINENO: result: no" >&5 |
7775 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7776 | fi |
7777 | ||
7c27e184 PB |
7778 | test -n "$BISON" && break |
7779 | done | |
7780 | test -n "$BISON" || BISON="$MISSING bison" | |
7781 | ||
7782 | ||
7783 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7784 | # check for build == host before using them. | |
73458fb7 | 7785 | |
f6a874ac | 7786 | # NM |
414adbdd GK |
7787 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7788 | && test -d ../binutils ; then | |
f6a874ac JW |
7789 | NM='$(objdir)/../binutils/nm-new' |
7790 | else | |
7791 | # Extract the first word of "nm", so it can be a program name with args. | |
7792 | set dummy nm; ac_word=$2 | |
7793 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7794 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7795 | if test "${ac_cv_prog_NM+set}" = set; then | |
7796 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7797 | else | |
7798 | if test -n "$NM"; then | |
7799 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7800 | else | |
7801 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7802 | for as_dir in $PATH | |
7803 | do | |
7804 | IFS=$as_save_IFS | |
7805 | test -z "$as_dir" && as_dir=. | |
7806 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7807 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7808 | ac_cv_prog_NM="nm" | |
7809 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7810 | break 2 | |
7811 | fi | |
7812 | done | |
7813 | done | |
7814 | ||
7815 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7816 | fi | |
7817 | fi | |
7818 | NM=$ac_cv_prog_NM | |
7819 | if test -n "$NM"; then | |
7820 | echo "$as_me:$LINENO: result: $NM" >&5 | |
7821 | echo "${ECHO_T}$NM" >&6 | |
7822 | else | |
7823 | echo "$as_me:$LINENO: result: no" >&5 | |
7824 | echo "${ECHO_T}no" >&6 | |
7825 | fi | |
7826 | ||
7827 | fi | |
7828 | ||
7829 | # AR | |
414adbdd GK |
7830 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7831 | && test -d ../binutils ; then | |
f6a874ac JW |
7832 | AR='$(objdir)/../binutils/ar' |
7833 | else | |
7834 | # Extract the first word of "ar", so it can be a program name with args. | |
7835 | set dummy ar; ac_word=$2 | |
7836 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
7837 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
7838 | if test "${ac_cv_prog_AR+set}" = set; then | |
7839 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7840 | else | |
7841 | if test -n "$AR"; then | |
7842 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7843 | else | |
7844 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7845 | for as_dir in $PATH | |
7846 | do | |
7847 | IFS=$as_save_IFS | |
7848 | test -z "$as_dir" && as_dir=. | |
7849 | for ac_exec_ext in '' $ac_executable_extensions; do | |
7850 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
7851 | ac_cv_prog_AR="ar" | |
7852 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7853 | break 2 | |
7854 | fi | |
7855 | done | |
7856 | done | |
7857 | ||
7858 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7859 | fi | |
7860 | fi | |
7861 | AR=$ac_cv_prog_AR | |
7862 | if test -n "$AR"; then | |
7863 | echo "$as_me:$LINENO: result: $AR" >&5 | |
7864 | echo "${ECHO_T}$AR" >&6 | |
7865 | else | |
7866 | echo "$as_me:$LINENO: result: no" >&5 | |
7867 | echo "${ECHO_T}no" >&6 | |
7868 | fi | |
7869 | ||
7870 | fi | |
7871 | ||
7872 | ||
73458fb7 NN |
7873 | # -------------------- |
7874 | # Checks for C headers | |
7875 | # -------------------- | |
7876 | ||
ba479fd2 NN |
7877 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7878 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
7879 | if test "${gcc_cv_glibc+set}" = set; then | |
7880 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7881 | else | |
7882 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7883 | /* confdefs.h. */ |
7884 | _ACEOF | |
7885 | cat confdefs.h >>conftest.$ac_ext | |
7886 | cat >>conftest.$ac_ext <<_ACEOF | |
7887 | /* end confdefs.h. */ | |
73458fb7 | 7888 | #include <features.h> |
ba479fd2 NN |
7889 | int |
7890 | main () | |
7891 | { | |
73458fb7 NN |
7892 | |
7893 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7894 | #error Not a GNU C library system | |
7895 | #endif | |
ba479fd2 NN |
7896 | ; |
7897 | return 0; | |
7898 | } | |
7899 | _ACEOF | |
7900 | rm -f conftest.$ac_objext | |
7901 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7902 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7903 | ac_status=$? |
86da66b5 HPN |
7904 | grep -v '^ *+' conftest.er1 >conftest.err |
7905 | rm -f conftest.er1 | |
7906 | cat conftest.err >&5 | |
ba479fd2 NN |
7907 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7908 | (exit $ac_status); } && | |
ec6c7392 PB |
7909 | { ac_try='test -z "$ac_c_werror_flag" |
7910 | || test ! -s conftest.err' | |
86da66b5 HPN |
7911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7912 | (eval $ac_try) 2>&5 | |
7913 | ac_status=$? | |
7914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7915 | (exit $ac_status); }; } && | |
7916 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7917 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7918 | (eval $ac_try) 2>&5 | |
7919 | ac_status=$? | |
7920 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7921 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7922 | gcc_cv_glibc=yes |
7923 | else | |
ba479fd2 NN |
7924 | echo "$as_me: failed program was:" >&5 |
7925 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7926 | ||
7927 | gcc_cv_glibc=no | |
73458fb7 | 7928 | fi |
86da66b5 | 7929 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7930 | fi |
7931 | ||
ba479fd2 NN |
7932 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
7933 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 7934 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
7935 | |
7936 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 7937 | #define _GNU_SOURCE 1 |
ba479fd2 | 7938 | _ACEOF |
73458fb7 NN |
7939 | |
7940 | fi | |
7941 | ||
ca9bc441 NN |
7942 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
7943 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 7944 | |
ca9bc441 NN |
7945 | ac_c_preproc_warn_flag=yes |
7946 | ||
ba479fd2 NN |
7947 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
7948 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
7949 | if test "${ac_cv_header_stdc+set}" = set; then | |
7950 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 7951 | else |
ba479fd2 | 7952 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
7953 | /* confdefs.h. */ |
7954 | _ACEOF | |
7955 | cat confdefs.h >>conftest.$ac_ext | |
7956 | cat >>conftest.$ac_ext <<_ACEOF | |
7957 | /* end confdefs.h. */ | |
956d6950 JL |
7958 | #include <stdlib.h> |
7959 | #include <stdarg.h> | |
7960 | #include <string.h> | |
7961 | #include <float.h> | |
ba479fd2 NN |
7962 | |
7963 | int | |
7964 | main () | |
7965 | { | |
7966 | ||
7967 | ; | |
7968 | return 0; | |
7969 | } | |
7970 | _ACEOF | |
7971 | rm -f conftest.$ac_objext | |
7972 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 7973 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 7974 | ac_status=$? |
86da66b5 HPN |
7975 | grep -v '^ *+' conftest.er1 >conftest.err |
7976 | rm -f conftest.er1 | |
7977 | cat conftest.err >&5 | |
ba479fd2 NN |
7978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
7979 | (exit $ac_status); } && | |
ec6c7392 PB |
7980 | { ac_try='test -z "$ac_c_werror_flag" |
7981 | || test ! -s conftest.err' | |
86da66b5 HPN |
7982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7983 | (eval $ac_try) 2>&5 | |
7984 | ac_status=$? | |
7985 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7986 | (exit $ac_status); }; } && | |
7987 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
7988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
7989 | (eval $ac_try) 2>&5 | |
7990 | ac_status=$? | |
7991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7992 | (exit $ac_status); }; }; then | |
956d6950 JL |
7993 | ac_cv_header_stdc=yes |
7994 | else | |
ba479fd2 NN |
7995 | echo "$as_me: failed program was:" >&5 |
7996 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7997 | ||
7998 | ac_cv_header_stdc=no | |
956d6950 | 7999 | fi |
86da66b5 | 8000 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
8001 | |
8002 | if test $ac_cv_header_stdc = yes; then | |
8003 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 8004 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8005 | /* confdefs.h. */ |
8006 | _ACEOF | |
8007 | cat confdefs.h >>conftest.$ac_ext | |
8008 | cat >>conftest.$ac_ext <<_ACEOF | |
8009 | /* end confdefs.h. */ | |
956d6950 | 8010 | #include <string.h> |
ba479fd2 NN |
8011 | |
8012 | _ACEOF | |
956d6950 | 8013 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8014 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
8015 | : |
8016 | else | |
956d6950 JL |
8017 | ac_cv_header_stdc=no |
8018 | fi | |
8019 | rm -f conftest* | |
8020 | ||
8021 | fi | |
8022 | ||
8023 | if test $ac_cv_header_stdc = yes; then | |
8024 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8025 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8026 | /* confdefs.h. */ |
8027 | _ACEOF | |
8028 | cat confdefs.h >>conftest.$ac_ext | |
8029 | cat >>conftest.$ac_ext <<_ACEOF | |
8030 | /* end confdefs.h. */ | |
956d6950 | 8031 | #include <stdlib.h> |
ba479fd2 NN |
8032 | |
8033 | _ACEOF | |
956d6950 | 8034 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8035 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8036 | : |
8037 | else | |
956d6950 JL |
8038 | ac_cv_header_stdc=no |
8039 | fi | |
8040 | rm -f conftest* | |
8041 | ||
8042 | fi | |
8043 | ||
8044 | if test $ac_cv_header_stdc = yes; then | |
8045 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8046 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8047 | : |
8048 | else | |
ba479fd2 | 8049 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8050 | /* confdefs.h. */ |
8051 | _ACEOF | |
8052 | cat confdefs.h >>conftest.$ac_ext | |
8053 | cat >>conftest.$ac_ext <<_ACEOF | |
8054 | /* end confdefs.h. */ | |
956d6950 | 8055 | #include <ctype.h> |
ba479fd2 NN |
8056 | #if ((' ' & 0x0FF) == 0x020) |
8057 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8058 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8059 | #else | |
8060 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8061 | (('a' <= (c) && (c) <= 'i') \ |
8062 | || ('j' <= (c) && (c) <= 'r') \ | |
8063 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8064 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8065 | #endif | |
63cf211a | 8066 | |
ba479fd2 NN |
8067 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8068 | int | |
8069 | main () | |
8070 | { | |
8071 | int i; | |
8072 | for (i = 0; i < 256; i++) | |
8073 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8074 | || toupper (i) != TOUPPER (i)) |
ba479fd2 NN |
8075 | exit(2); |
8076 | exit (0); | |
8077 | } | |
8078 | _ACEOF | |
8079 | rm -f conftest$ac_exeext | |
8080 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8081 | (eval $ac_link) 2>&5 | |
8082 | ac_status=$? | |
8083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8084 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8085 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8086 | (eval $ac_try) 2>&5 | |
8087 | ac_status=$? | |
8088 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8089 | (exit $ac_status); }; }; then | |
956d6950 JL |
8090 | : |
8091 | else | |
ba479fd2 NN |
8092 | echo "$as_me: program exited with status $ac_status" >&5 |
8093 | echo "$as_me: failed program was:" >&5 | |
8094 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8095 | ||
8096 | ( exit $ac_status ) | |
8097 | ac_cv_header_stdc=no | |
956d6950 | 8098 | fi |
86da66b5 | 8099 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8100 | fi |
956d6950 JL |
8101 | fi |
8102 | fi | |
ba479fd2 NN |
8103 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8104 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 8105 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8106 | |
8107 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8108 | #define STDC_HEADERS 1 |
ba479fd2 | 8109 | _ACEOF |
956d6950 JL |
8110 | |
8111 | fi | |
8112 | ||
ba479fd2 NN |
8113 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8114 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
8115 | if test "${ac_cv_header_time+set}" = set; then | |
8116 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8117 | else |
ba479fd2 | 8118 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8119 | /* confdefs.h. */ |
8120 | _ACEOF | |
8121 | cat confdefs.h >>conftest.$ac_ext | |
8122 | cat >>conftest.$ac_ext <<_ACEOF | |
8123 | /* end confdefs.h. */ | |
956d6950 JL |
8124 | #include <sys/types.h> |
8125 | #include <sys/time.h> | |
8126 | #include <time.h> | |
ba479fd2 NN |
8127 | |
8128 | int | |
8129 | main () | |
8130 | { | |
8131 | if ((struct tm *) 0) | |
8132 | return 0; | |
8133 | ; | |
8134 | return 0; | |
8135 | } | |
8136 | _ACEOF | |
8137 | rm -f conftest.$ac_objext | |
8138 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8139 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8140 | ac_status=$? |
86da66b5 HPN |
8141 | grep -v '^ *+' conftest.er1 >conftest.err |
8142 | rm -f conftest.er1 | |
8143 | cat conftest.err >&5 | |
ba479fd2 NN |
8144 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8145 | (exit $ac_status); } && | |
ec6c7392 PB |
8146 | { ac_try='test -z "$ac_c_werror_flag" |
8147 | || test ! -s conftest.err' | |
86da66b5 HPN |
8148 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8149 | (eval $ac_try) 2>&5 | |
8150 | ac_status=$? | |
8151 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8152 | (exit $ac_status); }; } && | |
8153 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8154 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8155 | (eval $ac_try) 2>&5 | |
8156 | ac_status=$? | |
8157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8158 | (exit $ac_status); }; }; then | |
956d6950 JL |
8159 | ac_cv_header_time=yes |
8160 | else | |
ba479fd2 NN |
8161 | echo "$as_me: failed program was:" >&5 |
8162 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8163 | ||
8164 | ac_cv_header_time=no | |
956d6950 | 8165 | fi |
86da66b5 | 8166 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8167 | fi |
ba479fd2 NN |
8168 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8169 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 8170 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8171 | |
8172 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8173 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8174 | _ACEOF |
956d6950 JL |
8175 | |
8176 | fi | |
8177 | ||
18fc9bd4 RG |
8178 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8179 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
8180 | if test "${gcc_cv_header_string+set}" = set; then | |
8181 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8182 | else | |
8183 | cat >conftest.$ac_ext <<_ACEOF | |
8184 | /* confdefs.h. */ | |
8185 | _ACEOF | |
8186 | cat confdefs.h >>conftest.$ac_ext | |
8187 | cat >>conftest.$ac_ext <<_ACEOF | |
8188 | /* end confdefs.h. */ | |
8189 | #include <string.h> | |
8190 | #include <strings.h> | |
8191 | int | |
8192 | main () | |
8193 | { | |
8194 | ||
8195 | ; | |
8196 | return 0; | |
8197 | } | |
8198 | _ACEOF | |
8199 | rm -f conftest.$ac_objext | |
8200 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8201 | (eval $ac_compile) 2>conftest.er1 | |
8202 | ac_status=$? | |
8203 | grep -v '^ *+' conftest.er1 >conftest.err | |
8204 | rm -f conftest.er1 | |
8205 | cat conftest.err >&5 | |
8206 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8207 | (exit $ac_status); } && | |
8208 | { ac_try='test -z "$ac_c_werror_flag" | |
8209 | || test ! -s conftest.err' | |
8210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8211 | (eval $ac_try) 2>&5 | |
8212 | ac_status=$? | |
8213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8214 | (exit $ac_status); }; } && | |
8215 | { ac_try='test -s conftest.$ac_objext' | |
8216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8217 | (eval $ac_try) 2>&5 | |
8218 | ac_status=$? | |
8219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8220 | (exit $ac_status); }; }; then | |
8221 | gcc_cv_header_string=yes | |
8222 | else | |
8223 | echo "$as_me: failed program was:" >&5 | |
8224 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8225 | ||
8226 | gcc_cv_header_string=no | |
8227 | fi | |
8228 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
8229 | fi | |
8230 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 | |
8231 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
8232 | if test $gcc_cv_header_string = yes; then | |
8233 | ||
8234 | cat >>confdefs.h <<\_ACEOF | |
8235 | #define STRING_WITH_STRINGS 1 | |
8236 | _ACEOF | |
8237 | ||
8238 | fi | |
8239 | ||
ba479fd2 NN |
8240 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8241 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
8242 | if test "${ac_cv_header_sys_wait_h+set}" = set; then | |
8243 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8244 | else |
ba479fd2 | 8245 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8246 | /* confdefs.h. */ |
8247 | _ACEOF | |
8248 | cat confdefs.h >>conftest.$ac_ext | |
8249 | cat >>conftest.$ac_ext <<_ACEOF | |
8250 | /* end confdefs.h. */ | |
e9831ca0 KG |
8251 | #include <sys/types.h> |
8252 | #include <sys/wait.h> | |
8253 | #ifndef WEXITSTATUS | |
ba479fd2 | 8254 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8255 | #endif |
8256 | #ifndef WIFEXITED | |
ba479fd2 | 8257 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8258 | #endif |
ba479fd2 NN |
8259 | |
8260 | int | |
8261 | main () | |
8262 | { | |
8263 | int s; | |
8264 | wait (&s); | |
8265 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8266 | ; | |
8267 | return 0; | |
8268 | } | |
8269 | _ACEOF | |
8270 | rm -f conftest.$ac_objext | |
8271 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8272 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8273 | ac_status=$? |
86da66b5 HPN |
8274 | grep -v '^ *+' conftest.er1 >conftest.err |
8275 | rm -f conftest.er1 | |
8276 | cat conftest.err >&5 | |
ba479fd2 NN |
8277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8278 | (exit $ac_status); } && | |
ec6c7392 PB |
8279 | { ac_try='test -z "$ac_c_werror_flag" |
8280 | || test ! -s conftest.err' | |
86da66b5 HPN |
8281 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8282 | (eval $ac_try) 2>&5 | |
8283 | ac_status=$? | |
8284 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8285 | (exit $ac_status); }; } && | |
8286 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8287 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8288 | (eval $ac_try) 2>&5 | |
8289 | ac_status=$? | |
8290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8291 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8292 | ac_cv_header_sys_wait_h=yes |
8293 | else | |
ba479fd2 NN |
8294 | echo "$as_me: failed program was:" >&5 |
8295 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8296 | ||
8297 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 8298 | fi |
86da66b5 | 8299 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8300 | fi |
ba479fd2 NN |
8301 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8302 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8303 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8304 | |
8305 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8306 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8307 | _ACEOF |
6e3f3080 | 8308 | |
63cf211a | 8309 | fi |
6e3f3080 | 8310 | |
ba479fd2 NN |
8311 | |
8312 | ||
8313 | ||
8314 | ||
8315 | ||
8316 | ||
8317 | ||
8318 | ||
8319 | ||
8320 | ||
8321 | ||
8322 | ||
8323 | ||
8324 | ||
8325 | ||
8326 | ||
8327 | ||
8328 | ||
8329 | ||
8330 | ||
8331 | ||
dfb77e37 KC |
8332 | |
8333 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8334 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8335 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8336 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8337 | do |
ba479fd2 | 8338 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
18fc9bd4 | 8339 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
8340 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
8341 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
8342 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8343 | else |
18fc9bd4 | 8344 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8345 | /* confdefs.h. */ |
8346 | _ACEOF | |
8347 | cat confdefs.h >>conftest.$ac_ext | |
8348 | cat >>conftest.$ac_ext <<_ACEOF | |
8349 | /* end confdefs.h. */ | |
8350 | #include <$ac_header> | |
8351 | _ACEOF | |
8352 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8353 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8354 | ac_status=$? | |
8355 | grep -v '^ *+' conftest.er1 >conftest.err | |
8356 | rm -f conftest.er1 | |
8357 | cat conftest.err >&5 | |
8358 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8359 | (exit $ac_status); } >/dev/null; then | |
8360 | if test -s conftest.err; then | |
8361 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8362 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8363 | else |
8364 | ac_cpp_err= | |
8365 | fi | |
8366 | else | |
8367 | ac_cpp_err=yes | |
8368 | fi | |
8369 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8370 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8371 | else |
8372 | echo "$as_me: failed program was:" >&5 | |
8373 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8374 | ||
18fc9bd4 | 8375 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8376 | fi |
8377 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8378 | fi |
ba479fd2 NN |
8379 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8380 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8381 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8382 | cat >>confdefs.h <<_ACEOF | |
8383 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8384 | _ACEOF | |
8385 | ||
956d6950 JL |
8386 | fi |
8387 | done | |
8388 | ||
8389 | ||
f24af81b | 8390 | # Check for thread headers. |
18fc9bd4 | 8391 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
ba479fd2 NN |
8392 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 |
8393 | if test "${ac_cv_header_thread_h+set}" = set; then | |
8394 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8395 | else |
18fc9bd4 | 8396 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8397 | /* confdefs.h. */ |
8398 | _ACEOF | |
8399 | cat confdefs.h >>conftest.$ac_ext | |
8400 | cat >>conftest.$ac_ext <<_ACEOF | |
8401 | /* end confdefs.h. */ | |
8402 | #include <thread.h> | |
8403 | _ACEOF | |
8404 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8405 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8406 | ac_status=$? | |
8407 | grep -v '^ *+' conftest.er1 >conftest.err | |
8408 | rm -f conftest.er1 | |
8409 | cat conftest.err >&5 | |
8410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8411 | (exit $ac_status); } >/dev/null; then | |
8412 | if test -s conftest.err; then | |
8413 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8414 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8415 | else |
8416 | ac_cpp_err= | |
8417 | fi | |
8418 | else | |
8419 | ac_cpp_err=yes | |
8420 | fi | |
8421 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8422 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8423 | else |
8424 | echo "$as_me: failed program was:" >&5 | |
8425 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8426 | ||
18fc9bd4 | 8427 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8428 | fi |
8429 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8430 | fi |
ba479fd2 NN |
8431 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8432 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8433 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8434 | have_thread_h=yes |
8435 | else | |
ba479fd2 | 8436 | have_thread_h= |
f24af81b TT |
8437 | fi |
8438 | ||
18fc9bd4 | 8439 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
ba479fd2 NN |
8440 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 |
8441 | if test "${ac_cv_header_pthread_h+set}" = set; then | |
8442 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 8443 | else |
18fc9bd4 | 8444 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8445 | /* confdefs.h. */ |
8446 | _ACEOF | |
8447 | cat confdefs.h >>conftest.$ac_ext | |
8448 | cat >>conftest.$ac_ext <<_ACEOF | |
8449 | /* end confdefs.h. */ | |
8450 | #include <pthread.h> | |
8451 | _ACEOF | |
8452 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
8453 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
8454 | ac_status=$? | |
8455 | grep -v '^ *+' conftest.er1 >conftest.err | |
8456 | rm -f conftest.er1 | |
8457 | cat conftest.err >&5 | |
8458 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8459 | (exit $ac_status); } >/dev/null; then | |
8460 | if test -s conftest.err; then | |
8461 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 8462 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
8463 | else |
8464 | ac_cpp_err= | |
8465 | fi | |
8466 | else | |
8467 | ac_cpp_err=yes | |
8468 | fi | |
18fc9bd4 RG |
8469 | if test -z "$ac_cpp_err"; then |
8470 | ac_cv_header_pthread_h=yes | |
ba479fd2 | 8471 | else |
18fc9bd4 RG |
8472 | echo "$as_me: failed program was:" >&5 |
8473 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8474 | ||
8475 | ac_cv_header_pthread_h=no | |
8476 | fi | |
8477 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8478 | fi |
ba479fd2 NN |
8479 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8480 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8481 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8482 | have_pthread_h=yes |
8483 | else | |
ba479fd2 | 8484 | have_pthread_h= |
f24af81b TT |
8485 | fi |
8486 | ||
8487 | ||
84c041a1 | 8488 | # These tests can't be done till we know if we have limits.h. |
ba479fd2 NN |
8489 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8490 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
8491 | if test "${gcc_cv_decl_char_bit+set}" = set; then | |
8492 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8493 | else | |
8494 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8495 | /* confdefs.h. */ |
8496 | _ACEOF | |
8497 | cat confdefs.h >>conftest.$ac_ext | |
8498 | cat >>conftest.$ac_ext <<_ACEOF | |
8499 | /* end confdefs.h. */ | |
75e93faa ZW |
8500 | #ifdef HAVE_LIMITS_H |
8501 | #include <limits.h> | |
8502 | #endif | |
8503 | #ifdef CHAR_BIT | |
8504 | found | |
8505 | #endif | |
ba479fd2 | 8506 | _ACEOF |
75e93faa | 8507 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8508 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8509 | gcc_cv_decl_char_bit=yes |
8510 | else | |
75e93faa ZW |
8511 | gcc_cv_decl_char_bit=no |
8512 | fi | |
8513 | rm -f conftest* | |
8514 | ||
8515 | ||
8516 | fi | |
ba479fd2 NN |
8517 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8518 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8519 | if test $gcc_cv_decl_char_bit = no; then |
ba479fd2 NN |
8520 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8521 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
8522 | if test "${gcc_cv_c_nbby+set}" = set; then | |
8523 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8524 | else |
8525 | i=8 | |
8526 | gcc_cv_c_nbby= | |
8527 | while test $i -lt 65; do | |
ba479fd2 | 8528 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8529 | /* confdefs.h. */ |
8530 | _ACEOF | |
8531 | cat confdefs.h >>conftest.$ac_ext | |
8532 | cat >>conftest.$ac_ext <<_ACEOF | |
8533 | /* end confdefs.h. */ | |
8534 | ||
8535 | int | |
8536 | main () | |
8537 | { | |
4e70264f ZW |
8538 | switch(0) { |
8539 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8540 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8541 | ; } | |
ba479fd2 NN |
8542 | ; |
8543 | return 0; | |
8544 | } | |
8545 | _ACEOF | |
8546 | rm -f conftest.$ac_objext | |
8547 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8548 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8549 | ac_status=$? |
86da66b5 HPN |
8550 | grep -v '^ *+' conftest.er1 >conftest.err |
8551 | rm -f conftest.er1 | |
8552 | cat conftest.err >&5 | |
ba479fd2 NN |
8553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8554 | (exit $ac_status); } && | |
ec6c7392 PB |
8555 | { ac_try='test -z "$ac_c_werror_flag" |
8556 | || test ! -s conftest.err' | |
86da66b5 HPN |
8557 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8558 | (eval $ac_try) 2>&5 | |
8559 | ac_status=$? | |
8560 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8561 | (exit $ac_status); }; } && | |
8562 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8563 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8564 | (eval $ac_try) 2>&5 | |
8565 | ac_status=$? | |
8566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8567 | (exit $ac_status); }; }; then | |
4e70264f | 8568 | gcc_cv_c_nbby=$i; break |
75e93faa | 8569 | else |
ba479fd2 NN |
8570 | echo "$as_me: failed program was:" >&5 |
8571 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8572 | ||
75e93faa | 8573 | fi |
86da66b5 | 8574 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8575 | i=`expr $i + 1` |
8576 | done | |
8577 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8578 | ||
8579 | fi | |
ba479fd2 NN |
8580 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8581 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8582 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8583 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8584 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8585 | { (exit 1); exit 1; }; } | |
75e93faa | 8586 | else |
ba479fd2 NN |
8587 | |
8588 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8589 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8590 | _ACEOF |
75e93faa ZW |
8591 | |
8592 | fi | |
8593 | fi | |
ba479fd2 NN |
8594 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8595 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
8596 | if test "${ac_cv_c_bigendian+set}" = set; then | |
8597 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8598 | else |
9791c75c | 8599 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8600 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8601 | /* confdefs.h. */ |
8602 | _ACEOF | |
8603 | cat confdefs.h >>conftest.$ac_ext | |
8604 | cat >>conftest.$ac_ext <<_ACEOF | |
8605 | /* end confdefs.h. */ | |
4977bab6 ZW |
8606 | #include <sys/types.h> |
8607 | #include <sys/param.h> | |
9791c75c | 8608 | |
ba479fd2 NN |
8609 | int |
8610 | main () | |
8611 | { | |
4977bab6 ZW |
8612 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
8613 | bogus endian macros | |
84c041a1 | 8614 | #endif |
9791c75c | 8615 | |
ba479fd2 NN |
8616 | ; |
8617 | return 0; | |
8618 | } | |
8619 | _ACEOF | |
8620 | rm -f conftest.$ac_objext | |
8621 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8622 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8623 | ac_status=$? |
86da66b5 HPN |
8624 | grep -v '^ *+' conftest.er1 >conftest.err |
8625 | rm -f conftest.er1 | |
8626 | cat conftest.err >&5 | |
ba479fd2 NN |
8627 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8628 | (exit $ac_status); } && | |
ec6c7392 PB |
8629 | { ac_try='test -z "$ac_c_werror_flag" |
8630 | || test ! -s conftest.err' | |
86da66b5 HPN |
8631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8632 | (eval $ac_try) 2>&5 | |
8633 | ac_status=$? | |
8634 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8635 | (exit $ac_status); }; } && | |
8636 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8637 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8638 | (eval $ac_try) 2>&5 | |
8639 | ac_status=$? | |
8640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8641 | (exit $ac_status); }; }; then | |
4977bab6 | 8642 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8643 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8644 | /* confdefs.h. */ |
8645 | _ACEOF | |
8646 | cat confdefs.h >>conftest.$ac_ext | |
8647 | cat >>conftest.$ac_ext <<_ACEOF | |
8648 | /* end confdefs.h. */ | |
4977bab6 ZW |
8649 | #include <sys/types.h> |
8650 | #include <sys/param.h> | |
9791c75c | 8651 | |
ba479fd2 NN |
8652 | int |
8653 | main () | |
8654 | { | |
4977bab6 ZW |
8655 | #if BYTE_ORDER != BIG_ENDIAN |
8656 | not big endian | |
84c041a1 | 8657 | #endif |
9791c75c | 8658 | |
ba479fd2 NN |
8659 | ; |
8660 | return 0; | |
8661 | } | |
8662 | _ACEOF | |
8663 | rm -f conftest.$ac_objext | |
8664 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 8665 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 8666 | ac_status=$? |
86da66b5 HPN |
8667 | grep -v '^ *+' conftest.er1 >conftest.err |
8668 | rm -f conftest.er1 | |
8669 | cat conftest.err >&5 | |
ba479fd2 NN |
8670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8671 | (exit $ac_status); } && | |
ec6c7392 PB |
8672 | { ac_try='test -z "$ac_c_werror_flag" |
8673 | || test ! -s conftest.err' | |
86da66b5 HPN |
8674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8675 | (eval $ac_try) 2>&5 | |
8676 | ac_status=$? | |
8677 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8678 | (exit $ac_status); }; } && | |
8679 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
8680 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8681 | (eval $ac_try) 2>&5 | |
8682 | ac_status=$? | |
8683 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8684 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8685 | ac_cv_c_bigendian=yes |
8686 | else | |
ba479fd2 NN |
8687 | echo "$as_me: failed program was:" >&5 |
8688 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8689 | ||
8690 | ac_cv_c_bigendian=no | |
4977bab6 | 8691 | fi |
86da66b5 | 8692 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8693 | else |
ba479fd2 NN |
8694 | echo "$as_me: failed program was:" >&5 |
8695 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8696 | ||
9791c75c KC |
8697 | # It does not; compile a test program. |
8698 | if test "$cross_compiling" = yes; then | |
8699 | # try to guess the endianness by grepping values into an object file | |
8700 | ac_cv_c_bigendian=unknown | |
8701 | cat >conftest.$ac_ext <<_ACEOF | |
8702 | /* confdefs.h. */ | |
8703 | _ACEOF | |
8704 | cat confdefs.h >>conftest.$ac_ext | |
8705 | cat >>conftest.$ac_ext <<_ACEOF | |
8706 | /* end confdefs.h. */ | |
8707 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
8708 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
8709 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } | |
8710 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
8711 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
8712 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } | |
8713 | int | |
8714 | main () | |
8715 | { | |
8716 | _ascii (); _ebcdic (); | |
8717 | ; | |
8718 | return 0; | |
8719 | } | |
8720 | _ACEOF | |
8721 | rm -f conftest.$ac_objext | |
8722 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
8723 | (eval $ac_compile) 2>conftest.er1 | |
8724 | ac_status=$? | |
8725 | grep -v '^ *+' conftest.er1 >conftest.err | |
8726 | rm -f conftest.er1 | |
8727 | cat conftest.err >&5 | |
8728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8729 | (exit $ac_status); } && | |
ec6c7392 PB |
8730 | { ac_try='test -z "$ac_c_werror_flag" |
8731 | || test ! -s conftest.err' | |
9791c75c KC |
8732 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8733 | (eval $ac_try) 2>&5 | |
8734 | ac_status=$? | |
8735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8736 | (exit $ac_status); }; } && | |
8737 | { ac_try='test -s conftest.$ac_objext' | |
8738 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8739 | (eval $ac_try) 2>&5 | |
8740 | ac_status=$? | |
8741 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8742 | (exit $ac_status); }; }; then | |
8743 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then | |
8744 | ac_cv_c_bigendian=yes | |
8745 | fi | |
8746 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then | |
8747 | if test "$ac_cv_c_bigendian" = unknown; then | |
8748 | ac_cv_c_bigendian=no | |
8749 | else | |
8750 | # finding both strings is unlikely to happen, but who knows? | |
8751 | ac_cv_c_bigendian=unknown | |
8752 | fi | |
8753 | fi | |
8754 | else | |
8755 | echo "$as_me: failed program was:" >&5 | |
8756 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8757 | ||
4977bab6 | 8758 | fi |
86da66b5 | 8759 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8760 | else |
8761 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8762 | /* confdefs.h. */ |
8763 | _ACEOF | |
8764 | cat confdefs.h >>conftest.$ac_ext | |
8765 | cat >>conftest.$ac_ext <<_ACEOF | |
8766 | /* end confdefs.h. */ | |
9791c75c KC |
8767 | int |
8768 | main () | |
8769 | { | |
4977bab6 ZW |
8770 | /* Are we little or big endian? From Harbison&Steele. */ |
8771 | union | |
8772 | { | |
8773 | long l; | |
8774 | char c[sizeof (long)]; | |
8775 | } u; | |
8776 | u.l = 1; | |
8777 | exit (u.c[sizeof (long) - 1] == 1); | |
8778 | } | |
ba479fd2 NN |
8779 | _ACEOF |
8780 | rm -f conftest$ac_exeext | |
8781 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
8782 | (eval $ac_link) 2>&5 | |
8783 | ac_status=$? | |
8784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8785 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
8786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8787 | (eval $ac_try) 2>&5 | |
8788 | ac_status=$? | |
8789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8790 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8791 | ac_cv_c_bigendian=no |
8792 | else | |
ba479fd2 NN |
8793 | echo "$as_me: program exited with status $ac_status" >&5 |
8794 | echo "$as_me: failed program was:" >&5 | |
8795 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8796 | ||
8797 | ( exit $ac_status ) | |
8798 | ac_cv_c_bigendian=yes | |
4977bab6 | 8799 | fi |
86da66b5 | 8800 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8801 | fi |
4977bab6 | 8802 | fi |
9791c75c | 8803 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8804 | fi |
ba479fd2 NN |
8805 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8806 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8807 | case $ac_cv_c_bigendian in |
8808 | yes) | |
ba479fd2 NN |
8809 | |
8810 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8811 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8812 | _ACEOF |
9791c75c KC |
8813 | ;; |
8814 | no) | |
8815 | ;; | |
8816 | *) | |
8817 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8818 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8819 | echo "$as_me: error: unknown endianness | |
8820 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8821 | { (exit 1); exit 1; }; } ;; | |
8822 | esac | |
84c041a1 | 8823 | |
75e93faa | 8824 | |
73458fb7 NN |
8825 | # -------- |
8826 | # UNSORTED | |
8827 | # -------- | |
1e608388 | 8828 | |
73458fb7 NN |
8829 | # Stage specific cflags for build. |
8830 | stage1_cflags= | |
8831 | case $build in | |
8832 | vax-*-*) | |
8833 | if test x$GCC = xyes | |
8834 | then | |
8835 | stage1_cflags="-Wa,-J" | |
8836 | else | |
8837 | stage1_cflags="-J" | |
8838 | fi | |
8839 | ;; | |
8840 | powerpc-*-darwin*) | |
8841 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
8842 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
8843 | # Apple's GCC has bugs in designated initializer handling, so disable | |
8844 | # that too. | |
8845 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
8846 | ;; | |
8847 | esac | |
1e608388 | 8848 | |
1e608388 | 8849 | |
4e70264f ZW |
8850 | # These libraries may be used by collect2. |
8851 | # We may need a special search path to get them linked. | |
ba479fd2 NN |
8852 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8853 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
8854 | if test "${gcc_cv_collect2_libs+set}" = set; then | |
8855 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8856 | else |
8857 | save_LIBS="$LIBS" | |
7f2749d4 | 8858 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8859 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8860 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8861 | do | |
8862 | LIBS="$libs" | |
ba479fd2 | 8863 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8864 | /* confdefs.h. */ |
8865 | _ACEOF | |
8866 | cat confdefs.h >>conftest.$ac_ext | |
8867 | cat >>conftest.$ac_ext <<_ACEOF | |
8868 | /* end confdefs.h. */ | |
8869 | ||
4e70264f | 8870 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8871 | #ifdef __cplusplus |
8872 | extern "C" | |
8873 | #endif | |
4e70264f | 8874 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8875 | builtin and then its argument prototype would still apply. */ |
8876 | char ldopen (); | |
8877 | int | |
8878 | main () | |
8879 | { | |
8880 | ldopen (); | |
8881 | ; | |
8882 | return 0; | |
8883 | } | |
8884 | _ACEOF | |
8885 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8886 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8887 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8888 | ac_status=$? |
86da66b5 HPN |
8889 | grep -v '^ *+' conftest.er1 >conftest.err |
8890 | rm -f conftest.er1 | |
8891 | cat conftest.err >&5 | |
ba479fd2 NN |
8892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8893 | (exit $ac_status); } && | |
ec6c7392 PB |
8894 | { ac_try='test -z "$ac_c_werror_flag" |
8895 | || test ! -s conftest.err' | |
86da66b5 HPN |
8896 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8897 | (eval $ac_try) 2>&5 | |
8898 | ac_status=$? | |
8899 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8900 | (exit $ac_status); }; } && | |
8901 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8902 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8903 | (eval $ac_try) 2>&5 | |
8904 | ac_status=$? | |
8905 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8906 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8907 | gcc_cv_collect2_libs="$libs"; break |
8908 | else | |
ba479fd2 NN |
8909 | echo "$as_me: failed program was:" >&5 |
8910 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8911 | ||
4e70264f | 8912 | fi |
86da66b5 HPN |
8913 | rm -f conftest.err conftest.$ac_objext \ |
8914 | conftest$ac_exeext conftest.$ac_ext | |
4e70264f ZW |
8915 | done |
8916 | LIBS="$save_LIBS" | |
8917 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8918 | fi | |
ba479fd2 NN |
8919 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8920 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8921 | case $gcc_cv_collect2_libs in |
8922 | "none required") ;; | |
8923 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8924 | esac | |
8925 | ||
8926 | ||
7f2749d4 RK |
8927 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8928 | # -lexc. So test for it. | |
8929 | save_LIBS="$LIBS" | |
8930 | LIBS= | |
ba479fd2 NN |
8931 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8932 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
8933 | if test "${ac_cv_search_exc_resume+set}" = set; then | |
8934 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8935 | else | |
8936 | ac_func_search_save_LIBS=$LIBS | |
8937 | ac_cv_search_exc_resume=no | |
8938 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8939 | /* confdefs.h. */ |
8940 | _ACEOF | |
8941 | cat confdefs.h >>conftest.$ac_ext | |
8942 | cat >>conftest.$ac_ext <<_ACEOF | |
8943 | /* end confdefs.h. */ | |
7f2749d4 | 8944 | |
7f2749d4 | 8945 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8946 | #ifdef __cplusplus |
8947 | extern "C" | |
8948 | #endif | |
7f2749d4 | 8949 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
8950 | builtin and then its argument prototype would still apply. */ |
8951 | char exc_resume (); | |
8952 | int | |
8953 | main () | |
8954 | { | |
8955 | exc_resume (); | |
8956 | ; | |
8957 | return 0; | |
8958 | } | |
8959 | _ACEOF | |
8960 | rm -f conftest.$ac_objext conftest$ac_exeext | |
8961 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 8962 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 8963 | ac_status=$? |
86da66b5 HPN |
8964 | grep -v '^ *+' conftest.er1 >conftest.err |
8965 | rm -f conftest.er1 | |
8966 | cat conftest.err >&5 | |
ba479fd2 NN |
8967 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
8968 | (exit $ac_status); } && | |
ec6c7392 PB |
8969 | { ac_try='test -z "$ac_c_werror_flag" |
8970 | || test ! -s conftest.err' | |
86da66b5 HPN |
8971 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8972 | (eval $ac_try) 2>&5 | |
8973 | ac_status=$? | |
8974 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8975 | (exit $ac_status); }; } && | |
8976 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
8977 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8978 | (eval $ac_try) 2>&5 | |
8979 | ac_status=$? | |
8980 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8981 | (exit $ac_status); }; }; then | |
7f2749d4 RK |
8982 | ac_cv_search_exc_resume="none required" |
8983 | else | |
ba479fd2 NN |
8984 | echo "$as_me: failed program was:" >&5 |
8985 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8986 | ||
7f2749d4 | 8987 | fi |
86da66b5 HPN |
8988 | rm -f conftest.err conftest.$ac_objext \ |
8989 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
8990 | if test "$ac_cv_search_exc_resume" = no; then |
8991 | for ac_lib in exc; do | |
8992 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
8993 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8994 | /* confdefs.h. */ |
8995 | _ACEOF | |
8996 | cat confdefs.h >>conftest.$ac_ext | |
8997 | cat >>conftest.$ac_ext <<_ACEOF | |
8998 | /* end confdefs.h. */ | |
8999 | ||
7f2749d4 | 9000 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9001 | #ifdef __cplusplus |
9002 | extern "C" | |
9003 | #endif | |
7f2749d4 | 9004 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9005 | builtin and then its argument prototype would still apply. */ |
9006 | char exc_resume (); | |
9007 | int | |
9008 | main () | |
9009 | { | |
9010 | exc_resume (); | |
9011 | ; | |
9012 | return 0; | |
9013 | } | |
9014 | _ACEOF | |
9015 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9016 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9017 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9018 | ac_status=$? |
86da66b5 HPN |
9019 | grep -v '^ *+' conftest.er1 >conftest.err |
9020 | rm -f conftest.er1 | |
9021 | cat conftest.err >&5 | |
ba479fd2 NN |
9022 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9023 | (exit $ac_status); } && | |
ec6c7392 PB |
9024 | { ac_try='test -z "$ac_c_werror_flag" |
9025 | || test ! -s conftest.err' | |
86da66b5 HPN |
9026 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9027 | (eval $ac_try) 2>&5 | |
9028 | ac_status=$? | |
9029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9030 | (exit $ac_status); }; } && | |
9031 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9032 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9033 | (eval $ac_try) 2>&5 | |
9034 | ac_status=$? | |
9035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9036 | (exit $ac_status); }; }; then | |
9037 | ac_cv_search_exc_resume="-l$ac_lib" | |
7f2749d4 RK |
9038 | break |
9039 | else | |
ba479fd2 NN |
9040 | echo "$as_me: failed program was:" >&5 |
9041 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9042 | ||
cafe096b | 9043 | fi |
86da66b5 HPN |
9044 | rm -f conftest.err conftest.$ac_objext \ |
9045 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9046 | done |
6e3f3080 | 9047 | fi |
ba479fd2 NN |
9048 | LIBS=$ac_func_search_save_LIBS |
9049 | fi | |
9050 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 | |
9051 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
9052 | if test "$ac_cv_search_exc_resume" != no; then | |
63cf211a | 9053 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" |
ba479fd2 | 9054 | |
7f2749d4 | 9055 | fi |
ba479fd2 | 9056 | |
7f2749d4 RK |
9057 | GNAT_LIBEXC="$LIBS" |
9058 | LIBS="$save_LIBS" | |
9059 | ||
9060 | ||
62c9aa5f ZW |
9061 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9062 | # they're both in the same place. jcf-dump needs them. | |
9063 | save_LIBS="$LIBS" | |
9064 | LIBS= | |
ba479fd2 NN |
9065 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9066 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
9067 | if test "${ac_cv_search_ldexp+set}" = set; then | |
9068 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9069 | else | |
9070 | ac_func_search_save_LIBS=$LIBS | |
9071 | ac_cv_search_ldexp=no | |
9072 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9073 | /* confdefs.h. */ |
9074 | _ACEOF | |
9075 | cat confdefs.h >>conftest.$ac_ext | |
9076 | cat >>conftest.$ac_ext <<_ACEOF | |
9077 | /* end confdefs.h. */ | |
62c9aa5f | 9078 | |
62c9aa5f | 9079 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9080 | #ifdef __cplusplus |
9081 | extern "C" | |
9082 | #endif | |
62c9aa5f | 9083 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9084 | builtin and then its argument prototype would still apply. */ |
9085 | char ldexp (); | |
9086 | int | |
9087 | main () | |
9088 | { | |
9089 | ldexp (); | |
9090 | ; | |
9091 | return 0; | |
9092 | } | |
9093 | _ACEOF | |
9094 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9095 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9096 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9097 | ac_status=$? |
86da66b5 HPN |
9098 | grep -v '^ *+' conftest.er1 >conftest.err |
9099 | rm -f conftest.er1 | |
9100 | cat conftest.err >&5 | |
ba479fd2 NN |
9101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9102 | (exit $ac_status); } && | |
ec6c7392 PB |
9103 | { ac_try='test -z "$ac_c_werror_flag" |
9104 | || test ! -s conftest.err' | |
86da66b5 HPN |
9105 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9106 | (eval $ac_try) 2>&5 | |
9107 | ac_status=$? | |
9108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9109 | (exit $ac_status); }; } && | |
9110 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9111 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9112 | (eval $ac_try) 2>&5 | |
9113 | ac_status=$? | |
9114 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9115 | (exit $ac_status); }; }; then | |
62c9aa5f ZW |
9116 | ac_cv_search_ldexp="none required" |
9117 | else | |
ba479fd2 NN |
9118 | echo "$as_me: failed program was:" >&5 |
9119 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9120 | ||
62c9aa5f | 9121 | fi |
86da66b5 HPN |
9122 | rm -f conftest.err conftest.$ac_objext \ |
9123 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9124 | if test "$ac_cv_search_ldexp" = no; then |
9125 | for ac_lib in m; do | |
9126 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9127 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9128 | /* confdefs.h. */ |
9129 | _ACEOF | |
9130 | cat confdefs.h >>conftest.$ac_ext | |
9131 | cat >>conftest.$ac_ext <<_ACEOF | |
9132 | /* end confdefs.h. */ | |
9133 | ||
62c9aa5f | 9134 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9135 | #ifdef __cplusplus |
9136 | extern "C" | |
9137 | #endif | |
62c9aa5f | 9138 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9139 | builtin and then its argument prototype would still apply. */ |
9140 | char ldexp (); | |
9141 | int | |
9142 | main () | |
9143 | { | |
9144 | ldexp (); | |
9145 | ; | |
9146 | return 0; | |
9147 | } | |
9148 | _ACEOF | |
9149 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9150 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9151 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9152 | ac_status=$? |
86da66b5 HPN |
9153 | grep -v '^ *+' conftest.er1 >conftest.err |
9154 | rm -f conftest.er1 | |
9155 | cat conftest.err >&5 | |
ba479fd2 NN |
9156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9157 | (exit $ac_status); } && | |
ec6c7392 PB |
9158 | { ac_try='test -z "$ac_c_werror_flag" |
9159 | || test ! -s conftest.err' | |
86da66b5 HPN |
9160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9161 | (eval $ac_try) 2>&5 | |
9162 | ac_status=$? | |
9163 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9164 | (exit $ac_status); }; } && | |
9165 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9166 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9167 | (eval $ac_try) 2>&5 | |
9168 | ac_status=$? | |
9169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9170 | (exit $ac_status); }; }; then | |
9171 | ac_cv_search_ldexp="-l$ac_lib" | |
62c9aa5f ZW |
9172 | break |
9173 | else | |
ba479fd2 NN |
9174 | echo "$as_me: failed program was:" >&5 |
9175 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9176 | ||
cafe096b | 9177 | fi |
86da66b5 HPN |
9178 | rm -f conftest.err conftest.$ac_objext \ |
9179 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 9180 | done |
6e3f3080 | 9181 | fi |
ba479fd2 NN |
9182 | LIBS=$ac_func_search_save_LIBS |
9183 | fi | |
9184 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 | |
9185 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9186 | if test "$ac_cv_search_ldexp" != no; then | |
63cf211a | 9187 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" |
ba479fd2 | 9188 | |
62c9aa5f | 9189 | fi |
ba479fd2 | 9190 | |
62c9aa5f ZW |
9191 | LDEXP_LIB="$LIBS" |
9192 | LIBS="$save_LIBS" | |
9193 | ||
9194 | ||
956d6950 JL |
9195 | # Use <inttypes.h> only if it exists, |
9196 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
ba479fd2 NN |
9197 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9198 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
9199 | if test "${gcc_cv_header_inttypes_h+set}" = set; then | |
9200 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9201 | else | |
9202 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9203 | /* confdefs.h. */ |
9204 | _ACEOF | |
9205 | cat confdefs.h >>conftest.$ac_ext | |
9206 | cat >>conftest.$ac_ext <<_ACEOF | |
9207 | /* end confdefs.h. */ | |
956d6950 JL |
9208 | #include <sys/types.h> |
9209 | #include <inttypes.h> | |
ba479fd2 NN |
9210 | int |
9211 | main () | |
9212 | { | |
956d6950 | 9213 | intmax_t i = -1; |
ba479fd2 NN |
9214 | ; |
9215 | return 0; | |
9216 | } | |
9217 | _ACEOF | |
9218 | rm -f conftest.$ac_objext | |
9219 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9220 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9221 | ac_status=$? |
86da66b5 HPN |
9222 | grep -v '^ *+' conftest.er1 >conftest.err |
9223 | rm -f conftest.er1 | |
9224 | cat conftest.err >&5 | |
ba479fd2 NN |
9225 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9226 | (exit $ac_status); } && | |
ec6c7392 PB |
9227 | { ac_try='test -z "$ac_c_werror_flag" |
9228 | || test ! -s conftest.err' | |
86da66b5 HPN |
9229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9230 | (eval $ac_try) 2>&5 | |
9231 | ac_status=$? | |
9232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9233 | (exit $ac_status); }; } && | |
9234 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9236 | (eval $ac_try) 2>&5 | |
9237 | ac_status=$? | |
9238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9239 | (exit $ac_status); }; }; then | |
0056a9b5 | 9240 | gcc_cv_header_inttypes_h=yes |
956d6950 | 9241 | else |
ba479fd2 NN |
9242 | echo "$as_me: failed program was:" >&5 |
9243 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9244 | ||
9245 | gcc_cv_header_inttypes_h=no | |
956d6950 | 9246 | fi |
86da66b5 | 9247 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
9248 | fi |
9249 | ||
ba479fd2 NN |
9250 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9251 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
0056a9b5 | 9252 | if test $gcc_cv_header_inttypes_h = yes; then |
ba479fd2 NN |
9253 | |
9254 | cat >>confdefs.h <<\_ACEOF | |
0056a9b5 | 9255 | #define HAVE_INTTYPES_H 1 |
ba479fd2 | 9256 | _ACEOF |
0056a9b5 KG |
9257 | |
9258 | fi | |
956d6950 | 9259 | |
c149cc37 | 9260 | |
ba479fd2 NN |
9261 | |
9262 | ||
9263 | ||
9264 | ||
9265 | ||
9266 | ||
9267 | ||
9268 | ||
9269 | ||
9270 | ||
9271 | ||
9272 | ||
9273 | ||
9274 | ||
9275 | ||
9276 | ||
0d667716 KG |
9277 | |
9278 | ||
9279 | ||
9280 | ||
9281 | ||
9282 | ||
9283 | ||
9284 | ||
9285 | ||
9286 | ||
9287 | ||
9288 | ||
ba479fd2 NN |
9289 | |
9290 | ||
9291 | ||
9292 | ||
9293 | ||
9294 | ||
9295 | ||
9296 | ||
52a6edcc | 9297 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9298 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9299 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9300 | 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 | 9301 | do |
ba479fd2 NN |
9302 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
9303 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
9304 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9305 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
9306 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9307 | else | |
9308 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9309 | /* confdefs.h. */ |
9310 | _ACEOF | |
9311 | cat confdefs.h >>conftest.$ac_ext | |
9312 | cat >>conftest.$ac_ext <<_ACEOF | |
9313 | /* end confdefs.h. */ | |
86da66b5 HPN |
9314 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9315 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9316 | #define $ac_func innocuous_$ac_func | |
9317 | ||
956d6950 | 9318 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9319 | which can conflict with char $ac_func (); below. |
9320 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9321 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9322 | |
ba479fd2 NN |
9323 | #ifdef __STDC__ |
9324 | # include <limits.h> | |
9325 | #else | |
9326 | # include <assert.h> | |
9327 | #endif | |
86da66b5 HPN |
9328 | |
9329 | #undef $ac_func | |
9330 | ||
6e3f3080 | 9331 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9332 | #ifdef __cplusplus |
9333 | extern "C" | |
9334 | { | |
9335 | #endif | |
6e3f3080 | 9336 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
9337 | builtin and then its argument prototype would still apply. */ |
9338 | char $ac_func (); | |
956d6950 JL |
9339 | /* The GNU C library defines this for functions which it implements |
9340 | to always fail with ENOSYS. Some functions are actually named | |
9341 | something starting with __ and the normal name is an alias. */ | |
9342 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
9343 | choke me | |
9344 | #else | |
ba479fd2 NN |
9345 | char (*f) () = $ac_func; |
9346 | #endif | |
9347 | #ifdef __cplusplus | |
9348 | } | |
956d6950 JL |
9349 | #endif |
9350 | ||
ba479fd2 NN |
9351 | int |
9352 | main () | |
9353 | { | |
9354 | return f != $ac_func; | |
9355 | ; | |
9356 | return 0; | |
9357 | } | |
9358 | _ACEOF | |
9359 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9360 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 9361 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 9362 | ac_status=$? |
86da66b5 HPN |
9363 | grep -v '^ *+' conftest.er1 >conftest.err |
9364 | rm -f conftest.er1 | |
9365 | cat conftest.err >&5 | |
ba479fd2 NN |
9366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9367 | (exit $ac_status); } && | |
ec6c7392 PB |
9368 | { ac_try='test -z "$ac_c_werror_flag" |
9369 | || test ! -s conftest.err' | |
86da66b5 HPN |
9370 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9371 | (eval $ac_try) 2>&5 | |
9372 | ac_status=$? | |
9373 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9374 | (exit $ac_status); }; } && | |
9375 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
9376 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9377 | (eval $ac_try) 2>&5 | |
9378 | ac_status=$? | |
9379 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9380 | (exit $ac_status); }; }; then | |
9381 | eval "$as_ac_var=yes" | |
9382 | else | |
9383 | echo "$as_me: failed program was:" >&5 | |
9384 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9385 | ||
9386 | eval "$as_ac_var=no" | |
9387 | fi | |
86da66b5 HPN |
9388 | rm -f conftest.err conftest.$ac_objext \ |
9389 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
9390 | fi |
9391 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
9392 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
9393 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
9394 | cat >>confdefs.h <<_ACEOF | |
9395 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9396 | _ACEOF | |
956d6950 | 9397 | |
956d6950 JL |
9398 | fi |
9399 | done | |
9400 | ||
6885fc87 | 9401 | |
39f6c4c8 | 9402 | if test x$ac_cv_func_mbstowcs = xyes; then |
ba479fd2 NN |
9403 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9404 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
9405 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then | |
9406 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9407 | else |
9408 | if test "$cross_compiling" = yes; then | |
9409 | gcc_cv_func_mbstowcs_works=yes | |
9410 | else | |
ba479fd2 | 9411 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9412 | /* confdefs.h. */ |
9413 | _ACEOF | |
9414 | cat confdefs.h >>conftest.$ac_ext | |
9415 | cat >>conftest.$ac_ext <<_ACEOF | |
9416 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9417 | #include <stdlib.h> |
9418 | int main() | |
9419 | { | |
9420 | mbstowcs(0, "", 0); | |
9421 | return 0; | |
9422 | } | |
ba479fd2 NN |
9423 | _ACEOF |
9424 | rm -f conftest$ac_exeext | |
9425 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9426 | (eval $ac_link) 2>&5 | |
9427 | ac_status=$? | |
9428 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9429 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9430 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9431 | (eval $ac_try) 2>&5 | |
9432 | ac_status=$? | |
9433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9434 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9435 | gcc_cv_func_mbstowcs_works=yes |
9436 | else | |
ba479fd2 NN |
9437 | echo "$as_me: program exited with status $ac_status" >&5 |
9438 | echo "$as_me: failed program was:" >&5 | |
9439 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9440 | ||
9441 | ( exit $ac_status ) | |
9442 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9443 | fi |
86da66b5 | 9444 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9445 | fi |
39f6c4c8 | 9446 | fi |
ba479fd2 NN |
9447 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9448 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9449 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9450 | |
9451 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9452 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9453 | _ACEOF |
39f6c4c8 KW |
9454 | |
9455 | fi | |
9456 | fi | |
9457 | ||
ba479fd2 NN |
9458 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9459 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
9460 | if test "${ac_cv_type_ssize_t+set}" = set; then | |
9461 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9462 | else |
ba479fd2 | 9463 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9464 | /* confdefs.h. */ |
9465 | _ACEOF | |
9466 | cat confdefs.h >>conftest.$ac_ext | |
9467 | cat >>conftest.$ac_ext <<_ACEOF | |
9468 | /* end confdefs.h. */ | |
8b4fc07a NN |
9469 | $ac_includes_default |
9470 | int | |
9471 | main () | |
9472 | { | |
9473 | if ((ssize_t *) 0) | |
9474 | return 0; | |
9475 | if (sizeof (ssize_t)) | |
9476 | return 0; | |
9477 | ; | |
9478 | return 0; | |
9479 | } | |
ba479fd2 | 9480 | _ACEOF |
8b4fc07a NN |
9481 | rm -f conftest.$ac_objext |
9482 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9483 | (eval $ac_compile) 2>conftest.er1 |
8b4fc07a | 9484 | ac_status=$? |
86da66b5 HPN |
9485 | grep -v '^ *+' conftest.er1 >conftest.err |
9486 | rm -f conftest.er1 | |
9487 | cat conftest.err >&5 | |
8b4fc07a NN |
9488 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9489 | (exit $ac_status); } && | |
ec6c7392 PB |
9490 | { ac_try='test -z "$ac_c_werror_flag" |
9491 | || test ! -s conftest.err' | |
86da66b5 HPN |
9492 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9493 | (eval $ac_try) 2>&5 | |
9494 | ac_status=$? | |
9495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9496 | (exit $ac_status); }; } && | |
9497 | { ac_try='test -s conftest.$ac_objext' | |
8b4fc07a NN |
9498 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9499 | (eval $ac_try) 2>&5 | |
9500 | ac_status=$? | |
9501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9502 | (exit $ac_status); }; }; then | |
cb65112a | 9503 | ac_cv_type_ssize_t=yes |
f12bc141 | 9504 | else |
8b4fc07a NN |
9505 | echo "$as_me: failed program was:" >&5 |
9506 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9507 | |
8b4fc07a NN |
9508 | ac_cv_type_ssize_t=no |
9509 | fi | |
86da66b5 | 9510 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9511 | fi |
ba479fd2 NN |
9512 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9513 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9514 | if test $ac_cv_type_ssize_t = yes; then |
9515 | : | |
9516 | else | |
ba479fd2 | 9517 | |
8b4fc07a | 9518 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9519 | #define ssize_t int |
ba479fd2 | 9520 | _ACEOF |
f12bc141 ZW |
9521 | |
9522 | fi | |
9523 | ||
0b9d02c6 | 9524 | |
e256b8b6 DA |
9525 | # Try to determine the array type of the second argument of getgroups |
9526 | # for the target system (int or gid_t). | |
ba479fd2 NN |
9527 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9528 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
9529 | if test "${ac_cv_type_uid_t+set}" = set; then | |
9530 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9531 | else | |
9532 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9533 | /* confdefs.h. */ |
9534 | _ACEOF | |
9535 | cat confdefs.h >>conftest.$ac_ext | |
9536 | cat >>conftest.$ac_ext <<_ACEOF | |
9537 | /* end confdefs.h. */ | |
e256b8b6 | 9538 | #include <sys/types.h> |
ba479fd2 NN |
9539 | |
9540 | _ACEOF | |
e256b8b6 | 9541 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9542 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9543 | ac_cv_type_uid_t=yes |
9544 | else | |
e256b8b6 DA |
9545 | ac_cv_type_uid_t=no |
9546 | fi | |
9547 | rm -f conftest* | |
9548 | ||
9549 | fi | |
ba479fd2 NN |
9550 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9551 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9552 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9553 | |
9554 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9555 | #define uid_t int |
ba479fd2 | 9556 | _ACEOF |
cafe096b | 9557 | |
ba479fd2 NN |
9558 | |
9559 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9560 | #define gid_t int |
ba479fd2 | 9561 | _ACEOF |
e256b8b6 DA |
9562 | |
9563 | fi | |
9564 | ||
ba479fd2 NN |
9565 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9566 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
9567 | if test "${ac_cv_type_getgroups+set}" = set; then | |
9568 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9569 | else |
9570 | if test "$cross_compiling" = yes; then | |
9571 | ac_cv_type_getgroups=cross | |
9572 | else | |
ba479fd2 | 9573 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9574 | /* confdefs.h. */ |
9575 | _ACEOF | |
9576 | cat confdefs.h >>conftest.$ac_ext | |
9577 | cat >>conftest.$ac_ext <<_ACEOF | |
9578 | /* end confdefs.h. */ | |
e256b8b6 DA |
9579 | /* Thanks to Mike Rendell for this test. */ |
9580 | #include <sys/types.h> | |
9581 | #define NGID 256 | |
9582 | #undef MAX | |
9583 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9584 | |
9585 | int | |
9586 | main () | |
e256b8b6 DA |
9587 | { |
9588 | gid_t gidset[NGID]; | |
9589 | int i, n; | |
9590 | union { gid_t gval; long lval; } val; | |
9591 | ||
9592 | val.lval = -1; | |
9593 | for (i = 0; i < NGID; i++) | |
9594 | gidset[i] = val.gval; | |
9595 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9596 | gidset); |
e256b8b6 DA |
9597 | /* Exit non-zero if getgroups seems to require an array of ints. This |
9598 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
9599 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9600 | } |
ba479fd2 NN |
9601 | _ACEOF |
9602 | rm -f conftest$ac_exeext | |
9603 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9604 | (eval $ac_link) 2>&5 | |
9605 | ac_status=$? | |
9606 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9607 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
9608 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9609 | (eval $ac_try) 2>&5 | |
9610 | ac_status=$? | |
9611 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9612 | (exit $ac_status); }; }; then | |
9613 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9614 | else |
ba479fd2 NN |
9615 | echo "$as_me: program exited with status $ac_status" >&5 |
9616 | echo "$as_me: failed program was:" >&5 | |
9617 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9618 | ||
9619 | ( exit $ac_status ) | |
9620 | ac_cv_type_getgroups=int | |
e256b8b6 | 9621 | fi |
86da66b5 | 9622 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9623 | fi |
e256b8b6 | 9624 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9625 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9626 | /* confdefs.h. */ |
9627 | _ACEOF | |
9628 | cat confdefs.h >>conftest.$ac_ext | |
9629 | cat >>conftest.$ac_ext <<_ACEOF | |
9630 | /* end confdefs.h. */ | |
e256b8b6 | 9631 | #include <unistd.h> |
ba479fd2 NN |
9632 | |
9633 | _ACEOF | |
e256b8b6 | 9634 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9635 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9636 | ac_cv_type_getgroups=gid_t |
9637 | else | |
e256b8b6 DA |
9638 | ac_cv_type_getgroups=int |
9639 | fi | |
9640 | rm -f conftest* | |
9641 | ||
9642 | fi | |
9643 | fi | |
ba479fd2 NN |
9644 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9645 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9646 | |
ba479fd2 | 9647 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9648 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9649 | _ACEOF |
e256b8b6 DA |
9650 | |
9651 | ||
9652 | if test "${target}" = "${build}"; then | |
9653 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9654 | else | |
9655 | case "${target}" in | |
9656 | # This condition may need some tweaking. It should include all | |
9657 | # targets where the array type of the second argument of getgroups | |
9658 | # is int and the type of gid_t is not equivalent to int. | |
9659 | *-*-sunos* | *-*-ultrix*) | |
9660 | TARGET_GETGROUPS_T=int | |
9661 | ;; | |
9662 | *) | |
9663 | TARGET_GETGROUPS_T=gid_t | |
9664 | ;; | |
9665 | esac | |
9666 | fi | |
9667 | ||
9668 | ||
3b0727a0 | 9669 | |
18fc9bd4 | 9670 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
3b0727a0 MR |
9671 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 |
9672 | if test "${ac_cv_header_sys_mman_h+set}" = set; then | |
9673 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9674 | else |
18fc9bd4 | 9675 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
9676 | /* confdefs.h. */ |
9677 | _ACEOF | |
9678 | cat confdefs.h >>conftest.$ac_ext | |
9679 | cat >>conftest.$ac_ext <<_ACEOF | |
9680 | /* end confdefs.h. */ | |
9681 | #include <sys/mman.h> | |
9682 | _ACEOF | |
9683 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
9684 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
9685 | ac_status=$? | |
9686 | grep -v '^ *+' conftest.er1 >conftest.err | |
9687 | rm -f conftest.er1 | |
9688 | cat conftest.err >&5 | |
9689 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9690 | (exit $ac_status); } >/dev/null; then | |
9691 | if test -s conftest.err; then | |
9692 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9693 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9694 | else | |
9695 | ac_cpp_err= | |
9696 | fi | |
9697 | else | |
9698 | ac_cpp_err=yes | |
9699 | fi | |
9700 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 9701 | ac_cv_header_sys_mman_h=yes |
3b0727a0 MR |
9702 | else |
9703 | echo "$as_me: failed program was:" >&5 | |
9704 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9705 | ||
18fc9bd4 | 9706 | ac_cv_header_sys_mman_h=no |
3b0727a0 MR |
9707 | fi |
9708 | rm -f conftest.err conftest.$ac_ext | |
9709 | fi | |
9710 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 | |
9711 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
9712 | if test $ac_cv_header_sys_mman_h = yes; then | |
9713 | gcc_header_sys_mman_h=yes | |
9714 | else | |
9715 | gcc_header_sys_mman_h=no | |
9716 | fi | |
9717 | ||
9718 | echo "$as_me:$LINENO: checking for mmap" >&5 | |
9719 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
9720 | if test "${ac_cv_func_mmap+set}" = set; then | |
9721 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9722 | else | |
9723 | cat >conftest.$ac_ext <<_ACEOF | |
9724 | /* confdefs.h. */ | |
9725 | _ACEOF | |
9726 | cat confdefs.h >>conftest.$ac_ext | |
9727 | cat >>conftest.$ac_ext <<_ACEOF | |
9728 | /* end confdefs.h. */ | |
9729 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9730 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9731 | #define mmap innocuous_mmap | |
9732 | ||
9733 | /* System header to define __stub macros and hopefully few prototypes, | |
9734 | which can conflict with char mmap (); below. | |
9735 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9736 | <limits.h> exists even on freestanding compilers. */ | |
9737 | ||
9738 | #ifdef __STDC__ | |
9739 | # include <limits.h> | |
9740 | #else | |
9741 | # include <assert.h> | |
9742 | #endif | |
9743 | ||
9744 | #undef mmap | |
9745 | ||
9746 | /* Override any gcc2 internal prototype to avoid an error. */ | |
9747 | #ifdef __cplusplus | |
9748 | extern "C" | |
9749 | { | |
9750 | #endif | |
9751 | /* We use char because int might match the return type of a gcc2 | |
9752 | builtin and then its argument prototype would still apply. */ | |
9753 | char mmap (); | |
9754 | /* The GNU C library defines this for functions which it implements | |
9755 | to always fail with ENOSYS. Some functions are actually named | |
9756 | something starting with __ and the normal name is an alias. */ | |
9757 | #if defined (__stub_mmap) || defined (__stub___mmap) | |
9758 | choke me | |
9759 | #else | |
9760 | char (*f) () = mmap; | |
9761 | #endif | |
9762 | #ifdef __cplusplus | |
9763 | } | |
9764 | #endif | |
9765 | ||
9766 | int | |
9767 | main () | |
9768 | { | |
9769 | return f != mmap; | |
9770 | ; | |
9771 | return 0; | |
9772 | } | |
9773 | _ACEOF | |
9774 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9775 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9776 | (eval $ac_link) 2>conftest.er1 | |
9777 | ac_status=$? | |
9778 | grep -v '^ *+' conftest.er1 >conftest.err | |
9779 | rm -f conftest.er1 | |
9780 | cat conftest.err >&5 | |
9781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9782 | (exit $ac_status); } && | |
ec6c7392 PB |
9783 | { ac_try='test -z "$ac_c_werror_flag" |
9784 | || test ! -s conftest.err' | |
3b0727a0 MR |
9785 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9786 | (eval $ac_try) 2>&5 | |
9787 | ac_status=$? | |
9788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9789 | (exit $ac_status); }; } && | |
9790 | { ac_try='test -s conftest$ac_exeext' | |
9791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9792 | (eval $ac_try) 2>&5 | |
9793 | ac_status=$? | |
9794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9795 | (exit $ac_status); }; }; then | |
9796 | ac_cv_func_mmap=yes | |
9797 | else | |
9798 | echo "$as_me: failed program was:" >&5 | |
9799 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9800 | ||
9801 | ac_cv_func_mmap=no | |
9802 | fi | |
9803 | rm -f conftest.err conftest.$ac_objext \ | |
9804 | conftest$ac_exeext conftest.$ac_ext | |
9805 | fi | |
9806 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 | |
9807 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
9808 | if test $ac_cv_func_mmap = yes; then | |
9809 | gcc_func_mmap=yes | |
9810 | else | |
9811 | gcc_func_mmap=no | |
9812 | fi | |
9813 | ||
9814 | if test "$gcc_header_sys_mman_h" != yes \ | |
9815 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9816 | gcc_cv_func_mmap_file=no |
9817 | gcc_cv_func_mmap_dev_zero=no | |
9818 | gcc_cv_func_mmap_anon=no | |
9819 | else | |
ba479fd2 NN |
9820 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9821 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
9822 | if test "${gcc_cv_func_mmap_file+set}" = set; then | |
9823 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9824 | else |
ba479fd2 | 9825 | # Add a system to this blacklist if |
1072ec3f ZW |
9826 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9827 | # memory area containing the same data that you'd get if you applied | |
9828 | # read() to the same fd. The only system known to have a problem here | |
9829 | # is VMS, where text files have record structure. | |
9830 | case "$host_os" in | |
ba479fd2 | 9831 | vms* | ultrix*) |
1072ec3f ZW |
9832 | gcc_cv_func_mmap_file=no ;; |
9833 | *) | |
9834 | gcc_cv_func_mmap_file=yes;; | |
9835 | esac | |
9836 | fi | |
ba479fd2 NN |
9837 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9838 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9839 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9840 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
9841 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then | |
9842 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9843 | else |
9844 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9845 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9846 | # zeroed pages with both the following properties: | |
9847 | # 1. If you map N consecutive pages in with one call, and then | |
9848 | # unmap any subset of those pages, the pages that were not | |
9849 | # explicitly unmapped remain accessible. | |
9850 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9851 | # both at once, they must both go away. | |
9852 | # Systems known to be in this category are Windows (all variants), | |
9853 | # VMS, and Darwin. | |
9854 | case "$host_os" in | |
2ce240d3 | 9855 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9856 | gcc_cv_func_mmap_dev_zero=no ;; |
9857 | *) | |
9858 | gcc_cv_func_mmap_dev_zero=yes;; | |
9859 | esac | |
9860 | fi | |
ba479fd2 NN |
9861 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9862 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9863 | |
9864 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
ba479fd2 NN |
9865 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9866 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
9867 | if test "${gcc_cv_decl_map_anon+set}" = set; then | |
9868 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9869 | else | |
9870 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9871 | /* confdefs.h. */ |
9872 | _ACEOF | |
9873 | cat confdefs.h >>conftest.$ac_ext | |
9874 | cat >>conftest.$ac_ext <<_ACEOF | |
9875 | /* end confdefs.h. */ | |
1072ec3f ZW |
9876 | #include <sys/types.h> |
9877 | #include <sys/mman.h> | |
9878 | #include <unistd.h> | |
9879 | ||
9880 | #ifndef MAP_ANONYMOUS | |
9881 | #define MAP_ANONYMOUS MAP_ANON | |
9882 | #endif | |
9883 | ||
ba479fd2 NN |
9884 | int |
9885 | main () | |
9886 | { | |
1072ec3f | 9887 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9888 | ; |
9889 | return 0; | |
9890 | } | |
9891 | _ACEOF | |
9892 | rm -f conftest.$ac_objext | |
9893 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 9894 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 9895 | ac_status=$? |
86da66b5 HPN |
9896 | grep -v '^ *+' conftest.er1 >conftest.err |
9897 | rm -f conftest.er1 | |
9898 | cat conftest.err >&5 | |
ba479fd2 NN |
9899 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
9900 | (exit $ac_status); } && | |
ec6c7392 PB |
9901 | { ac_try='test -z "$ac_c_werror_flag" |
9902 | || test ! -s conftest.err' | |
86da66b5 HPN |
9903 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9904 | (eval $ac_try) 2>&5 | |
9905 | ac_status=$? | |
9906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9907 | (exit $ac_status); }; } && | |
9908 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
9909 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9910 | (eval $ac_try) 2>&5 | |
9911 | ac_status=$? | |
9912 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9913 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9914 | gcc_cv_decl_map_anon=yes |
9915 | else | |
ba479fd2 NN |
9916 | echo "$as_me: failed program was:" >&5 |
9917 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9918 | ||
9919 | gcc_cv_decl_map_anon=no | |
1072ec3f | 9920 | fi |
86da66b5 | 9921 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9922 | fi |
ba479fd2 NN |
9923 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9924 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9925 | |
9926 | if test $gcc_cv_decl_map_anon = no; then | |
9927 | gcc_cv_func_mmap_anon=no | |
9928 | else | |
ba479fd2 NN |
9929 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9930 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
9931 | if test "${gcc_cv_func_mmap_anon+set}" = set; then | |
9932 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9933 | else |
9934 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9935 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9936 | # doesn't give anonymous zeroed pages with the same properties listed | |
9937 | # above for use of /dev/zero. | |
9938 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9939 | case "$host_os" in | |
9940 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9941 | gcc_cv_func_mmap_anon=no ;; | |
9942 | *) | |
9943 | gcc_cv_func_mmap_anon=yes;; | |
9944 | esac | |
9945 | fi | |
ba479fd2 NN |
9946 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9947 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9948 | fi |
9949 | fi | |
9950 | ||
9951 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
9952 | |
9953 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9954 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 9955 | _ACEOF |
1072ec3f ZW |
9956 | |
9957 | fi | |
9958 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
9959 | |
9960 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9961 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 9962 | _ACEOF |
1072ec3f ZW |
9963 | |
9964 | fi | |
9965 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
9966 | |
9967 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 9968 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 9969 | _ACEOF |
1072ec3f ZW |
9970 | |
9971 | fi | |
9972 | ||
b27d2bd5 MK |
9973 | |
9974 | case "${host}" in | |
ee262b6f | 9975 | *-*-*vms*) |
ba479fd2 | 9976 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
9977 | # won't work, and it isn't easily adaptable. It makes more sense to |
9978 | # just force it. | |
9979 | ac_cv_func_vfork_works=yes | |
9980 | ;; | |
b27d2bd5 | 9981 | esac |
ba479fd2 NN |
9982 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
9983 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
9984 | if test "${ac_cv_type_pid_t+set}" = set; then | |
9985 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9986 | else | |
9987 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9988 | /* confdefs.h. */ |
9989 | _ACEOF | |
9990 | cat confdefs.h >>conftest.$ac_ext | |
9991 | cat >>conftest.$ac_ext <<_ACEOF | |
9992 | /* end confdefs.h. */ | |
9993 | $ac_includes_default | |
9994 | int | |
9995 | main () | |
9996 | { | |
9997 | if ((pid_t *) 0) | |
9998 | return 0; | |
9999 | if (sizeof (pid_t)) | |
10000 | return 0; | |
10001 | ; | |
10002 | return 0; | |
10003 | } | |
10004 | _ACEOF | |
10005 | rm -f conftest.$ac_objext | |
10006 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 10007 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 10008 | ac_status=$? |
86da66b5 HPN |
10009 | grep -v '^ *+' conftest.er1 >conftest.err |
10010 | rm -f conftest.er1 | |
10011 | cat conftest.err >&5 | |
ba479fd2 NN |
10012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10013 | (exit $ac_status); } && | |
ec6c7392 PB |
10014 | { ac_try='test -z "$ac_c_werror_flag" |
10015 | || test ! -s conftest.err' | |
86da66b5 HPN |
10016 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10017 | (eval $ac_try) 2>&5 | |
10018 | ac_status=$? | |
10019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10020 | (exit $ac_status); }; } && | |
10021 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
10022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10023 | (eval $ac_try) 2>&5 | |
10024 | ac_status=$? | |
10025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10026 | (exit $ac_status); }; }; then | |
cb65112a | 10027 | ac_cv_type_pid_t=yes |
c375c43b | 10028 | else |
ba479fd2 NN |
10029 | echo "$as_me: failed program was:" >&5 |
10030 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10031 | |
ba479fd2 NN |
10032 | ac_cv_type_pid_t=no |
10033 | fi | |
86da66b5 | 10034 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 10035 | fi |
ba479fd2 NN |
10036 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10037 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
10038 | if test $ac_cv_type_pid_t = yes; then | |
10039 | : | |
10040 | else | |
10041 | ||
10042 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10043 | #define pid_t int |
ba479fd2 | 10044 | _ACEOF |
c375c43b KG |
10045 | |
10046 | fi | |
10047 | ||
ba479fd2 NN |
10048 | |
10049 | ||
10050 | for ac_header in unistd.h vfork.h | |
10051 | do | |
10052 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
18fc9bd4 | 10053 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
ba479fd2 NN |
10054 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 |
10055 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
10056 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 10057 | else |
18fc9bd4 | 10058 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10059 | /* confdefs.h. */ |
10060 | _ACEOF | |
10061 | cat confdefs.h >>conftest.$ac_ext | |
10062 | cat >>conftest.$ac_ext <<_ACEOF | |
10063 | /* end confdefs.h. */ | |
10064 | #include <$ac_header> | |
10065 | _ACEOF | |
10066 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
10067 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
10068 | ac_status=$? | |
10069 | grep -v '^ *+' conftest.er1 >conftest.err | |
10070 | rm -f conftest.er1 | |
10071 | cat conftest.err >&5 | |
10072 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10073 | (exit $ac_status); } >/dev/null; then | |
10074 | if test -s conftest.err; then | |
10075 | ac_cpp_err=$ac_c_preproc_warn_flag | |
86da66b5 | 10076 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag |
ba479fd2 NN |
10077 | else |
10078 | ac_cpp_err= | |
10079 | fi | |
093e61a6 | 10080 | else |
ba479fd2 NN |
10081 | ac_cpp_err=yes |
10082 | fi | |
10083 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 10084 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10085 | else |
10086 | echo "$as_me: failed program was:" >&5 | |
10087 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10088 | ||
18fc9bd4 | 10089 | eval "$as_ac_Header=no" |
ba479fd2 NN |
10090 | fi |
10091 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 10092 | fi |
ba479fd2 NN |
10093 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
10094 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
10095 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10096 | cat >>confdefs.h <<_ACEOF | |
10097 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10098 | _ACEOF | |
6e3f3080 NN |
10099 | |
10100 | fi | |
ba479fd2 NN |
10101 | done |
10102 | ||
10103 | ||
10104 | ||
10105 | for ac_func in fork vfork | |
10106 | do | |
10107 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
10108 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
10109 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
10110 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
10111 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10112 | else | |
10113 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10114 | /* confdefs.h. */ |
10115 | _ACEOF | |
10116 | cat confdefs.h >>conftest.$ac_ext | |
10117 | cat >>conftest.$ac_ext <<_ACEOF | |
10118 | /* end confdefs.h. */ | |
86da66b5 HPN |
10119 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10120 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10121 | #define $ac_func innocuous_$ac_func | |
10122 | ||
c375c43b | 10123 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10124 | which can conflict with char $ac_func (); below. |
10125 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10126 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10127 | |
ba479fd2 NN |
10128 | #ifdef __STDC__ |
10129 | # include <limits.h> | |
10130 | #else | |
10131 | # include <assert.h> | |
10132 | #endif | |
86da66b5 HPN |
10133 | |
10134 | #undef $ac_func | |
10135 | ||
6e3f3080 | 10136 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
10137 | #ifdef __cplusplus |
10138 | extern "C" | |
10139 | { | |
10140 | #endif | |
6e3f3080 | 10141 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
10142 | builtin and then its argument prototype would still apply. */ |
10143 | char $ac_func (); | |
c375c43b KG |
10144 | /* The GNU C library defines this for functions which it implements |
10145 | to always fail with ENOSYS. Some functions are actually named | |
10146 | something starting with __ and the normal name is an alias. */ | |
ba479fd2 | 10147 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b KG |
10148 | choke me |
10149 | #else | |
ba479fd2 NN |
10150 | char (*f) () = $ac_func; |
10151 | #endif | |
10152 | #ifdef __cplusplus | |
10153 | } | |
c375c43b KG |
10154 | #endif |
10155 | ||
ba479fd2 NN |
10156 | int |
10157 | main () | |
10158 | { | |
10159 | return f != $ac_func; | |
10160 | ; | |
10161 | return 0; | |
10162 | } | |
10163 | _ACEOF | |
10164 | rm -f conftest.$ac_objext conftest$ac_exeext | |
10165 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 10166 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 10167 | ac_status=$? |
86da66b5 HPN |
10168 | grep -v '^ *+' conftest.er1 >conftest.err |
10169 | rm -f conftest.er1 | |
10170 | cat conftest.err >&5 | |
ba479fd2 NN |
10171 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
10172 | (exit $ac_status); } && | |
ec6c7392 PB |
10173 | { ac_try='test -z "$ac_c_werror_flag" |
10174 | || test ! -s conftest.err' | |
86da66b5 HPN |
10175 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10176 | (eval $ac_try) 2>&5 | |
10177 | ac_status=$? | |
10178 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10179 | (exit $ac_status); }; } && | |
10180 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
10181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10182 | (eval $ac_try) 2>&5 | |
10183 | ac_status=$? | |
10184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10185 | (exit $ac_status); }; }; then | |
10186 | eval "$as_ac_var=yes" | |
10187 | else | |
10188 | echo "$as_me: failed program was:" >&5 | |
10189 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10190 | ||
10191 | eval "$as_ac_var=no" | |
10192 | fi | |
86da66b5 HPN |
10193 | rm -f conftest.err conftest.$ac_objext \ |
10194 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
10195 | fi |
10196 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
10197 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
10198 | if test `eval echo '${'$as_ac_var'}'` = yes; then | |
10199 | cat >>confdefs.h <<_ACEOF | |
10200 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10201 | _ACEOF | |
10202 | ||
c375c43b | 10203 | fi |
ba479fd2 | 10204 | done |
c375c43b | 10205 | |
ba479fd2 NN |
10206 | if test "x$ac_cv_func_fork" = xyes; then |
10207 | echo "$as_me:$LINENO: checking for working fork" >&5 | |
10208 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
10209 | if test "${ac_cv_func_fork_works+set}" = set; then | |
10210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10211 | else |
ba479fd2 NN |
10212 | if test "$cross_compiling" = yes; then |
10213 | ac_cv_func_fork_works=cross | |
10214 | else | |
10215 | cat >conftest.$ac_ext <<_ACEOF | |
ec6c7392 PB |
10216 | /* By Ruediger Kuhlmann. */ |
10217 | #include <sys/types.h> | |
10218 | #if HAVE_UNISTD_H | |
10219 | # include <unistd.h> | |
10220 | #endif | |
10221 | /* Some systems only have a dummy stub for fork() */ | |
10222 | int main () | |
10223 | { | |
10224 | if (fork() < 0) | |
10225 | exit (1); | |
10226 | exit (0); | |
10227 | } | |
ba479fd2 NN |
10228 | _ACEOF |
10229 | rm -f conftest$ac_exeext | |
10230 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10231 | (eval $ac_link) 2>&5 | |
10232 | ac_status=$? | |
10233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10234 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10236 | (eval $ac_try) 2>&5 | |
10237 | ac_status=$? | |
10238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10239 | (exit $ac_status); }; }; then | |
10240 | ac_cv_func_fork_works=yes | |
10241 | else | |
10242 | echo "$as_me: program exited with status $ac_status" >&5 | |
10243 | echo "$as_me: failed program was:" >&5 | |
10244 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10245 | ||
10246 | ( exit $ac_status ) | |
10247 | ac_cv_func_fork_works=no | |
10248 | fi | |
86da66b5 | 10249 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10250 | fi |
10251 | fi | |
10252 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 | |
10253 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
10254 | ||
10255 | else | |
10256 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10257 | fi | |
10258 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10259 | case $host in | |
10260 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10261 | # Override, as these systems have only a dummy fork() stub | |
10262 | ac_cv_func_fork_works=no | |
10263 | ;; | |
10264 | *) | |
10265 | ac_cv_func_fork_works=yes | |
10266 | ;; | |
10267 | esac | |
10268 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10269 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10270 | fi |
c375c43b | 10271 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10272 | if test "x$ac_cv_func_vfork" = xyes; then |
10273 | echo "$as_me:$LINENO: checking for working vfork" >&5 | |
10274 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
10275 | if test "${ac_cv_func_vfork_works+set}" = set; then | |
10276 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10277 | else |
ba479fd2 NN |
10278 | if test "$cross_compiling" = yes; then |
10279 | ac_cv_func_vfork_works=cross | |
10280 | else | |
10281 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10282 | /* confdefs.h. */ |
10283 | _ACEOF | |
10284 | cat confdefs.h >>conftest.$ac_ext | |
10285 | cat >>conftest.$ac_ext <<_ACEOF | |
10286 | /* end confdefs.h. */ | |
c375c43b KG |
10287 | /* Thanks to Paul Eggert for this test. */ |
10288 | #include <stdio.h> | |
ba479fd2 | 10289 | #include <stdlib.h> |
c375c43b KG |
10290 | #include <sys/types.h> |
10291 | #include <sys/stat.h> | |
ba479fd2 NN |
10292 | #include <sys/wait.h> |
10293 | #if HAVE_UNISTD_H | |
10294 | # include <unistd.h> | |
c375c43b | 10295 | #endif |
ba479fd2 NN |
10296 | #if HAVE_VFORK_H |
10297 | # include <vfork.h> | |
c375c43b KG |
10298 | #endif |
10299 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10300 | argument registers are propagated back to the parent. The compiler |
10301 | is told about this with #include <vfork.h>, but some compilers | |
10302 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10303 | static variable whose address is put into a register that is | |
10304 | clobbered by the vfork. */ | |
10305 | static void | |
c375c43b KG |
10306 | #ifdef __cplusplus |
10307 | sparc_address_test (int arg) | |
ba479fd2 | 10308 | # else |
c375c43b KG |
10309 | sparc_address_test (arg) int arg; |
10310 | #endif | |
10311 | { | |
10312 | static pid_t child; | |
10313 | if (!child) { | |
10314 | child = vfork (); | |
10315 | if (child < 0) { | |
10316 | perror ("vfork"); | |
10317 | _exit(2); | |
10318 | } | |
10319 | if (!child) { | |
10320 | arg = getpid(); | |
10321 | write(-1, "", 0); | |
10322 | _exit (arg); | |
10323 | } | |
10324 | } | |
10325 | } | |
ba479fd2 NN |
10326 | |
10327 | int | |
10328 | main () | |
10329 | { | |
c375c43b KG |
10330 | pid_t parent = getpid (); |
10331 | pid_t child; | |
10332 | ||
ba479fd2 | 10333 | sparc_address_test (0); |
c375c43b KG |
10334 | |
10335 | child = vfork (); | |
10336 | ||
10337 | if (child == 0) { | |
ba479fd2 NN |
10338 | /* Here is another test for sparc vfork register problems. This |
10339 | test uses lots of local variables, at least as many local | |
10340 | variables as main has allocated so far including compiler | |
10341 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10342 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10343 | reuse the register of parent for one of the local variables, | |
10344 | since it will think that parent can't possibly be used any more | |
10345 | in this routine. Assigning to the local variable will thus | |
10346 | munge parent in the parent process. */ | |
c375c43b KG |
10347 | pid_t |
10348 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10349 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10350 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10351 | use the same hardware register for all 8 local variables. */ | |
10352 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10353 | || p != p5 || p != p6 || p != p7) | |
10354 | _exit(1); | |
10355 | ||
ba479fd2 NN |
10356 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10357 | from child file descriptors. If the child closes a descriptor | |
10358 | before it execs or exits, this munges the parent's descriptor | |
10359 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10360 | _exit(close(fileno(stdout)) != 0); |
10361 | } else { | |
10362 | int status; | |
10363 | struct stat st; | |
10364 | ||
10365 | while (wait(&status) != child) | |
10366 | ; | |
10367 | exit( | |
10368 | /* Was there some problem with vforking? */ | |
10369 | child < 0 | |
10370 | ||
10371 | /* Did the child fail? (This shouldn't happen.) */ | |
10372 | || status | |
10373 | ||
10374 | /* Did the vfork/compiler bug occur? */ | |
10375 | || parent != getpid() | |
10376 | ||
10377 | /* Did the file descriptor bug occur? */ | |
10378 | || fstat(fileno(stdout), &st) != 0 | |
10379 | ); | |
10380 | } | |
10381 | } | |
ba479fd2 NN |
10382 | _ACEOF |
10383 | rm -f conftest$ac_exeext | |
10384 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
10385 | (eval $ac_link) 2>&5 | |
10386 | ac_status=$? | |
10387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10388 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
10389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10390 | (eval $ac_try) 2>&5 | |
10391 | ac_status=$? | |
10392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10393 | (exit $ac_status); }; }; then | |
c375c43b KG |
10394 | ac_cv_func_vfork_works=yes |
10395 | else | |
ba479fd2 NN |
10396 | echo "$as_me: program exited with status $ac_status" >&5 |
10397 | echo "$as_me: failed program was:" >&5 | |
10398 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10399 | ||
10400 | ( exit $ac_status ) | |
10401 | ac_cv_func_vfork_works=no | |
cafe096b | 10402 | fi |
86da66b5 | 10403 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10404 | fi |
ba479fd2 NN |
10405 | fi |
10406 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 | |
10407 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10408 | |
ba479fd2 NN |
10409 | fi; |
10410 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10411 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10412 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10413 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10414 | fi |
10415 | ||
ba479fd2 NN |
10416 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10417 | ||
10418 | cat >>confdefs.h <<\_ACEOF | |
10419 | #define HAVE_WORKING_VFORK 1 | |
10420 | _ACEOF | |
10421 | ||
10422 | else | |
10423 | ||
10424 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10425 | #define vfork fork |
ba479fd2 | 10426 | _ACEOF |
c375c43b KG |
10427 | |
10428 | fi | |
ba479fd2 NN |
10429 | if test "x$ac_cv_func_fork_works" = xyes; then |
10430 | ||
10431 | cat >>confdefs.h <<\_ACEOF | |
10432 | #define HAVE_WORKING_FORK 1 | |
10433 | _ACEOF | |
10434 | ||
10435 | fi | |
10436 | ||
c375c43b | 10437 | |
81bf3d9e | 10438 | |
dfb77e37 KC |
10439 | if test "X$prefix" = "XNONE"; then |
10440 | acl_final_prefix="$ac_default_prefix" | |
10441 | else | |
10442 | acl_final_prefix="$prefix" | |
10443 | fi | |
10444 | if test "X$exec_prefix" = "XNONE"; then | |
10445 | acl_final_exec_prefix='${prefix}' | |
10446 | else | |
10447 | acl_final_exec_prefix="$exec_prefix" | |
10448 | fi | |
10449 | acl_save_prefix="$prefix" | |
10450 | prefix="$acl_final_prefix" | |
10451 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10452 | prefix="$acl_save_prefix" | |
f91abfce TT |
10453 | |
10454 | ||
dfb77e37 KC |
10455 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
10456 | if test "${with_gnu_ld+set}" = set; then | |
10457 | withval="$with_gnu_ld" | |
10458 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10459 | else |
dfb77e37 KC |
10460 | with_gnu_ld=no |
10461 | fi; | |
10462 | # Prepare PATH_SEPARATOR. | |
10463 | # The user is always right. | |
10464 | if test "${PATH_SEPARATOR+set}" != set; then | |
10465 | echo "#! /bin/sh" >conf$$.sh | |
10466 | echo "exit 0" >>conf$$.sh | |
10467 | chmod +x conf$$.sh | |
10468 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10469 | PATH_SEPARATOR=';' | |
ba479fd2 | 10470 | else |
dfb77e37 | 10471 | PATH_SEPARATOR=: |
ba479fd2 | 10472 | fi |
dfb77e37 KC |
10473 | rm -f conf$$.sh |
10474 | fi | |
10475 | ac_prog=ld | |
10476 | if test "$GCC" = yes; then | |
10477 | # Check if gcc -print-prog-name=ld gives a path. | |
10478 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 | |
10479 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
10480 | case $host in | |
10481 | *-*-mingw*) | |
10482 | # gcc leaves a trailing carriage return which upsets mingw | |
10483 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10484 | *) | |
10485 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10486 | esac | |
10487 | case $ac_prog in | |
10488 | # Accept absolute paths. | |
10489 | [\\/]* | [A-Za-z]:[\\/]*) | |
10490 | re_direlt='/[^/][^/]*/\.\./' | |
10491 | # Canonicalize the path of ld | |
10492 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10493 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10494 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10495 | done | |
10496 | test -z "$LD" && LD="$ac_prog" | |
10497 | ;; | |
10498 | "") | |
10499 | # If it fails, then pretend we aren't using GCC. | |
10500 | ac_prog=ld | |
10501 | ;; | |
10502 | *) | |
10503 | # If it is relative, then search for the first ld in PATH. | |
10504 | with_gnu_ld=unknown | |
10505 | ;; | |
10506 | esac | |
10507 | elif test "$with_gnu_ld" = yes; then | |
10508 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | |
10509 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10510 | else |
dfb77e37 KC |
10511 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10512 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10513 | fi |
dfb77e37 KC |
10514 | if test "${acl_cv_path_LD+set}" = set; then |
10515 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10516 | else |
dfb77e37 KC |
10517 | if test -z "$LD"; then |
10518 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10519 | for ac_dir in $PATH; do | |
10520 | test -z "$ac_dir" && ac_dir=. | |
10521 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10522 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10523 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10524 | # but apparently some GNU ld's only accept -v. | |
10525 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
10526 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
10527 | test "$with_gnu_ld" != no && break | |
10528 | else | |
10529 | test "$with_gnu_ld" != yes && break | |
10530 | fi | |
dfb77e37 KC |
10531 | fi |
10532 | done | |
10533 | IFS="$ac_save_ifs" | |
10534 | else | |
10535 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10536 | fi | |
10537 | fi | |
ba479fd2 | 10538 | |
dfb77e37 KC |
10539 | LD="$acl_cv_path_LD" |
10540 | if test -n "$LD"; then | |
10541 | echo "$as_me:$LINENO: result: $LD" >&5 | |
10542 | echo "${ECHO_T}$LD" >&6 | |
10543 | else | |
10544 | echo "$as_me:$LINENO: result: no" >&5 | |
10545 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10546 | fi |
dfb77e37 KC |
10547 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10548 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10549 | { (exit 1); exit 1; }; } | |
10550 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | |
10551 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
10552 | if test "${acl_cv_prog_gnu_ld+set}" = set; then | |
10553 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10554 | else | |
10555 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
10556 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
10557 | acl_cv_prog_gnu_ld=yes | |
10558 | else | |
10559 | acl_cv_prog_gnu_ld=no | |
10560 | fi | |
dfb77e37 KC |
10561 | fi |
10562 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 | |
10563 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
10564 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
10565 | ||
10566 | ||
10567 | ||
10568 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 | |
10569 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
10570 | if test "${acl_cv_rpath+set}" = set; then | |
10571 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10572 | else | |
10573 | ||
10574 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10575 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10576 | . ./conftest.sh | |
10577 | rm -f ./conftest.sh | |
10578 | acl_cv_rpath=done | |
ba479fd2 | 10579 | |
eb158727 | 10580 | fi |
dfb77e37 KC |
10581 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10582 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
10583 | wl="$acl_cv_wl" | |
10584 | libext="$acl_cv_libext" | |
10585 | shlibext="$acl_cv_shlibext" | |
10586 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10587 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10588 | hardcode_direct="$acl_cv_hardcode_direct" | |
10589 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
10590 | # Check whether --enable-rpath or --disable-rpath was given. | |
10591 | if test "${enable_rpath+set}" = set; then | |
10592 | enableval="$enable_rpath" | |
10593 | : | |
10594 | else | |
10595 | enable_rpath=yes | |
10596 | fi; | |
10597 | ||
10598 | ||
10599 | ||
10600 | ||
10601 | ||
10602 | ||
10603 | ||
10604 | use_additional=yes | |
10605 | ||
10606 | acl_save_prefix="$prefix" | |
10607 | prefix="$acl_final_prefix" | |
10608 | acl_save_exec_prefix="$exec_prefix" | |
10609 | exec_prefix="$acl_final_exec_prefix" | |
10610 | ||
10611 | eval additional_includedir=\"$includedir\" | |
10612 | eval additional_libdir=\"$libdir\" | |
10613 | ||
10614 | exec_prefix="$acl_save_exec_prefix" | |
10615 | prefix="$acl_save_prefix" | |
10616 | ||
10617 | ||
10618 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. | |
10619 | if test "${with_libiconv_prefix+set}" = set; then | |
10620 | withval="$with_libiconv_prefix" | |
10621 | ||
10622 | if test "X$withval" = "Xno"; then | |
10623 | use_additional=no | |
10624 | else | |
10625 | if test "X$withval" = "X"; then | |
10626 | ||
10627 | acl_save_prefix="$prefix" | |
10628 | prefix="$acl_final_prefix" | |
10629 | acl_save_exec_prefix="$exec_prefix" | |
10630 | exec_prefix="$acl_final_exec_prefix" | |
10631 | ||
10632 | eval additional_includedir=\"$includedir\" | |
10633 | eval additional_libdir=\"$libdir\" | |
10634 | ||
10635 | exec_prefix="$acl_save_exec_prefix" | |
10636 | prefix="$acl_save_prefix" | |
10637 | ||
10638 | else | |
10639 | additional_includedir="$withval/include" | |
10640 | additional_libdir="$withval/lib" | |
10641 | fi | |
10642 | fi | |
10643 | ||
10644 | fi; | |
10645 | LIBICONV= | |
10646 | LTLIBICONV= | |
10647 | INCICONV= | |
10648 | rpathdirs= | |
10649 | ltrpathdirs= | |
10650 | names_already_handled= | |
10651 | names_next_round='iconv ' | |
10652 | while test -n "$names_next_round"; do | |
10653 | names_this_round="$names_next_round" | |
10654 | names_next_round= | |
10655 | for name in $names_this_round; do | |
10656 | already_handled= | |
10657 | for n in $names_already_handled; do | |
10658 | if test "$n" = "$name"; then | |
10659 | already_handled=yes | |
10660 | break | |
10661 | fi | |
10662 | done | |
10663 | if test -z "$already_handled"; then | |
10664 | names_already_handled="$names_already_handled $name" | |
10665 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10666 | eval value=\"\$HAVE_LIB$uppername\" | |
10667 | if test -n "$value"; then | |
10668 | if test "$value" = yes; then | |
10669 | eval value=\"\$LIB$uppername\" | |
10670 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10671 | eval value=\"\$LTLIB$uppername\" | |
10672 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10673 | else | |
10674 | : | |
10675 | fi | |
10676 | else | |
10677 | found_dir= | |
10678 | found_la= | |
10679 | found_so= | |
10680 | found_a= | |
10681 | if test $use_additional = yes; then | |
10682 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10683 | found_dir="$additional_libdir" | |
10684 | found_so="$additional_libdir/lib$name.$shlibext" | |
10685 | if test -f "$additional_libdir/lib$name.la"; then | |
10686 | found_la="$additional_libdir/lib$name.la" | |
10687 | fi | |
10688 | else | |
10689 | if test -f "$additional_libdir/lib$name.$libext"; then | |
10690 | found_dir="$additional_libdir" | |
10691 | found_a="$additional_libdir/lib$name.$libext" | |
10692 | if test -f "$additional_libdir/lib$name.la"; then | |
10693 | found_la="$additional_libdir/lib$name.la" | |
10694 | fi | |
10695 | fi | |
10696 | fi | |
10697 | fi | |
10698 | if test "X$found_dir" = "X"; then | |
10699 | for x in $LDFLAGS $LTLIBICONV; do | |
10700 | ||
10701 | acl_save_prefix="$prefix" | |
10702 | prefix="$acl_final_prefix" | |
10703 | acl_save_exec_prefix="$exec_prefix" | |
10704 | exec_prefix="$acl_final_exec_prefix" | |
10705 | eval x=\"$x\" | |
10706 | exec_prefix="$acl_save_exec_prefix" | |
10707 | prefix="$acl_save_prefix" | |
10708 | ||
10709 | case "$x" in | |
10710 | -L*) | |
10711 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10712 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10713 | found_dir="$dir" | |
10714 | found_so="$dir/lib$name.$shlibext" | |
10715 | if test -f "$dir/lib$name.la"; then | |
10716 | found_la="$dir/lib$name.la" | |
10717 | fi | |
10718 | else | |
10719 | if test -f "$dir/lib$name.$libext"; then | |
10720 | found_dir="$dir" | |
10721 | found_a="$dir/lib$name.$libext" | |
10722 | if test -f "$dir/lib$name.la"; then | |
10723 | found_la="$dir/lib$name.la" | |
10724 | fi | |
10725 | fi | |
10726 | fi | |
10727 | ;; | |
10728 | esac | |
10729 | if test "X$found_dir" != "X"; then | |
10730 | break | |
10731 | fi | |
10732 | done | |
10733 | fi | |
10734 | if test "X$found_dir" != "X"; then | |
10735 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10736 | if test "X$found_so" != "X"; then | |
10737 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10738 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10739 | else | |
10740 | haveit= | |
10741 | for x in $ltrpathdirs; do | |
10742 | if test "X$x" = "X$found_dir"; then | |
10743 | haveit=yes | |
10744 | break | |
10745 | fi | |
10746 | done | |
10747 | if test -z "$haveit"; then | |
10748 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10749 | fi | |
10750 | if test "$hardcode_direct" = yes; then | |
10751 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10752 | else | |
10753 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10754 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10755 | haveit= | |
10756 | for x in $rpathdirs; do | |
10757 | if test "X$x" = "X$found_dir"; then | |
10758 | haveit=yes | |
10759 | break | |
10760 | fi | |
10761 | done | |
10762 | if test -z "$haveit"; then | |
10763 | rpathdirs="$rpathdirs $found_dir" | |
10764 | fi | |
10765 | else | |
10766 | haveit= | |
10767 | for x in $LDFLAGS $LIBICONV; do | |
10768 | ||
10769 | acl_save_prefix="$prefix" | |
10770 | prefix="$acl_final_prefix" | |
10771 | acl_save_exec_prefix="$exec_prefix" | |
10772 | exec_prefix="$acl_final_exec_prefix" | |
10773 | eval x=\"$x\" | |
10774 | exec_prefix="$acl_save_exec_prefix" | |
10775 | prefix="$acl_save_prefix" | |
10776 | ||
10777 | if test "X$x" = "X-L$found_dir"; then | |
10778 | haveit=yes | |
10779 | break | |
10780 | fi | |
10781 | done | |
10782 | if test -z "$haveit"; then | |
10783 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10784 | fi | |
10785 | if test "$hardcode_minus_L" != no; then | |
10786 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10787 | else | |
10788 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10789 | fi | |
10790 | fi | |
10791 | fi | |
10792 | fi | |
10793 | else | |
10794 | if test "X$found_a" != "X"; then | |
10795 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10796 | else | |
10797 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10798 | fi | |
10799 | fi | |
10800 | additional_includedir= | |
10801 | case "$found_dir" in | |
10802 | */lib | */lib/) | |
10803 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10804 | additional_includedir="$basedir/include" | |
10805 | ;; | |
10806 | esac | |
10807 | if test "X$additional_includedir" != "X"; then | |
10808 | if test "X$additional_includedir" != "X/usr/include"; then | |
10809 | haveit= | |
10810 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10811 | if test -n "$GCC"; then | |
10812 | case $host_os in | |
18fc9bd4 | 10813 | linux*) haveit=yes;; |
dfb77e37 KC |
10814 | esac |
10815 | fi | |
10816 | fi | |
10817 | if test -z "$haveit"; then | |
10818 | for x in $CPPFLAGS $INCICONV; do | |
10819 | ||
10820 | acl_save_prefix="$prefix" | |
10821 | prefix="$acl_final_prefix" | |
10822 | acl_save_exec_prefix="$exec_prefix" | |
10823 | exec_prefix="$acl_final_exec_prefix" | |
10824 | eval x=\"$x\" | |
10825 | exec_prefix="$acl_save_exec_prefix" | |
10826 | prefix="$acl_save_prefix" | |
10827 | ||
10828 | if test "X$x" = "X-I$additional_includedir"; then | |
10829 | haveit=yes | |
10830 | break | |
10831 | fi | |
10832 | done | |
10833 | if test -z "$haveit"; then | |
10834 | if test -d "$additional_includedir"; then | |
10835 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10836 | fi | |
10837 | fi | |
10838 | fi | |
10839 | fi | |
10840 | fi | |
10841 | if test -n "$found_la"; then | |
10842 | save_libdir="$libdir" | |
10843 | case "$found_la" in | |
10844 | */* | *\\*) . "$found_la" ;; | |
10845 | *) . "./$found_la" ;; | |
10846 | esac | |
10847 | libdir="$save_libdir" | |
10848 | for dep in $dependency_libs; do | |
10849 | case "$dep" in | |
10850 | -L*) | |
10851 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10852 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10853 | haveit= | |
10854 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10855 | if test -n "$GCC"; then | |
10856 | case $host_os in | |
18fc9bd4 | 10857 | linux*) haveit=yes;; |
dfb77e37 KC |
10858 | esac |
10859 | fi | |
10860 | fi | |
10861 | if test -z "$haveit"; then | |
10862 | haveit= | |
10863 | for x in $LDFLAGS $LIBICONV; do | |
10864 | ||
10865 | acl_save_prefix="$prefix" | |
10866 | prefix="$acl_final_prefix" | |
10867 | acl_save_exec_prefix="$exec_prefix" | |
10868 | exec_prefix="$acl_final_exec_prefix" | |
10869 | eval x=\"$x\" | |
10870 | exec_prefix="$acl_save_exec_prefix" | |
10871 | prefix="$acl_save_prefix" | |
10872 | ||
10873 | if test "X$x" = "X-L$additional_libdir"; then | |
10874 | haveit=yes | |
10875 | break | |
10876 | fi | |
10877 | done | |
10878 | if test -z "$haveit"; then | |
10879 | if test -d "$additional_libdir"; then | |
10880 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10881 | fi | |
10882 | fi | |
10883 | haveit= | |
10884 | for x in $LDFLAGS $LTLIBICONV; do | |
10885 | ||
10886 | acl_save_prefix="$prefix" | |
10887 | prefix="$acl_final_prefix" | |
10888 | acl_save_exec_prefix="$exec_prefix" | |
10889 | exec_prefix="$acl_final_exec_prefix" | |
10890 | eval x=\"$x\" | |
10891 | exec_prefix="$acl_save_exec_prefix" | |
10892 | prefix="$acl_save_prefix" | |
10893 | ||
10894 | if test "X$x" = "X-L$additional_libdir"; then | |
10895 | haveit=yes | |
10896 | break | |
10897 | fi | |
10898 | done | |
10899 | if test -z "$haveit"; then | |
10900 | if test -d "$additional_libdir"; then | |
10901 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10902 | fi | |
10903 | fi | |
10904 | fi | |
10905 | fi | |
10906 | ;; | |
10907 | -R*) | |
10908 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10909 | if test "$enable_rpath" != no; then | |
10910 | haveit= | |
10911 | for x in $rpathdirs; 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 | rpathdirs="$rpathdirs $dir" | |
10919 | fi | |
10920 | haveit= | |
10921 | for x in $ltrpathdirs; do | |
10922 | if test "X$x" = "X$dir"; then | |
10923 | haveit=yes | |
10924 | break | |
10925 | fi | |
10926 | done | |
10927 | if test -z "$haveit"; then | |
10928 | ltrpathdirs="$ltrpathdirs $dir" | |
10929 | fi | |
10930 | fi | |
10931 | ;; | |
10932 | -l*) | |
10933 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10934 | ;; | |
10935 | *.la) | |
10936 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10937 | ;; | |
10938 | *) | |
10939 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10940 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10941 | ;; | |
10942 | esac | |
10943 | done | |
10944 | fi | |
10945 | else | |
10946 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10947 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10948 | fi | |
10949 | fi | |
10950 | fi | |
10951 | done | |
10952 | done | |
10953 | if test "X$rpathdirs" != "X"; then | |
10954 | if test -n "$hardcode_libdir_separator"; then | |
10955 | alldirs= | |
10956 | for found_dir in $rpathdirs; do | |
10957 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
10958 | done | |
10959 | acl_save_libdir="$libdir" | |
10960 | libdir="$alldirs" | |
10961 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10962 | libdir="$acl_save_libdir" | |
10963 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10964 | else | |
10965 | for found_dir in $rpathdirs; do | |
10966 | acl_save_libdir="$libdir" | |
10967 | libdir="$found_dir" | |
10968 | eval flag=\"$hardcode_libdir_flag_spec\" | |
10969 | libdir="$acl_save_libdir" | |
10970 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
10971 | done | |
10972 | fi | |
10973 | fi | |
10974 | if test "X$ltrpathdirs" != "X"; then | |
10975 | for found_dir in $ltrpathdirs; do | |
10976 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
10977 | done | |
10978 | fi | |
10979 | ||
10980 | ||
10981 | ||
10982 | ||
10983 | ||
10984 | ||
10985 | ||
10986 | am_save_CPPFLAGS="$CPPFLAGS" | |
10987 | ||
10988 | for element in $INCICONV; do | |
10989 | haveit= | |
10990 | for x in $CPPFLAGS; do | |
10991 | ||
10992 | acl_save_prefix="$prefix" | |
10993 | prefix="$acl_final_prefix" | |
10994 | acl_save_exec_prefix="$exec_prefix" | |
10995 | exec_prefix="$acl_final_exec_prefix" | |
10996 | eval x=\"$x\" | |
10997 | exec_prefix="$acl_save_exec_prefix" | |
10998 | prefix="$acl_save_prefix" | |
10999 | ||
11000 | if test "X$x" = "X$element"; then | |
11001 | haveit=yes | |
11002 | break | |
11003 | fi | |
11004 | done | |
11005 | if test -z "$haveit"; then | |
11006 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11007 | fi | |
11008 | done | |
eb158727 ZW |
11009 | |
11010 | ||
ba479fd2 NN |
11011 | echo "$as_me:$LINENO: checking for iconv" >&5 |
11012 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
11013 | if test "${am_cv_func_iconv+set}" = set; then | |
11014 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11015 | else |
ba479fd2 | 11016 | |
f91abfce TT |
11017 | am_cv_func_iconv="no, consider installing GNU libiconv" |
11018 | am_cv_lib_iconv=no | |
ba479fd2 | 11019 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11020 | /* confdefs.h. */ |
11021 | _ACEOF | |
11022 | cat confdefs.h >>conftest.$ac_ext | |
11023 | cat >>conftest.$ac_ext <<_ACEOF | |
11024 | /* end confdefs.h. */ | |
f91abfce TT |
11025 | #include <stdlib.h> |
11026 | #include <iconv.h> | |
ba479fd2 NN |
11027 | int |
11028 | main () | |
11029 | { | |
f91abfce TT |
11030 | iconv_t cd = iconv_open("",""); |
11031 | iconv(cd,NULL,NULL,NULL,NULL); | |
11032 | iconv_close(cd); | |
ba479fd2 NN |
11033 | ; |
11034 | return 0; | |
11035 | } | |
11036 | _ACEOF | |
11037 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11038 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11039 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11040 | ac_status=$? |
86da66b5 HPN |
11041 | grep -v '^ *+' conftest.er1 >conftest.err |
11042 | rm -f conftest.er1 | |
11043 | cat conftest.err >&5 | |
ba479fd2 NN |
11044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11045 | (exit $ac_status); } && | |
ec6c7392 PB |
11046 | { ac_try='test -z "$ac_c_werror_flag" |
11047 | || test ! -s conftest.err' | |
86da66b5 HPN |
11048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11049 | (eval $ac_try) 2>&5 | |
11050 | ac_status=$? | |
11051 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11052 | (exit $ac_status); }; } && | |
11053 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11054 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11055 | (eval $ac_try) 2>&5 | |
11056 | ac_status=$? | |
11057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11058 | (exit $ac_status); }; }; then | |
f91abfce TT |
11059 | am_cv_func_iconv=yes |
11060 | else | |
ba479fd2 NN |
11061 | echo "$as_me: failed program was:" >&5 |
11062 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11063 | ||
f91abfce | 11064 | fi |
86da66b5 HPN |
11065 | rm -f conftest.err conftest.$ac_objext \ |
11066 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11067 | if test "$am_cv_func_iconv" != yes; then |
11068 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11069 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11070 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11071 | /* confdefs.h. */ |
11072 | _ACEOF | |
11073 | cat confdefs.h >>conftest.$ac_ext | |
11074 | cat >>conftest.$ac_ext <<_ACEOF | |
11075 | /* end confdefs.h. */ | |
f91abfce TT |
11076 | #include <stdlib.h> |
11077 | #include <iconv.h> | |
ba479fd2 NN |
11078 | int |
11079 | main () | |
11080 | { | |
f91abfce TT |
11081 | iconv_t cd = iconv_open("",""); |
11082 | iconv(cd,NULL,NULL,NULL,NULL); | |
11083 | iconv_close(cd); | |
ba479fd2 NN |
11084 | ; |
11085 | return 0; | |
11086 | } | |
11087 | _ACEOF | |
11088 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11089 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 11090 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 11091 | ac_status=$? |
86da66b5 HPN |
11092 | grep -v '^ *+' conftest.er1 >conftest.err |
11093 | rm -f conftest.er1 | |
11094 | cat conftest.err >&5 | |
ba479fd2 NN |
11095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11096 | (exit $ac_status); } && | |
ec6c7392 PB |
11097 | { ac_try='test -z "$ac_c_werror_flag" |
11098 | || test ! -s conftest.err' | |
86da66b5 HPN |
11099 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11100 | (eval $ac_try) 2>&5 | |
11101 | ac_status=$? | |
11102 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11103 | (exit $ac_status); }; } && | |
11104 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
11105 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11106 | (eval $ac_try) 2>&5 | |
11107 | ac_status=$? | |
11108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11109 | (exit $ac_status); }; }; then | |
f91abfce TT |
11110 | am_cv_lib_iconv=yes |
11111 | am_cv_func_iconv=yes | |
11112 | else | |
ba479fd2 NN |
11113 | echo "$as_me: failed program was:" >&5 |
11114 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11115 | ||
f91abfce | 11116 | fi |
86da66b5 HPN |
11117 | rm -f conftest.err conftest.$ac_objext \ |
11118 | conftest$ac_exeext conftest.$ac_ext | |
f91abfce TT |
11119 | LIBS="$am_save_LIBS" |
11120 | fi | |
6e3f3080 | 11121 | |
ba479fd2 NN |
11122 | fi |
11123 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 | |
11124 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 11125 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11126 | |
11127 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11128 | #define HAVE_ICONV 1 |
ba479fd2 | 11129 | _ACEOF |
f91abfce | 11130 | |
dfb77e37 KC |
11131 | fi |
11132 | if test "$am_cv_lib_iconv" = yes; then | |
11133 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 | |
11134 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
11135 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11136 | echo "${ECHO_T}$LIBICONV" >&6 | |
11137 | else | |
11138 | CPPFLAGS="$am_save_CPPFLAGS" | |
11139 | LIBICONV= | |
11140 | LTLIBICONV= | |
11141 | fi | |
11142 | ||
11143 | ||
11144 | ||
11145 | if test "$am_cv_func_iconv" = yes; then | |
ba479fd2 NN |
11146 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11147 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
11148 | if test "${am_cv_proto_iconv+set}" = set; then | |
11149 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11150 | else |
ba479fd2 NN |
11151 | |
11152 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11153 | /* confdefs.h. */ |
11154 | _ACEOF | |
11155 | cat confdefs.h >>conftest.$ac_ext | |
11156 | cat >>conftest.$ac_ext <<_ACEOF | |
11157 | /* end confdefs.h. */ | |
f91abfce TT |
11158 | |
11159 | #include <stdlib.h> | |
11160 | #include <iconv.h> | |
11161 | extern | |
11162 | #ifdef __cplusplus | |
11163 | "C" | |
11164 | #endif | |
11165 | #if defined(__STDC__) || defined(__cplusplus) | |
11166 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11167 | #else | |
11168 | size_t iconv(); | |
11169 | #endif | |
11170 | ||
ba479fd2 NN |
11171 | int |
11172 | main () | |
11173 | { | |
f91abfce | 11174 | |
ba479fd2 NN |
11175 | ; |
11176 | return 0; | |
11177 | } | |
11178 | _ACEOF | |
11179 | rm -f conftest.$ac_objext | |
11180 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11181 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11182 | ac_status=$? |
86da66b5 HPN |
11183 | grep -v '^ *+' conftest.er1 >conftest.err |
11184 | rm -f conftest.er1 | |
11185 | cat conftest.err >&5 | |
ba479fd2 NN |
11186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11187 | (exit $ac_status); } && | |
ec6c7392 PB |
11188 | { ac_try='test -z "$ac_c_werror_flag" |
11189 | || test ! -s conftest.err' | |
86da66b5 HPN |
11190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11191 | (eval $ac_try) 2>&5 | |
11192 | ac_status=$? | |
11193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11194 | (exit $ac_status); }; } && | |
11195 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11197 | (eval $ac_try) 2>&5 | |
11198 | ac_status=$? | |
11199 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11200 | (exit $ac_status); }; }; then | |
f91abfce TT |
11201 | am_cv_proto_iconv_arg1="" |
11202 | else | |
ba479fd2 NN |
11203 | echo "$as_me: failed program was:" >&5 |
11204 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11205 | ||
11206 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 11207 | fi |
86da66b5 | 11208 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11209 | 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);" |
11210 | fi | |
11211 | ||
11212 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
ba479fd2 NN |
11213 | echo "$as_me:$LINENO: result: ${ac_t:- |
11214 | }$am_cv_proto_iconv" >&5 | |
11215 | echo "${ECHO_T}${ac_t:- | |
11216 | }$am_cv_proto_iconv" >&6 | |
11217 | ||
11218 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11219 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11220 | _ACEOF |
f91abfce TT |
11221 | |
11222 | fi | |
f91abfce | 11223 | |
56694dd9 ZW |
11224 | # Until we have in-tree GNU iconv: |
11225 | LIBICONV_DEP= | |
11226 | ||
11227 | ||
18fc9bd4 RG |
11228 | |
11229 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 | |
11230 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
11231 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then | |
11232 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11233 | else | |
11234 | cat >conftest.$ac_ext <<_ACEOF | |
11235 | /* confdefs.h. */ | |
11236 | _ACEOF | |
11237 | cat confdefs.h >>conftest.$ac_ext | |
11238 | cat >>conftest.$ac_ext <<_ACEOF | |
11239 | /* end confdefs.h. */ | |
11240 | #include <locale.h> | |
11241 | int | |
11242 | main () | |
11243 | { | |
11244 | return LC_MESSAGES | |
11245 | ; | |
11246 | return 0; | |
11247 | } | |
11248 | _ACEOF | |
11249 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11250 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11251 | (eval $ac_link) 2>conftest.er1 | |
11252 | ac_status=$? | |
11253 | grep -v '^ *+' conftest.er1 >conftest.err | |
11254 | rm -f conftest.er1 | |
11255 | cat conftest.err >&5 | |
11256 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11257 | (exit $ac_status); } && | |
11258 | { ac_try='test -z "$ac_c_werror_flag" | |
11259 | || test ! -s conftest.err' | |
11260 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11261 | (eval $ac_try) 2>&5 | |
11262 | ac_status=$? | |
11263 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11264 | (exit $ac_status); }; } && | |
11265 | { ac_try='test -s conftest$ac_exeext' | |
11266 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11267 | (eval $ac_try) 2>&5 | |
11268 | ac_status=$? | |
11269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11270 | (exit $ac_status); }; }; then | |
11271 | am_cv_val_LC_MESSAGES=yes | |
11272 | else | |
11273 | echo "$as_me: failed program was:" >&5 | |
11274 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11275 | ||
11276 | am_cv_val_LC_MESSAGES=no | |
11277 | fi | |
11278 | rm -f conftest.err conftest.$ac_objext \ | |
11279 | conftest$ac_exeext conftest.$ac_ext | |
11280 | fi | |
11281 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 | |
11282 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
11283 | if test $am_cv_val_LC_MESSAGES = yes; then | |
11284 | ||
11285 | cat >>confdefs.h <<\_ACEOF | |
11286 | #define HAVE_LC_MESSAGES 1 | |
11287 | _ACEOF | |
11288 | ||
11289 | fi | |
11290 | ||
f91abfce | 11291 | |
a03ea89b BM |
11292 | |
11293 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 | |
11294 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
11295 | if test "${am_cv_langinfo_codeset+set}" = set; then | |
11296 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11297 | else | |
11298 | cat >conftest.$ac_ext <<_ACEOF | |
11299 | /* confdefs.h. */ | |
11300 | _ACEOF | |
11301 | cat confdefs.h >>conftest.$ac_ext | |
11302 | cat >>conftest.$ac_ext <<_ACEOF | |
11303 | /* end confdefs.h. */ | |
11304 | #include <langinfo.h> | |
11305 | int | |
11306 | main () | |
11307 | { | |
11308 | char* cs = nl_langinfo(CODESET); | |
11309 | ; | |
11310 | return 0; | |
11311 | } | |
11312 | _ACEOF | |
11313 | rm -f conftest.$ac_objext conftest$ac_exeext | |
11314 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
11315 | (eval $ac_link) 2>conftest.er1 | |
11316 | ac_status=$? | |
11317 | grep -v '^ *+' conftest.er1 >conftest.err | |
11318 | rm -f conftest.er1 | |
11319 | cat conftest.err >&5 | |
11320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11321 | (exit $ac_status); } && | |
ec6c7392 PB |
11322 | { ac_try='test -z "$ac_c_werror_flag" |
11323 | || test ! -s conftest.err' | |
a03ea89b BM |
11324 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11325 | (eval $ac_try) 2>&5 | |
11326 | ac_status=$? | |
11327 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11328 | (exit $ac_status); }; } && | |
11329 | { ac_try='test -s conftest$ac_exeext' | |
11330 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11331 | (eval $ac_try) 2>&5 | |
11332 | ac_status=$? | |
11333 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11334 | (exit $ac_status); }; }; then | |
11335 | am_cv_langinfo_codeset=yes | |
11336 | else | |
11337 | echo "$as_me: failed program was:" >&5 | |
11338 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11339 | ||
11340 | am_cv_langinfo_codeset=no | |
11341 | fi | |
11342 | rm -f conftest.err conftest.$ac_objext \ | |
11343 | conftest$ac_exeext conftest.$ac_ext | |
11344 | ||
11345 | fi | |
11346 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 | |
11347 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
11348 | if test $am_cv_langinfo_codeset = yes; then | |
11349 | ||
11350 | cat >>confdefs.h <<\_ACEOF | |
11351 | #define HAVE_LANGINFO_CODESET 1 | |
11352 | _ACEOF | |
11353 | ||
11354 | fi | |
11355 | ||
11356 | ||
86cf1cbd KG |
11357 | # We will need to find libiberty.h and ansidecl.h |
11358 | saved_CFLAGS="$CFLAGS" | |
11359 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11360 | |
11361 | ||
11362 | ||
11363 | ||
11364 | ||
11365 | ||
11366 | ||
11367 | ||
11368 | ||
11369 | ||
11370 | ||
11371 | ||
11372 | ||
11373 | ||
11374 | ||
11375 | ||
11376 | ||
11377 | ||
11378 | ||
11379 | ||
11380 | ||
6a257778 | 11381 | |
ad6717df PB |
11382 | |
11383 | ||
0d667716 KG |
11384 | |
11385 | ||
11386 | ||
11387 | ||
11388 | ||
11389 | ||
11390 | ||
11391 | ||
11392 | ||
11393 | ||
367e8319 | 11394 | |
0d667716 KG |
11395 | |
11396 | ||
7391b66c | 11397 | |
ed5b9f96 GK |
11398 | |
11399 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11400 | strsignal strstr strverscmp \ | |
11401 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11402 | 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 | 11403 | do |
ad6717df | 11404 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11405 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11406 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11407 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11408 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11409 | else | |
11410 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11411 | /* confdefs.h. */ |
11412 | _ACEOF | |
11413 | cat confdefs.h >>conftest.$ac_ext | |
11414 | cat >>conftest.$ac_ext <<_ACEOF | |
11415 | /* end confdefs.h. */ | |
7afe8c41 KG |
11416 | #undef $ac_tr_decl |
11417 | #define $ac_tr_decl 1 | |
ba479fd2 | 11418 | |
d02af173 | 11419 | #include "ansidecl.h" |
86cf1cbd | 11420 | #include "system.h" |
f31e826b | 11421 | |
ba479fd2 NN |
11422 | int |
11423 | main () | |
11424 | { | |
86cf1cbd KG |
11425 | #ifndef $ac_func |
11426 | char *(*pfn) = (char *(*)) $ac_func ; | |
11427 | #endif | |
ba479fd2 NN |
11428 | ; |
11429 | return 0; | |
11430 | } | |
11431 | _ACEOF | |
11432 | rm -f conftest.$ac_objext | |
11433 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11434 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11435 | ac_status=$? |
86da66b5 HPN |
11436 | grep -v '^ *+' conftest.er1 >conftest.err |
11437 | rm -f conftest.er1 | |
11438 | cat conftest.err >&5 | |
ba479fd2 NN |
11439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11440 | (exit $ac_status); } && | |
ec6c7392 PB |
11441 | { ac_try='test -z "$ac_c_werror_flag" |
11442 | || test ! -s conftest.err' | |
86da66b5 HPN |
11443 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11444 | (eval $ac_try) 2>&5 | |
11445 | ac_status=$? | |
11446 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11447 | (exit $ac_status); }; } && | |
11448 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11449 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11450 | (eval $ac_try) 2>&5 | |
11451 | ac_status=$? | |
11452 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11453 | (exit $ac_status); }; }; then | |
f31e826b | 11454 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11455 | else |
ba479fd2 NN |
11456 | echo "$as_me: failed program was:" >&5 |
11457 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11458 | ||
11459 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11460 | fi |
86da66b5 | 11461 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11462 | fi |
11463 | ||
f31e826b | 11464 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11465 | echo "$as_me:$LINENO: result: yes" >&5 |
11466 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11467 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11468 | _ACEOF |
11469 | ||
81bf3d9e | 11470 | else |
ba479fd2 NN |
11471 | echo "$as_me:$LINENO: result: no" >&5 |
11472 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11473 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11474 | _ACEOF |
11475 | ||
81bf3d9e RH |
11476 | fi |
11477 | ||
11478 | done | |
ba479fd2 | 11479 | |
ba479fd2 | 11480 | |
ba479fd2 | 11481 | |
81bf3d9e | 11482 | |
81bf3d9e RH |
11483 | |
11484 | for ac_func in getrlimit setrlimit getrusage | |
11485 | do | |
ad6717df | 11486 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11487 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11488 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11489 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11490 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11491 | else | |
11492 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11493 | /* confdefs.h. */ |
11494 | _ACEOF | |
11495 | cat confdefs.h >>conftest.$ac_ext | |
11496 | cat >>conftest.$ac_ext <<_ACEOF | |
11497 | /* end confdefs.h. */ | |
7afe8c41 KG |
11498 | #undef $ac_tr_decl |
11499 | #define $ac_tr_decl 1 | |
ba479fd2 | 11500 | |
d02af173 | 11501 | #include "ansidecl.h" |
86cf1cbd | 11502 | #include "system.h" |
81bf3d9e RH |
11503 | #ifdef HAVE_SYS_RESOURCE_H |
11504 | #include <sys/resource.h> | |
11505 | #endif | |
11506 | ||
f31e826b | 11507 | |
ba479fd2 NN |
11508 | int |
11509 | main () | |
11510 | { | |
86cf1cbd KG |
11511 | #ifndef $ac_func |
11512 | char *(*pfn) = (char *(*)) $ac_func ; | |
11513 | #endif | |
ba479fd2 NN |
11514 | ; |
11515 | return 0; | |
11516 | } | |
11517 | _ACEOF | |
11518 | rm -f conftest.$ac_objext | |
11519 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11520 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11521 | ac_status=$? |
86da66b5 HPN |
11522 | grep -v '^ *+' conftest.er1 >conftest.err |
11523 | rm -f conftest.er1 | |
11524 | cat conftest.err >&5 | |
ba479fd2 NN |
11525 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11526 | (exit $ac_status); } && | |
ec6c7392 PB |
11527 | { ac_try='test -z "$ac_c_werror_flag" |
11528 | || test ! -s conftest.err' | |
86da66b5 HPN |
11529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11530 | (eval $ac_try) 2>&5 | |
11531 | ac_status=$? | |
11532 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11533 | (exit $ac_status); }; } && | |
11534 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11536 | (eval $ac_try) 2>&5 | |
11537 | ac_status=$? | |
11538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11539 | (exit $ac_status); }; }; then | |
f31e826b | 11540 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11541 | else |
ba479fd2 NN |
11542 | echo "$as_me: failed program was:" >&5 |
11543 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11544 | ||
11545 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 11546 | fi |
86da66b5 | 11547 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11548 | fi |
11549 | ||
f31e826b | 11550 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
ba479fd2 NN |
11551 | echo "$as_me:$LINENO: result: yes" >&5 |
11552 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11553 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11554 | _ACEOF |
11555 | ||
81bf3d9e | 11556 | else |
ba479fd2 NN |
11557 | echo "$as_me:$LINENO: result: no" >&5 |
11558 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11559 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11560 | _ACEOF |
11561 | ||
81bf3d9e RH |
11562 | fi |
11563 | ||
11564 | done | |
86cf1cbd | 11565 | |
81bf3d9e | 11566 | |
ba479fd2 | 11567 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11568 | /* confdefs.h. */ |
11569 | _ACEOF | |
11570 | cat confdefs.h >>conftest.$ac_ext | |
11571 | cat >>conftest.$ac_ext <<_ACEOF | |
11572 | /* end confdefs.h. */ | |
b2522d2b HPN |
11573 | |
11574 | #include "ansidecl.h" | |
11575 | #include "system.h" | |
11576 | #ifdef HAVE_SYS_RESOURCE_H | |
11577 | #include <sys/resource.h> | |
11578 | #endif | |
11579 | ||
ba479fd2 NN |
11580 | int |
11581 | main () | |
11582 | { | |
b2522d2b | 11583 | rlim_t l = 0; |
ba479fd2 NN |
11584 | ; |
11585 | return 0; | |
11586 | } | |
11587 | _ACEOF | |
11588 | rm -f conftest.$ac_objext | |
11589 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11590 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11591 | ac_status=$? |
86da66b5 HPN |
11592 | grep -v '^ *+' conftest.er1 >conftest.err |
11593 | rm -f conftest.er1 | |
11594 | cat conftest.err >&5 | |
ba479fd2 NN |
11595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11596 | (exit $ac_status); } && | |
ec6c7392 PB |
11597 | { ac_try='test -z "$ac_c_werror_flag" |
11598 | || test ! -s conftest.err' | |
86da66b5 HPN |
11599 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11600 | (eval $ac_try) 2>&5 | |
11601 | ac_status=$? | |
11602 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11603 | (exit $ac_status); }; } && | |
11604 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11605 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11606 | (eval $ac_try) 2>&5 | |
11607 | ac_status=$? | |
11608 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11609 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11610 | : |
11611 | else | |
ba479fd2 NN |
11612 | echo "$as_me: failed program was:" >&5 |
11613 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11614 | ||
11615 | ||
11616 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11617 | #define rlim_t long |
ba479fd2 | 11618 | _ACEOF |
b2522d2b HPN |
11619 | |
11620 | fi | |
86da66b5 | 11621 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11622 | |
2102b2fe RS |
11623 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11624 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11625 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11626 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11627 | |
351df804 | 11628 | for ac_func in ldgetname |
c1800ec8 | 11629 | do |
ad6717df | 11630 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11631 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11632 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11633 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11634 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11635 | else | |
11636 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11637 | /* confdefs.h. */ |
11638 | _ACEOF | |
11639 | cat confdefs.h >>conftest.$ac_ext | |
11640 | cat >>conftest.$ac_ext <<_ACEOF | |
11641 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11642 | #undef $ac_tr_decl |
11643 | #define $ac_tr_decl 1 | |
ba479fd2 | 11644 | |
351df804 KG |
11645 | #include "ansidecl.h" |
11646 | #include "system.h" | |
11647 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11648 | #undef FREAD |
11649 | #undef FWRITE | |
351df804 KG |
11650 | #include <ldfcn.h> |
11651 | #endif | |
11652 | ||
11653 | ||
ba479fd2 NN |
11654 | int |
11655 | main () | |
11656 | { | |
351df804 KG |
11657 | #ifndef $ac_func |
11658 | char *(*pfn) = (char *(*)) $ac_func ; | |
11659 | #endif | |
ba479fd2 NN |
11660 | ; |
11661 | return 0; | |
11662 | } | |
11663 | _ACEOF | |
11664 | rm -f conftest.$ac_objext | |
11665 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11666 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11667 | ac_status=$? |
86da66b5 HPN |
11668 | grep -v '^ *+' conftest.er1 >conftest.err |
11669 | rm -f conftest.er1 | |
11670 | cat conftest.err >&5 | |
ba479fd2 NN |
11671 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11672 | (exit $ac_status); } && | |
ec6c7392 PB |
11673 | { ac_try='test -z "$ac_c_werror_flag" |
11674 | || test ! -s conftest.err' | |
86da66b5 HPN |
11675 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11676 | (eval $ac_try) 2>&5 | |
11677 | ac_status=$? | |
11678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11679 | (exit $ac_status); }; } && | |
11680 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11682 | (eval $ac_try) 2>&5 | |
11683 | ac_status=$? | |
11684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11685 | (exit $ac_status); }; }; then | |
351df804 KG |
11686 | eval "gcc_cv_have_decl_$ac_func=yes" |
11687 | else | |
ba479fd2 NN |
11688 | echo "$as_me: failed program was:" >&5 |
11689 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11690 | ||
11691 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 11692 | fi |
86da66b5 | 11693 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11694 | fi |
11695 | ||
11696 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11697 | echo "$as_me:$LINENO: result: yes" >&5 |
11698 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11699 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11700 | _ACEOF |
11701 | ||
351df804 | 11702 | else |
ba479fd2 NN |
11703 | echo "$as_me:$LINENO: result: no" >&5 |
11704 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11705 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11706 | _ACEOF |
11707 | ||
351df804 KG |
11708 | fi |
11709 | ||
11710 | done | |
ba479fd2 | 11711 | |
351df804 KG |
11712 | |
11713 | ||
11714 | for ac_func in times | |
11715 | do | |
ad6717df | 11716 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
ba479fd2 NN |
11717 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11718 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11719 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11720 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11721 | else | |
11722 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11723 | /* confdefs.h. */ |
11724 | _ACEOF | |
11725 | cat confdefs.h >>conftest.$ac_ext | |
11726 | cat >>conftest.$ac_ext <<_ACEOF | |
11727 | /* end confdefs.h. */ | |
351df804 KG |
11728 | #undef $ac_tr_decl |
11729 | #define $ac_tr_decl 1 | |
ba479fd2 | 11730 | |
c1800ec8 ZW |
11731 | #include "ansidecl.h" |
11732 | #include "system.h" | |
11733 | #ifdef HAVE_SYS_TIMES_H | |
11734 | #include <sys/times.h> | |
11735 | #endif | |
11736 | ||
11737 | ||
ba479fd2 NN |
11738 | int |
11739 | main () | |
11740 | { | |
c1800ec8 ZW |
11741 | #ifndef $ac_func |
11742 | char *(*pfn) = (char *(*)) $ac_func ; | |
11743 | #endif | |
ba479fd2 NN |
11744 | ; |
11745 | return 0; | |
11746 | } | |
11747 | _ACEOF | |
11748 | rm -f conftest.$ac_objext | |
11749 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11750 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11751 | ac_status=$? |
86da66b5 HPN |
11752 | grep -v '^ *+' conftest.er1 >conftest.err |
11753 | rm -f conftest.er1 | |
11754 | cat conftest.err >&5 | |
ba479fd2 NN |
11755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11756 | (exit $ac_status); } && | |
ec6c7392 PB |
11757 | { ac_try='test -z "$ac_c_werror_flag" |
11758 | || test ! -s conftest.err' | |
86da66b5 HPN |
11759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11760 | (eval $ac_try) 2>&5 | |
11761 | ac_status=$? | |
11762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11763 | (exit $ac_status); }; } && | |
11764 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11765 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11766 | (eval $ac_try) 2>&5 | |
11767 | ac_status=$? | |
11768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11769 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11770 | eval "gcc_cv_have_decl_$ac_func=yes" |
11771 | else | |
ba479fd2 NN |
11772 | echo "$as_me: failed program was:" >&5 |
11773 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11774 | ||
11775 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 11776 | fi |
86da66b5 | 11777 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11778 | fi |
11779 | ||
11780 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
ba479fd2 NN |
11781 | echo "$as_me:$LINENO: result: yes" >&5 |
11782 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11783 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11784 | _ACEOF |
11785 | ||
c1800ec8 | 11786 | else |
ba479fd2 NN |
11787 | echo "$as_me:$LINENO: result: no" >&5 |
11788 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11789 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11790 | _ACEOF |
11791 | ||
c1800ec8 ZW |
11792 | fi |
11793 | ||
11794 | done | |
c1800ec8 ZW |
11795 | |
11796 | ||
4f6d8cc8 GK |
11797 | |
11798 | for ac_func in sigaltstack | |
11799 | do | |
11800 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
11801 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 | |
11802 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11803 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
11804 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11805 | else | |
11806 | cat >conftest.$ac_ext <<_ACEOF | |
11807 | /* confdefs.h. */ | |
11808 | _ACEOF | |
11809 | cat confdefs.h >>conftest.$ac_ext | |
11810 | cat >>conftest.$ac_ext <<_ACEOF | |
11811 | /* end confdefs.h. */ | |
11812 | #undef $ac_tr_decl | |
11813 | #define $ac_tr_decl 1 | |
11814 | ||
11815 | #include "ansidecl.h" | |
11816 | #include "system.h" | |
11817 | #include <signal.h> | |
11818 | ||
11819 | ||
11820 | int | |
11821 | main () | |
11822 | { | |
11823 | #ifndef $ac_func | |
11824 | char *(*pfn) = (char *(*)) $ac_func ; | |
11825 | #endif | |
11826 | ; | |
11827 | return 0; | |
11828 | } | |
11829 | _ACEOF | |
11830 | rm -f conftest.$ac_objext | |
11831 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
11832 | (eval $ac_compile) 2>conftest.er1 | |
11833 | ac_status=$? | |
11834 | grep -v '^ *+' conftest.er1 >conftest.err | |
11835 | rm -f conftest.er1 | |
11836 | cat conftest.err >&5 | |
11837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11838 | (exit $ac_status); } && | |
ec6c7392 PB |
11839 | { ac_try='test -z "$ac_c_werror_flag" |
11840 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
11841 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11842 | (eval $ac_try) 2>&5 | |
11843 | ac_status=$? | |
11844 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11845 | (exit $ac_status); }; } && | |
11846 | { ac_try='test -s conftest.$ac_objext' | |
11847 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11848 | (eval $ac_try) 2>&5 | |
11849 | ac_status=$? | |
11850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11851 | (exit $ac_status); }; }; then | |
11852 | eval "gcc_cv_have_decl_$ac_func=yes" | |
11853 | else | |
11854 | echo "$as_me: failed program was:" >&5 | |
11855 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11856 | ||
11857 | eval "gcc_cv_have_decl_$ac_func=no" | |
11858 | fi | |
11859 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
11860 | fi | |
11861 | ||
11862 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
11863 | echo "$as_me:$LINENO: result: yes" >&5 | |
11864 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
11865 | #define $ac_tr_decl 1 | |
11866 | _ACEOF | |
11867 | ||
11868 | else | |
11869 | echo "$as_me:$LINENO: result: no" >&5 | |
11870 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
11871 | #define $ac_tr_decl 0 | |
11872 | _ACEOF | |
11873 | ||
11874 | fi | |
11875 | ||
11876 | done | |
11877 | ||
11878 | ||
c1800ec8 | 11879 | # More time-related stuff. |
ba479fd2 NN |
11880 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11881 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
11882 | if test "${ac_cv_struct_tms+set}" = set; then | |
11883 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11884 | else | |
11885 | ||
11886 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11887 | /* confdefs.h. */ |
11888 | _ACEOF | |
11889 | cat confdefs.h >>conftest.$ac_ext | |
11890 | cat >>conftest.$ac_ext <<_ACEOF | |
11891 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11892 | |
11893 | #include "ansidecl.h" | |
11894 | #include "system.h" | |
11895 | #ifdef HAVE_SYS_TIMES_H | |
11896 | #include <sys/times.h> | |
11897 | #endif | |
11898 | ||
ba479fd2 NN |
11899 | int |
11900 | main () | |
11901 | { | |
c1800ec8 | 11902 | struct tms tms; |
ba479fd2 NN |
11903 | ; |
11904 | return 0; | |
11905 | } | |
11906 | _ACEOF | |
11907 | rm -f conftest.$ac_objext | |
11908 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11909 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11910 | ac_status=$? |
86da66b5 HPN |
11911 | grep -v '^ *+' conftest.er1 >conftest.err |
11912 | rm -f conftest.er1 | |
11913 | cat conftest.err >&5 | |
ba479fd2 NN |
11914 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11915 | (exit $ac_status); } && | |
ec6c7392 PB |
11916 | { ac_try='test -z "$ac_c_werror_flag" |
11917 | || test ! -s conftest.err' | |
86da66b5 HPN |
11918 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11919 | (eval $ac_try) 2>&5 | |
11920 | ac_status=$? | |
11921 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11922 | (exit $ac_status); }; } && | |
11923 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11924 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11925 | (eval $ac_try) 2>&5 | |
11926 | ac_status=$? | |
11927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11928 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11929 | ac_cv_struct_tms=yes |
11930 | else | |
ba479fd2 NN |
11931 | echo "$as_me: failed program was:" >&5 |
11932 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11933 | ||
11934 | ac_cv_struct_tms=no | |
c1800ec8 | 11935 | fi |
86da66b5 | 11936 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11937 | fi |
ba479fd2 NN |
11938 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11939 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11940 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11941 | |
11942 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11943 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11944 | _ACEOF |
c1800ec8 ZW |
11945 | |
11946 | fi | |
11947 | ||
11948 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11949 | # revisit after autoconf 2.50. | |
ba479fd2 NN |
11950 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11951 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
11952 | if test "${gcc_cv_type_clock_t+set}" = set; then | |
11953 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11954 | else | |
11955 | ||
11956 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11957 | /* confdefs.h. */ |
11958 | _ACEOF | |
11959 | cat confdefs.h >>conftest.$ac_ext | |
11960 | cat >>conftest.$ac_ext <<_ACEOF | |
11961 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11962 | |
11963 | #include "ansidecl.h" | |
11964 | #include "system.h" | |
11965 | ||
ba479fd2 NN |
11966 | int |
11967 | main () | |
11968 | { | |
c1800ec8 | 11969 | clock_t x; |
ba479fd2 NN |
11970 | ; |
11971 | return 0; | |
11972 | } | |
11973 | _ACEOF | |
11974 | rm -f conftest.$ac_objext | |
11975 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 11976 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 11977 | ac_status=$? |
86da66b5 HPN |
11978 | grep -v '^ *+' conftest.er1 >conftest.err |
11979 | rm -f conftest.er1 | |
11980 | cat conftest.err >&5 | |
ba479fd2 NN |
11981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
11982 | (exit $ac_status); } && | |
ec6c7392 PB |
11983 | { ac_try='test -z "$ac_c_werror_flag" |
11984 | || test ! -s conftest.err' | |
86da66b5 HPN |
11985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11986 | (eval $ac_try) 2>&5 | |
11987 | ac_status=$? | |
11988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11989 | (exit $ac_status); }; } && | |
11990 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
11991 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
11992 | (eval $ac_try) 2>&5 | |
11993 | ac_status=$? | |
11994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11995 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11996 | gcc_cv_type_clock_t=yes |
11997 | else | |
ba479fd2 NN |
11998 | echo "$as_me: failed program was:" >&5 |
11999 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12000 | ||
12001 | gcc_cv_type_clock_t=no | |
c1800ec8 | 12002 | fi |
86da66b5 | 12003 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 12004 | fi |
ba479fd2 NN |
12005 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
12006 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 12007 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
12008 | |
12009 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12010 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 12011 | _ACEOF |
c1800ec8 ZW |
12012 | |
12013 | fi | |
12014 | ||
eb70d86d AS |
12015 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
12016 | CFLAGS="$saved_CFLAGS" | |
12017 | ||
07cf4226 DM |
12018 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
12019 | if test "${enable_initfini_array+set}" = set; then | |
12020 | enableval="$enable_initfini_array" | |
ba479fd2 | 12021 | |
07cf4226 | 12022 | else |
ba479fd2 NN |
12023 | |
12024 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 | |
12025 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
12026 | if test "${gcc_cv_initfini_array+set}" = set; then | |
12027 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12028 | else |
eb70d86d | 12029 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12030 | gcc_cv_initfini_array=no |
eb70d86d | 12031 | else |
ba479fd2 | 12032 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12033 | /* confdefs.h. */ |
12034 | _ACEOF | |
12035 | cat confdefs.h >>conftest.$ac_ext | |
12036 | cat >>conftest.$ac_ext <<_ACEOF | |
12037 | /* end confdefs.h. */ | |
eb70d86d | 12038 | |
07cf4226 DM |
12039 | static int x = -1; |
12040 | int main (void) { return x; } | |
12041 | int foo (void) { x = 0; } | |
12042 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12043 | _ACEOF |
12044 | rm -f conftest$ac_exeext | |
12045 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12046 | (eval $ac_link) 2>&5 | |
12047 | ac_status=$? | |
12048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12049 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
12050 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12051 | (eval $ac_try) 2>&5 | |
12052 | ac_status=$? | |
12053 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12054 | (exit $ac_status); }; }; then | |
918c4fe4 | 12055 | gcc_cv_initfini_array=yes |
eb70d86d | 12056 | else |
ba479fd2 NN |
12057 | echo "$as_me: program exited with status $ac_status" >&5 |
12058 | echo "$as_me: failed program was:" >&5 | |
12059 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12060 | ||
12061 | ( exit $ac_status ) | |
12062 | gcc_cv_initfini_array=no | |
eb70d86d | 12063 | fi |
86da66b5 | 12064 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12065 | fi |
07cf4226 | 12066 | fi |
ba479fd2 NN |
12067 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12068 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 12069 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12070 | |
ba479fd2 | 12071 | fi; |
63cf211a | 12072 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12073 | |
12074 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12075 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12076 | _ACEOF |
07cf4226 | 12077 | |
eb70d86d | 12078 | fi |
81bf3d9e | 12079 | |
ba479fd2 NN |
12080 | # mkdir takes a single argument on some systems. |
12081 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 | |
12082 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
12083 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then | |
12084 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12085 | else |
ba479fd2 | 12086 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12087 | /* confdefs.h. */ |
12088 | _ACEOF | |
12089 | cat confdefs.h >>conftest.$ac_ext | |
12090 | cat >>conftest.$ac_ext <<_ACEOF | |
12091 | /* end confdefs.h. */ | |
75923b2f MK |
12092 | |
12093 | #include <sys/types.h> | |
12094 | #ifdef HAVE_SYS_STAT_H | |
12095 | # include <sys/stat.h> | |
12096 | #endif | |
12097 | #ifdef HAVE_UNISTD_H | |
12098 | # include <unistd.h> | |
12099 | #endif | |
12100 | #ifdef HAVE_DIRECT_H | |
12101 | # include <direct.h> | |
12102 | #endif | |
ba479fd2 NN |
12103 | int |
12104 | main () | |
12105 | { | |
75923b2f | 12106 | mkdir ("foo", 0); |
ba479fd2 NN |
12107 | ; |
12108 | return 0; | |
12109 | } | |
12110 | _ACEOF | |
12111 | rm -f conftest.$ac_objext | |
12112 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
86da66b5 | 12113 | (eval $ac_compile) 2>conftest.er1 |
ba479fd2 | 12114 | ac_status=$? |
86da66b5 HPN |
12115 | grep -v '^ *+' conftest.er1 >conftest.err |
12116 | rm -f conftest.er1 | |
12117 | cat conftest.err >&5 | |
ba479fd2 NN |
12118 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12119 | (exit $ac_status); } && | |
ec6c7392 PB |
12120 | { ac_try='test -z "$ac_c_werror_flag" |
12121 | || test ! -s conftest.err' | |
86da66b5 HPN |
12122 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12123 | (eval $ac_try) 2>&5 | |
12124 | ac_status=$? | |
12125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12126 | (exit $ac_status); }; } && | |
12127 | { ac_try='test -s conftest.$ac_objext' | |
ba479fd2 NN |
12128 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12129 | (eval $ac_try) 2>&5 | |
12130 | ac_status=$? | |
12131 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12132 | (exit $ac_status); }; }; then | |
75923b2f MK |
12133 | gcc_cv_mkdir_takes_one_arg=no |
12134 | else | |
ba479fd2 NN |
12135 | echo "$as_me: failed program was:" >&5 |
12136 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12137 | ||
12138 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 12139 | fi |
86da66b5 | 12140 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 12141 | fi |
ba479fd2 NN |
12142 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12143 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 12144 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12145 | |
12146 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12147 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12148 | _ACEOF |
75923b2f MK |
12149 | |
12150 | fi | |
12151 | ||
12152 | ||
861bb6c1 JL |
12153 | # File extensions |
12154 | manext='.1' | |
12155 | objext='.o' | |
12156 | ||
12157 | ||
12158 | ||
4977bab6 ZW |
12159 | # With Setjmp/Longjmp based exception handling. |
12160 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
12161 | if test "${enable_sjlj_exceptions+set}" = set; then | |
12162 | enableval="$enable_sjlj_exceptions" | |
12163 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 12164 | |
ba479fd2 NN |
12165 | cat >>confdefs.h <<_ACEOF |
12166 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12167 | _ACEOF | |
4977bab6 | 12168 | |
ba479fd2 | 12169 | fi; |
4977bab6 | 12170 | |
443728bb L |
12171 | # For platforms with the unwind ABI which includes an unwind library, |
12172 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12173 | |
443728bb L |
12174 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
12175 | if test "${with_system_libunwind+set}" = set; then | |
12176 | withval="$with_system_libunwind" | |
4977bab6 | 12177 | |
ba479fd2 | 12178 | fi; |
4977bab6 | 12179 | |
e64f5acf SE |
12180 | # config.gcc also contains tests of with_system_libunwind. |
12181 | if test x$with_system_libunwind = xyes; then | |
12182 | ||
12183 | cat >>confdefs.h <<\_ACEOF | |
12184 | #define HAVE_GETIPINFO 1 | |
12185 | _ACEOF | |
12186 | ||
12187 | fi | |
12188 | ||
34a86c2b NN |
12189 | # -------------------------------------------------------- |
12190 | # Build, host, and target specific configuration fragments | |
12191 | # -------------------------------------------------------- | |
12192 | ||
5b28c537 NN |
12193 | # Collect build-machine-specific information. |
12194 | . ${srcdir}/config.build | |
12195 | ||
a89ea0df NN |
12196 | # Collect host-machine-specific information. |
12197 | . ${srcdir}/config.host | |
12198 | ||
ef69da62 | 12199 | target_gtfiles= |
a89ea0df NN |
12200 | |
12201 | # Collect target-machine-specific information. | |
8ad9fb33 | 12202 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12203 | |
12204 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12205 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12206 | |
12207 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12208 | if test x"$tm_file" = x |
861bb6c1 JL |
12209 | then tm_file=$cpu_type/$cpu_type.h; fi |
12210 | ||
6b2adea9 | 12211 | if test x"$extra_headers" = x |
861bb6c1 JL |
12212 | then extra_headers=; fi |
12213 | ||
75bffa71 | 12214 | if test x$md_file = x |
e98e406f | 12215 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12216 | |
75bffa71 | 12217 | if test x$out_file = x |
861bb6c1 JL |
12218 | then out_file=$cpu_type/$cpu_type.c; fi |
12219 | ||
75bffa71 | 12220 | if test x"$tmake_file" = x |
861bb6c1 JL |
12221 | then tmake_file=$cpu_type/t-$cpu_type |
12222 | fi | |
12223 | ||
90e6a802 | 12224 | if test x"$dwarf2" = xyes |
756ee602 | 12225 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12226 | fi |
12227 | ||
861bb6c1 | 12228 | # Say what files are being used for the output code and MD file. |
11642c3a | 12229 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12230 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12231 | ||
11642c3a | 12232 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12233 | # about them and drop them. |
12234 | ||
11642c3a ZW |
12235 | bx= |
12236 | for x in $build_xm_file; do | |
12237 | if test -f $srcdir/config/$x | |
12238 | then bx="$bx $x" | |
ba479fd2 NN |
12239 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12240 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12241 | fi |
12242 | done | |
12243 | build_xm_file="$bx" | |
12244 | ||
12245 | hx= | |
12246 | for x in $host_xm_file; do | |
12247 | if test -f $srcdir/config/$x | |
12248 | then hx="$hx $x" | |
ba479fd2 NN |
12249 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12250 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12251 | fi |
12252 | done | |
12253 | host_xm_file="$hx" | |
12254 | ||
12255 | tx= | |
12256 | for x in $xm_file; do | |
12257 | if test -f $srcdir/config/$x | |
12258 | then tx="$tx $x" | |
ba479fd2 NN |
12259 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12260 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12261 | fi |
12262 | done | |
12263 | xm_file="$tx" | |
12264 | ||
861bb6c1 JL |
12265 | count=a |
12266 | for f in $tm_file; do | |
12267 | count=${count}x | |
12268 | done | |
75bffa71 | 12269 | if test $count = ax; then |
861bb6c1 JL |
12270 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12271 | else | |
12272 | echo "Using the following target machine macro files:" | |
12273 | for f in $tm_file; do | |
12274 | echo " $srcdir/config/$f" | |
12275 | done | |
12276 | fi | |
12277 | ||
4977bab6 | 12278 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12279 | |
12280 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12281 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12282 | _ACEOF |
4977bab6 ZW |
12283 | |
12284 | fi | |
12285 | ||
99fa8911 AP |
12286 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12287 | ||
12288 | cat >>confdefs.h <<\_ACEOF | |
12289 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12290 | _ACEOF | |
12291 | ||
12292 | fi | |
12293 | ||
861bb6c1 JL |
12294 | count=a |
12295 | for f in $host_xm_file; do | |
12296 | count=${count}x | |
12297 | done | |
11642c3a ZW |
12298 | if test $count = a; then |
12299 | : | |
12300 | elif test $count = ax; then | |
861bb6c1 JL |
12301 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12302 | else | |
12303 | echo "Using the following host machine macro files:" | |
12304 | for f in $host_xm_file; do | |
12305 | echo " $srcdir/config/$f" | |
12306 | done | |
12307 | fi | |
476d9098 | 12308 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12309 | |
75bffa71 | 12310 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12311 | count=a |
12312 | for f in $build_xm_file; do | |
12313 | count=${count}x | |
12314 | done | |
11642c3a ZW |
12315 | if test $count = a; then |
12316 | : | |
12317 | elif test $count = ax; then | |
861bb6c1 JL |
12318 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12319 | else | |
12320 | echo "Using the following build machine macro files:" | |
12321 | for f in $build_xm_file; do | |
12322 | echo " $srcdir/config/$f" | |
12323 | done | |
12324 | fi | |
12325 | fi | |
12326 | ||
4f6d8cc8 GK |
12327 | case ${host} in |
12328 | powerpc-*-darwin*) | |
12329 | echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 | |
12330 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 | |
12331 | if test "${gcc_cv_mcontext_underscores+set}" = set; then | |
12332 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12333 | else | |
12334 | cat >conftest.$ac_ext <<_ACEOF | |
12335 | ||
de4fb767 | 12336 | #include <sys/signal.h> |
4f6d8cc8 GK |
12337 | #include <ucontext.h> |
12338 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12339 | ||
12340 | _ACEOF | |
12341 | rm -f conftest.$ac_objext | |
12342 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
12343 | (eval $ac_compile) 2>conftest.er1 | |
12344 | ac_status=$? | |
12345 | grep -v '^ *+' conftest.er1 >conftest.err | |
12346 | rm -f conftest.er1 | |
12347 | cat conftest.err >&5 | |
12348 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12349 | (exit $ac_status); } && | |
ec6c7392 PB |
12350 | { ac_try='test -z "$ac_c_werror_flag" |
12351 | || test ! -s conftest.err' | |
4f6d8cc8 GK |
12352 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12353 | (eval $ac_try) 2>&5 | |
12354 | ac_status=$? | |
12355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12356 | (exit $ac_status); }; } && | |
12357 | { ac_try='test -s conftest.$ac_objext' | |
12358 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12359 | (eval $ac_try) 2>&5 | |
12360 | ac_status=$? | |
12361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12362 | (exit $ac_status); }; }; then | |
12363 | gcc_cv_mcontext_underscores=no | |
12364 | else | |
12365 | echo "$as_me: failed program was:" >&5 | |
12366 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12367 | ||
12368 | gcc_cv_mcontext_underscores=yes | |
12369 | fi | |
12370 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
12371 | fi | |
12372 | echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 | |
12373 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 | |
12374 | if test $gcc_cv_mcontext_underscores = yes; then | |
12375 | ||
12376 | cat >>confdefs.h <<\_ACEOF | |
12377 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12378 | _ACEOF | |
12379 | ||
12380 | fi | |
12381 | ;; | |
12382 | esac | |
12383 | ||
8bb915b6 NN |
12384 | # --------- |
12385 | # Threading | |
12386 | # --------- | |
12387 | ||
c2e494a8 | 12388 | # Check if a valid thread package |
615be2cf | 12389 | case ${enable_threads} in |
c2e494a8 NN |
12390 | "" | no) |
12391 | # No threads | |
12392 | target_thread_file='single' | |
12393 | ;; | |
12394 | yes) | |
12395 | # default | |
12396 | target_thread_file='single' | |
12397 | ;; | |
18167442 | 12398 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
769e49eb | 12399 | single | solaris | vxworks | win32 ) |
615be2cf | 12400 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12401 | ;; |
12402 | *) | |
615be2cf | 12403 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12404 | exit 1 |
12405 | ;; | |
12406 | esac | |
12407 | ||
12408 | if test x${thread_file} = x; then | |
12409 | # No thread file set by target-specific clauses in config.gcc, | |
12410 | # so use file chosen by default logic above | |
12411 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12412 | fi |
12413 | ||
8bb915b6 NN |
12414 | # Make gthr-default.h if we have a thread file. |
12415 | gthread_flags= | |
12416 | if test $thread_file != single; then | |
12417 | rm -f gthr-default.h | |
12418 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12419 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12420 | fi | |
12421 | ||
12422 | ||
12423 | # -------- | |
12424 | # UNSORTED | |
12425 | # -------- | |
12426 | ||
18fbf599 | 12427 | use_cxa_atexit=no |
2121a768 JT |
12428 | if test x$enable___cxa_atexit = xyes || \ |
12429 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 PB |
12430 | if test x$host = x$target; then |
12431 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 | |
354b7da5 DH |
12432 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 |
12433 | if test "${ac_cv_func___cxa_atexit+set}" = set; then | |
12434 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12435 | else | |
12436 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12437 | /* confdefs.h. */ |
12438 | _ACEOF | |
12439 | cat confdefs.h >>conftest.$ac_ext | |
12440 | cat >>conftest.$ac_ext <<_ACEOF | |
12441 | /* end confdefs.h. */ | |
86da66b5 HPN |
12442 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12443 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12444 | #define __cxa_atexit innocuous___cxa_atexit | |
12445 | ||
354b7da5 DH |
12446 | /* System header to define __stub macros and hopefully few prototypes, |
12447 | which can conflict with char __cxa_atexit (); below. | |
12448 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12449 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12450 | |
354b7da5 DH |
12451 | #ifdef __STDC__ |
12452 | # include <limits.h> | |
12453 | #else | |
12454 | # include <assert.h> | |
12455 | #endif | |
86da66b5 HPN |
12456 | |
12457 | #undef __cxa_atexit | |
12458 | ||
354b7da5 DH |
12459 | /* Override any gcc2 internal prototype to avoid an error. */ |
12460 | #ifdef __cplusplus | |
12461 | extern "C" | |
12462 | { | |
12463 | #endif | |
12464 | /* We use char because int might match the return type of a gcc2 | |
12465 | builtin and then its argument prototype would still apply. */ | |
12466 | char __cxa_atexit (); | |
12467 | /* The GNU C library defines this for functions which it implements | |
12468 | to always fail with ENOSYS. Some functions are actually named | |
12469 | something starting with __ and the normal name is an alias. */ | |
12470 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) | |
12471 | choke me | |
12472 | #else | |
12473 | char (*f) () = __cxa_atexit; | |
12474 | #endif | |
12475 | #ifdef __cplusplus | |
12476 | } | |
12477 | #endif | |
12478 | ||
12479 | int | |
12480 | main () | |
12481 | { | |
12482 | return f != __cxa_atexit; | |
12483 | ; | |
12484 | return 0; | |
12485 | } | |
12486 | _ACEOF | |
12487 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12488 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12489 | (eval $ac_link) 2>conftest.er1 |
354b7da5 | 12490 | ac_status=$? |
86da66b5 HPN |
12491 | grep -v '^ *+' conftest.er1 >conftest.err |
12492 | rm -f conftest.er1 | |
12493 | cat conftest.err >&5 | |
354b7da5 DH |
12494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12495 | (exit $ac_status); } && | |
ec6c7392 PB |
12496 | { ac_try='test -z "$ac_c_werror_flag" |
12497 | || test ! -s conftest.err' | |
86da66b5 HPN |
12498 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12499 | (eval $ac_try) 2>&5 | |
12500 | ac_status=$? | |
12501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12502 | (exit $ac_status); }; } && | |
12503 | { ac_try='test -s conftest$ac_exeext' | |
354b7da5 DH |
12504 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12505 | (eval $ac_try) 2>&5 | |
12506 | ac_status=$? | |
12507 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12508 | (exit $ac_status); }; }; then | |
12509 | ac_cv_func___cxa_atexit=yes | |
12510 | else | |
12511 | echo "$as_me: failed program was:" >&5 | |
12512 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12513 | ||
12514 | ac_cv_func___cxa_atexit=no | |
12515 | fi | |
86da66b5 HPN |
12516 | rm -f conftest.err conftest.$ac_objext \ |
12517 | conftest$ac_exeext conftest.$ac_ext | |
354b7da5 DH |
12518 | fi |
12519 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 | |
12520 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
12521 | if test $ac_cv_func___cxa_atexit = yes; then | |
18fbf599 PB |
12522 | use_cxa_atexit=yes |
12523 | else | |
12524 | echo "__cxa_atexit can't be enabled on this target" | |
12525 | fi | |
12526 | ||
12527 | else | |
12528 | # We can't check for __cxa_atexit when building a cross, so assume | |
12529 | # it is available | |
12530 | use_cxa_atexit=yes | |
12531 | fi | |
12532 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12533 | |
12534 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 12535 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 12536 | _ACEOF |
2121a768 | 12537 | |
18fbf599 | 12538 | fi |
2121a768 JT |
12539 | fi |
12540 | ||
e64f5acf SE |
12541 | use_getipinfo=yes |
12542 | if test x$with_system_libunwind = xyes; then | |
12543 | if test x$host = x$target; then | |
12544 | echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5 | |
12545 | echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6 | |
12546 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then | |
12547 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12548 | else | |
12549 | ac_func_search_save_LIBS=$LIBS | |
12550 | ac_cv_search__Unwind_GetIPInfo=no | |
12551 | cat >conftest.$ac_ext <<_ACEOF | |
12552 | /* confdefs.h. */ | |
12553 | _ACEOF | |
12554 | cat confdefs.h >>conftest.$ac_ext | |
12555 | cat >>conftest.$ac_ext <<_ACEOF | |
12556 | /* end confdefs.h. */ | |
12557 | ||
12558 | /* Override any gcc2 internal prototype to avoid an error. */ | |
12559 | #ifdef __cplusplus | |
12560 | extern "C" | |
12561 | #endif | |
12562 | /* We use char because int might match the return type of a gcc2 | |
12563 | builtin and then its argument prototype would still apply. */ | |
12564 | char _Unwind_GetIPInfo (); | |
12565 | int | |
12566 | main () | |
12567 | { | |
12568 | _Unwind_GetIPInfo (); | |
12569 | ; | |
12570 | return 0; | |
12571 | } | |
12572 | _ACEOF | |
12573 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12574 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12575 | (eval $ac_link) 2>conftest.er1 | |
12576 | ac_status=$? | |
12577 | grep -v '^ *+' conftest.er1 >conftest.err | |
12578 | rm -f conftest.er1 | |
12579 | cat conftest.err >&5 | |
12580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12581 | (exit $ac_status); } && | |
12582 | { ac_try='test -z "$ac_c_werror_flag" | |
12583 | || test ! -s conftest.err' | |
12584 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12585 | (eval $ac_try) 2>&5 | |
12586 | ac_status=$? | |
12587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12588 | (exit $ac_status); }; } && | |
12589 | { ac_try='test -s conftest$ac_exeext' | |
12590 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12591 | (eval $ac_try) 2>&5 | |
12592 | ac_status=$? | |
12593 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12594 | (exit $ac_status); }; }; then | |
12595 | ac_cv_search__Unwind_GetIPInfo="none required" | |
12596 | else | |
12597 | echo "$as_me: failed program was:" >&5 | |
12598 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12599 | ||
12600 | fi | |
12601 | rm -f conftest.err conftest.$ac_objext \ | |
12602 | conftest$ac_exeext conftest.$ac_ext | |
12603 | if test "$ac_cv_search__Unwind_GetIPInfo" = no; then | |
12604 | for ac_lib in unwind; do | |
12605 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12606 | cat >conftest.$ac_ext <<_ACEOF | |
12607 | /* confdefs.h. */ | |
12608 | _ACEOF | |
12609 | cat confdefs.h >>conftest.$ac_ext | |
12610 | cat >>conftest.$ac_ext <<_ACEOF | |
12611 | /* end confdefs.h. */ | |
12612 | ||
12613 | /* Override any gcc2 internal prototype to avoid an error. */ | |
12614 | #ifdef __cplusplus | |
12615 | extern "C" | |
12616 | #endif | |
12617 | /* We use char because int might match the return type of a gcc2 | |
12618 | builtin and then its argument prototype would still apply. */ | |
12619 | char _Unwind_GetIPInfo (); | |
12620 | int | |
12621 | main () | |
12622 | { | |
12623 | _Unwind_GetIPInfo (); | |
12624 | ; | |
12625 | return 0; | |
12626 | } | |
12627 | _ACEOF | |
12628 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12629 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12630 | (eval $ac_link) 2>conftest.er1 | |
12631 | ac_status=$? | |
12632 | grep -v '^ *+' conftest.er1 >conftest.err | |
12633 | rm -f conftest.er1 | |
12634 | cat conftest.err >&5 | |
12635 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12636 | (exit $ac_status); } && | |
12637 | { ac_try='test -z "$ac_c_werror_flag" | |
12638 | || test ! -s conftest.err' | |
12639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12640 | (eval $ac_try) 2>&5 | |
12641 | ac_status=$? | |
12642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12643 | (exit $ac_status); }; } && | |
12644 | { ac_try='test -s conftest$ac_exeext' | |
12645 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12646 | (eval $ac_try) 2>&5 | |
12647 | ac_status=$? | |
12648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12649 | (exit $ac_status); }; }; then | |
12650 | ac_cv_search__Unwind_GetIPInfo="-l$ac_lib" | |
12651 | break | |
12652 | else | |
12653 | echo "$as_me: failed program was:" >&5 | |
12654 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12655 | ||
12656 | fi | |
12657 | rm -f conftest.err conftest.$ac_objext \ | |
12658 | conftest$ac_exeext conftest.$ac_ext | |
12659 | done | |
12660 | fi | |
12661 | LIBS=$ac_func_search_save_LIBS | |
12662 | fi | |
12663 | echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5 | |
12664 | echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6 | |
12665 | if test "$ac_cv_search__Unwind_GetIPInfo" != no; then | |
12666 | test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS" | |
12667 | ||
12668 | else | |
12669 | use_getipinfo=no | |
12670 | fi | |
12671 | ||
12672 | fi | |
12673 | fi | |
12674 | ||
12675 | if test x$use_getipinfo = xyes; then | |
12676 | ||
12677 | cat >>confdefs.h <<\_ACEOF | |
12678 | #define HAVE_GETIPINFO 1 | |
12679 | _ACEOF | |
12680 | ||
12681 | else | |
12682 | echo "The system unwind library does not support _Unwind_GetIPInfo." | |
12683 | fi | |
12684 | ||
a5381466 | 12685 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12686 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12687 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12688 | |
12689 | ||
12690 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12691 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12692 | _ACEOF |
a5381466 ZW |
12693 | |
12694 | fi | |
12695 | ||
75685792 RS |
12696 | # Convert extra_options into a form suitable for Makefile use. |
12697 | extra_opt_files= | |
12698 | for f in $extra_options; do | |
12699 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12700 | done | |
12701 | ||
12702 | ||
b7cb92ad | 12703 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12704 | # the first file included by config.h. |
4977bab6 | 12705 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12706 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12707 | # work to find out the build config parameters. |
75bffa71 | 12708 | if test x$host = x$build |
db81d74a | 12709 | then |
eaf4e618 | 12710 | build_auto=auto-host.h |
b7cb92ad JL |
12711 | else |
12712 | # We create a subdir, then run autoconf in the subdir. | |
12713 | # To prevent recursion we set host and build for the new | |
12714 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12715 | # of configure. |
b7cb92ad JL |
12716 | tempdir=build.$$ |
12717 | rm -rf $tempdir | |
12718 | mkdir $tempdir | |
12719 | cd $tempdir | |
12720 | case ${srcdir} in | |
255b8a49 | 12721 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12722 | *) realsrcdir=../${srcdir};; |
12723 | esac | |
d920e825 L |
12724 | saved_CFLAGS="${CFLAGS}" |
12725 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12726 | ${realsrcdir}/configure \ | |
33e70558 | 12727 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12728 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12729 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12730 | |
12731 | # We just finished tests for the build machine, so rename | |
12732 | # the file auto-build.h in the gcc directory. | |
12733 | mv auto-host.h ../auto-build.h | |
12734 | cd .. | |
12735 | rm -rf $tempdir | |
eaf4e618 | 12736 | build_auto=auto-build.h |
db81d74a RH |
12737 | fi |
12738 | ||
06f0b04c | 12739 | |
eaf4e618 | 12740 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12741 | tm_p_file="${tm_p_file} tm-preds.h" |
12742 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12743 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12744 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12745 | # put this back in temporarily. |
232b67d9 | 12746 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12747 | |
34a86c2b NN |
12748 | # -------- |
12749 | # UNSORTED | |
12750 | # -------- | |
12751 | ||
cc1e60ea | 12752 | # Compile in configure arguments. |
8105825d | 12753 | if test -f configargs.h ; then |
cc1e60ea | 12754 | # Being re-configured. |
022dae81 | 12755 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12756 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12757 | else | |
12758 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12759 | fi | |
eeae7b41 DJ |
12760 | |
12761 | # Double all backslashes and backslash all quotes to turn | |
12762 | # gcc_config_arguments into a C string. | |
12763 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12764 | $gcc_config_arguments | |
12765 | EOF | |
12766 | gcc_config_arguments_str=`cat conftest.out` | |
12767 | rm -f conftest.out | |
12768 | ||
cc1e60ea JM |
12769 | cat > configargs.h <<EOF |
12770 | /* Generated automatically. */ | |
eeae7b41 | 12771 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12772 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12773 | |
12774 | static const struct { | |
12775 | const char *name, *value; | |
12776 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12777 | EOF |
12778 | ||
ab87f8c8 | 12779 | # Internationalization |
18fc9bd4 RG |
12780 | # If we haven't got the data from the intl directory, |
12781 | # assume NLS is disabled. | |
12782 | USE_NLS=no | |
12783 | LIBINTL= | |
12784 | LIBINTL_DEP= | |
12785 | INCINTL= | |
12786 | XGETTEXT= | |
12787 | GMSGFMT= | |
12788 | POSUB= | |
12789 | ||
12790 | if test -f ../intl/config.intl; then | |
12791 | . ../intl/config.intl | |
12792 | fi | |
12793 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 | |
12794 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
12795 | if test x"$USE_NLS" != xyes; then | |
12796 | echo "$as_me:$LINENO: result: no" >&5 | |
12797 | echo "${ECHO_T}no" >&6 | |
12798 | else | |
12799 | echo "$as_me:$LINENO: result: yes" >&5 | |
12800 | echo "${ECHO_T}yes" >&6 | |
12801 | ||
12802 | cat >>confdefs.h <<\_ACEOF | |
12803 | #define ENABLE_NLS 1 | |
12804 | _ACEOF | |
12805 | ||
12806 | ||
12807 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 | |
12808 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
12809 | # Look for .po and .gmo files in the source directory. | |
12810 | CATALOGS= | |
12811 | XLINGUAS= | |
12812 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12813 | # If there aren't any .gmo files the shell will give us the | |
12814 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12815 | # weeded out. | |
12816 | case "$cat" in *\**) | |
12817 | continue;; | |
12818 | esac | |
12819 | # The quadruple backslash is collapsed to a double backslash | |
12820 | # by the backticks, then collapsed again by the double quotes, | |
12821 | # leaving us with one backslash in the sed expression (right | |
12822 | # before the dot that mustn't act as a wildcard). | |
12823 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
12824 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
12825 | # The user is allowed to set LINGUAS to a list of languages to | |
12826 | # install catalogs for. If it's empty that means "all of them." | |
12827 | if test "x$LINGUAS" = x; then | |
12828 | CATALOGS="$CATALOGS $cat" | |
12829 | XLINGUAS="$XLINGUAS $lang" | |
12830 | else | |
12831 | case "$LINGUAS" in *$lang*) | |
12832 | CATALOGS="$CATALOGS $cat" | |
12833 | XLINGUAS="$XLINGUAS $lang" | |
12834 | ;; | |
12835 | esac | |
12836 | fi | |
12837 | done | |
12838 | LINGUAS="$XLINGUAS" | |
12839 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 | |
12840 | echo "${ECHO_T}$LINGUAS" >&6 | |
12841 | ||
12842 | ||
12843 | DATADIRNAME=share | |
12844 | ||
12845 | INSTOBJEXT=.mo | |
12846 | ||
12847 | GENCAT=gencat | |
12848 | ||
12849 | CATOBJEXT=.gmo | |
12850 | ||
12851 | fi | |
861bb6c1 | 12852 | |
56694dd9 ZW |
12853 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12854 | # -liconv on the link line twice. | |
12855 | case "$LIBINTL" in *$LIBICONV*) | |
12856 | LIBICONV= ;; | |
12857 | esac | |
dc6746e7 | 12858 | |
7f970b70 AM |
12859 | # Check whether --enable-secureplt or --disable-secureplt was given. |
12860 | if test "${enable_secureplt+set}" = set; then | |
12861 | enableval="$enable_secureplt" | |
12862 | ||
12863 | fi; | |
12864 | ||
56694dd9 ZW |
12865 | # Windows32 Registry support for specifying GCC installation paths. |
12866 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
12867 | if test "${enable_win32_registry+set}" = set; then | |
12868 | enableval="$enable_win32_registry" | |
dc6746e7 | 12869 | |
ba479fd2 | 12870 | fi; |
ba479fd2 | 12871 | |
a1286ef5 ZW |
12872 | case $host_os in |
12873 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12874 | if test "x$enable_win32_registry" != xno; then | |
12875 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 | |
ba479fd2 NN |
12876 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 |
12877 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then | |
12878 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12879 | else | |
12880 | ac_func_search_save_LIBS=$LIBS | |
12881 | ac_cv_search_RegOpenKeyExA=no | |
12882 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12883 | /* confdefs.h. */ |
12884 | _ACEOF | |
12885 | cat confdefs.h >>conftest.$ac_ext | |
12886 | cat >>conftest.$ac_ext <<_ACEOF | |
12887 | /* end confdefs.h. */ | |
861bb6c1 | 12888 | |
ab87f8c8 | 12889 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12890 | #ifdef __cplusplus |
12891 | extern "C" | |
12892 | #endif | |
ab87f8c8 | 12893 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12894 | builtin and then its argument prototype would still apply. */ |
12895 | char RegOpenKeyExA (); | |
12896 | int | |
12897 | main () | |
12898 | { | |
12899 | RegOpenKeyExA (); | |
12900 | ; | |
12901 | return 0; | |
12902 | } | |
12903 | _ACEOF | |
12904 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12905 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12906 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12907 | ac_status=$? |
86da66b5 HPN |
12908 | grep -v '^ *+' conftest.er1 >conftest.err |
12909 | rm -f conftest.er1 | |
12910 | cat conftest.err >&5 | |
ba479fd2 NN |
12911 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12912 | (exit $ac_status); } && | |
ec6c7392 PB |
12913 | { ac_try='test -z "$ac_c_werror_flag" |
12914 | || test ! -s conftest.err' | |
86da66b5 HPN |
12915 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12916 | (eval $ac_try) 2>&5 | |
12917 | ac_status=$? | |
12918 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12919 | (exit $ac_status); }; } && | |
12920 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12921 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12922 | (eval $ac_try) 2>&5 | |
12923 | ac_status=$? | |
12924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12925 | (exit $ac_status); }; }; then | |
56694dd9 | 12926 | ac_cv_search_RegOpenKeyExA="none required" |
ab87f8c8 | 12927 | else |
ba479fd2 NN |
12928 | echo "$as_me: failed program was:" >&5 |
12929 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12930 | ||
861bb6c1 | 12931 | fi |
86da66b5 HPN |
12932 | rm -f conftest.err conftest.$ac_objext \ |
12933 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 NN |
12934 | if test "$ac_cv_search_RegOpenKeyExA" = no; then |
12935 | for ac_lib in advapi32; do | |
12936 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12937 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12938 | /* confdefs.h. */ |
12939 | _ACEOF | |
12940 | cat confdefs.h >>conftest.$ac_ext | |
12941 | cat >>conftest.$ac_ext <<_ACEOF | |
12942 | /* end confdefs.h. */ | |
12943 | ||
56694dd9 | 12944 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12945 | #ifdef __cplusplus |
12946 | extern "C" | |
12947 | #endif | |
56694dd9 | 12948 | /* We use char because int might match the return type of a gcc2 |
ba479fd2 NN |
12949 | builtin and then its argument prototype would still apply. */ |
12950 | char RegOpenKeyExA (); | |
12951 | int | |
12952 | main () | |
12953 | { | |
12954 | RegOpenKeyExA (); | |
12955 | ; | |
12956 | return 0; | |
12957 | } | |
12958 | _ACEOF | |
12959 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12960 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
86da66b5 | 12961 | (eval $ac_link) 2>conftest.er1 |
ba479fd2 | 12962 | ac_status=$? |
86da66b5 HPN |
12963 | grep -v '^ *+' conftest.er1 >conftest.err |
12964 | rm -f conftest.er1 | |
12965 | cat conftest.err >&5 | |
ba479fd2 NN |
12966 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12967 | (exit $ac_status); } && | |
ec6c7392 PB |
12968 | { ac_try='test -z "$ac_c_werror_flag" |
12969 | || test ! -s conftest.err' | |
86da66b5 HPN |
12970 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12971 | (eval $ac_try) 2>&5 | |
12972 | ac_status=$? | |
12973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12974 | (exit $ac_status); }; } && | |
12975 | { ac_try='test -s conftest$ac_exeext' | |
ba479fd2 NN |
12976 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12977 | (eval $ac_try) 2>&5 | |
12978 | ac_status=$? | |
12979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12980 | (exit $ac_status); }; }; then | |
12981 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
56694dd9 | 12982 | break |
861bb6c1 | 12983 | else |
ba479fd2 NN |
12984 | echo "$as_me: failed program was:" >&5 |
12985 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12986 | ||
861bb6c1 | 12987 | fi |
86da66b5 HPN |
12988 | rm -f conftest.err conftest.$ac_objext \ |
12989 | conftest$ac_exeext conftest.$ac_ext | |
ba479fd2 | 12990 | done |
6e3f3080 | 12991 | fi |
ba479fd2 NN |
12992 | LIBS=$ac_func_search_save_LIBS |
12993 | fi | |
12994 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 | |
12995 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
12996 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
63cf211a | 12997 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" |
ba479fd2 | 12998 | |
cafe096b | 12999 | else |
a1286ef5 | 13000 | enable_win32_registry=no |
093e61a6 | 13001 | fi |
ab87f8c8 | 13002 | |
a1286ef5 ZW |
13003 | fi |
13004 | ||
13005 | if test "x$enable_win32_registry" != xno; then | |
13006 | ||
13007 | cat >>confdefs.h <<\_ACEOF | |
13008 | #define ENABLE_WIN32_REGISTRY 1 | |
13009 | _ACEOF | |
ab87f8c8 | 13010 | |
a1286ef5 ZW |
13011 | |
13012 | if test "x$enable_win32_registry" != xyes \ | |
13013 | && test "x$enable_win32_registry" != x; then | |
ba479fd2 NN |
13014 | |
13015 | cat >>confdefs.h <<_ACEOF | |
a1286ef5 | 13016 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" |
ba479fd2 | 13017 | _ACEOF |
cafe096b | 13018 | |
a1286ef5 ZW |
13019 | fi |
13020 | fi | |
13021 | ;; | |
56694dd9 | 13022 | esac |
ab87f8c8 | 13023 | |
56694dd9 ZW |
13024 | # Get an absolute path to the GCC top-level source directory |
13025 | holddir=`${PWDCMD-pwd}` | |
13026 | cd $srcdir | |
13027 | topdir=`${PWDCMD-pwd}` | |
13028 | cd $holddir | |
ab87f8c8 | 13029 | |
56694dd9 | 13030 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 13031 | xmake_file= |
c406e779 | 13032 | for f in ${host_xmake_file} |
56694dd9 ZW |
13033 | do |
13034 | if test -f ${srcdir}/config/$f | |
13035 | then | |
2ed26f6b | 13036 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
13037 | fi |
13038 | done | |
093e61a6 | 13039 | |
56694dd9 | 13040 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 13041 | tmake_file_= |
c406e779 | 13042 | for f in ${tmake_file} |
56694dd9 ZW |
13043 | do |
13044 | if test -f ${srcdir}/config/$f | |
13045 | then | |
2ed26f6b | 13046 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
13047 | fi |
13048 | done | |
2ed26f6b | 13049 | tmake_file="${tmake_file_}" |
71a94577 | 13050 | |
ab87f8c8 JL |
13051 | # If the host doesn't support symlinks, modify CC in |
13052 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
13053 | # Otherwise, we can use "CC=$(CC)". | |
13054 | rm -f symtest.tem | |
35f06ae4 PB |
13055 | case "$LN_S" in |
13056 | *-s*) | |
13057 | cc_set_by_configure="\$(CC)" | |
13058 | quoted_cc_set_by_configure="\$(CC)" | |
13059 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
13060 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" | |
13061 | ;; | |
13062 | *) | |
13063 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
13064 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" | |
13065 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" | |
13066 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" | |
13067 | ;; | |
13068 | esac | |
ab87f8c8 | 13069 | |
5395b47b NN |
13070 | # This is a terrible hack which will go away some day. |
13071 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
13072 | |
13073 | ||
ab87f8c8 JL |
13074 | out_object_file=`basename $out_file .c`.o |
13075 | ||
75685792 RS |
13076 | tm_file_list="options.h" |
13077 | tm_include_list="options.h" | |
ab87f8c8 | 13078 | for f in $tm_file; do |
64ccbc99 | 13079 | case $f in |
d02af173 | 13080 | defaults.h ) |
e22340b0 ZW |
13081 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
13082 | tm_include_list="${tm_include_list} $f" | |
13083 | ;; | |
13084 | * ) | |
13085 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
13086 | tm_include_list="${tm_include_list} config/$f" | |
13087 | ;; | |
64ccbc99 | 13088 | esac |
ab87f8c8 JL |
13089 | done |
13090 | ||
11642c3a | 13091 | tm_p_file_list= |
e22340b0 | 13092 | tm_p_include_list= |
11642c3a | 13093 | for f in $tm_p_file; do |
4977bab6 ZW |
13094 | case $f in |
13095 | tm-preds.h ) | |
e22340b0 ZW |
13096 | tm_p_file_list="${tm_p_file_list} $f" |
13097 | tm_p_include_list="${tm_p_include_list} $f" | |
13098 | ;; | |
13099 | * ) | |
13100 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
13101 | tm_p_include_list="${tm_p_include_list} config/$f" | |
13102 | esac | |
13103 | done | |
13104 | ||
13105 | xm_file_list= | |
13106 | xm_include_list= | |
13107 | for f in $xm_file; do | |
13108 | case $f in | |
13109 | ansidecl.h ) | |
13110 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
13111 | xm_include_list="${xm_include_list} $f" | |
13112 | ;; | |
13113 | auto-host.h ) | |
13114 | xm_file_list="${xm_file_list} $f" | |
13115 | xm_include_list="${xm_include_list} $f" | |
13116 | ;; | |
13117 | * ) | |
13118 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
13119 | xm_include_list="${xm_include_list} config/$f" | |
13120 | ;; | |
4977bab6 | 13121 | esac |
11642c3a ZW |
13122 | done |
13123 | ||
ab87f8c8 | 13124 | host_xm_file_list= |
e22340b0 | 13125 | host_xm_include_list= |
ab87f8c8 | 13126 | for f in $host_xm_file; do |
64ccbc99 | 13127 | case $f in |
d02af173 | 13128 | ansidecl.h ) |
e22340b0 ZW |
13129 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
13130 | host_xm_include_list="${host_xm_include_list} $f" | |
13131 | ;; | |
e2500fed | 13132 | auto-host.h ) |
e22340b0 ZW |
13133 | host_xm_file_list="${host_xm_file_list} $f" |
13134 | host_xm_include_list="${host_xm_include_list} $f" | |
13135 | ;; | |
13136 | * ) | |
13137 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
13138 | host_xm_include_list="${host_xm_include_list} config/$f" | |
13139 | ;; | |
64ccbc99 | 13140 | esac |
ab87f8c8 JL |
13141 | done |
13142 | ||
13143 | build_xm_file_list= | |
13144 | for f in $build_xm_file; do | |
64ccbc99 | 13145 | case $f in |
d02af173 | 13146 | ansidecl.h ) |
e22340b0 ZW |
13147 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
13148 | build_xm_include_list="${build_xm_include_list} $f" | |
13149 | ;; | |
e2500fed | 13150 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
13151 | build_xm_file_list="${build_xm_file_list} $f" |
13152 | build_xm_include_list="${build_xm_include_list} $f" | |
13153 | ;; | |
13154 | * ) | |
13155 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
13156 | build_xm_include_list="${build_xm_include_list} config/$f" | |
13157 | ;; | |
64ccbc99 | 13158 | esac |
ab87f8c8 JL |
13159 | done |
13160 | ||
a078a589 ZW |
13161 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
13162 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
ba479fd2 NN |
13163 | CROSS= |
13164 | ALL=all.internal | |
13165 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
13166 | |
13167 | if test "x$with_build_sysroot" != x; then | |
13168 | build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)' | |
13169 | else | |
13170 | # This value is used, even on a native system, because | |
13171 | # CROSS_SYSTEM_HEADER_DIR is just | |
13172 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13173 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13174 | fi | |
13175 | ||
ab87f8c8 JL |
13176 | if test x$host != x$target |
13177 | then | |
a078a589 ZW |
13178 | CROSS="-DCROSS_COMPILE" |
13179 | ALL=all.cross | |
160633c6 | 13180 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13181 | case "$host","$target" in |
3a7e8b87 GK |
13182 | # Darwin crosses can use the host system's libraries and headers, |
13183 | # because of the fat library support. Of course, it must be the | |
13184 | # same version of Darwin on both sides. Allow the user to | |
13185 | # just say --target=foo-darwin without a version number to mean | |
13186 | # "the version on this system". | |
13187 | *-*-darwin*,*-*-darwin*) | |
13188 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13189 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13190 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13191 | CROSS= | |
13192 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13193 | with_headers=yes | |
13194 | fi | |
13195 | ;; | |
13196 | ||
343f59d9 AM |
13197 | i?86-*-*,x86_64-*-* \ |
13198 | | powerpc*-*-*,powerpc64*-*-*) | |
13199 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13200 | esac | |
7a615b25 | 13201 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13202 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13203 | fi |
13204 | ||
b39d221a EC |
13205 | # If this is a cross-compiler that does not |
13206 | # have its own set of headers then define | |
13207 | # inhibit_libc | |
13208 | ||
dc06db20 R |
13209 | # If this is using newlib, without having the headers available now, |
13210 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13211 | # This prevents libgcc2 from containing any code which requires libc |
13212 | # support. | |
160633c6 | 13213 | inhibit_libc=false |
dc06db20 R |
13214 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13215 | test x$with_newlib = xyes ; } && | |
e50084fa | 13216 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13217 | inhibit_libc=true |
b39d221a EC |
13218 | fi |
13219 | ||
13220 | ||
a078a589 ZW |
13221 | # When building gcc with a cross-compiler, we need to adjust things so |
13222 | # that the generator programs are still built with the native compiler. | |
13223 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13224 | |
13225 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13226 | CC_FOR_BUILD='$(CC)' |
13227 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13228 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13229 | |
13230 | # Possibly disable fixproto, on a per-target basis. | |
13231 | case ${use_fixproto} in | |
13232 | no) | |
13233 | STMP_FIXPROTO= | |
13234 | ;; | |
13235 | yes) | |
13236 | STMP_FIXPROTO=stmp-fixproto | |
13237 | ;; | |
13238 | esac | |
13239 | ||
a078a589 | 13240 | |
83599948 NS |
13241 | # And these apply if build != host, or we are generating coverage data |
13242 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13243 | then |
b11e4747 | 13244 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13245 | |
7a615b25 | 13246 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13247 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13248 | STMP_FIXPROTO=stmp-install-fixproto |
13249 | fi | |
7a615b25 | 13250 | fi |
ab87f8c8 JL |
13251 | fi |
13252 | ||
13253 | # Expand extra_headers to include complete path. | |
13254 | # This substitutes for lots of t-* files. | |
13255 | extra_headers_list= | |
b1ef58c8 NN |
13256 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13257 | for file in ${extra_headers} ; do | |
13258 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13259 | done | |
ab87f8c8 | 13260 | |
c38f02df ILT |
13261 | # Define collect2 in Makefile. |
13262 | case $host_can_use_collect2 in | |
13263 | no) collect2= ;; | |
13264 | *) collect2='collect2$(exeext)' ;; | |
13265 | esac | |
13266 | ||
13267 | ||
ab87f8c8 | 13268 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13269 | case $use_collect2 in |
13270 | no) use_collect2= ;; | |
13271 | "") ;; | |
ba479fd2 | 13272 | *) |
34a86c2b NN |
13273 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13274 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13275 | case $host_can_use_collect2 in |
13276 | no) | |
13277 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13278 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13279 | { (exit 1); exit 1; }; } | |
13280 | ;; | |
13281 | esac | |
34a86c2b NN |
13282 | ;; |
13283 | esac | |
ab87f8c8 | 13284 | |
8bb915b6 NN |
13285 | # --------------------------- |
13286 | # Assembler & linker features | |
13287 | # --------------------------- | |
13288 | ||
d869a8c4 NN |
13289 | # Identify the assembler which will work hand-in-glove with the newly |
13290 | # built GCC, so that we can examine its features. This is the assembler | |
13291 | # which will be driven by the driver program. | |
13292 | # | |
13293 | # If build != host, and we aren't building gas in-tree, we identify a | |
13294 | # build->target assembler and hope that it will have the same features | |
13295 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13296 | gcc_cv_gas_major_version= |
13297 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13298 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13299 | |
13300 | if test "${gcc_cv_as+set}" = set; then | |
13301 | : | |
13302 | else | |
13303 | ||
ab87f8c8 JL |
13304 | if test -x "$DEFAULT_ASSEMBLER"; then |
13305 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13306 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13307 | && test -f ../gas/Makefile \ |
13308 | && test x$build = x$host; then | |
e8b05380 PB |
13309 | gcc_cv_as=../gas/as-new$build_exeext |
13310 | elif test -x as$build_exeext; then | |
13311 | # Build using assembler in the current directory. | |
13312 | gcc_cv_as=./as$build_exeext | |
13313 | elif test -x $AS_FOR_TARGET; then | |
13314 | gcc_cv_as="$AS_FOR_TARGET" | |
13315 | else | |
13316 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13317 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
13318 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
13319 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
13320 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then | |
13321 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13322 | else | |
13323 | case $gcc_cv_as in | |
13324 | [\\/]* | ?:[\\/]*) | |
13325 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13326 | ;; | |
13327 | *) | |
13328 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13329 | for as_dir in $PATH | |
13330 | do | |
13331 | IFS=$as_save_IFS | |
13332 | test -z "$as_dir" && as_dir=. | |
13333 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13334 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
13335 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" | |
13336 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13337 | break 2 | |
13338 | fi | |
13339 | done | |
13340 | done | |
13341 | ||
13342 | ;; | |
13343 | esac | |
13344 | fi | |
13345 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
13346 | ||
13347 | if test -n "$gcc_cv_as"; then | |
13348 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13349 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13350 | else | |
13351 | echo "$as_me:$LINENO: result: no" >&5 | |
13352 | echo "${ECHO_T}no" >&6 | |
13353 | fi | |
13354 | ||
13355 | fi | |
13356 | fi | |
13357 | ||
13358 | ||
13359 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13360 | ||
13361 | ||
13362 | echo "$as_me:$LINENO: checking what assembler to use" >&5 | |
13363 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
13364 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then | |
08d105fa AO |
13365 | # Single tree build which includes gas. We want to prefer it |
13366 | # over whatever linker top-level may have detected, since | |
13367 | # we'll use what we're building after installation anyway. | |
e8b05380 PB |
13368 | echo "$as_me:$LINENO: result: newly built gas" >&5 |
13369 | echo "${ECHO_T}newly built gas" >&6 | |
ad9c4d9f NN |
13370 | in_tree_gas=yes |
13371 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13372 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13373 | $gcc_cv_as_gas_srcdir/configure \ | |
13374 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13375 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13376 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13377 | if test x$gcc_cv_gas_version != x; then |
13378 | break | |
13379 | fi | |
13380 | done | |
13381 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13382 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13383 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13384 | case $gcc_cv_gas_patch_version in |
13385 | "") gcc_cv_gas_patch_version="0" ;; | |
13386 | esac | |
8ada417f ZW |
13387 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13388 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13389 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13390 | |
5408ac6c HPN |
13391 | in_tree_gas_is_elf=no |
13392 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13393 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13394 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13395 | then | |
13396 | in_tree_gas_is_elf=yes | |
13397 | fi | |
e8b05380 PB |
13398 | else |
13399 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 | |
13400 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
13401 | in_tree_gas=no | |
981d4858 | 13402 | fi |
9e423e6d | 13403 | |
e8b05380 PB |
13404 | # Identify the linker which will work hand-in-glove with the newly |
13405 | # built GCC, so that we can examine its features. This is the linker | |
13406 | # which will be driven by the driver program. | |
9f18db39 | 13407 | # |
e8b05380 PB |
13408 | # If build != host, and we aren't building gas in-tree, we identify a |
13409 | # build->target linker and hope that it will have the same features | |
13410 | # as the host->target linker we'll be using. | |
13411 | gcc_cv_gld_major_version= | |
13412 | gcc_cv_gld_minor_version= | |
13413 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13414 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13415 | |
e8b05380 PB |
13416 | if test "${gcc_cv_ld+set}" = set; then |
13417 | : | |
9f18db39 | 13418 | else |
9f18db39 | 13419 | |
e8b05380 PB |
13420 | if test -x "$DEFAULT_LINKER"; then |
13421 | gcc_cv_ld="$DEFAULT_LINKER" | |
13422 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13423 | && test -f ../ld/Makefile \ | |
13424 | && test x$build = x$host; then | |
13425 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13426 | elif test -x collect-ld$build_exeext; then | |
13427 | # Build using linker in the current directory. | |
13428 | gcc_cv_ld=./collect-ld$build_exeext | |
13429 | elif test -x $LD_FOR_TARGET; then | |
13430 | gcc_cv_ld="$LD_FOR_TARGET" | |
13431 | else | |
13432 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13433 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13434 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13435 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13436 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13437 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13438 | else | |
e8b05380 | 13439 | case $gcc_cv_ld in |
d739199a | 13440 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13441 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13442 | ;; |
13443 | *) | |
13444 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13445 | for as_dir in $PATH | |
13446 | do | |
13447 | IFS=$as_save_IFS | |
13448 | test -z "$as_dir" && as_dir=. | |
13449 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13450 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13451 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13452 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13453 | break 2 | |
13454 | fi | |
13455 | done | |
13456 | done | |
13457 | ||
13458 | ;; | |
13459 | esac | |
13460 | fi | |
e8b05380 | 13461 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
d739199a | 13462 | |
e8b05380 PB |
13463 | if test -n "$gcc_cv_ld"; then |
13464 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13465 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
d739199a DJ |
13466 | else |
13467 | echo "$as_me:$LINENO: result: no" >&5 | |
13468 | echo "${ECHO_T}no" >&6 | |
13469 | fi | |
13470 | ||
13471 | fi | |
e8b05380 PB |
13472 | fi |
13473 | ||
13474 | ||
13475 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13476 | ||
13477 | ||
13478 | echo "$as_me:$LINENO: checking what linker to use" >&5 | |
13479 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
13480 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then | |
13481 | # Single tree build which includes ld. We want to prefer it | |
13482 | # over whatever linker top-level may have detected, since | |
13483 | # we'll use what we're building after installation anyway. | |
13484 | echo "$as_me:$LINENO: result: newly built ld" >&5 | |
13485 | echo "${ECHO_T}newly built ld" >&6 | |
13486 | in_tree_ld=yes | |
13487 | in_tree_ld_is_elf=no | |
13488 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13489 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13490 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13491 | in_tree_ld_is_elf=yes | |
13492 | fi | |
13493 | 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 | |
13494 | do | |
13495 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13496 | if test x$gcc_cv_gld_version != x; then | |
13497 | break | |
13498 | fi | |
13499 | done | |
13500 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13501 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13502 | else | |
13503 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 | |
13504 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
13505 | in_tree_ld=no | |
13506 | fi | |
13507 | ||
13508 | # Figure out what nm we will be using. | |
13509 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13510 | if test "${gcc_cv_nm+set}" = set; then | |
13511 | : | |
13512 | else | |
13513 | ||
13514 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13515 | && test -f ../binutils/Makefile \ |
13516 | && test x$build = x$host; then | |
e8b05380 PB |
13517 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13518 | elif test -x nm$build_exeext; then | |
13519 | gcc_cv_nm=./nm$build_exeext | |
13520 | elif test -x $NM_FOR_TARGET; then | |
13521 | gcc_cv_nm="$NM_FOR_TARGET" | |
13522 | else | |
13523 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13524 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
d739199a DJ |
13525 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13526 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13527 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13528 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13529 | else | |
e8b05380 | 13530 | case $gcc_cv_nm in |
d739199a | 13531 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13532 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13533 | ;; |
13534 | *) | |
13535 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13536 | for as_dir in $PATH | |
13537 | do | |
13538 | IFS=$as_save_IFS | |
13539 | test -z "$as_dir" && as_dir=. | |
13540 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13541 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13542 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13543 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13544 | break 2 | |
13545 | fi | |
13546 | done | |
13547 | done | |
13548 | ||
13549 | ;; | |
13550 | esac | |
13551 | fi | |
e8b05380 | 13552 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
d739199a | 13553 | |
e8b05380 PB |
13554 | if test -n "$gcc_cv_nm"; then |
13555 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13556 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
d739199a DJ |
13557 | else |
13558 | echo "$as_me:$LINENO: result: no" >&5 | |
13559 | echo "${ECHO_T}no" >&6 | |
13560 | fi | |
13561 | ||
13562 | fi | |
e8b05380 | 13563 | fi |
d739199a | 13564 | |
e8b05380 PB |
13565 | |
13566 | echo "$as_me:$LINENO: checking what nm to use" >&5 | |
13567 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
13568 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then | |
13569 | # Single tree build which includes binutils. | |
13570 | echo "$as_me:$LINENO: result: newly built nm" >&5 | |
13571 | echo "${ECHO_T}newly built nm" >&6 | |
13572 | in_tree_nm=yes | |
13573 | else | |
13574 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 | |
13575 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
13576 | in_tree_nm=no | |
13577 | fi | |
13578 | ||
13579 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
13580 | ||
13581 | ||
13582 | # Figure out what objdump we will be using. | |
13583 | if test "${gcc_cv_objdump+set}" = set; then | |
13584 | : | |
13585 | else | |
13586 | ||
13587 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13588 | && test -f ../binutils/Makefile \ |
13589 | && test x$build = x$host; then | |
e8b05380 PB |
13590 | # Single tree build which includes binutils. |
13591 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
13592 | elif test -x objdump$build_exeext; then | |
13593 | gcc_cv_objdump=./objdump$build_exeext | |
13594 | elif test -x $OBJDUMP_FOR_TARGET; then | |
13595 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
13596 | else | |
13597 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13598 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
9f18db39 PB |
13599 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13600 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13601 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
13602 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13603 | else | |
e8b05380 | 13604 | case $gcc_cv_objdump in |
9f18db39 | 13605 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13606 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
13607 | ;; |
13608 | *) | |
13609 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 13610 | for as_dir in $PATH |
9f18db39 PB |
13611 | do |
13612 | IFS=$as_save_IFS | |
13613 | test -z "$as_dir" && as_dir=. | |
13614 | for ac_exec_ext in '' $ac_executable_extensions; do | |
13615 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
e8b05380 | 13616 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
13617 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13618 | break 2 | |
13619 | fi | |
13620 | done | |
13621 | done | |
779243f7 | 13622 | |
9f18db39 PB |
13623 | ;; |
13624 | esac | |
13625 | fi | |
e8b05380 | 13626 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
9f18db39 | 13627 | |
e8b05380 PB |
13628 | if test -n "$gcc_cv_objdump"; then |
13629 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13630 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
9f18db39 PB |
13631 | else |
13632 | echo "$as_me:$LINENO: result: no" >&5 | |
13633 | echo "${ECHO_T}no" >&6 | |
13634 | fi | |
13635 | ||
e8b05380 PB |
13636 | fi |
13637 | fi | |
9f18db39 | 13638 | |
e8b05380 PB |
13639 | |
13640 | echo "$as_me:$LINENO: checking what objdump to use" >&5 | |
13641 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
13642 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then | |
13643 | # Single tree build which includes binutils. | |
13644 | echo "$as_me:$LINENO: result: newly built objdump" >&5 | |
13645 | echo "${ECHO_T}newly built objdump" >&6 | |
13646 | elif test x$gcc_cv_objdump = x; then | |
13647 | echo "$as_me:$LINENO: result: not found" >&5 | |
13648 | echo "${ECHO_T}not found" >&6 | |
13649 | else | |
13650 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 | |
13651 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
a2eafc76 | 13652 | fi |
3cae5780 | 13653 | |
981d4858 | 13654 | # Figure out what assembler alignment features are present. |
ba479fd2 NN |
13655 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13656 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
13657 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then | |
13658 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13659 | else |
13660 | gcc_cv_as_balign_and_p2align=no | |
13661 | if test $in_tree_gas = yes; then | |
13662 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13663 | then gcc_cv_as_balign_and_p2align=yes | |
13664 | fi | |
13665 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13666 | echo '.balign 4 |
8ada417f | 13667 | .p2align 2' > conftest.s |
ba479fd2 NN |
13668 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13670 | (eval $ac_try) 2>&5 | |
13671 | ac_status=$? | |
13672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13673 | (exit $ac_status); }; } | |
8ada417f ZW |
13674 | then |
13675 | gcc_cv_as_balign_and_p2align=yes | |
13676 | else | |
13677 | echo "configure: failed program was" >&5 | |
13678 | cat conftest.s >&5 | |
13679 | fi | |
13680 | rm -f conftest.o conftest.s | |
13681 | fi | |
13682 | fi | |
ba479fd2 NN |
13683 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13684 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13685 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13686 | |
13687 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13688 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13689 | _ACEOF |
981d4858 | 13690 | |
ad9c4d9f NN |
13691 | fi |
13692 | ||
ba479fd2 NN |
13693 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13694 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
13695 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then | |
13696 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13697 | else |
13698 | gcc_cv_as_max_skip_p2align=no | |
13699 | if test $in_tree_gas = yes; then | |
13700 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13701 | then gcc_cv_as_max_skip_p2align=yes | |
13702 | fi | |
13703 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13704 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13705 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13706 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13707 | (eval $ac_try) 2>&5 | |
13708 | ac_status=$? | |
13709 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13710 | (exit $ac_status); }; } | |
8ada417f ZW |
13711 | then |
13712 | gcc_cv_as_max_skip_p2align=yes | |
13713 | else | |
13714 | echo "configure: failed program was" >&5 | |
13715 | cat conftest.s >&5 | |
13716 | fi | |
13717 | rm -f conftest.o conftest.s | |
13718 | fi | |
ad9c4d9f | 13719 | fi |
ba479fd2 NN |
13720 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13721 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13722 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13723 | |
13724 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13725 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13726 | _ACEOF |
9e423e6d | 13727 | |
9e423e6d | 13728 | fi |
ad9c4d9f | 13729 | |
ba479fd2 NN |
13730 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13731 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
13732 | if test "${gcc_cv_as_subsection_m1+set}" = set; then | |
13733 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13734 | else |
13735 | gcc_cv_as_subsection_m1=no | |
13736 | if test $in_tree_gas = yes; then | |
13737 | if test $in_tree_gas_is_elf = yes \ | |
13738 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13739 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13740 | fi |
8ada417f | 13741 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13742 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13743 | .subsection -1 |
13744 | conftest_label2: .word 0 | |
8ada417f | 13745 | .previous' > conftest.s |
ba479fd2 NN |
13746 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13747 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13748 | (eval $ac_try) 2>&5 | |
13749 | ac_status=$? | |
13750 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13751 | (exit $ac_status); }; } | |
8ada417f ZW |
13752 | then |
13753 | if test x$gcc_cv_nm != x; then | |
13754 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13755 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13756 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13757 | then : | |
13758 | else gcc_cv_as_subsection_m1=yes | |
13759 | fi | |
13760 | rm -f conftest.nm1 conftest.nm2 | |
13761 | fi | |
13762 | else | |
13763 | echo "configure: failed program was" >&5 | |
13764 | cat conftest.s >&5 | |
13765 | fi | |
13766 | rm -f conftest.o conftest.s | |
13767 | fi | |
981d4858 | 13768 | fi |
ba479fd2 NN |
13769 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13770 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13771 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13772 | |
13773 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13774 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13775 | _ACEOF |
981d4858 | 13776 | |
d1accaa3 | 13777 | fi |
ad9c4d9f | 13778 | |
ba479fd2 NN |
13779 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13780 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
13781 | if test "${gcc_cv_as_weak+set}" = set; then | |
13782 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13783 | else |
13784 | gcc_cv_as_weak=no | |
13785 | if test $in_tree_gas = yes; then | |
13786 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13787 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13788 | fi |
8ada417f | 13789 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13790 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13791 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13793 | (eval $ac_try) 2>&5 | |
13794 | ac_status=$? | |
13795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13796 | (exit $ac_status); }; } | |
8ada417f ZW |
13797 | then |
13798 | gcc_cv_as_weak=yes | |
13799 | else | |
13800 | echo "configure: failed program was" >&5 | |
13801 | cat conftest.s >&5 | |
13802 | fi | |
13803 | rm -f conftest.o conftest.s | |
13804 | fi | |
981d4858 | 13805 | fi |
ba479fd2 NN |
13806 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13807 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13808 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13809 | |
13810 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13811 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13812 | _ACEOF |
981d4858 | 13813 | |
12822146 | 13814 | fi |
ad9c4d9f | 13815 | |
a0203ca7 AO |
13816 | echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
13817 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 | |
13818 | if test "${gcc_cv_as_weakref+set}" = set; then | |
13819 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13820 | else | |
13821 | gcc_cv_as_weakref=no | |
13822 | if test $in_tree_gas = yes; then | |
13823 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
13824 | then gcc_cv_as_weakref=yes | |
13825 | fi | |
13826 | elif test x$gcc_cv_as != x; then | |
13827 | echo ' .weakref foobar, barfnot' > conftest.s | |
13828 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13830 | (eval $ac_try) 2>&5 | |
13831 | ac_status=$? | |
13832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13833 | (exit $ac_status); }; } | |
13834 | then | |
13835 | gcc_cv_as_weakref=yes | |
13836 | else | |
13837 | echo "configure: failed program was" >&5 | |
13838 | cat conftest.s >&5 | |
13839 | fi | |
13840 | rm -f conftest.o conftest.s | |
13841 | fi | |
13842 | fi | |
13843 | echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 | |
13844 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6 | |
13845 | if test $gcc_cv_as_weakref = yes; then | |
13846 | ||
13847 | cat >>confdefs.h <<\_ACEOF | |
13848 | #define HAVE_GAS_WEAKREF 1 | |
13849 | _ACEOF | |
13850 | ||
13851 | fi | |
13852 | ||
e41f3691 JDA |
13853 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13854 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
13855 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then | |
13856 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13857 | else | |
13858 | gcc_cv_as_nsubspa_comdat=no | |
13859 | if test $in_tree_gas = yes; then | |
13860 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13861 | then gcc_cv_as_nsubspa_comdat=yes | |
13862 | fi | |
13863 | elif test x$gcc_cv_as != x; then | |
13864 | echo ' .SPACE $TEXT$ | |
13865 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13866 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13867 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13868 | (eval $ac_try) 2>&5 | |
13869 | ac_status=$? | |
13870 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13871 | (exit $ac_status); }; } | |
13872 | then | |
13873 | gcc_cv_as_nsubspa_comdat=yes | |
13874 | else | |
13875 | echo "configure: failed program was" >&5 | |
13876 | cat conftest.s >&5 | |
13877 | fi | |
13878 | rm -f conftest.o conftest.s | |
13879 | fi | |
13880 | fi | |
13881 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 | |
13882 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
13883 | if test $gcc_cv_as_nsubspa_comdat = yes; then | |
13884 | ||
13885 | cat >>confdefs.h <<\_ACEOF | |
13886 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13887 | _ACEOF | |
13888 | ||
13889 | fi | |
13890 | ||
8ada417f ZW |
13891 | # .hidden needs to be supported in both the assembler and the linker, |
13892 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13893 | # This is irritatingly difficult to feature test for; we have to check the | |
13894 | # date string after the version number. If we've got an in-tree | |
13895 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13896 | # to be safe. | |
13897 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
ba479fd2 NN |
13898 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
13899 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
13900 | if test "${gcc_cv_as_hidden+set}" = set; then | |
13901 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13902 | else |
13903 | gcc_cv_as_hidden=no | |
13904 | if test $in_tree_gas = yes; then | |
13905 | if test $in_tree_gas_is_elf = yes \ | |
13906 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
13907 | then gcc_cv_as_hidden=yes | |
13908 | fi | |
13909 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13910 | echo ' .hidden foobar |
8ada417f | 13911 | foobar:' > conftest.s |
ba479fd2 NN |
13912 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13914 | (eval $ac_try) 2>&5 | |
13915 | ac_status=$? | |
13916 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13917 | (exit $ac_status); }; } | |
8ada417f ZW |
13918 | then |
13919 | gcc_cv_as_hidden=yes | |
13920 | else | |
13921 | echo "configure: failed program was" >&5 | |
13922 | cat conftest.s >&5 | |
13923 | fi | |
13924 | rm -f conftest.o conftest.s | |
13925 | fi | |
13926 | fi | |
ba479fd2 NN |
13927 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
13928 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 13929 | |
ad9c4d9f | 13930 | |
ba479fd2 NN |
13931 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
13932 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
13933 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
13934 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13935 | else |
13936 | if test $in_tree_ld = yes ; then | |
13937 | gcc_cv_ld_hidden=no | |
13938 | 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 \ | |
13939 | && test $in_tree_ld_is_elf = yes; then | |
13940 | gcc_cv_ld_hidden=yes | |
13941 | fi | |
13942 | else | |
13943 | gcc_cv_ld_hidden=yes | |
bace148a | 13944 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
13945 | if echo "$ld_ver" | grep GNU > /dev/null; then |
13946 | ld_vers=`echo $ld_ver | sed -n \ | |
13947 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13948 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13949 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \ | |
13950 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
13951 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
11176d2a JB |
13952 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ |
13953 | -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 | 13954 | 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 |
13955 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
13956 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
13957 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
13958 | if test 0"$ld_date" -lt 20020404; then |
13959 | if test -n "$ld_date"; then | |
13960 | # If there was date string, but was earlier than 2002-04-04, fail | |
13961 | gcc_cv_ld_hidden=no | |
13962 | elif test -z "$ld_vers"; then | |
13963 | # If there was no date string nor ld version number, something is wrong | |
13964 | gcc_cv_ld_hidden=no | |
13965 | else | |
8ada417f ZW |
13966 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
13967 | if test "$ld_vers_major" -lt 2; then | |
13968 | gcc_cv_ld_hidden=no | |
13969 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
13970 | gcc_cv_ld_hidden="no" | |
13971 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
13972 | gcc_cv_ld_hidden=no | |
c72931a6 | 13973 | fi |
8ada417f | 13974 | fi |
789b7de5 | 13975 | fi |
8ada417f | 13976 | else |
28690784 | 13977 | case "${target}" in |
b0fd7d27 | 13978 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
13979 | gcc_cv_ld_hidden=yes |
13980 | ;; | |
13981 | *) | |
13982 | gcc_cv_ld_hidden=no | |
13983 | ;; | |
13984 | esac | |
8ada417f ZW |
13985 | fi |
13986 | fi | |
6d07784a | 13987 | fi |
ba479fd2 NN |
13988 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
13989 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 13990 | libgcc_visibility=no |
ad9c4d9f | 13991 | |
232b67d9 | 13992 | |
8e3940b2 | 13993 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 13994 | libgcc_visibility=yes |
ba479fd2 NN |
13995 | |
13996 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 13997 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 13998 | _ACEOF |
ad9c4d9f NN |
13999 | |
14000 | fi | |
14001 | ||
8ada417f | 14002 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
ba479fd2 NN |
14003 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
14004 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
14005 | if test "${gcc_cv_as_leb128+set}" = set; then | |
14006 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14007 | else |
14008 | gcc_cv_as_leb128=no | |
14009 | if test $in_tree_gas = yes; then | |
14010 | if test $in_tree_gas_is_elf = yes \ | |
14011 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14012 | then gcc_cv_as_leb128=yes | |
14013 | fi | |
14014 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14015 | echo ' .data |
b7460f24 RH |
14016 | .uleb128 L2 - L1 |
14017 | L1: | |
14018 | .uleb128 1280 | |
14019 | .sleb128 -1010 | |
8ada417f | 14020 | L2:' > conftest.s |
ba479fd2 NN |
14021 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14023 | (eval $ac_try) 2>&5 | |
14024 | ac_status=$? | |
14025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14026 | (exit $ac_status); }; } | |
8ada417f ZW |
14027 | then |
14028 | # GAS versions before 2.11 do not support uleb128, | |
14029 | # despite appearing to. | |
14030 | # ??? There exists an elf-specific test that will crash | |
14031 | # the assembler. Perhaps it's better to figure out whether | |
14032 | # arbitrary sections are supported and try the test. | |
bace148a | 14033 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14034 | if echo "$as_ver" | grep GNU > /dev/null; then |
14035 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` | |
14036 | as_major=`echo $as_ver | sed 's/\..*//'` | |
14037 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` | |
14038 | if test $as_major -eq 2 && test $as_minor -lt 11 | |
14039 | then : | |
14040 | else gcc_cv_as_leb128=yes | |
14041 | fi | |
14042 | fi | |
14043 | else | |
14044 | echo "configure: failed program was" >&5 | |
14045 | cat conftest.s >&5 | |
14046 | fi | |
14047 | rm -f conftest.o conftest.s | |
14048 | fi | |
b7460f24 | 14049 | fi |
ba479fd2 NN |
14050 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
14051 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 14052 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
14053 | |
14054 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 14055 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 14056 | _ACEOF |
b7460f24 RH |
14057 | |
14058 | fi | |
ad9c4d9f | 14059 | |
8ada417f ZW |
14060 | # GAS versions up to and including 2.11.0 may mis-optimize |
14061 | # .eh_frame data. | |
ba479fd2 NN |
14062 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
14063 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
14064 | if test "${gcc_cv_as_eh_frame+set}" = set; then | |
14065 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14066 | else |
14067 | gcc_cv_as_eh_frame=no | |
14068 | if test $in_tree_gas = yes; then | |
14069 | if test $in_tree_gas_is_elf = yes \ | |
14070 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14071 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 14072 | fi |
8ada417f | 14073 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14074 | echo ' .text |
c64688ae RH |
14075 | .LFB1: |
14076 | .4byte 0 | |
14077 | .L1: | |
14078 | .4byte 0 | |
14079 | .LFE1: | |
14080 | .section .eh_frame,"aw",@progbits | |
14081 | __FRAME_BEGIN__: | |
14082 | .4byte .LECIE1-.LSCIE1 | |
14083 | .LSCIE1: | |
14084 | .4byte 0x0 | |
14085 | .byte 0x1 | |
14086 | .ascii "z\0" | |
14087 | .byte 0x1 | |
14088 | .byte 0x78 | |
14089 | .byte 0x1a | |
14090 | .byte 0x0 | |
14091 | .byte 0x4 | |
14092 | .4byte 1 | |
14093 | .p2align 1 | |
14094 | .LECIE1: | |
14095 | .LSFDE1: | |
14096 | .4byte .LEFDE1-.LASFDE1 | |
14097 | .LASFDE1: | |
14098 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
14099 | .4byte .LFB1 | |
14100 | .4byte .LFE1-.LFB1 | |
14101 | .byte 0x4 | |
14102 | .4byte .LFE1-.LFB1 | |
14103 | .byte 0x4 | |
14104 | .4byte .L1-.LFB1 | |
8ada417f | 14105 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
14106 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14107 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14108 | (eval $ac_try) 2>&5 | |
14109 | ac_status=$? | |
14110 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14111 | (exit $ac_status); }; } | |
8ada417f ZW |
14112 | then |
14113 | cat > conftest.lit <<EOF | |
c64688ae RH |
14114 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
14115 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 14116 | 0020 08000000 04080000 0044 .........D |
01efb963 | 14117 | EOF |
ba479fd2 | 14118 | cat > conftest.big <<EOF |
01efb963 AS |
14119 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
14120 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 14121 | 0020 00000008 04000000 0844 .........D |
c64688ae | 14122 | EOF |
8ada417f ZW |
14123 | # If the assembler didn't choke, and we can objdump, |
14124 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
14125 | # The text in the here-document typically retains its unix-style line |
14126 | # endings, while the output of objdump will use host line endings. | |
14127 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
14128 | if test x$gcc_cv_objdump != x \ |
14129 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
14130 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
14131 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
14132 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
14133 | then |
14134 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
14135 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
14136 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14137 | (eval $ac_try) 2>&5 | |
14138 | ac_status=$? | |
14139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14140 | (exit $ac_status); }; }; then | |
8ada417f ZW |
14141 | gcc_cv_as_eh_frame=buggy |
14142 | else | |
14143 | # Uh oh, what do we do now? | |
14144 | gcc_cv_as_eh_frame=no | |
14145 | fi | |
14146 | else | |
14147 | echo "configure: failed program was" >&5 | |
14148 | cat conftest.s >&5 | |
14149 | fi | |
14150 | rm -f conftest.o conftest.s | |
14151 | fi | |
c64688ae | 14152 | fi |
ba479fd2 NN |
14153 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
14154 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 14155 | |
6e3f3080 | 14156 | |
63cf211a | 14157 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
14158 | |
14159 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14160 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 14161 | _ACEOF |
ad9c4d9f NN |
14162 | |
14163 | fi | |
14164 | ||
ba479fd2 NN |
14165 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14166 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14167 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14168 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14169 | else |
14170 | gcc_cv_as_shf_merge=no | |
14171 | if test $in_tree_gas = yes; then | |
14172 | if test $in_tree_gas_is_elf = yes \ | |
14173 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14174 | then gcc_cv_as_shf_merge=yes | |
14175 | fi | |
14176 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14177 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14178 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14179 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14180 | (eval $ac_try) 2>&5 | |
14181 | ac_status=$? | |
14182 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14183 | (exit $ac_status); }; } | |
8ada417f ZW |
14184 | then |
14185 | gcc_cv_as_shf_merge=yes | |
14186 | else | |
14187 | echo "configure: failed program was" >&5 | |
14188 | cat conftest.s >&5 | |
14189 | fi | |
14190 | rm -f conftest.o conftest.s | |
14191 | fi | |
201556f0 | 14192 | fi |
ba479fd2 NN |
14193 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14194 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 14195 | |
c18a5b6c MM |
14196 | if test $gcc_cv_as_shf_merge = no; then |
14197 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 | |
14198 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
14199 | if test "${gcc_cv_as_shf_merge+set}" = set; then | |
14200 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14201 | else | |
14202 | gcc_cv_as_shf_merge=no | |
14203 | if test $in_tree_gas = yes; then | |
14204 | if test $in_tree_gas_is_elf = yes \ | |
14205 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14206 | then gcc_cv_as_shf_merge=yes | |
14207 | fi | |
14208 | elif test x$gcc_cv_as != x; then | |
14209 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14210 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14212 | (eval $ac_try) 2>&5 | |
14213 | ac_status=$? | |
14214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14215 | (exit $ac_status); }; } | |
14216 | then | |
14217 | gcc_cv_as_shf_merge=yes | |
14218 | else | |
14219 | echo "configure: failed program was" >&5 | |
14220 | cat conftest.s >&5 | |
14221 | fi | |
14222 | rm -f conftest.o conftest.s | |
14223 | fi | |
14224 | fi | |
14225 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 | |
14226 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
14227 | ||
14228 | fi | |
8ad9fb33 | 14229 | |
ba479fd2 | 14230 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14231 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14232 | _ACEOF |
201556f0 | 14233 | |
201556f0 | 14234 | |
c18a5b6c MM |
14235 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14236 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14237 | if test "${gcc_cv_as_comdat_group+set}" = set; then | |
14238 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14239 | else | |
14240 | gcc_cv_as_comdat_group=no | |
14241 | if test $in_tree_gas = yes; then | |
14242 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14243 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14244 | then gcc_cv_as_comdat_group=yes |
14245 | fi | |
14246 | elif test x$gcc_cv_as != x; then | |
14247 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14248 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14250 | (eval $ac_try) 2>&5 | |
14251 | ac_status=$? | |
14252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14253 | (exit $ac_status); }; } | |
14254 | then | |
14255 | gcc_cv_as_comdat_group=yes | |
14256 | else | |
14257 | echo "configure: failed program was" >&5 | |
14258 | cat conftest.s >&5 | |
14259 | fi | |
14260 | rm -f conftest.o conftest.s | |
14261 | fi | |
14262 | fi | |
14263 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 | |
14264 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
14265 | ||
14266 | if test $gcc_cv_as_comdat_group = yes; then | |
14267 | gcc_cv_as_comdat_group_percent=no | |
14268 | else | |
14269 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 | |
14270 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
14271 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then | |
14272 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14273 | else | |
14274 | gcc_cv_as_comdat_group_percent=no | |
14275 | if test $in_tree_gas = yes; then | |
14276 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14277 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14278 | then gcc_cv_as_comdat_group_percent=yes |
14279 | fi | |
14280 | elif test x$gcc_cv_as != x; then | |
14281 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14282 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14284 | (eval $ac_try) 2>&5 | |
14285 | ac_status=$? | |
14286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14287 | (exit $ac_status); }; } | |
14288 | then | |
14289 | gcc_cv_as_comdat_group_percent=yes | |
14290 | else | |
14291 | echo "configure: failed program was" >&5 | |
14292 | cat conftest.s >&5 | |
14293 | fi | |
14294 | rm -f conftest.o conftest.s | |
14295 | fi | |
14296 | fi | |
14297 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 | |
14298 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
14299 | ||
14300 | fi | |
11176d2a JB |
14301 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14302 | comdat_group=yes | |
14303 | if test 0"$ld_date" -lt 20050308; then | |
14304 | if test -n "$ld_date"; then | |
14305 | # If there was date string, but was earlier than 2005-03-08, fail | |
14306 | comdat_group=no | |
14307 | elif test "$ld_vers_major" -lt 2; then | |
14308 | comdat_group=no | |
14309 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14310 | comdat_group=no | |
14311 | fi | |
14312 | fi | |
1cf0118d RO |
14313 | else |
14314 | # assume linkers other than GNU ld don't support COMDAT group | |
14315 | comdat_group=no | |
14316 | fi | |
14317 | if test $comdat_group = no; then | |
14318 | gcc_cv_as_comdat_group=no | |
14319 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14320 | fi |
c18a5b6c MM |
14321 | |
14322 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14323 | #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 |
14324 | _ACEOF |
14325 | ||
14326 | ||
8ada417f | 14327 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14328 | conftest_s= |
14329 | tls_first_major= | |
14330 | tls_first_minor= | |
9739c90c | 14331 | tls_as_opt= |
f996902d | 14332 | case "$target" in |
6f9b006d RH |
14333 | alpha*-*-*) |
14334 | conftest_s=' | |
14335 | .section ".tdata","awT",@progbits | |
14336 | foo: .long 25 | |
14337 | .text | |
14338 | ldq $27,__tls_get_addr($29) !literal!1 | |
14339 | lda $16,foo($29) !tlsgd!1 | |
14340 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14341 | ldq $27,__tls_get_addr($29) !literal!2 | |
14342 | lda $16,foo($29) !tlsldm!2 | |
14343 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14344 | ldq $1,foo($29) !gotdtprel | |
14345 | ldah $2,foo($29) !dtprelhi | |
14346 | lda $3,foo($2) !dtprello | |
14347 | lda $4,foo($29) !dtprel | |
14348 | ldq $1,foo($29) !gottprel | |
14349 | ldah $2,foo($29) !tprelhi | |
14350 | lda $3,foo($2) !tprello | |
14351 | lda $4,foo($29) !tprel' | |
14352 | tls_first_major=2 | |
14353 | tls_first_minor=13 | |
2f3321ca | 14354 | tls_as_opt=--fatal-warnings |
6f9b006d | 14355 | ;; |
e4dd71de AH |
14356 | frv*-*-*) |
14357 | conftest_s=' | |
14358 | .section ".tdata","awT",@progbits | |
14359 | x: .long 25 | |
14360 | .text | |
14361 | call #gettlsoff(x)' | |
14362 | tls_first_major=2 | |
14363 | tls_first_minor=14 | |
14364 | ;; | |
51076f96 RC |
14365 | hppa*-*-linux*) |
14366 | conftest_s=' | |
14367 | t1: .reg %r20 | |
14368 | t2: .reg %r21 | |
14369 | gp: .reg %r19 | |
14370 | .section ".tdata","awT",@progbits | |
14371 | foo: .long 25 | |
14372 | .text | |
14373 | .align 4 | |
14374 | addil LT%foo-$tls_gdidx$,gp | |
14375 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14376 | b __tls_get_addr | |
14377 | nop | |
14378 | addil LT%foo-$tls_ldidx$,gp | |
14379 | b __tls_get_addr | |
14380 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14381 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14382 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14383 | mfctl %cr27,%t1 | |
14384 | addil LT%foo-$tls_ieoff$,gp | |
14385 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14386 | add %t1,%t2,%t3 | |
14387 | mfctl %cr27,%t1 | |
14388 | addil LR%foo-$tls_leoff$,%t1 | |
14389 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14390 | tls_first_major=2 | |
14391 | tls_first_minor=15 | |
14392 | tls_as_opt=--fatal-warnings | |
14393 | ;; | |
d3585b76 DJ |
14394 | arm*-*-*) |
14395 | conftest_s=' | |
14396 | .section ".tdata","awT",%progbits | |
14397 | foo: .long 25 | |
14398 | .text | |
14399 | .word foo(gottpoff) | |
14400 | .word foo(tpoff) | |
14401 | .word foo(tlsgd) | |
14402 | .word foo(tlsldm) | |
14403 | .word foo(tlsldo)' | |
14404 | tls_first_major=2 | |
14405 | tls_first_minor=17 | |
14406 | ;; | |
f996902d RH |
14407 | i[34567]86-*-*) |
14408 | conftest_s=' | |
14409 | .section ".tdata","awT",@progbits | |
14410 | foo: .long 25 | |
14411 | .text | |
14412 | movl %gs:0, %eax | |
14413 | leal foo@TLSGD(,%ebx,1), %eax | |
14414 | leal foo@TLSLDM(%ebx), %eax | |
14415 | leal foo@DTPOFF(%eax), %edx | |
14416 | movl foo@GOTTPOFF(%ebx), %eax | |
14417 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14418 | addl foo@GOTNTPOFF(%ebx), %eax |
14419 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14420 | movl $foo@TPOFF, %eax |
14421 | subl $foo@TPOFF, %eax | |
14422 | leal foo@NTPOFF(%ecx), %eax' | |
14423 | tls_first_major=2 | |
75d38379 | 14424 | tls_first_minor=14 |
2f3321ca | 14425 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14426 | ;; |
14427 | x86_64-*-*) | |
14428 | conftest_s=' | |
14429 | .section ".tdata","awT",@progbits | |
14430 | foo: .long 25 | |
14431 | .text | |
14432 | movq %fs:0, %rax | |
14433 | leaq foo@TLSGD(%rip), %rdi | |
14434 | leaq foo@TLSLD(%rip), %rdi | |
14435 | leaq foo@DTPOFF(%rax), %rdx | |
14436 | movq foo@GOTTPOFF(%rip), %rax | |
14437 | movq $foo@TPOFF, %rax' | |
14438 | tls_first_major=2 | |
14439 | tls_first_minor=14 | |
2f3321ca | 14440 | tls_as_opt=--fatal-warnings |
f996902d | 14441 | ;; |
7b6e506e RH |
14442 | ia64-*-*) |
14443 | conftest_s=' | |
14444 | .section ".tdata","awT",@progbits | |
14445 | foo: data8 25 | |
14446 | .text | |
14447 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14448 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14449 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14450 | addl r19 = @dtprel(foo#), gp | |
14451 | adds r21 = @dtprel(foo#), r13 | |
14452 | movl r23 = @dtprel(foo#) | |
14453 | addl r20 = @tprel(foo#), gp | |
14454 | adds r22 = @tprel(foo#), r13 | |
14455 | movl r24 = @tprel(foo#)' | |
14456 | tls_first_major=2 | |
14457 | tls_first_minor=13 | |
2f3321ca | 14458 | tls_as_opt=--fatal-warnings |
7b6e506e | 14459 | ;; |
69229b81 DJ |
14460 | mips*-*-*) |
14461 | conftest_s=' | |
14462 | .section .tdata,"awT",@progbits | |
14463 | x: | |
14464 | .word 2 | |
14465 | .text | |
14466 | addiu $4, $28, %tlsgd(x) | |
14467 | addiu $4, $28, %tlsldm(x) | |
14468 | lui $4, %dtprel_hi(x) | |
14469 | addiu $4, $4, %dtprel_lo(x) | |
14470 | lw $4, %gottprel(x)($28) | |
14471 | lui $4, %tprel_hi(x) | |
14472 | addiu $4, $4, %tprel_lo(x)' | |
14473 | tls_first_major=2 | |
14474 | tls_first_minor=16 | |
14475 | tls_as_opt='-32 --fatal-warnings' | |
14476 | ;; | |
c4501e62 JJ |
14477 | powerpc-*-*) |
14478 | conftest_s=' | |
14479 | .section ".tdata","awT",@progbits | |
14480 | .align 2 | |
14481 | ld0: .space 4 | |
14482 | ld1: .space 4 | |
14483 | x1: .space 4 | |
14484 | x2: .space 4 | |
14485 | x3: .space 4 | |
14486 | .text | |
14487 | addi 3,31,ld0@got@tlsgd | |
14488 | bl __tls_get_addr | |
14489 | addi 3,31,x1@got@tlsld | |
14490 | bl __tls_get_addr | |
14491 | addi 9,3,x1@dtprel | |
14492 | addis 9,3,x2@dtprel@ha | |
14493 | addi 9,9,x2@dtprel@l | |
14494 | lwz 9,x3@got@tprel(31) | |
14495 | add 9,9,x@tls | |
14496 | addi 9,2,x1@tprel | |
14497 | addis 9,2,x2@tprel@ha | |
14498 | addi 9,9,x2@tprel@l' | |
14499 | tls_first_major=2 | |
14500 | tls_first_minor=14 | |
2f3321ca | 14501 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14502 | ;; |
14503 | powerpc64-*-*) | |
14504 | conftest_s=' | |
14505 | .section ".tdata","awT",@progbits | |
14506 | .align 3 | |
14507 | ld0: .space 8 | |
14508 | ld1: .space 8 | |
14509 | x1: .space 8 | |
14510 | x2: .space 8 | |
14511 | x3: .space 8 | |
14512 | .text | |
14513 | addi 3,2,ld0@got@tlsgd | |
14514 | bl .__tls_get_addr | |
14515 | nop | |
14516 | addi 3,2,ld1@toc | |
14517 | bl .__tls_get_addr | |
14518 | nop | |
14519 | addi 3,2,x1@got@tlsld | |
14520 | bl .__tls_get_addr | |
14521 | nop | |
14522 | addi 9,3,x1@dtprel | |
14523 | bl .__tls_get_addr | |
14524 | nop | |
14525 | addis 9,3,x2@dtprel@ha | |
14526 | addi 9,9,x2@dtprel@l | |
14527 | bl .__tls_get_addr | |
14528 | nop | |
14529 | ld 9,x3@got@dtprel(2) | |
14530 | add 9,9,3 | |
14531 | bl .__tls_get_addr | |
14532 | nop' | |
14533 | tls_first_major=2 | |
14534 | tls_first_minor=14 | |
2f3321ca | 14535 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14536 | ;; |
fd3cd001 UW |
14537 | s390-*-*) |
14538 | conftest_s=' | |
14539 | .section ".tdata","awT",@progbits | |
14540 | foo: .long 25 | |
14541 | .text | |
14542 | .long foo@TLSGD | |
14543 | .long foo@TLSLDM | |
14544 | .long foo@DTPOFF | |
14545 | .long foo@NTPOFF | |
14546 | .long foo@GOTNTPOFF | |
14547 | .long foo@INDNTPOFF | |
14548 | l %r1,foo@GOTNTPOFF(%r12) | |
14549 | l %r1,0(%r1):tls_load:foo | |
14550 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14551 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14552 | tls_first_major=2 | |
14553 | tls_first_minor=14 | |
2f3321ca | 14554 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14555 | ;; |
14556 | s390x-*-*) | |
14557 | conftest_s=' | |
14558 | .section ".tdata","awT",@progbits | |
14559 | foo: .long 25 | |
14560 | .text | |
14561 | .quad foo@TLSGD | |
14562 | .quad foo@TLSLDM | |
14563 | .quad foo@DTPOFF | |
14564 | .quad foo@NTPOFF | |
14565 | .quad foo@GOTNTPOFF | |
14566 | lg %r1,foo@GOTNTPOFF(%r12) | |
14567 | larl %r1,foo@INDNTPOFF | |
14568 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14569 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14570 | tls_first_major=2 | |
14571 | tls_first_minor=14 | |
2f3321ca | 14572 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14573 | ;; |
9ff13962 KK |
14574 | sh-*-* | sh[34]-*-*) |
14575 | conftest_s=' | |
14576 | .section ".tdata","awT",@progbits | |
14577 | foo: .long 25 | |
14578 | .text | |
14579 | .long foo@TLSGD | |
14580 | .long foo@TLSLDM | |
14581 | .long foo@DTPOFF | |
14582 | .long foo@GOTTPOFF | |
14583 | .long foo@TPOFF' | |
14584 | tls_first_major=2 | |
14585 | tls_first_minor=13 | |
2f3321ca | 14586 | tls_as_opt=--fatal-warnings |
9ff13962 | 14587 | ;; |
5751a10b | 14588 | sparc*-*-*) |
2f3321ca | 14589 | case "$target" in |
7935dc1b EB |
14590 | sparc*-sun-solaris2.[56789]*) |
14591 | # TLS was introduced in the Solaris 9 4/04 release but | |
14592 | # we do not enable it by default on Solaris 9 either. | |
14593 | if test "x$enable_tls" = xyes ; then | |
14594 | on_solaris=yes | |
14595 | else | |
14596 | enable_tls=no; | |
14597 | fi | |
14598 | ;; | |
2f3321ca EB |
14599 | sparc*-sun-solaris2.*) |
14600 | on_solaris=yes | |
14601 | ;; | |
14602 | *) | |
14603 | on_solaris=no | |
14604 | ;; | |
14605 | esac | |
14606 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14607 | conftest_s=' | |
14608 | .section ".tdata",#alloc,#write,#tls | |
14609 | foo: .long 25 | |
14610 | .text | |
14611 | sethi %tgd_hi22(foo), %o0 | |
14612 | add %o0, %tgd_lo10(foo), %o1 | |
14613 | add %l7, %o1, %o0, %tgd_add(foo) | |
14614 | call __tls_get_addr, %tgd_call(foo) | |
14615 | sethi %tldm_hi22(foo), %l1 | |
14616 | add %l1, %tldm_lo10(foo), %l2 | |
14617 | add %l7, %l2, %o0, %tldm_add(foo) | |
14618 | call __tls_get_addr, %tldm_call(foo) | |
14619 | sethi %tldo_hix22(foo), %l3 | |
14620 | xor %l3, %tldo_lox10(foo), %l4 | |
14621 | add %o0, %l4, %l5, %tldo_add(foo) | |
14622 | sethi %tie_hi22(foo), %o3 | |
14623 | add %o3, %tie_lo10(foo), %o3 | |
14624 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14625 | add %g7, %o2, %o4, %tie_add(foo) | |
14626 | sethi %tle_hix22(foo), %l1 | |
14627 | xor %l1, %tle_lox10(foo), %o5 | |
14628 | ld [%g7 + %o5], %o1' | |
14629 | tls_first_major=0 | |
14630 | tls_first_minor=0 | |
14631 | else | |
14632 | conftest_s=' | |
5751a10b JJ |
14633 | .section ".tdata","awT",@progbits |
14634 | foo: .long 25 | |
14635 | .text | |
14636 | sethi %tgd_hi22(foo), %o0 | |
14637 | add %o0, %tgd_lo10(foo), %o1 | |
14638 | add %l7, %o1, %o0, %tgd_add(foo) | |
14639 | call __tls_get_addr, %tgd_call(foo) | |
14640 | sethi %tldm_hi22(foo), %l1 | |
14641 | add %l1, %tldm_lo10(foo), %l2 | |
14642 | add %l7, %l2, %o0, %tldm_add(foo) | |
14643 | call __tls_get_addr, %tldm_call(foo) | |
14644 | sethi %tldo_hix22(foo), %l3 | |
14645 | xor %l3, %tldo_lox10(foo), %l4 | |
14646 | add %o0, %l4, %l5, %tldo_add(foo) | |
14647 | sethi %tie_hi22(foo), %o3 | |
14648 | add %o3, %tie_lo10(foo), %o3 | |
14649 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14650 | add %g7, %o2, %o4, %tie_add(foo) | |
14651 | sethi %tle_hix22(foo), %l1 | |
14652 | xor %l1, %tle_lox10(foo), %o5 | |
14653 | ld [%g7 + %o5], %o1' | |
14654 | tls_first_major=2 | |
14655 | tls_first_minor=14 | |
2f3321ca EB |
14656 | tls_as_opt="-32 --fatal-warnings" |
14657 | fi | |
5751a10b | 14658 | ;; |
f996902d | 14659 | esac |
8dea1cca DD |
14660 | set_have_as_tls=no |
14661 | if test "x$enable_tls" = xno ; then | |
14662 | : # TLS explicitly disabled. | |
14663 | elif test "x$enable_tls" = xyes ; then | |
14664 | set_have_as_tls=yes # TLS explicitly enabled. | |
14665 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
14666 | : # If we don't have a check, assume no support. |
14667 | else | |
ba479fd2 NN |
14668 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14669 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
14670 | if test "${gcc_cv_as_tls+set}" = set; then | |
14671 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14672 | else |
14673 | gcc_cv_as_tls=no | |
14674 | if test $in_tree_gas = yes; then | |
14675 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14676 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14677 | fi |
8ada417f | 14678 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14679 | echo "$conftest_s" > conftest.s |
2f3321ca | 14680 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14682 | (eval $ac_try) 2>&5 | |
14683 | ac_status=$? | |
14684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14685 | (exit $ac_status); }; } | |
8ada417f ZW |
14686 | then |
14687 | gcc_cv_as_tls=yes | |
14688 | else | |
14689 | echo "configure: failed program was" >&5 | |
14690 | cat conftest.s >&5 | |
14691 | fi | |
14692 | rm -f conftest.o conftest.s | |
f996902d | 14693 | fi |
f996902d | 14694 | fi |
ba479fd2 NN |
14695 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14696 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14697 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
14698 | set_have_as_tls=yes |
14699 | fi | |
14700 | fi | |
14701 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
14702 | |
14703 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14704 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14705 | _ACEOF |
f996902d | 14706 | |
8ada417f ZW |
14707 | fi |
14708 | ||
14709 | # Target-specific assembler checks. | |
f996902d | 14710 | |
7e9d8517 L |
14711 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14712 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
14713 | gcc_cv_ld_static_dynamic=no | |
14714 | if test $in_tree_ld = yes ; then | |
14715 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14716 | gcc_cv_ld_static_dynamic=yes | |
14717 | fi | |
14718 | elif test x$gcc_cv_ld != x; then | |
14719 | # Check if linker supports -Bstatic/-Bdynamic option | |
14720 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14721 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14722 | gcc_cv_ld_static_dynamic=yes | |
14723 | fi | |
14724 | fi | |
14725 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14726 | ||
14727 | cat >>confdefs.h <<\_ACEOF | |
14728 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14729 | _ACEOF | |
14730 | ||
14731 | fi | |
14732 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 | |
14733 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
14734 | ||
d594623a L |
14735 | if test x"$demangler_in_ld" = xyes; then |
14736 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 | |
14737 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
14738 | gcc_cv_ld_demangle=no | |
14739 | if test $in_tree_ld = yes; then | |
14740 | 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 \ | |
14741 | gcc_cv_ld_demangle=yes | |
14742 | fi | |
14743 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14744 | # Check if the GNU linker supports --demangle option | |
14745 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14746 | gcc_cv_ld_demangle=yes | |
14747 | fi | |
14748 | fi | |
14749 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14750 | ||
14751 | cat >>confdefs.h <<\_ACEOF | |
14752 | #define HAVE_LD_DEMANGLE 1 | |
14753 | _ACEOF | |
14754 | ||
14755 | fi | |
14756 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 | |
14757 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
14758 | fi | |
14759 | ||
3a37b08e RH |
14760 | case "$target" in |
14761 | # All TARGET_ABI_OSF targets. | |
14762 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
ba479fd2 NN |
14763 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14764 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
14765 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then | |
14766 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14767 | else |
8ada417f ZW |
14768 | gcc_cv_as_alpha_explicit_relocs=no |
14769 | if test $in_tree_gas = yes; then | |
14770 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14771 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14772 | fi |
8ada417f | 14773 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14774 | echo ' .set nomacro |
3a37b08e RH |
14775 | .text |
14776 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14777 | ldq $2, a($29) !literal!1 | |
14778 | ldq $4, b($29) !literal!2 | |
14779 | ldq_u $3, 0($2) !lituse_base!1 | |
14780 | ldq $27, f($29) !literal!5 | |
14781 | jsr $26, ($27), f !lituse_jsr!5 | |
14782 | ldah $29, 0($26) !gpdisp!3 | |
14783 | lda $0, c($29) !gprel | |
14784 | ldah $1, d($29) !gprelhigh | |
14785 | lda $1, d($1) !gprellow | |
8ada417f | 14786 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14787 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14788 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14789 | (eval $ac_try) 2>&5 | |
14790 | ac_status=$? | |
14791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14792 | (exit $ac_status); }; } | |
8ada417f ZW |
14793 | then |
14794 | gcc_cv_as_alpha_explicit_relocs=yes | |
14795 | else | |
14796 | echo "configure: failed program was" >&5 | |
14797 | cat conftest.s >&5 | |
14798 | fi | |
14799 | rm -f conftest.o conftest.s | |
14800 | fi | |
cafe096b | 14801 | fi |
ba479fd2 NN |
14802 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14803 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14804 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14805 | |
14806 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14807 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14808 | _ACEOF |
3a37b08e | 14809 | |
d006f5eb RH |
14810 | fi |
14811 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 | |
14812 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
14813 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then | |
14814 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14815 | else | |
14816 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14817 | if test $in_tree_gas = yes; then | |
14818 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14819 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14820 | fi | |
14821 | elif test x$gcc_cv_as != x; then | |
14822 | echo ' .set nomacro | |
14823 | .text | |
14824 | ldq $27, a($29) !literal!1 | |
14825 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14826 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14827 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14828 | (eval $ac_try) 2>&5 | |
14829 | ac_status=$? | |
14830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14831 | (exit $ac_status); }; } | |
14832 | then | |
14833 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14834 | else | |
14835 | echo "configure: failed program was" >&5 | |
14836 | cat conftest.s >&5 | |
14837 | fi | |
14838 | rm -f conftest.o conftest.s | |
14839 | fi | |
14840 | fi | |
14841 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 | |
14842 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
14843 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then | |
14844 | ||
14845 | cat >>confdefs.h <<\_ACEOF | |
14846 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14847 | _ACEOF | |
14848 | ||
86da66b5 HPN |
14849 | fi |
14850 | ;; | |
14851 | ||
14852 | cris-*-*) | |
14853 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 | |
14854 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
14855 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then | |
14856 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14857 | else | |
14858 | gcc_cv_as_cris_no_mul_bug=no | |
14859 | if test $in_tree_gas = yes; then | |
14860 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14861 | then gcc_cv_as_cris_no_mul_bug=yes | |
14862 | fi | |
14863 | elif test x$gcc_cv_as != x; then | |
14864 | echo '.text' > conftest.s | |
14865 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14866 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14867 | (eval $ac_try) 2>&5 | |
14868 | ac_status=$? | |
14869 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14870 | (exit $ac_status); }; } | |
14871 | then | |
14872 | gcc_cv_as_cris_no_mul_bug=yes | |
14873 | else | |
14874 | echo "configure: failed program was" >&5 | |
14875 | cat conftest.s >&5 | |
14876 | fi | |
14877 | rm -f conftest.o conftest.s | |
14878 | fi | |
14879 | fi | |
14880 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 | |
14881 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
14882 | if test $gcc_cv_as_cris_no_mul_bug = yes; then | |
14883 | ||
14884 | cat >>confdefs.h <<\_ACEOF | |
14885 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14886 | _ACEOF | |
14887 | ||
8ada417f | 14888 | fi |
3a37b08e | 14889 | ;; |
8ada417f | 14890 | |
1cb36a98 | 14891 | sparc*-*-*) |
ba479fd2 NN |
14892 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14893 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
14894 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then | |
14895 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14896 | else |
8ada417f ZW |
14897 | gcc_cv_as_sparc_register_op=no |
14898 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14899 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14900 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14901 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14902 | (eval $ac_try) 2>&5 | |
14903 | ac_status=$? | |
14904 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14905 | (exit $ac_status); }; } | |
8ada417f ZW |
14906 | then |
14907 | gcc_cv_as_sparc_register_op=yes | |
14908 | else | |
14909 | echo "configure: failed program was" >&5 | |
14910 | cat conftest.s >&5 | |
14911 | fi | |
14912 | rm -f conftest.o conftest.s | |
14913 | fi | |
cafe096b | 14914 | fi |
ba479fd2 NN |
14915 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
14916 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 14917 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
14918 | |
14919 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 14920 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 14921 | _ACEOF |
1cb36a98 | 14922 | |
8ada417f | 14923 | fi |
1cb36a98 | 14924 | |
ba479fd2 NN |
14925 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
14926 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
14927 | if test "${gcc_cv_as_sparc_relax+set}" = set; then | |
14928 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 14929 | else |
8ada417f ZW |
14930 | gcc_cv_as_sparc_relax=no |
14931 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14932 | echo '.text' > conftest.s |
ba479fd2 NN |
14933 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
14934 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14935 | (eval $ac_try) 2>&5 | |
14936 | ac_status=$? | |
14937 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14938 | (exit $ac_status); }; } | |
8ada417f ZW |
14939 | then |
14940 | gcc_cv_as_sparc_relax=yes | |
14941 | else | |
14942 | echo "configure: failed program was" >&5 | |
14943 | cat conftest.s >&5 | |
14944 | fi | |
14945 | rm -f conftest.o conftest.s | |
14946 | fi | |
cafe096b | 14947 | fi |
ba479fd2 NN |
14948 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
14949 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 14950 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
14951 | |
14952 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 14953 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 14954 | _ACEOF |
e95b1e6a | 14955 | |
8ada417f | 14956 | fi |
e95b1e6a | 14957 | |
ba479fd2 NN |
14958 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
14959 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
14960 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then | |
14961 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 14962 | else |
8ada417f ZW |
14963 | gcc_cv_as_sparc_ua_pcrel=no |
14964 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14965 | echo '.text |
8ada417f ZW |
14966 | foo: |
14967 | nop | |
14968 | .data | |
14969 | .align 4 | |
14970 | .byte 0 | |
14971 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
14972 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
14973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14974 | (eval $ac_try) 2>&5 | |
14975 | ac_status=$? | |
14976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14977 | (exit $ac_status); }; } | |
8ada417f ZW |
14978 | then |
14979 | if test x$gcc_cv_ld != x \ | |
14980 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
14981 | gcc_cv_as_sparc_ua_pcrel=yes | |
14982 | fi | |
14983 | rm -f conftest | |
14984 | else | |
14985 | echo "configure: failed program was" >&5 | |
14986 | cat conftest.s >&5 | |
14987 | fi | |
14988 | rm -f conftest.o conftest.s | |
14989 | fi | |
cafe096b | 14990 | fi |
ba479fd2 NN |
14991 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
14992 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 14993 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
14994 | |
14995 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 14996 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 14997 | _ACEOF |
17e9e88c | 14998 | |
17e9e88c | 14999 | |
ba479fd2 NN |
15000 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
15001 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
15002 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then | |
15003 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 15004 | else |
8ada417f ZW |
15005 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
15006 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15007 | echo '.data |
8ada417f ZW |
15008 | .align 4 |
15009 | .byte 0x31 | |
15010 | .uaword %r_disp32(foo) | |
15011 | .byte 0x32, 0x33, 0x34 | |
15012 | .global foo | |
15013 | .hidden foo | |
15014 | foo: | |
15015 | .skip 4' > conftest.s | |
ba479fd2 NN |
15016 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15017 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15018 | (eval $ac_try) 2>&5 | |
15019 | ac_status=$? | |
15020 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15021 | (exit $ac_status); }; } | |
8ada417f ZW |
15022 | then |
15023 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
15024 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
15025 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
15026 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
15027 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
15028 | | grep 'DISP32' > /dev/null 2>&1; then | |
15029 | : | |
15030 | else | |
15031 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 15032 | fi |
8ada417f ZW |
15033 | fi |
15034 | rm -f conftest | |
15035 | else | |
15036 | echo "configure: failed program was" >&5 | |
15037 | cat conftest.s >&5 | |
15038 | fi | |
15039 | rm -f conftest.o conftest.s | |
15040 | fi | |
cafe096b | 15041 | fi |
ba479fd2 NN |
15042 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
15043 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 15044 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
15045 | |
15046 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 15047 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 15048 | _ACEOF |
cf7b8b0d | 15049 | |
8ada417f | 15050 | fi |
ba479fd2 | 15051 | |
8ada417f | 15052 | fi # unaligned pcrel relocs |
cf7b8b0d | 15053 | |
ba479fd2 NN |
15054 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
15055 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
15056 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then | |
15057 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15058 | else |
8ada417f ZW |
15059 | gcc_cv_as_sparc_offsetable_lo10=no |
15060 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15061 | echo '.text |
8ada417f ZW |
15062 | or %g1, %lo(ab) + 12, %g1 |
15063 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
15064 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
15065 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15066 | (eval $ac_try) 2>&5 | |
15067 | ac_status=$? | |
15068 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15069 | (exit $ac_status); }; } | |
8ada417f ZW |
15070 | then |
15071 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 15072 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 15073 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 15074 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
15075 | fi |
15076 | else | |
15077 | echo "configure: failed program was" >&5 | |
15078 | cat conftest.s >&5 | |
15079 | fi | |
15080 | rm -f conftest.o conftest.s | |
15081 | fi | |
cafe096b | 15082 | fi |
ba479fd2 NN |
15083 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
15084 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 15085 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
15086 | |
15087 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15088 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 15089 | _ACEOF |
1cb36a98 | 15090 | |
8ada417f | 15091 | fi |
1cb36a98 RH |
15092 | ;; |
15093 | ||
c307e6dd | 15094 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
15095 | case $target_os in |
15096 | cygwin* | pe | mingw32*) | |
15097 | # Used for DWARF 2 in PE | |
15098 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 | |
15099 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
15100 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then | |
15101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15102 | else | |
15103 | gcc_cv_as_ix86_pe_secrel32=no | |
15104 | if test $in_tree_gas = yes; then | |
15105 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15106 | then gcc_cv_as_ix86_pe_secrel32=yes | |
15107 | fi | |
15108 | elif test x$gcc_cv_as != x; then | |
15109 | echo '.text | |
15110 | foo: nop | |
15111 | .data | |
15112 | .secrel32 foo' > conftest.s | |
15113 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15114 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15115 | (eval $ac_try) 2>&5 | |
15116 | ac_status=$? | |
15117 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15118 | (exit $ac_status); }; } | |
15119 | then | |
15120 | if test x$gcc_cv_ld != x \ | |
15121 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
15122 | gcc_cv_as_ix86_pe_secrel32=yes | |
15123 | fi | |
15124 | rm -f conftest | |
15125 | else | |
15126 | echo "configure: failed program was" >&5 | |
15127 | cat conftest.s >&5 | |
15128 | fi | |
15129 | rm -f conftest.o conftest.s | |
15130 | fi | |
15131 | fi | |
15132 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 | |
15133 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
15134 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then | |
15135 | ||
15136 | cat >>confdefs.h <<\_ACEOF | |
15137 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
15138 | _ACEOF | |
15139 | ||
15140 | fi | |
15141 | ;; | |
15142 | esac | |
15143 | ||
ba479fd2 NN |
15144 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
15145 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
15146 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then | |
15147 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15148 | else |
15149 | gcc_cv_as_ix86_filds_fists=no | |
15150 | if test $in_tree_gas = yes; then | |
15151 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
15152 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 15153 | fi |
8ada417f | 15154 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15155 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
15156 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15157 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15158 | (eval $ac_try) 2>&5 | |
15159 | ac_status=$? | |
15160 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15161 | (exit $ac_status); }; } | |
8ada417f ZW |
15162 | then |
15163 | gcc_cv_as_ix86_filds_fists=yes | |
15164 | else | |
15165 | echo "configure: failed program was" >&5 | |
15166 | cat conftest.s >&5 | |
981d4858 | 15167 | fi |
8ada417f ZW |
15168 | rm -f conftest.o conftest.s |
15169 | fi | |
15170 | fi | |
ba479fd2 NN |
15171 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15172 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 15173 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15174 | |
15175 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15176 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15177 | _ACEOF |
ad9c4d9f | 15178 | |
f6f5dff2 RO |
15179 | fi |
15180 | ||
ba479fd2 NN |
15181 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15182 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
15183 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then | |
15184 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15185 | else |
15186 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15187 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15188 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15189 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15190 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15191 | (eval $ac_try) 2>&5 | |
15192 | ac_status=$? | |
15193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15194 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15195 | then |
15196 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15197 | else | |
15198 | echo "configure: failed program was" >&5 | |
15199 | cat conftest.s >&5 | |
15200 | fi | |
15201 | rm -f conftest.o conftest.s | |
15202 | fi | |
15203 | fi | |
ba479fd2 NN |
15204 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15205 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 15206 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15207 | |
15208 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15209 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15210 | _ACEOF |
f6f5dff2 | 15211 | |
b6c03bcd RS |
15212 | fi |
15213 | ||
15214 | echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5 | |
15215 | echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6 | |
15216 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then | |
15217 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15218 | else | |
15219 | gcc_cv_as_ix86_ffreep=no | |
15220 | if test x$gcc_cv_as != x; then | |
15221 | echo 'ffreep %st(1)' > conftest.s | |
15222 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15224 | (eval $ac_try) 2>&5 | |
15225 | ac_status=$? | |
15226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15227 | (exit $ac_status); }; } | |
15228 | then | |
15229 | gcc_cv_as_ix86_ffreep=yes | |
15230 | else | |
15231 | echo "configure: failed program was" >&5 | |
15232 | cat conftest.s >&5 | |
15233 | fi | |
15234 | rm -f conftest.o conftest.s | |
15235 | fi | |
15236 | fi | |
15237 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5 | |
15238 | echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6 | |
15239 | if test $gcc_cv_as_ix86_ffreep = yes; then | |
15240 | ||
15241 | cat >>confdefs.h <<\_ACEOF | |
15242 | #define HAVE_AS_IX86_FFREEP 1 | |
15243 | _ACEOF | |
15244 | ||
ad9c4d9f NN |
15245 | fi |
15246 | ||
6f3ca281 ZW |
15247 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15248 | # to 1 if the feature is present, 0 otherwise. | |
ba479fd2 NN |
15249 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15250 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
15251 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then | |
15252 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15253 | else |
15254 | gcc_cv_as_ix86_gotoff_in_data=no | |
15255 | if test $in_tree_gas = yes; then | |
15256 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15257 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15258 | fi | |
15259 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15260 | echo ' .text |
f88c65f7 RH |
15261 | .L0: |
15262 | nop | |
15263 | .data | |
8ada417f | 15264 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
15265 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15266 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15267 | (eval $ac_try) 2>&5 | |
15268 | ac_status=$? | |
15269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15270 | (exit $ac_status); }; } | |
8ada417f ZW |
15271 | then |
15272 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15273 | else | |
15274 | echo "configure: failed program was" >&5 | |
15275 | cat conftest.s >&5 | |
f88c65f7 | 15276 | fi |
8ada417f ZW |
15277 | rm -f conftest.o conftest.s |
15278 | fi | |
15279 | fi | |
ba479fd2 NN |
15280 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15281 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 15282 | |
6f3ca281 | 15283 | |
ba479fd2 | 15284 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15285 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15286 | _ACEOF |
f88c65f7 | 15287 | |
1cb36a98 | 15288 | ;; |
ef1ecf87 RH |
15289 | |
15290 | ia64*-*-*) | |
ba479fd2 NN |
15291 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15292 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
15293 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then | |
15294 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15295 | else |
8ada417f ZW |
15296 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15297 | if test $in_tree_gas = yes; then | |
15298 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15299 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15300 | fi |
8ada417f | 15301 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15302 | echo ' .text |
ef1ecf87 RH |
15303 | addl r15 = @ltoffx(x#), gp |
15304 | ;; | |
cfa9ee99 | 15305 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15306 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15307 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15308 | (eval $ac_try) 2>&5 | |
15309 | ac_status=$? | |
15310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15311 | (exit $ac_status); }; } | |
8ada417f | 15312 | then |
cfa9ee99 | 15313 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15314 | else |
15315 | echo "configure: failed program was" >&5 | |
15316 | cat conftest.s >&5 | |
2c4a9cff | 15317 | fi |
8ada417f ZW |
15318 | rm -f conftest.o conftest.s |
15319 | fi | |
15320 | fi | |
ba479fd2 NN |
15321 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15322 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 15323 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15324 | |
15325 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15326 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15327 | _ACEOF |
8ada417f | 15328 | |
cfa9ee99 | 15329 | fi |
8ada417f | 15330 | |
2c4a9cff | 15331 | ;; |
8ada417f | 15332 | |
2c4a9cff | 15333 | powerpc*-*-*) |
8ada417f | 15334 | case $target in |
432218ba DE |
15335 | *-*-aix*) conftest_s=' .machine "pwr5" |
15336 | .csect .text[PR] | |
6b37db3c | 15337 | mfcr 3,128';; |
8af4d362 PB |
15338 | *-*-darwin*) |
15339 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 | |
15340 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
15341 | if test "${gcc_cv_as_machine_directive+set}" = set; then | |
15342 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15343 | else | |
15344 | gcc_cv_as_machine_directive=no | |
15345 | if test x$gcc_cv_as != x; then | |
15346 | echo ' .machine ppc7400' > conftest.s | |
15347 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15349 | (eval $ac_try) 2>&5 | |
15350 | ac_status=$? | |
15351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15352 | (exit $ac_status); }; } | |
15353 | then | |
15354 | gcc_cv_as_machine_directive=yes | |
15355 | else | |
15356 | echo "configure: failed program was" >&5 | |
15357 | cat conftest.s >&5 | |
15358 | fi | |
15359 | rm -f conftest.o conftest.s | |
15360 | fi | |
15361 | fi | |
15362 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 | |
15363 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
15364 | ||
15365 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15366 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15367 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15368 | test x$build = x$target && exit 1 | |
15369 | fi | |
15370 | conftest_s=' .text | |
6b37db3c | 15371 | mfcr r3,128';; |
4c67db14 | 15372 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15373 | .text |
6b37db3c | 15374 | mfcr 3,128';; |
8ada417f | 15375 | esac |
8ada417f | 15376 | |
ba479fd2 NN |
15377 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15378 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
15379 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then | |
15380 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15381 | else |
8ada417f ZW |
15382 | gcc_cv_as_powerpc_mfcrf=no |
15383 | if test $in_tree_gas = yes; then | |
15384 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15385 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15386 | fi |
8ada417f | 15387 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15388 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15389 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15390 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15391 | (eval $ac_try) 2>&5 | |
15392 | ac_status=$? | |
15393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15394 | (exit $ac_status); }; } | |
8ada417f ZW |
15395 | then |
15396 | gcc_cv_as_powerpc_mfcrf=yes | |
15397 | else | |
15398 | echo "configure: failed program was" >&5 | |
15399 | cat conftest.s >&5 | |
15400 | fi | |
15401 | rm -f conftest.o conftest.s | |
15402 | fi | |
2c4a9cff | 15403 | fi |
ba479fd2 NN |
15404 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15405 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15406 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15407 | |
15408 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15409 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15410 | _ACEOF |
ef1ecf87 | 15411 | |
8ada417f | 15412 | fi |
432218ba DE |
15413 | |
15414 | case $target in | |
15415 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15416 | .csect .text[PR] | |
15417 | popcntb 3,3';; | |
15418 | *) conftest_s=' .machine power5 | |
15419 | .text | |
15420 | popcntb 3,3';; | |
15421 | esac | |
15422 | ||
15423 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 | |
15424 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
15425 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then | |
15426 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15427 | else | |
15428 | gcc_cv_as_powerpc_popcntb=no | |
15429 | if test $in_tree_gas = yes; then | |
15430 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15431 | then gcc_cv_as_powerpc_popcntb=yes | |
15432 | fi | |
15433 | elif test x$gcc_cv_as != x; then | |
15434 | echo "$conftest_s" > conftest.s | |
15435 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15436 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15437 | (eval $ac_try) 2>&5 | |
15438 | ac_status=$? | |
15439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15440 | (exit $ac_status); }; } | |
15441 | then | |
15442 | gcc_cv_as_powerpc_popcntb=yes | |
15443 | else | |
15444 | echo "configure: failed program was" >&5 | |
15445 | cat conftest.s >&5 | |
15446 | fi | |
15447 | rm -f conftest.o conftest.s | |
15448 | fi | |
15449 | fi | |
15450 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 | |
15451 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
15452 | if test $gcc_cv_as_powerpc_popcntb = yes; then | |
15453 | ||
15454 | cat >>confdefs.h <<\_ACEOF | |
15455 | #define HAVE_AS_POPCNTB 1 | |
15456 | _ACEOF | |
15457 | ||
9719f3b7 DE |
15458 | fi |
15459 | ||
15460 | case $target in | |
15461 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
15462 | .csect .text[PR] | |
15463 | frin 1,1';; | |
1e04bfdc | 15464 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
15465 | .text |
15466 | frin 1,1';; | |
15467 | esac | |
15468 | ||
15469 | echo "$as_me:$LINENO: checking assembler for fp round support" >&5 | |
15470 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 | |
15471 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then | |
15472 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15473 | else | |
15474 | gcc_cv_as_powerpc_fprnd=no | |
15475 | if test $in_tree_gas = yes; then | |
15476 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15477 | then gcc_cv_as_powerpc_fprnd=yes | |
15478 | fi | |
15479 | elif test x$gcc_cv_as != x; then | |
15480 | echo "$conftest_s" > conftest.s | |
15481 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15483 | (eval $ac_try) 2>&5 | |
15484 | ac_status=$? | |
15485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15486 | (exit $ac_status); }; } | |
15487 | then | |
15488 | gcc_cv_as_powerpc_fprnd=yes | |
15489 | else | |
15490 | echo "configure: failed program was" >&5 | |
15491 | cat conftest.s >&5 | |
15492 | fi | |
15493 | rm -f conftest.o conftest.s | |
15494 | fi | |
15495 | fi | |
15496 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 | |
15497 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 | |
15498 | if test $gcc_cv_as_powerpc_fprnd = yes; then | |
15499 | ||
15500 | cat >>confdefs.h <<\_ACEOF | |
15501 | #define HAVE_AS_FPRND 1 | |
15502 | _ACEOF | |
15503 | ||
432218ba DE |
15504 | fi |
15505 | ||
7f970b70 AM |
15506 | case $target in |
15507 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15508 | LCF..0: | |
15509 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15510 | *-*-darwin*) | |
15511 | conftest_s=' .text | |
15512 | LCF0: | |
15513 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15514 | *) conftest_s=' .text | |
15515 | .LCF0: | |
15516 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15517 | esac | |
15518 | ||
15519 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 | |
15520 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
15521 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then | |
15522 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15523 | else | |
15524 | gcc_cv_as_powerpc_rel16=no | |
15525 | if test $in_tree_gas = yes; then | |
15526 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15527 | then gcc_cv_as_powerpc_rel16=yes | |
15528 | fi | |
15529 | elif test x$gcc_cv_as != x; then | |
15530 | echo "$conftest_s" > conftest.s | |
15531 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15532 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15533 | (eval $ac_try) 2>&5 | |
15534 | ac_status=$? | |
15535 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15536 | (exit $ac_status); }; } | |
15537 | then | |
15538 | gcc_cv_as_powerpc_rel16=yes | |
15539 | else | |
15540 | echo "configure: failed program was" >&5 | |
15541 | cat conftest.s >&5 | |
15542 | fi | |
15543 | rm -f conftest.o conftest.s | |
15544 | fi | |
15545 | fi | |
15546 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 | |
15547 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
15548 | if test $gcc_cv_as_powerpc_rel16 = yes; then | |
15549 | ||
15550 | cat >>confdefs.h <<\_ACEOF | |
15551 | #define HAVE_AS_REL16 1 | |
15552 | _ACEOF | |
15553 | ||
15554 | fi | |
8ada417f ZW |
15555 | ;; |
15556 | ||
15557 | mips*-*-*) | |
ba479fd2 NN |
15558 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15559 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
15560 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then | |
15561 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15562 | else |
15563 | gcc_cv_as_mips_explicit_relocs=no | |
15564 | if test $in_tree_gas = yes; then | |
15565 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15566 | then gcc_cv_as_mips_explicit_relocs=yes | |
15567 | fi | |
15568 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15569 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15570 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15572 | (eval $ac_try) 2>&5 | |
15573 | ac_status=$? | |
15574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15575 | (exit $ac_status); }; } | |
8ada417f ZW |
15576 | then |
15577 | gcc_cv_as_mips_explicit_relocs=yes | |
15578 | else | |
15579 | echo "configure: failed program was" >&5 | |
15580 | cat conftest.s >&5 | |
ef1ecf87 | 15581 | fi |
8ada417f ZW |
15582 | rm -f conftest.o conftest.s |
15583 | fi | |
15584 | fi | |
ba479fd2 NN |
15585 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15586 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15587 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15588 | if test x$target_cpu_default = x | |
15589 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15590 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15591 | fi | |
15592 | fi | |
dbad5e72 SE |
15593 | ;; |
15594 | esac | |
8ada417f | 15595 | |
dbad5e72 SE |
15596 | # Mips and HP-UX need the GNU assembler. |
15597 | # Linux on IA64 might be able to use the Intel assembler. | |
15598 | ||
15599 | case "$target" in | |
15600 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
15601 | if test x$gas_flag = xyes \ |
15602 | || test x"$host" != x"$build" \ | |
15603 | || test ! -x "$gcc_cv_as" \ | |
15604 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
15605 | : | |
15606 | else | |
15607 | echo "*** This configuration requires the GNU assembler" >&2 | |
15608 | exit 1 | |
15609 | fi | |
ef1ecf87 | 15610 | ;; |
1cb36a98 | 15611 | esac |
dbad5e72 | 15612 | |
9d147085 RH |
15613 | # ??? Not all targets support dwarf2 debug_line, even within a version |
15614 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
15615 | # info to the output file. So, as supported targets are added to gas 2.11, | |
15616 | # add some instruction here to (also) show we expect this might work. | |
15617 | # ??? Once 2.11 is released, probably need to add first known working | |
15618 | # version to the per-target configury. | |
15619 | case "$target" in | |
80486e06 | 15620 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 15621 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
bdcee471 | 15622 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-*) |
9d147085 RH |
15623 | insn="nop" |
15624 | ;; | |
57116d8d | 15625 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
15626 | insn="nop 0" |
15627 | ;; | |
2853bc5a HPN |
15628 | mmix-*-*) |
15629 | insn="swym 0" | |
15630 | ;; | |
8ada417f ZW |
15631 | esac |
15632 | if test x"$insn" != x; then | |
15633 | conftest_s="\ | |
15634 | .file 1 \"conftest.s\" | |
15635 | .loc 1 3 0 | |
15636 | $insn" | |
ba479fd2 NN |
15637 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
15638 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
15639 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then | |
15640 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15641 | else |
15642 | gcc_cv_as_dwarf2_debug_line=no | |
15643 | if test $in_tree_gas = yes; then | |
15644 | if test $in_tree_gas_is_elf = yes \ | |
15645 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15646 | then gcc_cv_as_dwarf2_debug_line=yes | |
15647 | fi | |
15648 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15649 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15650 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15651 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15652 | (eval $ac_try) 2>&5 | |
15653 | ac_status=$? | |
15654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15655 | (exit $ac_status); }; } | |
8ada417f | 15656 | then |
080a5bb0 EB |
15657 | if test x$gcc_cv_objdump != x \ |
15658 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
15659 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
15660 | gcc_cv_as_dwarf2_debug_line=yes |
15661 | fi | |
15662 | else | |
15663 | echo "configure: failed program was" >&5 | |
15664 | cat conftest.s >&5 | |
15665 | fi | |
15666 | rm -f conftest.o conftest.s | |
15667 | fi | |
15668 | fi | |
ba479fd2 NN |
15669 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
15670 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 15671 | |
ad9c4d9f | 15672 | |
8ada417f ZW |
15673 | # The .debug_line file table must be in the exact order that |
15674 | # we specified the files, since these indices are also used | |
15675 | # by DW_AT_decl_file. Approximate this test by testing if | |
15676 | # the assembler bitches if the same index is assigned twice. | |
ba479fd2 NN |
15677 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
15678 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
15679 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then | |
15680 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15681 | else |
15682 | gcc_cv_as_dwarf2_file_buggy=no | |
15683 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15684 | echo ' .file 1 "foo.s" |
8ada417f | 15685 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
15686 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15688 | (eval $ac_try) 2>&5 | |
15689 | ac_status=$? | |
15690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15691 | (exit $ac_status); }; } | |
8ada417f ZW |
15692 | then |
15693 | gcc_cv_as_dwarf2_file_buggy=yes | |
15694 | else | |
15695 | echo "configure: failed program was" >&5 | |
15696 | cat conftest.s >&5 | |
15697 | fi | |
15698 | rm -f conftest.o conftest.s | |
15699 | fi | |
ad9c4d9f | 15700 | fi |
ba479fd2 NN |
15701 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
15702 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
15703 | |
15704 | ||
15705 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
15706 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
15707 | |
15708 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 15709 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 15710 | _ACEOF |
9d147085 | 15711 | |
8ada417f | 15712 | fi |
ad9c4d9f | 15713 | |
ba479fd2 NN |
15714 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
15715 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
15716 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then | |
15717 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15718 | else |
15719 | gcc_cv_as_gdwarf2_flag=no | |
15720 | if test $in_tree_gas = yes; then | |
15721 | if test $in_tree_gas_is_elf = yes \ | |
15722 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15723 | then gcc_cv_as_gdwarf2_flag=yes | |
15724 | fi | |
15725 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15726 | echo "$insn" > conftest.s |
ba479fd2 NN |
15727 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
15728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15729 | (eval $ac_try) 2>&5 | |
15730 | ac_status=$? | |
15731 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15732 | (exit $ac_status); }; } | |
8ada417f ZW |
15733 | then |
15734 | gcc_cv_as_gdwarf2_flag=yes | |
15735 | else | |
15736 | echo "configure: failed program was" >&5 | |
15737 | cat conftest.s >&5 | |
15738 | fi | |
15739 | rm -f conftest.o conftest.s | |
15740 | fi | |
ad9c4d9f | 15741 | fi |
ba479fd2 NN |
15742 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
15743 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 15744 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
15745 | |
15746 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15747 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 15748 | _ACEOF |
5f0e9ea2 GK |
15749 | |
15750 | fi | |
ad9c4d9f | 15751 | |
ba479fd2 NN |
15752 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
15753 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
15754 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then | |
15755 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15756 | else |
15757 | gcc_cv_as_gstabs_flag=no | |
15758 | if test $in_tree_gas = yes; then | |
15759 | if test $in_tree_gas_is_elf = yes \ | |
15760 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15761 | then gcc_cv_as_gstabs_flag=yes | |
15762 | fi | |
15763 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15764 | echo "$insn" > conftest.s |
ba479fd2 NN |
15765 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
15766 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15767 | (eval $ac_try) 2>&5 | |
15768 | ac_status=$? | |
15769 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15770 | (exit $ac_status); }; } | |
8ada417f ZW |
15771 | then |
15772 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
15773 | # and warns about it, but still exits successfully. So check for | |
15774 | # this. | |
ba479fd2 NN |
15775 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
15776 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15777 | (eval $ac_try) 2>&5 | |
15778 | ac_status=$? | |
15779 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15780 | (exit $ac_status); }; } | |
8ada417f ZW |
15781 | then : |
15782 | else gcc_cv_as_gstabs_flag=yes | |
15783 | fi | |
15784 | else | |
15785 | echo "configure: failed program was" >&5 | |
15786 | cat conftest.s >&5 | |
15787 | fi | |
15788 | rm -f conftest.o conftest.s | |
15789 | fi | |
ad9c4d9f | 15790 | fi |
ba479fd2 NN |
15791 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
15792 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 15793 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
15794 | |
15795 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 15796 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 15797 | _ACEOF |
5f0e9ea2 GK |
15798 | |
15799 | fi | |
8ada417f | 15800 | fi |
5f0e9ea2 | 15801 | |
ba479fd2 NN |
15802 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
15803 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 15804 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 15805 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15806 | 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 \ |
15807 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
15808 | gcc_cv_ld_ro_rw_mix=read-write |
15809 | fi | |
15810 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
15811 | echo '.section myfoosect, "a"' > conftest1.s |
15812 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 15813 | echo '.byte 1' >> conftest2.s |
90e145da | 15814 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 15815 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
15816 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
15817 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
15818 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 15819 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 15820 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 15821 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 15822 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
15823 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
15824 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
15825 | gcc_cv_ld_ro_rw_mix=read-only | |
15826 | else | |
15827 | gcc_cv_ld_ro_rw_mix=read-write | |
15828 | fi | |
15829 | fi | |
15830 | fi | |
15831 | rm -f conftest.* conftest[123].* | |
15832 | fi | |
15833 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
15834 | |
15835 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 15836 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 15837 | _ACEOF |
96d0f4dc JJ |
15838 | |
15839 | fi | |
ba479fd2 NN |
15840 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
15841 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 15842 | |
ba479fd2 NN |
15843 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
15844 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 15845 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 15846 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
15847 | 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 \ |
15848 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
15849 | gcc_cv_ld_eh_frame_hdr=yes |
15850 | fi | |
15851 | elif test x$gcc_cv_ld != x; then | |
15852 | # Check if linker supports --eh-frame-hdr option | |
15853 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
15854 | gcc_cv_ld_eh_frame_hdr=yes | |
15855 | fi | |
15856 | fi | |
232b67d9 | 15857 | |
275b60d6 | 15858 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
15859 | |
15860 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 15861 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 15862 | _ACEOF |
275b60d6 JJ |
15863 | |
15864 | fi | |
ba479fd2 NN |
15865 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
15866 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 15867 | |
ba479fd2 NN |
15868 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
15869 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
15870 | gcc_cv_ld_pie=no |
15871 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
15872 | 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 \ |
15873 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
15874 | gcc_cv_ld_pie=yes |
15875 | fi | |
15876 | elif test x$gcc_cv_ld != x; then | |
15877 | # Check if linker supports -pie option | |
15878 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
15879 | gcc_cv_ld_pie=yes | |
15880 | fi | |
15881 | fi | |
15882 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
15883 | |
15884 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 15885 | #define HAVE_LD_PIE 1 |
ba479fd2 | 15886 | _ACEOF |
24a4dd31 JJ |
15887 | |
15888 | fi | |
ba479fd2 NN |
15889 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
15890 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 15891 | |
22ba88ef EB |
15892 | echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5 |
15893 | echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6 | |
15894 | gcc_cv_ld_eh_gc_sections=no | |
15895 | if test $in_tree_ld = yes ; then | |
15896 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 17 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
15897 | && test $in_tree_ld_is_elf = yes; then | |
15898 | gcc_cv_ld_eh_gc_sections=yes | |
15899 | fi | |
15900 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
15901 | cat > conftest.s <<EOF | |
15902 | .section .text | |
15903 | .globl _start | |
15904 | .type _start, @function | |
15905 | _start: | |
15906 | .long foo | |
15907 | .size _start, .-_start | |
15908 | .section .text.foo,"ax",@progbits | |
15909 | .type foo, @function | |
15910 | foo: | |
15911 | .long 0 | |
15912 | .size foo, .-foo | |
15913 | .section .gcc_except_table.foo,"a",@progbits | |
15914 | .L0: | |
15915 | .long 0 | |
15916 | .section .eh_frame,"a",@progbits | |
15917 | .long .L0 | |
15918 | EOF | |
15919 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
15920 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
15921 | | grep "gc-sections option ignored" > /dev/null; then | |
15922 | gcc_cv_ld_eh_gc_sections=no | |
15923 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
15924 | gcc_cv_ld_eh_gc_sections=yes | |
15925 | fi | |
15926 | fi | |
15927 | rm -f conftest.s conftest.o conftest | |
15928 | fi | |
15929 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then | |
15930 | ||
15931 | cat >>confdefs.h <<\_ACEOF | |
15932 | #define HAVE_LD_EH_GC_SECTIONS 1 | |
15933 | _ACEOF | |
15934 | ||
15935 | fi | |
15936 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5 | |
15937 | echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6 | |
15938 | ||
8bb915b6 NN |
15939 | # -------- |
15940 | # UNSORTED | |
15941 | # -------- | |
15942 | ||
765f1bf9 AM |
15943 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
15944 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
15945 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
15946 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15947 | else | |
15948 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
15949 | if test $in_tree_ld = yes ; then |
15950 | 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 \ | |
15951 | && test $in_tree_ld_is_elf = yes; then | |
15952 | gcc_cv_ld_as_needed=yes | |
15953 | fi | |
15954 | elif test x$gcc_cv_ld != x; then | |
15955 | # Check if linker supports --as-needed and --no-as-needed options | |
15956 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
15957 | gcc_cv_ld_as_needed=yes | |
15958 | fi | |
15959 | fi | |
82e923f6 RS |
15960 | |
15961 | fi | |
15962 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 | |
15963 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
15964 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
15965 | ||
15966 | cat >>confdefs.h <<\_ACEOF | |
15967 | #define HAVE_LD_AS_NEEDED 1 | |
15968 | _ACEOF | |
15969 | ||
15970 | fi | |
765f1bf9 | 15971 | |
d82bf747 AM |
15972 | case "$target:$tm_file" in |
15973 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
85b776df AM |
15974 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
15975 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
15976 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then | |
15977 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15978 | else | |
15979 | gcc_cv_ld_no_dot_syms=no | |
15980 | if test $in_tree_ld = yes ; then | |
15981 | 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 | |
15982 | gcc_cv_ld_no_dot_syms=yes | |
15983 | fi | |
15984 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
15985 | cat > conftest1.s <<EOF | |
15986 | .text | |
15987 | bl .foo | |
15988 | EOF | |
15989 | cat > conftest2.s <<EOF | |
15990 | .section ".opd","aw" | |
15991 | .align 3 | |
15992 | .globl foo | |
15993 | .type foo,@function | |
15994 | foo: | |
15995 | .quad .LEfoo,.TOC.@tocbase,0 | |
15996 | .text | |
15997 | .LEfoo: | |
15998 | blr | |
15999 | .size foo,.-.LEfoo | |
16000 | EOF | |
16001 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
16002 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16003 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
16004 | gcc_cv_ld_no_dot_syms=yes | |
16005 | fi | |
16006 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
16007 | fi | |
16008 | ||
16009 | fi | |
16010 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 | |
16011 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
16012 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then | |
16013 | ||
16014 | cat >>confdefs.h <<\_ACEOF | |
16015 | #define HAVE_LD_NO_DOT_SYMS 1 | |
16016 | _ACEOF | |
16017 | ||
16018 | fi | |
16019 | ;; | |
16020 | esac | |
16021 | ||
380e5ca4 MM |
16022 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
16023 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
16024 | if test "${gcc_cv_ld_sysroot+set}" = set; then | |
16025 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16026 | else | |
16027 | gcc_cv_ld_sysroot=no | |
16028 | if test $in_tree_ld = yes ; then | |
16029 | 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 | 16030 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
16031 | fi |
16032 | elif test x$gcc_cv_ld != x; then | |
16033 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
16034 | gcc_cv_ld_sysroot=yes | |
16035 | fi | |
16036 | fi | |
16037 | fi | |
16038 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 | |
16039 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
16040 | if test x"$gcc_cv_ld_sysroot" = xyes; then | |
16041 | ||
16042 | cat >>confdefs.h <<\_ACEOF | |
16043 | #define HAVE_LD_SYSROOT 1 | |
16044 | _ACEOF | |
16045 | ||
16046 | fi | |
16047 | ||
9fb28a67 | 16048 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 16049 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
ba479fd2 NN |
16050 | |
16051 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 16052 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 16053 | _ACEOF |
793e9558 PB |
16054 | |
16055 | fi | |
16056 | ||
77008252 JJ |
16057 | # Test for stack protector support in target C library. |
16058 | case "$target" in | |
16059 | *-*-linux*) | |
16060 | echo "$as_me:$LINENO: checking __stack_chk_fail in target GNU C library" >&5 | |
16061 | echo $ECHO_N "checking __stack_chk_fail in target GNU C library... $ECHO_C" >&6 | |
16062 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then | |
16063 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16064 | else | |
16065 | gcc_cv_libc_provides_ssp=no | |
16066 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
16067 | if test "x$with_sysroot" = x; then | |
16068 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
16069 | elif test "x$with_sysroot" = xyes; then | |
16070 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16071 | else | |
16072 | glibc_header_dir="${with_sysroot}/usr/include" | |
16073 | fi | |
16074 | else | |
16075 | glibc_header_dir=/usr/include | |
16076 | fi | |
16077 | # glibc 2.4 and later provides __stack_chk_fail and | |
16078 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
16079 | if test -f $glibc_header_dir/features.h \ | |
16080 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
16081 | $glibc_header_dir/features.h > /dev/null; then | |
16082 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
16083 | $glibc_header_dir/features.h > /dev/null; then | |
16084 | gcc_cv_libc_provides_ssp=yes | |
16085 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
16086 | $glibc_header_dir/features.h > /dev/null \ | |
16087 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
16088 | $glibc_header_dir/features.h > /dev/null; then | |
16089 | gcc_cv_libc_provides_ssp=yes | |
16090 | fi | |
16091 | fi | |
16092 | fi | |
16093 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 | |
16094 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 ;; | |
16095 | *) gcc_cv_libc_provides_ssp=no ;; | |
16096 | esac | |
16097 | if test x$gcc_cv_libc_provides_ssp = xyes; then | |
16098 | ||
16099 | cat >>confdefs.h <<\_ACEOF | |
16100 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
16101 | _ACEOF | |
16102 | ||
16103 | fi | |
16104 | ||
ed965309 JJ |
16105 | # Check if TFmode long double should be used by default or not. |
16106 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
16107 | # and later they can use TFmode. | |
16108 | case "$target" in | |
16109 | powerpc*-*-*gnu* | \ | |
16110 | sparc*-*-linux* | \ | |
16111 | s390*-*-linux* | \ | |
16112 | alpha*-*-linux*) | |
16113 | ||
16114 | # Check whether --with-long-double-128 or --without-long-double-128 was given. | |
16115 | if test "${with_long_double_128+set}" = set; then | |
16116 | withval="$with_long_double_128" | |
16117 | gcc_cv_target_ldbl128="$with_long_double_128" | |
16118 | else | |
16119 | gcc_cv_target_ldbl128=no | |
16120 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
16121 | if test "x$with_sysroot" = x; then | |
16122 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
16123 | elif test "x$with_sysroot" = xyes; then | |
16124 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16125 | else | |
16126 | glibc_header_dir="${with_sysroot}/usr/include" | |
16127 | fi | |
16128 | else | |
16129 | glibc_header_dir=/usr/include | |
16130 | fi | |
16131 | grep '^ *#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ | |
16132 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ | |
16133 | && gcc_cv_target_ldbl128=yes | |
16134 | fi; | |
16135 | ;; | |
16136 | esac | |
16137 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
16138 | ||
16139 | cat >>confdefs.h <<\_ACEOF | |
16140 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
16141 | _ACEOF | |
16142 | ||
16143 | fi | |
16144 | ||
81bf3d9e | 16145 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 16146 | |
81bf3d9e RH |
16147 | # Check whether --with-gc or --without-gc was given. |
16148 | if test "${with_gc+set}" = set; then | |
16149 | withval="$with_gc" | |
16150 | case "$withval" in | |
08cee789 | 16151 | page) |
81bf3d9e | 16152 | GGC=ggc-$withval |
08cee789 DJ |
16153 | ;; |
16154 | zone) | |
16155 | GGC=ggc-$withval | |
16156 | ||
16157 | cat >>confdefs.h <<\_ACEOF | |
16158 | #define GGC_ZONE 1 | |
16159 | _ACEOF | |
16160 | ||
81bf3d9e RH |
16161 | ;; |
16162 | *) | |
ba479fd2 NN |
16163 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
16164 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
16165 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
16166 | ;; |
16167 | esac | |
16168 | else | |
005537df | 16169 | GGC=ggc-page |
ba479fd2 | 16170 | fi; |
81bf3d9e RH |
16171 | |
16172 | echo "Using $GGC for garbage collection." | |
16173 | ||
3c809ba4 | 16174 | # Use the system's zlib library. |
b8dad04b ZW |
16175 | zlibdir=-L../zlib |
16176 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 16177 | |
3c809ba4 AG |
16178 | # Check whether --with-system-zlib or --without-system-zlib was given. |
16179 | if test "${with_system_zlib+set}" = set; then | |
16180 | withval="$with_system_zlib" | |
16181 | zlibdir= | |
16182 | zlibinc= | |
16183 | ||
ba479fd2 | 16184 | fi; |
3c809ba4 AG |
16185 | |
16186 | ||
16187 | ||
dc6746e7 | 16188 | |
ba479fd2 NN |
16189 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
16190 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
dc6746e7 PT |
16191 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
16192 | if test "${enable_maintainer_mode+set}" = set; then | |
16193 | enableval="$enable_maintainer_mode" | |
16194 | maintainer_mode=$enableval | |
16195 | else | |
16196 | maintainer_mode=no | |
ba479fd2 | 16197 | fi; |
63cf211a | 16198 | |
ba479fd2 NN |
16199 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
16200 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
16201 | |
16202 | if test "$maintainer_mode" = "yes"; then | |
16203 | MAINT='' | |
16204 | else | |
16205 | MAINT='#' | |
16206 | fi | |
16207 | ||
8bb915b6 NN |
16208 | # -------------- |
16209 | # Language hooks | |
16210 | # -------------- | |
16211 | ||
861bb6c1 JL |
16212 | # Make empty files to contain the specs and options for each language. |
16213 | # Then add #include lines to for a compiler that has specs and/or options. | |
16214 | ||
cc11cc9b | 16215 | subdirs= |
d7b42618 | 16216 | lang_opt_files= |
861bb6c1 | 16217 | lang_specs_files= |
3103b7db | 16218 | lang_tree_files= |
861bb6c1 JL |
16219 | # These (without "all_") are set in each config-lang.in. |
16220 | # `language' must be a single word so is spelled singularly. | |
16221 | all_languages= | |
16222 | all_boot_languages= | |
16223 | all_compilers= | |
16224 | all_stagestuff= | |
53c7ffe7 | 16225 | all_outputs='Makefile gccbug mklibgcc libada-mk' |
861bb6c1 | 16226 | # List of language makefile fragments. |
2ed26f6b ZW |
16227 | all_lang_makefrags= |
16228 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 16229 | all_lang_makefiles= |
e2500fed | 16230 | # Files for gengtype |
ef69da62 | 16231 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
16232 | # Files for gengtype with language |
16233 | all_gtfiles_files_langs= | |
16234 | all_gtfiles_files_files= | |
861bb6c1 | 16235 | |
cc11cc9b PB |
16236 | # These are the languages that are set in --enable-languages, |
16237 | # and are available in the GCC tree. | |
16238 | all_selected_languages= | |
16239 | ||
861bb6c1 JL |
16240 | # Add the language fragments. |
16241 | # Languages are added via two mechanisms. Some information must be | |
16242 | # recorded in makefile variables, these are defined in config-lang.in. | |
16243 | # We accumulate them and plug them into the main Makefile. | |
16244 | # The other mechanism is a set of hooks for each of the main targets | |
16245 | # like `clean', `install', etc. | |
16246 | ||
861bb6c1 | 16247 | language_hooks="Make-hooks" |
861bb6c1 | 16248 | |
cc11cc9b | 16249 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 16250 | do |
1546bb64 PB |
16251 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
16252 | ||
cc11cc9b PB |
16253 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
16254 | if test "x$lang_alias" = x | |
16255 | then | |
16256 | echo "$lang doesn't set \$language." 1>&2 | |
16257 | exit 1 | |
16258 | fi | |
16259 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
16260 | subdirs="$subdirs $subdir" | |
16261 | case ",$enable_languages," in | |
16262 | *,$lang_alias,*) | |
16263 | all_selected_languages="$all_selected_languages $lang_alias" | |
16264 | if test -f $srcdir/$subdir/lang-specs.h; then | |
16265 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
16266 | fi | |
16267 | ;; | |
16268 | esac | |
16269 | ||
cc11cc9b PB |
16270 | language= |
16271 | boot_language= | |
16272 | compilers= | |
16273 | stagestuff= | |
16274 | outputs= | |
16275 | gtfiles= | |
1546bb64 | 16276 | subdir_requires= |
cc11cc9b PB |
16277 | . ${srcdir}/$subdir/config-lang.in |
16278 | if test "x$language" = x | |
16279 | then | |
16280 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
16281 | exit 1 | |
16282 | fi | |
1546bb64 PB |
16283 | |
16284 | ok=: | |
16285 | case ",$enable_languages," in | |
16286 | *,$lang_alias,*) ;; | |
16287 | *) | |
16288 | for i in $subdir_requires; do | |
b6348cb3 | 16289 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
16290 | ok=false |
16291 | break | |
16292 | done | |
16293 | ;; | |
16294 | esac | |
16295 | $ok || continue | |
16296 | ||
cc11cc9b | 16297 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" |
1546bb64 PB |
16298 | if test -f $srcdir/$subdir/lang.opt; then |
16299 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
16300 | fi | |
16301 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
16302 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
16303 | fi | |
cc11cc9b PB |
16304 | if test -f ${srcdir}/$subdir/Makefile.in |
16305 | then all_lang_makefiles="$subdir/Makefile" | |
16306 | fi | |
16307 | all_languages="$all_languages $language" | |
16308 | if test "x$boot_language" = xyes | |
16309 | then | |
16310 | all_boot_languages="$all_boot_languages $language" | |
16311 | fi | |
16312 | all_compilers="$all_compilers $compilers" | |
16313 | all_stagestuff="$all_stagestuff $stagestuff" | |
16314 | all_outputs="$all_outputs $outputs" | |
16315 | all_gtfiles="$all_gtfiles $gtfiles" | |
1546bb64 PB |
16316 | for f in $gtfiles |
16317 | do | |
16318 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " | |
16319 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
16320 | done | |
861bb6c1 JL |
16321 | done |
16322 | ||
8ac9d31f TJ |
16323 | # Pick up gtfiles for c |
16324 | gtfiles= | |
cc11cc9b | 16325 | subdir="c" |
8ac9d31f TJ |
16326 | . ${srcdir}/c-config-lang.in |
16327 | all_gtfiles="$all_gtfiles $gtfiles" | |
c406e779 | 16328 | for f in $gtfiles |
8ac9d31f | 16329 | do |
cc11cc9b | 16330 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${subdir} " |
8ac9d31f | 16331 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " |
8ac9d31f TJ |
16332 | done |
16333 | ||
cbc59f01 | 16334 | check_languages= |
cc11cc9b | 16335 | for language in $all_selected_languages |
cbc59f01 | 16336 | do |
cc11cc9b | 16337 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
16338 | done |
16339 | ||
62b81e45 | 16340 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 16341 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
16342 | |
16343 | rm -f Make-hooks | |
16344 | touch Make-hooks | |
bd97af06 | 16345 | target_list="all.cross start.encap rest.encap tags \ |
b5422ad7 | 16346 | install-common install-man install-info dvi pdf html \ |
a541f69d | 16347 | uninstall info man srcextra srcman srcinfo \ |
a03ad584 | 16348 | mostlyclean clean distclean maintainer-clean \ |
8f231b5d | 16349 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
cc11cc9b | 16350 | |
861bb6c1 JL |
16351 | for t in $target_list |
16352 | do | |
16353 | x= | |
cc11cc9b | 16354 | for lang in $all_selected_languages |
861bb6c1 | 16355 | do |
cc11cc9b | 16356 | x="$x $lang.$t" |
861bb6c1 JL |
16357 | done |
16358 | echo "lang.$t: $x" >> Make-hooks | |
16359 | done | |
16360 | ||
8bb915b6 NN |
16361 | # -------- |
16362 | # UNSORTED | |
16363 | # -------- | |
16364 | ||
cc06d68c | 16365 | # Create .gdbinit. |
861bb6c1 | 16366 | |
cc06d68c GP |
16367 | echo "dir ." > .gdbinit |
16368 | echo "dir ${srcdir}" >> .gdbinit | |
16369 | if test x$gdb_needs_out_file_path = xyes | |
16370 | then | |
16371 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
16372 | fi | |
16373 | if test "x$subdirs" != x; then | |
16374 | for s in $subdirs | |
16375 | do | |
16376 | echo "dir ${srcdir}/$s" >> .gdbinit | |
16377 | done | |
861bb6c1 | 16378 | fi |
cc06d68c | 16379 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 16380 | |
8f8d3278 NC |
16381 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
16382 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
16383 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
16384 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
16385 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
16386 | # make and thus we'd get different behavior depending on where we built the | |
16387 | # sources. | |
5949a9fc | 16388 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
caa55b1e | 16389 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)' |
d062c304 | 16390 | else |
8f8d3278 NC |
16391 | # An explanation of the sed strings: |
16392 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
16393 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
16394 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 16395 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
16396 | # |
16397 | # (*) Note this pattern overwrites the first character of the string | |
16398 | # with a forward slash if one is not already present. This is not a | |
16399 | # problem because the exact names of the sub-directories concerned is | |
16400 | # unimportant, just the number of them matters. | |
16401 | # | |
16402 | # The practical upshot of these patterns is like this: | |
16403 | # | |
16404 | # prefix exec_prefix result | |
16405 | # ------ ----------- ------ | |
16406 | # /foo /foo/bar ../ | |
16407 | # /foo/ /foo/bar ../ | |
16408 | # /foo /foo/bar/ ../ | |
16409 | # /foo/ /foo/bar/ ../ | |
16410 | # /foo /foo/bar/ugg ../../ | |
16411 | # | |
4c112cda | 16412 | dollar='$$' |
caa55b1e | 16413 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" |
d062c304 JL |
16414 | fi |
16415 | ||
16416 | ||
2ce3c6c6 | 16417 | |
2bbea3a6 RH |
16418 | # Find a directory in which to install a shared libgcc. |
16419 | ||
16420 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
16421 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
16422 | enableval="$enable_version_specific_runtime_libs" | |
ba479fd2 NN |
16423 | |
16424 | fi; | |
2bbea3a6 RH |
16425 | |
16426 | ||
5b15f277 RH |
16427 | # Check whether --with-slibdir or --without-slibdir was given. |
16428 | if test "${with_slibdir+set}" = set; then | |
16429 | withval="$with_slibdir" | |
16430 | slibdir="$with_slibdir" | |
16431 | else | |
16432 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 16433 | slibdir='$(libsubdir)' |
5b15f277 | 16434 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
16435 | slibdir='$(build_tooldir)/lib' |
16436 | else | |
5b15f277 | 16437 | slibdir='$(libdir)' |
2bbea3a6 | 16438 | fi |
ba479fd2 | 16439 | fi; |
2bbea3a6 RH |
16440 | |
16441 | ||
1e6347d8 | 16442 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
16443 | |
16444 | ||
22482f74 MS |
16445 | |
16446 | # Check whether --with-datarootdir or --without-datarootdir was given. | |
16447 | if test "${with_datarootdir+set}" = set; then | |
16448 | withval="$with_datarootdir" | |
16449 | datarootdir="\${prefix}/$with_datarootdir" | |
16450 | else | |
16451 | datarootdir='$(prefix)/share' | |
16452 | fi; | |
16453 | ||
16454 | ||
16455 | ||
16456 | # Check whether --with-docdir or --without-docdir was given. | |
16457 | if test "${with_docdir+set}" = set; then | |
16458 | withval="$with_docdir" | |
16459 | docdir="\${prefix}/$with_docdir" | |
16460 | else | |
16461 | docdir='$(datarootdir)' | |
16462 | fi; | |
16463 | ||
16464 | ||
16465 | ||
16466 | # Check whether --with-htmldir or --without-htmldir was given. | |
16467 | if test "${with_htmldir+set}" = set; then | |
16468 | withval="$with_htmldir" | |
16469 | htmldir="\${prefix}/$with_htmldir" | |
16470 | else | |
16471 | htmldir='$(docdir)' | |
16472 | fi; | |
16473 | ||
16474 | ||
861bb6c1 JL |
16475 | # Substitute configuration variables |
16476 | ||
16477 | ||
16478 | ||
16479 | ||
16480 | ||
16481 | ||
16482 | ||
16483 | ||
16484 | ||
16485 | ||
16486 | ||
16487 | ||
16488 | ||
16489 | ||
16490 | ||
16491 | ||
16492 | ||
16493 | ||
16494 | ||
16495 | ||
16496 | ||
16497 | ||
16498 | ||
16499 | ||
16500 | ||
16501 | ||
16502 | ||
16503 | ||
16504 | ||
16505 | ||
16506 | ||
16507 | ||
16508 | ||
16509 | ||
16510 | ||
16511 | ||
16512 | ||
16513 | ||
16514 | ||
16515 | ||
16516 | ||
16517 | ||
16518 | ||
16519 | ||
16520 | ||
16521 | ||
9b16d2c4 | 16522 | |
e9a25f70 | 16523 | |
6e26218f | 16524 | |
c8724862 | 16525 | |
e061d1ce | 16526 | |
d8bb17c8 | 16527 | |
11642c3a ZW |
16528 | |
16529 | ||
16530 | ||
16531 | ||
16532 | ||
16533 | ||
16534 | ||
3d9d2476 | 16535 | |
e2500fed | 16536 | |
51b9ff45 | 16537 | |
861bb6c1 | 16538 | |
6e3f3080 NN |
16539 | # Echo link setup. |
16540 | if test x${build} = x${host} ; then | |
16541 | if test x${host} = x${target} ; then | |
16542 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
16543 | else | |
16544 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
16545 | echo " from ${host} to ${target}." 1>&2 | |
16546 | fi | |
16547 | else | |
16548 | if test x${host} = x${target} ; then | |
16549 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
16550 | echo " for ${target}." 1>&2 | |
16551 | else | |
16552 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
16553 | echo " from ${host} to ${target}." 1>&2 | |
16554 | fi | |
16555 | fi | |
16556 | ||
6de9cd9a DN |
16557 | |
16558 | ||
16559 | ||
6e3f3080 NN |
16560 | # Configure the subdirectories |
16561 | # AC_CONFIG_SUBDIRS($subdirs) | |
16562 | ||
16563 | # Create the Makefile | |
16564 | # and configure language subdirectories | |
ba479fd2 | 16565 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
16566 | |
16567 | ||
ba479fd2 | 16568 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 16569 | |
ba479fd2 | 16570 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
16571 | # This file is a shell script that caches the results of configure |
16572 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
16573 | # scripts and configure runs, see configure's option --config-cache. |
16574 | # It is not useful on other systems. If it contains results you don't | |
16575 | # want to keep, you may remove or edit it. | |
6e3f3080 | 16576 | # |
ba479fd2 NN |
16577 | # config.status only pays attention to the cache file if you give it |
16578 | # the --recheck option to rerun configure. | |
6e3f3080 | 16579 | # |
ba479fd2 NN |
16580 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
16581 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
16582 | # following values. | |
16583 | ||
16584 | _ACEOF | |
16585 | ||
6e3f3080 NN |
16586 | # The following way of writing the cache mishandles newlines in values, |
16587 | # but we know of no workaround that is simple, portable, and efficient. | |
16588 | # So, don't put newlines in cache variables' values. | |
16589 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
16590 | # and sets the high bit in the cache file unless we assign to the vars. | |
ba479fd2 NN |
16591 | { |
16592 | (set) 2>&1 | | |
16593 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
16594 | *ac_space=\ *) | |
16595 | # `set' does not quote correctly, so add quotes (double-quote | |
16596 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
16597 | sed -n \ | |
86da66b5 HPN |
16598 | "s/'/'\\\\''/g; |
16599 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
ba479fd2 NN |
16600 | ;; |
16601 | *) | |
16602 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
16603 | sed -n \ | |
86da66b5 | 16604 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" |
ba479fd2 NN |
16605 | ;; |
16606 | esac; | |
16607 | } | | |
16608 | sed ' | |
16609 | t clear | |
16610 | : clear | |
16611 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
16612 | t end | |
16613 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
16614 | : end' >>confcache | |
16615 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6e3f3080 | 16616 | if test -w $cache_file; then |
ba479fd2 NN |
16617 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" |
16618 | cat confcache >$cache_file | |
6e3f3080 NN |
16619 | else |
16620 | echo "not updating unwritable cache $cache_file" | |
16621 | fi | |
16622 | fi | |
16623 | rm -f confcache | |
16624 | ||
16625 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
16626 | # Let make expand exec_prefix. | |
16627 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
16628 | ||
ba479fd2 NN |
16629 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
16630 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
16631 | # trailing colons and then remove the whole line if VPATH becomes empty | |
16632 | # (actually we leave an empty line to preserve line numbers). | |
6e3f3080 | 16633 | if test "x$srcdir" = x.; then |
86da66b5 | 16634 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ |
ba479fd2 NN |
16635 | s/:*\$(srcdir):*/:/; |
16636 | s/:*\${srcdir}:*/:/; | |
16637 | s/:*@srcdir@:*/:/; | |
86da66b5 | 16638 | s/^\([^=]*=[ ]*\):*/\1/; |
ba479fd2 | 16639 | s/:*$//; |
86da66b5 | 16640 | s/^[^=]*=[ ]*$//; |
ba479fd2 | 16641 | }' |
6e3f3080 NN |
16642 | fi |
16643 | ||
63cf211a | 16644 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 16645 | |
ba479fd2 NN |
16646 | ac_libobjs= |
16647 | ac_ltlibobjs= | |
16648 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
16649 | # 1. Remove the extension, and $U if already installed. | |
16650 | ac_i=`echo "$ac_i" | | |
86da66b5 | 16651 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` |
ba479fd2 NN |
16652 | # 2. Add them. |
16653 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
16654 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
16655 | done | |
16656 | LIBOBJS=$ac_libobjs | |
63cf211a | 16657 | |
ba479fd2 NN |
16658 | LTLIBOBJS=$ac_ltlibobjs |
16659 | ||
16660 | ||
16661 | ||
16662 | : ${CONFIG_STATUS=./config.status} | |
16663 | ac_clean_files_save=$ac_clean_files | |
16664 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
16665 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
16666 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
16667 | cat >$CONFIG_STATUS <<_ACEOF | |
16668 | #! $SHELL | |
16669 | # Generated by $as_me. | |
6e3f3080 NN |
16670 | # Run this file to recreate the current configuration. |
16671 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 16672 | # configure, is in config.log if it exists. |
6e3f3080 | 16673 | |
ba479fd2 NN |
16674 | debug=false |
16675 | ac_cs_recheck=false | |
16676 | ac_cs_silent=false | |
16677 | SHELL=\${CONFIG_SHELL-$SHELL} | |
16678 | _ACEOF | |
16679 | ||
16680 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16681 | ## --------------------- ## | |
16682 | ## M4sh Initialization. ## | |
16683 | ## --------------------- ## | |
16684 | ||
16685 | # Be Bourne compatible | |
16686 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
16687 | emulate sh | |
16688 | NULLCMD=: | |
16689 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
16690 | # is contrary to our usage. Disable this feature. | |
16691 | alias -g '${1+"$@"}'='"$@"' | |
16692 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
16693 | set -o posix | |
16694 | fi | |
86da66b5 | 16695 | DUALCASE=1; export DUALCASE # for MKS sh |
ba479fd2 NN |
16696 | |
16697 | # Support unset when possible. | |
86da66b5 | 16698 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
ba479fd2 NN |
16699 | as_unset=unset |
16700 | else | |
16701 | as_unset=false | |
16702 | fi | |
16703 | ||
16704 | ||
16705 | # Work around bugs in pre-3.0 UWIN ksh. | |
16706 | $as_unset ENV MAIL MAILPATH | |
16707 | PS1='$ ' | |
16708 | PS2='> ' | |
16709 | PS4='+ ' | |
16710 | ||
16711 | # NLS nuisances. | |
16712 | for as_var in \ | |
16713 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
16714 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
16715 | LC_TELEPHONE LC_TIME | |
6e3f3080 | 16716 | do |
86da66b5 | 16717 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
ba479fd2 NN |
16718 | eval $as_var=C; export $as_var |
16719 | else | |
16720 | $as_unset $as_var | |
16721 | fi | |
6e3f3080 NN |
16722 | done |
16723 | ||
ba479fd2 NN |
16724 | # Required to use basename. |
16725 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16726 | as_expr=expr | |
16727 | else | |
16728 | as_expr=false | |
16729 | fi | |
6e3f3080 | 16730 | |
ba479fd2 NN |
16731 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
16732 | as_basename=basename | |
16733 | else | |
16734 | as_basename=false | |
16735 | fi | |
6e3f3080 NN |
16736 | |
16737 | ||
ba479fd2 NN |
16738 | # Name of the executable. |
16739 | as_me=`$as_basename "$0" || | |
16740 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
16741 | X"$0" : 'X\(//\)$' \| \ | |
16742 | X"$0" : 'X\(/\)$' \| \ | |
16743 | . : '\(.\)' 2>/dev/null || | |
16744 | echo X/"$0" | | |
16745 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
16746 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
16747 | /^X\/\(\/\).*/{ s//\1/; q; } | |
16748 | s/.*/./; q'` | |
16749 | ||
6e3f3080 | 16750 | |
ba479fd2 NN |
16751 | # PATH needs CR, and LINENO needs CR and PATH. |
16752 | # Avoid depending upon Character Ranges. | |
16753 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
16754 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
16755 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
16756 | as_cr_digits='0123456789' | |
16757 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
16758 | ||
16759 | # The user is always right. | |
16760 | if test "${PATH_SEPARATOR+set}" != set; then | |
16761 | echo "#! /bin/sh" >conf$$.sh | |
16762 | echo "exit 0" >>conf$$.sh | |
16763 | chmod +x conf$$.sh | |
16764 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
16765 | PATH_SEPARATOR=';' | |
6e3f3080 | 16766 | else |
ba479fd2 NN |
16767 | PATH_SEPARATOR=: |
16768 | fi | |
16769 | rm -f conf$$.sh | |
16770 | fi | |
16771 | ||
16772 | ||
16773 | as_lineno_1=$LINENO | |
16774 | as_lineno_2=$LINENO | |
16775 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16776 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16777 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
16778 | # Find who we are. Look in the path if we contain no path at all | |
16779 | # relative or not. | |
16780 | case $0 in | |
16781 | *[\\/]* ) as_myself=$0 ;; | |
16782 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16783 | for as_dir in $PATH | |
16784 | do | |
16785 | IFS=$as_save_IFS | |
16786 | test -z "$as_dir" && as_dir=. | |
16787 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
16788 | done | |
16789 | ||
16790 | ;; | |
16791 | esac | |
16792 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
16793 | # in which case we are not to be found in the path. | |
16794 | if test "x$as_myself" = x; then | |
16795 | as_myself=$0 | |
16796 | fi | |
16797 | if test ! -f "$as_myself"; then | |
16798 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
16799 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
16800 | { (exit 1); exit 1; }; } | |
6e3f3080 | 16801 | fi |
ba479fd2 NN |
16802 | case $CONFIG_SHELL in |
16803 | '') | |
16804 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
16805 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
16806 | do | |
16807 | IFS=$as_save_IFS | |
16808 | test -z "$as_dir" && as_dir=. | |
16809 | for as_base in sh bash ksh sh5; do | |
16810 | case $as_dir in | |
16811 | /*) | |
16812 | if ("$as_dir/$as_base" -c ' | |
16813 | as_lineno_1=$LINENO | |
16814 | as_lineno_2=$LINENO | |
16815 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
16816 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
16817 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
16818 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
16819 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
16820 | CONFIG_SHELL=$as_dir/$as_base | |
16821 | export CONFIG_SHELL | |
16822 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
16823 | fi;; | |
16824 | esac | |
16825 | done | |
16826 | done | |
16827 | ;; | |
16828 | esac | |
16829 | ||
16830 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
16831 | # uniformly replaced by the line number. The first 'sed' inserts a | |
16832 | # line-number line before each line; the second 'sed' does the real | |
16833 | # work. The second script uses 'N' to pair each line-number line | |
16834 | # with the numbered line, and appends trailing '-' during | |
16835 | # substitution so that $LINENO is not a special case at line end. | |
16836 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
16837 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
16838 | sed '=' <$as_myself | | |
16839 | sed ' | |
16840 | N | |
16841 | s,$,-, | |
16842 | : loop | |
16843 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
16844 | t loop | |
16845 | s,-$,, | |
16846 | s,^['$as_cr_digits']*\n,, | |
16847 | ' >$as_me.lineno && | |
16848 | chmod +x $as_me.lineno || | |
16849 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
16850 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
16851 | { (exit 1); exit 1; }; } | |
16852 | ||
16853 | # Don't try to exec as it changes $[0], causing all sort of problems | |
16854 | # (the dirname of $[0] is not the place where we might find the | |
16855 | # original and so on. Autoconf is especially sensible to this). | |
16856 | . ./$as_me.lineno | |
16857 | # Exit status is that of the last command. | |
16858 | exit | |
16859 | } | |
16860 | ||
16861 | ||
16862 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
16863 | *c*,-n*) ECHO_N= ECHO_C=' | |
16864 | ' ECHO_T=' ' ;; | |
16865 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
16866 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
16867 | esac | |
16868 | ||
16869 | if expr a : '\(a\)' >/dev/null 2>&1; then | |
16870 | as_expr=expr | |
16871 | else | |
16872 | as_expr=false | |
16873 | fi | |
16874 | ||
16875 | rm -f conf$$ conf$$.exe conf$$.file | |
16876 | echo >conf$$.file | |
16877 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
16878 | # We could just check for DJGPP; but this test a) works b) is more generic | |
16879 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
16880 | if test -f conf$$.exe; then | |
16881 | # Don't use ln at all; we don't have any links | |
16882 | as_ln_s='cp -p' | |
6e3f3080 | 16883 | else |
ba479fd2 | 16884 | as_ln_s='ln -s' |
6e3f3080 | 16885 | fi |
ba479fd2 NN |
16886 | elif ln conf$$.file conf$$ 2>/dev/null; then |
16887 | as_ln_s=ln | |
16888 | else | |
16889 | as_ln_s='cp -p' | |
16890 | fi | |
16891 | rm -f conf$$ conf$$.exe conf$$.file | |
16892 | ||
16893 | if mkdir -p . 2>/dev/null; then | |
16894 | as_mkdir_p=: | |
16895 | else | |
86da66b5 | 16896 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
16897 | as_mkdir_p=false |
16898 | fi | |
16899 | ||
16900 | as_executable_p="test -f" | |
16901 | ||
16902 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 16903 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16904 | |
16905 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 16906 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
16907 | |
16908 | ||
16909 | # IFS | |
16910 | # We need space, tab and new line, in precisely that order. | |
16911 | as_nl=' | |
16912 | ' | |
16913 | IFS=" $as_nl" | |
16914 | ||
16915 | # CDPATH. | |
16916 | $as_unset CDPATH | |
16917 | ||
16918 | exec 6>&1 | |
16919 | ||
16920 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | |
16921 | # report actual input values of CONFIG_FILES etc. instead of their | |
16922 | # values after options handling. Logging --version etc. is OK. | |
16923 | exec 5>>config.log | |
16924 | { | |
16925 | echo | |
16926 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
16927 | ## Running $as_me. ## | |
16928 | _ASBOX | |
16929 | } >&5 | |
16930 | cat >&5 <<_CSEOF | |
16931 | ||
16932 | This file was extended by $as_me, which was | |
8ab705be | 16933 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
16934 | |
16935 | CONFIG_FILES = $CONFIG_FILES | |
16936 | CONFIG_HEADERS = $CONFIG_HEADERS | |
16937 | CONFIG_LINKS = $CONFIG_LINKS | |
16938 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
16939 | $ $0 $@ | |
16940 | ||
16941 | _CSEOF | |
16942 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
16943 | echo >&5 | |
16944 | _ACEOF | |
16945 | ||
16946 | # Files that config.status was made for. | |
16947 | if test -n "$ac_config_files"; then | |
16948 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
16949 | fi | |
16950 | ||
16951 | if test -n "$ac_config_headers"; then | |
16952 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
16953 | fi | |
16954 | ||
16955 | if test -n "$ac_config_links"; then | |
16956 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
16957 | fi | |
16958 | ||
16959 | if test -n "$ac_config_commands"; then | |
16960 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
16961 | fi | |
16962 | ||
16963 | cat >>$CONFIG_STATUS <<\_ACEOF | |
16964 | ||
16965 | ac_cs_usage="\ | |
16966 | \`$as_me' instantiates files from templates according to the | |
16967 | current configuration. | |
16968 | ||
16969 | Usage: $0 [OPTIONS] [FILE]... | |
16970 | ||
16971 | -h, --help print this help, then exit | |
16972 | -V, --version print version number, then exit | |
16973 | -q, --quiet do not print progress messages | |
16974 | -d, --debug don't remove temporary files | |
16975 | --recheck update $as_me by reconfiguring in the same conditions | |
16976 | --file=FILE[:TEMPLATE] | |
86da66b5 | 16977 | instantiate the configuration file FILE |
ba479fd2 | 16978 | --header=FILE[:TEMPLATE] |
86da66b5 | 16979 | instantiate the configuration header FILE |
ba479fd2 NN |
16980 | |
16981 | Configuration files: | |
16982 | $config_files | |
16983 | ||
16984 | Configuration headers: | |
16985 | $config_headers | |
16986 | ||
16987 | Configuration commands: | |
16988 | $config_commands | |
16989 | ||
16990 | Report bugs to <bug-autoconf@gnu.org>." | |
16991 | _ACEOF | |
16992 | ||
16993 | cat >>$CONFIG_STATUS <<_ACEOF | |
16994 | ac_cs_version="\\ | |
16995 | config.status | |
8ab705be | 16996 | configured by $0, generated by GNU Autoconf 2.59, |
ba479fd2 NN |
16997 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" |
16998 | ||
86da66b5 | 16999 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
17000 | This config.status script is free software; the Free Software Foundation |
17001 | gives unlimited permission to copy, distribute and modify it." | |
17002 | srcdir=$srcdir | |
17003 | _ACEOF | |
17004 | ||
17005 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17006 | # If no file are specified by the user, then we need to provide default | |
17007 | # value. By we need to know if files were specified by the user. | |
17008 | ac_need_defaults=: | |
17009 | while test $# != 0 | |
17010 | do | |
17011 | case $1 in | |
17012 | --*=*) | |
17013 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
17014 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
17015 | ac_shift=: | |
17016 | ;; | |
17017 | -*) | |
17018 | ac_option=$1 | |
17019 | ac_optarg=$2 | |
17020 | ac_shift=shift | |
17021 | ;; | |
17022 | *) # This is not an option, so the user has probably given explicit | |
17023 | # arguments. | |
17024 | ac_option=$1 | |
17025 | ac_need_defaults=false;; | |
17026 | esac | |
17027 | ||
17028 | case $ac_option in | |
17029 | # Handling of the options. | |
17030 | _ACEOF | |
17031 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17032 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
17033 | ac_cs_recheck=: ;; | |
17034 | --version | --vers* | -V ) | |
17035 | echo "$ac_cs_version"; exit 0 ;; | |
17036 | --he | --h) | |
17037 | # Conflict between --help and --header | |
17038 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
17039 | Try \`$0 --help' for more information." >&5 | |
17040 | echo "$as_me: error: ambiguous option: $1 | |
17041 | Try \`$0 --help' for more information." >&2;} | |
17042 | { (exit 1); exit 1; }; };; | |
17043 | --help | --hel | -h ) | |
17044 | echo "$ac_cs_usage"; exit 0 ;; | |
17045 | --debug | --d* | -d ) | |
17046 | debug=: ;; | |
17047 | --file | --fil | --fi | --f ) | |
17048 | $ac_shift | |
17049 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
17050 | ac_need_defaults=false;; | |
17051 | --header | --heade | --head | --hea ) | |
17052 | $ac_shift | |
17053 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
17054 | ac_need_defaults=false;; | |
17055 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
17056 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
17057 | ac_cs_silent=: ;; | |
17058 | ||
17059 | # This is an error. | |
17060 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
17061 | Try \`$0 --help' for more information." >&5 | |
17062 | echo "$as_me: error: unrecognized option: $1 | |
17063 | Try \`$0 --help' for more information." >&2;} | |
17064 | { (exit 1); exit 1; }; } ;; | |
17065 | ||
17066 | *) ac_config_targets="$ac_config_targets $1" ;; | |
17067 | ||
17068 | esac | |
17069 | shift | |
6e3f3080 | 17070 | done |
ba479fd2 NN |
17071 | |
17072 | ac_configure_extra_args= | |
17073 | ||
17074 | if $ac_cs_silent; then | |
17075 | exec 6>/dev/null | |
17076 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
17077 | fi |
17078 | ||
ba479fd2 NN |
17079 | _ACEOF |
17080 | cat >>$CONFIG_STATUS <<_ACEOF | |
17081 | if \$ac_cs_recheck; then | |
17082 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
17083 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
17084 | fi | |
861bb6c1 | 17085 | |
ba479fd2 NN |
17086 | _ACEOF |
17087 | ||
17088 | cat >>$CONFIG_STATUS <<_ACEOF | |
17089 | # | |
17090 | # INIT-COMMANDS section. | |
17091 | # | |
17092 | ||
17093 | subdirs='$subdirs' | |
ba479fd2 NN |
17094 | |
17095 | _ACEOF | |
17096 | ||
17097 | ||
17098 | ||
17099 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17100 | for ac_config_target in $ac_config_targets | |
17101 | do | |
17102 | case "$ac_config_target" in | |
17103 | # Handling of arguments. | |
17104 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
17105 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
17106 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
17107 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
17108 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
17109 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 17110 | esac |
ba479fd2 NN |
17111 | done |
17112 | ||
17113 | # If the user did not use the arguments to specify the items to instantiate, | |
17114 | # then the envvar interface is used. Set only those that are not. | |
17115 | # We use the long form for the default assignment because of an extremely | |
17116 | # bizarre bug on SunOS 4.1.3. | |
17117 | if $ac_need_defaults; then | |
17118 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17119 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17120 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17121 | fi | |
17122 | ||
17123 | # Have a temporary directory for convenience. Make it in the build tree | |
17124 | # simply because there is no reason to put it here, and in addition, | |
17125 | # creating and moving files from /tmp can sometimes cause problems. | |
17126 | # Create a temporary directory, and hook for its removal unless debugging. | |
17127 | $debug || | |
17128 | { | |
17129 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
17130 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
17131 | } | |
861bb6c1 | 17132 | |
ba479fd2 | 17133 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 17134 | |
ba479fd2 NN |
17135 | { |
17136 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
17137 | test -n "$tmp" && test -d "$tmp" | |
17138 | } || | |
17139 | { | |
17140 | tmp=./confstat$$-$RANDOM | |
17141 | (umask 077 && mkdir $tmp) | |
17142 | } || | |
17143 | { | |
17144 | echo "$me: cannot create a temporary directory in ." >&2 | |
17145 | { (exit 1); exit 1; } | |
17146 | } | |
17147 | ||
17148 | _ACEOF | |
17149 | ||
17150 | cat >>$CONFIG_STATUS <<_ACEOF | |
17151 | ||
17152 | # | |
17153 | # CONFIG_FILES section. | |
17154 | # | |
17155 | ||
17156 | # No need to generate the scripts if there are no CONFIG_FILES. | |
17157 | # This happens for instance when ./config.status config.h | |
17158 | if test -n "\$CONFIG_FILES"; then | |
17159 | # Protect against being on the right side of a sed subst in config.status. | |
17160 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
17161 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
17162 | s,@SHELL@,$SHELL,;t t | |
17163 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
17164 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
17165 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
17166 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
17167 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
17168 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
17169 | s,@exec_prefix@,$exec_prefix,;t t | |
17170 | s,@prefix@,$prefix,;t t | |
17171 | s,@program_transform_name@,$program_transform_name,;t t | |
17172 | s,@bindir@,$bindir,;t t | |
17173 | s,@sbindir@,$sbindir,;t t | |
17174 | s,@libexecdir@,$libexecdir,;t t | |
17175 | s,@datadir@,$datadir,;t t | |
17176 | s,@sysconfdir@,$sysconfdir,;t t | |
17177 | s,@sharedstatedir@,$sharedstatedir,;t t | |
17178 | s,@localstatedir@,$localstatedir,;t t | |
17179 | s,@libdir@,$libdir,;t t | |
17180 | s,@includedir@,$includedir,;t t | |
17181 | s,@oldincludedir@,$oldincludedir,;t t | |
17182 | s,@infodir@,$infodir,;t t | |
17183 | s,@mandir@,$mandir,;t t | |
17184 | s,@build_alias@,$build_alias,;t t | |
17185 | s,@host_alias@,$host_alias,;t t | |
17186 | s,@target_alias@,$target_alias,;t t | |
17187 | s,@DEFS@,$DEFS,;t t | |
17188 | s,@ECHO_C@,$ECHO_C,;t t | |
17189 | s,@ECHO_N@,$ECHO_N,;t t | |
17190 | s,@ECHO_T@,$ECHO_T,;t t | |
17191 | s,@LIBS@,$LIBS,;t t | |
17192 | s,@build@,$build,;t t | |
17193 | s,@build_cpu@,$build_cpu,;t t | |
17194 | s,@build_vendor@,$build_vendor,;t t | |
17195 | s,@build_os@,$build_os,;t t | |
17196 | s,@host@,$host,;t t | |
17197 | s,@host_cpu@,$host_cpu,;t t | |
17198 | s,@host_vendor@,$host_vendor,;t t | |
17199 | s,@host_os@,$host_os,;t t | |
17200 | s,@target@,$target,;t t | |
17201 | s,@target_cpu@,$target_cpu,;t t | |
17202 | s,@target_vendor@,$target_vendor,;t t | |
17203 | s,@target_os@,$target_os,;t t | |
18fc9bd4 | 17204 | s,@target_noncanonical@,$target_noncanonical,;t t |
1546bb64 | 17205 | s,@build_libsubdir@,$build_libsubdir,;t t |
18fc9bd4 RG |
17206 | s,@build_subdir@,$build_subdir,;t t |
17207 | s,@host_subdir@,$host_subdir,;t t | |
17208 | s,@target_subdir@,$target_subdir,;t t | |
03787dfd | 17209 | s,@GENINSRC@,$GENINSRC,;t t |
ba479fd2 NN |
17210 | s,@CC@,$CC,;t t |
17211 | s,@CFLAGS@,$CFLAGS,;t t | |
17212 | s,@LDFLAGS@,$LDFLAGS,;t t | |
17213 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
17214 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
17215 | s,@EXEEXT@,$EXEEXT,;t t | |
17216 | s,@OBJEXT@,$OBJEXT,;t t | |
17217 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
17218 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
17219 | s,@CPP@,$CPP,;t t | |
bf3b7cd3 | 17220 | s,@EGREP@,$EGREP,;t t |
ba479fd2 | 17221 | s,@strict1_warn@,$strict1_warn,;t t |
373477bb | 17222 | s,@cxx_compat_warn@,$cxx_compat_warn,;t t |
ba479fd2 NN |
17223 | s,@warn_cflags@,$warn_cflags,;t t |
17224 | s,@WERROR@,$WERROR,;t t | |
17225 | s,@nocommon_flag@,$nocommon_flag,;t t | |
13f05fd0 | 17226 | s,@TREEBROWSER@,$TREEBROWSER,;t t |
ba479fd2 NN |
17227 | s,@valgrind_path@,$valgrind_path,;t t |
17228 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
17229 | s,@valgrind_command@,$valgrind_command,;t t | |
17230 | s,@coverage_flags@,$coverage_flags,;t t | |
17231 | s,@enable_multilib@,$enable_multilib,;t t | |
486aa804 | 17232 | s,@enable_decimal_float@,$enable_decimal_float,;t t |
ba479fd2 NN |
17233 | s,@enable_shared@,$enable_shared,;t t |
17234 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
17235 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
17236 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
17237 | s,@onestep@,$onestep,;t t | |
9288b845 CD |
17238 | s,@datarootdir@,$datarootdir,;t t |
17239 | s,@docdir@,$docdir,;t t | |
17240 | s,@htmldir@,$htmldir,;t t | |
ba479fd2 NN |
17241 | s,@SET_MAKE@,$SET_MAKE,;t t |
17242 | s,@AWK@,$AWK,;t t | |
ba479fd2 | 17243 | s,@LN_S@,$LN_S,;t t |
18fc9bd4 | 17244 | s,@LN@,$LN,;t t |
ba479fd2 NN |
17245 | s,@RANLIB@,$RANLIB,;t t |
17246 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
343a6100 | 17247 | s,@ranlib_flags@,$ranlib_flags,;t t |
ba479fd2 NN |
17248 | s,@INSTALL@,$INSTALL,;t t |
17249 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
17250 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
17251 | s,@make_compare_target@,$make_compare_target,;t t | |
17252 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
17253 | s,@MAKEINFO@,$MAKEINFO,;t t | |
17254 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
17255 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
17256 | s,@FLEX@,$FLEX,;t t | |
17257 | s,@BISON@,$BISON,;t t | |
f6a874ac JW |
17258 | s,@NM@,$NM,;t t |
17259 | s,@AR@,$AR,;t t | |
ba479fd2 NN |
17260 | s,@stage1_cflags@,$stage1_cflags,;t t |
17261 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
17262 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
17263 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
17264 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
17265 | s,@LIBICONV@,$LIBICONV,;t t | |
dfb77e37 | 17266 | s,@LTLIBICONV@,$LTLIBICONV,;t t |
ba479fd2 NN |
17267 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t |
17268 | s,@manext@,$manext,;t t | |
17269 | s,@objext@,$objext,;t t | |
8bb915b6 | 17270 | s,@gthread_flags@,$gthread_flags,;t t |
ba479fd2 | 17271 | s,@extra_modes_file@,$extra_modes_file,;t t |
75685792 | 17272 | s,@extra_opt_files@,$extra_opt_files,;t t |
18fc9bd4 RG |
17273 | s,@USE_NLS@,$USE_NLS,;t t |
17274 | s,@LIBINTL@,$LIBINTL,;t t | |
17275 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
17276 | s,@INCINTL@,$INCINTL,;t t | |
17277 | s,@XGETTEXT@,$XGETTEXT,;t t | |
17278 | s,@GMSGFMT@,$GMSGFMT,;t t | |
17279 | s,@POSUB@,$POSUB,;t t | |
17280 | s,@CATALOGS@,$CATALOGS,;t t | |
17281 | s,@DATADIRNAME@,$DATADIRNAME,;t t | |
17282 | s,@INSTOBJEXT@,$INSTOBJEXT,;t t | |
17283 | s,@GENCAT@,$GENCAT,;t t | |
17284 | s,@CATOBJEXT@,$CATOBJEXT,;t t | |
5395b47b | 17285 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t |
ba479fd2 NN |
17286 | s,@CROSS@,$CROSS,;t t |
17287 | s,@ALL@,$ALL,;t t | |
17288 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
17289 | s,@inhibit_libc@,$inhibit_libc,;t t | |
ba479fd2 NN |
17290 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t |
17291 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
17292 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
17293 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
c38f02df | 17294 | s,@collect2@,$collect2,;t t |
9f18db39 PB |
17295 | s,@gcc_cv_as@,$gcc_cv_as,;t t |
17296 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
17297 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
17298 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
17299 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
17300 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
d739199a | 17301 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t |
ba479fd2 | 17302 | s,@libgcc_visibility@,$libgcc_visibility,;t t |
ba479fd2 NN |
17303 | s,@GGC@,$GGC,;t t |
17304 | s,@zlibdir@,$zlibdir,;t t | |
17305 | s,@zlibinc@,$zlibinc,;t t | |
17306 | s,@MAINT@,$MAINT,;t t | |
17307 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
17308 | s,@dollar@,$dollar,;t t | |
17309 | s,@slibdir@,$slibdir,;t t | |
17310 | s,@objdir@,$objdir,;t t | |
17311 | s,@subdirs@,$subdirs,;t t | |
17312 | s,@srcdir@,$srcdir,;t t | |
ba479fd2 NN |
17313 | s,@all_boot_languages@,$all_boot_languages,;t t |
17314 | s,@all_compilers@,$all_compilers,;t t | |
17315 | s,@all_gtfiles@,$all_gtfiles,;t t | |
17316 | s,@all_gtfiles_files_langs@,$all_gtfiles_files_langs,;t t | |
17317 | s,@all_gtfiles_files_files@,$all_gtfiles_files_files,;t t | |
17318 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
17319 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
17320 | s,@all_languages@,$all_languages,;t t | |
cc11cc9b | 17321 | s,@all_selected_languages@,$all_selected_languages,;t t |
ba479fd2 NN |
17322 | s,@all_stagestuff@,$all_stagestuff,;t t |
17323 | s,@build_exeext@,$build_exeext,;t t | |
17324 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
17325 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
17326 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
17327 | s,@build_xm_defines@,$build_xm_defines,;t t | |
17328 | s,@check_languages@,$check_languages,;t t | |
17329 | s,@cc_set_by_configure@,$cc_set_by_configure,;t t | |
17330 | s,@quoted_cc_set_by_configure@,$quoted_cc_set_by_configure,;t t | |
17331 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
17332 | s,@xmake_file@,$xmake_file,;t t | |
17333 | s,@tmake_file@,$tmake_file,;t t | |
30500d84 | 17334 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t |
ba479fd2 NN |
17335 | s,@extra_headers_list@,$extra_headers_list,;t t |
17336 | s,@extra_objs@,$extra_objs,;t t | |
17337 | s,@extra_parts@,$extra_parts,;t t | |
17338 | s,@extra_passes@,$extra_passes,;t t | |
17339 | s,@extra_programs@,$extra_programs,;t t | |
17340 | s,@float_h_file@,$float_h_file,;t t | |
17341 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
17342 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
ba479fd2 | 17343 | s,@host_exeext@,$host_exeext,;t t |
ba479fd2 NN |
17344 | s,@host_xm_file_list@,$host_xm_file_list,;t t |
17345 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
17346 | s,@host_xm_defines@,$host_xm_defines,;t t | |
17347 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
17348 | s,@install@,$install,;t t | |
17349 | s,@lang_opt_files@,$lang_opt_files,;t t | |
17350 | s,@lang_specs_files@,$lang_specs_files,;t t | |
17351 | s,@lang_tree_files@,$lang_tree_files,;t t | |
17352 | s,@local_prefix@,$local_prefix,;t t | |
17353 | s,@md_file@,$md_file,;t t | |
17354 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
17355 | s,@out_file@,$out_file,;t t | |
17356 | s,@out_object_file@,$out_object_file,;t t | |
17357 | s,@stage_prefix_set_by_configure@,$stage_prefix_set_by_configure,;t t | |
17358 | s,@quoted_stage_prefix_set_by_configure@,$quoted_stage_prefix_set_by_configure,;t t | |
ba479fd2 NN |
17359 | s,@thread_file@,$thread_file,;t t |
17360 | s,@tm_file_list@,$tm_file_list,;t t | |
17361 | s,@tm_include_list@,$tm_include_list,;t t | |
17362 | s,@tm_defines@,$tm_defines,;t t | |
17363 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
17364 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
17365 | s,@xm_file_list@,$xm_file_list,;t t | |
17366 | s,@xm_include_list@,$xm_include_list,;t t | |
17367 | s,@xm_defines@,$xm_defines,;t t | |
ba479fd2 NN |
17368 | s,@c_target_objs@,$c_target_objs,;t t |
17369 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
17370 | s,@target_cpu_default@,$target_cpu_default,;t t | |
6de9cd9a DN |
17371 | s,@GMPLIBS@,$GMPLIBS,;t t |
17372 | s,@GMPINC@,$GMPINC,;t t | |
ba479fd2 NN |
17373 | s,@LIBOBJS@,$LIBOBJS,;t t |
17374 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
17375 | /@language_hooks@/r $language_hooks | |
17376 | s,@language_hooks@,,;t t | |
17377 | CEOF | |
17378 | ||
17379 | _ACEOF | |
17380 | ||
17381 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17382 | # Split the substitutions into bite-sized pieces for seds with | |
17383 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
17384 | ac_max_sed_lines=48 | |
17385 | ac_sed_frag=1 # Number of current file. | |
17386 | ac_beg=1 # First line for current file. | |
17387 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
17388 | ac_more_lines=: | |
17389 | ac_sed_cmds= | |
17390 | while $ac_more_lines; do | |
17391 | if test $ac_beg -gt 1; then | |
17392 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17393 | else | |
17394 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
17395 | fi | |
17396 | if test ! -s $tmp/subs.frag; then | |
17397 | ac_more_lines=false | |
17398 | else | |
17399 | # The purpose of the label and of the branching condition is to | |
17400 | # speed up the sed processing (if there are no `@' at all, there | |
17401 | # is no need to browse any of the substitutions). | |
17402 | # These are the two extra sed commands mentioned above. | |
17403 | (echo ':t | |
17404 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
17405 | if test -z "$ac_sed_cmds"; then | |
86da66b5 | 17406 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 | 17407 | else |
86da66b5 | 17408 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" |
ba479fd2 NN |
17409 | fi |
17410 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
17411 | ac_beg=$ac_end | |
17412 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
17413 | fi | |
17414 | done | |
17415 | if test -z "$ac_sed_cmds"; then | |
17416 | ac_sed_cmds=cat | |
63cf211a | 17417 | fi |
ba479fd2 | 17418 | fi # test -n "$CONFIG_FILES" |
cafe096b | 17419 | |
ba479fd2 NN |
17420 | _ACEOF |
17421 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17422 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
17423 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
17424 | case $ac_file in | |
17425 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17426 | cat >$tmp/stdin |
17427 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17428 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17429 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17430 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17431 | * ) ac_file_in=$ac_file.in ;; |
63cf211a | 17432 | esac |
cafe096b | 17433 | |
ba479fd2 NN |
17434 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
17435 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17436 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17437 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17438 | X"$ac_file" : 'X\(//\)$' \| \ | |
17439 | X"$ac_file" : 'X\(/\)' \| \ | |
17440 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17441 | echo X"$ac_file" | |
17442 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17443 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17444 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17445 | /^X\(\/\).*/{ s//\1/; q; } | |
17446 | s/.*/./; q'` | |
17447 | { if $as_mkdir_p; then | |
17448 | mkdir -p "$ac_dir" | |
17449 | else | |
17450 | as_dir="$ac_dir" | |
17451 | as_dirs= | |
17452 | while test ! -d "$as_dir"; do | |
17453 | as_dirs="$as_dir $as_dirs" | |
17454 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17455 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17456 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17457 | X"$as_dir" : 'X\(//\)$' \| \ | |
17458 | X"$as_dir" : 'X\(/\)' \| \ | |
17459 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17460 | echo X"$as_dir" | |
17461 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17462 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17463 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17464 | /^X\(\/\).*/{ s//\1/; q; } | |
17465 | s/.*/./; q'` | |
17466 | done | |
17467 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17468 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17469 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17470 | { (exit 1); exit 1; }; }; } | |
6e3f3080 | 17471 | |
ba479fd2 NN |
17472 | ac_builddir=. |
17473 | ||
17474 | if test "$ac_dir" != .; then | |
17475 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17476 | # A "../" for each directory in $ac_dir_suffix. | |
17477 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17478 | else | |
17479 | ac_dir_suffix= ac_top_builddir= | |
17480 | fi | |
17481 | ||
17482 | case $srcdir in | |
17483 | .) # No --srcdir option. We are building in place. | |
17484 | ac_srcdir=. | |
17485 | if test -z "$ac_top_builddir"; then | |
17486 | ac_top_srcdir=. | |
17487 | else | |
17488 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17489 | fi ;; | |
17490 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17491 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17492 | ac_top_srcdir=$srcdir ;; | |
17493 | *) # Relative path. | |
17494 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17495 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17496 | esac | |
8ab705be KC |
17497 | |
17498 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17499 | # the directories may not exist. | |
17500 | case `pwd` in | |
17501 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17502 | *) |
8ab705be KC |
17503 | case "$ac_dir" in |
17504 | .) ac_abs_builddir=`pwd`;; | |
17505 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17506 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17507 | esac;; |
17508 | esac | |
8ab705be | 17509 | case $ac_abs_builddir in |
86da66b5 HPN |
17510 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17511 | *) | |
17512 | case ${ac_top_builddir}. in | |
8ab705be | 17513 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17514 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17515 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17516 | esac;; |
17517 | esac | |
8ab705be | 17518 | case $ac_abs_builddir in |
86da66b5 HPN |
17519 | .) ac_abs_srcdir=$ac_srcdir;; |
17520 | *) | |
17521 | case $ac_srcdir in | |
8ab705be | 17522 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17523 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17524 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17525 | esac;; |
17526 | esac | |
8ab705be | 17527 | case $ac_abs_builddir in |
86da66b5 HPN |
17528 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17529 | *) | |
17530 | case $ac_top_srcdir in | |
8ab705be | 17531 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17532 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17533 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17534 | esac;; |
17535 | esac | |
ba479fd2 NN |
17536 | |
17537 | ||
17538 | ||
ec6c7392 PB |
17539 | if test x"$ac_file" != x-; then |
17540 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
17541 | echo "$as_me: creating $ac_file" >&6;} | |
17542 | rm -f "$ac_file" | |
17543 | fi | |
ba479fd2 NN |
17544 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
17545 | # use $as_me), people would be surprised to read: | |
17546 | # /* config.h. Generated by config.status. */ | |
17547 | if test x"$ac_file" = x-; then | |
17548 | configure_input= | |
17549 | else | |
17550 | configure_input="$ac_file. " | |
17551 | fi | |
17552 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
86da66b5 | 17553 | sed 's,.*/,,'` by configure." |
ba479fd2 NN |
17554 | |
17555 | # First look for the input files in the build tree, otherwise in the | |
17556 | # src tree. | |
17557 | ac_file_inputs=`IFS=: | |
17558 | for f in $ac_file_in; do | |
17559 | case $f in | |
17560 | -) echo $tmp/stdin ;; | |
17561 | [\\/$]*) | |
86da66b5 HPN |
17562 | # Absolute (can't be DOS-style, as IFS=:) |
17563 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17564 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17565 | { (exit 1); exit 1; }; } | |
86da66b5 | 17566 | echo "$f";; |
ba479fd2 | 17567 | *) # Relative |
86da66b5 HPN |
17568 | if test -f "$f"; then |
17569 | # Build tree | |
17570 | echo "$f" | |
17571 | elif test -f "$srcdir/$f"; then | |
17572 | # Source tree | |
17573 | echo "$srcdir/$f" | |
17574 | else | |
17575 | # /dev/null tree | |
17576 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17577 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17578 | { (exit 1); exit 1; }; } | |
86da66b5 | 17579 | fi;; |
ba479fd2 NN |
17580 | esac |
17581 | done` || { (exit 1); exit 1; } | |
17582 | _ACEOF | |
17583 | cat >>$CONFIG_STATUS <<_ACEOF | |
17584 | sed "$ac_vpsub | |
17585 | $extrasub | |
17586 | _ACEOF | |
17587 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17588 | :t | |
17589 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
17590 | s,@configure_input@,$configure_input,;t t | |
17591 | s,@srcdir@,$ac_srcdir,;t t | |
17592 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
17593 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
17594 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
17595 | s,@builddir@,$ac_builddir,;t t | |
17596 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
17597 | s,@top_builddir@,$ac_top_builddir,;t t | |
17598 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
17599 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
17600 | rm -f $tmp/stdin | |
17601 | if test x"$ac_file" != x-; then | |
17602 | mv $tmp/out $ac_file | |
17603 | else | |
17604 | cat $tmp/out | |
17605 | rm -f $tmp/out | |
17606 | fi | |
17607 | ||
17608 | done | |
17609 | _ACEOF | |
17610 | cat >>$CONFIG_STATUS <<\_ACEOF | |
6e3f3080 | 17611 | |
ba479fd2 NN |
17612 | # |
17613 | # CONFIG_HEADER section. | |
17614 | # | |
861bb6c1 JL |
17615 | |
17616 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
17617 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
17618 | # | |
17619 | # ac_d sets the value in "#define NAME VALUE" lines. | |
86da66b5 HPN |
17620 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
17621 | ac_dB='[ ].*$,\1#\2' | |
ba479fd2 NN |
17622 | ac_dC=' ' |
17623 | ac_dD=',;t' | |
17624 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
86da66b5 | 17625 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
ba479fd2 | 17626 | ac_uB='$,\1#\2define\3' |
861bb6c1 | 17627 | ac_uC=' ' |
ba479fd2 NN |
17628 | ac_uD=',;t' |
17629 | ||
17630 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
861bb6c1 | 17631 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
ba479fd2 NN |
17632 | case $ac_file in |
17633 | - | *:- | *:-:* ) # input from stdin | |
86da66b5 HPN |
17634 | cat >$tmp/stdin |
17635 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17636 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
ba479fd2 | 17637 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` |
86da66b5 | 17638 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; |
ba479fd2 | 17639 | * ) ac_file_in=$ac_file.in ;; |
861bb6c1 JL |
17640 | esac |
17641 | ||
ba479fd2 NN |
17642 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 |
17643 | echo "$as_me: creating $ac_file" >&6;} | |
17644 | ||
17645 | # First look for the input files in the build tree, otherwise in the | |
17646 | # src tree. | |
17647 | ac_file_inputs=`IFS=: | |
17648 | for f in $ac_file_in; do | |
17649 | case $f in | |
17650 | -) echo $tmp/stdin ;; | |
17651 | [\\/$]*) | |
86da66b5 HPN |
17652 | # Absolute (can't be DOS-style, as IFS=:) |
17653 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17654 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17655 | { (exit 1); exit 1; }; } | |
86da66b5 HPN |
17656 | # Do quote $f, to prevent DOS paths from being IFS'd. |
17657 | echo "$f";; | |
ba479fd2 | 17658 | *) # Relative |
86da66b5 HPN |
17659 | if test -f "$f"; then |
17660 | # Build tree | |
17661 | echo "$f" | |
17662 | elif test -f "$srcdir/$f"; then | |
17663 | # Source tree | |
17664 | echo "$srcdir/$f" | |
17665 | else | |
17666 | # /dev/null tree | |
17667 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
ba479fd2 NN |
17668 | echo "$as_me: error: cannot find input file: $f" >&2;} |
17669 | { (exit 1); exit 1; }; } | |
86da66b5 | 17670 | fi;; |
ba479fd2 NN |
17671 | esac |
17672 | done` || { (exit 1); exit 1; } | |
17673 | # Remove the trailing spaces. | |
86da66b5 | 17674 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in |
ba479fd2 NN |
17675 | |
17676 | _ACEOF | |
17677 | ||
17678 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
17679 | # `conftest.undefs', that substitutes the proper values into | |
17680 | # config.h.in to produce config.h. The first handles `#define' | |
17681 | # templates, and the second `#undef' templates. | |
17682 | # And first: Protect against being on the right side of a sed subst in | |
17683 | # config.status. Protect against being in an unquoted here document | |
17684 | # in config.status. | |
17685 | rm -f conftest.defines conftest.undefs | |
17686 | # Using a here document instead of a string reduces the quoting nightmare. | |
17687 | # Putting comments in sed scripts is not portable. | |
17688 | # | |
17689 | # `end' is used to avoid that the second main sed command (meant for | |
17690 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
17691 | # See the Autoconf documentation for `clear'. | |
17692 | cat >confdef2sed.sed <<\_ACEOF | |
17693 | s/[\\&,]/\\&/g | |
17694 | s,[\\$`],\\&,g | |
17695 | t clear | |
17696 | : clear | |
86da66b5 | 17697 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp |
ba479fd2 | 17698 | t end |
86da66b5 | 17699 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp |
ba479fd2 NN |
17700 | : end |
17701 | _ACEOF | |
17702 | # If some macros were called several times there might be several times | |
17703 | # the same #defines, which is useless. Nevertheless, we may not want to | |
17704 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
17705 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
17706 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
17707 | rm -f confdef2sed.sed | |
861bb6c1 JL |
17708 | |
17709 | # This sed command replaces #undef with comments. This is necessary, for | |
17710 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
17711 | # on some systems where configure will not decide to define it. | |
ba479fd2 | 17712 | cat >>conftest.undefs <<\_ACEOF |
86da66b5 | 17713 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
ba479fd2 NN |
17714 | _ACEOF |
17715 | ||
17716 | # Break up conftest.defines because some shells have a limit on the size | |
17717 | # of here documents, and old seds have small limits too (100 cmds). | |
17718 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
86da66b5 | 17719 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS |
ba479fd2 NN |
17720 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS |
17721 | echo ' :' >>$CONFIG_STATUS | |
17722 | rm -f conftest.tail | |
17723 | while grep . conftest.defines >/dev/null | |
17724 | do | |
17725 | # Write a limited-size here document to $tmp/defines.sed. | |
17726 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
17727 | # Speed up: don't consider the non `#define' lines. | |
86da66b5 | 17728 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17729 | # Work around the forget-to-reset-the-flag bug. |
17730 | echo 't clr' >>$CONFIG_STATUS | |
17731 | echo ': clr' >>$CONFIG_STATUS | |
17732 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
17733 | echo 'CEOF | |
17734 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
17735 | rm -f $tmp/in | |
17736 | mv $tmp/out $tmp/in | |
17737 | ' >>$CONFIG_STATUS | |
17738 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
17739 | rm -f conftest.defines | |
17740 | mv conftest.tail conftest.defines | |
17741 | done | |
17742 | rm -f conftest.defines | |
17743 | echo ' fi # grep' >>$CONFIG_STATUS | |
17744 | echo >>$CONFIG_STATUS | |
861bb6c1 | 17745 | |
ba479fd2 NN |
17746 | # Break up conftest.undefs because some shells have a limit on the size |
17747 | # of here documents, and old seds have small limits too (100 cmds). | |
17748 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
861bb6c1 | 17749 | rm -f conftest.tail |
ba479fd2 | 17750 | while grep . conftest.undefs >/dev/null |
861bb6c1 | 17751 | do |
ba479fd2 NN |
17752 | # Write a limited-size here document to $tmp/undefs.sed. |
17753 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
17754 | # Speed up: don't consider the non `#undef' | |
86da66b5 | 17755 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS |
ba479fd2 NN |
17756 | # Work around the forget-to-reset-the-flag bug. |
17757 | echo 't clr' >>$CONFIG_STATUS | |
17758 | echo ': clr' >>$CONFIG_STATUS | |
17759 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
861bb6c1 | 17760 | echo 'CEOF |
ba479fd2 NN |
17761 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out |
17762 | rm -f $tmp/in | |
17763 | mv $tmp/out $tmp/in | |
17764 | ' >>$CONFIG_STATUS | |
17765 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
17766 | rm -f conftest.undefs | |
17767 | mv conftest.tail conftest.undefs | |
861bb6c1 | 17768 | done |
ba479fd2 NN |
17769 | rm -f conftest.undefs |
17770 | ||
17771 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17772 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
17773 | # use $as_me), people would be surprised to read: | |
17774 | # /* config.h. Generated by config.status. */ | |
17775 | if test x"$ac_file" = x-; then | |
17776 | echo "/* Generated by configure. */" >$tmp/config.h | |
6e3f3080 | 17777 | else |
ba479fd2 | 17778 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h |
cafe096b | 17779 | fi |
ba479fd2 NN |
17780 | cat $tmp/in >>$tmp/config.h |
17781 | rm -f $tmp/in | |
17782 | if test x"$ac_file" != x-; then | |
17783 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
17784 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
17785 | echo "$as_me: $ac_file is unchanged" >&6;} | |
17786 | else | |
17787 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
17788 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17789 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
17790 | X"$ac_file" : 'X\(//\)$' \| \ | |
17791 | X"$ac_file" : 'X\(/\)' \| \ | |
17792 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17793 | echo X"$ac_file" | |
17794 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17795 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17796 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17797 | /^X\(\/\).*/{ s//\1/; q; } | |
17798 | s/.*/./; q'` | |
17799 | { if $as_mkdir_p; then | |
17800 | mkdir -p "$ac_dir" | |
17801 | else | |
17802 | as_dir="$ac_dir" | |
17803 | as_dirs= | |
17804 | while test ! -d "$as_dir"; do | |
17805 | as_dirs="$as_dir $as_dirs" | |
17806 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17807 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17808 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
17809 | X"$as_dir" : 'X\(//\)$' \| \ | |
17810 | X"$as_dir" : 'X\(/\)' \| \ | |
17811 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17812 | echo X"$as_dir" | |
17813 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17814 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17815 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17816 | /^X\(\/\).*/{ s//\1/; q; } | |
17817 | s/.*/./; q'` | |
17818 | done | |
17819 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17820 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17821 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17822 | { (exit 1); exit 1; }; }; } | |
63cf211a | 17823 | |
ba479fd2 NN |
17824 | rm -f $ac_file |
17825 | mv $tmp/config.h $ac_file | |
17826 | fi | |
17827 | else | |
17828 | cat $tmp/config.h | |
17829 | rm -f $tmp/config.h | |
17830 | fi | |
17831 | done | |
17832 | _ACEOF | |
17833 | cat >>$CONFIG_STATUS <<\_ACEOF | |
861bb6c1 | 17834 | |
ba479fd2 NN |
17835 | # |
17836 | # CONFIG_COMMANDS section. | |
17837 | # | |
17838 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
17839 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
17840 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
17841 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
17842 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
86da66b5 HPN |
17843 | X"$ac_dest" : 'X\(//\)[^/]' \| \ |
17844 | X"$ac_dest" : 'X\(//\)$' \| \ | |
17845 | X"$ac_dest" : 'X\(/\)' \| \ | |
17846 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 NN |
17847 | echo X"$ac_dest" | |
17848 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17849 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17850 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17851 | /^X\(\/\).*/{ s//\1/; q; } | |
17852 | s/.*/./; q'` | |
86da66b5 HPN |
17853 | { if $as_mkdir_p; then |
17854 | mkdir -p "$ac_dir" | |
17855 | else | |
17856 | as_dir="$ac_dir" | |
17857 | as_dirs= | |
17858 | while test ! -d "$as_dir"; do | |
17859 | as_dirs="$as_dir $as_dirs" | |
17860 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
17861 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
17862 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
17863 | X"$as_dir" : 'X\(//\)$' \| \ | |
17864 | X"$as_dir" : 'X\(/\)' \| \ | |
17865 | . : '\(.\)' 2>/dev/null || | |
17866 | echo X"$as_dir" | | |
17867 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
17868 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
17869 | /^X\(\/\/\)$/{ s//\1/; q; } | |
17870 | /^X\(\/\).*/{ s//\1/; q; } | |
17871 | s/.*/./; q'` | |
17872 | done | |
17873 | test ! -n "$as_dirs" || mkdir $as_dirs | |
17874 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
17875 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
17876 | { (exit 1); exit 1; }; }; } | |
17877 | ||
ba479fd2 NN |
17878 | ac_builddir=. |
17879 | ||
17880 | if test "$ac_dir" != .; then | |
17881 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
17882 | # A "../" for each directory in $ac_dir_suffix. | |
17883 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
17884 | else | |
17885 | ac_dir_suffix= ac_top_builddir= | |
17886 | fi | |
17887 | ||
17888 | case $srcdir in | |
17889 | .) # No --srcdir option. We are building in place. | |
17890 | ac_srcdir=. | |
17891 | if test -z "$ac_top_builddir"; then | |
17892 | ac_top_srcdir=. | |
17893 | else | |
17894 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
17895 | fi ;; | |
17896 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
17897 | ac_srcdir=$srcdir$ac_dir_suffix; | |
17898 | ac_top_srcdir=$srcdir ;; | |
17899 | *) # Relative path. | |
17900 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
17901 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
17902 | esac | |
8ab705be KC |
17903 | |
17904 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
17905 | # the directories may not exist. | |
17906 | case `pwd` in | |
17907 | .) ac_abs_builddir="$ac_dir";; | |
86da66b5 | 17908 | *) |
8ab705be KC |
17909 | case "$ac_dir" in |
17910 | .) ac_abs_builddir=`pwd`;; | |
17911 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
17912 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
86da66b5 HPN |
17913 | esac;; |
17914 | esac | |
8ab705be | 17915 | case $ac_abs_builddir in |
86da66b5 HPN |
17916 | .) ac_abs_top_builddir=${ac_top_builddir}.;; |
17917 | *) | |
17918 | case ${ac_top_builddir}. in | |
8ab705be | 17919 | .) ac_abs_top_builddir=$ac_abs_builddir;; |
86da66b5 | 17920 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; |
8ab705be | 17921 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; |
86da66b5 HPN |
17922 | esac;; |
17923 | esac | |
8ab705be | 17924 | case $ac_abs_builddir in |
86da66b5 HPN |
17925 | .) ac_abs_srcdir=$ac_srcdir;; |
17926 | *) | |
17927 | case $ac_srcdir in | |
8ab705be | 17928 | .) ac_abs_srcdir=$ac_abs_builddir;; |
86da66b5 | 17929 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; |
8ab705be | 17930 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; |
86da66b5 HPN |
17931 | esac;; |
17932 | esac | |
8ab705be | 17933 | case $ac_abs_builddir in |
86da66b5 HPN |
17934 | .) ac_abs_top_srcdir=$ac_top_srcdir;; |
17935 | *) | |
17936 | case $ac_top_srcdir in | |
8ab705be | 17937 | .) ac_abs_top_srcdir=$ac_abs_builddir;; |
86da66b5 | 17938 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; |
8ab705be | 17939 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; |
86da66b5 HPN |
17940 | esac;; |
17941 | esac | |
ba479fd2 NN |
17942 | |
17943 | ||
17944 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
17945 | echo "$as_me: executing $ac_dest commands" >&6;} | |
17946 | case $ac_dest in | |
17947 | default ) | |
f1faaabd NN |
17948 | case ${CONFIG_HEADERS} in |
17949 | *auto-host.h:config.in*) | |
17950 | echo > cstamp-h ;; | |
861bb6c1 | 17951 | esac |
2ed26f6b | 17952 | # Make sure all the subdirs exist. |
3b620440 | 17953 | for d in $subdirs doc build |
2ed26f6b | 17954 | do |
2ed26f6b | 17955 | test -d $d || mkdir $d |
2ed26f6b | 17956 | done |
93cf819d BK |
17957 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
17958 | # bootstrapping and the installation procedure can still use | |
17959 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
17960 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
17961 | # This is virtually a duplicate of what happens in configure.lang; we do | |
17962 | # an extra check to make sure this only happens if ln -s can be used. | |
35f06ae4 PB |
17963 | case "$LN_S" in |
17964 | *-s*) | |
17965 | for d in ${subdirs} ; do | |
1e6347d8 | 17966 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 17967 | cd $d |
6a1b7268 | 17968 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
17969 | do |
17970 | rm -f $t | |
35f06ae4 | 17971 | $LN_S ../$t $t 2>/dev/null |
4e8a434e BK |
17972 | done |
17973 | cd $STARTDIR | |
35f06ae4 PB |
17974 | done |
17975 | ;; | |
17976 | esac | |
ba479fd2 NN |
17977 | ;; |
17978 | esac | |
17979 | done | |
17980 | _ACEOF | |
cafe096b | 17981 | |
ba479fd2 NN |
17982 | cat >>$CONFIG_STATUS <<\_ACEOF |
17983 | ||
17984 | { (exit 0); exit 0; } | |
17985 | _ACEOF | |
861bb6c1 | 17986 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
17987 | ac_clean_files=$ac_clean_files_save |
17988 | ||
17989 | ||
17990 | # configure is writing to config.log, and then calls config.status. | |
17991 | # config.status does its own redirection, appending to config.log. | |
17992 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
17993 | # by configure, so config.status won't be able to write to it; its | |
17994 | # output is simply discarded. So we exec the FD to /dev/null, | |
17995 | # effectively closing config.log, so it can be properly (re)opened and | |
17996 | # appended to by config.status. When coming back to configure, we | |
17997 | # need to make the FD available again. | |
17998 | if test "$no_create" != yes; then | |
17999 | ac_cs_success=: | |
18000 | ac_config_status_args= | |
18001 | test "$silent" = yes && | |
18002 | ac_config_status_args="$ac_config_status_args --quiet" | |
18003 | exec 5>/dev/null | |
18004 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18005 | exec 5>>config.log | |
18006 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18007 | # would make configure fail if this is the last instruction. | |
18008 | $ac_cs_success || { (exit 1); exit 1; } | |
18009 | fi | |
861bb6c1 | 18010 |