]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
861bb6c1 | 2 | # Guess values for system-dependent variables and create Makefiles. |
b61ff9c8 | 3 | # Generated by GNU Autoconf 2.59. |
861bb6c1 | 4 | # |
b61ff9c8 | 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 | ||
b61ff9c8 | 12 | # Be Bourne compatible |
ba479fd2 NN |
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+"$@"}'='"$@"' | |
b61ff9c8 BS |
19 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then |
20 | set -o posix | |
ba479fd2 | 21 | fi |
b61ff9c8 | 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. | |
b61ff9c8 | 33 | $as_unset ENV MAIL MAILPATH |
ba479fd2 NN |
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 | |
b61ff9c8 | 47 | $as_unset $as_var |
ba479fd2 NN |
48 | fi |
49 | done | |
50 | ||
51 | # Required to use basename. | |
b61ff9c8 | 52 | if expr a : '\(a\)' >/dev/null 2>&1; then |
ba479fd2 NN |
53 | as_expr=expr |
54 | else | |
55 | as_expr=false | |
56 | fi | |
57 | ||
b61ff9c8 | 58 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
ba479fd2 NN |
59 | as_basename=basename |
60 | else | |
61 | as_basename=false | |
62 | fi | |
63 | ||
64 | ||
65 | # Name of the executable. | |
b61ff9c8 | 66 | as_me=`$as_basename "$0" || |
ba479fd2 NN |
67 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
68 | X"$0" : 'X\(//\)$' \| \ | |
b61ff9c8 BS |
69 | X"$0" : 'X\(/\)$' \| \ |
70 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 | 71 | echo X/"$0" | |
b61ff9c8 BS |
72 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } |
73 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
74 | /^X\/\(\/\).*/{ s//\1/; q; } | |
75 | s/.*/./; q'` | |
703d89ab | 76 | |
ab22c1fa | 77 | |
b61ff9c8 BS |
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 | |
1a4b763e | 85 | |
b61ff9c8 BS |
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 | |
1a4b763e BS |
97 | fi |
98 | ||
1a4b763e | 99 | |
b61ff9c8 BS |
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 | |
1a4b763e | 116 | |
b61ff9c8 BS |
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 | '') | |
ba479fd2 | 130 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
dd7f7a6e | 131 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
ba479fd2 NN |
132 | do |
133 | IFS=$as_save_IFS | |
134 | test -z "$as_dir" && as_dir=. | |
b61ff9c8 BS |
135 | for as_base in sh bash ksh sh5; do |
136 | case $as_dir in | |
ba479fd2 | 137 | /*) |
b61ff9c8 | 138 | if ("$as_dir/$as_base" -c ' |
1a4b763e BS |
139 | as_lineno_1=$LINENO |
140 | as_lineno_2=$LINENO | |
b61ff9c8 | 141 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` |
1a4b763e | 142 | test "x$as_lineno_1" != "x$as_lineno_2" && |
b61ff9c8 BS |
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 | |
ba479fd2 NN |
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 | |
b61ff9c8 BS |
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. | |
ba479fd2 | 162 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
b61ff9c8 BS |
163 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) |
164 | sed '=' <$as_myself | | |
ba479fd2 NN |
165 | sed ' |
166 | N | |
b61ff9c8 BS |
167 | s,$,-, |
168 | : loop | |
169 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
ba479fd2 | 170 | t loop |
b61ff9c8 BS |
171 | s,-$,, |
172 | s,^['$as_cr_digits']*\n,, | |
ba479fd2 | 173 | ' >$as_me.lineno && |
b61ff9c8 | 174 | chmod +x $as_me.lineno || |
ba479fd2 NN |
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 | |
b61ff9c8 BS |
180 | # original and so on. Autoconf is especially sensible to this). |
181 | . ./$as_me.lineno | |
ba479fd2 NN |
182 | # Exit status is that of the last command. |
183 | exit | |
184 | } | |
185 | ||
186 | ||
b61ff9c8 BS |
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= ;; | |
ba479fd2 NN |
192 | esac |
193 | ||
b61ff9c8 | 194 | if expr a : '\(a\)' >/dev/null 2>&1; then |
ba479fd2 NN |
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 | |
b61ff9c8 BS |
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 | |
ba479fd2 | 207 | as_ln_s='cp -p' |
b61ff9c8 BS |
208 | else |
209 | as_ln_s='ln -s' | |
210 | fi | |
ba479fd2 NN |
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 | |
b61ff9c8 | 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 | ||
b61ff9c8 | 225 | as_executable_p="test -f" |
ba479fd2 NN |
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 | ||
b61ff9c8 BS |
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 | |
ba479fd2 NN |
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 | ||
b61ff9c8 BS |
249 | exec 6>&1 |
250 | ||
ba479fd2 NN |
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 | ||
b61ff9c8 BS |
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 | ||
ba479fd2 NN |
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> | |
b61ff9c8 | 278 | #if HAVE_SYS_TYPES_H |
ba479fd2 NN |
279 | # include <sys/types.h> |
280 | #endif | |
b61ff9c8 | 281 | #if HAVE_SYS_STAT_H |
ba479fd2 NN |
282 | # include <sys/stat.h> |
283 | #endif | |
b61ff9c8 | 284 | #if STDC_HEADERS |
ba479fd2 NN |
285 | # include <stdlib.h> |
286 | # include <stddef.h> | |
287 | #else | |
b61ff9c8 | 288 | # if HAVE_STDLIB_H |
ba479fd2 NN |
289 | # include <stdlib.h> |
290 | # endif | |
291 | #endif | |
b61ff9c8 BS |
292 | #if HAVE_STRING_H |
293 | # if !STDC_HEADERS && HAVE_MEMORY_H | |
ba479fd2 NN |
294 | # include <memory.h> |
295 | # endif | |
296 | # include <string.h> | |
297 | #endif | |
b61ff9c8 | 298 | #if HAVE_STRINGS_H |
ba479fd2 NN |
299 | # include <strings.h> |
300 | #endif | |
b61ff9c8 | 301 | #if HAVE_INTTYPES_H |
ba479fd2 | 302 | # include <inttypes.h> |
b61ff9c8 BS |
303 | #else |
304 | # if HAVE_STDINT_H | |
305 | # include <stdint.h> | |
306 | # endif | |
ba479fd2 | 307 | #endif |
b61ff9c8 | 308 | #if HAVE_UNISTD_H |
ba479fd2 NN |
309 | # include <unistd.h> |
310 | #endif" | |
311 | ||
b61ff9c8 | 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 loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI 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 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_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines check_languages 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 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' | |
b61ff9c8 | 343 | datadir='${prefix}/share' |
861bb6c1 JL |
344 | sysconfdir='${prefix}/etc' |
345 | sharedstatedir='${prefix}/com' | |
346 | localstatedir='${prefix}/var' | |
b61ff9c8 | 347 | libdir='${exec_prefix}/lib' |
861bb6c1 JL |
348 | includedir='${prefix}/include' |
349 | oldincludedir='/usr/include' | |
b61ff9c8 BS |
350 | infodir='${prefix}/info' |
351 | mandir='${prefix}/man' | |
861bb6c1 | 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 | |
b61ff9c8 | 358 | eval "$ac_prev=\$ac_option" |
861bb6c1 JL |
359 | ac_prev= |
360 | continue | |
361 | fi | |
362 | ||
b61ff9c8 | 363 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
861bb6c1 JL |
364 | |
365 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
366 | ||
b61ff9c8 | 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 | 388 | |
b61ff9c8 | 389 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
861bb6c1 | 390 | ac_prev=datadir ;; |
b61ff9c8 BS |
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. |
b61ff9c8 | 398 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
399 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
400 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
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. |
b61ff9c8 | 407 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
408 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 |
409 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
410 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` |
411 | case $ac_option in | |
412 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
413 | *) ac_optarg=yes ;; | |
414 | esac | |
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 \ | |
b61ff9c8 BS |
467 | | --localstate | --localstat | --localsta | --localst \ |
468 | | --locals | --local | --loca | --loc | --lo) | |
861bb6c1 JL |
469 | ac_prev=localstatedir ;; |
470 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
b61ff9c8 BS |
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. |
b61ff9c8 | 589 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
590 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
591 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
592 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
593 | case $ac_option in | |
594 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
595 | *) ac_optarg=yes ;; | |
596 | esac | |
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. |
b61ff9c8 | 602 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && |
ba479fd2 NN |
603 | { echo "$as_me: error: invalid package name: $ac_package" >&2 |
604 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
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; }; } | |
b61ff9c8 BS |
637 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` |
638 | eval "$ac_envvar='$ac_optarg'" | |
ba479fd2 NN |
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 | |
b61ff9c8 BS |
658 | # Be sure to have absolute paths. |
659 | for ac_var in exec_prefix prefix | |
861bb6c1 | 660 | do |
b61ff9c8 | 661 | eval ac_val=$`echo $ac_var` |
ba479fd2 | 662 | case $ac_val in |
b61ff9c8 BS |
663 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; |
664 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
665 | { (exit 1); exit 1; }; };; | |
2f41c1d6 PB |
666 | esac |
667 | done | |
668 | ||
b61ff9c8 BS |
669 | # Be sure to have absolute paths. |
670 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
671 | localstatedir libdir includedir oldincludedir infodir mandir | |
672 | do | |
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; }; };; | |
678 | esac | |
679 | done | |
680 | ||
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 | |
ba479fd2 NN |
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 | |
b61ff9c8 BS |
708 | # Try the directory containing this script, then its parent. |
709 | ac_confdir=`(dirname "$0") 2>/dev/null || | |
ba479fd2 | 710 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
711 | X"$0" : 'X\(//\)[^/]' \| \ |
712 | X"$0" : 'X\(//\)$' \| \ | |
b61ff9c8 BS |
713 | X"$0" : 'X\(/\)' \| \ |
714 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 | 715 | echo X"$0" | |
b61ff9c8 BS |
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 | 721 | srcdir=$ac_confdir |
b61ff9c8 | 722 | if test ! -r $srcdir/$ac_unique_file; then |
861bb6c1 JL |
723 | srcdir=.. |
724 | fi | |
725 | else | |
726 | ac_srcdir_defaulted=no | |
727 | fi | |
b61ff9c8 BS |
728 | if test ! -r $srcdir/$ac_unique_file; then |
729 | if test "$ac_srcdir_defaulted" = yes; then | |
730 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 | |
731 | { (exit 1); exit 1; }; } | |
732 | else | |
733 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | |
ba479fd2 | 734 | { (exit 1); exit 1; }; } |
b61ff9c8 | 735 | fi |
dd7f7a6e | 736 | fi |
b61ff9c8 BS |
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 | |
dd7f7a6e | 739 | { (exit 1); exit 1; }; } |
b61ff9c8 BS |
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 | |
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 | ||
b61ff9c8 BS |
809 | _ACEOF |
810 | ||
811 | cat <<_ACEOF | |
ba479fd2 NN |
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] | |
b61ff9c8 | 829 | --datadir=DIR read-only architecture-independent data [PREFIX/share] |
ba479fd2 NN |
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] | |
b61ff9c8 BS |
836 | --infodir=DIR info documentation [PREFIX/info] |
837 | --mandir=DIR man documentation [PREFIX/man] | |
ba479fd2 | 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. | |
3bbd5a19 | 865 | --enable-werror-always enable -Werror despite compiler version |
ba479fd2 NN |
866 | --enable-checking=LIST |
867 | enable expensive run-time checks. With LIST, | |
868 | enable only specific categories of checks. | |
cdce5c16 | 869 | Categories are: yes,no,all,none,release. |
3089f8b5 | 870 | Flags are: assert,df,fold,gc,gcac,misc, |
7e98624c | 871 | rtlflag,rtl,runtime,tree,valgrind,types. |
74ee1642 | 872 | --enable-mapped-location location_t is fileline integer cookie |
ba479fd2 | 873 | --enable-coverage=LEVEL |
fb38008e | 874 | enable compiler's code coverage collection. |
ba479fd2 NN |
875 | Use to measure compiler performance and locate |
876 | unused parts of the compiler. With LEVEL, specify | |
877 | optimization. Values are opt, noopt, | |
878 | default is noopt | |
879 | --enable-gather-detailed-mem-stats enable detailed memory allocation stats gathering | |
880 | --enable-multilib enable library support for multiple ABIs | |
881 | --enable-__cxa_atexit enable __cxa_atexit for C++ | |
79b87c74 MM |
882 | --enable-decimal-float={no,yes,bid,dpd} |
883 | enable decimal float extension to C. Selecting 'bid' | |
884 | or 'dpd' choses which decimal floating point format | |
885 | to use | |
ab22c1fa | 886 | --enable-fixed-point enable fixed-point arithmetic extension to C |
ba479fd2 NN |
887 | --enable-threads enable thread usage for target GCC |
888 | --enable-threads=LIB use LIB thread package for target GCC | |
8dea1cca DD |
889 | --enable-tls enable or disable generation of tls code |
890 | overriding the assembler check for tls support | |
ba479fd2 NN |
891 | --enable-objc-gc enable the use of Boehm's garbage collector with |
892 | the GNU Objective-C runtime | |
893 | --disable-shared don't provide a shared libgcc | |
894 | --enable-intermodule build the compiler in one step | |
f3c9f174 | 895 | --enable-languages=LIST specify which front-ends to build |
dfb77e37 | 896 | --disable-rpath do not hardcode runtime library paths |
ba479fd2 NN |
897 | --enable-initfini-array use .init_array/.fini_array sections |
898 | --enable-sjlj-exceptions | |
899 | arrange to use setjmp/longjmp exception handling | |
7f970b70 | 900 | --enable-secureplt enable -msecure-plt by default for PowerPC |
ba479fd2 NN |
901 | --disable-win32-registry |
902 | disable lookup of installation paths in the | |
903 | Registry on Windows hosts | |
904 | --enable-win32-registry enable registry lookup (default) | |
905 | --enable-win32-registry=KEY | |
906 | use KEY instead of GCC version as the last portion | |
907 | of the registry key | |
908 | --enable-maintainer-mode | |
909 | enable make rules and dependencies not useful | |
910 | (and sometimes confusing) to the casual installer | |
911 | --enable-version-specific-runtime-libs | |
912 | specify that runtime libraries should be | |
913 | installed in a compiler-specific directory | |
093e61a6 | 914 | |
ba479fd2 NN |
915 | Optional Packages: |
916 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
917 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1546bb64 | 918 | --with-build-libsubdir=DIR Directory where to find libraries for build system |
ba479fd2 NN |
919 | --with-local-prefix=DIR specifies directory to put local include |
920 | --with-gxx-include-dir=DIR | |
921 | specifies directory to put g++ header files | |
922 | --with-cpp-install-dir=DIR | |
923 | install the user visible C preprocessor in DIR | |
924 | (relative to PREFIX) as well as PREFIX/bin | |
925 | --with-gnu-ld arrange to work with GNU ld. | |
926 | --with-ld arrange to use the specified ld (full pathname) | |
d594623a | 927 | --with-demangler-in-ld try to use demangler in GNU ld. |
ba479fd2 NN |
928 | --with-gnu-as arrange to work with GNU as |
929 | --with-as arrange to use the specified as (full pathname) | |
930 | --with-stabs arrange to use stabs instead of host debug format | |
931 | --with-dwarf2 force the default debug format to be DWARF 2 | |
160633c6 MM |
932 | --with-build-sysroot=sysroot |
933 | use sysroot as the system root during the build | |
ba479fd2 | 934 | --with-sysroot=DIR Search for usr/lib, usr/include, et al, within DIR. |
2f41c1d6 PB |
935 | --with-pkgversion=PKG Use PKG in the version string in place of "GCC" |
936 | --with-bugurl=URL Direct users to URL to report a bug | |
dfb77e37 KC |
937 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
938 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
939 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
443728bb | 940 | --with-system-libunwind use installed libunwind |
ed965309 | 941 | --with-long-double-128 Use 128-bit long double by default. |
59415997 | 942 | --with-gc={page,zone} choose the garbage collection mechanism to use |
ba479fd2 NN |
943 | with the compiler |
944 | --with-system-zlib use installed libz | |
22482f74 MS |
945 | --with-slibdir=DIR shared libraries in DIR [LIBDIR] |
946 | --with-datarootdir=DIR Use DIR as the data root [PREFIX/share] | |
947 | --with-docdir=DIR Install documentation in DIR [DATAROOTDIR] | |
948 | --with-htmldir=DIR html documentation in in DIR [DOCDIR] | |
13c22933 | 949 | |
ba479fd2 NN |
950 | Some influential environment variables: |
951 | CC C compiler command | |
952 | CFLAGS C compiler flags | |
953 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
954 | nonstandard directory <lib dir> | |
b61ff9c8 BS |
955 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have |
956 | headers in a nonstandard directory <include dir> | |
ba479fd2 | 957 | CPP C preprocessor |
6de9cd9a DN |
958 | GMPLIBS How to link GMP |
959 | GMPINC How to find GMP include files | |
13c22933 | 960 | |
ba479fd2 NN |
961 | Use these variables to override the choices made by `configure' or to help |
962 | it to find libraries and programs with nonstandard names/locations. | |
73458fb7 | 963 | |
ba479fd2 NN |
964 | _ACEOF |
965 | fi | |
6e3f3080 | 966 | |
ba479fd2 NN |
967 | if test "$ac_init_help" = "recursive"; then |
968 | # If there are subdirs, report their specific --help. | |
b61ff9c8 | 969 | ac_popdir=`pwd` |
ba479fd2 | 970 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
b61ff9c8 | 971 | test -d $ac_dir || continue |
ba479fd2 NN |
972 | ac_builddir=. |
973 | ||
b61ff9c8 | 974 | if test "$ac_dir" != .; then |
ba479fd2 | 975 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
b61ff9c8 BS |
976 | # A "../" for each directory in $ac_dir_suffix. |
977 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
978 | else | |
979 | ac_dir_suffix= ac_top_builddir= | |
980 | fi | |
ba479fd2 NN |
981 | |
982 | case $srcdir in | |
b61ff9c8 | 983 | .) # No --srcdir option. We are building in place. |
ba479fd2 | 984 | ac_srcdir=. |
b61ff9c8 BS |
985 | if test -z "$ac_top_builddir"; then |
986 | ac_top_srcdir=. | |
987 | else | |
988 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
989 | fi ;; | |
990 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
ba479fd2 | 991 | ac_srcdir=$srcdir$ac_dir_suffix; |
b61ff9c8 BS |
992 | ac_top_srcdir=$srcdir ;; |
993 | *) # Relative path. | |
994 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
995 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
996 | esac | |
997 | ||
998 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
999 | # the directories may not exist. | |
1000 | case `pwd` in | |
1001 | .) ac_abs_builddir="$ac_dir";; | |
1002 | *) | |
1003 | case "$ac_dir" in | |
1004 | .) ac_abs_builddir=`pwd`;; | |
1005 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
1006 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
1007 | esac;; | |
1008 | esac | |
1009 | case $ac_abs_builddir in | |
1010 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
1011 | *) | |
1012 | case ${ac_top_builddir}. in | |
1013 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
1014 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
1015 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
1016 | esac;; | |
1017 | esac | |
1018 | case $ac_abs_builddir in | |
1019 | .) ac_abs_srcdir=$ac_srcdir;; | |
1020 | *) | |
1021 | case $ac_srcdir in | |
1022 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
1023 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
1024 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
1025 | esac;; | |
1026 | esac | |
1027 | case $ac_abs_builddir in | |
1028 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
1029 | *) | |
1030 | case $ac_top_srcdir in | |
1031 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
1032 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
1033 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
1034 | esac;; | |
86da66b5 | 1035 | esac |
b61ff9c8 BS |
1036 | |
1037 | cd $ac_dir | |
1038 | # Check for guested configure; otherwise get Cygnus style configure. | |
1039 | if test -f $ac_srcdir/configure.gnu; then | |
1040 | echo | |
1041 | $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1042 | elif test -f $ac_srcdir/configure; then | |
1043 | echo | |
1044 | $SHELL $ac_srcdir/configure --help=recursive | |
1045 | elif test -f $ac_srcdir/configure.ac || | |
1046 | test -f $ac_srcdir/configure.in; then | |
1047 | echo | |
1048 | $ac_configure --help | |
ba479fd2 NN |
1049 | else |
1050 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
b61ff9c8 BS |
1051 | fi |
1052 | cd $ac_popdir | |
ba479fd2 NN |
1053 | done |
1054 | fi | |
1055 | ||
b61ff9c8 | 1056 | test -n "$ac_init_help" && exit 0 |
ba479fd2 NN |
1057 | if $ac_init_version; then |
1058 | cat <<\_ACEOF | |
1059 | ||
b61ff9c8 | 1060 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
1061 | This configure script is free software; the Free Software Foundation |
1062 | gives unlimited permission to copy, distribute and modify it. | |
1063 | _ACEOF | |
b61ff9c8 | 1064 | exit 0 |
ba479fd2 | 1065 | fi |
b61ff9c8 BS |
1066 | exec 5>config.log |
1067 | cat >&5 <<_ACEOF | |
ba479fd2 NN |
1068 | This file contains any messages produced by compilers while |
1069 | running configure, to aid debugging if configure makes a mistake. | |
1070 | ||
1071 | It was created by $as_me, which was | |
b61ff9c8 | 1072 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
1073 | |
1074 | $ $0 $@ | |
1075 | ||
1076 | _ACEOF | |
1077 | { | |
1078 | cat <<_ASUNAME | |
1079 | ## --------- ## | |
1080 | ## Platform. ## | |
1081 | ## --------- ## | |
1082 | ||
1083 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1084 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1085 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1086 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1087 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1088 | ||
1089 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1090 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1091 | ||
1092 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1093 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1094 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
b61ff9c8 | 1095 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` |
ba479fd2 NN |
1096 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
1097 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1098 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1099 | ||
1100 | _ASUNAME | |
1101 | ||
1102 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1103 | for as_dir in $PATH | |
1104 | do | |
1105 | IFS=$as_save_IFS | |
1106 | test -z "$as_dir" && as_dir=. | |
1107 | echo "PATH: $as_dir" | |
1108 | done | |
1109 | ||
1110 | } >&5 | |
1111 | ||
1112 | cat >&5 <<_ACEOF | |
1113 | ||
1114 | ||
1115 | ## ----------- ## | |
1116 | ## Core tests. ## | |
1117 | ## ----------- ## | |
1118 | ||
1119 | _ACEOF | |
1120 | ||
1121 | ||
1122 | # Keep a trace of the command line. | |
1123 | # Strip out --no-create and --no-recursion so they do not pile up. | |
1124 | # Strip out --silent because we don't want to record it for future runs. | |
1125 | # Also quote any args containing shell meta-characters. | |
1126 | # Make two passes to allow for proper duplicate-argument suppression. | |
1127 | ac_configure_args= | |
1128 | ac_configure_args0= | |
1129 | ac_configure_args1= | |
b61ff9c8 | 1130 | ac_sep= |
ba479fd2 NN |
1131 | ac_must_keep_next=false |
1132 | for ac_pass in 1 2 | |
1133 | do | |
1134 | for ac_arg | |
1135 | do | |
1136 | case $ac_arg in | |
1137 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1138 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1139 | | -silent | --silent | --silen | --sile | --sil) | |
1140 | continue ;; | |
b61ff9c8 | 1141 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) |
ba479fd2 NN |
1142 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
1143 | esac | |
1144 | case $ac_pass in | |
1145 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1146 | 2) | |
1147 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1148 | if test $ac_must_keep_next = true; then | |
86da66b5 | 1149 | ac_must_keep_next=false # Got value, back to normal. |
ba479fd2 | 1150 | else |
86da66b5 HPN |
1151 | case $ac_arg in |
1152 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1153 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1154 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1155 | | -with-* | --with-* | -without-* | --without-* | --x) | |
1156 | case "$ac_configure_args0 " in | |
1157 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1158 | esac | |
1159 | ;; | |
1160 | -* ) ac_must_keep_next=true ;; | |
1161 | esac | |
ba479fd2 | 1162 | fi |
b61ff9c8 BS |
1163 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" |
1164 | # Get rid of the leading space. | |
1165 | ac_sep=" " | |
ba479fd2 NN |
1166 | ;; |
1167 | esac | |
1168 | done | |
1169 | done | |
1170 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1171 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1172 | ||
1173 | # When interrupted or exit'd, cleanup temporary files, and complete | |
1174 | # config.log. We remove comments because anyway the quotes in there | |
1175 | # would cause problems or look ugly. | |
b61ff9c8 BS |
1176 | # WARNING: Be sure not to use single quotes in there, as some shells, |
1177 | # such as our DU 5.0 friend, will then `close' the trap. | |
ba479fd2 NN |
1178 | trap 'exit_status=$? |
1179 | # Save into config.log some information that might help in debugging. | |
1180 | { | |
1181 | echo | |
1182 | ||
1183 | cat <<\_ASBOX | |
1184 | ## ---------------- ## | |
1185 | ## Cache variables. ## | |
1186 | ## ---------------- ## | |
1187 | _ASBOX | |
1188 | echo | |
1189 | # The following way of writing the cache mishandles newlines in values, | |
b61ff9c8 | 1190 | { |
ba479fd2 | 1191 | (set) 2>&1 | |
b61ff9c8 BS |
1192 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in |
1193 | *ac_space=\ *) | |
ba479fd2 | 1194 | sed -n \ |
b61ff9c8 BS |
1195 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; |
1196 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
1197 | ;; | |
ba479fd2 | 1198 | *) |
b61ff9c8 BS |
1199 | sed -n \ |
1200 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
ba479fd2 | 1201 | ;; |
b61ff9c8 BS |
1202 | esac; |
1203 | } | |
ba479fd2 NN |
1204 | echo |
1205 | ||
1206 | cat <<\_ASBOX | |
1207 | ## ----------------- ## | |
1208 | ## Output variables. ## | |
1209 | ## ----------------- ## | |
1210 | _ASBOX | |
1211 | echo | |
1212 | for ac_var in $ac_subst_vars | |
1213 | do | |
b61ff9c8 BS |
1214 | eval ac_val=$`echo $ac_var` |
1215 | echo "$ac_var='"'"'$ac_val'"'"'" | |
ba479fd2 NN |
1216 | done | sort |
1217 | echo | |
1218 | ||
1219 | if test -n "$ac_subst_files"; then | |
1220 | cat <<\_ASBOX | |
b61ff9c8 BS |
1221 | ## ------------- ## |
1222 | ## Output files. ## | |
1223 | ## ------------- ## | |
ba479fd2 NN |
1224 | _ASBOX |
1225 | echo | |
1226 | for ac_var in $ac_subst_files | |
1227 | do | |
b61ff9c8 BS |
1228 | eval ac_val=$`echo $ac_var` |
1229 | echo "$ac_var='"'"'$ac_val'"'"'" | |
ba479fd2 NN |
1230 | done | sort |
1231 | echo | |
1232 | fi | |
1233 | ||
1234 | if test -s confdefs.h; then | |
1235 | cat <<\_ASBOX | |
1236 | ## ----------- ## | |
1237 | ## confdefs.h. ## | |
1238 | ## ----------- ## | |
1239 | _ASBOX | |
1240 | echo | |
b61ff9c8 | 1241 | sed "/^$/d" confdefs.h | sort |
ba479fd2 NN |
1242 | echo |
1243 | fi | |
1244 | test "$ac_signal" != 0 && | |
1245 | echo "$as_me: caught signal $ac_signal" | |
1246 | echo "$as_me: exit $exit_status" | |
1247 | } >&5 | |
b61ff9c8 BS |
1248 | rm -f core *.core && |
1249 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && | |
ba479fd2 | 1250 | exit $exit_status |
b61ff9c8 | 1251 | ' 0 |
ba479fd2 NN |
1252 | for ac_signal in 1 2 13 15; do |
1253 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1254 | done | |
1255 | ac_signal=0 | |
1256 | ||
1257 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
b61ff9c8 BS |
1258 | rm -rf conftest* confdefs.h |
1259 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1260 | echo >confdefs.h | |
ba479fd2 NN |
1261 | |
1262 | # Predefined preprocessor variables. | |
1263 | ||
1264 | cat >>confdefs.h <<_ACEOF | |
1265 | #define PACKAGE_NAME "$PACKAGE_NAME" | |
1266 | _ACEOF | |
1267 | ||
1268 | ||
1269 | cat >>confdefs.h <<_ACEOF | |
1270 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1271 | _ACEOF | |
1272 | ||
1273 | ||
1274 | cat >>confdefs.h <<_ACEOF | |
1275 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1276 | _ACEOF | |
1277 | ||
1278 | ||
1279 | cat >>confdefs.h <<_ACEOF | |
1280 | #define PACKAGE_STRING "$PACKAGE_STRING" | |
1281 | _ACEOF | |
1282 | ||
1283 | ||
1284 | cat >>confdefs.h <<_ACEOF | |
1285 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1286 | _ACEOF | |
1287 | ||
1288 | ||
1289 | # Let the site file select an alternate cache file if it wants to. | |
1290 | # Prefer explicitly selected file to automatically selected ones. | |
b61ff9c8 BS |
1291 | if test -z "$CONFIG_SITE"; then |
1292 | if test "x$prefix" != xNONE; then | |
1293 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
1294 | else | |
1295 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
1296 | fi | |
ba479fd2 | 1297 | fi |
b61ff9c8 | 1298 | for ac_site_file in $CONFIG_SITE; do |
ba479fd2 NN |
1299 | if test -r "$ac_site_file"; then |
1300 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1301 | echo "$as_me: loading site script $ac_site_file" >&6;} | |
1302 | sed 's/^/| /' "$ac_site_file" >&5 | |
1303 | . "$ac_site_file" | |
1304 | fi | |
1305 | done | |
1306 | ||
1307 | if test -r "$cache_file"; then | |
1308 | # Some versions of bash will fail to source /dev/null (special | |
1309 | # files actually), so we avoid doing that. | |
1310 | if test -f "$cache_file"; then | |
1311 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1312 | echo "$as_me: loading cache $cache_file" >&6;} | |
1313 | case $cache_file in | |
b61ff9c8 BS |
1314 | [\\/]* | ?:[\\/]* ) . $cache_file;; |
1315 | *) . ./$cache_file;; | |
ba479fd2 NN |
1316 | esac |
1317 | fi | |
1318 | else | |
1319 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1320 | echo "$as_me: creating cache $cache_file" >&6;} | |
1321 | >$cache_file | |
1322 | fi | |
1323 | ||
1324 | # Check that the precious variables saved in the cache have kept the same | |
1325 | # value. | |
1326 | ac_cache_corrupted=false | |
b61ff9c8 BS |
1327 | for ac_var in `(set) 2>&1 | |
1328 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do | |
ba479fd2 NN |
1329 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
1330 | eval ac_new_set=\$ac_env_${ac_var}_set | |
b61ff9c8 BS |
1331 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" |
1332 | eval ac_new_val="\$ac_env_${ac_var}_value" | |
ba479fd2 NN |
1333 | case $ac_old_set,$ac_new_set in |
1334 | set,) | |
1335 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1336 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1337 | ac_cache_corrupted=: ;; | |
1338 | ,set) | |
1339 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1340 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1341 | ac_cache_corrupted=: ;; | |
1342 | ,);; | |
1343 | *) | |
1344 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
86da66b5 | 1345 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 |
ba479fd2 | 1346 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
86da66b5 | 1347 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 |
ba479fd2 | 1348 | echo "$as_me: former value: $ac_old_val" >&2;} |
86da66b5 | 1349 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 |
ba479fd2 | 1350 | echo "$as_me: current value: $ac_new_val" >&2;} |
86da66b5 | 1351 | ac_cache_corrupted=: |
ba479fd2 NN |
1352 | fi;; |
1353 | esac | |
1354 | # Pass precious variables to config.status. | |
1355 | if test "$ac_new_set" = set; then | |
1356 | case $ac_new_val in | |
b61ff9c8 BS |
1357 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) |
1358 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
ba479fd2 NN |
1359 | *) ac_arg=$ac_var=$ac_new_val ;; |
1360 | esac | |
1361 | case " $ac_configure_args " in | |
1362 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1363 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1364 | esac | |
1365 | fi | |
1366 | done | |
1367 | if $ac_cache_corrupted; then | |
1368 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1369 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1370 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1371 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1372 | { (exit 1); exit 1; }; } | |
1373 | fi | |
1374 | ||
b61ff9c8 BS |
1375 | ac_ext=c |
1376 | ac_cpp='$CPP $CPPFLAGS' | |
1377 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1378 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1379 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1380 | ||
ba479fd2 NN |
1381 | |
1382 | ||
1383 | ||
1384 | ||
1385 | ||
1386 | ||
1387 | ||
1388 | ||
1389 | ||
1390 | ||
1391 | ||
1392 | ||
1393 | ||
1394 | ||
1395 | ||
1396 | ||
1397 | ||
1398 | ||
914c5af7 | 1399 | |
b61ff9c8 | 1400 | ac_config_headers="$ac_config_headers auto-host.h:config.in" |
ba479fd2 NN |
1401 | |
1402 | ||
9f18db39 PB |
1403 | gcc_version=`cat $srcdir/BASE-VER` |
1404 | ||
ba479fd2 NN |
1405 | # Determine the host, build, and target systems |
1406 | ac_aux_dir= | |
b61ff9c8 BS |
1407 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
1408 | if test -f $ac_dir/install-sh; then | |
ba479fd2 NN |
1409 | ac_aux_dir=$ac_dir |
1410 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
1411 | break | |
b61ff9c8 | 1412 | elif test -f $ac_dir/install.sh; then |
ba479fd2 NN |
1413 | ac_aux_dir=$ac_dir |
1414 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
1415 | break | |
b61ff9c8 | 1416 | elif test -f $ac_dir/shtool; then |
ba479fd2 NN |
1417 | ac_aux_dir=$ac_dir |
1418 | ac_install_sh="$ac_aux_dir/shtool install -c" | |
1419 | break | |
1420 | fi | |
1421 | done | |
1422 | if test -z "$ac_aux_dir"; then | |
b61ff9c8 BS |
1423 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 |
1424 | echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
ba479fd2 NN |
1425 | { (exit 1); exit 1; }; } |
1426 | fi | |
b61ff9c8 BS |
1427 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" |
1428 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
1429 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
ba479fd2 NN |
1430 | |
1431 | # Make sure we can run config.sub. | |
b61ff9c8 BS |
1432 | $ac_config_sub sun4 >/dev/null 2>&1 || |
1433 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | |
1434 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | |
ba479fd2 NN |
1435 | { (exit 1); exit 1; }; } |
1436 | ||
b61ff9c8 BS |
1437 | echo "$as_me:$LINENO: checking build system type" >&5 |
1438 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | |
ba479fd2 NN |
1439 | if test "${ac_cv_build+set}" = set; then |
1440 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1441 | else | |
b61ff9c8 BS |
1442 | ac_cv_build_alias=$build_alias |
1443 | test -z "$ac_cv_build_alias" && | |
1444 | ac_cv_build_alias=`$ac_config_guess` | |
1445 | test -z "$ac_cv_build_alias" && | |
ba479fd2 NN |
1446 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 |
1447 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | |
1448 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
1449 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || |
1450 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | |
1451 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | |
ba479fd2 NN |
1452 | { (exit 1); exit 1; }; } |
1453 | ||
1454 | fi | |
b61ff9c8 BS |
1455 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 |
1456 | echo "${ECHO_T}$ac_cv_build" >&6 | |
ba479fd2 | 1457 | build=$ac_cv_build |
b61ff9c8 BS |
1458 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1459 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1460 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1461 | ||
1462 | ||
1463 | echo "$as_me:$LINENO: checking host system type" >&5 | |
1464 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | |
ba479fd2 NN |
1465 | if test "${ac_cv_host+set}" = set; then |
1466 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1467 | else | |
b61ff9c8 BS |
1468 | ac_cv_host_alias=$host_alias |
1469 | test -z "$ac_cv_host_alias" && | |
1470 | ac_cv_host_alias=$ac_cv_build_alias | |
1471 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | |
1472 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | |
1473 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | |
ba479fd2 NN |
1474 | { (exit 1); exit 1; }; } |
1475 | ||
1476 | fi | |
b61ff9c8 BS |
1477 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 |
1478 | echo "${ECHO_T}$ac_cv_host" >&6 | |
ba479fd2 | 1479 | host=$ac_cv_host |
b61ff9c8 BS |
1480 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1481 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1482 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
1483 | ||
1484 | ||
1485 | echo "$as_me:$LINENO: checking target system type" >&5 | |
1486 | echo $ECHO_N "checking target system type... $ECHO_C" >&6 | |
ba479fd2 NN |
1487 | if test "${ac_cv_target+set}" = set; then |
1488 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1489 | else | |
b61ff9c8 BS |
1490 | ac_cv_target_alias=$target_alias |
1491 | test "x$ac_cv_target_alias" = "x" && | |
1492 | ac_cv_target_alias=$ac_cv_host_alias | |
1493 | ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || | |
1494 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 | |
1495 | echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} | |
ba479fd2 NN |
1496 | { (exit 1); exit 1; }; } |
1497 | ||
1498 | fi | |
b61ff9c8 BS |
1499 | echo "$as_me:$LINENO: result: $ac_cv_target" >&5 |
1500 | echo "${ECHO_T}$ac_cv_target" >&6 | |
ba479fd2 | 1501 | target=$ac_cv_target |
b61ff9c8 BS |
1502 | target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` |
1503 | target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
1504 | target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
ba479fd2 NN |
1505 | |
1506 | ||
1507 | # The aliases save the names the user supplied, while $host etc. | |
1508 | # will get canonicalized. | |
1509 | test -n "$target_alias" && | |
1510 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
1511 | NONENONEs,x,x, && | |
1512 | program_prefix=${target_alias}- | |
1513 | ||
1514 | # Determine the noncanonical target name, for directory use. | |
18fc9bd4 RG |
1515 | case ${build_alias} in |
1516 | "") build_noncanonical=${build} ;; | |
1517 | *) build_noncanonical=${build_alias} ;; | |
1518 | esac | |
1519 | ||
1520 | case ${host_alias} in | |
1521 | "") host_noncanonical=${build_noncanonical} ;; | |
1522 | *) host_noncanonical=${host_alias} ;; | |
1523 | esac | |
1524 | ||
1525 | case ${target_alias} in | |
1526 | "") target_noncanonical=${host_noncanonical} ;; | |
1527 | *) target_noncanonical=${target_alias} ;; | |
1528 | esac | |
1529 | ||
1530 | ||
1531 | ||
8f1529e6 L |
1532 | |
1533 | # Determine the target- and build-specific subdirectories | |
57255173 PB |
1534 | |
1535 | # post-stage1 host modules use a different CC_FOR_BUILD so, in order to | |
1536 | # have matching libraries, they should use host libraries: Makefile.tpl | |
1537 | # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). | |
1538 | # However, they still use the build modules, because the corresponding | |
1539 | # host modules (e.g. bison) are only built for the host when bootstrap | |
1540 | # finishes. So: | |
1541 | # - build_subdir is where we find build modules, and never changes. | |
1542 | # - build_libsubdir is where we find build libraries, and can be overridden. | |
1543 | ||
1544 | # Prefix 'build-' so this never conflicts with target_subdir. | |
18fc9bd4 | 1545 | build_subdir="build-${build_noncanonical}" |
1546bb64 | 1546 | |
b61ff9c8 | 1547 | # Check whether --with-build-libsubdir or --without-build-libsubdir was given. |
1546bb64 | 1548 | if test "${with_build_libsubdir+set}" = set; then |
b61ff9c8 BS |
1549 | withval="$with_build_libsubdir" |
1550 | build_libsubdir="$withval" | |
1546bb64 PB |
1551 | else |
1552 | build_libsubdir="$build_subdir" | |
b61ff9c8 | 1553 | fi; |
18fc9bd4 RG |
1554 | # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories |
1555 | if ( test $srcdir = . && test -d gcc ) \ | |
1556 | || test -d $srcdir/../host-${host_noncanonical}; then | |
1557 | host_subdir="host-${host_noncanonical}" | |
1558 | else | |
1559 | host_subdir=. | |
1560 | fi | |
1561 | # No prefix. | |
1562 | target_subdir=${target_noncanonical} | |
1563 | ||
73458fb7 | 1564 | |
093e61a6 | 1565 | # Set program_transform_name |
13c22933 | 1566 | test "$program_prefix" != NONE && |
b61ff9c8 | 1567 | program_transform_name="s,^,$program_prefix,;$program_transform_name" |
13c22933 JJ |
1568 | # Use a double $ so make ignores it. |
1569 | test "$program_suffix" != NONE && | |
b61ff9c8 | 1570 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" |
ba479fd2 NN |
1571 | # Double any \ or $. echo might interpret backslashes. |
1572 | # By default was `s,x,x', remove it if useless. | |
1573 | cat <<\_ACEOF >conftest.sed | |
1574 | s/[\\$]/&&/g;s/;s,x,x,$// | |
1575 | _ACEOF | |
1576 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | |
b61ff9c8 | 1577 | rm conftest.sed |
13c22933 JJ |
1578 | |
1579 | ||
34a86c2b NN |
1580 | # Check for bogus environment variables. |
1581 | # Test if LIBRARY_PATH contains the notation for the current directory | |
1582 | # since this would lead to problems installing/building glibc. | |
1583 | # LIBRARY_PATH contains the current directory if one of the following | |
1584 | # is true: | |
1585 | # - one of the terminals (":" and ";") is the first or last sign | |
1586 | # - two terminals occur directly after each other | |
1587 | # - the path contains an element with a dot in it | |
b61ff9c8 BS |
1588 | echo "$as_me:$LINENO: checking LIBRARY_PATH variable" >&5 |
1589 | echo $ECHO_N "checking LIBRARY_PATH variable... $ECHO_C" >&6 | |
34a86c2b NN |
1590 | case ${LIBRARY_PATH} in |
1591 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1592 | library_path_setting="contains current directory" | |
1593 | ;; | |
1594 | *) | |
1595 | library_path_setting="ok" | |
1596 | ;; | |
1597 | esac | |
b61ff9c8 BS |
1598 | echo "$as_me:$LINENO: result: $library_path_setting" >&5 |
1599 | echo "${ECHO_T}$library_path_setting" >&6 | |
34a86c2b | 1600 | if test "$library_path_setting" != "ok"; then |
ba479fd2 | 1601 | { { echo "$as_me:$LINENO: error: |
34a86c2b NN |
1602 | *** LIBRARY_PATH shouldn't contain the current directory when |
1603 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1604 | *** and run configure again." >&5 |
1605 | echo "$as_me: error: | |
1606 | *** LIBRARY_PATH shouldn't contain the current directory when | |
1607 | *** building gcc. Please change the environment variable | |
1608 | *** and run configure again." >&2;} | |
1609 | { (exit 1); exit 1; }; } | |
e9a25f70 JL |
1610 | fi |
1611 | ||
34a86c2b NN |
1612 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
1613 | # since this would lead to problems installing/building glibc. | |
1614 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
1615 | # is true: | |
1616 | # - one of the terminals (":" and ";") is the first or last sign | |
1617 | # - two terminals occur directly after each other | |
1618 | # - the path contains an element with a dot in it | |
b61ff9c8 BS |
1619 | echo "$as_me:$LINENO: checking GCC_EXEC_PREFIX variable" >&5 |
1620 | echo $ECHO_N "checking GCC_EXEC_PREFIX variable... $ECHO_C" >&6 | |
34a86c2b NN |
1621 | case ${GCC_EXEC_PREFIX} in |
1622 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
1623 | gcc_exec_prefix_setting="contains current directory" | |
1624 | ;; | |
1625 | *) | |
1626 | gcc_exec_prefix_setting="ok" | |
1627 | ;; | |
1628 | esac | |
b61ff9c8 BS |
1629 | echo "$as_me:$LINENO: result: $gcc_exec_prefix_setting" >&5 |
1630 | echo "${ECHO_T}$gcc_exec_prefix_setting" >&6 | |
34a86c2b | 1631 | if test "$gcc_exec_prefix_setting" != "ok"; then |
ba479fd2 NN |
1632 | { { echo "$as_me:$LINENO: error: |
1633 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when | |
1634 | *** building gcc. Please change the environment variable | |
1635 | *** and run configure again." >&5 | |
1636 | echo "$as_me: error: | |
cafe096b EC |
1637 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
1638 | *** building gcc. Please change the environment variable | |
ba479fd2 NN |
1639 | *** and run configure again." >&2;} |
1640 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1641 | fi |
1642 | ||
1643 | # ----------- | |
1644 | # Directories | |
1645 | # ----------- | |
1646 | ||
1647 | # Specify the local prefix | |
1648 | local_prefix= | |
ba479fd2 | 1649 | |
b61ff9c8 | 1650 | # Check whether --with-local-prefix or --without-local-prefix was given. |
34a86c2b | 1651 | if test "${with_local_prefix+set}" = set; then |
b61ff9c8 BS |
1652 | withval="$with_local_prefix" |
1653 | case "${withval}" in | |
ba479fd2 NN |
1654 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for local include directory prefix" >&5 |
1655 | echo "$as_me: error: bad value ${withval} given for local include directory prefix" >&2;} | |
1656 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1657 | no) ;; |
1658 | *) local_prefix=$with_local_prefix ;; | |
1659 | esac | |
b61ff9c8 | 1660 | fi; |
34a86c2b NN |
1661 | |
1662 | # Default local prefix if it is empty | |
1663 | if test x$local_prefix = x; then | |
1664 | local_prefix=/usr/local | |
1665 | fi | |
1666 | ||
1667 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
1668 | # passed in by the toplevel make and thus we'd get different behavior | |
1669 | # depending on where we built the sources. | |
1670 | gcc_gxx_include_dir= | |
1671 | # Specify the g++ header file directory | |
ba479fd2 | 1672 | |
b61ff9c8 | 1673 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. |
34a86c2b | 1674 | if test "${with_gxx_include_dir+set}" = set; then |
b61ff9c8 BS |
1675 | withval="$with_gxx_include_dir" |
1676 | case "${withval}" in | |
ba479fd2 NN |
1677 | yes) { { echo "$as_me:$LINENO: error: bad value ${withval} given for g++ include directory" >&5 |
1678 | echo "$as_me: error: bad value ${withval} given for g++ include directory" >&2;} | |
1679 | { (exit 1); exit 1; }; } ;; | |
34a86c2b NN |
1680 | no) ;; |
1681 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
1682 | esac | |
b61ff9c8 | 1683 | fi; |
34a86c2b | 1684 | |
0f57bf40 | 1685 | # This logic must match libstdc++-v3/acinclude.m4:GLIBCXX_EXPORT_INSTALL_INFO. |
34a86c2b NN |
1686 | if test x${gcc_gxx_include_dir} = x; then |
1687 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
1688 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
1689 | else | |
0f57bf40 MM |
1690 | libstdcxx_incdir='include/c++/$(version)' |
1691 | if test x$host != x$target; then | |
1692 | libstdcxx_incdir="$target_alias/$libstdcxx_incdir" | |
1693 | fi | |
15c723f3 | 1694 | gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" |
34a86c2b NN |
1695 | fi |
1696 | fi | |
1697 | ||
ba479fd2 | 1698 | |
b61ff9c8 | 1699 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. |
34a86c2b | 1700 | if test "${with_cpp_install_dir+set}" = set; then |
b61ff9c8 BS |
1701 | withval="$with_cpp_install_dir" |
1702 | if test x$withval = xyes; then | |
ba479fd2 NN |
1703 | { { echo "$as_me:$LINENO: error: option --with-cpp-install-dir requires an argument" >&5 |
1704 | echo "$as_me: error: option --with-cpp-install-dir requires an argument" >&2;} | |
1705 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1706 | elif test x$withval != xno; then |
1707 | cpp_install_dir=$withval | |
1708 | fi | |
b61ff9c8 | 1709 | fi; |
34a86c2b | 1710 | |
51b9ff45 | 1711 | # We would like to our source tree to be readonly. However when releases or |
ba479fd2 | 1712 | # pre-releases are generated, the flex/bison generated files as well as the |
51b9ff45 | 1713 | # various formats of manuals need to be included along with the rest of the |
ba479fd2 | 1714 | # sources. Therefore we have --enable-generated-files-in-srcdir to do |
51b9ff45 KC |
1715 | # just that. |
1716 | ||
b61ff9c8 BS |
1717 | echo "$as_me:$LINENO: checking whether to place generated files in the source directory" >&5 |
1718 | echo $ECHO_N "checking whether to place generated files in the source directory... $ECHO_C" >&6 | |
1719 | # Check whether --enable-generated-files-in-srcdir or --disable-generated-files-in-srcdir was given. | |
51b9ff45 | 1720 | if test "${enable_generated_files_in_srcdir+set}" = set; then |
b61ff9c8 BS |
1721 | enableval="$enable_generated_files_in_srcdir" |
1722 | generated_files_in_srcdir=$enableval | |
51b9ff45 | 1723 | else |
03787dfd | 1724 | generated_files_in_srcdir=no |
b61ff9c8 | 1725 | fi; |
1a4b763e | 1726 | |
b61ff9c8 BS |
1727 | echo "$as_me:$LINENO: result: $generated_files_in_srcdir" >&5 |
1728 | echo "${ECHO_T}$generated_files_in_srcdir" >&6 | |
03787dfd KC |
1729 | |
1730 | if test "$generated_files_in_srcdir" = "yes"; then | |
1731 | GENINSRC='' | |
03787dfd KC |
1732 | else |
1733 | GENINSRC='#' | |
03787dfd KC |
1734 | fi |
1735 | ||
1736 | ||
34a86c2b NN |
1737 | # ------------------- |
1738 | # Find default linker | |
1739 | # ------------------- | |
1740 | ||
1741 | # With GNU ld | |
ba479fd2 | 1742 | |
b61ff9c8 | 1743 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
34a86c2b | 1744 | if test "${with_gnu_ld+set}" = set; then |
b61ff9c8 BS |
1745 | withval="$with_gnu_ld" |
1746 | gnu_ld_flag="$with_gnu_ld" | |
34a86c2b NN |
1747 | else |
1748 | gnu_ld_flag=no | |
b61ff9c8 | 1749 | fi; |
6e3f3080 | 1750 | |
63cf211a | 1751 | # With pre-defined ld |
ba479fd2 | 1752 | |
b61ff9c8 | 1753 | # Check whether --with-ld or --without-ld was given. |
34a86c2b | 1754 | if test "${with_ld+set}" = set; then |
b61ff9c8 BS |
1755 | withval="$with_ld" |
1756 | DEFAULT_LINKER="$with_ld" | |
1757 | fi; | |
34a86c2b NN |
1758 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1759 | if test ! -x "$DEFAULT_LINKER"; then | |
99c012a8 BE |
1760 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&5 |
1761 | echo "$as_me: error: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" >&2;} | |
1762 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1763 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1764 | gnu_ld_flag=yes | |
1765 | fi | |
ba479fd2 NN |
1766 | |
1767 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1768 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
ba479fd2 | 1769 | _ACEOF |
34a86c2b NN |
1770 | |
1771 | fi | |
1772 | ||
2091ff66 NF |
1773 | gnu_ld=`if test x"$gnu_ld_flag" = x"yes"; then echo 1; else echo 0; fi` |
1774 | ||
1775 | cat >>confdefs.h <<_ACEOF | |
1776 | #define HAVE_GNU_LD $gnu_ld | |
1777 | _ACEOF | |
1778 | ||
1779 | ||
b61ff9c8 BS |
1780 | echo "$as_me:$LINENO: checking whether a default linker was specified" >&5 |
1781 | echo $ECHO_N "checking whether a default linker was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1782 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
1783 | if test x"$gnu_ld_flag" = x"no"; then | |
b61ff9c8 BS |
1784 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER)" >&5 |
1785 | echo "${ECHO_T}yes ($DEFAULT_LINKER)" >&6 | |
34a86c2b | 1786 | else |
b61ff9c8 BS |
1787 | echo "$as_me:$LINENO: result: yes ($DEFAULT_LINKER - GNU ld)" >&5 |
1788 | echo "${ECHO_T}yes ($DEFAULT_LINKER - GNU ld)" >&6 | |
34a86c2b NN |
1789 | fi |
1790 | else | |
b61ff9c8 BS |
1791 | echo "$as_me:$LINENO: result: no" >&5 |
1792 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1793 | fi |
1794 | ||
d594623a L |
1795 | # With demangler in GNU ld |
1796 | ||
b61ff9c8 | 1797 | # Check whether --with-demangler-in-ld or --without-demangler-in-ld was given. |
d594623a | 1798 | if test "${with_demangler_in_ld+set}" = set; then |
b61ff9c8 BS |
1799 | withval="$with_demangler_in_ld" |
1800 | demangler_in_ld="$with_demangler_in_ld" | |
d594623a L |
1801 | else |
1802 | demangler_in_ld=no | |
b61ff9c8 | 1803 | fi; |
d594623a | 1804 | |
34a86c2b NN |
1805 | # ---------------------- |
1806 | # Find default assembler | |
1807 | # ---------------------- | |
1808 | ||
1809 | # With GNU as | |
ba479fd2 | 1810 | |
b61ff9c8 | 1811 | # Check whether --with-gnu-as or --without-gnu-as was given. |
34a86c2b | 1812 | if test "${with_gnu_as+set}" = set; then |
b61ff9c8 BS |
1813 | withval="$with_gnu_as" |
1814 | gas_flag="$with_gnu_as" | |
34a86c2b NN |
1815 | else |
1816 | gas_flag=no | |
b61ff9c8 | 1817 | fi; |
ab22c1fa | 1818 | |
1a4b763e | 1819 | |
b61ff9c8 | 1820 | # Check whether --with-as or --without-as was given. |
34a86c2b | 1821 | if test "${with_as+set}" = set; then |
b61ff9c8 BS |
1822 | withval="$with_as" |
1823 | DEFAULT_ASSEMBLER="$with_as" | |
1824 | fi; | |
34a86c2b NN |
1825 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1826 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
99c012a8 BE |
1827 | { { echo "$as_me:$LINENO: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&5 |
1828 | echo "$as_me: error: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" >&2;} | |
1829 | { (exit 1); exit 1; }; } | |
34a86c2b NN |
1830 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
1831 | gas_flag=yes | |
1832 | fi | |
ba479fd2 NN |
1833 | |
1834 | cat >>confdefs.h <<_ACEOF | |
34a86c2b | 1835 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
ba479fd2 | 1836 | _ACEOF |
34a86c2b NN |
1837 | |
1838 | fi | |
1839 | ||
dc60b775 CD |
1840 | gnu_as=`if test x"$gas_flag" = x"yes"; then echo 1; else echo 0; fi` |
1841 | ||
1842 | cat >>confdefs.h <<_ACEOF | |
1843 | #define HAVE_GNU_AS $gnu_as | |
1844 | _ACEOF | |
1845 | ||
1846 | ||
b61ff9c8 BS |
1847 | echo "$as_me:$LINENO: checking whether a default assembler was specified" >&5 |
1848 | echo $ECHO_N "checking whether a default assembler was specified... $ECHO_C" >&6 | |
34a86c2b NN |
1849 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
1850 | if test x"$gas_flag" = x"no"; then | |
b61ff9c8 BS |
1851 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER)" >&5 |
1852 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER)" >&6 | |
34a86c2b | 1853 | else |
b61ff9c8 BS |
1854 | echo "$as_me:$LINENO: result: yes ($DEFAULT_ASSEMBLER - GNU as)" >&5 |
1855 | echo "${ECHO_T}yes ($DEFAULT_ASSEMBLER - GNU as)" >&6 | |
34a86c2b NN |
1856 | fi |
1857 | else | |
b61ff9c8 BS |
1858 | echo "$as_me:$LINENO: result: no" >&5 |
1859 | echo "${ECHO_T}no" >&6 | |
34a86c2b NN |
1860 | fi |
1861 | ||
1862 | # --------------- | |
1863 | # Find C compiler | |
1864 | # --------------- | |
1865 | ||
426ca3ca RO |
1866 | # If a non-executable a.out is present (e.g. created by GNU as above even if |
1867 | # invoked with -v only), the IRIX 6 native ld just overwrites the existing | |
1868 | # file, even when creating an executable, so an execution test fails. | |
1869 | # Remove possible default executable files to avoid this. | |
1870 | # | |
1871 | # FIXME: This really belongs into AC_PROG_CC and can be removed once | |
1872 | # Autoconf includes it. | |
1873 | rm -f a.out a.exe b.out | |
1874 | ||
34a86c2b | 1875 | # Find the native compiler |
ba479fd2 NN |
1876 | ac_ext=c |
1877 | ac_cpp='$CPP $CPPFLAGS' | |
1878 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1879 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1880 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1881 | if test -n "$ac_tool_prefix"; then | |
1882 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1883 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
b61ff9c8 BS |
1884 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1885 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
1886 | if test "${ac_cv_prog_CC+set}" = set; then |
1887 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1888 | else | |
1889 | if test -n "$CC"; then | |
1890 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1891 | else | |
1892 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1893 | for as_dir in $PATH | |
1894 | do | |
1895 | IFS=$as_save_IFS | |
1896 | test -z "$as_dir" && as_dir=. | |
1897 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 1898 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
1899 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
1900 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1901 | break 2 | |
1902 | fi | |
1903 | done | |
1904 | done | |
1905 | ||
1906 | fi | |
1907 | fi | |
1908 | CC=$ac_cv_prog_CC | |
1909 | if test -n "$CC"; then | |
b61ff9c8 BS |
1910 | echo "$as_me:$LINENO: result: $CC" >&5 |
1911 | echo "${ECHO_T}$CC" >&6 | |
ba479fd2 | 1912 | else |
b61ff9c8 BS |
1913 | echo "$as_me:$LINENO: result: no" >&5 |
1914 | echo "${ECHO_T}no" >&6 | |
ba479fd2 NN |
1915 | fi |
1916 | ||
1917 | fi | |
1918 | if test -z "$ac_cv_prog_CC"; then | |
1919 | ac_ct_CC=$CC | |
1920 | # Extract the first word of "gcc", so it can be a program name with args. | |
6e3f3080 | 1921 | set dummy gcc; ac_word=$2 |
b61ff9c8 BS |
1922 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1923 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
1924 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
1925 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1926 | else | |
1927 | if test -n "$ac_ct_CC"; then | |
1928 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1929 | else | |
1930 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1931 | for as_dir in $PATH | |
1932 | do | |
1933 | IFS=$as_save_IFS | |
1934 | test -z "$as_dir" && as_dir=. | |
1935 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 1936 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
1937 | ac_cv_prog_ac_ct_CC="gcc" |
1938 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1939 | break 2 | |
1940 | fi | |
1941 | done | |
1942 | done | |
1943 | ||
1944 | fi | |
1945 | fi | |
1946 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1947 | if test -n "$ac_ct_CC"; then | |
b61ff9c8 BS |
1948 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
1949 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
ba479fd2 | 1950 | else |
b61ff9c8 BS |
1951 | echo "$as_me:$LINENO: result: no" >&5 |
1952 | echo "${ECHO_T}no" >&6 | |
ba479fd2 NN |
1953 | fi |
1954 | ||
b61ff9c8 | 1955 | CC=$ac_ct_CC |
ba479fd2 NN |
1956 | else |
1957 | CC="$ac_cv_prog_CC" | |
1958 | fi | |
1959 | ||
1960 | if test -z "$CC"; then | |
b61ff9c8 BS |
1961 | if test -n "$ac_tool_prefix"; then |
1962 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
ba479fd2 | 1963 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
b61ff9c8 BS |
1964 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
1965 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
1966 | if test "${ac_cv_prog_CC+set}" = set; then |
1967 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cd9e5e7c MK |
1968 | else |
1969 | if test -n "$CC"; then | |
1970 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1971 | else | |
ba479fd2 NN |
1972 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
1973 | for as_dir in $PATH | |
1974 | do | |
1975 | IFS=$as_save_IFS | |
1976 | test -z "$as_dir" && as_dir=. | |
1977 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 1978 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
1979 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
1980 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1981 | break 2 | |
1982 | fi | |
1983 | done | |
1984 | done | |
1985 | ||
cd9e5e7c MK |
1986 | fi |
1987 | fi | |
ba479fd2 | 1988 | CC=$ac_cv_prog_CC |
cd9e5e7c | 1989 | if test -n "$CC"; then |
b61ff9c8 BS |
1990 | echo "$as_me:$LINENO: result: $CC" >&5 |
1991 | echo "${ECHO_T}$CC" >&6 | |
2f41c1d6 | 1992 | else |
b61ff9c8 BS |
1993 | echo "$as_me:$LINENO: result: no" >&5 |
1994 | echo "${ECHO_T}no" >&6 | |
2f41c1d6 PB |
1995 | fi |
1996 | ||
b61ff9c8 BS |
1997 | fi |
1998 | if test -z "$ac_cv_prog_CC"; then | |
1999 | ac_ct_CC=$CC | |
2000 | # Extract the first word of "cc", so it can be a program name with args. | |
2001 | set dummy cc; ac_word=$2 | |
2002 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2003 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2004 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2005 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2006 | else | |
2007 | if test -n "$ac_ct_CC"; then | |
2008 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2009 | else | |
2010 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2011 | for as_dir in $PATH | |
2012 | do | |
2013 | IFS=$as_save_IFS | |
2014 | test -z "$as_dir" && as_dir=. | |
2015 | for ac_exec_ext in '' $ac_executable_extensions; do | |
2016 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2017 | ac_cv_prog_ac_ct_CC="cc" | |
2018 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2019 | break 2 | |
1a4b763e | 2020 | fi |
b61ff9c8 BS |
2021 | done |
2022 | done | |
2023 | ||
2024 | fi | |
2025 | fi | |
2026 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2027 | if test -n "$ac_ct_CC"; then | |
2028 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2029 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
2030 | else | |
2031 | echo "$as_me:$LINENO: result: no" >&5 | |
2032 | echo "${ECHO_T}no" >&6 | |
2033 | fi | |
2034 | ||
2035 | CC=$ac_ct_CC | |
2036 | else | |
2037 | CC="$ac_cv_prog_CC" | |
2038 | fi | |
2039 | ||
ba479fd2 | 2040 | fi |
6e3f3080 NN |
2041 | if test -z "$CC"; then |
2042 | # Extract the first word of "cc", so it can be a program name with args. | |
2043 | set dummy cc; ac_word=$2 | |
b61ff9c8 BS |
2044 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2045 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
2046 | if test "${ac_cv_prog_CC+set}" = set; then |
2047 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6e3f3080 NN |
2048 | else |
2049 | if test -n "$CC"; then | |
2050 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2051 | else | |
2052 | ac_prog_rejected=no | |
ba479fd2 NN |
2053 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2054 | for as_dir in $PATH | |
2055 | do | |
2056 | IFS=$as_save_IFS | |
2057 | test -z "$as_dir" && as_dir=. | |
2058 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 2059 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
2060 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
2061 | ac_prog_rejected=yes | |
2062 | continue | |
2063 | fi | |
2064 | ac_cv_prog_CC="cc" | |
2065 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2066 | break 2 | |
2067 | fi | |
2068 | done | |
2069 | done | |
2070 | ||
6e3f3080 NN |
2071 | if test $ac_prog_rejected = yes; then |
2072 | # We found a bogon in the path, so make sure we never use it. | |
2073 | set dummy $ac_cv_prog_CC | |
2074 | shift | |
ba479fd2 | 2075 | if test $# != 0; then |
6e3f3080 NN |
2076 | # We chose a different compiler from the bogus one. |
2077 | # However, it has the same basename, so the bogon will be chosen | |
2078 | # first if we set CC to just the basename; use the full file name. | |
2079 | shift | |
ba479fd2 | 2080 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
e9a25f70 | 2081 | fi |
6e3f3080 NN |
2082 | fi |
2083 | fi | |
2084 | fi | |
ba479fd2 | 2085 | CC=$ac_cv_prog_CC |
6e3f3080 | 2086 | if test -n "$CC"; then |
b61ff9c8 BS |
2087 | echo "$as_me:$LINENO: result: $CC" >&5 |
2088 | echo "${ECHO_T}$CC" >&6 | |
e9a25f70 | 2089 | else |
b61ff9c8 BS |
2090 | echo "$as_me:$LINENO: result: no" >&5 |
2091 | echo "${ECHO_T}no" >&6 | |
e9a25f70 | 2092 | fi |
6e3f3080 | 2093 | |
ba479fd2 NN |
2094 | fi |
2095 | if test -z "$CC"; then | |
2096 | if test -n "$ac_tool_prefix"; then | |
b61ff9c8 | 2097 | for ac_prog in cl |
ba479fd2 NN |
2098 | do |
2099 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2100 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
b61ff9c8 BS |
2101 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2102 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
2103 | if test "${ac_cv_prog_CC+set}" = set; then |
2104 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
093e61a6 | 2105 | else |
6e3f3080 NN |
2106 | if test -n "$CC"; then |
2107 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2108 | else | |
ba479fd2 NN |
2109 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
2110 | for as_dir in $PATH | |
2111 | do | |
2112 | IFS=$as_save_IFS | |
2113 | test -z "$as_dir" && as_dir=. | |
2114 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 2115 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
2116 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
2117 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2118 | break 2 | |
2119 | fi | |
2120 | done | |
2121 | done | |
2122 | ||
093e61a6 | 2123 | fi |
6e3f3080 | 2124 | fi |
ba479fd2 | 2125 | CC=$ac_cv_prog_CC |
6e3f3080 | 2126 | if test -n "$CC"; then |
b61ff9c8 BS |
2127 | echo "$as_me:$LINENO: result: $CC" >&5 |
2128 | echo "${ECHO_T}$CC" >&6 | |
6e3f3080 | 2129 | else |
b61ff9c8 BS |
2130 | echo "$as_me:$LINENO: result: no" >&5 |
2131 | echo "${ECHO_T}no" >&6 | |
093e61a6 | 2132 | fi |
cafe096b | 2133 | |
ba479fd2 NN |
2134 | test -n "$CC" && break |
2135 | done | |
2136 | fi | |
2137 | if test -z "$CC"; then | |
2138 | ac_ct_CC=$CC | |
b61ff9c8 | 2139 | for ac_prog in cl |
ba479fd2 NN |
2140 | do |
2141 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2142 | set dummy $ac_prog; ac_word=$2 | |
b61ff9c8 BS |
2143 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
2144 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
2145 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then |
2146 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2147 | else | |
2148 | if test -n "$ac_ct_CC"; then | |
2149 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2150 | else | |
2151 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2152 | for as_dir in $PATH | |
2153 | do | |
2154 | IFS=$as_save_IFS | |
2155 | test -z "$as_dir" && as_dir=. | |
2156 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 2157 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
2158 | ac_cv_prog_ac_ct_CC="$ac_prog" |
2159 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2160 | break 2 | |
2161 | fi | |
2162 | done | |
2163 | done | |
6e3f3080 | 2164 | |
ba479fd2 NN |
2165 | fi |
2166 | fi | |
2167 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2168 | if test -n "$ac_ct_CC"; then | |
b61ff9c8 BS |
2169 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 |
2170 | echo "${ECHO_T}$ac_ct_CC" >&6 | |
ba479fd2 | 2171 | else |
b61ff9c8 BS |
2172 | echo "$as_me:$LINENO: result: no" >&5 |
2173 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 2174 | fi |
6e3f3080 | 2175 | |
ba479fd2 NN |
2176 | test -n "$ac_ct_CC" && break |
2177 | done | |
63cf211a | 2178 | |
b61ff9c8 | 2179 | CC=$ac_ct_CC |
ba479fd2 NN |
2180 | fi |
2181 | ||
2182 | fi | |
2183 | ||
2184 | ||
2185 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2186 | See \`config.log' for more details." >&5 | |
2187 | echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2188 | See \`config.log' for more details." >&2;} | |
2189 | { (exit 1); exit 1; }; } | |
2190 | ||
2191 | # Provide some information about the compiler. | |
b61ff9c8 BS |
2192 | echo "$as_me:$LINENO:" \ |
2193 | "checking for C compiler version" >&5 | |
ba479fd2 | 2194 | ac_compiler=`set X $ac_compile; echo $2` |
b61ff9c8 BS |
2195 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 |
2196 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
ba479fd2 NN |
2197 | ac_status=$? |
2198 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2199 | (exit $ac_status); } | |
b61ff9c8 BS |
2200 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 |
2201 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
ba479fd2 NN |
2202 | ac_status=$? |
2203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2204 | (exit $ac_status); } | |
b61ff9c8 BS |
2205 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 |
2206 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
ba479fd2 NN |
2207 | ac_status=$? |
2208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2209 | (exit $ac_status); } | |
2210 | ||
2211 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2212 | /* confdefs.h. */ |
2213 | _ACEOF | |
2214 | cat confdefs.h >>conftest.$ac_ext | |
2215 | cat >>conftest.$ac_ext <<_ACEOF | |
2216 | /* end confdefs.h. */ | |
2217 | ||
2218 | int | |
2219 | main () | |
2220 | { | |
63cf211a | 2221 | |
ba479fd2 NN |
2222 | ; |
2223 | return 0; | |
2224 | } | |
2225 | _ACEOF | |
2226 | ac_clean_files_save=$ac_clean_files | |
2227 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2228 | # Try to create an executable without -o first, disregard a.out. | |
2229 | # It will help us diagnose broken compilers, and finding out an intuition | |
2230 | # of exeext. | |
b61ff9c8 BS |
2231 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 |
2232 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
ba479fd2 | 2233 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
b61ff9c8 BS |
2234 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 |
2235 | (eval $ac_link_default) 2>&5 | |
ba479fd2 NN |
2236 | ac_status=$? |
2237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2238 | (exit $ac_status); }; then | |
b61ff9c8 BS |
2239 | # Find the output, starting from the most likely. This scheme is |
2240 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2241 | # resort. | |
2242 | ||
2243 | # Be careful to initialize this variable, since it used to be cached. | |
2244 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2245 | ac_cv_exeext= | |
2246 | # b.out is created by i960 compilers. | |
2247 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
ba479fd2 NN |
2248 | do |
2249 | test -f "$ac_file" || continue | |
2250 | case $ac_file in | |
b61ff9c8 BS |
2251 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) |
2252 | ;; | |
2253 | conftest.$ac_ext ) | |
2254 | # This is the source file. | |
86da66b5 | 2255 | ;; |
ba479fd2 | 2256 | [ab].out ) |
86da66b5 HPN |
2257 | # We found the default executable, but exeext='' is most |
2258 | # certainly right. | |
2259 | break;; | |
ba479fd2 | 2260 | *.* ) |
b61ff9c8 BS |
2261 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
2262 | # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2263 | # but it would be cool to find out if it's true. Does anybody | |
2264 | # maintain Libtool? --akim. | |
2265 | export ac_cv_exeext | |
86da66b5 | 2266 | break;; |
ba479fd2 | 2267 | * ) |
86da66b5 | 2268 | break;; |
ba479fd2 NN |
2269 | esac |
2270 | done | |
2271 | else | |
2272 | echo "$as_me: failed program was:" >&5 | |
2273 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2274 | ||
2275 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2276 | See \`config.log' for more details." >&5 | |
2277 | echo "$as_me: error: C compiler cannot create executables | |
2278 | See \`config.log' for more details." >&2;} | |
2279 | { (exit 77); exit 77; }; } | |
2280 | fi | |
2281 | ||
2282 | ac_exeext=$ac_cv_exeext | |
b61ff9c8 BS |
2283 | echo "$as_me:$LINENO: result: $ac_file" >&5 |
2284 | echo "${ECHO_T}$ac_file" >&6 | |
ba479fd2 | 2285 | |
b61ff9c8 | 2286 | # Check the compiler produces executables we can run. If not, either |
ba479fd2 | 2287 | # the compiler is broken, or we cross compile. |
b61ff9c8 BS |
2288 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 |
2289 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
ba479fd2 NN |
2290 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 |
2291 | # If not cross compiling, check that we can run a simple program. | |
2292 | if test "$cross_compiling" != yes; then | |
2293 | if { ac_try='./$ac_file' | |
b61ff9c8 BS |
2294 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2295 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2296 | ac_status=$? |
2297 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2298 | (exit $ac_status); }; }; then | |
2299 | cross_compiling=no | |
6e3f3080 | 2300 | else |
ba479fd2 NN |
2301 | if test "$cross_compiling" = maybe; then |
2302 | cross_compiling=yes | |
2303 | else | |
2304 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2305 | If you meant to cross compile, use \`--host'. | |
2306 | See \`config.log' for more details." >&5 | |
2307 | echo "$as_me: error: cannot run C compiled programs. | |
2308 | If you meant to cross compile, use \`--host'. | |
2309 | See \`config.log' for more details." >&2;} | |
2310 | { (exit 1); exit 1; }; } | |
2311 | fi | |
6e3f3080 NN |
2312 | fi |
2313 | fi | |
b61ff9c8 BS |
2314 | echo "$as_me:$LINENO: result: yes" >&5 |
2315 | echo "${ECHO_T}yes" >&6 | |
ba479fd2 NN |
2316 | |
2317 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2318 | ac_clean_files=$ac_clean_files_save | |
b61ff9c8 | 2319 | # Check the compiler produces executables we can run. If not, either |
ba479fd2 | 2320 | # the compiler is broken, or we cross compile. |
b61ff9c8 BS |
2321 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 |
2322 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2323 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2324 | echo "${ECHO_T}$cross_compiling" >&6 | |
2325 | ||
2326 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2327 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2328 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2329 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
2330 | ac_status=$? |
2331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2332 | (exit $ac_status); }; then | |
2333 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2334 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2335 | # work properly (i.e., refer to `conftest.exe'), while it won't with | |
2336 | # `rm'. | |
2337 | for ac_file in conftest.exe conftest conftest.*; do | |
2338 | test -f "$ac_file" || continue | |
2339 | case $ac_file in | |
b61ff9c8 | 2340 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; |
ba479fd2 | 2341 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
b61ff9c8 | 2342 | export ac_cv_exeext |
86da66b5 | 2343 | break;; |
ba479fd2 NN |
2344 | * ) break;; |
2345 | esac | |
2346 | done | |
e9a25f70 | 2347 | else |
ba479fd2 NN |
2348 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link |
2349 | See \`config.log' for more details." >&5 | |
2350 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2351 | See \`config.log' for more details." >&2;} | |
2352 | { (exit 1); exit 1; }; } | |
2353 | fi | |
2354 | ||
2355 | rm -f conftest$ac_cv_exeext | |
b61ff9c8 BS |
2356 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 |
2357 | echo "${ECHO_T}$ac_cv_exeext" >&6 | |
ba479fd2 NN |
2358 | |
2359 | rm -f conftest.$ac_ext | |
2360 | EXEEXT=$ac_cv_exeext | |
2361 | ac_exeext=$EXEEXT | |
b61ff9c8 BS |
2362 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 |
2363 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
ba479fd2 NN |
2364 | if test "${ac_cv_objext+set}" = set; then |
2365 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2366 | else | |
2367 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2368 | /* confdefs.h. */ |
2369 | _ACEOF | |
2370 | cat confdefs.h >>conftest.$ac_ext | |
2371 | cat >>conftest.$ac_ext <<_ACEOF | |
2372 | /* end confdefs.h. */ | |
2373 | ||
2374 | int | |
2375 | main () | |
2376 | { | |
6e3f3080 | 2377 | |
ba479fd2 NN |
2378 | ; |
2379 | return 0; | |
2380 | } | |
2381 | _ACEOF | |
2382 | rm -f conftest.o conftest.obj | |
b61ff9c8 BS |
2383 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
2384 | (eval $ac_compile) 2>&5 | |
ba479fd2 NN |
2385 | ac_status=$? |
2386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2387 | (exit $ac_status); }; then | |
b61ff9c8 | 2388 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do |
ba479fd2 | 2389 | case $ac_file in |
b61ff9c8 | 2390 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; |
ba479fd2 NN |
2391 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
2392 | break;; | |
2393 | esac | |
2394 | done | |
63cf211a | 2395 | else |
ba479fd2 NN |
2396 | echo "$as_me: failed program was:" >&5 |
2397 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2398 | ||
2399 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2400 | See \`config.log' for more details." >&5 | |
2401 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2402 | See \`config.log' for more details." >&2;} | |
2403 | { (exit 1); exit 1; }; } | |
2404 | fi | |
2405 | ||
2406 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2407 | fi | |
b61ff9c8 BS |
2408 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 |
2409 | echo "${ECHO_T}$ac_cv_objext" >&6 | |
ba479fd2 NN |
2410 | OBJEXT=$ac_cv_objext |
2411 | ac_objext=$OBJEXT | |
b61ff9c8 BS |
2412 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 |
2413 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
ba479fd2 NN |
2414 | if test "${ac_cv_c_compiler_gnu+set}" = set; then |
2415 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2416 | else | |
2417 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2418 | /* confdefs.h. */ |
2419 | _ACEOF | |
2420 | cat confdefs.h >>conftest.$ac_ext | |
2421 | cat >>conftest.$ac_ext <<_ACEOF | |
2422 | /* end confdefs.h. */ | |
2423 | ||
2424 | int | |
2425 | main () | |
2426 | { | |
2427 | #ifndef __GNUC__ | |
2428 | choke me | |
2429 | #endif | |
6e3f3080 | 2430 | |
ba479fd2 NN |
2431 | ; |
2432 | return 0; | |
2433 | } | |
2434 | _ACEOF | |
2435 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
2436 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
2437 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 2438 | ac_status=$? |
86da66b5 HPN |
2439 | grep -v '^ *+' conftest.er1 >conftest.err |
2440 | rm -f conftest.er1 | |
2441 | cat conftest.err >&5 | |
ba479fd2 | 2442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
2443 | (exit $ac_status); } && |
2444 | { ac_try='test -z "$ac_c_werror_flag" | |
2445 | || test ! -s conftest.err' | |
2446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2447 | (eval $ac_try) 2>&5 | |
2448 | ac_status=$? | |
2449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2450 | (exit $ac_status); }; } && | |
2451 | { ac_try='test -s conftest.$ac_objext' | |
2452 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2453 | (eval $ac_try) 2>&5 | |
2454 | ac_status=$? | |
2455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2456 | (exit $ac_status); }; }; then | |
ba479fd2 NN |
2457 | ac_compiler_gnu=yes |
2458 | else | |
2459 | echo "$as_me: failed program was:" >&5 | |
2460 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2461 | ||
b61ff9c8 | 2462 | ac_compiler_gnu=no |
ba479fd2 | 2463 | fi |
b61ff9c8 | 2464 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
2465 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
2466 | ||
2467 | fi | |
b61ff9c8 BS |
2468 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 |
2469 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
ba479fd2 NN |
2470 | GCC=`test $ac_compiler_gnu = yes && echo yes` |
2471 | ac_test_CFLAGS=${CFLAGS+set} | |
2472 | ac_save_CFLAGS=$CFLAGS | |
b61ff9c8 BS |
2473 | CFLAGS="-g" |
2474 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2475 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
ba479fd2 NN |
2476 | if test "${ac_cv_prog_cc_g+set}" = set; then |
2477 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2478 | else | |
b61ff9c8 | 2479 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
2480 | /* confdefs.h. */ |
2481 | _ACEOF | |
2482 | cat confdefs.h >>conftest.$ac_ext | |
2483 | cat >>conftest.$ac_ext <<_ACEOF | |
2484 | /* end confdefs.h. */ | |
2485 | ||
2486 | int | |
2487 | main () | |
2488 | { | |
2489 | ||
2490 | ; | |
2491 | return 0; | |
2492 | } | |
2493 | _ACEOF | |
2494 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
2495 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
2496 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 2497 | ac_status=$? |
86da66b5 HPN |
2498 | grep -v '^ *+' conftest.er1 >conftest.err |
2499 | rm -f conftest.er1 | |
2500 | cat conftest.err >&5 | |
ba479fd2 | 2501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
2502 | (exit $ac_status); } && |
2503 | { ac_try='test -z "$ac_c_werror_flag" | |
2504 | || test ! -s conftest.err' | |
2505 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2506 | (eval $ac_try) 2>&5 | |
2507 | ac_status=$? | |
2508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2509 | (exit $ac_status); }; } && | |
2510 | { ac_try='test -s conftest.$ac_objext' | |
2511 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2512 | (eval $ac_try) 2>&5 | |
2513 | ac_status=$? | |
2514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2515 | (exit $ac_status); }; }; then | |
1a4b763e BS |
2516 | ac_cv_prog_cc_g=yes |
2517 | else | |
2518 | echo "$as_me: failed program was:" >&5 | |
2519 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2520 | ||
b61ff9c8 BS |
2521 | ac_cv_prog_cc_g=no |
2522 | fi | |
2523 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2524 | fi | |
2525 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2526 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
2527 | if test "$ac_test_CFLAGS" = set; then | |
2528 | CFLAGS=$ac_save_CFLAGS | |
2529 | elif test $ac_cv_prog_cc_g = yes; then | |
2530 | if test "$GCC" = yes; then | |
2531 | CFLAGS="-g -O2" | |
2532 | else | |
2533 | CFLAGS="-g" | |
2534 | fi | |
2535 | else | |
2536 | if test "$GCC" = yes; then | |
2537 | CFLAGS="-O2" | |
2538 | else | |
2539 | CFLAGS= | |
2540 | fi | |
2541 | fi | |
2542 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 | |
2543 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2544 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2545 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2546 | else | |
2547 | ac_cv_prog_cc_stdc=no | |
2548 | ac_save_CC=$CC | |
2549 | cat >conftest.$ac_ext <<_ACEOF | |
1a4b763e BS |
2550 | /* confdefs.h. */ |
2551 | _ACEOF | |
2552 | cat confdefs.h >>conftest.$ac_ext | |
2553 | cat >>conftest.$ac_ext <<_ACEOF | |
2554 | /* end confdefs.h. */ | |
b61ff9c8 BS |
2555 | #include <stdarg.h> |
2556 | #include <stdio.h> | |
2557 | #include <sys/types.h> | |
2558 | #include <sys/stat.h> | |
2559 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2560 | struct buf { int x; }; | |
2561 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2562 | static char *e (p, i) | |
2563 | char **p; | |
2564 | int i; | |
1a4b763e | 2565 | { |
b61ff9c8 | 2566 | return p[i]; |
1a4b763e | 2567 | } |
b61ff9c8 BS |
2568 | static char *f (char * (*g) (char **, int), char **p, ...) |
2569 | { | |
2570 | char *s; | |
2571 | va_list v; | |
2572 | va_start (v,p); | |
2573 | s = g (p, va_arg (v,int)); | |
2574 | va_end (v); | |
2575 | return s; | |
2576 | } | |
2577 | ||
2578 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2579 | function prototypes and stuff, but not '\xHH' hex character constants. | |
2580 | These don't provoke an error unfortunately, instead are silently treated | |
2581 | as 'x'. The following induces an error, until -std1 is added to get | |
2582 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2583 | array size at least. It's necessary to write '\x00'==0 to get something | |
2584 | that's true only with -std1. */ | |
2585 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2586 | ||
2587 | int test (int i, double x); | |
2588 | struct s1 {int (*f) (int a);}; | |
2589 | struct s2 {int (*f) (double a);}; | |
2590 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2591 | int argc; | |
2592 | char **argv; | |
2593 | int | |
2594 | main () | |
2595 | { | |
2596 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2597 | ; | |
2598 | return 0; | |
2599 | } | |
2600 | _ACEOF | |
2601 | # Don't try gcc -ansi; that turns off useful extensions and | |
2602 | # breaks some systems' header files. | |
2603 | # AIX -qlanglvl=ansi | |
2604 | # Ultrix and OSF/1 -std1 | |
2605 | # HP-UX 10.20 and later -Ae | |
2606 | # HP-UX older versions -Aa -D_HPUX_SOURCE | |
2607 | # SVR4 -Xc -D__EXTENSIONS__ | |
2608 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2609 | do | |
2610 | CC="$ac_save_CC $ac_arg" | |
2611 | rm -f conftest.$ac_objext | |
2612 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2613 | (eval $ac_compile) 2>conftest.er1 | |
2614 | ac_status=$? | |
1a4b763e BS |
2615 | grep -v '^ *+' conftest.er1 >conftest.err |
2616 | rm -f conftest.er1 | |
2617 | cat conftest.err >&5 | |
2f41c1d6 | 2618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
2619 | (exit $ac_status); } && |
2620 | { ac_try='test -z "$ac_c_werror_flag" | |
2621 | || test ! -s conftest.err' | |
2622 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2623 | (eval $ac_try) 2>&5 | |
2624 | ac_status=$? | |
2625 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2626 | (exit $ac_status); }; } && | |
2627 | { ac_try='test -s conftest.$ac_objext' | |
2628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2629 | (eval $ac_try) 2>&5 | |
2630 | ac_status=$? | |
2631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2632 | (exit $ac_status); }; }; then | |
2633 | ac_cv_prog_cc_stdc=$ac_arg | |
2634 | break | |
1a4b763e BS |
2635 | else |
2636 | echo "$as_me: failed program was:" >&5 | |
2637 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2638 | ||
b61ff9c8 BS |
2639 | fi |
2640 | rm -f conftest.err conftest.$ac_objext | |
2641 | done | |
2642 | rm -f conftest.$ac_ext conftest.$ac_objext | |
2643 | CC=$ac_save_CC | |
2644 | ||
2645 | fi | |
2646 | ||
2647 | case "x$ac_cv_prog_cc_stdc" in | |
2648 | x|xno) | |
2649 | echo "$as_me:$LINENO: result: none needed" >&5 | |
2650 | echo "${ECHO_T}none needed" >&6 ;; | |
2651 | *) | |
2652 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2653 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2654 | CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2655 | esac | |
2656 | ||
2657 | # Some people use a C++ compiler to compile C. Since we use `exit', | |
2658 | # in C++ we need to declare it. In case someone uses the same compiler | |
2659 | # for both compiling C and C++ we need to have the C++ compiler decide | |
2660 | # the declaration of exit, since it's the most demanding environment. | |
2661 | cat >conftest.$ac_ext <<_ACEOF | |
2662 | #ifndef __cplusplus | |
2663 | choke me | |
2664 | #endif | |
2665 | _ACEOF | |
2666 | rm -f conftest.$ac_objext | |
2667 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2668 | (eval $ac_compile) 2>conftest.er1 | |
2669 | ac_status=$? | |
2670 | grep -v '^ *+' conftest.er1 >conftest.err | |
2671 | rm -f conftest.er1 | |
2672 | cat conftest.err >&5 | |
2673 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2674 | (exit $ac_status); } && | |
2675 | { ac_try='test -z "$ac_c_werror_flag" | |
2676 | || test ! -s conftest.err' | |
2677 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2678 | (eval $ac_try) 2>&5 | |
2679 | ac_status=$? | |
2680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2681 | (exit $ac_status); }; } && | |
2682 | { ac_try='test -s conftest.$ac_objext' | |
2683 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2684 | (eval $ac_try) 2>&5 | |
2685 | ac_status=$? | |
2686 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2687 | (exit $ac_status); }; }; then | |
2688 | for ac_declaration in \ | |
2689 | '' \ | |
2690 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ | |
2691 | 'extern "C" void std::exit (int); using std::exit;' \ | |
2692 | 'extern "C" void exit (int) throw ();' \ | |
2693 | 'extern "C" void exit (int);' \ | |
2694 | 'void exit (int);' | |
2695 | do | |
2696 | cat >conftest.$ac_ext <<_ACEOF | |
1a4b763e BS |
2697 | /* confdefs.h. */ |
2698 | _ACEOF | |
2699 | cat confdefs.h >>conftest.$ac_ext | |
2700 | cat >>conftest.$ac_ext <<_ACEOF | |
2701 | /* end confdefs.h. */ | |
b61ff9c8 BS |
2702 | $ac_declaration |
2703 | #include <stdlib.h> | |
1a4b763e BS |
2704 | int |
2705 | main () | |
2706 | { | |
b61ff9c8 | 2707 | exit (42); |
1a4b763e BS |
2708 | ; |
2709 | return 0; | |
2710 | } | |
2711 | _ACEOF | |
2712 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
2713 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
2714 | (eval $ac_compile) 2>conftest.er1 | |
2f41c1d6 | 2715 | ac_status=$? |
1a4b763e BS |
2716 | grep -v '^ *+' conftest.er1 >conftest.err |
2717 | rm -f conftest.er1 | |
2718 | cat conftest.err >&5 | |
2f41c1d6 | 2719 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
2720 | (exit $ac_status); } && |
2721 | { ac_try='test -z "$ac_c_werror_flag" | |
2722 | || test ! -s conftest.err' | |
2723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2724 | (eval $ac_try) 2>&5 | |
2725 | ac_status=$? | |
2726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2727 | (exit $ac_status); }; } && | |
2728 | { ac_try='test -s conftest.$ac_objext' | |
2729 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2730 | (eval $ac_try) 2>&5 | |
2731 | ac_status=$? | |
2732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2733 | (exit $ac_status); }; }; then | |
2734 | : | |
ab22c1fa CF |
2735 | else |
2736 | echo "$as_me: failed program was:" >&5 | |
2737 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2738 | ||
b61ff9c8 | 2739 | continue |
2f41c1d6 | 2740 | fi |
b61ff9c8 BS |
2741 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2742 | cat >conftest.$ac_ext <<_ACEOF | |
ab22c1fa CF |
2743 | /* confdefs.h. */ |
2744 | _ACEOF | |
2745 | cat confdefs.h >>conftest.$ac_ext | |
2746 | cat >>conftest.$ac_ext <<_ACEOF | |
2747 | /* end confdefs.h. */ | |
b61ff9c8 | 2748 | $ac_declaration |
2f41c1d6 PB |
2749 | int |
2750 | main () | |
2751 | { | |
b61ff9c8 | 2752 | exit (42); |
2f41c1d6 PB |
2753 | ; |
2754 | return 0; | |
2755 | } | |
2756 | _ACEOF | |
b61ff9c8 BS |
2757 | rm -f conftest.$ac_objext |
2758 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2759 | (eval $ac_compile) 2>conftest.er1 | |
2f41c1d6 | 2760 | ac_status=$? |
ab22c1fa CF |
2761 | grep -v '^ *+' conftest.er1 >conftest.err |
2762 | rm -f conftest.er1 | |
2763 | cat conftest.err >&5 | |
a3bba767 | 2764 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
2765 | (exit $ac_status); } && |
2766 | { ac_try='test -z "$ac_c_werror_flag" | |
2767 | || test ! -s conftest.err' | |
2768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2769 | (eval $ac_try) 2>&5 | |
2770 | ac_status=$? | |
2771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2772 | (exit $ac_status); }; } && | |
2773 | { ac_try='test -s conftest.$ac_objext' | |
2774 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2775 | (eval $ac_try) 2>&5 | |
2776 | ac_status=$? | |
2777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2778 | (exit $ac_status); }; }; then | |
2779 | break | |
ab22c1fa CF |
2780 | else |
2781 | echo "$as_me: failed program was:" >&5 | |
2782 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2783 | ||
2f41c1d6 | 2784 | fi |
b61ff9c8 | 2785 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
2f41c1d6 | 2786 | done |
b61ff9c8 BS |
2787 | rm -f conftest* |
2788 | if test -n "$ac_declaration"; then | |
2789 | echo '#ifdef __cplusplus' >>confdefs.h | |
2790 | echo $ac_declaration >>confdefs.h | |
2791 | echo '#endif' >>confdefs.h | |
2f41c1d6 | 2792 | fi |
2f41c1d6 | 2793 | |
b61ff9c8 BS |
2794 | else |
2795 | echo "$as_me: failed program was:" >&5 | |
2796 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ba479fd2 | 2797 | |
b61ff9c8 BS |
2798 | fi |
2799 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
ba479fd2 NN |
2800 | ac_ext=c |
2801 | ac_cpp='$CPP $CPPFLAGS' | |
2802 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2803 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2804 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2805 | ||
2806 | if test "x$CC" != xcc; then | |
b61ff9c8 BS |
2807 | echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 |
2808 | echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6 | |
ba479fd2 | 2809 | else |
b61ff9c8 BS |
2810 | echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 |
2811 | echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6 | |
ba479fd2 NN |
2812 | fi |
2813 | set dummy $CC; ac_cc=`echo $2 | | |
2814 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
b61ff9c8 | 2815 | if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then |
ba479fd2 NN |
2816 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
2817 | else | |
2818 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2819 | /* confdefs.h. */ |
2820 | _ACEOF | |
2821 | cat confdefs.h >>conftest.$ac_ext | |
2822 | cat >>conftest.$ac_ext <<_ACEOF | |
2823 | /* end confdefs.h. */ | |
2824 | ||
2825 | int | |
2826 | main () | |
2827 | { | |
2828 | ||
2829 | ; | |
2830 | return 0; | |
2831 | } | |
2832 | _ACEOF | |
3ec83fc2 RH |
2833 | # Make sure it works both with $CC and with simple cc. |
2834 | # We do the test twice because some compilers refuse to overwrite an | |
2835 | # existing .o file with -o, though they will create one. | |
b61ff9c8 BS |
2836 | ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2837 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2838 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2839 | ac_status=$? |
2840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2841 | (exit $ac_status); } && | |
b61ff9c8 BS |
2842 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2843 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2844 | ac_status=$? |
2845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2846 | (exit $ac_status); }; | |
3ec83fc2 RH |
2847 | then |
2848 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
2849 | if test "x$CC" != xcc; then | |
2850 | # Test first that cc exists at all. | |
ba479fd2 | 2851 | if { ac_try='cc -c conftest.$ac_ext >&5' |
b61ff9c8 BS |
2852 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2853 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2854 | ac_status=$? |
2855 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2856 | (exit $ac_status); }; }; then | |
b61ff9c8 BS |
2857 | ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5' |
2858 | if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2859 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2860 | ac_status=$? |
2861 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2862 | (exit $ac_status); } && | |
b61ff9c8 BS |
2863 | test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
2864 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
2865 | ac_status=$? |
2866 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2867 | (exit $ac_status); }; | |
3ec83fc2 | 2868 | then |
86da66b5 HPN |
2869 | # cc works too. |
2870 | : | |
3ec83fc2 | 2871 | else |
86da66b5 HPN |
2872 | # cc exists but doesn't like -o. |
2873 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
3ec83fc2 RH |
2874 | fi |
2875 | fi | |
2876 | fi | |
2877 | else | |
2878 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
2879 | fi | |
b61ff9c8 | 2880 | rm -f conftest* |
3ec83fc2 RH |
2881 | |
2882 | fi | |
b61ff9c8 BS |
2883 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then |
2884 | echo "$as_me:$LINENO: result: yes" >&5 | |
2885 | echo "${ECHO_T}yes" >&6 | |
3ec83fc2 | 2886 | else |
b61ff9c8 BS |
2887 | echo "$as_me:$LINENO: result: no" >&5 |
2888 | echo "${ECHO_T}no" >&6 | |
ba479fd2 NN |
2889 | |
2890 | cat >>confdefs.h <<\_ACEOF | |
3ec83fc2 | 2891 | #define NO_MINUS_C_MINUS_O 1 |
ba479fd2 | 2892 | _ACEOF |
3ec83fc2 RH |
2893 | |
2894 | fi | |
2895 | ||
3b620440 KC |
2896 | # expand $ac_aux_dir to an absolute path |
2897 | am_aux_dir=`cd $ac_aux_dir && pwd` | |
2898 | ||
2899 | # FIXME: we rely on the cache variable name because | |
2900 | # there is no other way. | |
2901 | set dummy $CC | |
2902 | ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` | |
2903 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then | |
2904 | # Losing compiler, so override with the script. | |
2905 | # FIXME: It is wrong to rewrite CC. | |
2906 | # But if we don't then we get into trouble of one sort or another. | |
2907 | # A longer-term fix would be to have automake use am__CC in this case, | |
2908 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
2909 | CC="$am_aux_dir/compile $CC" | |
2910 | fi | |
2911 | ||
414d23ae HPN |
2912 | # autoconf is lame and doesn't give us any substitution variable for this. |
2913 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
2914 | NO_MINUS_C_MINUS_O=yes | |
2915 | else | |
2916 | OUTPUT_OPTION='-o $@' | |
2917 | fi | |
2918 | ||
2919 | ||
2920 | ||
ec6c7392 PB |
2921 | # Remove the -O2: for historical reasons, unless bootstrapping we prefer |
2922 | # optimizations to be activated explicitly by the toplevel. | |
2923 | case "$CC" in | |
2924 | */prev-gcc/xgcc*) ;; | |
2925 | *) CFLAGS=`echo $CFLAGS | sed "s/-O[s0-9]* *//" ` ;; | |
2926 | esac | |
2927 | ||
2928 | ||
73458fb7 NN |
2929 | # ------------------------- |
2930 | # Check C compiler features | |
2931 | # ------------------------- | |
2932 | ||
ba479fd2 NN |
2933 | ac_ext=c |
2934 | ac_cpp='$CPP $CPPFLAGS' | |
2935 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2936 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2937 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
b61ff9c8 BS |
2938 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 |
2939 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
84c041a1 ZW |
2940 | # On Suns, sometimes $CPP names a directory. |
2941 | if test -n "$CPP" && test -d "$CPP"; then | |
2942 | CPP= | |
2943 | fi | |
2944 | if test -z "$CPP"; then | |
ba479fd2 NN |
2945 | if test "${ac_cv_prog_CPP+set}" = set; then |
2946 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2947 | else | |
2948 | # Double quotes because CPP needs to be expanded | |
2949 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2950 | do | |
2951 | ac_preproc_ok=false | |
2952 | for ac_c_preproc_warn_flag in '' yes | |
2953 | do | |
2954 | # Use a header file that comes with gcc, so configuring glibc | |
2955 | # with a fresh cross-compiler works. | |
2956 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2957 | # <limits.h> exists even on freestanding compilers. | |
84c041a1 | 2958 | # On the NeXT, cc -E runs the code through the compiler's parser, |
ba479fd2 NN |
2959 | # not just through cpp. "Syntax error" is here to catch this case. |
2960 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
2961 | /* confdefs.h. */ |
2962 | _ACEOF | |
2963 | cat confdefs.h >>conftest.$ac_ext | |
2964 | cat >>conftest.$ac_ext <<_ACEOF | |
2965 | /* end confdefs.h. */ | |
2966 | #ifdef __STDC__ | |
2967 | # include <limits.h> | |
2968 | #else | |
2969 | # include <assert.h> | |
2970 | #endif | |
86da66b5 | 2971 | Syntax error |
ba479fd2 | 2972 | _ACEOF |
b61ff9c8 BS |
2973 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
2974 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
2975 | ac_status=$? |
2976 | grep -v '^ *+' conftest.er1 >conftest.err | |
2977 | rm -f conftest.er1 | |
2978 | cat conftest.err >&5 | |
2979 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
2980 | (exit $ac_status); } >/dev/null; then |
2981 | if test -s conftest.err; then | |
2982 | ac_cpp_err=$ac_c_preproc_warn_flag | |
2983 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2984 | else | |
2985 | ac_cpp_err= | |
2986 | fi | |
2987 | else | |
2988 | ac_cpp_err=yes | |
2989 | fi | |
2990 | if test -z "$ac_cpp_err"; then | |
093e61a6 | 2991 | : |
cafe096b | 2992 | else |
ba479fd2 NN |
2993 | echo "$as_me: failed program was:" >&5 |
2994 | sed 's/^/| /' conftest.$ac_ext >&5 | |
2995 | ||
2996 | # Broken: fails on valid input. | |
2997 | continue | |
2998 | fi | |
2999 | rm -f conftest.err conftest.$ac_ext | |
3000 | ||
b61ff9c8 | 3001 | # OK, works on sane cases. Now check whether non-existent headers |
ba479fd2 NN |
3002 | # can be detected and how. |
3003 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3004 | /* confdefs.h. */ |
3005 | _ACEOF | |
3006 | cat confdefs.h >>conftest.$ac_ext | |
3007 | cat >>conftest.$ac_ext <<_ACEOF | |
3008 | /* end confdefs.h. */ | |
3009 | #include <ac_nonexistent.h> | |
3010 | _ACEOF | |
b61ff9c8 BS |
3011 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
3012 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
3013 | ac_status=$? |
3014 | grep -v '^ *+' conftest.er1 >conftest.err | |
3015 | rm -f conftest.er1 | |
3016 | cat conftest.err >&5 | |
3017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3018 | (exit $ac_status); } >/dev/null; then |
3019 | if test -s conftest.err; then | |
3020 | ac_cpp_err=$ac_c_preproc_warn_flag | |
3021 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3022 | else | |
3023 | ac_cpp_err= | |
3024 | fi | |
3025 | else | |
3026 | ac_cpp_err=yes | |
3027 | fi | |
3028 | if test -z "$ac_cpp_err"; then | |
ba479fd2 NN |
3029 | # Broken: success on invalid input. |
3030 | continue | |
3031 | else | |
3032 | echo "$as_me: failed program was:" >&5 | |
3033 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3034 | ||
3035 | # Passes both tests. | |
3036 | ac_preproc_ok=: | |
3037 | break | |
3038 | fi | |
3039 | rm -f conftest.err conftest.$ac_ext | |
3040 | ||
3041 | done | |
3042 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3043 | rm -f conftest.err conftest.$ac_ext | |
3044 | if $ac_preproc_ok; then | |
3045 | break | |
3046 | fi | |
3047 | ||
3048 | done | |
3049 | ac_cv_prog_CPP=$CPP | |
3050 | ||
3051 | fi | |
3052 | CPP=$ac_cv_prog_CPP | |
3053 | else | |
3054 | ac_cv_prog_CPP=$CPP | |
3055 | fi | |
b61ff9c8 BS |
3056 | echo "$as_me:$LINENO: result: $CPP" >&5 |
3057 | echo "${ECHO_T}$CPP" >&6 | |
ba479fd2 NN |
3058 | ac_preproc_ok=false |
3059 | for ac_c_preproc_warn_flag in '' yes | |
3060 | do | |
3061 | # Use a header file that comes with gcc, so configuring glibc | |
3062 | # with a fresh cross-compiler works. | |
3063 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
3064 | # <limits.h> exists even on freestanding compilers. | |
3065 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
3066 | # not just through cpp. "Syntax error" is here to catch this case. | |
3067 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3068 | /* confdefs.h. */ |
3069 | _ACEOF | |
3070 | cat confdefs.h >>conftest.$ac_ext | |
3071 | cat >>conftest.$ac_ext <<_ACEOF | |
3072 | /* end confdefs.h. */ | |
3073 | #ifdef __STDC__ | |
3074 | # include <limits.h> | |
3075 | #else | |
3076 | # include <assert.h> | |
3077 | #endif | |
86da66b5 | 3078 | Syntax error |
ba479fd2 | 3079 | _ACEOF |
b61ff9c8 BS |
3080 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
3081 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
3082 | ac_status=$? |
3083 | grep -v '^ *+' conftest.er1 >conftest.err | |
3084 | rm -f conftest.er1 | |
3085 | cat conftest.err >&5 | |
3086 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3087 | (exit $ac_status); } >/dev/null; then |
3088 | if test -s conftest.err; then | |
3089 | ac_cpp_err=$ac_c_preproc_warn_flag | |
3090 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3091 | else | |
3092 | ac_cpp_err= | |
3093 | fi | |
3094 | else | |
3095 | ac_cpp_err=yes | |
3096 | fi | |
3097 | if test -z "$ac_cpp_err"; then | |
6e3f3080 | 3098 | : |
414d23ae | 3099 | else |
ba479fd2 NN |
3100 | echo "$as_me: failed program was:" >&5 |
3101 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3102 | ||
3103 | # Broken: fails on valid input. | |
3104 | continue | |
3105 | fi | |
3106 | rm -f conftest.err conftest.$ac_ext | |
3107 | ||
b61ff9c8 | 3108 | # OK, works on sane cases. Now check whether non-existent headers |
ba479fd2 NN |
3109 | # can be detected and how. |
3110 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
3111 | /* confdefs.h. */ |
3112 | _ACEOF | |
3113 | cat confdefs.h >>conftest.$ac_ext | |
3114 | cat >>conftest.$ac_ext <<_ACEOF | |
3115 | /* end confdefs.h. */ | |
3116 | #include <ac_nonexistent.h> | |
3117 | _ACEOF | |
b61ff9c8 BS |
3118 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
3119 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
3120 | ac_status=$? |
3121 | grep -v '^ *+' conftest.er1 >conftest.err | |
3122 | rm -f conftest.er1 | |
3123 | cat conftest.err >&5 | |
3124 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3125 | (exit $ac_status); } >/dev/null; then |
3126 | if test -s conftest.err; then | |
3127 | ac_cpp_err=$ac_c_preproc_warn_flag | |
3128 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3129 | else | |
3130 | ac_cpp_err= | |
3131 | fi | |
3132 | else | |
3133 | ac_cpp_err=yes | |
3134 | fi | |
3135 | if test -z "$ac_cpp_err"; then | |
ba479fd2 NN |
3136 | # Broken: success on invalid input. |
3137 | continue | |
3138 | else | |
3139 | echo "$as_me: failed program was:" >&5 | |
3140 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3141 | ||
3142 | # Passes both tests. | |
3143 | ac_preproc_ok=: | |
3144 | break | |
63cf211a | 3145 | fi |
ba479fd2 NN |
3146 | rm -f conftest.err conftest.$ac_ext |
3147 | ||
3148 | done | |
3149 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3150 | rm -f conftest.err conftest.$ac_ext | |
3151 | if $ac_preproc_ok; then | |
3152 | : | |
6e3f3080 | 3153 | else |
ba479fd2 NN |
3154 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check |
3155 | See \`config.log' for more details." >&5 | |
3156 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3157 | See \`config.log' for more details." >&2;} | |
3158 | { (exit 1); exit 1; }; } | |
6e3f3080 NN |
3159 | fi |
3160 | ||
ba479fd2 NN |
3161 | ac_ext=c |
3162 | ac_cpp='$CPP $CPPFLAGS' | |
3163 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3164 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3165 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3166 | ||
b5472e1d | 3167 | |
b61ff9c8 BS |
3168 | echo "$as_me:$LINENO: checking for inline" >&5 |
3169 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | |
ba479fd2 NN |
3170 | if test "${ac_cv_c_inline+set}" = set; then |
3171 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
3172 | else |
3173 | ac_cv_c_inline=no | |
3174 | for ac_kw in inline __inline__ __inline; do | |
ba479fd2 | 3175 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
3176 | /* confdefs.h. */ |
3177 | _ACEOF | |
3178 | cat confdefs.h >>conftest.$ac_ext | |
3179 | cat >>conftest.$ac_ext <<_ACEOF | |
3180 | /* end confdefs.h. */ | |
3181 | #ifndef __cplusplus | |
3182 | typedef int foo_t; | |
3183 | static $ac_kw foo_t static_foo () {return 0; } | |
3184 | $ac_kw foo_t foo () {return 0; } | |
3185 | #endif | |
414d23ae | 3186 | |
ba479fd2 NN |
3187 | _ACEOF |
3188 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3189 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3190 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 3191 | ac_status=$? |
86da66b5 HPN |
3192 | grep -v '^ *+' conftest.er1 >conftest.err |
3193 | rm -f conftest.er1 | |
3194 | cat conftest.err >&5 | |
ba479fd2 | 3195 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
3196 | (exit $ac_status); } && |
3197 | { ac_try='test -z "$ac_c_werror_flag" | |
3198 | || test ! -s conftest.err' | |
3199 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3200 | (eval $ac_try) 2>&5 | |
3201 | ac_status=$? | |
3202 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3203 | (exit $ac_status); }; } && | |
3204 | { ac_try='test -s conftest.$ac_objext' | |
3205 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3206 | (eval $ac_try) 2>&5 | |
3207 | ac_status=$? | |
3208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3209 | (exit $ac_status); }; }; then | |
3210 | ac_cv_c_inline=$ac_kw; break | |
414d23ae | 3211 | else |
ba479fd2 NN |
3212 | echo "$as_me: failed program was:" >&5 |
3213 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3214 | ||
414d23ae | 3215 | fi |
b61ff9c8 | 3216 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae HPN |
3217 | done |
3218 | ||
3219 | fi | |
b61ff9c8 BS |
3220 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 |
3221 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | |
86da66b5 HPN |
3222 | |
3223 | ||
ba479fd2 | 3224 | case $ac_cv_c_inline in |
414d23ae | 3225 | inline | yes) ;; |
86da66b5 HPN |
3226 | *) |
3227 | case $ac_cv_c_inline in | |
3228 | no) ac_val=;; | |
3229 | *) ac_val=$ac_cv_c_inline;; | |
3230 | esac | |
3231 | cat >>confdefs.h <<_ACEOF | |
3232 | #ifndef __cplusplus | |
3233 | #define inline $ac_val | |
3234 | #endif | |
ba479fd2 | 3235 | _ACEOF |
86da66b5 | 3236 | ;; |
414d23ae HPN |
3237 | esac |
3238 | ||
414d23ae | 3239 | |
414d23ae | 3240 | # sizeof(char) is 1 by definition. |
bf3b7cd3 | 3241 | |
b61ff9c8 BS |
3242 | echo "$as_me:$LINENO: checking for egrep" >&5 |
3243 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3244 | if test "${ac_cv_prog_egrep+set}" = set; then | |
1a4b763e BS |
3245 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3246 | else | |
b61ff9c8 BS |
3247 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
3248 | then ac_cv_prog_egrep='grep -E' | |
3249 | else ac_cv_prog_egrep='egrep' | |
1a4b763e | 3250 | fi |
b61ff9c8 BS |
3251 | fi |
3252 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3253 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3254 | EGREP=$ac_cv_prog_egrep | |
1a4b763e BS |
3255 | |
3256 | ||
b61ff9c8 BS |
3257 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
3258 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
bf3b7cd3 JD |
3259 | if test "${ac_cv_header_stdc+set}" = set; then |
3260 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3261 | else | |
3262 | cat >conftest.$ac_ext <<_ACEOF | |
3263 | /* confdefs.h. */ | |
3264 | _ACEOF | |
3265 | cat confdefs.h >>conftest.$ac_ext | |
3266 | cat >>conftest.$ac_ext <<_ACEOF | |
3267 | /* end confdefs.h. */ | |
3268 | #include <stdlib.h> | |
3269 | #include <stdarg.h> | |
3270 | #include <string.h> | |
3271 | #include <float.h> | |
3272 | ||
3273 | int | |
3274 | main () | |
3275 | { | |
3276 | ||
3277 | ; | |
3278 | return 0; | |
3279 | } | |
3280 | _ACEOF | |
3281 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3282 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3283 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3284 | ac_status=$? |
3285 | grep -v '^ *+' conftest.er1 >conftest.err | |
3286 | rm -f conftest.er1 | |
3287 | cat conftest.err >&5 | |
3288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3289 | (exit $ac_status); } && |
3290 | { ac_try='test -z "$ac_c_werror_flag" | |
3291 | || test ! -s conftest.err' | |
3292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3293 | (eval $ac_try) 2>&5 | |
3294 | ac_status=$? | |
3295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3296 | (exit $ac_status); }; } && | |
3297 | { ac_try='test -s conftest.$ac_objext' | |
3298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3299 | (eval $ac_try) 2>&5 | |
3300 | ac_status=$? | |
3301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3302 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3303 | ac_cv_header_stdc=yes |
3304 | else | |
3305 | echo "$as_me: failed program was:" >&5 | |
3306 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3307 | ||
b61ff9c8 | 3308 | ac_cv_header_stdc=no |
bf3b7cd3 | 3309 | fi |
b61ff9c8 | 3310 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
3311 | |
3312 | if test $ac_cv_header_stdc = yes; then | |
3313 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3314 | cat >conftest.$ac_ext <<_ACEOF | |
3315 | /* confdefs.h. */ | |
3316 | _ACEOF | |
3317 | cat confdefs.h >>conftest.$ac_ext | |
3318 | cat >>conftest.$ac_ext <<_ACEOF | |
3319 | /* end confdefs.h. */ | |
3320 | #include <string.h> | |
3321 | ||
3322 | _ACEOF | |
3323 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3324 | $EGREP "memchr" >/dev/null 2>&1; then | |
3325 | : | |
3326 | else | |
3327 | ac_cv_header_stdc=no | |
3328 | fi | |
3329 | rm -f conftest* | |
3330 | ||
3331 | fi | |
3332 | ||
3333 | if test $ac_cv_header_stdc = yes; then | |
3334 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3335 | cat >conftest.$ac_ext <<_ACEOF | |
3336 | /* confdefs.h. */ | |
3337 | _ACEOF | |
3338 | cat confdefs.h >>conftest.$ac_ext | |
3339 | cat >>conftest.$ac_ext <<_ACEOF | |
3340 | /* end confdefs.h. */ | |
3341 | #include <stdlib.h> | |
3342 | ||
3343 | _ACEOF | |
3344 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3345 | $EGREP "free" >/dev/null 2>&1; then | |
3346 | : | |
3347 | else | |
3348 | ac_cv_header_stdc=no | |
3349 | fi | |
3350 | rm -f conftest* | |
3351 | ||
3352 | fi | |
3353 | ||
3354 | if test $ac_cv_header_stdc = yes; then | |
3355 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3356 | if test "$cross_compiling" = yes; then | |
3357 | : | |
3358 | else | |
3359 | cat >conftest.$ac_ext <<_ACEOF | |
3360 | /* confdefs.h. */ | |
3361 | _ACEOF | |
3362 | cat confdefs.h >>conftest.$ac_ext | |
3363 | cat >>conftest.$ac_ext <<_ACEOF | |
3364 | /* end confdefs.h. */ | |
3365 | #include <ctype.h> | |
3366 | #if ((' ' & 0x0FF) == 0x020) | |
3367 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3368 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3369 | #else | |
3370 | # define ISLOWER(c) \ | |
3371 | (('a' <= (c) && (c) <= 'i') \ | |
3372 | || ('j' <= (c) && (c) <= 'r') \ | |
3373 | || ('s' <= (c) && (c) <= 'z')) | |
3374 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3375 | #endif | |
3376 | ||
3377 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3378 | int | |
3379 | main () | |
3380 | { | |
3381 | int i; | |
3382 | for (i = 0; i < 256; i++) | |
3383 | if (XOR (islower (i), ISLOWER (i)) | |
3384 | || toupper (i) != TOUPPER (i)) | |
b61ff9c8 BS |
3385 | exit(2); |
3386 | exit (0); | |
bf3b7cd3 JD |
3387 | } |
3388 | _ACEOF | |
3389 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
3390 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
3391 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
3392 | ac_status=$? |
3393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3394 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
3395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3396 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
3397 | ac_status=$? |
3398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3399 | (exit $ac_status); }; }; then | |
3400 | : | |
3401 | else | |
3402 | echo "$as_me: program exited with status $ac_status" >&5 | |
3403 | echo "$as_me: failed program was:" >&5 | |
3404 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3405 | ||
3406 | ( exit $ac_status ) | |
3407 | ac_cv_header_stdc=no | |
3408 | fi | |
b61ff9c8 | 3409 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
703d89ab | 3410 | fi |
ab22c1fa | 3411 | fi |
1a4b763e | 3412 | fi |
b61ff9c8 BS |
3413 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
3414 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
bf3b7cd3 JD |
3415 | if test $ac_cv_header_stdc = yes; then |
3416 | ||
3417 | cat >>confdefs.h <<\_ACEOF | |
3418 | #define STDC_HEADERS 1 | |
3419 | _ACEOF | |
3420 | ||
3421 | fi | |
3422 | ||
3423 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
3424 | ||
3425 | ||
3426 | ||
3427 | ||
3428 | ||
3429 | ||
3430 | ||
3431 | ||
3432 | ||
3433 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
3434 | inttypes.h stdint.h unistd.h | |
3435 | do | |
3436 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b61ff9c8 BS |
3437 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
3438 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
3439 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
bf3b7cd3 JD |
3440 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
3441 | else | |
3442 | cat >conftest.$ac_ext <<_ACEOF | |
3443 | /* confdefs.h. */ | |
3444 | _ACEOF | |
3445 | cat confdefs.h >>conftest.$ac_ext | |
3446 | cat >>conftest.$ac_ext <<_ACEOF | |
3447 | /* end confdefs.h. */ | |
3448 | $ac_includes_default | |
3449 | ||
3450 | #include <$ac_header> | |
3451 | _ACEOF | |
3452 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3453 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3454 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3455 | ac_status=$? |
3456 | grep -v '^ *+' conftest.er1 >conftest.err | |
3457 | rm -f conftest.er1 | |
3458 | cat conftest.err >&5 | |
3459 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3460 | (exit $ac_status); } && |
3461 | { ac_try='test -z "$ac_c_werror_flag" | |
3462 | || test ! -s conftest.err' | |
3463 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3464 | (eval $ac_try) 2>&5 | |
3465 | ac_status=$? | |
3466 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3467 | (exit $ac_status); }; } && | |
3468 | { ac_try='test -s conftest.$ac_objext' | |
3469 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3470 | (eval $ac_try) 2>&5 | |
3471 | ac_status=$? | |
3472 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3473 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3474 | eval "$as_ac_Header=yes" |
3475 | else | |
3476 | echo "$as_me: failed program was:" >&5 | |
3477 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3478 | ||
b61ff9c8 | 3479 | eval "$as_ac_Header=no" |
bf3b7cd3 | 3480 | fi |
b61ff9c8 | 3481 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 3482 | fi |
b61ff9c8 BS |
3483 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
3484 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
bf3b7cd3 JD |
3485 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
3486 | cat >>confdefs.h <<_ACEOF | |
3487 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
3488 | _ACEOF | |
3489 | ||
3490 | fi | |
3491 | ||
3492 | done | |
3493 | ||
3494 | ||
b61ff9c8 BS |
3495 | echo "$as_me:$LINENO: checking for void *" >&5 |
3496 | echo $ECHO_N "checking for void *... $ECHO_C" >&6 | |
bf3b7cd3 JD |
3497 | if test "${ac_cv_type_void_p+set}" = set; then |
3498 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3499 | else | |
3500 | cat >conftest.$ac_ext <<_ACEOF | |
3501 | /* confdefs.h. */ | |
3502 | _ACEOF | |
3503 | cat confdefs.h >>conftest.$ac_ext | |
3504 | cat >>conftest.$ac_ext <<_ACEOF | |
3505 | /* end confdefs.h. */ | |
3506 | $ac_includes_default | |
3507 | int | |
3508 | main () | |
3509 | { | |
b61ff9c8 | 3510 | if ((void * *) 0) |
bf3b7cd3 | 3511 | return 0; |
b61ff9c8 | 3512 | if (sizeof (void *)) |
bf3b7cd3 JD |
3513 | return 0; |
3514 | ; | |
3515 | return 0; | |
3516 | } | |
3517 | _ACEOF | |
3518 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3519 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3520 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3521 | ac_status=$? |
3522 | grep -v '^ *+' conftest.er1 >conftest.err | |
3523 | rm -f conftest.er1 | |
3524 | cat conftest.err >&5 | |
3525 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3526 | (exit $ac_status); } && |
3527 | { ac_try='test -z "$ac_c_werror_flag" | |
3528 | || test ! -s conftest.err' | |
3529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3530 | (eval $ac_try) 2>&5 | |
3531 | ac_status=$? | |
3532 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3533 | (exit $ac_status); }; } && | |
3534 | { ac_try='test -s conftest.$ac_objext' | |
3535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3536 | (eval $ac_try) 2>&5 | |
3537 | ac_status=$? | |
3538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3539 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3540 | ac_cv_type_void_p=yes |
3541 | else | |
3542 | echo "$as_me: failed program was:" >&5 | |
3543 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3544 | ||
b61ff9c8 | 3545 | ac_cv_type_void_p=no |
bf3b7cd3 | 3546 | fi |
b61ff9c8 | 3547 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 3548 | fi |
b61ff9c8 BS |
3549 | echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 |
3550 | echo "${ECHO_T}$ac_cv_type_void_p" >&6 | |
bf3b7cd3 | 3551 | |
b61ff9c8 BS |
3552 | echo "$as_me:$LINENO: checking size of void *" >&5 |
3553 | echo $ECHO_N "checking size of void *... $ECHO_C" >&6 | |
ba479fd2 NN |
3554 | if test "${ac_cv_sizeof_void_p+set}" = set; then |
3555 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75b6f3fd | 3556 | else |
b61ff9c8 BS |
3557 | if test "$ac_cv_type_void_p" = yes; then |
3558 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3559 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3560 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3561 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
3562 | if test "$cross_compiling" = yes; then |
3563 | # Depending upon the size, compute the lo and hi bounds. | |
3564 | cat >conftest.$ac_ext <<_ACEOF | |
3565 | /* confdefs.h. */ | |
3566 | _ACEOF | |
3567 | cat confdefs.h >>conftest.$ac_ext | |
3568 | cat >>conftest.$ac_ext <<_ACEOF | |
3569 | /* end confdefs.h. */ | |
3570 | $ac_includes_default | |
3571 | int | |
3572 | main () | |
3573 | { | |
b61ff9c8 | 3574 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; |
bf3b7cd3 JD |
3575 | test_array [0] = 0 |
3576 | ||
3577 | ; | |
3578 | return 0; | |
3579 | } | |
3580 | _ACEOF | |
3581 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3582 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3583 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3584 | ac_status=$? |
3585 | grep -v '^ *+' conftest.er1 >conftest.err | |
3586 | rm -f conftest.er1 | |
3587 | cat conftest.err >&5 | |
3588 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3589 | (exit $ac_status); } && |
3590 | { ac_try='test -z "$ac_c_werror_flag" | |
3591 | || test ! -s conftest.err' | |
3592 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3593 | (eval $ac_try) 2>&5 | |
3594 | ac_status=$? | |
3595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3596 | (exit $ac_status); }; } && | |
3597 | { ac_try='test -s conftest.$ac_objext' | |
3598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3599 | (eval $ac_try) 2>&5 | |
3600 | ac_status=$? | |
3601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3602 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3603 | ac_lo=0 ac_mid=0 |
3604 | while :; do | |
3605 | cat >conftest.$ac_ext <<_ACEOF | |
3606 | /* confdefs.h. */ | |
3607 | _ACEOF | |
3608 | cat confdefs.h >>conftest.$ac_ext | |
3609 | cat >>conftest.$ac_ext <<_ACEOF | |
3610 | /* end confdefs.h. */ | |
3611 | $ac_includes_default | |
3612 | int | |
3613 | main () | |
3614 | { | |
b61ff9c8 | 3615 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; |
bf3b7cd3 JD |
3616 | test_array [0] = 0 |
3617 | ||
3618 | ; | |
3619 | return 0; | |
3620 | } | |
3621 | _ACEOF | |
3622 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3623 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3624 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3625 | ac_status=$? |
3626 | grep -v '^ *+' conftest.er1 >conftest.err | |
3627 | rm -f conftest.er1 | |
3628 | cat conftest.err >&5 | |
3629 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3630 | (exit $ac_status); } && |
3631 | { ac_try='test -z "$ac_c_werror_flag" | |
3632 | || test ! -s conftest.err' | |
3633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3634 | (eval $ac_try) 2>&5 | |
3635 | ac_status=$? | |
3636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3637 | (exit $ac_status); }; } && | |
3638 | { ac_try='test -s conftest.$ac_objext' | |
3639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3640 | (eval $ac_try) 2>&5 | |
3641 | ac_status=$? | |
3642 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3643 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3644 | ac_hi=$ac_mid; break |
3645 | else | |
3646 | echo "$as_me: failed program was:" >&5 | |
3647 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3648 | ||
b61ff9c8 BS |
3649 | ac_lo=`expr $ac_mid + 1` |
3650 | if test $ac_lo -le $ac_mid; then | |
3651 | ac_lo= ac_hi= | |
3652 | break | |
3653 | fi | |
3654 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 3655 | fi |
b61ff9c8 | 3656 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
3657 | done |
3658 | else | |
3659 | echo "$as_me: failed program was:" >&5 | |
3660 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3661 | ||
b61ff9c8 | 3662 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
3663 | /* confdefs.h. */ |
3664 | _ACEOF | |
3665 | cat confdefs.h >>conftest.$ac_ext | |
3666 | cat >>conftest.$ac_ext <<_ACEOF | |
3667 | /* end confdefs.h. */ | |
3668 | $ac_includes_default | |
3669 | int | |
3670 | main () | |
3671 | { | |
b61ff9c8 | 3672 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; |
bf3b7cd3 JD |
3673 | test_array [0] = 0 |
3674 | ||
3675 | ; | |
3676 | return 0; | |
3677 | } | |
3678 | _ACEOF | |
3679 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3680 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3681 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3682 | ac_status=$? |
3683 | grep -v '^ *+' conftest.er1 >conftest.err | |
3684 | rm -f conftest.er1 | |
3685 | cat conftest.err >&5 | |
3686 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3687 | (exit $ac_status); } && |
3688 | { ac_try='test -z "$ac_c_werror_flag" | |
3689 | || test ! -s conftest.err' | |
3690 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3691 | (eval $ac_try) 2>&5 | |
3692 | ac_status=$? | |
3693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3694 | (exit $ac_status); }; } && | |
3695 | { ac_try='test -s conftest.$ac_objext' | |
3696 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3697 | (eval $ac_try) 2>&5 | |
3698 | ac_status=$? | |
3699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3700 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3701 | ac_hi=-1 ac_mid=-1 |
3702 | while :; do | |
3703 | cat >conftest.$ac_ext <<_ACEOF | |
3704 | /* confdefs.h. */ | |
3705 | _ACEOF | |
3706 | cat confdefs.h >>conftest.$ac_ext | |
3707 | cat >>conftest.$ac_ext <<_ACEOF | |
3708 | /* end confdefs.h. */ | |
3709 | $ac_includes_default | |
3710 | int | |
3711 | main () | |
3712 | { | |
b61ff9c8 | 3713 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; |
bf3b7cd3 JD |
3714 | test_array [0] = 0 |
3715 | ||
3716 | ; | |
3717 | return 0; | |
3718 | } | |
3719 | _ACEOF | |
3720 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3721 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3722 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3723 | ac_status=$? |
3724 | grep -v '^ *+' conftest.er1 >conftest.err | |
3725 | rm -f conftest.er1 | |
3726 | cat conftest.err >&5 | |
3727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3728 | (exit $ac_status); } && |
3729 | { ac_try='test -z "$ac_c_werror_flag" | |
3730 | || test ! -s conftest.err' | |
3731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3732 | (eval $ac_try) 2>&5 | |
3733 | ac_status=$? | |
3734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3735 | (exit $ac_status); }; } && | |
3736 | { ac_try='test -s conftest.$ac_objext' | |
3737 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3738 | (eval $ac_try) 2>&5 | |
3739 | ac_status=$? | |
3740 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3741 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3742 | ac_lo=$ac_mid; break |
3743 | else | |
3744 | echo "$as_me: failed program was:" >&5 | |
3745 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3746 | ||
b61ff9c8 BS |
3747 | ac_hi=`expr '(' $ac_mid ')' - 1` |
3748 | if test $ac_mid -le $ac_hi; then | |
3749 | ac_lo= ac_hi= | |
3750 | break | |
3751 | fi | |
3752 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 3753 | fi |
b61ff9c8 | 3754 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
3755 | done |
3756 | else | |
3757 | echo "$as_me: failed program was:" >&5 | |
3758 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3759 | ||
b61ff9c8 | 3760 | ac_lo= ac_hi= |
bf3b7cd3 | 3761 | fi |
b61ff9c8 | 3762 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 3763 | fi |
b61ff9c8 | 3764 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
3765 | # Binary search between lo and hi bounds. |
3766 | while test "x$ac_lo" != "x$ac_hi"; do | |
3767 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
3768 | cat >conftest.$ac_ext <<_ACEOF | |
3769 | /* confdefs.h. */ | |
3770 | _ACEOF | |
3771 | cat confdefs.h >>conftest.$ac_ext | |
3772 | cat >>conftest.$ac_ext <<_ACEOF | |
3773 | /* end confdefs.h. */ | |
3774 | $ac_includes_default | |
3775 | int | |
3776 | main () | |
3777 | { | |
b61ff9c8 | 3778 | static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; |
bf3b7cd3 JD |
3779 | test_array [0] = 0 |
3780 | ||
3781 | ; | |
3782 | return 0; | |
3783 | } | |
3784 | _ACEOF | |
3785 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3786 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3787 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3788 | ac_status=$? |
3789 | grep -v '^ *+' conftest.er1 >conftest.err | |
3790 | rm -f conftest.er1 | |
3791 | cat conftest.err >&5 | |
3792 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3793 | (exit $ac_status); } && |
3794 | { ac_try='test -z "$ac_c_werror_flag" | |
3795 | || test ! -s conftest.err' | |
3796 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3797 | (eval $ac_try) 2>&5 | |
3798 | ac_status=$? | |
3799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3800 | (exit $ac_status); }; } && | |
3801 | { ac_try='test -s conftest.$ac_objext' | |
3802 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3803 | (eval $ac_try) 2>&5 | |
3804 | ac_status=$? | |
3805 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3806 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3807 | ac_hi=$ac_mid |
3808 | else | |
3809 | echo "$as_me: failed program was:" >&5 | |
3810 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3811 | ||
b61ff9c8 | 3812 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 3813 | fi |
b61ff9c8 | 3814 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
3815 | done |
3816 | case $ac_lo in | |
3817 | ?*) ac_cv_sizeof_void_p=$ac_lo;; | |
b61ff9c8 | 3818 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 |
bf3b7cd3 | 3819 | See \`config.log' for more details." >&5 |
b61ff9c8 | 3820 | echo "$as_me: error: cannot compute sizeof (void *), 77 |
bf3b7cd3 | 3821 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 3822 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 3823 | esac |
b61ff9c8 BS |
3824 | else |
3825 | if test "$cross_compiling" = yes; then | |
3826 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
3827 | See \`config.log' for more details." >&5 | |
3828 | echo "$as_me: error: cannot run test program while cross compiling | |
3829 | See \`config.log' for more details." >&2;} | |
3830 | { (exit 1); exit 1; }; } | |
bf3b7cd3 JD |
3831 | else |
3832 | cat >conftest.$ac_ext <<_ACEOF | |
3833 | /* confdefs.h. */ | |
3834 | _ACEOF | |
3835 | cat confdefs.h >>conftest.$ac_ext | |
3836 | cat >>conftest.$ac_ext <<_ACEOF | |
3837 | /* end confdefs.h. */ | |
3838 | $ac_includes_default | |
b61ff9c8 BS |
3839 | long longval () { return (long) (sizeof (void *)); } |
3840 | unsigned long ulongval () { return (long) (sizeof (void *)); } | |
bf3b7cd3 JD |
3841 | #include <stdio.h> |
3842 | #include <stdlib.h> | |
3843 | int | |
3844 | main () | |
3845 | { | |
3846 | ||
3847 | FILE *f = fopen ("conftest.val", "w"); | |
3848 | if (! f) | |
b61ff9c8 BS |
3849 | exit (1); |
3850 | if (((long) (sizeof (void *))) < 0) | |
bf3b7cd3 | 3851 | { |
b61ff9c8 BS |
3852 | long i = longval (); |
3853 | if (i != ((long) (sizeof (void *)))) | |
3854 | exit (1); | |
bf3b7cd3 JD |
3855 | fprintf (f, "%ld\n", i); |
3856 | } | |
3857 | else | |
3858 | { | |
b61ff9c8 BS |
3859 | unsigned long i = ulongval (); |
3860 | if (i != ((long) (sizeof (void *)))) | |
3861 | exit (1); | |
bf3b7cd3 JD |
3862 | fprintf (f, "%lu\n", i); |
3863 | } | |
b61ff9c8 | 3864 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
3865 | |
3866 | ; | |
3867 | return 0; | |
3868 | } | |
3869 | _ACEOF | |
3870 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
3871 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
3872 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
3873 | ac_status=$? |
3874 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3875 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
3876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
3877 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
3878 | ac_status=$? |
3879 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3880 | (exit $ac_status); }; }; then | |
3881 | ac_cv_sizeof_void_p=`cat conftest.val` | |
3882 | else | |
3883 | echo "$as_me: program exited with status $ac_status" >&5 | |
3884 | echo "$as_me: failed program was:" >&5 | |
3885 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3886 | ||
3887 | ( exit $ac_status ) | |
b61ff9c8 | 3888 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 |
bf3b7cd3 | 3889 | See \`config.log' for more details." >&5 |
b61ff9c8 | 3890 | echo "$as_me: error: cannot compute sizeof (void *), 77 |
bf3b7cd3 | 3891 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
3892 | { (exit 1); exit 1; }; } |
3893 | fi | |
3894 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
3895 | fi |
3896 | fi | |
3897 | rm -f conftest.val | |
b61ff9c8 BS |
3898 | else |
3899 | ac_cv_sizeof_void_p=0 | |
bf3b7cd3 | 3900 | fi |
b61ff9c8 BS |
3901 | fi |
3902 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 | |
3903 | echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 | |
bf3b7cd3 JD |
3904 | cat >>confdefs.h <<_ACEOF |
3905 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p | |
3906 | _ACEOF | |
3907 | ||
3908 | ||
b61ff9c8 BS |
3909 | echo "$as_me:$LINENO: checking for short" >&5 |
3910 | echo $ECHO_N "checking for short... $ECHO_C" >&6 | |
bf3b7cd3 JD |
3911 | if test "${ac_cv_type_short+set}" = set; then |
3912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3913 | else | |
3914 | cat >conftest.$ac_ext <<_ACEOF | |
3915 | /* confdefs.h. */ | |
3916 | _ACEOF | |
3917 | cat confdefs.h >>conftest.$ac_ext | |
3918 | cat >>conftest.$ac_ext <<_ACEOF | |
3919 | /* end confdefs.h. */ | |
3920 | $ac_includes_default | |
3921 | int | |
3922 | main () | |
3923 | { | |
b61ff9c8 | 3924 | if ((short *) 0) |
bf3b7cd3 | 3925 | return 0; |
b61ff9c8 | 3926 | if (sizeof (short)) |
bf3b7cd3 JD |
3927 | return 0; |
3928 | ; | |
3929 | return 0; | |
3930 | } | |
3931 | _ACEOF | |
3932 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3933 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3934 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3935 | ac_status=$? |
3936 | grep -v '^ *+' conftest.er1 >conftest.err | |
3937 | rm -f conftest.er1 | |
3938 | cat conftest.err >&5 | |
3939 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
3940 | (exit $ac_status); } && |
3941 | { ac_try='test -z "$ac_c_werror_flag" | |
3942 | || test ! -s conftest.err' | |
3943 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3944 | (eval $ac_try) 2>&5 | |
3945 | ac_status=$? | |
3946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3947 | (exit $ac_status); }; } && | |
3948 | { ac_try='test -s conftest.$ac_objext' | |
3949 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3950 | (eval $ac_try) 2>&5 | |
3951 | ac_status=$? | |
3952 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3953 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
3954 | ac_cv_type_short=yes |
3955 | else | |
3956 | echo "$as_me: failed program was:" >&5 | |
3957 | sed 's/^/| /' conftest.$ac_ext >&5 | |
3958 | ||
b61ff9c8 | 3959 | ac_cv_type_short=no |
bf3b7cd3 | 3960 | fi |
b61ff9c8 | 3961 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 3962 | fi |
b61ff9c8 BS |
3963 | echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 |
3964 | echo "${ECHO_T}$ac_cv_type_short" >&6 | |
bf3b7cd3 | 3965 | |
b61ff9c8 BS |
3966 | echo "$as_me:$LINENO: checking size of short" >&5 |
3967 | echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
bf3b7cd3 JD |
3968 | if test "${ac_cv_sizeof_short+set}" = set; then |
3969 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3970 | else | |
b61ff9c8 BS |
3971 | if test "$ac_cv_type_short" = yes; then |
3972 | # The cast to unsigned long works around a bug in the HP C Compiler | |
3973 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
3974 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
3975 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
3976 | if test "$cross_compiling" = yes; then |
3977 | # Depending upon the size, compute the lo and hi bounds. | |
3978 | cat >conftest.$ac_ext <<_ACEOF | |
3979 | /* confdefs.h. */ | |
3980 | _ACEOF | |
3981 | cat confdefs.h >>conftest.$ac_ext | |
3982 | cat >>conftest.$ac_ext <<_ACEOF | |
3983 | /* end confdefs.h. */ | |
3984 | $ac_includes_default | |
3985 | int | |
3986 | main () | |
3987 | { | |
b61ff9c8 | 3988 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; |
bf3b7cd3 JD |
3989 | test_array [0] = 0 |
3990 | ||
3991 | ; | |
3992 | return 0; | |
3993 | } | |
3994 | _ACEOF | |
3995 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
3996 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
3997 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
3998 | ac_status=$? |
3999 | grep -v '^ *+' conftest.er1 >conftest.err | |
4000 | rm -f conftest.er1 | |
4001 | cat conftest.err >&5 | |
4002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4003 | (exit $ac_status); } && |
4004 | { ac_try='test -z "$ac_c_werror_flag" | |
4005 | || test ! -s conftest.err' | |
4006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4007 | (eval $ac_try) 2>&5 | |
4008 | ac_status=$? | |
4009 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4010 | (exit $ac_status); }; } && | |
4011 | { ac_try='test -s conftest.$ac_objext' | |
4012 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4013 | (eval $ac_try) 2>&5 | |
4014 | ac_status=$? | |
4015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4016 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4017 | ac_lo=0 ac_mid=0 |
4018 | while :; do | |
4019 | cat >conftest.$ac_ext <<_ACEOF | |
4020 | /* confdefs.h. */ | |
4021 | _ACEOF | |
4022 | cat confdefs.h >>conftest.$ac_ext | |
4023 | cat >>conftest.$ac_ext <<_ACEOF | |
4024 | /* end confdefs.h. */ | |
4025 | $ac_includes_default | |
4026 | int | |
4027 | main () | |
4028 | { | |
b61ff9c8 | 4029 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; |
bf3b7cd3 JD |
4030 | test_array [0] = 0 |
4031 | ||
4032 | ; | |
4033 | return 0; | |
4034 | } | |
4035 | _ACEOF | |
4036 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4037 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4038 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4039 | ac_status=$? |
4040 | grep -v '^ *+' conftest.er1 >conftest.err | |
4041 | rm -f conftest.er1 | |
4042 | cat conftest.err >&5 | |
4043 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4044 | (exit $ac_status); } && |
4045 | { ac_try='test -z "$ac_c_werror_flag" | |
4046 | || test ! -s conftest.err' | |
4047 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4048 | (eval $ac_try) 2>&5 | |
4049 | ac_status=$? | |
4050 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4051 | (exit $ac_status); }; } && | |
4052 | { ac_try='test -s conftest.$ac_objext' | |
4053 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4054 | (eval $ac_try) 2>&5 | |
4055 | ac_status=$? | |
4056 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4057 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4058 | ac_hi=$ac_mid; break |
4059 | else | |
4060 | echo "$as_me: failed program was:" >&5 | |
4061 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4062 | ||
b61ff9c8 BS |
4063 | ac_lo=`expr $ac_mid + 1` |
4064 | if test $ac_lo -le $ac_mid; then | |
4065 | ac_lo= ac_hi= | |
4066 | break | |
4067 | fi | |
4068 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4069 | fi |
b61ff9c8 | 4070 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4071 | done |
4072 | else | |
4073 | echo "$as_me: failed program was:" >&5 | |
4074 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4075 | ||
b61ff9c8 | 4076 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4077 | /* confdefs.h. */ |
4078 | _ACEOF | |
4079 | cat confdefs.h >>conftest.$ac_ext | |
4080 | cat >>conftest.$ac_ext <<_ACEOF | |
4081 | /* end confdefs.h. */ | |
4082 | $ac_includes_default | |
4083 | int | |
4084 | main () | |
4085 | { | |
b61ff9c8 | 4086 | static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; |
bf3b7cd3 JD |
4087 | test_array [0] = 0 |
4088 | ||
4089 | ; | |
4090 | return 0; | |
4091 | } | |
4092 | _ACEOF | |
4093 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4094 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4095 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4096 | ac_status=$? |
4097 | grep -v '^ *+' conftest.er1 >conftest.err | |
4098 | rm -f conftest.er1 | |
4099 | cat conftest.err >&5 | |
4100 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4101 | (exit $ac_status); } && |
4102 | { ac_try='test -z "$ac_c_werror_flag" | |
4103 | || test ! -s conftest.err' | |
4104 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4105 | (eval $ac_try) 2>&5 | |
4106 | ac_status=$? | |
4107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4108 | (exit $ac_status); }; } && | |
4109 | { ac_try='test -s conftest.$ac_objext' | |
4110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4111 | (eval $ac_try) 2>&5 | |
4112 | ac_status=$? | |
4113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4114 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4115 | ac_hi=-1 ac_mid=-1 |
4116 | while :; do | |
4117 | cat >conftest.$ac_ext <<_ACEOF | |
4118 | /* confdefs.h. */ | |
4119 | _ACEOF | |
4120 | cat confdefs.h >>conftest.$ac_ext | |
4121 | cat >>conftest.$ac_ext <<_ACEOF | |
4122 | /* end confdefs.h. */ | |
4123 | $ac_includes_default | |
4124 | int | |
4125 | main () | |
4126 | { | |
b61ff9c8 | 4127 | static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; |
bf3b7cd3 JD |
4128 | test_array [0] = 0 |
4129 | ||
4130 | ; | |
4131 | return 0; | |
4132 | } | |
4133 | _ACEOF | |
4134 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4135 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4136 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4137 | ac_status=$? |
4138 | grep -v '^ *+' conftest.er1 >conftest.err | |
4139 | rm -f conftest.er1 | |
4140 | cat conftest.err >&5 | |
4141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4142 | (exit $ac_status); } && |
4143 | { ac_try='test -z "$ac_c_werror_flag" | |
4144 | || test ! -s conftest.err' | |
4145 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4146 | (eval $ac_try) 2>&5 | |
4147 | ac_status=$? | |
4148 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4149 | (exit $ac_status); }; } && | |
4150 | { ac_try='test -s conftest.$ac_objext' | |
4151 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4152 | (eval $ac_try) 2>&5 | |
4153 | ac_status=$? | |
4154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4155 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4156 | ac_lo=$ac_mid; break |
4157 | else | |
4158 | echo "$as_me: failed program was:" >&5 | |
4159 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4160 | ||
b61ff9c8 BS |
4161 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4162 | if test $ac_mid -le $ac_hi; then | |
4163 | ac_lo= ac_hi= | |
4164 | break | |
4165 | fi | |
4166 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4167 | fi |
b61ff9c8 | 4168 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4169 | done |
4170 | else | |
4171 | echo "$as_me: failed program was:" >&5 | |
4172 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4173 | ||
b61ff9c8 | 4174 | ac_lo= ac_hi= |
bf3b7cd3 | 4175 | fi |
b61ff9c8 | 4176 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4177 | fi |
b61ff9c8 | 4178 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4179 | # Binary search between lo and hi bounds. |
4180 | while test "x$ac_lo" != "x$ac_hi"; do | |
4181 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4182 | cat >conftest.$ac_ext <<_ACEOF | |
4183 | /* confdefs.h. */ | |
4184 | _ACEOF | |
4185 | cat confdefs.h >>conftest.$ac_ext | |
4186 | cat >>conftest.$ac_ext <<_ACEOF | |
4187 | /* end confdefs.h. */ | |
4188 | $ac_includes_default | |
4189 | int | |
4190 | main () | |
4191 | { | |
b61ff9c8 | 4192 | static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; |
bf3b7cd3 JD |
4193 | test_array [0] = 0 |
4194 | ||
4195 | ; | |
4196 | return 0; | |
4197 | } | |
4198 | _ACEOF | |
4199 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4200 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4201 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4202 | ac_status=$? |
4203 | grep -v '^ *+' conftest.er1 >conftest.err | |
4204 | rm -f conftest.er1 | |
4205 | cat conftest.err >&5 | |
4206 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4207 | (exit $ac_status); } && |
4208 | { ac_try='test -z "$ac_c_werror_flag" | |
4209 | || test ! -s conftest.err' | |
4210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4211 | (eval $ac_try) 2>&5 | |
4212 | ac_status=$? | |
4213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4214 | (exit $ac_status); }; } && | |
4215 | { ac_try='test -s conftest.$ac_objext' | |
4216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4217 | (eval $ac_try) 2>&5 | |
4218 | ac_status=$? | |
4219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4220 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4221 | ac_hi=$ac_mid |
4222 | else | |
4223 | echo "$as_me: failed program was:" >&5 | |
4224 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4225 | ||
b61ff9c8 | 4226 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4227 | fi |
b61ff9c8 | 4228 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4229 | done |
4230 | case $ac_lo in | |
4231 | ?*) ac_cv_sizeof_short=$ac_lo;; | |
b61ff9c8 | 4232 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 |
bf3b7cd3 | 4233 | See \`config.log' for more details." >&5 |
b61ff9c8 | 4234 | echo "$as_me: error: cannot compute sizeof (short), 77 |
bf3b7cd3 | 4235 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 4236 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 4237 | esac |
b61ff9c8 BS |
4238 | else |
4239 | if test "$cross_compiling" = yes; then | |
4240 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
4241 | See \`config.log' for more details." >&5 | |
4242 | echo "$as_me: error: cannot run test program while cross compiling | |
4243 | See \`config.log' for more details." >&2;} | |
4244 | { (exit 1); exit 1; }; } | |
8b1f719a PB |
4245 | else |
4246 | cat >conftest.$ac_ext <<_ACEOF | |
bf3b7cd3 JD |
4247 | /* confdefs.h. */ |
4248 | _ACEOF | |
4249 | cat confdefs.h >>conftest.$ac_ext | |
4250 | cat >>conftest.$ac_ext <<_ACEOF | |
4251 | /* end confdefs.h. */ | |
4252 | $ac_includes_default | |
b61ff9c8 BS |
4253 | long longval () { return (long) (sizeof (short)); } |
4254 | unsigned long ulongval () { return (long) (sizeof (short)); } | |
bf3b7cd3 JD |
4255 | #include <stdio.h> |
4256 | #include <stdlib.h> | |
4257 | int | |
4258 | main () | |
4259 | { | |
4260 | ||
4261 | FILE *f = fopen ("conftest.val", "w"); | |
4262 | if (! f) | |
b61ff9c8 BS |
4263 | exit (1); |
4264 | if (((long) (sizeof (short))) < 0) | |
bf3b7cd3 | 4265 | { |
b61ff9c8 BS |
4266 | long i = longval (); |
4267 | if (i != ((long) (sizeof (short)))) | |
4268 | exit (1); | |
bf3b7cd3 JD |
4269 | fprintf (f, "%ld\n", i); |
4270 | } | |
4271 | else | |
4272 | { | |
b61ff9c8 BS |
4273 | unsigned long i = ulongval (); |
4274 | if (i != ((long) (sizeof (short)))) | |
4275 | exit (1); | |
bf3b7cd3 JD |
4276 | fprintf (f, "%lu\n", i); |
4277 | } | |
b61ff9c8 | 4278 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
4279 | |
4280 | ; | |
4281 | return 0; | |
4282 | } | |
4283 | _ACEOF | |
4284 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
4285 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
4286 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
4287 | ac_status=$? |
4288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4289 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
4290 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4291 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
4292 | ac_status=$? |
4293 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4294 | (exit $ac_status); }; }; then | |
4295 | ac_cv_sizeof_short=`cat conftest.val` | |
4296 | else | |
4297 | echo "$as_me: program exited with status $ac_status" >&5 | |
4298 | echo "$as_me: failed program was:" >&5 | |
4299 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4300 | ||
4301 | ( exit $ac_status ) | |
b61ff9c8 | 4302 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 |
bf3b7cd3 | 4303 | See \`config.log' for more details." >&5 |
b61ff9c8 | 4304 | echo "$as_me: error: cannot compute sizeof (short), 77 |
bf3b7cd3 | 4305 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
4306 | { (exit 1); exit 1; }; } |
4307 | fi | |
4308 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4309 | fi |
4310 | fi | |
4311 | rm -f conftest.val | |
b61ff9c8 BS |
4312 | else |
4313 | ac_cv_sizeof_short=0 | |
bf3b7cd3 | 4314 | fi |
b61ff9c8 BS |
4315 | fi |
4316 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
4317 | echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
bf3b7cd3 JD |
4318 | cat >>confdefs.h <<_ACEOF |
4319 | #define SIZEOF_SHORT $ac_cv_sizeof_short | |
4320 | _ACEOF | |
4321 | ||
4322 | ||
b61ff9c8 BS |
4323 | echo "$as_me:$LINENO: checking for int" >&5 |
4324 | echo $ECHO_N "checking for int... $ECHO_C" >&6 | |
bf3b7cd3 JD |
4325 | if test "${ac_cv_type_int+set}" = set; then |
4326 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4327 | else | |
4328 | cat >conftest.$ac_ext <<_ACEOF | |
4329 | /* confdefs.h. */ | |
4330 | _ACEOF | |
4331 | cat confdefs.h >>conftest.$ac_ext | |
4332 | cat >>conftest.$ac_ext <<_ACEOF | |
4333 | /* end confdefs.h. */ | |
4334 | $ac_includes_default | |
4335 | int | |
4336 | main () | |
4337 | { | |
b61ff9c8 | 4338 | if ((int *) 0) |
bf3b7cd3 | 4339 | return 0; |
b61ff9c8 | 4340 | if (sizeof (int)) |
bf3b7cd3 JD |
4341 | return 0; |
4342 | ; | |
4343 | return 0; | |
4344 | } | |
4345 | _ACEOF | |
4346 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4347 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4348 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4349 | ac_status=$? |
4350 | grep -v '^ *+' conftest.er1 >conftest.err | |
4351 | rm -f conftest.er1 | |
4352 | cat conftest.err >&5 | |
4353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4354 | (exit $ac_status); } && |
4355 | { ac_try='test -z "$ac_c_werror_flag" | |
4356 | || test ! -s conftest.err' | |
4357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4358 | (eval $ac_try) 2>&5 | |
4359 | ac_status=$? | |
4360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4361 | (exit $ac_status); }; } && | |
4362 | { ac_try='test -s conftest.$ac_objext' | |
4363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4364 | (eval $ac_try) 2>&5 | |
4365 | ac_status=$? | |
4366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4367 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4368 | ac_cv_type_int=yes |
4369 | else | |
4370 | echo "$as_me: failed program was:" >&5 | |
4371 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4372 | ||
b61ff9c8 | 4373 | ac_cv_type_int=no |
bf3b7cd3 | 4374 | fi |
b61ff9c8 | 4375 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4376 | fi |
b61ff9c8 BS |
4377 | echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 |
4378 | echo "${ECHO_T}$ac_cv_type_int" >&6 | |
bf3b7cd3 | 4379 | |
b61ff9c8 BS |
4380 | echo "$as_me:$LINENO: checking size of int" >&5 |
4381 | echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
bf3b7cd3 JD |
4382 | if test "${ac_cv_sizeof_int+set}" = set; then |
4383 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4384 | else | |
b61ff9c8 BS |
4385 | if test "$ac_cv_type_int" = yes; then |
4386 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4387 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4388 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4389 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
4390 | if test "$cross_compiling" = yes; then |
4391 | # Depending upon the size, compute the lo and hi bounds. | |
4392 | cat >conftest.$ac_ext <<_ACEOF | |
4393 | /* confdefs.h. */ | |
4394 | _ACEOF | |
4395 | cat confdefs.h >>conftest.$ac_ext | |
4396 | cat >>conftest.$ac_ext <<_ACEOF | |
4397 | /* end confdefs.h. */ | |
4398 | $ac_includes_default | |
4399 | int | |
4400 | main () | |
4401 | { | |
b61ff9c8 | 4402 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; |
bf3b7cd3 JD |
4403 | test_array [0] = 0 |
4404 | ||
4405 | ; | |
4406 | return 0; | |
4407 | } | |
4408 | _ACEOF | |
4409 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4410 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4411 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4412 | ac_status=$? |
4413 | grep -v '^ *+' conftest.er1 >conftest.err | |
4414 | rm -f conftest.er1 | |
4415 | cat conftest.err >&5 | |
4416 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4417 | (exit $ac_status); } && |
4418 | { ac_try='test -z "$ac_c_werror_flag" | |
4419 | || test ! -s conftest.err' | |
4420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4421 | (eval $ac_try) 2>&5 | |
4422 | ac_status=$? | |
4423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4424 | (exit $ac_status); }; } && | |
4425 | { ac_try='test -s conftest.$ac_objext' | |
4426 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4427 | (eval $ac_try) 2>&5 | |
4428 | ac_status=$? | |
4429 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4430 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4431 | ac_lo=0 ac_mid=0 |
4432 | while :; do | |
4433 | cat >conftest.$ac_ext <<_ACEOF | |
4434 | /* confdefs.h. */ | |
4435 | _ACEOF | |
4436 | cat confdefs.h >>conftest.$ac_ext | |
4437 | cat >>conftest.$ac_ext <<_ACEOF | |
4438 | /* end confdefs.h. */ | |
4439 | $ac_includes_default | |
4440 | int | |
4441 | main () | |
4442 | { | |
b61ff9c8 | 4443 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; |
bf3b7cd3 JD |
4444 | test_array [0] = 0 |
4445 | ||
4446 | ; | |
4447 | return 0; | |
4448 | } | |
4449 | _ACEOF | |
4450 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4451 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4452 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4453 | ac_status=$? |
4454 | grep -v '^ *+' conftest.er1 >conftest.err | |
4455 | rm -f conftest.er1 | |
4456 | cat conftest.err >&5 | |
4457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4458 | (exit $ac_status); } && |
4459 | { ac_try='test -z "$ac_c_werror_flag" | |
4460 | || test ! -s conftest.err' | |
4461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4462 | (eval $ac_try) 2>&5 | |
4463 | ac_status=$? | |
4464 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4465 | (exit $ac_status); }; } && | |
4466 | { ac_try='test -s conftest.$ac_objext' | |
4467 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4468 | (eval $ac_try) 2>&5 | |
4469 | ac_status=$? | |
4470 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4471 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4472 | ac_hi=$ac_mid; break |
4473 | else | |
4474 | echo "$as_me: failed program was:" >&5 | |
4475 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4476 | ||
b61ff9c8 BS |
4477 | ac_lo=`expr $ac_mid + 1` |
4478 | if test $ac_lo -le $ac_mid; then | |
4479 | ac_lo= ac_hi= | |
4480 | break | |
4481 | fi | |
4482 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4483 | fi |
b61ff9c8 | 4484 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4485 | done |
4486 | else | |
4487 | echo "$as_me: failed program was:" >&5 | |
4488 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4489 | ||
b61ff9c8 | 4490 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4491 | /* confdefs.h. */ |
4492 | _ACEOF | |
4493 | cat confdefs.h >>conftest.$ac_ext | |
4494 | cat >>conftest.$ac_ext <<_ACEOF | |
4495 | /* end confdefs.h. */ | |
4496 | $ac_includes_default | |
4497 | int | |
4498 | main () | |
4499 | { | |
b61ff9c8 | 4500 | static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; |
bf3b7cd3 JD |
4501 | test_array [0] = 0 |
4502 | ||
4503 | ; | |
4504 | return 0; | |
4505 | } | |
4506 | _ACEOF | |
4507 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4508 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4509 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4510 | ac_status=$? |
4511 | grep -v '^ *+' conftest.er1 >conftest.err | |
4512 | rm -f conftest.er1 | |
4513 | cat conftest.err >&5 | |
4514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4515 | (exit $ac_status); } && |
4516 | { ac_try='test -z "$ac_c_werror_flag" | |
4517 | || test ! -s conftest.err' | |
4518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4519 | (eval $ac_try) 2>&5 | |
4520 | ac_status=$? | |
4521 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4522 | (exit $ac_status); }; } && | |
4523 | { ac_try='test -s conftest.$ac_objext' | |
4524 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4525 | (eval $ac_try) 2>&5 | |
4526 | ac_status=$? | |
4527 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4528 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4529 | ac_hi=-1 ac_mid=-1 |
4530 | while :; do | |
4531 | cat >conftest.$ac_ext <<_ACEOF | |
4532 | /* confdefs.h. */ | |
4533 | _ACEOF | |
4534 | cat confdefs.h >>conftest.$ac_ext | |
4535 | cat >>conftest.$ac_ext <<_ACEOF | |
4536 | /* end confdefs.h. */ | |
4537 | $ac_includes_default | |
4538 | int | |
4539 | main () | |
4540 | { | |
b61ff9c8 | 4541 | static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; |
bf3b7cd3 JD |
4542 | test_array [0] = 0 |
4543 | ||
4544 | ; | |
4545 | return 0; | |
4546 | } | |
4547 | _ACEOF | |
4548 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4549 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4550 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4551 | ac_status=$? |
4552 | grep -v '^ *+' conftest.er1 >conftest.err | |
4553 | rm -f conftest.er1 | |
4554 | cat conftest.err >&5 | |
4555 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4556 | (exit $ac_status); } && |
4557 | { ac_try='test -z "$ac_c_werror_flag" | |
4558 | || test ! -s conftest.err' | |
4559 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4560 | (eval $ac_try) 2>&5 | |
4561 | ac_status=$? | |
4562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4563 | (exit $ac_status); }; } && | |
4564 | { ac_try='test -s conftest.$ac_objext' | |
4565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4566 | (eval $ac_try) 2>&5 | |
4567 | ac_status=$? | |
4568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4569 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4570 | ac_lo=$ac_mid; break |
4571 | else | |
4572 | echo "$as_me: failed program was:" >&5 | |
4573 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4574 | ||
b61ff9c8 BS |
4575 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4576 | if test $ac_mid -le $ac_hi; then | |
4577 | ac_lo= ac_hi= | |
4578 | break | |
4579 | fi | |
4580 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4581 | fi |
b61ff9c8 | 4582 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4583 | done |
4584 | else | |
4585 | echo "$as_me: failed program was:" >&5 | |
4586 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4587 | ||
b61ff9c8 | 4588 | ac_lo= ac_hi= |
bf3b7cd3 | 4589 | fi |
b61ff9c8 | 4590 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4591 | fi |
b61ff9c8 | 4592 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4593 | # Binary search between lo and hi bounds. |
4594 | while test "x$ac_lo" != "x$ac_hi"; do | |
4595 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
4596 | cat >conftest.$ac_ext <<_ACEOF | |
4597 | /* confdefs.h. */ | |
4598 | _ACEOF | |
4599 | cat confdefs.h >>conftest.$ac_ext | |
4600 | cat >>conftest.$ac_ext <<_ACEOF | |
4601 | /* end confdefs.h. */ | |
4602 | $ac_includes_default | |
4603 | int | |
4604 | main () | |
4605 | { | |
b61ff9c8 | 4606 | static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; |
bf3b7cd3 JD |
4607 | test_array [0] = 0 |
4608 | ||
4609 | ; | |
4610 | return 0; | |
4611 | } | |
4612 | _ACEOF | |
4613 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4614 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4615 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4616 | ac_status=$? |
4617 | grep -v '^ *+' conftest.er1 >conftest.err | |
4618 | rm -f conftest.er1 | |
4619 | cat conftest.err >&5 | |
4620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4621 | (exit $ac_status); } && |
4622 | { ac_try='test -z "$ac_c_werror_flag" | |
4623 | || test ! -s conftest.err' | |
4624 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4625 | (eval $ac_try) 2>&5 | |
4626 | ac_status=$? | |
4627 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4628 | (exit $ac_status); }; } && | |
4629 | { ac_try='test -s conftest.$ac_objext' | |
4630 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4631 | (eval $ac_try) 2>&5 | |
4632 | ac_status=$? | |
4633 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4634 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4635 | ac_hi=$ac_mid |
4636 | else | |
4637 | echo "$as_me: failed program was:" >&5 | |
4638 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4639 | ||
b61ff9c8 | 4640 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 4641 | fi |
b61ff9c8 | 4642 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4643 | done |
4644 | case $ac_lo in | |
4645 | ?*) ac_cv_sizeof_int=$ac_lo;; | |
b61ff9c8 | 4646 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 |
bf3b7cd3 | 4647 | See \`config.log' for more details." >&5 |
b61ff9c8 | 4648 | echo "$as_me: error: cannot compute sizeof (int), 77 |
bf3b7cd3 | 4649 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 4650 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 4651 | esac |
b61ff9c8 BS |
4652 | else |
4653 | if test "$cross_compiling" = yes; then | |
4654 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
4655 | See \`config.log' for more details." >&5 | |
4656 | echo "$as_me: error: cannot run test program while cross compiling | |
4657 | See \`config.log' for more details." >&2;} | |
4658 | { (exit 1); exit 1; }; } | |
bf3b7cd3 JD |
4659 | else |
4660 | cat >conftest.$ac_ext <<_ACEOF | |
4661 | /* confdefs.h. */ | |
4662 | _ACEOF | |
4663 | cat confdefs.h >>conftest.$ac_ext | |
4664 | cat >>conftest.$ac_ext <<_ACEOF | |
4665 | /* end confdefs.h. */ | |
4666 | $ac_includes_default | |
b61ff9c8 BS |
4667 | long longval () { return (long) (sizeof (int)); } |
4668 | unsigned long ulongval () { return (long) (sizeof (int)); } | |
bf3b7cd3 JD |
4669 | #include <stdio.h> |
4670 | #include <stdlib.h> | |
4671 | int | |
4672 | main () | |
4673 | { | |
4674 | ||
4675 | FILE *f = fopen ("conftest.val", "w"); | |
4676 | if (! f) | |
b61ff9c8 BS |
4677 | exit (1); |
4678 | if (((long) (sizeof (int))) < 0) | |
bf3b7cd3 | 4679 | { |
b61ff9c8 BS |
4680 | long i = longval (); |
4681 | if (i != ((long) (sizeof (int)))) | |
4682 | exit (1); | |
bf3b7cd3 JD |
4683 | fprintf (f, "%ld\n", i); |
4684 | } | |
4685 | else | |
4686 | { | |
b61ff9c8 BS |
4687 | unsigned long i = ulongval (); |
4688 | if (i != ((long) (sizeof (int)))) | |
4689 | exit (1); | |
bf3b7cd3 JD |
4690 | fprintf (f, "%lu\n", i); |
4691 | } | |
b61ff9c8 | 4692 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
4693 | |
4694 | ; | |
4695 | return 0; | |
4696 | } | |
4697 | _ACEOF | |
4698 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
4699 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
4700 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
4701 | ac_status=$? |
4702 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4703 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
4704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
4705 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
4706 | ac_status=$? |
4707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4708 | (exit $ac_status); }; }; then | |
4709 | ac_cv_sizeof_int=`cat conftest.val` | |
4710 | else | |
4711 | echo "$as_me: program exited with status $ac_status" >&5 | |
4712 | echo "$as_me: failed program was:" >&5 | |
4713 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4714 | ||
4715 | ( exit $ac_status ) | |
b61ff9c8 | 4716 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 |
bf3b7cd3 | 4717 | See \`config.log' for more details." >&5 |
b61ff9c8 | 4718 | echo "$as_me: error: cannot compute sizeof (int), 77 |
bf3b7cd3 | 4719 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
4720 | { (exit 1); exit 1; }; } |
4721 | fi | |
4722 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
4723 | fi |
4724 | fi | |
4725 | rm -f conftest.val | |
b61ff9c8 BS |
4726 | else |
4727 | ac_cv_sizeof_int=0 | |
bf3b7cd3 | 4728 | fi |
b61ff9c8 BS |
4729 | fi |
4730 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
4731 | echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
bf3b7cd3 JD |
4732 | cat >>confdefs.h <<_ACEOF |
4733 | #define SIZEOF_INT $ac_cv_sizeof_int | |
4734 | _ACEOF | |
4735 | ||
4736 | ||
b61ff9c8 BS |
4737 | echo "$as_me:$LINENO: checking for long" >&5 |
4738 | echo $ECHO_N "checking for long... $ECHO_C" >&6 | |
bf3b7cd3 JD |
4739 | if test "${ac_cv_type_long+set}" = set; then |
4740 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4741 | else | |
4742 | cat >conftest.$ac_ext <<_ACEOF | |
4743 | /* confdefs.h. */ | |
4744 | _ACEOF | |
4745 | cat confdefs.h >>conftest.$ac_ext | |
4746 | cat >>conftest.$ac_ext <<_ACEOF | |
4747 | /* end confdefs.h. */ | |
4748 | $ac_includes_default | |
4749 | int | |
4750 | main () | |
4751 | { | |
b61ff9c8 | 4752 | if ((long *) 0) |
bf3b7cd3 | 4753 | return 0; |
b61ff9c8 | 4754 | if (sizeof (long)) |
bf3b7cd3 JD |
4755 | return 0; |
4756 | ; | |
4757 | return 0; | |
4758 | } | |
4759 | _ACEOF | |
4760 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4761 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4762 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4763 | ac_status=$? |
4764 | grep -v '^ *+' conftest.er1 >conftest.err | |
4765 | rm -f conftest.er1 | |
4766 | cat conftest.err >&5 | |
4767 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4768 | (exit $ac_status); } && |
4769 | { ac_try='test -z "$ac_c_werror_flag" | |
4770 | || test ! -s conftest.err' | |
4771 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4772 | (eval $ac_try) 2>&5 | |
4773 | ac_status=$? | |
4774 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4775 | (exit $ac_status); }; } && | |
4776 | { ac_try='test -s conftest.$ac_objext' | |
4777 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4778 | (eval $ac_try) 2>&5 | |
4779 | ac_status=$? | |
4780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4781 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4782 | ac_cv_type_long=yes |
4783 | else | |
4784 | echo "$as_me: failed program was:" >&5 | |
4785 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4786 | ||
b61ff9c8 | 4787 | ac_cv_type_long=no |
bf3b7cd3 | 4788 | fi |
b61ff9c8 | 4789 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 4790 | fi |
b61ff9c8 BS |
4791 | echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 |
4792 | echo "${ECHO_T}$ac_cv_type_long" >&6 | |
bf3b7cd3 | 4793 | |
b61ff9c8 BS |
4794 | echo "$as_me:$LINENO: checking size of long" >&5 |
4795 | echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
bf3b7cd3 JD |
4796 | if test "${ac_cv_sizeof_long+set}" = set; then |
4797 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4798 | else | |
b61ff9c8 BS |
4799 | if test "$ac_cv_type_long" = yes; then |
4800 | # The cast to unsigned long works around a bug in the HP C Compiler | |
4801 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
4802 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
4803 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
4804 | if test "$cross_compiling" = yes; then |
4805 | # Depending upon the size, compute the lo and hi bounds. | |
4806 | cat >conftest.$ac_ext <<_ACEOF | |
4807 | /* confdefs.h. */ | |
4808 | _ACEOF | |
4809 | cat confdefs.h >>conftest.$ac_ext | |
4810 | cat >>conftest.$ac_ext <<_ACEOF | |
4811 | /* end confdefs.h. */ | |
4812 | $ac_includes_default | |
4813 | int | |
4814 | main () | |
4815 | { | |
b61ff9c8 | 4816 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; |
bf3b7cd3 JD |
4817 | test_array [0] = 0 |
4818 | ||
4819 | ; | |
4820 | return 0; | |
4821 | } | |
4822 | _ACEOF | |
4823 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4824 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4825 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4826 | ac_status=$? |
4827 | grep -v '^ *+' conftest.er1 >conftest.err | |
4828 | rm -f conftest.er1 | |
4829 | cat conftest.err >&5 | |
4830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4831 | (exit $ac_status); } && |
4832 | { ac_try='test -z "$ac_c_werror_flag" | |
4833 | || test ! -s conftest.err' | |
4834 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4835 | (eval $ac_try) 2>&5 | |
4836 | ac_status=$? | |
4837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4838 | (exit $ac_status); }; } && | |
4839 | { ac_try='test -s conftest.$ac_objext' | |
4840 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4841 | (eval $ac_try) 2>&5 | |
4842 | ac_status=$? | |
4843 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4844 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4845 | ac_lo=0 ac_mid=0 |
4846 | while :; do | |
4847 | cat >conftest.$ac_ext <<_ACEOF | |
4848 | /* confdefs.h. */ | |
4849 | _ACEOF | |
4850 | cat confdefs.h >>conftest.$ac_ext | |
4851 | cat >>conftest.$ac_ext <<_ACEOF | |
4852 | /* end confdefs.h. */ | |
4853 | $ac_includes_default | |
4854 | int | |
4855 | main () | |
4856 | { | |
b61ff9c8 | 4857 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; |
bf3b7cd3 JD |
4858 | test_array [0] = 0 |
4859 | ||
4860 | ; | |
4861 | return 0; | |
4862 | } | |
4863 | _ACEOF | |
4864 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4865 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4866 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4867 | ac_status=$? |
4868 | grep -v '^ *+' conftest.er1 >conftest.err | |
4869 | rm -f conftest.er1 | |
4870 | cat conftest.err >&5 | |
4871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4872 | (exit $ac_status); } && |
4873 | { ac_try='test -z "$ac_c_werror_flag" | |
4874 | || test ! -s conftest.err' | |
4875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4876 | (eval $ac_try) 2>&5 | |
4877 | ac_status=$? | |
4878 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4879 | (exit $ac_status); }; } && | |
4880 | { ac_try='test -s conftest.$ac_objext' | |
4881 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4882 | (eval $ac_try) 2>&5 | |
4883 | ac_status=$? | |
4884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4885 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4886 | ac_hi=$ac_mid; break |
4887 | else | |
4888 | echo "$as_me: failed program was:" >&5 | |
4889 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4890 | ||
b61ff9c8 BS |
4891 | ac_lo=`expr $ac_mid + 1` |
4892 | if test $ac_lo -le $ac_mid; then | |
4893 | ac_lo= ac_hi= | |
4894 | break | |
4895 | fi | |
4896 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
bf3b7cd3 | 4897 | fi |
b61ff9c8 | 4898 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4899 | done |
4900 | else | |
4901 | echo "$as_me: failed program was:" >&5 | |
4902 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4903 | ||
b61ff9c8 | 4904 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
4905 | /* confdefs.h. */ |
4906 | _ACEOF | |
4907 | cat confdefs.h >>conftest.$ac_ext | |
4908 | cat >>conftest.$ac_ext <<_ACEOF | |
4909 | /* end confdefs.h. */ | |
4910 | $ac_includes_default | |
4911 | int | |
4912 | main () | |
4913 | { | |
b61ff9c8 | 4914 | static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; |
bf3b7cd3 JD |
4915 | test_array [0] = 0 |
4916 | ||
4917 | ; | |
4918 | return 0; | |
4919 | } | |
4920 | _ACEOF | |
4921 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4922 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4923 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4924 | ac_status=$? |
4925 | grep -v '^ *+' conftest.er1 >conftest.err | |
4926 | rm -f conftest.er1 | |
4927 | cat conftest.err >&5 | |
4928 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4929 | (exit $ac_status); } && |
4930 | { ac_try='test -z "$ac_c_werror_flag" | |
4931 | || test ! -s conftest.err' | |
4932 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4933 | (eval $ac_try) 2>&5 | |
4934 | ac_status=$? | |
4935 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4936 | (exit $ac_status); }; } && | |
4937 | { ac_try='test -s conftest.$ac_objext' | |
4938 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4939 | (eval $ac_try) 2>&5 | |
4940 | ac_status=$? | |
4941 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4942 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4943 | ac_hi=-1 ac_mid=-1 |
4944 | while :; do | |
4945 | cat >conftest.$ac_ext <<_ACEOF | |
4946 | /* confdefs.h. */ | |
4947 | _ACEOF | |
4948 | cat confdefs.h >>conftest.$ac_ext | |
4949 | cat >>conftest.$ac_ext <<_ACEOF | |
4950 | /* end confdefs.h. */ | |
4951 | $ac_includes_default | |
4952 | int | |
4953 | main () | |
4954 | { | |
b61ff9c8 | 4955 | static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; |
bf3b7cd3 JD |
4956 | test_array [0] = 0 |
4957 | ||
4958 | ; | |
4959 | return 0; | |
4960 | } | |
4961 | _ACEOF | |
4962 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
4963 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
4964 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
4965 | ac_status=$? |
4966 | grep -v '^ *+' conftest.er1 >conftest.err | |
4967 | rm -f conftest.er1 | |
4968 | cat conftest.err >&5 | |
4969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
4970 | (exit $ac_status); } && |
4971 | { ac_try='test -z "$ac_c_werror_flag" | |
4972 | || test ! -s conftest.err' | |
4973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4974 | (eval $ac_try) 2>&5 | |
4975 | ac_status=$? | |
4976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4977 | (exit $ac_status); }; } && | |
4978 | { ac_try='test -s conftest.$ac_objext' | |
4979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4980 | (eval $ac_try) 2>&5 | |
4981 | ac_status=$? | |
4982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4983 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
4984 | ac_lo=$ac_mid; break |
4985 | else | |
4986 | echo "$as_me: failed program was:" >&5 | |
4987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4988 | ||
b61ff9c8 BS |
4989 | ac_hi=`expr '(' $ac_mid ')' - 1` |
4990 | if test $ac_mid -le $ac_hi; then | |
4991 | ac_lo= ac_hi= | |
4992 | break | |
4993 | fi | |
4994 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 4995 | fi |
b61ff9c8 | 4996 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
4997 | done |
4998 | else | |
4999 | echo "$as_me: failed program was:" >&5 | |
5000 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5001 | ||
b61ff9c8 | 5002 | ac_lo= ac_hi= |
bf3b7cd3 | 5003 | fi |
b61ff9c8 | 5004 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5005 | fi |
b61ff9c8 | 5006 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5007 | # Binary search between lo and hi bounds. |
5008 | while test "x$ac_lo" != "x$ac_hi"; do | |
5009 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5010 | cat >conftest.$ac_ext <<_ACEOF | |
5011 | /* confdefs.h. */ | |
5012 | _ACEOF | |
5013 | cat confdefs.h >>conftest.$ac_ext | |
5014 | cat >>conftest.$ac_ext <<_ACEOF | |
5015 | /* end confdefs.h. */ | |
5016 | $ac_includes_default | |
5017 | int | |
5018 | main () | |
5019 | { | |
b61ff9c8 | 5020 | static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; |
bf3b7cd3 JD |
5021 | test_array [0] = 0 |
5022 | ||
5023 | ; | |
5024 | return 0; | |
5025 | } | |
5026 | _ACEOF | |
5027 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5028 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5029 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5030 | ac_status=$? |
5031 | grep -v '^ *+' conftest.er1 >conftest.err | |
5032 | rm -f conftest.er1 | |
5033 | cat conftest.err >&5 | |
5034 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5035 | (exit $ac_status); } && |
5036 | { ac_try='test -z "$ac_c_werror_flag" | |
5037 | || test ! -s conftest.err' | |
5038 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5039 | (eval $ac_try) 2>&5 | |
5040 | ac_status=$? | |
5041 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5042 | (exit $ac_status); }; } && | |
5043 | { ac_try='test -s conftest.$ac_objext' | |
5044 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5045 | (eval $ac_try) 2>&5 | |
5046 | ac_status=$? | |
5047 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5048 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5049 | ac_hi=$ac_mid |
5050 | else | |
5051 | echo "$as_me: failed program was:" >&5 | |
5052 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5053 | ||
b61ff9c8 | 5054 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5055 | fi |
b61ff9c8 | 5056 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5057 | done |
5058 | case $ac_lo in | |
5059 | ?*) ac_cv_sizeof_long=$ac_lo;; | |
b61ff9c8 | 5060 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 |
bf3b7cd3 | 5061 | See \`config.log' for more details." >&5 |
b61ff9c8 | 5062 | echo "$as_me: error: cannot compute sizeof (long), 77 |
bf3b7cd3 | 5063 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 5064 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 5065 | esac |
b61ff9c8 BS |
5066 | else |
5067 | if test "$cross_compiling" = yes; then | |
5068 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
5069 | See \`config.log' for more details." >&5 | |
5070 | echo "$as_me: error: cannot run test program while cross compiling | |
5071 | See \`config.log' for more details." >&2;} | |
5072 | { (exit 1); exit 1; }; } | |
bf3b7cd3 JD |
5073 | else |
5074 | cat >conftest.$ac_ext <<_ACEOF | |
5075 | /* confdefs.h. */ | |
5076 | _ACEOF | |
5077 | cat confdefs.h >>conftest.$ac_ext | |
5078 | cat >>conftest.$ac_ext <<_ACEOF | |
5079 | /* end confdefs.h. */ | |
5080 | $ac_includes_default | |
b61ff9c8 BS |
5081 | long longval () { return (long) (sizeof (long)); } |
5082 | unsigned long ulongval () { return (long) (sizeof (long)); } | |
bf3b7cd3 JD |
5083 | #include <stdio.h> |
5084 | #include <stdlib.h> | |
5085 | int | |
5086 | main () | |
5087 | { | |
5088 | ||
5089 | FILE *f = fopen ("conftest.val", "w"); | |
5090 | if (! f) | |
b61ff9c8 BS |
5091 | exit (1); |
5092 | if (((long) (sizeof (long))) < 0) | |
bf3b7cd3 | 5093 | { |
b61ff9c8 BS |
5094 | long i = longval (); |
5095 | if (i != ((long) (sizeof (long)))) | |
5096 | exit (1); | |
bf3b7cd3 JD |
5097 | fprintf (f, "%ld\n", i); |
5098 | } | |
5099 | else | |
5100 | { | |
b61ff9c8 BS |
5101 | unsigned long i = ulongval (); |
5102 | if (i != ((long) (sizeof (long)))) | |
5103 | exit (1); | |
bf3b7cd3 JD |
5104 | fprintf (f, "%lu\n", i); |
5105 | } | |
b61ff9c8 | 5106 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
5107 | |
5108 | ; | |
5109 | return 0; | |
5110 | } | |
5111 | _ACEOF | |
5112 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
5113 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
5114 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
5115 | ac_status=$? |
5116 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5117 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
5118 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5119 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
5120 | ac_status=$? |
5121 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5122 | (exit $ac_status); }; }; then | |
5123 | ac_cv_sizeof_long=`cat conftest.val` | |
5124 | else | |
5125 | echo "$as_me: program exited with status $ac_status" >&5 | |
5126 | echo "$as_me: failed program was:" >&5 | |
5127 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5128 | ||
5129 | ( exit $ac_status ) | |
b61ff9c8 | 5130 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 |
bf3b7cd3 | 5131 | See \`config.log' for more details." >&5 |
b61ff9c8 | 5132 | echo "$as_me: error: cannot compute sizeof (long), 77 |
bf3b7cd3 | 5133 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
5134 | { (exit 1); exit 1; }; } |
5135 | fi | |
5136 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5137 | fi |
5138 | fi | |
5139 | rm -f conftest.val | |
b61ff9c8 BS |
5140 | else |
5141 | ac_cv_sizeof_long=0 | |
bf3b7cd3 | 5142 | fi |
b61ff9c8 BS |
5143 | fi |
5144 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
5145 | echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
bf3b7cd3 JD |
5146 | cat >>confdefs.h <<_ACEOF |
5147 | #define SIZEOF_LONG $ac_cv_sizeof_long | |
5148 | _ACEOF | |
5149 | ||
5150 | ||
b61ff9c8 BS |
5151 | echo "$as_me:$LINENO: checking for long long" >&5 |
5152 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
5ec1c5e6 KC |
5153 | if test "${ac_cv_type_long_long+set}" = set; then |
5154 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5155 | else | |
5156 | cat >conftest.$ac_ext <<_ACEOF | |
5157 | /* confdefs.h. */ | |
5158 | _ACEOF | |
5159 | cat confdefs.h >>conftest.$ac_ext | |
5160 | cat >>conftest.$ac_ext <<_ACEOF | |
5161 | /* end confdefs.h. */ | |
5162 | $ac_includes_default | |
5163 | int | |
5164 | main () | |
5165 | { | |
b61ff9c8 | 5166 | if ((long long *) 0) |
5ec1c5e6 | 5167 | return 0; |
b61ff9c8 | 5168 | if (sizeof (long long)) |
5ec1c5e6 KC |
5169 | return 0; |
5170 | ; | |
5171 | return 0; | |
5172 | } | |
5173 | _ACEOF | |
5174 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5175 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5176 | (eval $ac_compile) 2>conftest.er1 | |
5ec1c5e6 KC |
5177 | ac_status=$? |
5178 | grep -v '^ *+' conftest.er1 >conftest.err | |
5179 | rm -f conftest.er1 | |
5180 | cat conftest.err >&5 | |
5181 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5182 | (exit $ac_status); } && |
5183 | { ac_try='test -z "$ac_c_werror_flag" | |
5184 | || test ! -s conftest.err' | |
5185 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5186 | (eval $ac_try) 2>&5 | |
5187 | ac_status=$? | |
5188 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5189 | (exit $ac_status); }; } && | |
5190 | { ac_try='test -s conftest.$ac_objext' | |
5191 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5192 | (eval $ac_try) 2>&5 | |
5193 | ac_status=$? | |
5194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5195 | (exit $ac_status); }; }; then | |
5ec1c5e6 KC |
5196 | ac_cv_type_long_long=yes |
5197 | else | |
5198 | echo "$as_me: failed program was:" >&5 | |
5199 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5200 | ||
b61ff9c8 | 5201 | ac_cv_type_long_long=no |
5ec1c5e6 | 5202 | fi |
b61ff9c8 | 5203 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5ec1c5e6 | 5204 | fi |
b61ff9c8 BS |
5205 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5206 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
5ec1c5e6 KC |
5207 | if test $ac_cv_type_long_long = yes; then |
5208 | ||
5209 | cat >>confdefs.h <<_ACEOF | |
5210 | #define HAVE_LONG_LONG 1 | |
5211 | _ACEOF | |
5212 | ||
b61ff9c8 BS |
5213 | echo "$as_me:$LINENO: checking for long long" >&5 |
5214 | echo $ECHO_N "checking for long long... $ECHO_C" >&6 | |
bf3b7cd3 JD |
5215 | if test "${ac_cv_type_long_long+set}" = set; then |
5216 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5217 | else | |
5218 | cat >conftest.$ac_ext <<_ACEOF | |
5219 | /* confdefs.h. */ | |
5220 | _ACEOF | |
5221 | cat confdefs.h >>conftest.$ac_ext | |
5222 | cat >>conftest.$ac_ext <<_ACEOF | |
5223 | /* end confdefs.h. */ | |
5224 | $ac_includes_default | |
5225 | int | |
5226 | main () | |
5227 | { | |
b61ff9c8 | 5228 | if ((long long *) 0) |
bf3b7cd3 | 5229 | return 0; |
b61ff9c8 | 5230 | if (sizeof (long long)) |
bf3b7cd3 JD |
5231 | return 0; |
5232 | ; | |
5233 | return 0; | |
5234 | } | |
5235 | _ACEOF | |
5236 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5237 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5238 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5239 | ac_status=$? |
5240 | grep -v '^ *+' conftest.er1 >conftest.err | |
5241 | rm -f conftest.er1 | |
5242 | cat conftest.err >&5 | |
5243 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5244 | (exit $ac_status); } && |
5245 | { ac_try='test -z "$ac_c_werror_flag" | |
5246 | || test ! -s conftest.err' | |
5247 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5248 | (eval $ac_try) 2>&5 | |
5249 | ac_status=$? | |
5250 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5251 | (exit $ac_status); }; } && | |
5252 | { ac_try='test -s conftest.$ac_objext' | |
5253 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5254 | (eval $ac_try) 2>&5 | |
5255 | ac_status=$? | |
5256 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5257 | (exit $ac_status); }; }; then | |
5258 | ac_cv_type_long_long=yes | |
5259 | else | |
bf3b7cd3 JD |
5260 | echo "$as_me: failed program was:" >&5 |
5261 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5262 | ||
b61ff9c8 | 5263 | ac_cv_type_long_long=no |
bf3b7cd3 | 5264 | fi |
b61ff9c8 | 5265 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5266 | fi |
b61ff9c8 BS |
5267 | echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 |
5268 | echo "${ECHO_T}$ac_cv_type_long_long" >&6 | |
bf3b7cd3 | 5269 | |
b61ff9c8 BS |
5270 | echo "$as_me:$LINENO: checking size of long long" >&5 |
5271 | echo $ECHO_N "checking size of long long... $ECHO_C" >&6 | |
bf3b7cd3 JD |
5272 | if test "${ac_cv_sizeof_long_long+set}" = set; then |
5273 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5274 | else | |
b61ff9c8 BS |
5275 | if test "$ac_cv_type_long_long" = yes; then |
5276 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5277 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5278 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5279 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
5280 | if test "$cross_compiling" = yes; then |
5281 | # Depending upon the size, compute the lo and hi bounds. | |
5282 | cat >conftest.$ac_ext <<_ACEOF | |
5283 | /* confdefs.h. */ | |
5284 | _ACEOF | |
5285 | cat confdefs.h >>conftest.$ac_ext | |
5286 | cat >>conftest.$ac_ext <<_ACEOF | |
5287 | /* end confdefs.h. */ | |
5288 | $ac_includes_default | |
5289 | int | |
5290 | main () | |
5291 | { | |
b61ff9c8 | 5292 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; |
bf3b7cd3 JD |
5293 | test_array [0] = 0 |
5294 | ||
5295 | ; | |
5296 | return 0; | |
5297 | } | |
5298 | _ACEOF | |
5299 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5300 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5301 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5302 | ac_status=$? |
5303 | grep -v '^ *+' conftest.er1 >conftest.err | |
5304 | rm -f conftest.er1 | |
5305 | cat conftest.err >&5 | |
5306 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5307 | (exit $ac_status); } && |
5308 | { ac_try='test -z "$ac_c_werror_flag" | |
5309 | || test ! -s conftest.err' | |
5310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5311 | (eval $ac_try) 2>&5 | |
5312 | ac_status=$? | |
5313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5314 | (exit $ac_status); }; } && | |
5315 | { ac_try='test -s conftest.$ac_objext' | |
5316 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5317 | (eval $ac_try) 2>&5 | |
5318 | ac_status=$? | |
5319 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5320 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5321 | ac_lo=0 ac_mid=0 |
5322 | while :; do | |
5323 | cat >conftest.$ac_ext <<_ACEOF | |
5324 | /* confdefs.h. */ | |
5325 | _ACEOF | |
5326 | cat confdefs.h >>conftest.$ac_ext | |
5327 | cat >>conftest.$ac_ext <<_ACEOF | |
5328 | /* end confdefs.h. */ | |
5329 | $ac_includes_default | |
5330 | int | |
5331 | main () | |
5332 | { | |
b61ff9c8 | 5333 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; |
bf3b7cd3 JD |
5334 | test_array [0] = 0 |
5335 | ||
5336 | ; | |
5337 | return 0; | |
5338 | } | |
5339 | _ACEOF | |
5340 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5341 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5342 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5343 | ac_status=$? |
5344 | grep -v '^ *+' conftest.er1 >conftest.err | |
5345 | rm -f conftest.er1 | |
5346 | cat conftest.err >&5 | |
5347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5348 | (exit $ac_status); } && |
5349 | { ac_try='test -z "$ac_c_werror_flag" | |
5350 | || test ! -s conftest.err' | |
5351 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5352 | (eval $ac_try) 2>&5 | |
5353 | ac_status=$? | |
5354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5355 | (exit $ac_status); }; } && | |
5356 | { ac_try='test -s conftest.$ac_objext' | |
5357 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5358 | (eval $ac_try) 2>&5 | |
5359 | ac_status=$? | |
5360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5361 | (exit $ac_status); }; }; then | |
8b1f719a | 5362 | ac_hi=$ac_mid; break |
bf3b7cd3 JD |
5363 | else |
5364 | echo "$as_me: failed program was:" >&5 | |
5365 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5366 | ||
b61ff9c8 BS |
5367 | ac_lo=`expr $ac_mid + 1` |
5368 | if test $ac_lo -le $ac_mid; then | |
5369 | ac_lo= ac_hi= | |
5370 | break | |
5371 | fi | |
5372 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
8b1f719a | 5373 | fi |
b61ff9c8 | 5374 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
8b1f719a PB |
5375 | done |
5376 | else | |
5377 | echo "$as_me: failed program was:" >&5 | |
5378 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5379 | ||
b61ff9c8 | 5380 | cat >conftest.$ac_ext <<_ACEOF |
bf3b7cd3 JD |
5381 | /* confdefs.h. */ |
5382 | _ACEOF | |
5383 | cat confdefs.h >>conftest.$ac_ext | |
5384 | cat >>conftest.$ac_ext <<_ACEOF | |
5385 | /* end confdefs.h. */ | |
5386 | $ac_includes_default | |
5387 | int | |
5388 | main () | |
5389 | { | |
b61ff9c8 | 5390 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; |
bf3b7cd3 JD |
5391 | test_array [0] = 0 |
5392 | ||
5393 | ; | |
5394 | return 0; | |
5395 | } | |
5396 | _ACEOF | |
5397 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5398 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5399 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5400 | ac_status=$? |
5401 | grep -v '^ *+' conftest.er1 >conftest.err | |
5402 | rm -f conftest.er1 | |
5403 | cat conftest.err >&5 | |
5404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5405 | (exit $ac_status); } && |
5406 | { ac_try='test -z "$ac_c_werror_flag" | |
5407 | || test ! -s conftest.err' | |
5408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5409 | (eval $ac_try) 2>&5 | |
5410 | ac_status=$? | |
5411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5412 | (exit $ac_status); }; } && | |
5413 | { ac_try='test -s conftest.$ac_objext' | |
5414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5415 | (eval $ac_try) 2>&5 | |
5416 | ac_status=$? | |
5417 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5418 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5419 | ac_hi=-1 ac_mid=-1 |
5420 | while :; do | |
5421 | cat >conftest.$ac_ext <<_ACEOF | |
5422 | /* confdefs.h. */ | |
5423 | _ACEOF | |
5424 | cat confdefs.h >>conftest.$ac_ext | |
5425 | cat >>conftest.$ac_ext <<_ACEOF | |
5426 | /* end confdefs.h. */ | |
5427 | $ac_includes_default | |
5428 | int | |
5429 | main () | |
5430 | { | |
b61ff9c8 | 5431 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; |
bf3b7cd3 JD |
5432 | test_array [0] = 0 |
5433 | ||
5434 | ; | |
5435 | return 0; | |
5436 | } | |
5437 | _ACEOF | |
5438 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5439 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5440 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5441 | ac_status=$? |
5442 | grep -v '^ *+' conftest.er1 >conftest.err | |
5443 | rm -f conftest.er1 | |
5444 | cat conftest.err >&5 | |
5445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5446 | (exit $ac_status); } && |
5447 | { ac_try='test -z "$ac_c_werror_flag" | |
5448 | || test ! -s conftest.err' | |
5449 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5450 | (eval $ac_try) 2>&5 | |
5451 | ac_status=$? | |
5452 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5453 | (exit $ac_status); }; } && | |
5454 | { ac_try='test -s conftest.$ac_objext' | |
5455 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5456 | (eval $ac_try) 2>&5 | |
5457 | ac_status=$? | |
5458 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5459 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5460 | ac_lo=$ac_mid; break |
5461 | else | |
5462 | echo "$as_me: failed program was:" >&5 | |
5463 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5464 | ||
b61ff9c8 BS |
5465 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5466 | if test $ac_mid -le $ac_hi; then | |
5467 | ac_lo= ac_hi= | |
5468 | break | |
5469 | fi | |
5470 | ac_mid=`expr 2 '*' $ac_mid` | |
bf3b7cd3 | 5471 | fi |
b61ff9c8 | 5472 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5473 | done |
5474 | else | |
5475 | echo "$as_me: failed program was:" >&5 | |
5476 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5477 | ||
b61ff9c8 | 5478 | ac_lo= ac_hi= |
bf3b7cd3 | 5479 | fi |
b61ff9c8 | 5480 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5481 | fi |
b61ff9c8 | 5482 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5483 | # Binary search between lo and hi bounds. |
5484 | while test "x$ac_lo" != "x$ac_hi"; do | |
5485 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
5486 | cat >conftest.$ac_ext <<_ACEOF | |
5487 | /* confdefs.h. */ | |
5488 | _ACEOF | |
5489 | cat confdefs.h >>conftest.$ac_ext | |
5490 | cat >>conftest.$ac_ext <<_ACEOF | |
5491 | /* end confdefs.h. */ | |
5492 | $ac_includes_default | |
5493 | int | |
5494 | main () | |
5495 | { | |
b61ff9c8 | 5496 | static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; |
bf3b7cd3 JD |
5497 | test_array [0] = 0 |
5498 | ||
5499 | ; | |
5500 | return 0; | |
5501 | } | |
5502 | _ACEOF | |
5503 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5504 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5505 | (eval $ac_compile) 2>conftest.er1 | |
bf3b7cd3 JD |
5506 | ac_status=$? |
5507 | grep -v '^ *+' conftest.er1 >conftest.err | |
5508 | rm -f conftest.er1 | |
5509 | cat conftest.err >&5 | |
5510 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5511 | (exit $ac_status); } && |
5512 | { ac_try='test -z "$ac_c_werror_flag" | |
5513 | || test ! -s conftest.err' | |
5514 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5515 | (eval $ac_try) 2>&5 | |
5516 | ac_status=$? | |
5517 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5518 | (exit $ac_status); }; } && | |
5519 | { ac_try='test -s conftest.$ac_objext' | |
5520 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5521 | (eval $ac_try) 2>&5 | |
5522 | ac_status=$? | |
5523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5524 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5525 | ac_hi=$ac_mid |
5526 | else | |
5527 | echo "$as_me: failed program was:" >&5 | |
5528 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5529 | ||
b61ff9c8 | 5530 | ac_lo=`expr '(' $ac_mid ')' + 1` |
bf3b7cd3 | 5531 | fi |
b61ff9c8 | 5532 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5533 | done |
5534 | case $ac_lo in | |
5535 | ?*) ac_cv_sizeof_long_long=$ac_lo;; | |
b61ff9c8 | 5536 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 |
bf3b7cd3 | 5537 | See \`config.log' for more details." >&5 |
b61ff9c8 | 5538 | echo "$as_me: error: cannot compute sizeof (long long), 77 |
bf3b7cd3 | 5539 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 5540 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 5541 | esac |
b61ff9c8 BS |
5542 | else |
5543 | if test "$cross_compiling" = yes; then | |
5544 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
5545 | See \`config.log' for more details." >&5 | |
5546 | echo "$as_me: error: cannot run test program while cross compiling | |
5547 | See \`config.log' for more details." >&2;} | |
5548 | { (exit 1); exit 1; }; } | |
bf3b7cd3 JD |
5549 | else |
5550 | cat >conftest.$ac_ext <<_ACEOF | |
5551 | /* confdefs.h. */ | |
5552 | _ACEOF | |
5553 | cat confdefs.h >>conftest.$ac_ext | |
5554 | cat >>conftest.$ac_ext <<_ACEOF | |
5555 | /* end confdefs.h. */ | |
5556 | $ac_includes_default | |
b61ff9c8 BS |
5557 | long longval () { return (long) (sizeof (long long)); } |
5558 | unsigned long ulongval () { return (long) (sizeof (long long)); } | |
bf3b7cd3 JD |
5559 | #include <stdio.h> |
5560 | #include <stdlib.h> | |
5561 | int | |
5562 | main () | |
5563 | { | |
5564 | ||
5565 | FILE *f = fopen ("conftest.val", "w"); | |
5566 | if (! f) | |
b61ff9c8 BS |
5567 | exit (1); |
5568 | if (((long) (sizeof (long long))) < 0) | |
bf3b7cd3 | 5569 | { |
b61ff9c8 BS |
5570 | long i = longval (); |
5571 | if (i != ((long) (sizeof (long long)))) | |
5572 | exit (1); | |
bf3b7cd3 JD |
5573 | fprintf (f, "%ld\n", i); |
5574 | } | |
5575 | else | |
5576 | { | |
b61ff9c8 BS |
5577 | unsigned long i = ulongval (); |
5578 | if (i != ((long) (sizeof (long long)))) | |
5579 | exit (1); | |
bf3b7cd3 JD |
5580 | fprintf (f, "%lu\n", i); |
5581 | } | |
b61ff9c8 | 5582 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
5583 | |
5584 | ; | |
5585 | return 0; | |
5586 | } | |
5587 | _ACEOF | |
5588 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
5589 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
5590 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
5591 | ac_status=$? |
5592 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5593 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
5594 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
5595 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
5596 | ac_status=$? |
5597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5598 | (exit $ac_status); }; }; then | |
5599 | ac_cv_sizeof_long_long=`cat conftest.val` | |
5600 | else | |
5601 | echo "$as_me: program exited with status $ac_status" >&5 | |
5602 | echo "$as_me: failed program was:" >&5 | |
5603 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5604 | ||
5605 | ( exit $ac_status ) | |
b61ff9c8 | 5606 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 |
bf3b7cd3 | 5607 | See \`config.log' for more details." >&5 |
b61ff9c8 | 5608 | echo "$as_me: error: cannot compute sizeof (long long), 77 |
bf3b7cd3 | 5609 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
5610 | { (exit 1); exit 1; }; } |
5611 | fi | |
5612 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
5613 | fi |
5614 | fi | |
5615 | rm -f conftest.val | |
b61ff9c8 BS |
5616 | else |
5617 | ac_cv_sizeof_long_long=0 | |
2f41c1d6 | 5618 | fi |
b61ff9c8 BS |
5619 | fi |
5620 | echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 | |
5621 | echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 | |
bf3b7cd3 JD |
5622 | cat >>confdefs.h <<_ACEOF |
5623 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long | |
5624 | _ACEOF | |
5625 | ||
5626 | ||
5627 | fi | |
5ec1c5e6 | 5628 | |
b61ff9c8 BS |
5629 | echo "$as_me:$LINENO: checking for __int64" >&5 |
5630 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
5ec1c5e6 KC |
5631 | if test "${ac_cv_type___int64+set}" = set; then |
5632 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5633 | else | |
5634 | cat >conftest.$ac_ext <<_ACEOF | |
5635 | /* confdefs.h. */ | |
5636 | _ACEOF | |
5637 | cat confdefs.h >>conftest.$ac_ext | |
5638 | cat >>conftest.$ac_ext <<_ACEOF | |
5639 | /* end confdefs.h. */ | |
5640 | $ac_includes_default | |
5641 | int | |
5642 | main () | |
5643 | { | |
b61ff9c8 | 5644 | if ((__int64 *) 0) |
5ec1c5e6 | 5645 | return 0; |
b61ff9c8 | 5646 | if (sizeof (__int64)) |
5ec1c5e6 KC |
5647 | return 0; |
5648 | ; | |
5649 | return 0; | |
5650 | } | |
5651 | _ACEOF | |
5652 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5653 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5654 | (eval $ac_compile) 2>conftest.er1 | |
5ec1c5e6 KC |
5655 | ac_status=$? |
5656 | grep -v '^ *+' conftest.er1 >conftest.err | |
5657 | rm -f conftest.er1 | |
5658 | cat conftest.err >&5 | |
5659 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
5660 | (exit $ac_status); } && |
5661 | { ac_try='test -z "$ac_c_werror_flag" | |
5662 | || test ! -s conftest.err' | |
5663 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5664 | (eval $ac_try) 2>&5 | |
5665 | ac_status=$? | |
5666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5667 | (exit $ac_status); }; } && | |
5668 | { ac_try='test -s conftest.$ac_objext' | |
5669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5670 | (eval $ac_try) 2>&5 | |
5671 | ac_status=$? | |
5672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5673 | (exit $ac_status); }; }; then | |
5ec1c5e6 KC |
5674 | ac_cv_type___int64=yes |
5675 | else | |
5676 | echo "$as_me: failed program was:" >&5 | |
5677 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5678 | ||
b61ff9c8 | 5679 | ac_cv_type___int64=no |
5ec1c5e6 | 5680 | fi |
b61ff9c8 | 5681 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
5ec1c5e6 | 5682 | fi |
b61ff9c8 BS |
5683 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5684 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
5ec1c5e6 KC |
5685 | if test $ac_cv_type___int64 = yes; then |
5686 | ||
5687 | cat >>confdefs.h <<_ACEOF | |
5688 | #define HAVE___INT64 1 | |
5689 | _ACEOF | |
5690 | ||
b61ff9c8 BS |
5691 | echo "$as_me:$LINENO: checking for __int64" >&5 |
5692 | echo $ECHO_N "checking for __int64... $ECHO_C" >&6 | |
bf3b7cd3 JD |
5693 | if test "${ac_cv_type___int64+set}" = set; then |
5694 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5695 | else | |
ba479fd2 | 5696 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5697 | /* confdefs.h. */ |
5698 | _ACEOF | |
5699 | cat confdefs.h >>conftest.$ac_ext | |
5700 | cat >>conftest.$ac_ext <<_ACEOF | |
5701 | /* end confdefs.h. */ | |
bf3b7cd3 | 5702 | $ac_includes_default |
ba479fd2 NN |
5703 | int |
5704 | main () | |
5705 | { | |
b61ff9c8 | 5706 | if ((__int64 *) 0) |
bf3b7cd3 | 5707 | return 0; |
b61ff9c8 | 5708 | if (sizeof (__int64)) |
bf3b7cd3 | 5709 | return 0; |
ba479fd2 NN |
5710 | ; |
5711 | return 0; | |
5712 | } | |
5713 | _ACEOF | |
5714 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5715 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5716 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5717 | ac_status=$? |
86da66b5 HPN |
5718 | grep -v '^ *+' conftest.er1 >conftest.err |
5719 | rm -f conftest.er1 | |
5720 | cat conftest.err >&5 | |
ba479fd2 | 5721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5722 | (exit $ac_status); } && |
5723 | { ac_try='test -z "$ac_c_werror_flag" | |
5724 | || test ! -s conftest.err' | |
5725 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5726 | (eval $ac_try) 2>&5 | |
5727 | ac_status=$? | |
5728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5729 | (exit $ac_status); }; } && | |
5730 | { ac_try='test -s conftest.$ac_objext' | |
5731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5732 | (eval $ac_try) 2>&5 | |
5733 | ac_status=$? | |
5734 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5735 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5736 | ac_cv_type___int64=yes |
75b6f3fd | 5737 | else |
ba479fd2 NN |
5738 | echo "$as_me: failed program was:" >&5 |
5739 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5740 | ||
b61ff9c8 | 5741 | ac_cv_type___int64=no |
75b6f3fd | 5742 | fi |
b61ff9c8 | 5743 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75b6f3fd | 5744 | fi |
b61ff9c8 BS |
5745 | echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 |
5746 | echo "${ECHO_T}$ac_cv_type___int64" >&6 | |
75b6f3fd | 5747 | |
b61ff9c8 BS |
5748 | echo "$as_me:$LINENO: checking size of __int64" >&5 |
5749 | echo $ECHO_N "checking size of __int64... $ECHO_C" >&6 | |
bf3b7cd3 | 5750 | if test "${ac_cv_sizeof___int64+set}" = set; then |
ba479fd2 | 5751 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
414d23ae | 5752 | else |
b61ff9c8 BS |
5753 | if test "$ac_cv_type___int64" = yes; then |
5754 | # The cast to unsigned long works around a bug in the HP C Compiler | |
5755 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
5756 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. | |
5757 | # This bug is HP SR number 8606223364. | |
bf3b7cd3 JD |
5758 | if test "$cross_compiling" = yes; then |
5759 | # Depending upon the size, compute the lo and hi bounds. | |
5760 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5761 | /* confdefs.h. */ |
5762 | _ACEOF | |
5763 | cat confdefs.h >>conftest.$ac_ext | |
5764 | cat >>conftest.$ac_ext <<_ACEOF | |
5765 | /* end confdefs.h. */ | |
bf3b7cd3 | 5766 | $ac_includes_default |
ba479fd2 NN |
5767 | int |
5768 | main () | |
5769 | { | |
b61ff9c8 | 5770 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= 0)]; |
bf3b7cd3 JD |
5771 | test_array [0] = 0 |
5772 | ||
ba479fd2 NN |
5773 | ; |
5774 | return 0; | |
5775 | } | |
5776 | _ACEOF | |
5777 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5778 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5779 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5780 | ac_status=$? |
86da66b5 HPN |
5781 | grep -v '^ *+' conftest.er1 >conftest.err |
5782 | rm -f conftest.er1 | |
5783 | cat conftest.err >&5 | |
ba479fd2 | 5784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5785 | (exit $ac_status); } && |
5786 | { ac_try='test -z "$ac_c_werror_flag" | |
5787 | || test ! -s conftest.err' | |
5788 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5789 | (eval $ac_try) 2>&5 | |
5790 | ac_status=$? | |
5791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5792 | (exit $ac_status); }; } && | |
5793 | { ac_try='test -s conftest.$ac_objext' | |
5794 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5795 | (eval $ac_try) 2>&5 | |
5796 | ac_status=$? | |
5797 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5798 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5799 | ac_lo=0 ac_mid=0 |
5800 | while :; do | |
5801 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5802 | /* confdefs.h. */ |
5803 | _ACEOF | |
5804 | cat confdefs.h >>conftest.$ac_ext | |
5805 | cat >>conftest.$ac_ext <<_ACEOF | |
5806 | /* end confdefs.h. */ | |
bf3b7cd3 | 5807 | $ac_includes_default |
ba479fd2 NN |
5808 | int |
5809 | main () | |
5810 | { | |
b61ff9c8 | 5811 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
bf3b7cd3 JD |
5812 | test_array [0] = 0 |
5813 | ||
ba479fd2 NN |
5814 | ; |
5815 | return 0; | |
5816 | } | |
5817 | _ACEOF | |
5818 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5819 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5820 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5821 | ac_status=$? |
86da66b5 HPN |
5822 | grep -v '^ *+' conftest.er1 >conftest.err |
5823 | rm -f conftest.er1 | |
5824 | cat conftest.err >&5 | |
ba479fd2 | 5825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5826 | (exit $ac_status); } && |
5827 | { ac_try='test -z "$ac_c_werror_flag" | |
5828 | || test ! -s conftest.err' | |
5829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5830 | (eval $ac_try) 2>&5 | |
5831 | ac_status=$? | |
5832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5833 | (exit $ac_status); }; } && | |
5834 | { ac_try='test -s conftest.$ac_objext' | |
5835 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5836 | (eval $ac_try) 2>&5 | |
5837 | ac_status=$? | |
5838 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5839 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5840 | ac_hi=$ac_mid; break |
75e93faa | 5841 | else |
ba479fd2 NN |
5842 | echo "$as_me: failed program was:" >&5 |
5843 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5844 | ||
b61ff9c8 BS |
5845 | ac_lo=`expr $ac_mid + 1` |
5846 | if test $ac_lo -le $ac_mid; then | |
5847 | ac_lo= ac_hi= | |
5848 | break | |
5849 | fi | |
5850 | ac_mid=`expr 2 '*' $ac_mid + 1` | |
75e93faa | 5851 | fi |
b61ff9c8 | 5852 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 | 5853 | done |
75e93faa | 5854 | else |
bf3b7cd3 JD |
5855 | echo "$as_me: failed program was:" >&5 |
5856 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5857 | ||
b61ff9c8 | 5858 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5859 | /* confdefs.h. */ |
5860 | _ACEOF | |
5861 | cat confdefs.h >>conftest.$ac_ext | |
5862 | cat >>conftest.$ac_ext <<_ACEOF | |
5863 | /* end confdefs.h. */ | |
bf3b7cd3 | 5864 | $ac_includes_default |
ba479fd2 NN |
5865 | int |
5866 | main () | |
5867 | { | |
b61ff9c8 | 5868 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) < 0)]; |
bf3b7cd3 JD |
5869 | test_array [0] = 0 |
5870 | ||
ba479fd2 NN |
5871 | ; |
5872 | return 0; | |
5873 | } | |
5874 | _ACEOF | |
5875 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5876 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5877 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5878 | ac_status=$? |
86da66b5 HPN |
5879 | grep -v '^ *+' conftest.er1 >conftest.err |
5880 | rm -f conftest.er1 | |
5881 | cat conftest.err >&5 | |
ba479fd2 | 5882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5883 | (exit $ac_status); } && |
5884 | { ac_try='test -z "$ac_c_werror_flag" | |
5885 | || test ! -s conftest.err' | |
5886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5887 | (eval $ac_try) 2>&5 | |
5888 | ac_status=$? | |
5889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5890 | (exit $ac_status); }; } && | |
5891 | { ac_try='test -s conftest.$ac_objext' | |
5892 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5893 | (eval $ac_try) 2>&5 | |
5894 | ac_status=$? | |
5895 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5896 | (exit $ac_status); }; }; then | |
bf3b7cd3 JD |
5897 | ac_hi=-1 ac_mid=-1 |
5898 | while :; do | |
5899 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
5900 | /* confdefs.h. */ |
5901 | _ACEOF | |
5902 | cat confdefs.h >>conftest.$ac_ext | |
5903 | cat >>conftest.$ac_ext <<_ACEOF | |
5904 | /* end confdefs.h. */ | |
bf3b7cd3 | 5905 | $ac_includes_default |
ba479fd2 NN |
5906 | int |
5907 | main () | |
5908 | { | |
b61ff9c8 | 5909 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) >= $ac_mid)]; |
bf3b7cd3 JD |
5910 | test_array [0] = 0 |
5911 | ||
ba479fd2 NN |
5912 | ; |
5913 | return 0; | |
5914 | } | |
5915 | _ACEOF | |
5916 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5917 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5918 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5919 | ac_status=$? |
86da66b5 HPN |
5920 | grep -v '^ *+' conftest.er1 >conftest.err |
5921 | rm -f conftest.er1 | |
5922 | cat conftest.err >&5 | |
ba479fd2 | 5923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5924 | (exit $ac_status); } && |
5925 | { ac_try='test -z "$ac_c_werror_flag" | |
5926 | || test ! -s conftest.err' | |
5927 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5928 | (eval $ac_try) 2>&5 | |
5929 | ac_status=$? | |
5930 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5931 | (exit $ac_status); }; } && | |
5932 | { ac_try='test -s conftest.$ac_objext' | |
5933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5934 | (eval $ac_try) 2>&5 | |
5935 | ac_status=$? | |
5936 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5937 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 5938 | ac_lo=$ac_mid; break |
04cabffc | 5939 | else |
ba479fd2 NN |
5940 | echo "$as_me: failed program was:" >&5 |
5941 | sed 's/^/| /' conftest.$ac_ext >&5 | |
5942 | ||
b61ff9c8 BS |
5943 | ac_hi=`expr '(' $ac_mid ')' - 1` |
5944 | if test $ac_mid -le $ac_hi; then | |
5945 | ac_lo= ac_hi= | |
5946 | break | |
5947 | fi | |
5948 | ac_mid=`expr 2 '*' $ac_mid` | |
04cabffc | 5949 | fi |
b61ff9c8 | 5950 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5951 | done |
5952 | else | |
5953 | echo "$as_me: failed program was:" >&5 | |
5954 | sed 's/^/| /' conftest.$ac_ext >&5 | |
04cabffc | 5955 | |
b61ff9c8 | 5956 | ac_lo= ac_hi= |
414d23ae | 5957 | fi |
b61ff9c8 | 5958 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 5959 | fi |
b61ff9c8 | 5960 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
bf3b7cd3 JD |
5961 | # Binary search between lo and hi bounds. |
5962 | while test "x$ac_lo" != "x$ac_hi"; do | |
5963 | ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` | |
ba479fd2 | 5964 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
5965 | /* confdefs.h. */ |
5966 | _ACEOF | |
5967 | cat confdefs.h >>conftest.$ac_ext | |
5968 | cat >>conftest.$ac_ext <<_ACEOF | |
5969 | /* end confdefs.h. */ | |
bf3b7cd3 | 5970 | $ac_includes_default |
ba479fd2 NN |
5971 | int |
5972 | main () | |
5973 | { | |
b61ff9c8 | 5974 | static int test_array [1 - 2 * !(((long) (sizeof (__int64))) <= $ac_mid)]; |
bf3b7cd3 JD |
5975 | test_array [0] = 0 |
5976 | ||
ba479fd2 NN |
5977 | ; |
5978 | return 0; | |
5979 | } | |
5980 | _ACEOF | |
5981 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
5982 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
5983 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 5984 | ac_status=$? |
86da66b5 HPN |
5985 | grep -v '^ *+' conftest.er1 >conftest.err |
5986 | rm -f conftest.er1 | |
5987 | cat conftest.err >&5 | |
ba479fd2 | 5988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
5989 | (exit $ac_status); } && |
5990 | { ac_try='test -z "$ac_c_werror_flag" | |
5991 | || test ! -s conftest.err' | |
5992 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5993 | (eval $ac_try) 2>&5 | |
5994 | ac_status=$? | |
5995 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5996 | (exit $ac_status); }; } && | |
5997 | { ac_try='test -s conftest.$ac_objext' | |
5998 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5999 | (eval $ac_try) 2>&5 | |
6000 | ac_status=$? | |
6001 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6002 | (exit $ac_status); }; }; then | |
bf3b7cd3 | 6003 | ac_hi=$ac_mid |
75e93faa | 6004 | else |
ba479fd2 NN |
6005 | echo "$as_me: failed program was:" >&5 |
6006 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6007 | ||
b61ff9c8 | 6008 | ac_lo=`expr '(' $ac_mid ')' + 1` |
75e93faa | 6009 | fi |
b61ff9c8 | 6010 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
414d23ae | 6011 | done |
bf3b7cd3 JD |
6012 | case $ac_lo in |
6013 | ?*) ac_cv_sizeof___int64=$ac_lo;; | |
b61ff9c8 | 6014 | '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 |
bf3b7cd3 | 6015 | See \`config.log' for more details." >&5 |
b61ff9c8 | 6016 | echo "$as_me: error: cannot compute sizeof (__int64), 77 |
bf3b7cd3 | 6017 | See \`config.log' for more details." >&2;} |
b61ff9c8 | 6018 | { (exit 1); exit 1; }; } ;; |
bf3b7cd3 | 6019 | esac |
b61ff9c8 BS |
6020 | else |
6021 | if test "$cross_compiling" = yes; then | |
6022 | { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
6023 | See \`config.log' for more details." >&5 | |
6024 | echo "$as_me: error: cannot run test program while cross compiling | |
6025 | See \`config.log' for more details." >&2;} | |
6026 | { (exit 1); exit 1; }; } | |
bf3b7cd3 JD |
6027 | else |
6028 | cat >conftest.$ac_ext <<_ACEOF | |
6029 | /* confdefs.h. */ | |
6030 | _ACEOF | |
6031 | cat confdefs.h >>conftest.$ac_ext | |
6032 | cat >>conftest.$ac_ext <<_ACEOF | |
6033 | /* end confdefs.h. */ | |
6034 | $ac_includes_default | |
b61ff9c8 BS |
6035 | long longval () { return (long) (sizeof (__int64)); } |
6036 | unsigned long ulongval () { return (long) (sizeof (__int64)); } | |
bf3b7cd3 JD |
6037 | #include <stdio.h> |
6038 | #include <stdlib.h> | |
6039 | int | |
6040 | main () | |
6041 | { | |
414d23ae | 6042 | |
bf3b7cd3 JD |
6043 | FILE *f = fopen ("conftest.val", "w"); |
6044 | if (! f) | |
b61ff9c8 BS |
6045 | exit (1); |
6046 | if (((long) (sizeof (__int64))) < 0) | |
bf3b7cd3 | 6047 | { |
b61ff9c8 BS |
6048 | long i = longval (); |
6049 | if (i != ((long) (sizeof (__int64)))) | |
6050 | exit (1); | |
bf3b7cd3 JD |
6051 | fprintf (f, "%ld\n", i); |
6052 | } | |
6053 | else | |
6054 | { | |
b61ff9c8 BS |
6055 | unsigned long i = ulongval (); |
6056 | if (i != ((long) (sizeof (__int64)))) | |
6057 | exit (1); | |
bf3b7cd3 JD |
6058 | fprintf (f, "%lu\n", i); |
6059 | } | |
b61ff9c8 | 6060 | exit (ferror (f) || fclose (f) != 0); |
bf3b7cd3 JD |
6061 | |
6062 | ; | |
6063 | return 0; | |
6064 | } | |
6065 | _ACEOF | |
6066 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
6067 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
6068 | (eval $ac_link) 2>&5 | |
bf3b7cd3 JD |
6069 | ac_status=$? |
6070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6071 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
6072 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
6073 | (eval $ac_try) 2>&5 | |
bf3b7cd3 JD |
6074 | ac_status=$? |
6075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6076 | (exit $ac_status); }; }; then | |
6077 | ac_cv_sizeof___int64=`cat conftest.val` | |
6078 | else | |
6079 | echo "$as_me: program exited with status $ac_status" >&5 | |
6080 | echo "$as_me: failed program was:" >&5 | |
6081 | sed 's/^/| /' conftest.$ac_ext >&5 | |
75e93faa | 6082 | |
bf3b7cd3 | 6083 | ( exit $ac_status ) |
b61ff9c8 | 6084 | { { echo "$as_me:$LINENO: error: cannot compute sizeof (__int64), 77 |
bf3b7cd3 | 6085 | See \`config.log' for more details." >&5 |
b61ff9c8 | 6086 | echo "$as_me: error: cannot compute sizeof (__int64), 77 |
bf3b7cd3 | 6087 | See \`config.log' for more details." >&2;} |
b61ff9c8 BS |
6088 | { (exit 1); exit 1; }; } |
6089 | fi | |
6090 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
bf3b7cd3 JD |
6091 | fi |
6092 | fi | |
6093 | rm -f conftest.val | |
b61ff9c8 BS |
6094 | else |
6095 | ac_cv_sizeof___int64=0 | |
bf3b7cd3 | 6096 | fi |
b61ff9c8 BS |
6097 | fi |
6098 | echo "$as_me:$LINENO: result: $ac_cv_sizeof___int64" >&5 | |
6099 | echo "${ECHO_T}$ac_cv_sizeof___int64" >&6 | |
ba479fd2 | 6100 | cat >>confdefs.h <<_ACEOF |
414d23ae | 6101 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
ba479fd2 | 6102 | _ACEOF |
414d23ae | 6103 | |
cafe096b | 6104 | |
414d23ae HPN |
6105 | fi |
6106 | ||
5ec1c5e6 | 6107 | |
34a86c2b NN |
6108 | # --------------------- |
6109 | # Warnings and checking | |
6110 | # --------------------- | |
6111 | ||
b5472e1d NN |
6112 | # Check $CC warning features (if it's GCC). |
6113 | # We want to use -pedantic, but we don't want warnings about | |
6114 | # * 'long long' | |
6115 | # * variadic macros | |
89a42ac8 | 6116 | # * overlong strings |
b5472e1d NN |
6117 | # So, we only use -pedantic if we can disable those warnings. |
6118 | ||
3bbd5a19 PB |
6119 | loose_warn= |
6120 | save_CFLAGS="$CFLAGS" | |
6121 | for option in -W -Wall -Wwrite-strings -Wstrict-prototypes \ | |
6122 | -Wmissing-prototypes; do | |
6123 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
6124 | ||
b61ff9c8 BS |
6125 | echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6126 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 | |
6127 | if eval "test \"\${$as_acx_Woption+set}\" = set"; then | |
b5472e1d NN |
6128 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6129 | else | |
3bbd5a19 PB |
6130 | CFLAGS="$option" |
6131 | cat >conftest.$ac_ext <<_ACEOF | |
b5472e1d NN |
6132 | /* confdefs.h. */ |
6133 | _ACEOF | |
6134 | cat confdefs.h >>conftest.$ac_ext | |
6135 | cat >>conftest.$ac_ext <<_ACEOF | |
6136 | /* end confdefs.h. */ | |
6137 | ||
3bbd5a19 PB |
6138 | int |
6139 | main () | |
6140 | { | |
6141 | ||
6142 | ; | |
6143 | return 0; | |
6144 | } | |
b5472e1d NN |
6145 | _ACEOF |
6146 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
6147 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
6148 | (eval $ac_compile) 2>conftest.er1 | |
b5472e1d NN |
6149 | ac_status=$? |
6150 | grep -v '^ *+' conftest.er1 >conftest.err | |
6151 | rm -f conftest.er1 | |
6152 | cat conftest.err >&5 | |
6153 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6154 | (exit $ac_status); } && |
6155 | { ac_try='test -z "$ac_c_werror_flag" | |
6156 | || test ! -s conftest.err' | |
6157 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6158 | (eval $ac_try) 2>&5 | |
6159 | ac_status=$? | |
6160 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6161 | (exit $ac_status); }; } && | |
6162 | { ac_try='test -s conftest.$ac_objext' | |
6163 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6164 | (eval $ac_try) 2>&5 | |
6165 | ac_status=$? | |
6166 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6167 | (exit $ac_status); }; }; then | |
3bbd5a19 | 6168 | eval "$as_acx_Woption=yes" |
b5472e1d NN |
6169 | else |
6170 | echo "$as_me: failed program was:" >&5 | |
6171 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6172 | ||
b61ff9c8 | 6173 | eval "$as_acx_Woption=no" |
b5472e1d | 6174 | fi |
b61ff9c8 | 6175 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b5472e1d NN |
6176 | |
6177 | fi | |
b61ff9c8 BS |
6178 | echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 |
6179 | echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 | |
3bbd5a19 PB |
6180 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6181 | loose_warn="$loose_warn${loose_warn:+ }$option" | |
6182 | fi | |
6183 | ||
6184 | done | |
6185 | CFLAGS="$save_CFLAGS" | |
6186 | ||
6187 | cxx_compat_warn= | |
6188 | save_CFLAGS="$CFLAGS" | |
6189 | for option in -Wc++-compat; do | |
6190 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
b5472e1d | 6191 | |
b61ff9c8 BS |
6192 | echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6193 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 | |
6194 | if eval "test \"\${$as_acx_Woption+set}\" = set"; then | |
b5472e1d NN |
6195 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6196 | else | |
3bbd5a19 PB |
6197 | CFLAGS="$option" |
6198 | cat >conftest.$ac_ext <<_ACEOF | |
b5472e1d NN |
6199 | /* confdefs.h. */ |
6200 | _ACEOF | |
6201 | cat confdefs.h >>conftest.$ac_ext | |
6202 | cat >>conftest.$ac_ext <<_ACEOF | |
6203 | /* end confdefs.h. */ | |
6204 | ||
3bbd5a19 PB |
6205 | int |
6206 | main () | |
6207 | { | |
6208 | ||
6209 | ; | |
6210 | return 0; | |
6211 | } | |
b5472e1d NN |
6212 | _ACEOF |
6213 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
6214 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
6215 | (eval $ac_compile) 2>conftest.er1 | |
b5472e1d NN |
6216 | ac_status=$? |
6217 | grep -v '^ *+' conftest.er1 >conftest.err | |
6218 | rm -f conftest.er1 | |
6219 | cat conftest.err >&5 | |
6220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6221 | (exit $ac_status); } && |
6222 | { ac_try='test -z "$ac_c_werror_flag" | |
6223 | || test ! -s conftest.err' | |
6224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6225 | (eval $ac_try) 2>&5 | |
6226 | ac_status=$? | |
6227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6228 | (exit $ac_status); }; } && | |
6229 | { ac_try='test -s conftest.$ac_objext' | |
6230 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6231 | (eval $ac_try) 2>&5 | |
6232 | ac_status=$? | |
6233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6234 | (exit $ac_status); }; }; then | |
3bbd5a19 | 6235 | eval "$as_acx_Woption=yes" |
b5472e1d NN |
6236 | else |
6237 | echo "$as_me: failed program was:" >&5 | |
6238 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6239 | ||
b61ff9c8 | 6240 | eval "$as_acx_Woption=no" |
b5472e1d | 6241 | fi |
b61ff9c8 | 6242 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b5472e1d NN |
6243 | |
6244 | fi | |
b61ff9c8 BS |
6245 | echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 |
6246 | echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 | |
3bbd5a19 PB |
6247 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6248 | cxx_compat_warn="$cxx_compat_warn${cxx_compat_warn:+ }$option" | |
6249 | fi | |
6250 | ||
6251 | done | |
6252 | CFLAGS="$save_CFLAGS" | |
b5472e1d | 6253 | |
3bbd5a19 PB |
6254 | strict_warn= |
6255 | save_CFLAGS="$CFLAGS" | |
6256 | for option in -Wold-style-definition \ | |
6257 | -Wmissing-format-attribute; do | |
6258 | as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` | |
6259 | ||
b61ff9c8 BS |
6260 | echo "$as_me:$LINENO: checking whether $CC supports $option" >&5 |
6261 | echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6 | |
6262 | if eval "test \"\${$as_acx_Woption+set}\" = set"; then | |
89a42ac8 ZW |
6263 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6264 | else | |
3bbd5a19 PB |
6265 | CFLAGS="$option" |
6266 | cat >conftest.$ac_ext <<_ACEOF | |
89a42ac8 ZW |
6267 | /* confdefs.h. */ |
6268 | _ACEOF | |
6269 | cat confdefs.h >>conftest.$ac_ext | |
6270 | cat >>conftest.$ac_ext <<_ACEOF | |
6271 | /* end confdefs.h. */ | |
6272 | ||
3bbd5a19 PB |
6273 | int |
6274 | main () | |
6275 | { | |
6276 | ||
6277 | ; | |
6278 | return 0; | |
6279 | } | |
89a42ac8 ZW |
6280 | _ACEOF |
6281 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
6282 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
6283 | (eval $ac_compile) 2>conftest.er1 | |
89a42ac8 ZW |
6284 | ac_status=$? |
6285 | grep -v '^ *+' conftest.er1 >conftest.err | |
6286 | rm -f conftest.er1 | |
6287 | cat conftest.err >&5 | |
6288 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6289 | (exit $ac_status); } && |
6290 | { ac_try='test -z "$ac_c_werror_flag" | |
6291 | || test ! -s conftest.err' | |
6292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6293 | (eval $ac_try) 2>&5 | |
6294 | ac_status=$? | |
6295 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6296 | (exit $ac_status); }; } && | |
6297 | { ac_try='test -s conftest.$ac_objext' | |
6298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6299 | (eval $ac_try) 2>&5 | |
6300 | ac_status=$? | |
6301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6302 | (exit $ac_status); }; }; then | |
3bbd5a19 | 6303 | eval "$as_acx_Woption=yes" |
89a42ac8 ZW |
6304 | else |
6305 | echo "$as_me: failed program was:" >&5 | |
6306 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6307 | ||
b61ff9c8 | 6308 | eval "$as_acx_Woption=no" |
89a42ac8 | 6309 | fi |
b61ff9c8 | 6310 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
89a42ac8 ZW |
6311 | |
6312 | fi | |
b61ff9c8 BS |
6313 | echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5 |
6314 | echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6 | |
3bbd5a19 PB |
6315 | if test `eval echo '${'$as_acx_Woption'}'` = yes; then |
6316 | strict_warn="$strict_warn${strict_warn:+ }$option" | |
34a86c2b NN |
6317 | fi |
6318 | ||
3bbd5a19 PB |
6319 | done |
6320 | CFLAGS="$save_CFLAGS" | |
6321 | ||
6322 | if test "$GCC" = yes; then | |
b61ff9c8 | 6323 | echo "$as_me:$LINENO: checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \ |
3bbd5a19 PB |
6324 | -Wno-overlength-strings" >&5 |
6325 | echo $ECHO_N "checking whether $CC supports -pedantic -Wno-long-long -Wno-variadic-macros \ | |
b61ff9c8 | 6326 | -Wno-overlength-strings... $ECHO_C" >&6 |
3bbd5a19 | 6327 | if test "${acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings+set}" = set; then |
643d3bd2 NN |
6328 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
6329 | else | |
6330 | save_CFLAGS="$CFLAGS" | |
3bbd5a19 PB |
6331 | CFLAGS="-pedantic -Wno-long-long -Wno-variadic-macros \ |
6332 | -Wno-overlength-strings" | |
6333 | cat >conftest.$ac_ext <<_ACEOF | |
643d3bd2 NN |
6334 | /* confdefs.h. */ |
6335 | _ACEOF | |
6336 | cat confdefs.h >>conftest.$ac_ext | |
6337 | cat >>conftest.$ac_ext <<_ACEOF | |
6338 | /* end confdefs.h. */ | |
6339 | ||
3bbd5a19 PB |
6340 | int |
6341 | main () | |
6342 | { | |
6343 | ||
6344 | ; | |
6345 | return 0; | |
6346 | } | |
643d3bd2 NN |
6347 | _ACEOF |
6348 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
6349 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
6350 | (eval $ac_compile) 2>conftest.er1 | |
643d3bd2 NN |
6351 | ac_status=$? |
6352 | grep -v '^ *+' conftest.er1 >conftest.err | |
6353 | rm -f conftest.er1 | |
6354 | cat conftest.err >&5 | |
6355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6356 | (exit $ac_status); } && |
6357 | { ac_try='test -z "$ac_c_werror_flag" | |
6358 | || test ! -s conftest.err' | |
6359 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6360 | (eval $ac_try) 2>&5 | |
6361 | ac_status=$? | |
6362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6363 | (exit $ac_status); }; } && | |
6364 | { ac_try='test -s conftest.$ac_objext' | |
6365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6366 | (eval $ac_try) 2>&5 | |
6367 | ac_status=$? | |
6368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6369 | (exit $ac_status); }; }; then | |
3bbd5a19 | 6370 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=yes |
643d3bd2 NN |
6371 | else |
6372 | echo "$as_me: failed program was:" >&5 | |
6373 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6374 | ||
b61ff9c8 | 6375 | acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no |
643d3bd2 | 6376 | fi |
b61ff9c8 | 6377 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
3bbd5a19 | 6378 | CFLAGS="$save_CFLAGS" |
643d3bd2 | 6379 | fi |
b61ff9c8 BS |
6380 | echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&5 |
6381 | echo "${ECHO_T}$acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings" >&6 | |
3bbd5a19 PB |
6382 | if test $acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings = yes; then |
6383 | strict_warn="$strict_warn${strict_warn:+ }-pedantic -Wno-long-long -Wno-variadic-macros \ | |
6384 | -Wno-overlength-strings" | |
643d3bd2 NN |
6385 | fi |
6386 | ||
ac0f3f39 | 6387 | |
ac0f3f39 | 6388 | fi |
ac0f3f39 | 6389 | |
ac0f3f39 | 6390 | |
b61ff9c8 | 6391 | # Check whether --enable-werror-always or --disable-werror-always was given. |
09a9c095 | 6392 | if test "${enable_werror_always+set}" = set; then |
b61ff9c8 BS |
6393 | enableval="$enable_werror_always" |
6394 | ||
09a9c095 NN |
6395 | else |
6396 | enable_werror_always=no | |
b61ff9c8 | 6397 | fi; |
3bbd5a19 PB |
6398 | if test $enable_werror_always = yes; then |
6399 | strict_warn="$strict_warn${strict_warn:+ }-Werror" | |
373477bb | 6400 | fi |
373477bb | 6401 | |
373477bb GDR |
6402 | |
6403 | ||
6404 | ||
3bbd5a19 PB |
6405 | # The above macros do nothing if the compiler is not GCC. However, the |
6406 | # Makefile has more goo to add other flags, so this variabl is used to | |
6407 | # enables warnings only for GCC. | |
414d23ae HPN |
6408 | warn_cflags= |
6409 | if test "x$GCC" = "xyes"; then | |
6410 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
6411 | fi | |
6412 | ||
6413 | ||
8b1f719a | 6414 | # Enable expensive internal checks |
a1286ef5 ZW |
6415 | is_release= |
6416 | if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then | |
6417 | is_release=yes | |
6418 | fi | |
a6ccdbab | 6419 | |
b61ff9c8 | 6420 | # Check whether --enable-checking or --disable-checking was given. |
414d23ae | 6421 | if test "${enable_checking+set}" = set; then |
b61ff9c8 BS |
6422 | enableval="$enable_checking" |
6423 | ac_checking_flags="${enableval}" | |
e1bbfc5c NS |
6424 | else |
6425 | ||
6426 | # Determine the default checks. | |
6427 | if test x$is_release = x ; then | |
6428 | ac_checking_flags=yes | |
6429 | else | |
6430 | ac_checking_flags=release | |
6431 | fi | |
b61ff9c8 | 6432 | fi; |
e1bbfc5c | 6433 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," |
04c3028a | 6434 | for check in release $ac_checking_flags |
e1bbfc5c NS |
6435 | do |
6436 | case $check in | |
cdce5c16 | 6437 | # these set all the flags to specific states |
0d475361 | 6438 | yes) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking= ; |
cdce5c16 NS |
6439 | ac_fold_checking= ; ac_gc_checking=1 ; |
6440 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6441 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; |
7e98624c RG |
6442 | ac_tree_checking=1 ; ac_valgrind_checking= ; |
6443 | ac_types_checking= ;; | |
3089f8b5 | 6444 | no|none) ac_assert_checking= ; ac_checking= ; ac_df_checking= ; |
cdce5c16 NS |
6445 | ac_fold_checking= ; ac_gc_checking= ; |
6446 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
232b67d9 | 6447 | ac_rtlflag_checking= ; ac_runtime_checking= ; |
7e98624c RG |
6448 | ac_tree_checking= ; ac_valgrind_checking= ; |
6449 | ac_types_checking= ;; | |
3089f8b5 | 6450 | all) ac_assert_checking=1 ; ac_checking=1 ; ac_df_checking=1 ; |
cdce5c16 NS |
6451 | ac_fold_checking=1 ; ac_gc_checking=1 ; |
6452 | ac_gc_always_collect=1 ; ac_rtl_checking=1 ; | |
6453 | ac_rtlflag_checking=1 ; ac_runtime_checking=1 ; | |
7e98624c RG |
6454 | ac_tree_checking=1 ; ac_valgrind_checking= ; |
6455 | ac_types_checking=1 ;; | |
3089f8b5 | 6456 | release) ac_assert_checking=1 ; ac_checking= ; ac_df_checking= ; |
cdce5c16 NS |
6457 | ac_fold_checking= ; ac_gc_checking= ; |
6458 | ac_gc_always_collect= ; ac_rtl_checking= ; | |
6459 | ac_rtlflag_checking= ; ac_runtime_checking=1 ; | |
7e98624c RG |
6460 | ac_tree_checking= ; ac_valgrind_checking= ; |
6461 | ac_types_checking= ;; | |
cdce5c16 | 6462 | # these enable particular checks |
e1bbfc5c | 6463 | assert) ac_assert_checking=1 ;; |
3089f8b5 | 6464 | df) ac_df_checking=1 ;; |
e1bbfc5c NS |
6465 | fold) ac_fold_checking=1 ;; |
6466 | gc) ac_gc_checking=1 ;; | |
6467 | gcac) ac_gc_always_collect=1 ;; | |
6468 | misc) ac_checking=1 ;; | |
e1bbfc5c | 6469 | rtl) ac_rtl_checking=1 ;; |
cdce5c16 | 6470 | rtlflag) ac_rtlflag_checking=1 ;; |
b53ef395 | 6471 | runtime) ac_runtime_checking=1 ;; |
e1bbfc5c | 6472 | tree) ac_tree_checking=1 ;; |
7e98624c | 6473 | types) ac_types_checking=1 ;; |
cdce5c16 | 6474 | valgrind) ac_valgrind_checking=1 ;; |
e1bbfc5c | 6475 | *) { { echo "$as_me:$LINENO: error: unknown check category $check" >&5 |
ba479fd2 NN |
6476 | echo "$as_me: error: unknown check category $check" >&2;} |
6477 | { (exit 1); exit 1; }; } ;; | |
e1bbfc5c NS |
6478 | esac |
6479 | done | |
6480 | IFS="$ac_save_IFS" | |
06c37c96 | 6481 | |
ba479fd2 NN |
6482 | nocommon_flag="" |
6483 | if test x$ac_checking != x ; then | |
6484 | ||
6485 | cat >>confdefs.h <<\_ACEOF | |
6486 | #define ENABLE_CHECKING 1 | |
6487 | _ACEOF | |
6488 | ||
6489 | nocommon_flag=-fno-common | |
6490 | fi | |
3bbd5a19 | 6491 | |
3089f8b5 PB |
6492 | if test x$ac_df_checking != x ; then |
6493 | ||
6494 | cat >>confdefs.h <<\_ACEOF | |
6495 | #define ENABLE_DF_CHECKING 1 | |
6496 | _ACEOF | |
6497 | ||
6498 | fi | |
06c37c96 NS |
6499 | if test x$ac_assert_checking != x ; then |
6500 | ||
6501 | cat >>confdefs.h <<\_ACEOF | |
6502 | #define ENABLE_ASSERT_CHECKING 1 | |
6503 | _ACEOF | |
6504 | ||
b53ef395 | 6505 | fi |
232b67d9 | 6506 | |
b53ef395 NS |
6507 | if test x$ac_runtime_checking != x ; then |
6508 | ||
6509 | cat >>confdefs.h <<\_ACEOF | |
6510 | #define ENABLE_RUNTIME_CHECKING 1 | |
6511 | _ACEOF | |
6512 | ||
06c37c96 | 6513 | fi |
ba479fd2 NN |
6514 | if test x$ac_tree_checking != x ; then |
6515 | ||
6516 | cat >>confdefs.h <<\_ACEOF | |
6517 | #define ENABLE_TREE_CHECKING 1 | |
6518 | _ACEOF | |
6519 | ||
13f05fd0 | 6520 | TREEBROWSER=tree-browser.o |
ba479fd2 | 6521 | fi |
7e98624c RG |
6522 | if test x$ac_types_checking != x ; then |
6523 | ||
6524 | cat >>confdefs.h <<\_ACEOF | |
6525 | #define ENABLE_TYPES_CHECKING 1 | |
6526 | _ACEOF | |
6527 | ||
6528 | fi | |
13f05fd0 | 6529 | |
ba479fd2 NN |
6530 | if test x$ac_rtl_checking != x ; then |
6531 | ||
6532 | cat >>confdefs.h <<\_ACEOF | |
6533 | #define ENABLE_RTL_CHECKING 1 | |
6534 | _ACEOF | |
6535 | ||
6536 | fi | |
6537 | if test x$ac_rtlflag_checking != x ; then | |
6538 | ||
6539 | cat >>confdefs.h <<\_ACEOF | |
6540 | #define ENABLE_RTL_FLAG_CHECKING 1 | |
6541 | _ACEOF | |
6542 | ||
6543 | fi | |
6544 | if test x$ac_gc_checking != x ; then | |
6545 | ||
6546 | cat >>confdefs.h <<\_ACEOF | |
6547 | #define ENABLE_GC_CHECKING 1 | |
6548 | _ACEOF | |
6549 | ||
6550 | fi | |
6551 | if test x$ac_gc_always_collect != x ; then | |
6552 | ||
6553 | cat >>confdefs.h <<\_ACEOF | |
6554 | #define ENABLE_GC_ALWAYS_COLLECT 1 | |
6555 | _ACEOF | |
6556 | ||
6557 | fi | |
6558 | if test x$ac_fold_checking != x ; then | |
6559 | ||
6560 | cat >>confdefs.h <<\_ACEOF | |
6561 | #define ENABLE_FOLD_CHECKING 1 | |
6562 | _ACEOF | |
6563 | ||
6564 | fi | |
6565 | valgrind_path_defines= | |
6566 | valgrind_command= | |
6567 | ||
ba479fd2 | 6568 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
b61ff9c8 BS |
6569 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
6570 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
ba479fd2 NN |
6571 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6572 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6573 | fi | |
b61ff9c8 BS |
6574 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6575 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
ba479fd2 NN |
6576 | else |
6577 | # Is the header compilable? | |
b61ff9c8 BS |
6578 | echo "$as_me:$LINENO: checking valgrind.h usability" >&5 |
6579 | echo $ECHO_N "checking valgrind.h usability... $ECHO_C" >&6 | |
ba479fd2 | 6580 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6581 | /* confdefs.h. */ |
6582 | _ACEOF | |
6583 | cat confdefs.h >>conftest.$ac_ext | |
6584 | cat >>conftest.$ac_ext <<_ACEOF | |
6585 | /* end confdefs.h. */ | |
6586 | $ac_includes_default | |
63cf211a | 6587 | #include <valgrind.h> |
ba479fd2 NN |
6588 | _ACEOF |
6589 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
6590 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
6591 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 6592 | ac_status=$? |
86da66b5 HPN |
6593 | grep -v '^ *+' conftest.er1 >conftest.err |
6594 | rm -f conftest.er1 | |
6595 | cat conftest.err >&5 | |
ba479fd2 | 6596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
6597 | (exit $ac_status); } && |
6598 | { ac_try='test -z "$ac_c_werror_flag" | |
6599 | || test ! -s conftest.err' | |
6600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6601 | (eval $ac_try) 2>&5 | |
6602 | ac_status=$? | |
6603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6604 | (exit $ac_status); }; } && | |
6605 | { ac_try='test -s conftest.$ac_objext' | |
6606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6607 | (eval $ac_try) 2>&5 | |
6608 | ac_status=$? | |
6609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6610 | (exit $ac_status); }; }; then | |
ba479fd2 NN |
6611 | ac_header_compiler=yes |
6612 | else | |
6613 | echo "$as_me: failed program was:" >&5 | |
6614 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6615 | ||
b61ff9c8 | 6616 | ac_header_compiler=no |
ba479fd2 | 6617 | fi |
b61ff9c8 BS |
6618 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
6619 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
6620 | echo "${ECHO_T}$ac_header_compiler" >&6 | |
ba479fd2 NN |
6621 | |
6622 | # Is the header present? | |
b61ff9c8 BS |
6623 | echo "$as_me:$LINENO: checking valgrind.h presence" >&5 |
6624 | echo $ECHO_N "checking valgrind.h presence... $ECHO_C" >&6 | |
ba479fd2 | 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 | #include <valgrind.h> | |
6632 | _ACEOF | |
b61ff9c8 BS |
6633 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
6634 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
6635 | ac_status=$? |
6636 | grep -v '^ *+' conftest.er1 >conftest.err | |
6637 | rm -f conftest.er1 | |
6638 | cat conftest.err >&5 | |
6639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6640 | (exit $ac_status); } >/dev/null; then |
6641 | if test -s conftest.err; then | |
6642 | ac_cpp_err=$ac_c_preproc_warn_flag | |
6643 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
6644 | else | |
6645 | ac_cpp_err= | |
6646 | fi | |
6647 | else | |
6648 | ac_cpp_err=yes | |
6649 | fi | |
6650 | if test -z "$ac_cpp_err"; then | |
ba479fd2 NN |
6651 | ac_header_preproc=yes |
6652 | else | |
6653 | echo "$as_me: failed program was:" >&5 | |
6654 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6655 | ||
6656 | ac_header_preproc=no | |
6657 | fi | |
6658 | rm -f conftest.err conftest.$ac_ext | |
b61ff9c8 BS |
6659 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 |
6660 | echo "${ECHO_T}$ac_header_preproc" >&6 | |
ba479fd2 NN |
6661 | |
6662 | # So? What about this header? | |
86da66b5 HPN |
6663 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in |
6664 | yes:no: ) | |
ba479fd2 NN |
6665 | { echo "$as_me:$LINENO: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5 |
6666 | echo "$as_me: WARNING: valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
86da66b5 HPN |
6667 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the compiler's result" >&5 |
6668 | echo "$as_me: WARNING: valgrind.h: proceeding with the compiler's result" >&2;} | |
6669 | ac_header_preproc=yes | |
ba479fd2 | 6670 | ;; |
86da66b5 | 6671 | no:yes:* ) |
ba479fd2 NN |
6672 | { echo "$as_me:$LINENO: WARNING: valgrind.h: present but cannot be compiled" >&5 |
6673 | echo "$as_me: WARNING: valgrind.h: present but cannot be compiled" >&2;} | |
86da66b5 HPN |
6674 | { echo "$as_me:$LINENO: WARNING: valgrind.h: check for missing prerequisite headers?" >&5 |
6675 | echo "$as_me: WARNING: valgrind.h: check for missing prerequisite headers?" >&2;} | |
6676 | { echo "$as_me:$LINENO: WARNING: valgrind.h: see the Autoconf documentation" >&5 | |
6677 | echo "$as_me: WARNING: valgrind.h: see the Autoconf documentation" >&2;} | |
6678 | { echo "$as_me:$LINENO: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&5 | |
6679 | echo "$as_me: WARNING: valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
ba479fd2 NN |
6680 | { echo "$as_me:$LINENO: WARNING: valgrind.h: proceeding with the preprocessor's result" >&5 |
6681 | echo "$as_me: WARNING: valgrind.h: proceeding with the preprocessor's result" >&2;} | |
86da66b5 HPN |
6682 | { echo "$as_me:$LINENO: WARNING: valgrind.h: in the future, the compiler will take precedence" >&5 |
6683 | echo "$as_me: WARNING: valgrind.h: in the future, the compiler will take precedence" >&2;} | |
b61ff9c8 BS |
6684 | ( |
6685 | cat <<\_ASBOX | |
6686 | ## ------------------------------------------ ## | |
6687 | ## Report this to the AC_PACKAGE_NAME lists. ## | |
6688 | ## ------------------------------------------ ## | |
6689 | _ASBOX | |
6690 | ) | | |
6691 | sed "s/^/$as_me: WARNING: /" >&2 | |
ba479fd2 NN |
6692 | ;; |
6693 | esac | |
b61ff9c8 BS |
6694 | echo "$as_me:$LINENO: checking for valgrind.h" >&5 |
6695 | echo $ECHO_N "checking for valgrind.h... $ECHO_C" >&6 | |
ba479fd2 NN |
6696 | if test "${ac_cv_header_valgrind_h+set}" = set; then |
6697 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6698 | else | |
6699 | ac_cv_header_valgrind_h=$ac_header_preproc | |
6938ec6c | 6700 | fi |
b61ff9c8 BS |
6701 | echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_h" >&5 |
6702 | echo "${ECHO_T}$ac_cv_header_valgrind_h" >&6 | |
ba479fd2 | 6703 | |
6e3f3080 | 6704 | fi |
ba479fd2 | 6705 | if test $ac_cv_header_valgrind_h = yes; then |
6938ec6c NN |
6706 | have_valgrind_h=yes |
6707 | else | |
ba479fd2 | 6708 | have_valgrind_h=no |
6938ec6c NN |
6709 | fi |
6710 | ||
6711 | ||
ba479fd2 | 6712 | |
cdce5c16 | 6713 | if test x$ac_valgrind_checking != x ; then |
414d23ae HPN |
6714 | # It is certainly possible that there's valgrind but no valgrind.h. |
6715 | # GCC relies on making annotations so we must have both. | |
b61ff9c8 BS |
6716 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5 |
6717 | echo $ECHO_N "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... $ECHO_C" >&6 | |
ba479fd2 | 6718 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6719 | /* confdefs.h. */ |
6720 | _ACEOF | |
6721 | cat confdefs.h >>conftest.$ac_ext | |
6722 | cat >>conftest.$ac_ext <<_ACEOF | |
6723 | /* end confdefs.h. */ | |
a207b594 | 6724 | #include <valgrind/memcheck.h> |
14011ca4 AJ |
6725 | #ifndef VALGRIND_DISCARD |
6726 | #error VALGRIND_DISCARD not defined | |
6727 | #endif | |
ba479fd2 | 6728 | _ACEOF |
b61ff9c8 BS |
6729 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
6730 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
6731 | ac_status=$? |
6732 | grep -v '^ *+' conftest.er1 >conftest.err | |
6733 | rm -f conftest.er1 | |
6734 | cat conftest.err >&5 | |
6735 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6736 | (exit $ac_status); } >/dev/null; then |
6737 | if test -s conftest.err; then | |
6738 | ac_cpp_err=$ac_c_preproc_warn_flag | |
6739 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
6740 | else | |
6741 | ac_cpp_err= | |
6742 | fi | |
6743 | else | |
6744 | ac_cpp_err=yes | |
6745 | fi | |
6746 | if test -z "$ac_cpp_err"; then | |
a207b594 HPN |
6747 | gcc_cv_header_valgrind_memcheck_h=yes |
6748 | else | |
ba479fd2 NN |
6749 | echo "$as_me: failed program was:" >&5 |
6750 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6751 | ||
a207b594 HPN |
6752 | gcc_cv_header_valgrind_memcheck_h=no |
6753 | fi | |
ba479fd2 | 6754 | rm -f conftest.err conftest.$ac_ext |
b61ff9c8 BS |
6755 | echo "$as_me:$LINENO: result: $gcc_cv_header_valgrind_memcheck_h" >&5 |
6756 | echo "${ECHO_T}$gcc_cv_header_valgrind_memcheck_h" >&6 | |
6757 | echo "$as_me:$LINENO: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 | |
6758 | echo $ECHO_N "checking for VALGRIND_DISCARD in <memcheck.h>... $ECHO_C" >&6 | |
ba479fd2 | 6759 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
6760 | /* confdefs.h. */ |
6761 | _ACEOF | |
6762 | cat confdefs.h >>conftest.$ac_ext | |
6763 | cat >>conftest.$ac_ext <<_ACEOF | |
6764 | /* end confdefs.h. */ | |
a207b594 HPN |
6765 | #include <memcheck.h> |
6766 | #ifndef VALGRIND_DISCARD | |
6767 | #error VALGRIND_DISCARD not defined | |
6768 | #endif | |
ba479fd2 | 6769 | _ACEOF |
b61ff9c8 BS |
6770 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
6771 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
6772 | ac_status=$? |
6773 | grep -v '^ *+' conftest.er1 >conftest.err | |
6774 | rm -f conftest.er1 | |
6775 | cat conftest.err >&5 | |
6776 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
6777 | (exit $ac_status); } >/dev/null; then |
6778 | if test -s conftest.err; then | |
6779 | ac_cpp_err=$ac_c_preproc_warn_flag | |
6780 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
6781 | else | |
6782 | ac_cpp_err= | |
6783 | fi | |
6784 | else | |
6785 | ac_cpp_err=yes | |
6786 | fi | |
6787 | if test -z "$ac_cpp_err"; then | |
14011ca4 AJ |
6788 | gcc_cv_header_memcheck_h=yes |
6789 | else | |
ba479fd2 NN |
6790 | echo "$as_me: failed program was:" >&5 |
6791 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6792 | ||
cafe096b EC |
6793 | gcc_cv_header_memcheck_h=no |
6794 | fi | |
ba479fd2 | 6795 | rm -f conftest.err conftest.$ac_ext |
b61ff9c8 BS |
6796 | echo "$as_me:$LINENO: result: $gcc_cv_header_memcheck_h" >&5 |
6797 | echo "${ECHO_T}$gcc_cv_header_memcheck_h" >&6 | |
ba479fd2 | 6798 | |
56694dd9 ZW |
6799 | # Prepare PATH_SEPARATOR. |
6800 | # The user is always right. | |
6801 | if test "${PATH_SEPARATOR+set}" != set; then | |
6802 | echo "#! /bin/sh" >conf$$.sh | |
6803 | echo "exit 0" >>conf$$.sh | |
6804 | chmod +x conf$$.sh | |
6805 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6806 | PATH_SEPARATOR=';' | |
6807 | else | |
6808 | PATH_SEPARATOR=: | |
6809 | fi | |
6810 | rm -f conf$$.sh | |
6811 | fi | |
6812 | ||
6813 | # Find out how to test for executable files. Don't use a zero-byte file, | |
6814 | # as systems may use methods other than mode bits to determine executability. | |
6815 | cat >conf$$.file <<_ASEOF | |
6816 | #! /bin/sh | |
6817 | exit 0 | |
6818 | _ASEOF | |
6819 | chmod +x conf$$.file | |
6820 | if test -x conf$$.file >/dev/null 2>&1; then | |
6821 | ac_executable_p="test -x" | |
6822 | else | |
6823 | ac_executable_p="test -f" | |
6824 | fi | |
6825 | rm -f conf$$.file | |
6826 | ||
6827 | # Extract the first word of "valgrind", so it can be a program name with args. | |
414d23ae | 6828 | set dummy valgrind; ac_word=$2 |
b61ff9c8 BS |
6829 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
6830 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
6831 | if test "${ac_cv_path_valgrind_path+set}" = set; then |
6832 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
414d23ae HPN |
6833 | else |
6834 | case "$valgrind_path" in | |
56694dd9 ZW |
6835 | [\\/]* | ?:[\\/]*) |
6836 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
6837 | ;; | |
414d23ae | 6838 | *) |
56694dd9 ZW |
6839 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR |
6840 | for ac_dir in $PATH; do | |
6841 | IFS="$ac_save_IFS" | |
6842 | test -z "$ac_dir" && ac_dir=. | |
6843 | for ac_exec_ext in '' $ac_executable_extensions; do | |
6844 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
6845 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
6846 | ac_cv_path_valgrind_path="$ac_dir/$ac_word$ac_exec_ext" | |
6847 | break 2 | |
6848 | fi | |
6849 | fi | |
6850 | done | |
6851 | done | |
6852 | IFS="$ac_save_IFS" | |
6853 | ;; | |
414d23ae | 6854 | esac |
75e93faa | 6855 | fi |
414d23ae HPN |
6856 | valgrind_path="$ac_cv_path_valgrind_path" |
6857 | if test -n "$valgrind_path"; then | |
b61ff9c8 BS |
6858 | echo "$as_me:$LINENO: result: $valgrind_path" >&5 |
6859 | echo "${ECHO_T}$valgrind_path" >&6 | |
414d23ae | 6860 | else |
b61ff9c8 BS |
6861 | echo "$as_me:$LINENO: result: no" >&5 |
6862 | echo "${ECHO_T}no" >&6 | |
414d23ae HPN |
6863 | fi |
6864 | ||
a207b594 HPN |
6865 | if test "x$valgrind_path" = "x" \ |
6866 | || (test $have_valgrind_h = no \ | |
6867 | && test $gcc_cv_header_memcheck_h = no \ | |
6868 | && test $gcc_cv_header_valgrind_memcheck_h = no); then | |
ba479fd2 NN |
6869 | { { echo "$as_me:$LINENO: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&5 |
6870 | echo "$as_me: error: *** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h" >&2;} | |
6871 | { (exit 1); exit 1; }; } | |
414d23ae HPN |
6872 | fi |
6873 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
6874 | valgrind_command="$valgrind_path -q" | |
ba479fd2 NN |
6875 | |
6876 | cat >>confdefs.h <<\_ACEOF | |
414d23ae | 6877 | #define ENABLE_VALGRIND_CHECKING 1 |
ba479fd2 | 6878 | _ACEOF |
75e93faa | 6879 | |
a207b594 | 6880 | if test $gcc_cv_header_valgrind_memcheck_h = yes; then |
ba479fd2 NN |
6881 | |
6882 | cat >>confdefs.h <<\_ACEOF | |
a207b594 | 6883 | #define HAVE_VALGRIND_MEMCHECK_H 1 |
ba479fd2 | 6884 | _ACEOF |
a207b594 HPN |
6885 | |
6886 | fi | |
14011ca4 | 6887 | if test $gcc_cv_header_memcheck_h = yes; then |
ba479fd2 NN |
6888 | |
6889 | cat >>confdefs.h <<\_ACEOF | |
14011ca4 | 6890 | #define HAVE_MEMCHECK_H 1 |
ba479fd2 | 6891 | _ACEOF |
14011ca4 AJ |
6892 | |
6893 | fi | |
414d23ae | 6894 | fi |
75e93faa | 6895 | |
75e93faa ZW |
6896 | |
6897 | ||
b61ff9c8 | 6898 | # Check whether --enable-mapped-location or --disable-mapped-location was given. |
74ee1642 | 6899 | if test "${enable_mapped_location+set}" = set; then |
b61ff9c8 BS |
6900 | enableval="$enable_mapped_location" |
6901 | ||
74ee1642 | 6902 | else |
f6230c17 | 6903 | enable_mapped_location=yes |
b61ff9c8 | 6904 | fi; |
74ee1642 PB |
6905 | |
6906 | if test "$enable_mapped_location" = yes ; then | |
6907 | ||
6908 | cat >>confdefs.h <<\_ACEOF | |
6909 | #define USE_MAPPED_LOCATION 1 | |
6910 | _ACEOF | |
6911 | ||
6912 | fi | |
6913 | ||
414d23ae | 6914 | # Enable code coverage collection |
b61ff9c8 | 6915 | # Check whether --enable-coverage or --disable-coverage was given. |
414d23ae | 6916 | if test "${enable_coverage+set}" = set; then |
b61ff9c8 BS |
6917 | enableval="$enable_coverage" |
6918 | case "${enableval}" in | |
6dd297da NN |
6919 | yes|noopt) |
6920 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O0" | |
6921 | ;; | |
6922 | opt) | |
6923 | coverage_flags="-fprofile-arcs -ftest-coverage -frandom-seed=\$@ -O2" | |
6924 | ;; | |
6925 | no) | |
6926 | # a.k.a. --disable-coverage | |
6927 | coverage_flags="" | |
6928 | ;; | |
6929 | *) | |
6930 | { { echo "$as_me:$LINENO: error: unknown coverage setting $enableval" >&5 | |
ba479fd2 NN |
6931 | echo "$as_me: error: unknown coverage setting $enableval" >&2;} |
6932 | { (exit 1); exit 1; }; } | |
6dd297da | 6933 | ;; |
414d23ae | 6934 | esac |
75e93faa | 6935 | else |
414d23ae | 6936 | coverage_flags="" |
b61ff9c8 | 6937 | fi; |
a3bba767 | 6938 | |
2f41c1d6 | 6939 | |
b61ff9c8 | 6940 | # Check whether --enable-gather-detailed-mem-stats or --disable-gather-detailed-mem-stats was given. |
1a4b763e | 6941 | if test "${enable_gather_detailed_mem_stats+set}" = set; then |
b61ff9c8 BS |
6942 | enableval="$enable_gather_detailed_mem_stats" |
6943 | ||
439a7e54 DN |
6944 | else |
6945 | enable_gather_detailed_mem_stats=no | |
b61ff9c8 | 6946 | fi; |
439a7e54 | 6947 | if test x$enable_gather_detailed_mem_stats = xyes ; then |
ba479fd2 NN |
6948 | |
6949 | cat >>confdefs.h <<\_ACEOF | |
439a7e54 | 6950 | #define GATHER_STATISTICS 1 |
ba479fd2 | 6951 | _ACEOF |
439a7e54 DN |
6952 | |
6953 | fi | |
6954 | ||
73458fb7 NN |
6955 | # ------------------------------- |
6956 | # Miscenalleous configure options | |
6957 | # ------------------------------- | |
34a86c2b NN |
6958 | |
6959 | # With stabs | |
ba479fd2 | 6960 | |
b61ff9c8 | 6961 | # Check whether --with-stabs or --without-stabs was given. |
34a86c2b | 6962 | if test "${with_stabs+set}" = set; then |
b61ff9c8 BS |
6963 | withval="$with_stabs" |
6964 | stabs="$with_stabs" | |
34a86c2b NN |
6965 | else |
6966 | stabs=no | |
b61ff9c8 | 6967 | fi; |
cafe096b | 6968 | |
34a86c2b | 6969 | # Determine whether or not multilibs are enabled. |
b61ff9c8 | 6970 | # Check whether --enable-multilib or --disable-multilib was given. |
34a86c2b | 6971 | if test "${enable_multilib+set}" = set; then |
b61ff9c8 BS |
6972 | enableval="$enable_multilib" |
6973 | ||
34a86c2b NN |
6974 | else |
6975 | enable_multilib=yes | |
b61ff9c8 | 6976 | fi; |
75e93faa | 6977 | |
34a86c2b | 6978 | |
414d23ae | 6979 | # Enable __cxa_atexit for C++. |
b61ff9c8 | 6980 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. |
414d23ae | 6981 | if test "${enable___cxa_atexit+set}" = set; then |
b61ff9c8 | 6982 | enableval="$enable___cxa_atexit" |
75e93faa | 6983 | |
b61ff9c8 | 6984 | fi; |
75e93faa | 6985 | |
486aa804 | 6986 | # Enable C extension for decimal float if target supports it. |
b61ff9c8 | 6987 | # Check whether --enable-decimal-float or --disable-decimal-float was given. |
486aa804 | 6988 | if test "${enable_decimal_float+set}" = set; then |
b61ff9c8 BS |
6989 | enableval="$enable_decimal_float" |
6990 | ||
79b87c74 MM |
6991 | case $enable_decimal_float in |
6992 | yes | no | bid | dpd) ;; | |
6993 | *) { { echo "$as_me:$LINENO: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. | |
6994 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&5 | |
6995 | echo "$as_me: error: '$enable_decimal_float' is an invalid value for --enable-decimal-float. | |
6996 | Valid choices are 'yes', 'bid', 'dpd', and 'no'." >&2;} | |
6997 | { (exit 1); exit 1; }; } ;; | |
6998 | esac | |
6999 | ||
7000 | else | |
7001 | ||
7002 | case $target in | |
7003 | powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*) | |
a4a9df5f | 7004 | enable_decimal_float=yes |
486aa804 BE |
7005 | ;; |
7006 | *) | |
7007 | { echo "$as_me:$LINENO: WARNING: decimal float is not supported for this target" >&5 | |
7008 | echo "$as_me: WARNING: decimal float is not supported for this target" >&2;} | |
7009 | enable_decimal_float=no | |
7010 | ;; | |
79b87c74 | 7011 | esac |
486aa804 | 7012 | |
b61ff9c8 | 7013 | fi; |
486aa804 | 7014 | |
79b87c74 MM |
7015 | dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi` |
7016 | ||
7017 | cat >>confdefs.h <<_ACEOF | |
7018 | #define ENABLE_DECIMAL_FLOAT $dfp | |
7019 | _ACEOF | |
7020 | ||
7021 | ||
7022 | # x86's use BID format instead of DPD | |
7023 | case x$enable_decimal_float in | |
7024 | xyes) | |
7025 | case $target in | |
7026 | i?86*-*-linux* | x86_64*-*-linux*) | |
7027 | enable_decimal_float=bid | |
7028 | ;; | |
7029 | *) | |
7030 | enable_decimal_float=dpd | |
7031 | ;; | |
7032 | esac | |
7033 | ;; | |
7034 | xno) | |
7035 | # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper | |
7036 | # dependency on libdecnumber. | |
7037 | enable_decimal_float=dpd | |
7038 | ;; | |
7039 | esac | |
486aa804 BE |
7040 | |
7041 | ||
79b87c74 | 7042 | bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi` |
486aa804 BE |
7043 | |
7044 | cat >>confdefs.h <<_ACEOF | |
79b87c74 | 7045 | #define ENABLE_DECIMAL_BID_FORMAT $bid |
486aa804 BE |
7046 | _ACEOF |
7047 | ||
7048 | ||
ab22c1fa | 7049 | # Enable C extension for fixed-point arithmetic. |
b61ff9c8 | 7050 | # Check whether --enable-fixed-point or --disable-fixed-point was given. |
ab22c1fa | 7051 | if test "${enable_fixed_point+set}" = set; then |
b61ff9c8 BS |
7052 | enableval="$enable_fixed_point" |
7053 | ||
ab22c1fa CF |
7054 | |
7055 | else | |
7056 | ||
7057 | case $target in | |
7058 | mips*-*-*) | |
7059 | enable_fixed_point=yes | |
7060 | ;; | |
7061 | *) | |
7062 | { echo "$as_me:$LINENO: WARNING: fixed-point is not supported for this target" >&5 | |
7063 | echo "$as_me: WARNING: fixed-point is not supported for this target" >&2;} | |
7064 | enable_fixed_point=no | |
7065 | ;; | |
7066 | esac | |
7067 | ||
b61ff9c8 | 7068 | fi; |
ab22c1fa CF |
7069 | |
7070 | ||
7071 | fixedpoint=`if test $enable_fixed_point = yes; then echo 1; else echo 0; fi` | |
7072 | ||
7073 | cat >>confdefs.h <<_ACEOF | |
7074 | #define ENABLE_FIXED_POINT $fixedpoint | |
7075 | _ACEOF | |
7076 | ||
7077 | ||
414d23ae HPN |
7078 | # Enable threads |
7079 | # Pass with no value to take the default | |
7080 | # Pass with a value to specify a thread package | |
b61ff9c8 | 7081 | # Check whether --enable-threads or --disable-threads was given. |
414d23ae | 7082 | if test "${enable_threads+set}" = set; then |
b61ff9c8 BS |
7083 | enableval="$enable_threads" |
7084 | ||
414d23ae HPN |
7085 | else |
7086 | enable_threads='' | |
b61ff9c8 | 7087 | fi; |
2f41c1d6 | 7088 | |
b61ff9c8 | 7089 | # Check whether --enable-tls or --disable-tls was given. |
1a4b763e | 7090 | if test "${enable_tls+set}" = set; then |
b61ff9c8 BS |
7091 | enableval="$enable_tls" |
7092 | ||
8dea1cca DD |
7093 | case $enable_tls in |
7094 | yes | no) ;; | |
7095 | *) { { echo "$as_me:$LINENO: error: '$enable_tls' is an invalid value for --enable-tls. | |
7096 | Valid choices are 'yes' and 'no'." >&5 | |
7097 | echo "$as_me: error: '$enable_tls' is an invalid value for --enable-tls. | |
7098 | Valid choices are 'yes' and 'no'." >&2;} | |
7099 | { (exit 1); exit 1; }; } ;; | |
7100 | esac | |
7101 | ||
7102 | else | |
7103 | enable_tls='' | |
b61ff9c8 | 7104 | fi; |
1a4b763e | 7105 | |
b61ff9c8 | 7106 | # Check whether --enable-objc-gc or --disable-objc-gc was given. |
414d23ae | 7107 | if test "${enable_objc_gc+set}" = set; then |
b61ff9c8 BS |
7108 | enableval="$enable_objc_gc" |
7109 | if test x$enable_objc_gc = xno; then | |
414d23ae HPN |
7110 | objc_boehm_gc='' |
7111 | else | |
7112 | objc_boehm_gc=1 | |
7113 | fi | |
7114 | else | |
7115 | objc_boehm_gc='' | |
b61ff9c8 | 7116 | fi; |
75e93faa | 7117 | |
a6ccdbab | 7118 | |
b61ff9c8 | 7119 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
414d23ae | 7120 | if test "${with_dwarf2+set}" = set; then |
b61ff9c8 BS |
7121 | withval="$with_dwarf2" |
7122 | dwarf2="$with_dwarf2" | |
75e93faa | 7123 | else |
414d23ae | 7124 | dwarf2=no |
b61ff9c8 | 7125 | fi; |
2f41c1d6 | 7126 | |
b61ff9c8 | 7127 | # Check whether --enable-shared or --disable-shared was given. |
1a4b763e | 7128 | if test "${enable_shared+set}" = set; then |
b61ff9c8 BS |
7129 | enableval="$enable_shared" |
7130 | ||
414d23ae HPN |
7131 | case $enable_shared in |
7132 | yes | no) ;; | |
7133 | *) | |
7134 | enable_shared=no | |
7135 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
7136 | for pkg in $enableval; do | |
7137 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
7138 | enable_shared=yes | |
7139 | fi | |
7140 | done | |
7141 | IFS="$ac_save_ifs" | |
7142 | ;; | |
7143 | esac | |
7144 | ||
75e93faa | 7145 | else |
414d23ae | 7146 | enable_shared=yes |
b61ff9c8 | 7147 | fi; |
703d89ab | 7148 | |
ab22c1fa | 7149 | |
1a4b763e | 7150 | |
b61ff9c8 | 7151 | # Check whether --with-build-sysroot or --without-build-sysroot was given. |
160633c6 | 7152 | if test "${with_build_sysroot+set}" = set; then |
b61ff9c8 | 7153 | withval="$with_build_sysroot" |
160633c6 | 7154 | |
b61ff9c8 | 7155 | fi; |
160633c6 MM |
7156 | |
7157 | ||
b61ff9c8 | 7158 | # Check whether --with-sysroot or --without-sysroot was given. |
4977bab6 | 7159 | if test "${with_sysroot+set}" = set; then |
b61ff9c8 BS |
7160 | withval="$with_sysroot" |
7161 | ||
4977bab6 | 7162 | case ${with_sysroot} in |
caa55b1e | 7163 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; |
4977bab6 ZW |
7164 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
7165 | esac | |
ba479fd2 | 7166 | |
4977bab6 | 7167 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
14da6073 | 7168 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
4977bab6 | 7169 | |
748670c2 RS |
7170 | if test "x$prefix" = xNONE; then |
7171 | test_prefix=/usr/local | |
7172 | else | |
7173 | test_prefix=$prefix | |
7174 | fi | |
047d636f | 7175 | if test "x$exec_prefix" = xNONE; then |
748670c2 | 7176 | test_exec_prefix=$test_prefix |
047d636f | 7177 | else |
748670c2 | 7178 | test_exec_prefix=$exec_prefix |
047d636f DJ |
7179 | fi |
7180 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 | 7181 | "${test_prefix}"|"${test_prefix}/"*|\ |
748670c2 RS |
7182 | "${test_exec_prefix}"|"${test_exec_prefix}/"*|\ |
7183 | '${prefix}'|'${prefix}/'*|\ | |
91710e62 | 7184 | '${exec_prefix}'|'${exec_prefix}/'*) |
047d636f DJ |
7185 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
7186 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
7187 | ;; | |
7188 | esac | |
7189 | ||
4977bab6 | 7190 | else |
ba479fd2 | 7191 | |
4977bab6 | 7192 | TARGET_SYSTEM_ROOT= |
db720d9a | 7193 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
7194 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
7195 | ||
b61ff9c8 | 7196 | fi; |
4977bab6 ZW |
7197 | |
7198 | ||
7199 | ||
7200 | ||
d1bd0ded | 7201 | # Build with intermodule optimisations |
b61ff9c8 | 7202 | # Check whether --enable-intermodule or --disable-intermodule was given. |
d1bd0ded | 7203 | if test "${enable_intermodule+set}" = set; then |
b61ff9c8 BS |
7204 | enableval="$enable_intermodule" |
7205 | case ${enable_intermodule} in | |
0c46c5c7 KC |
7206 | yes) onestep="-onestep";; |
7207 | *) onestep="";; | |
d1bd0ded | 7208 | esac |
0c46c5c7 KC |
7209 | else |
7210 | onestep="" | |
b61ff9c8 | 7211 | fi; |
2f41c1d6 PB |
7212 | |
7213 | ||
7214 | ||
7215 | ||
b61ff9c8 | 7216 | # Check whether --with-pkgversion or --without-pkgversion was given. |
2f41c1d6 | 7217 | if test "${with_pkgversion+set}" = set; then |
b61ff9c8 BS |
7218 | withval="$with_pkgversion" |
7219 | case "$withval" in | |
2f41c1d6 PB |
7220 | yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5 |
7221 | echo "$as_me: error: package version not specified" >&2;} | |
7222 | { (exit 1); exit 1; }; } ;; | |
7223 | no) PKGVERSION= ;; | |
7224 | *) PKGVERSION="($withval) " ;; | |
7225 | esac | |
7226 | else | |
7227 | PKGVERSION="(GCC) " | |
7228 | ||
b61ff9c8 | 7229 | fi; |
2f41c1d6 PB |
7230 | |
7231 | ||
7232 | ||
1a4b763e | 7233 | |
b61ff9c8 | 7234 | # Check whether --with-bugurl or --without-bugurl was given. |
2f41c1d6 | 7235 | if test "${with_bugurl+set}" = set; then |
b61ff9c8 BS |
7236 | withval="$with_bugurl" |
7237 | case "$withval" in | |
2f41c1d6 PB |
7238 | yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5 |
7239 | echo "$as_me: error: bug URL not specified" >&2;} | |
7240 | { (exit 1); exit 1; }; } ;; | |
7241 | no) BUGURL= | |
7242 | ;; | |
7243 | *) BUGURL="$withval" | |
7244 | ;; | |
7245 | esac | |
7246 | else | |
7247 | BUGURL="http://gcc.gnu.org/bugs.html" | |
7248 | ||
b61ff9c8 | 7249 | fi; |
2f41c1d6 PB |
7250 | case ${BUGURL} in |
7251 | "") | |
7252 | REPORT_BUGS_TO= | |
7253 | REPORT_BUGS_TEXI= | |
7254 | ;; | |
7255 | *) | |
7256 | REPORT_BUGS_TO="<$BUGURL>" | |
7257 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} | |
7258 | ;; | |
7259 | esac; | |
7260 | ||
ab22c1fa | 7261 | |
d1bd0ded GK |
7262 | |
7263 | ||
f3c9f174 NN |
7264 | # Sanity check enable_languages in case someone does not run the toplevel |
7265 | # configure # script. | |
b61ff9c8 | 7266 | # Check whether --enable-languages or --disable-languages was given. |
f3c9f174 | 7267 | if test "${enable_languages+set}" = set; then |
b61ff9c8 BS |
7268 | enableval="$enable_languages" |
7269 | case ,${enable_languages}, in | |
f3c9f174 NN |
7270 | ,,|,yes,) |
7271 | # go safe -- we cannot be much sure without the toplevel | |
7272 | # configure's | |
7273 | # analysis of which target libs are present and usable | |
7274 | enable_languages=c | |
7275 | ;; | |
7276 | *,all,*) | |
7277 | { { echo "$as_me:$LINENO: error: only the toplevel supports --enable-languages=all" >&5 | |
7278 | echo "$as_me: error: only the toplevel supports --enable-languages=all" >&2;} | |
7279 | { (exit 1); exit 1; }; } | |
7280 | ;; | |
7281 | *,c,*) | |
7282 | ;; | |
7283 | *) | |
7284 | enable_languages=c,${enable_languages} | |
7285 | ;; | |
7286 | esac | |
7287 | else | |
7288 | enable_languages=c | |
b61ff9c8 | 7289 | fi; |
f3c9f174 | 7290 | |
9288b845 CD |
7291 | # Used by documentation targets |
7292 | ||
7293 | ||
7294 | ||
f3c9f174 | 7295 | |
73458fb7 NN |
7296 | # ------------------------- |
7297 | # Checks for other programs | |
7298 | # ------------------------- | |
5b67ad6f | 7299 | |
b61ff9c8 BS |
7300 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
7301 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | |
7302 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` | |
7303 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then | |
ba479fd2 | 7304 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
e9a25f70 | 7305 | else |
ba479fd2 | 7306 | cat >conftest.make <<\_ACEOF |
e9a25f70 | 7307 | all: |
b61ff9c8 | 7308 | @echo 'ac_maketemp="$(MAKE)"' |
ba479fd2 | 7309 | _ACEOF |
e9a25f70 | 7310 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
b61ff9c8 BS |
7311 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` |
7312 | if test -n "$ac_maketemp"; then | |
7313 | eval ac_cv_prog_make_${ac_make}_set=yes | |
7314 | else | |
7315 | eval ac_cv_prog_make_${ac_make}_set=no | |
7316 | fi | |
ba479fd2 | 7317 | rm -f conftest.make |
e9a25f70 | 7318 | fi |
b61ff9c8 BS |
7319 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then |
7320 | echo "$as_me:$LINENO: result: yes" >&5 | |
7321 | echo "${ECHO_T}yes" >&6 | |
e9a25f70 JL |
7322 | SET_MAKE= |
7323 | else | |
b61ff9c8 BS |
7324 | echo "$as_me:$LINENO: result: no" >&5 |
7325 | echo "${ECHO_T}no" >&6 | |
e9a25f70 JL |
7326 | SET_MAKE="MAKE=${MAKE-make}" |
7327 | fi | |
7328 | ||
7329 | ||
861bb6c1 | 7330 | # Find some useful tools |
ba479fd2 | 7331 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 7332 | do |
ba479fd2 | 7333 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 7334 | set dummy $ac_prog; ac_word=$2 |
b61ff9c8 BS |
7335 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7336 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7337 | if test "${ac_cv_prog_AWK+set}" = set; then |
7338 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7339 | else |
7340 | if test -n "$AWK"; then | |
7341 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
7342 | else | |
ba479fd2 NN |
7343 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7344 | for as_dir in $PATH | |
7345 | do | |
7346 | IFS=$as_save_IFS | |
7347 | test -z "$as_dir" && as_dir=. | |
7348 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7349 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
7350 | ac_cv_prog_AWK="$ac_prog" |
7351 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7352 | break 2 | |
7353 | fi | |
7354 | done | |
7355 | done | |
7356 | ||
861bb6c1 JL |
7357 | fi |
7358 | fi | |
ba479fd2 | 7359 | AWK=$ac_cv_prog_AWK |
861bb6c1 | 7360 | if test -n "$AWK"; then |
b61ff9c8 BS |
7361 | echo "$as_me:$LINENO: result: $AWK" >&5 |
7362 | echo "${ECHO_T}$AWK" >&6 | |
861bb6c1 | 7363 | else |
b61ff9c8 BS |
7364 | echo "$as_me:$LINENO: result: no" >&5 |
7365 | echo "${ECHO_T}no" >&6 | |
861bb6c1 JL |
7366 | fi |
7367 | ||
ba479fd2 | 7368 | test -n "$AWK" && break |
861bb6c1 JL |
7369 | done |
7370 | ||
776dc15d | 7371 | # We need awk to create options.c and options.h. |
2c4902b9 NN |
7372 | # Bail out if it's missing. |
7373 | case ${AWK} in | |
ba479fd2 NN |
7374 | "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 |
7375 | echo "$as_me: error: can't build without awk, bailing out" >&2;} | |
7376 | { (exit 1); exit 1; }; } ;; | |
2c4902b9 NN |
7377 | esac |
7378 | ||
b61ff9c8 BS |
7379 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
7380 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | |
ba479fd2 NN |
7381 | if test "${gcc_cv_prog_LN_S+set}" = set; then |
7382 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7383 | else |
7384 | rm -f conftestdata_t | |
7385 | echo >conftestdata_f | |
7386 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
7387 | then | |
7388 | gcc_cv_prog_LN_S="ln -s" | |
7389 | else | |
7390 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7391 | then | |
7392 | gcc_cv_prog_LN_S=ln | |
7393 | else | |
35f06ae4 PB |
7394 | if cp -p conftestdata_f conftestdata_t 2>/dev/null |
7395 | then | |
06c3418c | 7396 | gcc_cv_prog_LN_S="cp -p" |
35f06ae4 PB |
7397 | else |
7398 | gcc_cv_prog_LN_S=cp | |
7399 | fi | |
0a4b6309 RL |
7400 | fi |
7401 | fi | |
7402 | rm -f conftestdata_f conftestdata_t | |
7403 | ||
7404 | fi | |
7405 | LN_S="$gcc_cv_prog_LN_S" | |
7406 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
b61ff9c8 BS |
7407 | echo "$as_me:$LINENO: result: yes" >&5 |
7408 | echo "${ECHO_T}yes" >&6 | |
0a4b6309 RL |
7409 | else |
7410 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
b61ff9c8 BS |
7411 | echo "$as_me:$LINENO: result: no, using ln" >&5 |
7412 | echo "${ECHO_T}no, using ln" >&6 | |
0a4b6309 | 7413 | else |
b61ff9c8 BS |
7414 | echo "$as_me:$LINENO: result: no, and neither does ln, so using $gcc_cv_prog_LN_S" >&5 |
7415 | echo "${ECHO_T}no, and neither does ln, so using $gcc_cv_prog_LN_S" >&6 | |
0a4b6309 RL |
7416 | fi |
7417 | fi | |
7418 | ||
b61ff9c8 BS |
7419 | echo "$as_me:$LINENO: checking whether ln works" >&5 |
7420 | echo $ECHO_N "checking whether ln works... $ECHO_C" >&6 | |
18fc9bd4 RG |
7421 | if test "${acx_cv_prog_LN+set}" = set; then |
7422 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7423 | else | |
7424 | rm -f conftestdata_t | |
7425 | echo >conftestdata_f | |
7426 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
7427 | then | |
7428 | acx_cv_prog_LN=ln | |
7429 | else | |
7430 | acx_cv_prog_LN=no | |
7431 | fi | |
7432 | rm -f conftestdata_f conftestdata_t | |
7433 | ||
7434 | fi | |
7435 | if test $acx_cv_prog_LN = no; then | |
7436 | LN="$LN_S" | |
b61ff9c8 BS |
7437 | echo "$as_me:$LINENO: result: no, using $LN" >&5 |
7438 | echo "${ECHO_T}no, using $LN" >&6 | |
18fc9bd4 RG |
7439 | else |
7440 | LN="$acx_cv_prog_LN" | |
b61ff9c8 BS |
7441 | echo "$as_me:$LINENO: result: yes" >&5 |
7442 | echo "${ECHO_T}yes" >&6 | |
18fc9bd4 RG |
7443 | fi |
7444 | ||
ba479fd2 NN |
7445 | if test -n "$ac_tool_prefix"; then |
7446 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
7447 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
b61ff9c8 BS |
7448 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7449 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7450 | if test "${ac_cv_prog_RANLIB+set}" = set; then |
7451 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
861bb6c1 JL |
7452 | else |
7453 | if test -n "$RANLIB"; then | |
7454 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
7455 | else | |
ba479fd2 NN |
7456 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7457 | for as_dir in $PATH | |
7458 | do | |
7459 | IFS=$as_save_IFS | |
7460 | test -z "$as_dir" && as_dir=. | |
7461 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7462 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
7463 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
7464 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7465 | break 2 | |
7466 | fi | |
7467 | done | |
7468 | done | |
7469 | ||
6e3f3080 NN |
7470 | fi |
7471 | fi | |
ba479fd2 | 7472 | RANLIB=$ac_cv_prog_RANLIB |
6e3f3080 | 7473 | if test -n "$RANLIB"; then |
b61ff9c8 BS |
7474 | echo "$as_me:$LINENO: result: $RANLIB" >&5 |
7475 | echo "${ECHO_T}$RANLIB" >&6 | |
ba479fd2 | 7476 | else |
b61ff9c8 BS |
7477 | echo "$as_me:$LINENO: result: no" >&5 |
7478 | echo "${ECHO_T}no" >&6 | |
ba479fd2 NN |
7479 | fi |
7480 | ||
7481 | fi | |
7482 | if test -z "$ac_cv_prog_RANLIB"; then | |
7483 | ac_ct_RANLIB=$RANLIB | |
7484 | # Extract the first word of "ranlib", so it can be a program name with args. | |
7485 | set dummy ranlib; ac_word=$2 | |
b61ff9c8 BS |
7486 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7487 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7488 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then |
7489 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7490 | else | |
7491 | if test -n "$ac_ct_RANLIB"; then | |
7492 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
7493 | else | |
7494 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7495 | for as_dir in $PATH | |
7496 | do | |
7497 | IFS=$as_save_IFS | |
7498 | test -z "$as_dir" && as_dir=. | |
7499 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7500 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
7501 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
7502 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7503 | break 2 | |
7504 | fi | |
7505 | done | |
7506 | done | |
7507 | ||
b61ff9c8 | 7508 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" |
ba479fd2 NN |
7509 | fi |
7510 | fi | |
7511 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
7512 | if test -n "$ac_ct_RANLIB"; then | |
b61ff9c8 BS |
7513 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 |
7514 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
6e3f3080 | 7515 | else |
b61ff9c8 BS |
7516 | echo "$as_me:$LINENO: result: no" >&5 |
7517 | echo "${ECHO_T}no" >&6 | |
ba479fd2 NN |
7518 | fi |
7519 | ||
b61ff9c8 | 7520 | RANLIB=$ac_ct_RANLIB |
ba479fd2 NN |
7521 | else |
7522 | RANLIB="$ac_cv_prog_RANLIB" | |
861bb6c1 JL |
7523 | fi |
7524 | ||
343a6100 MM |
7525 | case "${host}" in |
7526 | *-*-darwin*) | |
7527 | # By default, the Darwin ranlib will not treat common symbols as | |
7528 | # definitions when building the archive table of contents. Other | |
7529 | # ranlibs do that; pass an option to the Darwin ranlib that makes | |
7530 | # it behave similarly. | |
7531 | ranlib_flags="-c" | |
7532 | ;; | |
7533 | *) | |
7534 | ranlib_flags="" | |
7535 | esac | |
7536 | ||
7537 | ||
0a4b6309 RL |
7538 | # Find a good install program. We prefer a C program (faster), |
7539 | # so one script is as good as another. But avoid the broken or | |
7540 | # incompatible versions: | |
7541 | # SysV /etc/install, /usr/sbin/install | |
7542 | # SunOS /usr/etc/install | |
7543 | # IRIX /sbin/install | |
7544 | # AIX /bin/install | |
7545 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
7546 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
7547 | # ./install, which can be erroneously created by make from ./install.sh. | |
b61ff9c8 BS |
7548 | echo "$as_me:$LINENO: checking for a BSD compatible install" >&5 |
7549 | echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 | |
0a4b6309 | 7550 | if test -z "$INSTALL"; then |
ba479fd2 NN |
7551 | if test "${ac_cv_path_install+set}" = set; then |
7552 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0a4b6309 RL |
7553 | else |
7554 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
7555 | for ac_dir in $PATH; do | |
7556 | # Account for people who put trailing slashes in PATH elements. | |
7557 | case "$ac_dir/" in | |
7558 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
7559 | *) | |
7560 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
7561 | for ac_prog in ginstall scoinst install; do | |
7562 | if test -f $ac_dir/$ac_prog; then | |
7563 | if test $ac_prog = install && | |
7564 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
7565 | # AIX install. It has an incompatible calling convention. | |
7566 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
7567 | : | |
7568 | else | |
7569 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
7570 | break 2 | |
7571 | fi | |
7572 | fi | |
7573 | done | |
7574 | ;; | |
7575 | esac | |
7576 | done | |
7577 | IFS="$ac_save_IFS" | |
7578 | ||
7579 | fi | |
7580 | if test "${ac_cv_path_install+set}" = set; then | |
7581 | INSTALL="$ac_cv_path_install" | |
7582 | else | |
7583 | # As a last resort, use the slow shell script. We don't cache a | |
7584 | # path for INSTALL within a source directory, because that will | |
7585 | # break other packages using the cache if that directory is | |
7586 | # removed, or if the path is relative. | |
7587 | INSTALL="$ac_install_sh" | |
7588 | fi | |
7589 | fi | |
b61ff9c8 BS |
7590 | echo "$as_me:$LINENO: result: $INSTALL" >&5 |
7591 | echo "${ECHO_T}$INSTALL" >&6 | |
0a4b6309 RL |
7592 | |
7593 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
7594 | # It thinks the first close brace ends the variable substitution. | |
7595 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
7596 | ||
7597 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
7598 | ||
861bb6c1 | 7599 | |
3a000df0 | 7600 | # See if cmp has --ignore-initial. |
b61ff9c8 BS |
7601 | echo "$as_me:$LINENO: checking for cmp's capabilities" >&5 |
7602 | echo $ECHO_N "checking for cmp's capabilities... $ECHO_C" >&6 | |
ba479fd2 NN |
7603 | if test "${gcc_cv_prog_cmp_skip+set}" = set; then |
7604 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a000df0 KC |
7605 | else |
7606 | echo abfoo >t1 | |
7607 | echo cdfoo >t2 | |
269a7343 | 7608 | gcc_cv_prog_cmp_skip=slowcompare |
3a000df0 KC |
7609 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then |
7610 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
269a7343 | 7611 | : |
3a000df0 KC |
7612 | else |
7613 | gcc_cv_prog_cmp_skip=gnucompare | |
7614 | fi | |
269a7343 KG |
7615 | fi |
7616 | if test $gcc_cv_prog_cmp_skip = slowcompare ; then | |
7617 | if cmp t1 t2 2 2 > /dev/null 2>&1; then | |
7618 | if cmp t1 t2 1 1 > /dev/null 2>&1; then | |
7619 | : | |
7620 | else | |
7621 | gcc_cv_prog_cmp_skip=fastcompare | |
7622 | fi | |
7623 | fi | |
3a000df0 KC |
7624 | fi |
7625 | rm t1 t2 | |
7626 | ||
7627 | fi | |
b61ff9c8 BS |
7628 | echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5 |
7629 | echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6 | |
3a000df0 KC |
7630 | make_compare_target=$gcc_cv_prog_cmp_skip |
7631 | ||
7632 | ||
7633 | ||
73458fb7 NN |
7634 | # See if we have the mktemp command. |
7635 | # Extract the first word of "mktemp", so it can be a program name with args. | |
7636 | set dummy mktemp; ac_word=$2 | |
b61ff9c8 BS |
7637 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7638 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7639 | if test "${ac_cv_prog_have_mktemp_command+set}" = set; then |
7640 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7641 | else |
7642 | if test -n "$have_mktemp_command"; then | |
7643 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
7644 | else | |
ba479fd2 NN |
7645 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7646 | for as_dir in $PATH | |
7647 | do | |
7648 | IFS=$as_save_IFS | |
7649 | test -z "$as_dir" && as_dir=. | |
7650 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7651 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
7652 | ac_cv_prog_have_mktemp_command="yes" |
7653 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7654 | break 2 | |
7655 | fi | |
7656 | done | |
7657 | done | |
7658 | ||
73458fb7 NN |
7659 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
7660 | fi | |
7661 | fi | |
ba479fd2 | 7662 | have_mktemp_command=$ac_cv_prog_have_mktemp_command |
73458fb7 | 7663 | if test -n "$have_mktemp_command"; then |
b61ff9c8 BS |
7664 | echo "$as_me:$LINENO: result: $have_mktemp_command" >&5 |
7665 | echo "${ECHO_T}$have_mktemp_command" >&6 | |
73458fb7 | 7666 | else |
b61ff9c8 BS |
7667 | echo "$as_me:$LINENO: result: no" >&5 |
7668 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7669 | fi |
7670 | ||
7671 | ||
7c27e184 PB |
7672 | # See if makeinfo has been installed and is modern enough |
7673 | # that we can use it. | |
9f18db39 | 7674 | |
3bbd5a19 | 7675 | # Extract the first word of "makeinfo", so it can be a program name with args. |
73458fb7 | 7676 | set dummy makeinfo; ac_word=$2 |
b61ff9c8 BS |
7677 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7678 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7679 | if test "${ac_cv_prog_MAKEINFO+set}" = set; then |
7680 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7681 | else |
7682 | if test -n "$MAKEINFO"; then | |
7683 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
7684 | else | |
ba479fd2 NN |
7685 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7686 | for as_dir in $PATH | |
7687 | do | |
7688 | IFS=$as_save_IFS | |
7689 | test -z "$as_dir" && as_dir=. | |
7690 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7691 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
ba479fd2 NN |
7692 | ac_cv_prog_MAKEINFO="makeinfo" |
7693 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7694 | break 2 | |
7695 | fi | |
7696 | done | |
7697 | done | |
7698 | ||
73458fb7 NN |
7699 | fi |
7700 | fi | |
ba479fd2 | 7701 | MAKEINFO=$ac_cv_prog_MAKEINFO |
73458fb7 | 7702 | if test -n "$MAKEINFO"; then |
b61ff9c8 BS |
7703 | echo "$as_me:$LINENO: result: $MAKEINFO" >&5 |
7704 | echo "${ECHO_T}$MAKEINFO" >&6 | |
73458fb7 | 7705 | else |
b61ff9c8 BS |
7706 | echo "$as_me:$LINENO: result: no" >&5 |
7707 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7708 | fi |
7709 | ||
3bbd5a19 PB |
7710 | if test -n "$MAKEINFO"; then |
7711 | # Found it, now check the version. | |
b61ff9c8 BS |
7712 | echo "$as_me:$LINENO: checking for modern makeinfo" >&5 |
7713 | echo $ECHO_N "checking for modern makeinfo... $ECHO_C" >&6 | |
ba479fd2 NN |
7714 | if test "${gcc_cv_prog_makeinfo_modern+set}" = set; then |
7715 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 | 7716 | else |
3bbd5a19 PB |
7717 | ac_prog_version=`eval $MAKEINFO --version 2>&1 | |
7718 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
7719 | ||
7720 | case $ac_prog_version in | |
7721 | '') gcc_cv_prog_makeinfo_modern=no;; | |
4c471775 | 7722 | 4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*) gcc_cv_prog_makeinfo_modern=yes;; |
3bbd5a19 PB |
7723 | *) gcc_cv_prog_makeinfo_modern=no;; |
7724 | esac | |
73458fb7 NN |
7725 | |
7726 | fi | |
b61ff9c8 BS |
7727 | echo "$as_me:$LINENO: result: $gcc_cv_prog_makeinfo_modern" >&5 |
7728 | echo "${ECHO_T}$gcc_cv_prog_makeinfo_modern" >&6 | |
3bbd5a19 PB |
7729 | else |
7730 | gcc_cv_prog_makeinfo_modern=no | |
7731 | fi | |
7732 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
7733 | MAKEINFO="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing makeinfo" | |
7734 | fi | |
73458fb7 | 7735 | |
73458fb7 | 7736 | if test $gcc_cv_prog_makeinfo_modern = no; then |
ba479fd2 NN |
7737 | { echo "$as_me:$LINENO: WARNING: |
7738 | *** Makeinfo is missing or too old. | |
7739 | *** Info documentation will not be built." >&5 | |
7740 | echo "$as_me: WARNING: | |
cafe096b | 7741 | *** Makeinfo is missing or too old. |
ba479fd2 | 7742 | *** Info documentation will not be built." >&2;} |
73458fb7 NN |
7743 | BUILD_INFO= |
7744 | else | |
ba479fd2 | 7745 | BUILD_INFO=info |
73458fb7 NN |
7746 | fi |
7747 | ||
7c27e184 | 7748 | |
73458fb7 | 7749 | # Is pod2man recent enough to regenerate manpages? |
b61ff9c8 BS |
7750 | echo "$as_me:$LINENO: checking for recent Pod::Man" >&5 |
7751 | echo $ECHO_N "checking for recent Pod::Man... $ECHO_C" >&6 | |
73458fb7 | 7752 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
b61ff9c8 BS |
7753 | echo "$as_me:$LINENO: result: yes" >&5 |
7754 | echo "${ECHO_T}yes" >&6 | |
ba479fd2 | 7755 | GENERATED_MANPAGES=generated-manpages |
73458fb7 | 7756 | else |
b61ff9c8 BS |
7757 | echo "$as_me:$LINENO: result: no" >&5 |
7758 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7759 | GENERATED_MANPAGES= |
7760 | fi | |
7761 | ||
7c27e184 | 7762 | |
3bbd5a19 PB |
7763 | MISSING="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing" |
7764 | ||
73458fb7 | 7765 | # How about lex? |
7c27e184 PB |
7766 | for ac_prog in flex |
7767 | do | |
7768 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7769 | set dummy $ac_prog; ac_word=$2 | |
b61ff9c8 BS |
7770 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7771 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7772 | if test "${ac_cv_prog_FLEX+set}" = set; then |
7773 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7774 | else |
7775 | if test -n "$FLEX"; then | |
7776 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
7777 | else | |
ba479fd2 NN |
7778 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7779 | for as_dir in $PATH | |
7780 | do | |
7781 | IFS=$as_save_IFS | |
7782 | test -z "$as_dir" && as_dir=. | |
7783 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7784 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
7c27e184 | 7785 | ac_cv_prog_FLEX="$ac_prog" |
ba479fd2 NN |
7786 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7787 | break 2 | |
7788 | fi | |
7789 | done | |
7790 | done | |
7791 | ||
73458fb7 NN |
7792 | fi |
7793 | fi | |
ba479fd2 | 7794 | FLEX=$ac_cv_prog_FLEX |
73458fb7 | 7795 | if test -n "$FLEX"; then |
b61ff9c8 BS |
7796 | echo "$as_me:$LINENO: result: $FLEX" >&5 |
7797 | echo "${ECHO_T}$FLEX" >&6 | |
73458fb7 | 7798 | else |
b61ff9c8 BS |
7799 | echo "$as_me:$LINENO: result: no" >&5 |
7800 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7801 | fi |
7802 | ||
7c27e184 PB |
7803 | test -n "$FLEX" && break |
7804 | done | |
7805 | test -n "$FLEX" || FLEX="$MISSING flex" | |
7806 | ||
73458fb7 NN |
7807 | |
7808 | # Bison? | |
7c27e184 PB |
7809 | for ac_prog in bison |
7810 | do | |
7811 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
7812 | set dummy $ac_prog; ac_word=$2 | |
b61ff9c8 BS |
7813 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7814 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
ba479fd2 NN |
7815 | if test "${ac_cv_prog_BISON+set}" = set; then |
7816 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
73458fb7 NN |
7817 | else |
7818 | if test -n "$BISON"; then | |
7819 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
7820 | else | |
ba479fd2 NN |
7821 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
7822 | for as_dir in $PATH | |
7823 | do | |
7824 | IFS=$as_save_IFS | |
7825 | test -z "$as_dir" && as_dir=. | |
7826 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7827 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
7c27e184 | 7828 | ac_cv_prog_BISON="$ac_prog" |
ba479fd2 NN |
7829 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
7830 | break 2 | |
7831 | fi | |
7832 | done | |
7833 | done | |
7834 | ||
73458fb7 NN |
7835 | fi |
7836 | fi | |
ba479fd2 | 7837 | BISON=$ac_cv_prog_BISON |
73458fb7 | 7838 | if test -n "$BISON"; then |
b61ff9c8 BS |
7839 | echo "$as_me:$LINENO: result: $BISON" >&5 |
7840 | echo "${ECHO_T}$BISON" >&6 | |
73458fb7 | 7841 | else |
b61ff9c8 BS |
7842 | echo "$as_me:$LINENO: result: no" >&5 |
7843 | echo "${ECHO_T}no" >&6 | |
73458fb7 NN |
7844 | fi |
7845 | ||
7c27e184 PB |
7846 | test -n "$BISON" && break |
7847 | done | |
7848 | test -n "$BISON" || BISON="$MISSING bison" | |
7849 | ||
7850 | ||
7851 | # Binutils are not build modules, unlike bison/flex/makeinfo. So we | |
7852 | # check for build == host before using them. | |
73458fb7 | 7853 | |
f6a874ac | 7854 | # NM |
414adbdd GK |
7855 | if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ |
7856 | && test -d ../binutils ; then | |
f6a874ac JW |
7857 | NM='$(objdir)/../binutils/nm-new' |
7858 | else | |
7859 | # Extract the first word of "nm", so it can be a program name with args. | |
7860 | set dummy nm; ac_word=$2 | |
b61ff9c8 BS |
7861 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7862 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
f6a874ac JW |
7863 | if test "${ac_cv_prog_NM+set}" = set; then |
7864 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7865 | else | |
7866 | if test -n "$NM"; then | |
7867 | ac_cv_prog_NM="$NM" # Let the user override the test. | |
7868 | else | |
7869 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7870 | for as_dir in $PATH | |
7871 | do | |
7872 | IFS=$as_save_IFS | |
7873 | test -z "$as_dir" && as_dir=. | |
7874 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7875 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
f6a874ac JW |
7876 | ac_cv_prog_NM="nm" |
7877 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7878 | break 2 | |
7879 | fi | |
7880 | done | |
7881 | done | |
7882 | ||
7883 | test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm" | |
7884 | fi | |
7885 | fi | |
7886 | NM=$ac_cv_prog_NM | |
7887 | if test -n "$NM"; then | |
b61ff9c8 BS |
7888 | echo "$as_me:$LINENO: result: $NM" >&5 |
7889 | echo "${ECHO_T}$NM" >&6 | |
f6a874ac | 7890 | else |
b61ff9c8 BS |
7891 | echo "$as_me:$LINENO: result: no" >&5 |
7892 | echo "${ECHO_T}no" >&6 | |
f6a874ac JW |
7893 | fi |
7894 | ||
7895 | fi | |
7896 | ||
7897 | # AR | |
414adbdd GK |
7898 | if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ |
7899 | && test -d ../binutils ; then | |
f6a874ac JW |
7900 | AR='$(objdir)/../binutils/ar' |
7901 | else | |
7902 | # Extract the first word of "ar", so it can be a program name with args. | |
7903 | set dummy ar; ac_word=$2 | |
b61ff9c8 BS |
7904 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
7905 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
f6a874ac JW |
7906 | if test "${ac_cv_prog_AR+set}" = set; then |
7907 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7908 | else | |
7909 | if test -n "$AR"; then | |
7910 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
7911 | else | |
7912 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7913 | for as_dir in $PATH | |
7914 | do | |
7915 | IFS=$as_save_IFS | |
7916 | test -z "$as_dir" && as_dir=. | |
7917 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 7918 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
f6a874ac JW |
7919 | ac_cv_prog_AR="ar" |
7920 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
7921 | break 2 | |
7922 | fi | |
7923 | done | |
7924 | done | |
7925 | ||
7926 | test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar" | |
7927 | fi | |
7928 | fi | |
7929 | AR=$ac_cv_prog_AR | |
7930 | if test -n "$AR"; then | |
b61ff9c8 BS |
7931 | echo "$as_me:$LINENO: result: $AR" >&5 |
7932 | echo "${ECHO_T}$AR" >&6 | |
f6a874ac | 7933 | else |
b61ff9c8 BS |
7934 | echo "$as_me:$LINENO: result: no" >&5 |
7935 | echo "${ECHO_T}no" >&6 | |
f6a874ac JW |
7936 | fi |
7937 | ||
7938 | fi | |
7939 | ||
7940 | ||
73458fb7 NN |
7941 | # -------------------- |
7942 | # Checks for C headers | |
7943 | # -------------------- | |
7944 | ||
b61ff9c8 BS |
7945 | echo "$as_me:$LINENO: checking for GNU C library" >&5 |
7946 | echo $ECHO_N "checking for GNU C library... $ECHO_C" >&6 | |
ba479fd2 NN |
7947 | if test "${gcc_cv_glibc+set}" = set; then |
7948 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
7949 | else | |
7950 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
7951 | /* confdefs.h. */ |
7952 | _ACEOF | |
7953 | cat confdefs.h >>conftest.$ac_ext | |
7954 | cat >>conftest.$ac_ext <<_ACEOF | |
7955 | /* end confdefs.h. */ | |
73458fb7 | 7956 | #include <features.h> |
ba479fd2 NN |
7957 | int |
7958 | main () | |
7959 | { | |
73458fb7 NN |
7960 | |
7961 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
7962 | #error Not a GNU C library system | |
7963 | #endif | |
ba479fd2 NN |
7964 | ; |
7965 | return 0; | |
7966 | } | |
7967 | _ACEOF | |
7968 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
7969 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
7970 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 7971 | ac_status=$? |
86da66b5 HPN |
7972 | grep -v '^ *+' conftest.er1 >conftest.err |
7973 | rm -f conftest.er1 | |
7974 | cat conftest.err >&5 | |
ba479fd2 | 7975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
7976 | (exit $ac_status); } && |
7977 | { ac_try='test -z "$ac_c_werror_flag" | |
7978 | || test ! -s conftest.err' | |
7979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7980 | (eval $ac_try) 2>&5 | |
7981 | ac_status=$? | |
7982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7983 | (exit $ac_status); }; } && | |
7984 | { ac_try='test -s conftest.$ac_objext' | |
7985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
7986 | (eval $ac_try) 2>&5 | |
7987 | ac_status=$? | |
7988 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
7989 | (exit $ac_status); }; }; then | |
73458fb7 NN |
7990 | gcc_cv_glibc=yes |
7991 | else | |
ba479fd2 NN |
7992 | echo "$as_me: failed program was:" >&5 |
7993 | sed 's/^/| /' conftest.$ac_ext >&5 | |
7994 | ||
b61ff9c8 | 7995 | gcc_cv_glibc=no |
73458fb7 | 7996 | fi |
b61ff9c8 | 7997 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
73458fb7 NN |
7998 | fi |
7999 | ||
b61ff9c8 BS |
8000 | echo "$as_me:$LINENO: result: $gcc_cv_glibc" >&5 |
8001 | echo "${ECHO_T}$gcc_cv_glibc" >&6 | |
73458fb7 | 8002 | if test $gcc_cv_glibc = yes; then |
ba479fd2 NN |
8003 | |
8004 | cat >>confdefs.h <<\_ACEOF | |
73458fb7 | 8005 | #define _GNU_SOURCE 1 |
ba479fd2 | 8006 | _ACEOF |
73458fb7 NN |
8007 | |
8008 | fi | |
8009 | ||
ca9bc441 NN |
8010 | # Need to reject headers which give warnings, so that the -Werror bootstrap |
8011 | # works later. *sigh* This needs to come before all header checks. | |
18fc9bd4 | 8012 | |
ca9bc441 NN |
8013 | ac_c_preproc_warn_flag=yes |
8014 | ||
b61ff9c8 BS |
8015 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 |
8016 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
ba479fd2 NN |
8017 | if test "${ac_cv_header_stdc+set}" = set; then |
8018 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8019 | else |
ba479fd2 | 8020 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8021 | /* confdefs.h. */ |
8022 | _ACEOF | |
8023 | cat confdefs.h >>conftest.$ac_ext | |
8024 | cat >>conftest.$ac_ext <<_ACEOF | |
8025 | /* end confdefs.h. */ | |
956d6950 JL |
8026 | #include <stdlib.h> |
8027 | #include <stdarg.h> | |
8028 | #include <string.h> | |
8029 | #include <float.h> | |
ba479fd2 NN |
8030 | |
8031 | int | |
8032 | main () | |
8033 | { | |
8034 | ||
8035 | ; | |
8036 | return 0; | |
8037 | } | |
8038 | _ACEOF | |
8039 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8040 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8041 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8042 | ac_status=$? |
86da66b5 HPN |
8043 | grep -v '^ *+' conftest.er1 >conftest.err |
8044 | rm -f conftest.er1 | |
8045 | cat conftest.err >&5 | |
ba479fd2 | 8046 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8047 | (exit $ac_status); } && |
8048 | { ac_try='test -z "$ac_c_werror_flag" | |
8049 | || test ! -s conftest.err' | |
8050 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8051 | (eval $ac_try) 2>&5 | |
8052 | ac_status=$? | |
8053 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8054 | (exit $ac_status); }; } && | |
8055 | { ac_try='test -s conftest.$ac_objext' | |
8056 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8057 | (eval $ac_try) 2>&5 | |
8058 | ac_status=$? | |
8059 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8060 | (exit $ac_status); }; }; then | |
956d6950 JL |
8061 | ac_cv_header_stdc=yes |
8062 | else | |
ba479fd2 NN |
8063 | echo "$as_me: failed program was:" >&5 |
8064 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8065 | ||
b61ff9c8 | 8066 | ac_cv_header_stdc=no |
956d6950 | 8067 | fi |
b61ff9c8 | 8068 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 JL |
8069 | |
8070 | if test $ac_cv_header_stdc = yes; then | |
8071 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
ba479fd2 | 8072 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8073 | /* confdefs.h. */ |
8074 | _ACEOF | |
8075 | cat confdefs.h >>conftest.$ac_ext | |
8076 | cat >>conftest.$ac_ext <<_ACEOF | |
8077 | /* end confdefs.h. */ | |
956d6950 | 8078 | #include <string.h> |
ba479fd2 NN |
8079 | |
8080 | _ACEOF | |
956d6950 | 8081 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8082 | $EGREP "memchr" >/dev/null 2>&1; then |
956d6950 JL |
8083 | : |
8084 | else | |
956d6950 JL |
8085 | ac_cv_header_stdc=no |
8086 | fi | |
8087 | rm -f conftest* | |
8088 | ||
8089 | fi | |
8090 | ||
8091 | if test $ac_cv_header_stdc = yes; then | |
8092 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
ba479fd2 | 8093 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8094 | /* confdefs.h. */ |
8095 | _ACEOF | |
8096 | cat confdefs.h >>conftest.$ac_ext | |
8097 | cat >>conftest.$ac_ext <<_ACEOF | |
8098 | /* end confdefs.h. */ | |
956d6950 | 8099 | #include <stdlib.h> |
ba479fd2 NN |
8100 | |
8101 | _ACEOF | |
956d6950 | 8102 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8103 | $EGREP "free" >/dev/null 2>&1; then |
956d6950 JL |
8104 | : |
8105 | else | |
956d6950 JL |
8106 | ac_cv_header_stdc=no |
8107 | fi | |
8108 | rm -f conftest* | |
8109 | ||
8110 | fi | |
8111 | ||
8112 | if test $ac_cv_header_stdc = yes; then | |
8113 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
ba479fd2 | 8114 | if test "$cross_compiling" = yes; then |
956d6950 JL |
8115 | : |
8116 | else | |
ba479fd2 | 8117 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8118 | /* confdefs.h. */ |
8119 | _ACEOF | |
8120 | cat confdefs.h >>conftest.$ac_ext | |
8121 | cat >>conftest.$ac_ext <<_ACEOF | |
8122 | /* end confdefs.h. */ | |
956d6950 | 8123 | #include <ctype.h> |
ba479fd2 NN |
8124 | #if ((' ' & 0x0FF) == 0x020) |
8125 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
8126 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
8127 | #else | |
8128 | # define ISLOWER(c) \ | |
86da66b5 HPN |
8129 | (('a' <= (c) && (c) <= 'i') \ |
8130 | || ('j' <= (c) && (c) <= 'r') \ | |
8131 | || ('s' <= (c) && (c) <= 'z')) | |
ba479fd2 NN |
8132 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
8133 | #endif | |
63cf211a | 8134 | |
ba479fd2 NN |
8135 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
8136 | int | |
8137 | main () | |
8138 | { | |
8139 | int i; | |
8140 | for (i = 0; i < 256; i++) | |
8141 | if (XOR (islower (i), ISLOWER (i)) | |
86da66b5 | 8142 | || toupper (i) != TOUPPER (i)) |
b61ff9c8 BS |
8143 | exit(2); |
8144 | exit (0); | |
ba479fd2 NN |
8145 | } |
8146 | _ACEOF | |
8147 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
8148 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
8149 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
8150 | ac_status=$? |
8151 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8152 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
8153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8154 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
8155 | ac_status=$? |
8156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8157 | (exit $ac_status); }; }; then | |
956d6950 JL |
8158 | : |
8159 | else | |
ba479fd2 NN |
8160 | echo "$as_me: program exited with status $ac_status" >&5 |
8161 | echo "$as_me: failed program was:" >&5 | |
8162 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8163 | ||
8164 | ( exit $ac_status ) | |
8165 | ac_cv_header_stdc=no | |
956d6950 | 8166 | fi |
b61ff9c8 | 8167 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8168 | fi |
956d6950 JL |
8169 | fi |
8170 | fi | |
b61ff9c8 BS |
8171 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 |
8172 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
63cf211a | 8173 | if test $ac_cv_header_stdc = yes; then |
ba479fd2 NN |
8174 | |
8175 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8176 | #define STDC_HEADERS 1 |
ba479fd2 | 8177 | _ACEOF |
956d6950 JL |
8178 | |
8179 | fi | |
8180 | ||
b61ff9c8 BS |
8181 | echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 |
8182 | echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 | |
ba479fd2 NN |
8183 | if test "${ac_cv_header_time+set}" = set; then |
8184 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
956d6950 | 8185 | else |
ba479fd2 | 8186 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8187 | /* confdefs.h. */ |
8188 | _ACEOF | |
8189 | cat confdefs.h >>conftest.$ac_ext | |
8190 | cat >>conftest.$ac_ext <<_ACEOF | |
8191 | /* end confdefs.h. */ | |
956d6950 JL |
8192 | #include <sys/types.h> |
8193 | #include <sys/time.h> | |
8194 | #include <time.h> | |
ba479fd2 NN |
8195 | |
8196 | int | |
8197 | main () | |
8198 | { | |
8199 | if ((struct tm *) 0) | |
8200 | return 0; | |
8201 | ; | |
8202 | return 0; | |
8203 | } | |
8204 | _ACEOF | |
8205 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8206 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8207 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8208 | ac_status=$? |
86da66b5 HPN |
8209 | grep -v '^ *+' conftest.er1 >conftest.err |
8210 | rm -f conftest.er1 | |
8211 | cat conftest.err >&5 | |
ba479fd2 | 8212 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8213 | (exit $ac_status); } && |
8214 | { ac_try='test -z "$ac_c_werror_flag" | |
8215 | || test ! -s conftest.err' | |
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); }; } && | |
8221 | { ac_try='test -s conftest.$ac_objext' | |
8222 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8223 | (eval $ac_try) 2>&5 | |
8224 | ac_status=$? | |
8225 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8226 | (exit $ac_status); }; }; then | |
956d6950 JL |
8227 | ac_cv_header_time=yes |
8228 | else | |
ba479fd2 NN |
8229 | echo "$as_me: failed program was:" >&5 |
8230 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8231 | ||
b61ff9c8 | 8232 | ac_cv_header_time=no |
956d6950 | 8233 | fi |
b61ff9c8 | 8234 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
956d6950 | 8235 | fi |
b61ff9c8 BS |
8236 | echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 |
8237 | echo "${ECHO_T}$ac_cv_header_time" >&6 | |
63cf211a | 8238 | if test $ac_cv_header_time = yes; then |
ba479fd2 NN |
8239 | |
8240 | cat >>confdefs.h <<\_ACEOF | |
956d6950 | 8241 | #define TIME_WITH_SYS_TIME 1 |
ba479fd2 | 8242 | _ACEOF |
956d6950 JL |
8243 | |
8244 | fi | |
8245 | ||
b61ff9c8 BS |
8246 | echo "$as_me:$LINENO: checking whether string.h and strings.h may both be included" >&5 |
8247 | echo $ECHO_N "checking whether string.h and strings.h may both be included... $ECHO_C" >&6 | |
18fc9bd4 RG |
8248 | if test "${gcc_cv_header_string+set}" = set; then |
8249 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8250 | else | |
8251 | cat >conftest.$ac_ext <<_ACEOF | |
8252 | /* confdefs.h. */ | |
8253 | _ACEOF | |
8254 | cat confdefs.h >>conftest.$ac_ext | |
8255 | cat >>conftest.$ac_ext <<_ACEOF | |
8256 | /* end confdefs.h. */ | |
8257 | #include <string.h> | |
8258 | #include <strings.h> | |
8259 | int | |
8260 | main () | |
8261 | { | |
8262 | ||
8263 | ; | |
8264 | return 0; | |
8265 | } | |
8266 | _ACEOF | |
8267 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8268 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8269 | (eval $ac_compile) 2>conftest.er1 | |
18fc9bd4 RG |
8270 | ac_status=$? |
8271 | grep -v '^ *+' conftest.er1 >conftest.err | |
8272 | rm -f conftest.er1 | |
8273 | cat conftest.err >&5 | |
8274 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
8275 | (exit $ac_status); } && |
8276 | { ac_try='test -z "$ac_c_werror_flag" | |
8277 | || test ! -s conftest.err' | |
8278 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8279 | (eval $ac_try) 2>&5 | |
8280 | ac_status=$? | |
8281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8282 | (exit $ac_status); }; } && | |
8283 | { ac_try='test -s conftest.$ac_objext' | |
8284 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8285 | (eval $ac_try) 2>&5 | |
8286 | ac_status=$? | |
8287 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8288 | (exit $ac_status); }; }; then | |
18fc9bd4 RG |
8289 | gcc_cv_header_string=yes |
8290 | else | |
8291 | echo "$as_me: failed program was:" >&5 | |
8292 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8293 | ||
b61ff9c8 | 8294 | gcc_cv_header_string=no |
18fc9bd4 | 8295 | fi |
b61ff9c8 | 8296 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
18fc9bd4 | 8297 | fi |
b61ff9c8 BS |
8298 | echo "$as_me:$LINENO: result: $gcc_cv_header_string" >&5 |
8299 | echo "${ECHO_T}$gcc_cv_header_string" >&6 | |
18fc9bd4 RG |
8300 | if test $gcc_cv_header_string = yes; then |
8301 | ||
8302 | cat >>confdefs.h <<\_ACEOF | |
8303 | #define STRING_WITH_STRINGS 1 | |
8304 | _ACEOF | |
8305 | ||
8306 | fi | |
8307 | ||
b61ff9c8 BS |
8308 | echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
8309 | echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 | |
ba479fd2 NN |
8310 | if test "${ac_cv_header_sys_wait_h+set}" = set; then |
8311 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e9831ca0 | 8312 | else |
ba479fd2 | 8313 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8314 | /* confdefs.h. */ |
8315 | _ACEOF | |
8316 | cat confdefs.h >>conftest.$ac_ext | |
8317 | cat >>conftest.$ac_ext <<_ACEOF | |
8318 | /* end confdefs.h. */ | |
e9831ca0 KG |
8319 | #include <sys/types.h> |
8320 | #include <sys/wait.h> | |
8321 | #ifndef WEXITSTATUS | |
b61ff9c8 | 8322 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
8323 | #endif |
8324 | #ifndef WIFEXITED | |
ba479fd2 | 8325 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 8326 | #endif |
ba479fd2 NN |
8327 | |
8328 | int | |
8329 | main () | |
8330 | { | |
8331 | int s; | |
8332 | wait (&s); | |
8333 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
8334 | ; | |
8335 | return 0; | |
8336 | } | |
8337 | _ACEOF | |
8338 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8339 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8340 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8341 | ac_status=$? |
86da66b5 HPN |
8342 | grep -v '^ *+' conftest.er1 >conftest.err |
8343 | rm -f conftest.er1 | |
8344 | cat conftest.err >&5 | |
ba479fd2 | 8345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8346 | (exit $ac_status); } && |
8347 | { ac_try='test -z "$ac_c_werror_flag" | |
8348 | || test ! -s conftest.err' | |
8349 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8350 | (eval $ac_try) 2>&5 | |
8351 | ac_status=$? | |
8352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8353 | (exit $ac_status); }; } && | |
8354 | { ac_try='test -s conftest.$ac_objext' | |
8355 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8356 | (eval $ac_try) 2>&5 | |
8357 | ac_status=$? | |
8358 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8359 | (exit $ac_status); }; }; then | |
e9831ca0 KG |
8360 | ac_cv_header_sys_wait_h=yes |
8361 | else | |
ba479fd2 NN |
8362 | echo "$as_me: failed program was:" >&5 |
8363 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8364 | ||
b61ff9c8 | 8365 | ac_cv_header_sys_wait_h=no |
e9831ca0 | 8366 | fi |
b61ff9c8 | 8367 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
e9831ca0 | 8368 | fi |
b61ff9c8 BS |
8369 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 |
8370 | echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 | |
63cf211a | 8371 | if test $ac_cv_header_sys_wait_h = yes; then |
ba479fd2 NN |
8372 | |
8373 | cat >>confdefs.h <<\_ACEOF | |
e9831ca0 | 8374 | #define HAVE_SYS_WAIT_H 1 |
ba479fd2 | 8375 | _ACEOF |
6e3f3080 | 8376 | |
63cf211a | 8377 | fi |
6e3f3080 | 8378 | |
ba479fd2 NN |
8379 | |
8380 | ||
8381 | ||
8382 | ||
8383 | ||
8384 | ||
8385 | ||
8386 | ||
8387 | ||
8388 | ||
8389 | ||
8390 | ||
8391 | ||
8392 | ||
8393 | ||
8394 | ||
8395 | ||
8396 | ||
8397 | ||
8398 | ||
8399 | ||
dfb77e37 KC |
8400 | |
8401 | for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ | |
1072ec3f | 8402 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 8403 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
56694dd9 | 8404 | direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h |
861bb6c1 | 8405 | do |
ba479fd2 | 8406 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
b61ff9c8 BS |
8407 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
8408 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
8409 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
ba479fd2 | 8410 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
ba479fd2 | 8411 | else |
18fc9bd4 | 8412 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8413 | /* confdefs.h. */ |
8414 | _ACEOF | |
8415 | cat confdefs.h >>conftest.$ac_ext | |
8416 | cat >>conftest.$ac_ext <<_ACEOF | |
8417 | /* end confdefs.h. */ | |
8418 | #include <$ac_header> | |
8419 | _ACEOF | |
b61ff9c8 BS |
8420 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
8421 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
8422 | ac_status=$? |
8423 | grep -v '^ *+' conftest.er1 >conftest.err | |
8424 | rm -f conftest.er1 | |
8425 | cat conftest.err >&5 | |
8426 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
8427 | (exit $ac_status); } >/dev/null; then |
8428 | if test -s conftest.err; then | |
8429 | ac_cpp_err=$ac_c_preproc_warn_flag | |
8430 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
8431 | else | |
8432 | ac_cpp_err= | |
8433 | fi | |
8434 | else | |
8435 | ac_cpp_err=yes | |
8436 | fi | |
8437 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8438 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
8439 | else |
8440 | echo "$as_me: failed program was:" >&5 | |
8441 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8442 | ||
18fc9bd4 | 8443 | eval "$as_ac_Header=no" |
ba479fd2 NN |
8444 | fi |
8445 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8446 | fi |
b61ff9c8 BS |
8447 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
8448 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
8449 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
8450 | cat >>confdefs.h <<_ACEOF | |
8451 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
8452 | _ACEOF | |
8453 | ||
956d6950 JL |
8454 | fi |
8455 | done | |
8456 | ||
8457 | ||
f24af81b | 8458 | # Check for thread headers. |
b61ff9c8 BS |
8459 | echo "$as_me:$LINENO: checking for thread.h" >&5 |
8460 | echo $ECHO_N "checking for thread.h... $ECHO_C" >&6 | |
ba479fd2 NN |
8461 | if test "${ac_cv_header_thread_h+set}" = set; then |
8462 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 8463 | else |
18fc9bd4 | 8464 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8465 | /* confdefs.h. */ |
8466 | _ACEOF | |
8467 | cat confdefs.h >>conftest.$ac_ext | |
8468 | cat >>conftest.$ac_ext <<_ACEOF | |
8469 | /* end confdefs.h. */ | |
8470 | #include <thread.h> | |
8471 | _ACEOF | |
b61ff9c8 BS |
8472 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
8473 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
8474 | ac_status=$? |
8475 | grep -v '^ *+' conftest.er1 >conftest.err | |
8476 | rm -f conftest.er1 | |
8477 | cat conftest.err >&5 | |
8478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
8479 | (exit $ac_status); } >/dev/null; then |
8480 | if test -s conftest.err; then | |
8481 | ac_cpp_err=$ac_c_preproc_warn_flag | |
8482 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
8483 | else | |
8484 | ac_cpp_err= | |
8485 | fi | |
8486 | else | |
8487 | ac_cpp_err=yes | |
8488 | fi | |
8489 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8490 | ac_cv_header_thread_h=yes |
ba479fd2 NN |
8491 | else |
8492 | echo "$as_me: failed program was:" >&5 | |
8493 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8494 | ||
18fc9bd4 | 8495 | ac_cv_header_thread_h=no |
ba479fd2 NN |
8496 | fi |
8497 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8498 | fi |
b61ff9c8 BS |
8499 | echo "$as_me:$LINENO: result: $ac_cv_header_thread_h" >&5 |
8500 | echo "${ECHO_T}$ac_cv_header_thread_h" >&6 | |
ba479fd2 | 8501 | if test $ac_cv_header_thread_h = yes; then |
f24af81b TT |
8502 | have_thread_h=yes |
8503 | else | |
ba479fd2 | 8504 | have_thread_h= |
f24af81b TT |
8505 | fi |
8506 | ||
b61ff9c8 BS |
8507 | echo "$as_me:$LINENO: checking for pthread.h" >&5 |
8508 | echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 | |
ba479fd2 NN |
8509 | if test "${ac_cv_header_pthread_h+set}" = set; then |
8510 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 8511 | else |
18fc9bd4 | 8512 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8513 | /* confdefs.h. */ |
8514 | _ACEOF | |
8515 | cat confdefs.h >>conftest.$ac_ext | |
8516 | cat >>conftest.$ac_ext <<_ACEOF | |
8517 | /* end confdefs.h. */ | |
8518 | #include <pthread.h> | |
8519 | _ACEOF | |
b61ff9c8 BS |
8520 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
8521 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
8522 | ac_status=$? |
8523 | grep -v '^ *+' conftest.er1 >conftest.err | |
8524 | rm -f conftest.er1 | |
8525 | cat conftest.err >&5 | |
8526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
8527 | (exit $ac_status); } >/dev/null; then |
8528 | if test -s conftest.err; then | |
8529 | ac_cpp_err=$ac_c_preproc_warn_flag | |
8530 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
8531 | else | |
8532 | ac_cpp_err= | |
8533 | fi | |
8534 | else | |
8535 | ac_cpp_err=yes | |
8536 | fi | |
8537 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 8538 | ac_cv_header_pthread_h=yes |
ba479fd2 | 8539 | else |
18fc9bd4 RG |
8540 | echo "$as_me: failed program was:" >&5 |
8541 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8542 | ||
8543 | ac_cv_header_pthread_h=no | |
8544 | fi | |
8545 | rm -f conftest.err conftest.$ac_ext | |
6e3f3080 | 8546 | fi |
b61ff9c8 BS |
8547 | echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5 |
8548 | echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 | |
ba479fd2 | 8549 | if test $ac_cv_header_pthread_h = yes; then |
f24af81b TT |
8550 | have_pthread_h=yes |
8551 | else | |
ba479fd2 | 8552 | have_pthread_h= |
f24af81b TT |
8553 | fi |
8554 | ||
8555 | ||
84c041a1 | 8556 | # These tests can't be done till we know if we have limits.h. |
b61ff9c8 BS |
8557 | echo "$as_me:$LINENO: checking for CHAR_BIT" >&5 |
8558 | echo $ECHO_N "checking for CHAR_BIT... $ECHO_C" >&6 | |
ba479fd2 NN |
8559 | if test "${gcc_cv_decl_char_bit+set}" = set; then |
8560 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8561 | else | |
8562 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8563 | /* confdefs.h. */ |
8564 | _ACEOF | |
8565 | cat confdefs.h >>conftest.$ac_ext | |
8566 | cat >>conftest.$ac_ext <<_ACEOF | |
8567 | /* end confdefs.h. */ | |
75e93faa ZW |
8568 | #ifdef HAVE_LIMITS_H |
8569 | #include <limits.h> | |
8570 | #endif | |
8571 | #ifdef CHAR_BIT | |
8572 | found | |
8573 | #endif | |
ba479fd2 | 8574 | _ACEOF |
75e93faa | 8575 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 8576 | $EGREP "found" >/dev/null 2>&1; then |
75e93faa ZW |
8577 | gcc_cv_decl_char_bit=yes |
8578 | else | |
75e93faa ZW |
8579 | gcc_cv_decl_char_bit=no |
8580 | fi | |
8581 | rm -f conftest* | |
8582 | ||
8583 | ||
8584 | fi | |
b61ff9c8 BS |
8585 | echo "$as_me:$LINENO: result: $gcc_cv_decl_char_bit" >&5 |
8586 | echo "${ECHO_T}$gcc_cv_decl_char_bit" >&6 | |
75e93faa | 8587 | if test $gcc_cv_decl_char_bit = no; then |
b61ff9c8 BS |
8588 | echo "$as_me:$LINENO: checking number of bits in a byte" >&5 |
8589 | echo $ECHO_N "checking number of bits in a byte... $ECHO_C" >&6 | |
ba479fd2 NN |
8590 | if test "${gcc_cv_c_nbby+set}" = set; then |
8591 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75e93faa ZW |
8592 | else |
8593 | i=8 | |
8594 | gcc_cv_c_nbby= | |
8595 | while test $i -lt 65; do | |
ba479fd2 | 8596 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8597 | /* confdefs.h. */ |
8598 | _ACEOF | |
8599 | cat confdefs.h >>conftest.$ac_ext | |
8600 | cat >>conftest.$ac_ext <<_ACEOF | |
8601 | /* end confdefs.h. */ | |
8602 | ||
8603 | int | |
8604 | main () | |
8605 | { | |
4e70264f ZW |
8606 | switch(0) { |
8607 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
8608 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
8609 | ; } | |
ba479fd2 NN |
8610 | ; |
8611 | return 0; | |
8612 | } | |
8613 | _ACEOF | |
8614 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8615 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8616 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8617 | ac_status=$? |
86da66b5 HPN |
8618 | grep -v '^ *+' conftest.er1 >conftest.err |
8619 | rm -f conftest.er1 | |
8620 | cat conftest.err >&5 | |
ba479fd2 | 8621 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8622 | (exit $ac_status); } && |
8623 | { ac_try='test -z "$ac_c_werror_flag" | |
8624 | || test ! -s conftest.err' | |
8625 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8626 | (eval $ac_try) 2>&5 | |
8627 | ac_status=$? | |
8628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8629 | (exit $ac_status); }; } && | |
8630 | { ac_try='test -s conftest.$ac_objext' | |
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); }; }; then | |
4e70264f | 8636 | gcc_cv_c_nbby=$i; break |
75e93faa | 8637 | else |
ba479fd2 NN |
8638 | echo "$as_me: failed program was:" >&5 |
8639 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8640 | ||
75e93faa | 8641 | fi |
b61ff9c8 | 8642 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75e93faa ZW |
8643 | i=`expr $i + 1` |
8644 | done | |
8645 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
8646 | ||
8647 | fi | |
b61ff9c8 BS |
8648 | echo "$as_me:$LINENO: result: $gcc_cv_c_nbby" >&5 |
8649 | echo "${ECHO_T}$gcc_cv_c_nbby" >&6 | |
75e93faa | 8650 | if test $gcc_cv_c_nbby = failed; then |
ba479fd2 NN |
8651 | { { echo "$as_me:$LINENO: error: cannot determine number of bits in a byte" >&5 |
8652 | echo "$as_me: error: cannot determine number of bits in a byte" >&2;} | |
8653 | { (exit 1); exit 1; }; } | |
75e93faa | 8654 | else |
ba479fd2 NN |
8655 | |
8656 | cat >>confdefs.h <<_ACEOF | |
75e93faa | 8657 | #define CHAR_BIT $gcc_cv_c_nbby |
ba479fd2 | 8658 | _ACEOF |
75e93faa ZW |
8659 | |
8660 | fi | |
8661 | fi | |
b61ff9c8 BS |
8662 | echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 |
8663 | echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 | |
ba479fd2 NN |
8664 | if test "${ac_cv_c_bigendian+set}" = set; then |
8665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
84c041a1 | 8666 | else |
9791c75c | 8667 | # See if sys/param.h defines the BYTE_ORDER macro. |
ba479fd2 | 8668 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8669 | /* confdefs.h. */ |
8670 | _ACEOF | |
8671 | cat confdefs.h >>conftest.$ac_ext | |
8672 | cat >>conftest.$ac_ext <<_ACEOF | |
8673 | /* end confdefs.h. */ | |
4977bab6 ZW |
8674 | #include <sys/types.h> |
8675 | #include <sys/param.h> | |
9791c75c | 8676 | |
ba479fd2 NN |
8677 | int |
8678 | main () | |
8679 | { | |
b61ff9c8 | 8680 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
4977bab6 | 8681 | bogus endian macros |
84c041a1 | 8682 | #endif |
9791c75c | 8683 | |
ba479fd2 NN |
8684 | ; |
8685 | return 0; | |
8686 | } | |
8687 | _ACEOF | |
8688 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8689 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8690 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8691 | ac_status=$? |
86da66b5 HPN |
8692 | grep -v '^ *+' conftest.er1 >conftest.err |
8693 | rm -f conftest.er1 | |
8694 | cat conftest.err >&5 | |
ba479fd2 | 8695 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8696 | (exit $ac_status); } && |
8697 | { ac_try='test -z "$ac_c_werror_flag" | |
8698 | || test ! -s conftest.err' | |
8699 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8700 | (eval $ac_try) 2>&5 | |
8701 | ac_status=$? | |
8702 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8703 | (exit $ac_status); }; } && | |
8704 | { ac_try='test -s conftest.$ac_objext' | |
8705 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8706 | (eval $ac_try) 2>&5 | |
8707 | ac_status=$? | |
8708 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8709 | (exit $ac_status); }; }; then | |
2f41c1d6 | 8710 | # It does; now see whether it defined to BIG_ENDIAN or not. |
ba479fd2 | 8711 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8712 | /* confdefs.h. */ |
8713 | _ACEOF | |
8714 | cat confdefs.h >>conftest.$ac_ext | |
8715 | cat >>conftest.$ac_ext <<_ACEOF | |
8716 | /* end confdefs.h. */ | |
4977bab6 ZW |
8717 | #include <sys/types.h> |
8718 | #include <sys/param.h> | |
9791c75c | 8719 | |
ba479fd2 NN |
8720 | int |
8721 | main () | |
8722 | { | |
4977bab6 ZW |
8723 | #if BYTE_ORDER != BIG_ENDIAN |
8724 | not big endian | |
84c041a1 | 8725 | #endif |
9791c75c | 8726 | |
ba479fd2 NN |
8727 | ; |
8728 | return 0; | |
8729 | } | |
8730 | _ACEOF | |
8731 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8732 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8733 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 8734 | ac_status=$? |
86da66b5 HPN |
8735 | grep -v '^ *+' conftest.er1 >conftest.err |
8736 | rm -f conftest.er1 | |
8737 | cat conftest.err >&5 | |
ba479fd2 | 8738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8739 | (exit $ac_status); } && |
8740 | { ac_try='test -z "$ac_c_werror_flag" | |
8741 | || test ! -s conftest.err' | |
8742 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8743 | (eval $ac_try) 2>&5 | |
8744 | ac_status=$? | |
8745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8746 | (exit $ac_status); }; } && | |
8747 | { ac_try='test -s conftest.$ac_objext' | |
8748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8749 | (eval $ac_try) 2>&5 | |
8750 | ac_status=$? | |
8751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8752 | (exit $ac_status); }; }; then | |
8753 | ac_cv_c_bigendian=yes | |
8754 | else | |
8755 | echo "$as_me: failed program was:" >&5 | |
ba479fd2 NN |
8756 | sed 's/^/| /' conftest.$ac_ext >&5 |
8757 | ||
b61ff9c8 | 8758 | ac_cv_c_bigendian=no |
4977bab6 | 8759 | fi |
b61ff9c8 | 8760 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8761 | else |
ba479fd2 NN |
8762 | echo "$as_me: failed program was:" >&5 |
8763 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8764 | ||
b61ff9c8 | 8765 | # It does not; compile a test program. |
9791c75c KC |
8766 | if test "$cross_compiling" = yes; then |
8767 | # try to guess the endianness by grepping values into an object file | |
8768 | ac_cv_c_bigendian=unknown | |
8769 | cat >conftest.$ac_ext <<_ACEOF | |
8770 | /* confdefs.h. */ | |
8771 | _ACEOF | |
8772 | cat confdefs.h >>conftest.$ac_ext | |
8773 | cat >>conftest.$ac_ext <<_ACEOF | |
8774 | /* end confdefs.h. */ | |
b61ff9c8 BS |
8775 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
8776 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
9791c75c | 8777 | void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } |
b61ff9c8 BS |
8778 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
8779 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
9791c75c KC |
8780 | void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } |
8781 | int | |
8782 | main () | |
8783 | { | |
8784 | _ascii (); _ebcdic (); | |
8785 | ; | |
8786 | return 0; | |
8787 | } | |
8788 | _ACEOF | |
8789 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
8790 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
8791 | (eval $ac_compile) 2>conftest.er1 | |
9791c75c KC |
8792 | ac_status=$? |
8793 | grep -v '^ *+' conftest.er1 >conftest.err | |
8794 | rm -f conftest.er1 | |
8795 | cat conftest.err >&5 | |
8796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
8797 | (exit $ac_status); } && |
8798 | { ac_try='test -z "$ac_c_werror_flag" | |
8799 | || test ! -s conftest.err' | |
8800 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8801 | (eval $ac_try) 2>&5 | |
8802 | ac_status=$? | |
8803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8804 | (exit $ac_status); }; } && | |
8805 | { ac_try='test -s conftest.$ac_objext' | |
8806 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8807 | (eval $ac_try) 2>&5 | |
8808 | ac_status=$? | |
8809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8810 | (exit $ac_status); }; }; then | |
8b1f719a PB |
8811 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then |
8812 | ac_cv_c_bigendian=yes | |
8813 | fi | |
9791c75c KC |
8814 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
8815 | if test "$ac_cv_c_bigendian" = unknown; then | |
8816 | ac_cv_c_bigendian=no | |
8817 | else | |
8818 | # finding both strings is unlikely to happen, but who knows? | |
8819 | ac_cv_c_bigendian=unknown | |
8820 | fi | |
8821 | fi | |
8822 | else | |
8823 | echo "$as_me: failed program was:" >&5 | |
8824 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8825 | ||
4977bab6 | 8826 | fi |
b61ff9c8 | 8827 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
8828 | else |
8829 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
8830 | /* confdefs.h. */ |
8831 | _ACEOF | |
8832 | cat confdefs.h >>conftest.$ac_ext | |
8833 | cat >>conftest.$ac_ext <<_ACEOF | |
8834 | /* end confdefs.h. */ | |
9791c75c KC |
8835 | int |
8836 | main () | |
8837 | { | |
4977bab6 ZW |
8838 | /* Are we little or big endian? From Harbison&Steele. */ |
8839 | union | |
8840 | { | |
b61ff9c8 BS |
8841 | long l; |
8842 | char c[sizeof (long)]; | |
4977bab6 ZW |
8843 | } u; |
8844 | u.l = 1; | |
b61ff9c8 | 8845 | exit (u.c[sizeof (long) - 1] == 1); |
4977bab6 | 8846 | } |
ba479fd2 NN |
8847 | _ACEOF |
8848 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
8849 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
8850 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
8851 | ac_status=$? |
8852 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8853 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
8854 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
8855 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
8856 | ac_status=$? |
8857 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8858 | (exit $ac_status); }; }; then | |
4977bab6 ZW |
8859 | ac_cv_c_bigendian=no |
8860 | else | |
ba479fd2 NN |
8861 | echo "$as_me: program exited with status $ac_status" >&5 |
8862 | echo "$as_me: failed program was:" >&5 | |
8863 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8864 | ||
8865 | ( exit $ac_status ) | |
8866 | ac_cv_c_bigendian=yes | |
4977bab6 | 8867 | fi |
b61ff9c8 | 8868 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
84c041a1 | 8869 | fi |
4977bab6 | 8870 | fi |
b61ff9c8 | 8871 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4977bab6 | 8872 | fi |
b61ff9c8 BS |
8873 | echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 |
8874 | echo "${ECHO_T}$ac_cv_c_bigendian" >&6 | |
9791c75c KC |
8875 | case $ac_cv_c_bigendian in |
8876 | yes) | |
ba479fd2 NN |
8877 | |
8878 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 8879 | #define WORDS_BIGENDIAN 1 |
ba479fd2 | 8880 | _ACEOF |
9791c75c KC |
8881 | ;; |
8882 | no) | |
8883 | ;; | |
8884 | *) | |
8885 | { { echo "$as_me:$LINENO: error: unknown endianness | |
8886 | presetting ac_cv_c_bigendian=no (or yes) will help" >&5 | |
8887 | echo "$as_me: error: unknown endianness | |
8888 | presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} | |
8889 | { (exit 1); exit 1; }; } ;; | |
8890 | esac | |
84c041a1 | 8891 | |
75e93faa | 8892 | |
73458fb7 NN |
8893 | # -------- |
8894 | # UNSORTED | |
8895 | # -------- | |
1e608388 | 8896 | |
1e608388 | 8897 | |
4e70264f ZW |
8898 | # These libraries may be used by collect2. |
8899 | # We may need a special search path to get them linked. | |
b61ff9c8 BS |
8900 | echo "$as_me:$LINENO: checking for collect2 libraries" >&5 |
8901 | echo $ECHO_N "checking for collect2 libraries... $ECHO_C" >&6 | |
ba479fd2 NN |
8902 | if test "${gcc_cv_collect2_libs+set}" = set; then |
8903 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4e70264f ZW |
8904 | else |
8905 | save_LIBS="$LIBS" | |
7f2749d4 | 8906 | for libs in '' -lld -lmld \ |
4e70264f ZW |
8907 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
8908 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
8909 | do | |
8910 | LIBS="$libs" | |
ba479fd2 | 8911 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8912 | /* confdefs.h. */ |
8913 | _ACEOF | |
8914 | cat confdefs.h >>conftest.$ac_ext | |
8915 | cat >>conftest.$ac_ext <<_ACEOF | |
8916 | /* end confdefs.h. */ | |
8917 | ||
b61ff9c8 | 8918 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8919 | #ifdef __cplusplus |
8920 | extern "C" | |
8921 | #endif | |
b61ff9c8 BS |
8922 | /* We use char because int might match the return type of a gcc2 |
8923 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
8924 | char ldopen (); |
8925 | int | |
8926 | main () | |
8927 | { | |
b61ff9c8 | 8928 | ldopen (); |
ba479fd2 NN |
8929 | ; |
8930 | return 0; | |
8931 | } | |
8932 | _ACEOF | |
8933 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
8934 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
8935 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 8936 | ac_status=$? |
86da66b5 HPN |
8937 | grep -v '^ *+' conftest.er1 >conftest.err |
8938 | rm -f conftest.er1 | |
8939 | cat conftest.err >&5 | |
ba479fd2 | 8940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
8941 | (exit $ac_status); } && |
8942 | { ac_try='test -z "$ac_c_werror_flag" | |
8943 | || test ! -s conftest.err' | |
8944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8945 | (eval $ac_try) 2>&5 | |
8946 | ac_status=$? | |
8947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8948 | (exit $ac_status); }; } && | |
8949 | { ac_try='test -s conftest$ac_exeext' | |
8950 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
8951 | (eval $ac_try) 2>&5 | |
8952 | ac_status=$? | |
8953 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
8954 | (exit $ac_status); }; }; then | |
4e70264f ZW |
8955 | gcc_cv_collect2_libs="$libs"; break |
8956 | else | |
ba479fd2 NN |
8957 | echo "$as_me: failed program was:" >&5 |
8958 | sed 's/^/| /' conftest.$ac_ext >&5 | |
8959 | ||
4e70264f | 8960 | fi |
b61ff9c8 | 8961 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 8962 | conftest$ac_exeext conftest.$ac_ext |
4e70264f ZW |
8963 | done |
8964 | LIBS="$save_LIBS" | |
8965 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
8966 | fi | |
b61ff9c8 BS |
8967 | echo "$as_me:$LINENO: result: $gcc_cv_collect2_libs" >&5 |
8968 | echo "${ECHO_T}$gcc_cv_collect2_libs" >&6 | |
4e70264f ZW |
8969 | case $gcc_cv_collect2_libs in |
8970 | "none required") ;; | |
8971 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
8972 | esac | |
8973 | ||
8974 | ||
7f2749d4 RK |
8975 | # When building Ada code on Alpha, we need exc_resume which is usually in |
8976 | # -lexc. So test for it. | |
8977 | save_LIBS="$LIBS" | |
8978 | LIBS= | |
b61ff9c8 BS |
8979 | echo "$as_me:$LINENO: checking for library containing exc_resume" >&5 |
8980 | echo $ECHO_N "checking for library containing exc_resume... $ECHO_C" >&6 | |
ba479fd2 NN |
8981 | if test "${ac_cv_search_exc_resume+set}" = set; then |
8982 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8983 | else | |
8984 | ac_func_search_save_LIBS=$LIBS | |
b61ff9c8 | 8985 | ac_cv_search_exc_resume=no |
ba479fd2 | 8986 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
8987 | /* confdefs.h. */ |
8988 | _ACEOF | |
8989 | cat confdefs.h >>conftest.$ac_ext | |
8990 | cat >>conftest.$ac_ext <<_ACEOF | |
8991 | /* end confdefs.h. */ | |
7f2749d4 | 8992 | |
b61ff9c8 | 8993 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
8994 | #ifdef __cplusplus |
8995 | extern "C" | |
8996 | #endif | |
b61ff9c8 BS |
8997 | /* We use char because int might match the return type of a gcc2 |
8998 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
8999 | char exc_resume (); |
9000 | int | |
9001 | main () | |
9002 | { | |
b61ff9c8 | 9003 | exc_resume (); |
ba479fd2 NN |
9004 | ; |
9005 | return 0; | |
9006 | } | |
9007 | _ACEOF | |
b61ff9c8 BS |
9008 | rm -f conftest.$ac_objext conftest$ac_exeext |
9009 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9010 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 9011 | ac_status=$? |
86da66b5 HPN |
9012 | grep -v '^ *+' conftest.er1 >conftest.err |
9013 | rm -f conftest.er1 | |
9014 | cat conftest.err >&5 | |
ba479fd2 | 9015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
9016 | (exit $ac_status); } && |
9017 | { ac_try='test -z "$ac_c_werror_flag" | |
9018 | || test ! -s conftest.err' | |
9019 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9020 | (eval $ac_try) 2>&5 | |
9021 | ac_status=$? | |
9022 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9023 | (exit $ac_status); }; } && | |
9024 | { ac_try='test -s conftest$ac_exeext' | |
9025 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9026 | (eval $ac_try) 2>&5 | |
9027 | ac_status=$? | |
9028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9029 | (exit $ac_status); }; }; then | |
9030 | ac_cv_search_exc_resume="none required" | |
7f2749d4 | 9031 | else |
ba479fd2 NN |
9032 | echo "$as_me: failed program was:" >&5 |
9033 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9034 | ||
ab22c1fa | 9035 | fi |
b61ff9c8 BS |
9036 | rm -f conftest.err conftest.$ac_objext \ |
9037 | conftest$ac_exeext conftest.$ac_ext | |
9038 | if test "$ac_cv_search_exc_resume" = no; then | |
9039 | for ac_lib in exc; do | |
9040 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9041 | cat >conftest.$ac_ext <<_ACEOF | |
9042 | /* confdefs.h. */ | |
9043 | _ACEOF | |
9044 | cat confdefs.h >>conftest.$ac_ext | |
9045 | cat >>conftest.$ac_ext <<_ACEOF | |
9046 | /* end confdefs.h. */ | |
2f41c1d6 | 9047 | |
b61ff9c8 BS |
9048 | /* Override any gcc2 internal prototype to avoid an error. */ |
9049 | #ifdef __cplusplus | |
9050 | extern "C" | |
9051 | #endif | |
9052 | /* We use char because int might match the return type of a gcc2 | |
9053 | builtin and then its argument prototype would still apply. */ | |
9054 | char exc_resume (); | |
9055 | int | |
9056 | main () | |
9057 | { | |
9058 | exc_resume (); | |
9059 | ; | |
9060 | return 0; | |
9061 | } | |
9062 | _ACEOF | |
9063 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9064 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9065 | (eval $ac_link) 2>conftest.er1 | |
9066 | ac_status=$? | |
9067 | grep -v '^ *+' conftest.er1 >conftest.err | |
9068 | rm -f conftest.er1 | |
9069 | cat conftest.err >&5 | |
9070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9071 | (exit $ac_status); } && | |
9072 | { ac_try='test -z "$ac_c_werror_flag" | |
9073 | || test ! -s conftest.err' | |
9074 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9075 | (eval $ac_try) 2>&5 | |
9076 | ac_status=$? | |
9077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9078 | (exit $ac_status); }; } && | |
9079 | { ac_try='test -s conftest$ac_exeext' | |
9080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9081 | (eval $ac_try) 2>&5 | |
9082 | ac_status=$? | |
9083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9084 | (exit $ac_status); }; }; then | |
9085 | ac_cv_search_exc_resume="-l$ac_lib" | |
9086 | break | |
1a4b763e | 9087 | else |
b61ff9c8 BS |
9088 | echo "$as_me: failed program was:" >&5 |
9089 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9090 | ||
9091 | fi | |
9092 | rm -f conftest.err conftest.$ac_objext \ | |
9093 | conftest$ac_exeext conftest.$ac_ext | |
9094 | done | |
b8ec3cc8 | 9095 | fi |
b8ec3cc8 EC |
9096 | LIBS=$ac_func_search_save_LIBS |
9097 | fi | |
b61ff9c8 BS |
9098 | echo "$as_me:$LINENO: result: $ac_cv_search_exc_resume" >&5 |
9099 | echo "${ECHO_T}$ac_cv_search_exc_resume" >&6 | |
9100 | if test "$ac_cv_search_exc_resume" != no; then | |
9101 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
b8ec3cc8 EC |
9102 | |
9103 | fi | |
9104 | ||
dd7f7a6e | 9105 | GNAT_LIBEXC="$LIBS" |
b8ec3cc8 EC |
9106 | LIBS="$save_LIBS" |
9107 | ||
9108 | ||
dd7f7a6e EC |
9109 | # Some systems put ldexp and frexp in libm instead of libc; assume |
9110 | # they're both in the same place. jcf-dump needs them. | |
9111 | save_LIBS="$LIBS" | |
9112 | LIBS= | |
b61ff9c8 BS |
9113 | echo "$as_me:$LINENO: checking for library containing ldexp" >&5 |
9114 | echo $ECHO_N "checking for library containing ldexp... $ECHO_C" >&6 | |
dd7f7a6e | 9115 | if test "${ac_cv_search_ldexp+set}" = set; then |
b8ec3cc8 EC |
9116 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9117 | else | |
dd7f7a6e | 9118 | ac_func_search_save_LIBS=$LIBS |
b61ff9c8 | 9119 | ac_cv_search_ldexp=no |
dd7f7a6e | 9120 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9121 | /* confdefs.h. */ |
9122 | _ACEOF | |
9123 | cat confdefs.h >>conftest.$ac_ext | |
9124 | cat >>conftest.$ac_ext <<_ACEOF | |
9125 | /* end confdefs.h. */ | |
dd7f7a6e | 9126 | |
b61ff9c8 | 9127 | /* Override any gcc2 internal prototype to avoid an error. */ |
dd7f7a6e EC |
9128 | #ifdef __cplusplus |
9129 | extern "C" | |
9130 | #endif | |
b61ff9c8 BS |
9131 | /* We use char because int might match the return type of a gcc2 |
9132 | builtin and then its argument prototype would still apply. */ | |
dd7f7a6e | 9133 | char ldexp (); |
ba479fd2 NN |
9134 | int |
9135 | main () | |
9136 | { | |
b61ff9c8 | 9137 | ldexp (); |
ba479fd2 NN |
9138 | ; |
9139 | return 0; | |
9140 | } | |
9141 | _ACEOF | |
b61ff9c8 BS |
9142 | rm -f conftest.$ac_objext conftest$ac_exeext |
9143 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9144 | (eval $ac_link) 2>conftest.er1 | |
dd7f7a6e EC |
9145 | ac_status=$? |
9146 | grep -v '^ *+' conftest.er1 >conftest.err | |
9147 | rm -f conftest.er1 | |
9148 | cat conftest.err >&5 | |
9149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
9150 | (exit $ac_status); } && |
9151 | { ac_try='test -z "$ac_c_werror_flag" | |
9152 | || test ! -s conftest.err' | |
9153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9154 | (eval $ac_try) 2>&5 | |
9155 | ac_status=$? | |
9156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9157 | (exit $ac_status); }; } && | |
9158 | { ac_try='test -s conftest$ac_exeext' | |
9159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9160 | (eval $ac_try) 2>&5 | |
9161 | ac_status=$? | |
9162 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9163 | (exit $ac_status); }; }; then | |
9164 | ac_cv_search_ldexp="none required" | |
dd7f7a6e EC |
9165 | else |
9166 | echo "$as_me: failed program was:" >&5 | |
9167 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9168 | ||
1a4b763e | 9169 | fi |
b61ff9c8 BS |
9170 | rm -f conftest.err conftest.$ac_objext \ |
9171 | conftest$ac_exeext conftest.$ac_ext | |
9172 | if test "$ac_cv_search_ldexp" = no; then | |
9173 | for ac_lib in m; do | |
9174 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
9175 | cat >conftest.$ac_ext <<_ACEOF | |
9176 | /* confdefs.h. */ | |
9177 | _ACEOF | |
9178 | cat confdefs.h >>conftest.$ac_ext | |
9179 | cat >>conftest.$ac_ext <<_ACEOF | |
9180 | /* end confdefs.h. */ | |
2f41c1d6 | 9181 | |
b61ff9c8 BS |
9182 | /* Override any gcc2 internal prototype to avoid an error. */ |
9183 | #ifdef __cplusplus | |
9184 | extern "C" | |
9185 | #endif | |
9186 | /* We use char because int might match the return type of a gcc2 | |
9187 | builtin and then its argument prototype would still apply. */ | |
9188 | char ldexp (); | |
9189 | int | |
9190 | main () | |
9191 | { | |
9192 | ldexp (); | |
9193 | ; | |
9194 | return 0; | |
9195 | } | |
9196 | _ACEOF | |
9197 | rm -f conftest.$ac_objext conftest$ac_exeext | |
9198 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
9199 | (eval $ac_link) 2>conftest.er1 | |
9200 | ac_status=$? | |
9201 | grep -v '^ *+' conftest.er1 >conftest.err | |
9202 | rm -f conftest.er1 | |
9203 | cat conftest.err >&5 | |
9204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9205 | (exit $ac_status); } && | |
9206 | { ac_try='test -z "$ac_c_werror_flag" | |
9207 | || test ! -s conftest.err' | |
9208 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9209 | (eval $ac_try) 2>&5 | |
9210 | ac_status=$? | |
9211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9212 | (exit $ac_status); }; } && | |
9213 | { ac_try='test -s conftest$ac_exeext' | |
9214 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9215 | (eval $ac_try) 2>&5 | |
9216 | ac_status=$? | |
9217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9218 | (exit $ac_status); }; }; then | |
9219 | ac_cv_search_ldexp="-l$ac_lib" | |
9220 | break | |
1a4b763e | 9221 | else |
b61ff9c8 BS |
9222 | echo "$as_me: failed program was:" >&5 |
9223 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9224 | ||
9225 | fi | |
9226 | rm -f conftest.err conftest.$ac_objext \ | |
9227 | conftest$ac_exeext conftest.$ac_ext | |
9228 | done | |
dd7f7a6e EC |
9229 | fi |
9230 | LIBS=$ac_func_search_save_LIBS | |
9231 | fi | |
b61ff9c8 BS |
9232 | echo "$as_me:$LINENO: result: $ac_cv_search_ldexp" >&5 |
9233 | echo "${ECHO_T}$ac_cv_search_ldexp" >&6 | |
9234 | if test "$ac_cv_search_ldexp" != no; then | |
9235 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
dd7f7a6e EC |
9236 | |
9237 | fi | |
9238 | ||
9239 | LDEXP_LIB="$LIBS" | |
9240 | LIBS="$save_LIBS" | |
9241 | ||
9242 | ||
9243 | # Use <inttypes.h> only if it exists, | |
9244 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
b61ff9c8 BS |
9245 | echo "$as_me:$LINENO: checking for inttypes.h" >&5 |
9246 | echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 | |
dd7f7a6e EC |
9247 | if test "${gcc_cv_header_inttypes_h+set}" = set; then |
9248 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9249 | else | |
9250 | cat >conftest.$ac_ext <<_ACEOF | |
9251 | /* confdefs.h. */ | |
9252 | _ACEOF | |
9253 | cat confdefs.h >>conftest.$ac_ext | |
9254 | cat >>conftest.$ac_ext <<_ACEOF | |
9255 | /* end confdefs.h. */ | |
9256 | #include <sys/types.h> | |
9257 | #include <inttypes.h> | |
9258 | int | |
9259 | main () | |
9260 | { | |
9261 | intmax_t i = -1; | |
9262 | ; | |
9263 | return 0; | |
9264 | } | |
9265 | _ACEOF | |
9266 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
9267 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
9268 | (eval $ac_compile) 2>conftest.er1 | |
dd7f7a6e EC |
9269 | ac_status=$? |
9270 | grep -v '^ *+' conftest.er1 >conftest.err | |
9271 | rm -f conftest.er1 | |
9272 | cat conftest.err >&5 | |
9273 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
9274 | (exit $ac_status); } && |
9275 | { ac_try='test -z "$ac_c_werror_flag" | |
9276 | || test ! -s conftest.err' | |
9277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9278 | (eval $ac_try) 2>&5 | |
9279 | ac_status=$? | |
9280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9281 | (exit $ac_status); }; } && | |
9282 | { ac_try='test -s conftest.$ac_objext' | |
9283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9284 | (eval $ac_try) 2>&5 | |
9285 | ac_status=$? | |
9286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9287 | (exit $ac_status); }; }; then | |
dd7f7a6e EC |
9288 | gcc_cv_header_inttypes_h=yes |
9289 | else | |
9290 | echo "$as_me: failed program was:" >&5 | |
9291 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9292 | ||
b61ff9c8 | 9293 | gcc_cv_header_inttypes_h=no |
dd7f7a6e | 9294 | fi |
b61ff9c8 | 9295 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
dd7f7a6e EC |
9296 | fi |
9297 | ||
b61ff9c8 BS |
9298 | echo "$as_me:$LINENO: result: $gcc_cv_header_inttypes_h" >&5 |
9299 | echo "${ECHO_T}$gcc_cv_header_inttypes_h" >&6 | |
dd7f7a6e EC |
9300 | if test $gcc_cv_header_inttypes_h = yes; then |
9301 | ||
9302 | cat >>confdefs.h <<\_ACEOF | |
9303 | #define HAVE_INTTYPES_H 1 | |
9304 | _ACEOF | |
9305 | ||
0056a9b5 | 9306 | fi |
956d6950 | 9307 | |
c149cc37 | 9308 | |
ba479fd2 NN |
9309 | |
9310 | ||
9311 | ||
9312 | ||
9313 | ||
9314 | ||
9315 | ||
9316 | ||
9317 | ||
9318 | ||
9319 | ||
9320 | ||
9321 | ||
9322 | ||
9323 | ||
9324 | ||
0d667716 KG |
9325 | |
9326 | ||
9327 | ||
9328 | ||
9329 | ||
9330 | ||
9331 | ||
9332 | ||
9333 | ||
9334 | ||
9335 | ||
9336 | ||
ba479fd2 NN |
9337 | |
9338 | ||
9339 | ||
9340 | ||
9341 | ||
9342 | ||
9343 | ||
9344 | ||
52a6edcc | 9345 | for ac_func in times clock kill getrlimit setrlimit atoll atoq \ |
0d667716 KG |
9346 | sysconf strsignal getrusage nl_langinfo scandir alphasort \ |
9347 | gettimeofday mbstowcs wcswidth mmap mincore setlocale \ | |
9348 | 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 | 9349 | do |
ba479fd2 | 9350 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` |
b61ff9c8 BS |
9351 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
9352 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
9353 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
ba479fd2 NN |
9354 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
9355 | else | |
9356 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9357 | /* confdefs.h. */ |
9358 | _ACEOF | |
9359 | cat confdefs.h >>conftest.$ac_ext | |
9360 | cat >>conftest.$ac_ext <<_ACEOF | |
9361 | /* end confdefs.h. */ | |
86da66b5 HPN |
9362 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
9363 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9364 | #define $ac_func innocuous_$ac_func | |
9365 | ||
956d6950 | 9366 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
9367 | which can conflict with char $ac_func (); below. |
9368 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9369 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 9370 | |
ba479fd2 NN |
9371 | #ifdef __STDC__ |
9372 | # include <limits.h> | |
9373 | #else | |
9374 | # include <assert.h> | |
9375 | #endif | |
86da66b5 HPN |
9376 | |
9377 | #undef $ac_func | |
9378 | ||
b61ff9c8 | 9379 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
9380 | #ifdef __cplusplus |
9381 | extern "C" | |
b61ff9c8 | 9382 | { |
ba479fd2 | 9383 | #endif |
b61ff9c8 BS |
9384 | /* We use char because int might match the return type of a gcc2 |
9385 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 | 9386 | char $ac_func (); |
956d6950 JL |
9387 | /* The GNU C library defines this for functions which it implements |
9388 | to always fail with ENOSYS. Some functions are actually named | |
9389 | something starting with __ and the normal name is an alias. */ | |
b61ff9c8 | 9390 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
956d6950 | 9391 | choke me |
b61ff9c8 BS |
9392 | #else |
9393 | char (*f) () = $ac_func; | |
9394 | #endif | |
9395 | #ifdef __cplusplus | |
9396 | } | |
956d6950 JL |
9397 | #endif |
9398 | ||
ba479fd2 NN |
9399 | int |
9400 | main () | |
9401 | { | |
b61ff9c8 | 9402 | return f != $ac_func; |
ba479fd2 NN |
9403 | ; |
9404 | return 0; | |
9405 | } | |
9406 | _ACEOF | |
9407 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
9408 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9409 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 9410 | ac_status=$? |
86da66b5 HPN |
9411 | grep -v '^ *+' conftest.er1 >conftest.err |
9412 | rm -f conftest.er1 | |
9413 | cat conftest.err >&5 | |
ba479fd2 | 9414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
9415 | (exit $ac_status); } && |
9416 | { ac_try='test -z "$ac_c_werror_flag" | |
9417 | || test ! -s conftest.err' | |
9418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9419 | (eval $ac_try) 2>&5 | |
9420 | ac_status=$? | |
9421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9422 | (exit $ac_status); }; } && | |
9423 | { ac_try='test -s conftest$ac_exeext' | |
9424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9425 | (eval $ac_try) 2>&5 | |
9426 | ac_status=$? | |
9427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9428 | (exit $ac_status); }; }; then | |
ba479fd2 NN |
9429 | eval "$as_ac_var=yes" |
9430 | else | |
9431 | echo "$as_me: failed program was:" >&5 | |
9432 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9433 | ||
b61ff9c8 | 9434 | eval "$as_ac_var=no" |
ba479fd2 | 9435 | fi |
b61ff9c8 | 9436 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 9437 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 9438 | fi |
b61ff9c8 BS |
9439 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
9440 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
ba479fd2 NN |
9441 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
9442 | cat >>confdefs.h <<_ACEOF | |
9443 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
9444 | _ACEOF | |
956d6950 | 9445 | |
956d6950 JL |
9446 | fi |
9447 | done | |
9448 | ||
6885fc87 | 9449 | |
39f6c4c8 | 9450 | if test x$ac_cv_func_mbstowcs = xyes; then |
b61ff9c8 BS |
9451 | echo "$as_me:$LINENO: checking whether mbstowcs works" >&5 |
9452 | echo $ECHO_N "checking whether mbstowcs works... $ECHO_C" >&6 | |
ba479fd2 NN |
9453 | if test "${gcc_cv_func_mbstowcs_works+set}" = set; then |
9454 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
39f6c4c8 KW |
9455 | else |
9456 | if test "$cross_compiling" = yes; then | |
9457 | gcc_cv_func_mbstowcs_works=yes | |
9458 | else | |
ba479fd2 | 9459 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9460 | /* confdefs.h. */ |
9461 | _ACEOF | |
9462 | cat confdefs.h >>conftest.$ac_ext | |
9463 | cat >>conftest.$ac_ext <<_ACEOF | |
9464 | /* end confdefs.h. */ | |
39f6c4c8 KW |
9465 | #include <stdlib.h> |
9466 | int main() | |
9467 | { | |
9468 | mbstowcs(0, "", 0); | |
9469 | return 0; | |
9470 | } | |
ba479fd2 NN |
9471 | _ACEOF |
9472 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
9473 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9474 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
9475 | ac_status=$? |
9476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9477 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
9478 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9479 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
9480 | ac_status=$? |
9481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9482 | (exit $ac_status); }; }; then | |
39f6c4c8 KW |
9483 | gcc_cv_func_mbstowcs_works=yes |
9484 | else | |
ba479fd2 NN |
9485 | echo "$as_me: program exited with status $ac_status" >&5 |
9486 | echo "$as_me: failed program was:" >&5 | |
9487 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9488 | ||
9489 | ( exit $ac_status ) | |
9490 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 9491 | fi |
b61ff9c8 | 9492 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
39f6c4c8 | 9493 | fi |
39f6c4c8 | 9494 | fi |
b61ff9c8 BS |
9495 | echo "$as_me:$LINENO: result: $gcc_cv_func_mbstowcs_works" >&5 |
9496 | echo "${ECHO_T}$gcc_cv_func_mbstowcs_works" >&6 | |
63cf211a | 9497 | if test x$gcc_cv_func_mbstowcs_works = xyes; then |
ba479fd2 NN |
9498 | |
9499 | cat >>confdefs.h <<\_ACEOF | |
39f6c4c8 | 9500 | #define HAVE_WORKING_MBSTOWCS 1 |
ba479fd2 | 9501 | _ACEOF |
39f6c4c8 KW |
9502 | |
9503 | fi | |
9504 | fi | |
9505 | ||
b61ff9c8 BS |
9506 | echo "$as_me:$LINENO: checking for ssize_t" >&5 |
9507 | echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 | |
ba479fd2 NN |
9508 | if test "${ac_cv_type_ssize_t+set}" = set; then |
9509 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
63cf211a | 9510 | else |
ba479fd2 | 9511 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9512 | /* confdefs.h. */ |
9513 | _ACEOF | |
9514 | cat confdefs.h >>conftest.$ac_ext | |
9515 | cat >>conftest.$ac_ext <<_ACEOF | |
9516 | /* end confdefs.h. */ | |
8b4fc07a NN |
9517 | $ac_includes_default |
9518 | int | |
9519 | main () | |
9520 | { | |
b61ff9c8 | 9521 | if ((ssize_t *) 0) |
8b4fc07a | 9522 | return 0; |
b61ff9c8 | 9523 | if (sizeof (ssize_t)) |
8b4fc07a NN |
9524 | return 0; |
9525 | ; | |
9526 | return 0; | |
9527 | } | |
ba479fd2 | 9528 | _ACEOF |
8b4fc07a | 9529 | rm -f conftest.$ac_objext |
b61ff9c8 BS |
9530 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
9531 | (eval $ac_compile) 2>conftest.er1 | |
8b4fc07a | 9532 | ac_status=$? |
86da66b5 HPN |
9533 | grep -v '^ *+' conftest.er1 >conftest.err |
9534 | rm -f conftest.er1 | |
9535 | cat conftest.err >&5 | |
8b4fc07a | 9536 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
9537 | (exit $ac_status); } && |
9538 | { ac_try='test -z "$ac_c_werror_flag" | |
9539 | || test ! -s conftest.err' | |
9540 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9541 | (eval $ac_try) 2>&5 | |
9542 | ac_status=$? | |
9543 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9544 | (exit $ac_status); }; } && | |
9545 | { ac_try='test -s conftest.$ac_objext' | |
9546 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9547 | (eval $ac_try) 2>&5 | |
9548 | ac_status=$? | |
9549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9550 | (exit $ac_status); }; }; then | |
cb65112a | 9551 | ac_cv_type_ssize_t=yes |
f12bc141 | 9552 | else |
8b4fc07a NN |
9553 | echo "$as_me: failed program was:" >&5 |
9554 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 9555 | |
b61ff9c8 | 9556 | ac_cv_type_ssize_t=no |
8b4fc07a | 9557 | fi |
b61ff9c8 | 9558 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 9559 | fi |
b61ff9c8 BS |
9560 | echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 |
9561 | echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 | |
8b4fc07a NN |
9562 | if test $ac_cv_type_ssize_t = yes; then |
9563 | : | |
9564 | else | |
ba479fd2 | 9565 | |
8b4fc07a | 9566 | cat >>confdefs.h <<_ACEOF |
f12bc141 | 9567 | #define ssize_t int |
ba479fd2 | 9568 | _ACEOF |
f12bc141 ZW |
9569 | |
9570 | fi | |
9571 | ||
0b9d02c6 | 9572 | |
e256b8b6 DA |
9573 | # Try to determine the array type of the second argument of getgroups |
9574 | # for the target system (int or gid_t). | |
b61ff9c8 BS |
9575 | echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 |
9576 | echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 | |
ba479fd2 NN |
9577 | if test "${ac_cv_type_uid_t+set}" = set; then |
9578 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9579 | else | |
9580 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9581 | /* confdefs.h. */ |
9582 | _ACEOF | |
9583 | cat confdefs.h >>conftest.$ac_ext | |
9584 | cat >>conftest.$ac_ext <<_ACEOF | |
9585 | /* end confdefs.h. */ | |
e256b8b6 | 9586 | #include <sys/types.h> |
ba479fd2 NN |
9587 | |
9588 | _ACEOF | |
e256b8b6 | 9589 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9590 | $EGREP "uid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9591 | ac_cv_type_uid_t=yes |
9592 | else | |
e256b8b6 DA |
9593 | ac_cv_type_uid_t=no |
9594 | fi | |
9595 | rm -f conftest* | |
9596 | ||
9597 | fi | |
b61ff9c8 BS |
9598 | echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 |
9599 | echo "${ECHO_T}$ac_cv_type_uid_t" >&6 | |
63cf211a | 9600 | if test $ac_cv_type_uid_t = no; then |
ba479fd2 NN |
9601 | |
9602 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9603 | #define uid_t int |
ba479fd2 | 9604 | _ACEOF |
cafe096b | 9605 | |
ba479fd2 NN |
9606 | |
9607 | cat >>confdefs.h <<\_ACEOF | |
e256b8b6 | 9608 | #define gid_t int |
ba479fd2 | 9609 | _ACEOF |
e256b8b6 DA |
9610 | |
9611 | fi | |
9612 | ||
b61ff9c8 BS |
9613 | echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 |
9614 | echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 | |
ba479fd2 NN |
9615 | if test "${ac_cv_type_getgroups+set}" = set; then |
9616 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e256b8b6 DA |
9617 | else |
9618 | if test "$cross_compiling" = yes; then | |
9619 | ac_cv_type_getgroups=cross | |
9620 | else | |
ba479fd2 | 9621 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9622 | /* confdefs.h. */ |
9623 | _ACEOF | |
9624 | cat confdefs.h >>conftest.$ac_ext | |
9625 | cat >>conftest.$ac_ext <<_ACEOF | |
9626 | /* end confdefs.h. */ | |
e256b8b6 | 9627 | /* Thanks to Mike Rendell for this test. */ |
b61ff9c8 | 9628 | #include <sys/types.h> |
e256b8b6 DA |
9629 | #define NGID 256 |
9630 | #undef MAX | |
9631 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
ba479fd2 NN |
9632 | |
9633 | int | |
9634 | main () | |
e256b8b6 DA |
9635 | { |
9636 | gid_t gidset[NGID]; | |
9637 | int i, n; | |
b61ff9c8 | 9638 | union { gid_t gval; long lval; } val; |
e256b8b6 DA |
9639 | |
9640 | val.lval = -1; | |
9641 | for (i = 0; i < NGID; i++) | |
9642 | gidset[i] = val.gval; | |
9643 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
86da66b5 | 9644 | gidset); |
e256b8b6 | 9645 | /* Exit non-zero if getgroups seems to require an array of ints. This |
b61ff9c8 BS |
9646 | happens when gid_t is short but getgroups modifies an array of ints. */ |
9647 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
63cf211a | 9648 | } |
ba479fd2 NN |
9649 | _ACEOF |
9650 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
9651 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9652 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
9653 | ac_status=$? |
9654 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9655 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
9656 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
9657 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
9658 | ac_status=$? |
9659 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9660 | (exit $ac_status); }; }; then | |
9661 | ac_cv_type_getgroups=gid_t | |
63cf211a | 9662 | else |
ba479fd2 NN |
9663 | echo "$as_me: program exited with status $ac_status" >&5 |
9664 | echo "$as_me: failed program was:" >&5 | |
9665 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9666 | ||
9667 | ( exit $ac_status ) | |
9668 | ac_cv_type_getgroups=int | |
e256b8b6 | 9669 | fi |
b61ff9c8 | 9670 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
e256b8b6 | 9671 | fi |
e256b8b6 | 9672 | if test $ac_cv_type_getgroups = cross; then |
ba479fd2 | 9673 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
9674 | /* confdefs.h. */ |
9675 | _ACEOF | |
9676 | cat confdefs.h >>conftest.$ac_ext | |
9677 | cat >>conftest.$ac_ext <<_ACEOF | |
9678 | /* end confdefs.h. */ | |
e256b8b6 | 9679 | #include <unistd.h> |
ba479fd2 NN |
9680 | |
9681 | _ACEOF | |
e256b8b6 | 9682 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
ba479fd2 | 9683 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
e256b8b6 DA |
9684 | ac_cv_type_getgroups=gid_t |
9685 | else | |
e256b8b6 DA |
9686 | ac_cv_type_getgroups=int |
9687 | fi | |
9688 | rm -f conftest* | |
9689 | ||
9690 | fi | |
9691 | fi | |
b61ff9c8 BS |
9692 | echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 |
9693 | echo "${ECHO_T}$ac_cv_type_getgroups" >&6 | |
e256b8b6 | 9694 | |
ba479fd2 | 9695 | cat >>confdefs.h <<_ACEOF |
e256b8b6 | 9696 | #define GETGROUPS_T $ac_cv_type_getgroups |
ba479fd2 | 9697 | _ACEOF |
e256b8b6 DA |
9698 | |
9699 | ||
9700 | if test "${target}" = "${build}"; then | |
9701 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
9702 | else | |
9703 | case "${target}" in | |
9704 | # This condition may need some tweaking. It should include all | |
9705 | # targets where the array type of the second argument of getgroups | |
9706 | # is int and the type of gid_t is not equivalent to int. | |
9707 | *-*-sunos* | *-*-ultrix*) | |
9708 | TARGET_GETGROUPS_T=int | |
9709 | ;; | |
9710 | *) | |
9711 | TARGET_GETGROUPS_T=gid_t | |
9712 | ;; | |
9713 | esac | |
9714 | fi | |
9715 | ||
9716 | ||
3b0727a0 | 9717 | |
b61ff9c8 BS |
9718 | echo "$as_me:$LINENO: checking for sys/mman.h" >&5 |
9719 | echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6 | |
3b0727a0 MR |
9720 | if test "${ac_cv_header_sys_mman_h+set}" = set; then |
9721 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
0f57bf40 | 9722 | else |
18fc9bd4 | 9723 | cat >conftest.$ac_ext <<_ACEOF |
3b0727a0 MR |
9724 | /* confdefs.h. */ |
9725 | _ACEOF | |
9726 | cat confdefs.h >>conftest.$ac_ext | |
9727 | cat >>conftest.$ac_ext <<_ACEOF | |
9728 | /* end confdefs.h. */ | |
9729 | #include <sys/mman.h> | |
9730 | _ACEOF | |
b61ff9c8 BS |
9731 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
9732 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3b0727a0 MR |
9733 | ac_status=$? |
9734 | grep -v '^ *+' conftest.er1 >conftest.err | |
9735 | rm -f conftest.er1 | |
9736 | cat conftest.err >&5 | |
9737 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
9738 | (exit $ac_status); } >/dev/null; then |
9739 | if test -s conftest.err; then | |
9740 | ac_cpp_err=$ac_c_preproc_warn_flag | |
9741 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
9742 | else | |
9743 | ac_cpp_err= | |
9744 | fi | |
9745 | else | |
9746 | ac_cpp_err=yes | |
9747 | fi | |
9748 | if test -z "$ac_cpp_err"; then | |
9749 | ac_cv_header_sys_mman_h=yes | |
9750 | else | |
3b0727a0 MR |
9751 | echo "$as_me: failed program was:" >&5 |
9752 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9753 | ||
18fc9bd4 | 9754 | ac_cv_header_sys_mman_h=no |
3b0727a0 MR |
9755 | fi |
9756 | rm -f conftest.err conftest.$ac_ext | |
9757 | fi | |
b61ff9c8 BS |
9758 | echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 |
9759 | echo "${ECHO_T}$ac_cv_header_sys_mman_h" >&6 | |
3b0727a0 MR |
9760 | if test $ac_cv_header_sys_mman_h = yes; then |
9761 | gcc_header_sys_mman_h=yes | |
9762 | else | |
9763 | gcc_header_sys_mman_h=no | |
9764 | fi | |
9765 | ||
b61ff9c8 BS |
9766 | echo "$as_me:$LINENO: checking for mmap" >&5 |
9767 | echo $ECHO_N "checking for mmap... $ECHO_C" >&6 | |
3b0727a0 MR |
9768 | if test "${ac_cv_func_mmap+set}" = set; then |
9769 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9770 | else | |
9771 | cat >conftest.$ac_ext <<_ACEOF | |
9772 | /* confdefs.h. */ | |
9773 | _ACEOF | |
9774 | cat confdefs.h >>conftest.$ac_ext | |
9775 | cat >>conftest.$ac_ext <<_ACEOF | |
9776 | /* end confdefs.h. */ | |
9777 | /* Define mmap to an innocuous variant, in case <limits.h> declares mmap. | |
9778 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
9779 | #define mmap innocuous_mmap | |
9780 | ||
9781 | /* System header to define __stub macros and hopefully few prototypes, | |
9782 | which can conflict with char mmap (); below. | |
9783 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
9784 | <limits.h> exists even on freestanding compilers. */ | |
9785 | ||
9786 | #ifdef __STDC__ | |
9787 | # include <limits.h> | |
9788 | #else | |
9789 | # include <assert.h> | |
9790 | #endif | |
9791 | ||
9792 | #undef mmap | |
9793 | ||
b61ff9c8 | 9794 | /* Override any gcc2 internal prototype to avoid an error. */ |
3b0727a0 MR |
9795 | #ifdef __cplusplus |
9796 | extern "C" | |
b61ff9c8 | 9797 | { |
3b0727a0 | 9798 | #endif |
b61ff9c8 BS |
9799 | /* We use char because int might match the return type of a gcc2 |
9800 | builtin and then its argument prototype would still apply. */ | |
3b0727a0 MR |
9801 | char mmap (); |
9802 | /* The GNU C library defines this for functions which it implements | |
9803 | to always fail with ENOSYS. Some functions are actually named | |
9804 | something starting with __ and the normal name is an alias. */ | |
b61ff9c8 | 9805 | #if defined (__stub_mmap) || defined (__stub___mmap) |
3b0727a0 | 9806 | choke me |
b61ff9c8 BS |
9807 | #else |
9808 | char (*f) () = mmap; | |
9809 | #endif | |
9810 | #ifdef __cplusplus | |
9811 | } | |
3b0727a0 MR |
9812 | #endif |
9813 | ||
9814 | int | |
9815 | main () | |
9816 | { | |
b61ff9c8 | 9817 | return f != mmap; |
3b0727a0 MR |
9818 | ; |
9819 | return 0; | |
9820 | } | |
9821 | _ACEOF | |
9822 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
9823 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
9824 | (eval $ac_link) 2>conftest.er1 | |
3b0727a0 MR |
9825 | ac_status=$? |
9826 | grep -v '^ *+' conftest.er1 >conftest.err | |
9827 | rm -f conftest.er1 | |
9828 | cat conftest.err >&5 | |
9829 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
9830 | (exit $ac_status); } && |
9831 | { ac_try='test -z "$ac_c_werror_flag" | |
9832 | || test ! -s conftest.err' | |
9833 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9834 | (eval $ac_try) 2>&5 | |
9835 | ac_status=$? | |
9836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9837 | (exit $ac_status); }; } && | |
9838 | { ac_try='test -s conftest$ac_exeext' | |
9839 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9840 | (eval $ac_try) 2>&5 | |
9841 | ac_status=$? | |
9842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9843 | (exit $ac_status); }; }; then | |
8b1f719a PB |
9844 | ac_cv_func_mmap=yes |
9845 | else | |
9846 | echo "$as_me: failed program was:" >&5 | |
9847 | sed 's/^/| /' conftest.$ac_ext >&5 | |
a6ccdbab | 9848 | |
b61ff9c8 | 9849 | ac_cv_func_mmap=no |
8b1f719a | 9850 | fi |
b61ff9c8 | 9851 | rm -f conftest.err conftest.$ac_objext \ |
3b0727a0 MR |
9852 | conftest$ac_exeext conftest.$ac_ext |
9853 | fi | |
b61ff9c8 BS |
9854 | echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 |
9855 | echo "${ECHO_T}$ac_cv_func_mmap" >&6 | |
3b0727a0 MR |
9856 | if test $ac_cv_func_mmap = yes; then |
9857 | gcc_func_mmap=yes | |
9858 | else | |
9859 | gcc_func_mmap=no | |
9860 | fi | |
9861 | ||
9862 | if test "$gcc_header_sys_mman_h" != yes \ | |
9863 | || test "$gcc_func_mmap" != yes; then | |
1072ec3f ZW |
9864 | gcc_cv_func_mmap_file=no |
9865 | gcc_cv_func_mmap_dev_zero=no | |
9866 | gcc_cv_func_mmap_anon=no | |
9867 | else | |
b61ff9c8 BS |
9868 | echo "$as_me:$LINENO: checking whether read-only mmap of a plain file works" >&5 |
9869 | echo $ECHO_N "checking whether read-only mmap of a plain file works... $ECHO_C" >&6 | |
ba479fd2 NN |
9870 | if test "${gcc_cv_func_mmap_file+set}" = set; then |
9871 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f | 9872 | else |
ba479fd2 | 9873 | # Add a system to this blacklist if |
1072ec3f ZW |
9874 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a |
9875 | # memory area containing the same data that you'd get if you applied | |
9876 | # read() to the same fd. The only system known to have a problem here | |
9877 | # is VMS, where text files have record structure. | |
9878 | case "$host_os" in | |
ba479fd2 | 9879 | vms* | ultrix*) |
1072ec3f ZW |
9880 | gcc_cv_func_mmap_file=no ;; |
9881 | *) | |
9882 | gcc_cv_func_mmap_file=yes;; | |
9883 | esac | |
9884 | fi | |
b61ff9c8 BS |
9885 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_file" >&5 |
9886 | echo "${ECHO_T}$gcc_cv_func_mmap_file" >&6 | |
9887 | echo "$as_me:$LINENO: checking whether mmap from /dev/zero works" >&5 | |
9888 | echo $ECHO_N "checking whether mmap from /dev/zero works... $ECHO_C" >&6 | |
ba479fd2 NN |
9889 | if test "${gcc_cv_func_mmap_dev_zero+set}" = set; then |
9890 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9891 | else |
9892 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
9893 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
9894 | # zeroed pages with both the following properties: | |
9895 | # 1. If you map N consecutive pages in with one call, and then | |
9896 | # unmap any subset of those pages, the pages that were not | |
9897 | # explicitly unmapped remain accessible. | |
9898 | # 2. If you map two adjacent blocks of memory and then unmap them | |
9899 | # both at once, they must both go away. | |
9900 | # Systems known to be in this category are Windows (all variants), | |
9901 | # VMS, and Darwin. | |
9902 | case "$host_os" in | |
2ce240d3 | 9903 | vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) |
1072ec3f ZW |
9904 | gcc_cv_func_mmap_dev_zero=no ;; |
9905 | *) | |
9906 | gcc_cv_func_mmap_dev_zero=yes;; | |
9907 | esac | |
9908 | fi | |
b61ff9c8 BS |
9909 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_dev_zero" >&5 |
9910 | echo "${ECHO_T}$gcc_cv_func_mmap_dev_zero" >&6 | |
1072ec3f ZW |
9911 | |
9912 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
b61ff9c8 BS |
9913 | echo "$as_me:$LINENO: checking for MAP_ANON(YMOUS)" >&5 |
9914 | echo $ECHO_N "checking for MAP_ANON(YMOUS)... $ECHO_C" >&6 | |
ba479fd2 NN |
9915 | if test "${gcc_cv_decl_map_anon+set}" = set; then |
9916 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
9917 | else | |
9918 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
9919 | /* confdefs.h. */ |
9920 | _ACEOF | |
9921 | cat confdefs.h >>conftest.$ac_ext | |
9922 | cat >>conftest.$ac_ext <<_ACEOF | |
9923 | /* end confdefs.h. */ | |
1072ec3f ZW |
9924 | #include <sys/types.h> |
9925 | #include <sys/mman.h> | |
9926 | #include <unistd.h> | |
9927 | ||
9928 | #ifndef MAP_ANONYMOUS | |
9929 | #define MAP_ANONYMOUS MAP_ANON | |
9930 | #endif | |
9931 | ||
ba479fd2 NN |
9932 | int |
9933 | main () | |
9934 | { | |
1072ec3f | 9935 | int n = MAP_ANONYMOUS; |
ba479fd2 NN |
9936 | ; |
9937 | return 0; | |
9938 | } | |
9939 | _ACEOF | |
9940 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
9941 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
9942 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 9943 | ac_status=$? |
86da66b5 HPN |
9944 | grep -v '^ *+' conftest.er1 >conftest.err |
9945 | rm -f conftest.er1 | |
9946 | cat conftest.err >&5 | |
ba479fd2 | 9947 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
9948 | (exit $ac_status); } && |
9949 | { ac_try='test -z "$ac_c_werror_flag" | |
9950 | || test ! -s conftest.err' | |
9951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9952 | (eval $ac_try) 2>&5 | |
9953 | ac_status=$? | |
9954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9955 | (exit $ac_status); }; } && | |
9956 | { ac_try='test -s conftest.$ac_objext' | |
9957 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
9958 | (eval $ac_try) 2>&5 | |
9959 | ac_status=$? | |
9960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
9961 | (exit $ac_status); }; }; then | |
1072ec3f ZW |
9962 | gcc_cv_decl_map_anon=yes |
9963 | else | |
ba479fd2 NN |
9964 | echo "$as_me: failed program was:" >&5 |
9965 | sed 's/^/| /' conftest.$ac_ext >&5 | |
9966 | ||
b61ff9c8 | 9967 | gcc_cv_decl_map_anon=no |
1072ec3f | 9968 | fi |
b61ff9c8 | 9969 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
1072ec3f | 9970 | fi |
b61ff9c8 BS |
9971 | echo "$as_me:$LINENO: result: $gcc_cv_decl_map_anon" >&5 |
9972 | echo "${ECHO_T}$gcc_cv_decl_map_anon" >&6 | |
1072ec3f ZW |
9973 | |
9974 | if test $gcc_cv_decl_map_anon = no; then | |
9975 | gcc_cv_func_mmap_anon=no | |
9976 | else | |
b61ff9c8 BS |
9977 | echo "$as_me:$LINENO: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
9978 | echo $ECHO_N "checking whether mmap with MAP_ANON(YMOUS) works... $ECHO_C" >&6 | |
ba479fd2 NN |
9979 | if test "${gcc_cv_func_mmap_anon+set}" = set; then |
9980 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1072ec3f ZW |
9981 | else |
9982 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
9983 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
9984 | # doesn't give anonymous zeroed pages with the same properties listed | |
9985 | # above for use of /dev/zero. | |
9986 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
9987 | case "$host_os" in | |
9988 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
9989 | gcc_cv_func_mmap_anon=no ;; | |
9990 | *) | |
9991 | gcc_cv_func_mmap_anon=yes;; | |
9992 | esac | |
9993 | fi | |
b61ff9c8 BS |
9994 | echo "$as_me:$LINENO: result: $gcc_cv_func_mmap_anon" >&5 |
9995 | echo "${ECHO_T}$gcc_cv_func_mmap_anon" >&6 | |
1072ec3f ZW |
9996 | fi |
9997 | fi | |
9998 | ||
9999 | if test $gcc_cv_func_mmap_file = yes; then | |
ba479fd2 NN |
10000 | |
10001 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10002 | #define HAVE_MMAP_FILE 1 |
ba479fd2 | 10003 | _ACEOF |
1072ec3f ZW |
10004 | |
10005 | fi | |
10006 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
ba479fd2 NN |
10007 | |
10008 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10009 | #define HAVE_MMAP_DEV_ZERO 1 |
ba479fd2 | 10010 | _ACEOF |
1072ec3f ZW |
10011 | |
10012 | fi | |
10013 | if test $gcc_cv_func_mmap_anon = yes; then | |
ba479fd2 NN |
10014 | |
10015 | cat >>confdefs.h <<\_ACEOF | |
1072ec3f | 10016 | #define HAVE_MMAP_ANON 1 |
ba479fd2 | 10017 | _ACEOF |
1072ec3f ZW |
10018 | |
10019 | fi | |
10020 | ||
b27d2bd5 MK |
10021 | |
10022 | case "${host}" in | |
ee262b6f | 10023 | *-*-*vms*) |
ba479fd2 | 10024 | # Under VMS, vfork works very differently than on Unix. The standard test |
ee262b6f DR |
10025 | # won't work, and it isn't easily adaptable. It makes more sense to |
10026 | # just force it. | |
10027 | ac_cv_func_vfork_works=yes | |
10028 | ;; | |
b27d2bd5 | 10029 | esac |
b61ff9c8 BS |
10030 | echo "$as_me:$LINENO: checking for pid_t" >&5 |
10031 | echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 | |
ba479fd2 NN |
10032 | if test "${ac_cv_type_pid_t+set}" = set; then |
10033 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10034 | else | |
10035 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10036 | /* confdefs.h. */ |
10037 | _ACEOF | |
10038 | cat confdefs.h >>conftest.$ac_ext | |
10039 | cat >>conftest.$ac_ext <<_ACEOF | |
10040 | /* end confdefs.h. */ | |
10041 | $ac_includes_default | |
10042 | int | |
10043 | main () | |
10044 | { | |
b61ff9c8 | 10045 | if ((pid_t *) 0) |
ba479fd2 | 10046 | return 0; |
b61ff9c8 | 10047 | if (sizeof (pid_t)) |
ba479fd2 NN |
10048 | return 0; |
10049 | ; | |
10050 | return 0; | |
10051 | } | |
10052 | _ACEOF | |
10053 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
10054 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
10055 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 10056 | ac_status=$? |
86da66b5 HPN |
10057 | grep -v '^ *+' conftest.er1 >conftest.err |
10058 | rm -f conftest.er1 | |
10059 | cat conftest.err >&5 | |
ba479fd2 | 10060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
10061 | (exit $ac_status); } && |
10062 | { ac_try='test -z "$ac_c_werror_flag" | |
10063 | || test ! -s conftest.err' | |
10064 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10065 | (eval $ac_try) 2>&5 | |
10066 | ac_status=$? | |
10067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10068 | (exit $ac_status); }; } && | |
10069 | { ac_try='test -s conftest.$ac_objext' | |
10070 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10071 | (eval $ac_try) 2>&5 | |
10072 | ac_status=$? | |
10073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10074 | (exit $ac_status); }; }; then | |
cb65112a | 10075 | ac_cv_type_pid_t=yes |
c375c43b | 10076 | else |
ba479fd2 NN |
10077 | echo "$as_me: failed program was:" >&5 |
10078 | sed 's/^/| /' conftest.$ac_ext >&5 | |
6e3f3080 | 10079 | |
b61ff9c8 | 10080 | ac_cv_type_pid_t=no |
ba479fd2 | 10081 | fi |
b61ff9c8 | 10082 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
63cf211a | 10083 | fi |
b61ff9c8 BS |
10084 | echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 |
10085 | echo "${ECHO_T}$ac_cv_type_pid_t" >&6 | |
ba479fd2 NN |
10086 | if test $ac_cv_type_pid_t = yes; then |
10087 | : | |
10088 | else | |
10089 | ||
10090 | cat >>confdefs.h <<_ACEOF | |
c375c43b | 10091 | #define pid_t int |
ba479fd2 | 10092 | _ACEOF |
c375c43b KG |
10093 | |
10094 | fi | |
10095 | ||
ba479fd2 | 10096 | |
b61ff9c8 BS |
10097 | |
10098 | for ac_header in unistd.h vfork.h | |
ba479fd2 NN |
10099 | do |
10100 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
b61ff9c8 BS |
10101 | echo "$as_me:$LINENO: checking for $ac_header" >&5 |
10102 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
10103 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
ba479fd2 | 10104 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
0f57bf40 | 10105 | else |
18fc9bd4 | 10106 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
10107 | /* confdefs.h. */ |
10108 | _ACEOF | |
10109 | cat confdefs.h >>conftest.$ac_ext | |
10110 | cat >>conftest.$ac_ext <<_ACEOF | |
10111 | /* end confdefs.h. */ | |
10112 | #include <$ac_header> | |
10113 | _ACEOF | |
b61ff9c8 BS |
10114 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 |
10115 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
ba479fd2 NN |
10116 | ac_status=$? |
10117 | grep -v '^ *+' conftest.er1 >conftest.err | |
10118 | rm -f conftest.er1 | |
10119 | cat conftest.err >&5 | |
10120 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
10121 | (exit $ac_status); } >/dev/null; then |
10122 | if test -s conftest.err; then | |
10123 | ac_cpp_err=$ac_c_preproc_warn_flag | |
10124 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
10125 | else | |
10126 | ac_cpp_err= | |
10127 | fi | |
10128 | else | |
10129 | ac_cpp_err=yes | |
10130 | fi | |
10131 | if test -z "$ac_cpp_err"; then | |
18fc9bd4 | 10132 | eval "$as_ac_Header=yes" |
ba479fd2 NN |
10133 | else |
10134 | echo "$as_me: failed program was:" >&5 | |
10135 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10136 | ||
18fc9bd4 | 10137 | eval "$as_ac_Header=no" |
ba479fd2 NN |
10138 | fi |
10139 | rm -f conftest.err conftest.$ac_ext | |
c375c43b | 10140 | fi |
b61ff9c8 BS |
10141 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 |
10142 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
ba479fd2 NN |
10143 | if test `eval echo '${'$as_ac_Header'}'` = yes; then |
10144 | cat >>confdefs.h <<_ACEOF | |
10145 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
10146 | _ACEOF | |
6e3f3080 NN |
10147 | |
10148 | fi | |
ba479fd2 NN |
10149 | done |
10150 | ||
10151 | ||
10152 | ||
10153 | for ac_func in fork vfork | |
10154 | do | |
10155 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
b61ff9c8 BS |
10156 | echo "$as_me:$LINENO: checking for $ac_func" >&5 |
10157 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
10158 | if eval "test \"\${$as_ac_var+set}\" = set"; then | |
ba479fd2 NN |
10159 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
10160 | else | |
10161 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10162 | /* confdefs.h. */ |
10163 | _ACEOF | |
10164 | cat confdefs.h >>conftest.$ac_ext | |
10165 | cat >>conftest.$ac_ext <<_ACEOF | |
10166 | /* end confdefs.h. */ | |
86da66b5 HPN |
10167 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. |
10168 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
10169 | #define $ac_func innocuous_$ac_func | |
10170 | ||
c375c43b | 10171 | /* System header to define __stub macros and hopefully few prototypes, |
ba479fd2 NN |
10172 | which can conflict with char $ac_func (); below. |
10173 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
10174 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 10175 | |
ba479fd2 NN |
10176 | #ifdef __STDC__ |
10177 | # include <limits.h> | |
10178 | #else | |
10179 | # include <assert.h> | |
10180 | #endif | |
86da66b5 HPN |
10181 | |
10182 | #undef $ac_func | |
10183 | ||
b61ff9c8 | 10184 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
10185 | #ifdef __cplusplus |
10186 | extern "C" | |
b61ff9c8 | 10187 | { |
ba479fd2 | 10188 | #endif |
b61ff9c8 BS |
10189 | /* We use char because int might match the return type of a gcc2 |
10190 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 | 10191 | char $ac_func (); |
c375c43b KG |
10192 | /* The GNU C library defines this for functions which it implements |
10193 | to always fail with ENOSYS. Some functions are actually named | |
10194 | something starting with __ and the normal name is an alias. */ | |
b61ff9c8 | 10195 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
c375c43b | 10196 | choke me |
b61ff9c8 BS |
10197 | #else |
10198 | char (*f) () = $ac_func; | |
10199 | #endif | |
10200 | #ifdef __cplusplus | |
10201 | } | |
c375c43b KG |
10202 | #endif |
10203 | ||
ba479fd2 NN |
10204 | int |
10205 | main () | |
10206 | { | |
b61ff9c8 | 10207 | return f != $ac_func; |
ba479fd2 NN |
10208 | ; |
10209 | return 0; | |
10210 | } | |
10211 | _ACEOF | |
10212 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
10213 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
10214 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 10215 | ac_status=$? |
86da66b5 HPN |
10216 | grep -v '^ *+' conftest.er1 >conftest.err |
10217 | rm -f conftest.er1 | |
10218 | cat conftest.err >&5 | |
ba479fd2 | 10219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
10220 | (exit $ac_status); } && |
10221 | { ac_try='test -z "$ac_c_werror_flag" | |
10222 | || test ! -s conftest.err' | |
10223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10224 | (eval $ac_try) 2>&5 | |
10225 | ac_status=$? | |
10226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10227 | (exit $ac_status); }; } && | |
10228 | { ac_try='test -s conftest$ac_exeext' | |
10229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
10230 | (eval $ac_try) 2>&5 | |
10231 | ac_status=$? | |
10232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10233 | (exit $ac_status); }; }; then | |
ba479fd2 NN |
10234 | eval "$as_ac_var=yes" |
10235 | else | |
10236 | echo "$as_me: failed program was:" >&5 | |
10237 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10238 | ||
b61ff9c8 | 10239 | eval "$as_ac_var=no" |
ba479fd2 | 10240 | fi |
b61ff9c8 | 10241 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 10242 | conftest$ac_exeext conftest.$ac_ext |
ba479fd2 | 10243 | fi |
b61ff9c8 BS |
10244 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 |
10245 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
ba479fd2 NN |
10246 | if test `eval echo '${'$as_ac_var'}'` = yes; then |
10247 | cat >>confdefs.h <<_ACEOF | |
10248 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
10249 | _ACEOF | |
10250 | ||
c375c43b | 10251 | fi |
ba479fd2 | 10252 | done |
c375c43b | 10253 | |
ba479fd2 | 10254 | if test "x$ac_cv_func_fork" = xyes; then |
b61ff9c8 BS |
10255 | echo "$as_me:$LINENO: checking for working fork" >&5 |
10256 | echo $ECHO_N "checking for working fork... $ECHO_C" >&6 | |
ba479fd2 NN |
10257 | if test "${ac_cv_func_fork_works+set}" = set; then |
10258 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10259 | else |
ba479fd2 NN |
10260 | if test "$cross_compiling" = yes; then |
10261 | ac_cv_func_fork_works=cross | |
10262 | else | |
10263 | cat >conftest.$ac_ext <<_ACEOF | |
b61ff9c8 BS |
10264 | /* By Ruediger Kuhlmann. */ |
10265 | #include <sys/types.h> | |
10266 | #if HAVE_UNISTD_H | |
10267 | # include <unistd.h> | |
10268 | #endif | |
10269 | /* Some systems only have a dummy stub for fork() */ | |
10270 | int main () | |
10271 | { | |
10272 | if (fork() < 0) | |
10273 | exit (1); | |
10274 | exit (0); | |
10275 | } | |
1a4b763e BS |
10276 | _ACEOF |
10277 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
10278 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
10279 | (eval $ac_link) 2>&5 | |
1a4b763e BS |
10280 | ac_status=$? |
10281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10282 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
10283 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10284 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
10285 | ac_status=$? |
10286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10287 | (exit $ac_status); }; }; then | |
10288 | ac_cv_func_fork_works=yes | |
10289 | else | |
10290 | echo "$as_me: program exited with status $ac_status" >&5 | |
10291 | echo "$as_me: failed program was:" >&5 | |
10292 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10293 | ||
10294 | ( exit $ac_status ) | |
10295 | ac_cv_func_fork_works=no | |
10296 | fi | |
b61ff9c8 | 10297 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
ba479fd2 NN |
10298 | fi |
10299 | fi | |
b61ff9c8 BS |
10300 | echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 |
10301 | echo "${ECHO_T}$ac_cv_func_fork_works" >&6 | |
ba479fd2 NN |
10302 | |
10303 | else | |
10304 | ac_cv_func_fork_works=$ac_cv_func_fork | |
10305 | fi | |
10306 | if test "x$ac_cv_func_fork_works" = xcross; then | |
10307 | case $host in | |
10308 | *-*-amigaos* | *-*-msdosdjgpp*) | |
10309 | # Override, as these systems have only a dummy fork() stub | |
10310 | ac_cv_func_fork_works=no | |
10311 | ;; | |
10312 | *) | |
10313 | ac_cv_func_fork_works=yes | |
10314 | ;; | |
10315 | esac | |
10316 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 | |
10317 | echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} | |
c375c43b | 10318 | fi |
c375c43b | 10319 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 | 10320 | if test "x$ac_cv_func_vfork" = xyes; then |
b61ff9c8 BS |
10321 | echo "$as_me:$LINENO: checking for working vfork" >&5 |
10322 | echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 | |
ba479fd2 NN |
10323 | if test "${ac_cv_func_vfork_works+set}" = set; then |
10324 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
c375c43b | 10325 | else |
ba479fd2 NN |
10326 | if test "$cross_compiling" = yes; then |
10327 | ac_cv_func_vfork_works=cross | |
10328 | else | |
10329 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
10330 | /* confdefs.h. */ |
10331 | _ACEOF | |
10332 | cat confdefs.h >>conftest.$ac_ext | |
10333 | cat >>conftest.$ac_ext <<_ACEOF | |
10334 | /* end confdefs.h. */ | |
c375c43b | 10335 | /* Thanks to Paul Eggert for this test. */ |
b61ff9c8 BS |
10336 | #include <stdio.h> |
10337 | #include <stdlib.h> | |
10338 | #include <sys/types.h> | |
10339 | #include <sys/stat.h> | |
ba479fd2 | 10340 | #include <sys/wait.h> |
b61ff9c8 BS |
10341 | #if HAVE_UNISTD_H |
10342 | # include <unistd.h> | |
10343 | #endif | |
10344 | #if HAVE_VFORK_H | |
ba479fd2 | 10345 | # include <vfork.h> |
c375c43b KG |
10346 | #endif |
10347 | /* On some sparc systems, changes by the child to local and incoming | |
ba479fd2 NN |
10348 | argument registers are propagated back to the parent. The compiler |
10349 | is told about this with #include <vfork.h>, but some compilers | |
10350 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a | |
10351 | static variable whose address is put into a register that is | |
10352 | clobbered by the vfork. */ | |
10353 | static void | |
c375c43b KG |
10354 | #ifdef __cplusplus |
10355 | sparc_address_test (int arg) | |
ba479fd2 | 10356 | # else |
c375c43b KG |
10357 | sparc_address_test (arg) int arg; |
10358 | #endif | |
10359 | { | |
10360 | static pid_t child; | |
10361 | if (!child) { | |
10362 | child = vfork (); | |
10363 | if (child < 0) { | |
10364 | perror ("vfork"); | |
10365 | _exit(2); | |
10366 | } | |
10367 | if (!child) { | |
10368 | arg = getpid(); | |
10369 | write(-1, "", 0); | |
10370 | _exit (arg); | |
10371 | } | |
10372 | } | |
10373 | } | |
ba479fd2 NN |
10374 | |
10375 | int | |
10376 | main () | |
10377 | { | |
c375c43b KG |
10378 | pid_t parent = getpid (); |
10379 | pid_t child; | |
10380 | ||
ba479fd2 | 10381 | sparc_address_test (0); |
c375c43b KG |
10382 | |
10383 | child = vfork (); | |
10384 | ||
10385 | if (child == 0) { | |
ba479fd2 NN |
10386 | /* Here is another test for sparc vfork register problems. This |
10387 | test uses lots of local variables, at least as many local | |
10388 | variables as main has allocated so far including compiler | |
10389 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris | |
10390 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should | |
10391 | reuse the register of parent for one of the local variables, | |
10392 | since it will think that parent can't possibly be used any more | |
10393 | in this routine. Assigning to the local variable will thus | |
10394 | munge parent in the parent process. */ | |
c375c43b KG |
10395 | pid_t |
10396 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
10397 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
10398 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
10399 | use the same hardware register for all 8 local variables. */ | |
10400 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
10401 | || p != p5 || p != p6 || p != p7) | |
10402 | _exit(1); | |
10403 | ||
ba479fd2 NN |
10404 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
10405 | from child file descriptors. If the child closes a descriptor | |
10406 | before it execs or exits, this munges the parent's descriptor | |
10407 | as well. Test for this by closing stdout in the child. */ | |
c375c43b KG |
10408 | _exit(close(fileno(stdout)) != 0); |
10409 | } else { | |
10410 | int status; | |
10411 | struct stat st; | |
10412 | ||
10413 | while (wait(&status) != child) | |
10414 | ; | |
b61ff9c8 | 10415 | exit( |
c375c43b KG |
10416 | /* Was there some problem with vforking? */ |
10417 | child < 0 | |
10418 | ||
10419 | /* Did the child fail? (This shouldn't happen.) */ | |
10420 | || status | |
10421 | ||
10422 | /* Did the vfork/compiler bug occur? */ | |
10423 | || parent != getpid() | |
10424 | ||
10425 | /* Did the file descriptor bug occur? */ | |
10426 | || fstat(fileno(stdout), &st) != 0 | |
10427 | ); | |
10428 | } | |
10429 | } | |
ba479fd2 NN |
10430 | _ACEOF |
10431 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
10432 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
10433 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
10434 | ac_status=$? |
10435 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10436 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
10437 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
10438 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
10439 | ac_status=$? |
10440 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
10441 | (exit $ac_status); }; }; then | |
c375c43b KG |
10442 | ac_cv_func_vfork_works=yes |
10443 | else | |
ba479fd2 NN |
10444 | echo "$as_me: program exited with status $ac_status" >&5 |
10445 | echo "$as_me: failed program was:" >&5 | |
10446 | sed 's/^/| /' conftest.$ac_ext >&5 | |
10447 | ||
10448 | ( exit $ac_status ) | |
10449 | ac_cv_func_vfork_works=no | |
cafe096b | 10450 | fi |
b61ff9c8 | 10451 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
6e3f3080 | 10452 | fi |
ba479fd2 | 10453 | fi |
b61ff9c8 BS |
10454 | echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 |
10455 | echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 | |
c375c43b | 10456 | |
ba479fd2 NN |
10457 | fi; |
10458 | if test "x$ac_cv_func_fork_works" = xcross; then | |
86da66b5 | 10459 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
ba479fd2 NN |
10460 | { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
10461 | echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} | |
c375c43b KG |
10462 | fi |
10463 | ||
ba479fd2 NN |
10464 | if test "x$ac_cv_func_vfork_works" = xyes; then |
10465 | ||
10466 | cat >>confdefs.h <<\_ACEOF | |
10467 | #define HAVE_WORKING_VFORK 1 | |
10468 | _ACEOF | |
10469 | ||
10470 | else | |
10471 | ||
10472 | cat >>confdefs.h <<\_ACEOF | |
c375c43b | 10473 | #define vfork fork |
ba479fd2 | 10474 | _ACEOF |
c375c43b KG |
10475 | |
10476 | fi | |
ba479fd2 NN |
10477 | if test "x$ac_cv_func_fork_works" = xyes; then |
10478 | ||
10479 | cat >>confdefs.h <<\_ACEOF | |
10480 | #define HAVE_WORKING_FORK 1 | |
10481 | _ACEOF | |
10482 | ||
10483 | fi | |
10484 | ||
c375c43b | 10485 | |
81bf3d9e | 10486 | |
dfb77e37 KC |
10487 | if test "X$prefix" = "XNONE"; then |
10488 | acl_final_prefix="$ac_default_prefix" | |
10489 | else | |
10490 | acl_final_prefix="$prefix" | |
10491 | fi | |
10492 | if test "X$exec_prefix" = "XNONE"; then | |
10493 | acl_final_exec_prefix='${prefix}' | |
10494 | else | |
10495 | acl_final_exec_prefix="$exec_prefix" | |
10496 | fi | |
10497 | acl_save_prefix="$prefix" | |
10498 | prefix="$acl_final_prefix" | |
10499 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
10500 | prefix="$acl_save_prefix" | |
f91abfce TT |
10501 | |
10502 | ||
b61ff9c8 | 10503 | # Check whether --with-gnu-ld or --without-gnu-ld was given. |
dfb77e37 | 10504 | if test "${with_gnu_ld+set}" = set; then |
b61ff9c8 BS |
10505 | withval="$with_gnu_ld" |
10506 | test "$withval" = no || with_gnu_ld=yes | |
ba479fd2 | 10507 | else |
dfb77e37 | 10508 | with_gnu_ld=no |
b61ff9c8 | 10509 | fi; |
dfb77e37 KC |
10510 | # Prepare PATH_SEPARATOR. |
10511 | # The user is always right. | |
10512 | if test "${PATH_SEPARATOR+set}" != set; then | |
10513 | echo "#! /bin/sh" >conf$$.sh | |
10514 | echo "exit 0" >>conf$$.sh | |
10515 | chmod +x conf$$.sh | |
10516 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
10517 | PATH_SEPARATOR=';' | |
ba479fd2 | 10518 | else |
dfb77e37 | 10519 | PATH_SEPARATOR=: |
ba479fd2 | 10520 | fi |
dfb77e37 KC |
10521 | rm -f conf$$.sh |
10522 | fi | |
10523 | ac_prog=ld | |
10524 | if test "$GCC" = yes; then | |
10525 | # Check if gcc -print-prog-name=ld gives a path. | |
b61ff9c8 BS |
10526 | echo "$as_me:$LINENO: checking for ld used by GCC" >&5 |
10527 | echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 | |
dfb77e37 KC |
10528 | case $host in |
10529 | *-*-mingw*) | |
10530 | # gcc leaves a trailing carriage return which upsets mingw | |
10531 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
10532 | *) | |
10533 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
10534 | esac | |
10535 | case $ac_prog in | |
10536 | # Accept absolute paths. | |
10537 | [\\/]* | [A-Za-z]:[\\/]*) | |
10538 | re_direlt='/[^/][^/]*/\.\./' | |
10539 | # Canonicalize the path of ld | |
10540 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
10541 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
10542 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
10543 | done | |
10544 | test -z "$LD" && LD="$ac_prog" | |
10545 | ;; | |
10546 | "") | |
10547 | # If it fails, then pretend we aren't using GCC. | |
10548 | ac_prog=ld | |
10549 | ;; | |
10550 | *) | |
10551 | # If it is relative, then search for the first ld in PATH. | |
10552 | with_gnu_ld=unknown | |
10553 | ;; | |
10554 | esac | |
10555 | elif test "$with_gnu_ld" = yes; then | |
b61ff9c8 BS |
10556 | echo "$as_me:$LINENO: checking for GNU ld" >&5 |
10557 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10558 | else |
b61ff9c8 BS |
10559 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 |
10560 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | |
ba479fd2 | 10561 | fi |
dfb77e37 KC |
10562 | if test "${acl_cv_path_LD+set}" = set; then |
10563 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ba479fd2 | 10564 | else |
dfb77e37 KC |
10565 | if test -z "$LD"; then |
10566 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
10567 | for ac_dir in $PATH; do | |
10568 | test -z "$ac_dir" && ac_dir=. | |
10569 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
10570 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
10571 | # Check to see if the program is GNU ld. I'd rather use --version, | |
10572 | # but apparently some GNU ld's only accept -v. | |
10573 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
18fc9bd4 RG |
10574 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
10575 | test "$with_gnu_ld" != no && break | |
10576 | else | |
10577 | test "$with_gnu_ld" != yes && break | |
10578 | fi | |
dfb77e37 KC |
10579 | fi |
10580 | done | |
10581 | IFS="$ac_save_ifs" | |
10582 | else | |
10583 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | |
10584 | fi | |
10585 | fi | |
ba479fd2 | 10586 | |
dfb77e37 KC |
10587 | LD="$acl_cv_path_LD" |
10588 | if test -n "$LD"; then | |
b61ff9c8 BS |
10589 | echo "$as_me:$LINENO: result: $LD" >&5 |
10590 | echo "${ECHO_T}$LD" >&6 | |
dfb77e37 | 10591 | else |
b61ff9c8 BS |
10592 | echo "$as_me:$LINENO: result: no" >&5 |
10593 | echo "${ECHO_T}no" >&6 | |
ba479fd2 | 10594 | fi |
dfb77e37 KC |
10595 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 |
10596 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | |
10597 | { (exit 1); exit 1; }; } | |
b61ff9c8 BS |
10598 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 |
10599 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | |
dfb77e37 KC |
10600 | if test "${acl_cv_prog_gnu_ld+set}" = set; then |
10601 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10602 | else | |
10603 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
18fc9bd4 RG |
10604 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
10605 | acl_cv_prog_gnu_ld=yes | |
10606 | else | |
10607 | acl_cv_prog_gnu_ld=no | |
10608 | fi | |
dfb77e37 | 10609 | fi |
b61ff9c8 BS |
10610 | echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 |
10611 | echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 | |
dfb77e37 KC |
10612 | with_gnu_ld=$acl_cv_prog_gnu_ld |
10613 | ||
10614 | ||
10615 | ||
b61ff9c8 BS |
10616 | echo "$as_me:$LINENO: checking for shared library run path origin" >&5 |
10617 | echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 | |
dfb77e37 KC |
10618 | if test "${acl_cv_rpath+set}" = set; then |
10619 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
10620 | else | |
10621 | ||
10622 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
10623 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
10624 | . ./conftest.sh | |
10625 | rm -f ./conftest.sh | |
10626 | acl_cv_rpath=done | |
ba479fd2 | 10627 | |
eb158727 | 10628 | fi |
b61ff9c8 BS |
10629 | echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 |
10630 | echo "${ECHO_T}$acl_cv_rpath" >&6 | |
dfb77e37 KC |
10631 | wl="$acl_cv_wl" |
10632 | libext="$acl_cv_libext" | |
10633 | shlibext="$acl_cv_shlibext" | |
10634 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
10635 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
10636 | hardcode_direct="$acl_cv_hardcode_direct" | |
10637 | hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
b61ff9c8 | 10638 | # Check whether --enable-rpath or --disable-rpath was given. |
dfb77e37 | 10639 | if test "${enable_rpath+set}" = set; then |
b61ff9c8 BS |
10640 | enableval="$enable_rpath" |
10641 | : | |
dfb77e37 KC |
10642 | else |
10643 | enable_rpath=yes | |
b61ff9c8 | 10644 | fi; |
8b1f719a | 10645 | |
a6ccdbab | 10646 | |
dfb77e37 KC |
10647 | |
10648 | ||
10649 | ||
10650 | ||
10651 | ||
b639c3c2 JJ |
10652 | use_additional=yes |
10653 | ||
10654 | acl_save_prefix="$prefix" | |
10655 | prefix="$acl_final_prefix" | |
10656 | acl_save_exec_prefix="$exec_prefix" | |
10657 | exec_prefix="$acl_final_exec_prefix" | |
10658 | ||
10659 | eval additional_includedir=\"$includedir\" | |
10660 | eval additional_libdir=\"$libdir\" | |
10661 | ||
10662 | exec_prefix="$acl_save_exec_prefix" | |
10663 | prefix="$acl_save_prefix" | |
dfb77e37 KC |
10664 | |
10665 | ||
b61ff9c8 | 10666 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
8b1f719a | 10667 | if test "${with_libiconv_prefix+set}" = set; then |
b61ff9c8 BS |
10668 | withval="$with_libiconv_prefix" |
10669 | ||
8b1f719a | 10670 | if test "X$withval" = "Xno"; then |
b639c3c2 | 10671 | use_additional=no |
8b1f719a PB |
10672 | else |
10673 | if test "X$withval" = "X"; then | |
dfb77e37 KC |
10674 | |
10675 | acl_save_prefix="$prefix" | |
10676 | prefix="$acl_final_prefix" | |
10677 | acl_save_exec_prefix="$exec_prefix" | |
10678 | exec_prefix="$acl_final_exec_prefix" | |
10679 | ||
b639c3c2 JJ |
10680 | eval additional_includedir=\"$includedir\" |
10681 | eval additional_libdir=\"$libdir\" | |
dfb77e37 KC |
10682 | |
10683 | exec_prefix="$acl_save_exec_prefix" | |
10684 | prefix="$acl_save_prefix" | |
10685 | ||
8b1f719a | 10686 | else |
b639c3c2 JJ |
10687 | additional_includedir="$withval/include" |
10688 | additional_libdir="$withval/lib" | |
8b1f719a PB |
10689 | fi |
10690 | fi | |
10691 | ||
b61ff9c8 | 10692 | fi; |
dfb77e37 KC |
10693 | LIBICONV= |
10694 | LTLIBICONV= | |
10695 | INCICONV= | |
10696 | rpathdirs= | |
10697 | ltrpathdirs= | |
10698 | names_already_handled= | |
10699 | names_next_round='iconv ' | |
10700 | while test -n "$names_next_round"; do | |
10701 | names_this_round="$names_next_round" | |
10702 | names_next_round= | |
10703 | for name in $names_this_round; do | |
10704 | already_handled= | |
10705 | for n in $names_already_handled; do | |
10706 | if test "$n" = "$name"; then | |
10707 | already_handled=yes | |
10708 | break | |
10709 | fi | |
10710 | done | |
10711 | if test -z "$already_handled"; then | |
10712 | names_already_handled="$names_already_handled $name" | |
10713 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | |
10714 | eval value=\"\$HAVE_LIB$uppername\" | |
10715 | if test -n "$value"; then | |
10716 | if test "$value" = yes; then | |
10717 | eval value=\"\$LIB$uppername\" | |
10718 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
10719 | eval value=\"\$LTLIB$uppername\" | |
10720 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
10721 | else | |
10722 | : | |
10723 | fi | |
10724 | else | |
10725 | found_dir= | |
10726 | found_la= | |
10727 | found_so= | |
10728 | found_a= | |
b639c3c2 JJ |
10729 | if test $use_additional = yes; then |
10730 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | |
10731 | found_dir="$additional_libdir" | |
10732 | found_so="$additional_libdir/lib$name.$shlibext" | |
10733 | if test -f "$additional_libdir/lib$name.la"; then | |
10734 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
10735 | fi |
10736 | else | |
b639c3c2 JJ |
10737 | if test -f "$additional_libdir/lib$name.$libext"; then |
10738 | found_dir="$additional_libdir" | |
10739 | found_a="$additional_libdir/lib$name.$libext" | |
10740 | if test -f "$additional_libdir/lib$name.la"; then | |
10741 | found_la="$additional_libdir/lib$name.la" | |
dfb77e37 KC |
10742 | fi |
10743 | fi | |
10744 | fi | |
10745 | fi | |
10746 | if test "X$found_dir" = "X"; then | |
10747 | for x in $LDFLAGS $LTLIBICONV; do | |
10748 | ||
10749 | acl_save_prefix="$prefix" | |
10750 | prefix="$acl_final_prefix" | |
10751 | acl_save_exec_prefix="$exec_prefix" | |
10752 | exec_prefix="$acl_final_exec_prefix" | |
10753 | eval x=\"$x\" | |
10754 | exec_prefix="$acl_save_exec_prefix" | |
10755 | prefix="$acl_save_prefix" | |
10756 | ||
10757 | case "$x" in | |
10758 | -L*) | |
10759 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
10760 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | |
10761 | found_dir="$dir" | |
10762 | found_so="$dir/lib$name.$shlibext" | |
10763 | if test -f "$dir/lib$name.la"; then | |
10764 | found_la="$dir/lib$name.la" | |
10765 | fi | |
10766 | else | |
10767 | if test -f "$dir/lib$name.$libext"; then | |
10768 | found_dir="$dir" | |
10769 | found_a="$dir/lib$name.$libext" | |
10770 | if test -f "$dir/lib$name.la"; then | |
10771 | found_la="$dir/lib$name.la" | |
10772 | fi | |
10773 | fi | |
10774 | fi | |
10775 | ;; | |
10776 | esac | |
10777 | if test "X$found_dir" != "X"; then | |
10778 | break | |
10779 | fi | |
10780 | done | |
10781 | fi | |
10782 | if test "X$found_dir" != "X"; then | |
10783 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
10784 | if test "X$found_so" != "X"; then | |
10785 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | |
10786 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10787 | else | |
10788 | haveit= | |
10789 | for x in $ltrpathdirs; do | |
10790 | if test "X$x" = "X$found_dir"; then | |
10791 | haveit=yes | |
10792 | break | |
10793 | fi | |
10794 | done | |
10795 | if test -z "$haveit"; then | |
10796 | ltrpathdirs="$ltrpathdirs $found_dir" | |
10797 | fi | |
10798 | if test "$hardcode_direct" = yes; then | |
10799 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10800 | else | |
10801 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | |
10802 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10803 | haveit= | |
10804 | for x in $rpathdirs; do | |
10805 | if test "X$x" = "X$found_dir"; then | |
10806 | haveit=yes | |
10807 | break | |
10808 | fi | |
10809 | done | |
10810 | if test -z "$haveit"; then | |
10811 | rpathdirs="$rpathdirs $found_dir" | |
10812 | fi | |
10813 | else | |
10814 | haveit= | |
10815 | for x in $LDFLAGS $LIBICONV; do | |
10816 | ||
10817 | acl_save_prefix="$prefix" | |
10818 | prefix="$acl_final_prefix" | |
10819 | acl_save_exec_prefix="$exec_prefix" | |
10820 | exec_prefix="$acl_final_exec_prefix" | |
10821 | eval x=\"$x\" | |
10822 | exec_prefix="$acl_save_exec_prefix" | |
10823 | prefix="$acl_save_prefix" | |
10824 | ||
10825 | if test "X$x" = "X-L$found_dir"; then | |
10826 | haveit=yes | |
10827 | break | |
10828 | fi | |
10829 | done | |
10830 | if test -z "$haveit"; then | |
10831 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
10832 | fi | |
10833 | if test "$hardcode_minus_L" != no; then | |
10834 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
10835 | else | |
10836 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10837 | fi | |
10838 | fi | |
10839 | fi | |
10840 | fi | |
10841 | else | |
10842 | if test "X$found_a" != "X"; then | |
10843 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
10844 | else | |
10845 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
10846 | fi | |
10847 | fi | |
10848 | additional_includedir= | |
10849 | case "$found_dir" in | |
10850 | */lib | */lib/) | |
10851 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | |
10852 | additional_includedir="$basedir/include" | |
10853 | ;; | |
10854 | esac | |
10855 | if test "X$additional_includedir" != "X"; then | |
10856 | if test "X$additional_includedir" != "X/usr/include"; then | |
10857 | haveit= | |
10858 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
10859 | if test -n "$GCC"; then | |
10860 | case $host_os in | |
18fc9bd4 | 10861 | linux*) haveit=yes;; |
dfb77e37 KC |
10862 | esac |
10863 | fi | |
10864 | fi | |
10865 | if test -z "$haveit"; then | |
10866 | for x in $CPPFLAGS $INCICONV; do | |
10867 | ||
10868 | acl_save_prefix="$prefix" | |
10869 | prefix="$acl_final_prefix" | |
10870 | acl_save_exec_prefix="$exec_prefix" | |
10871 | exec_prefix="$acl_final_exec_prefix" | |
10872 | eval x=\"$x\" | |
10873 | exec_prefix="$acl_save_exec_prefix" | |
10874 | prefix="$acl_save_prefix" | |
10875 | ||
10876 | if test "X$x" = "X-I$additional_includedir"; then | |
10877 | haveit=yes | |
10878 | break | |
10879 | fi | |
10880 | done | |
10881 | if test -z "$haveit"; then | |
10882 | if test -d "$additional_includedir"; then | |
10883 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
10884 | fi | |
10885 | fi | |
10886 | fi | |
10887 | fi | |
10888 | fi | |
10889 | if test -n "$found_la"; then | |
10890 | save_libdir="$libdir" | |
10891 | case "$found_la" in | |
10892 | */* | *\\*) . "$found_la" ;; | |
10893 | *) . "./$found_la" ;; | |
10894 | esac | |
10895 | libdir="$save_libdir" | |
10896 | for dep in $dependency_libs; do | |
10897 | case "$dep" in | |
10898 | -L*) | |
10899 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
10900 | if test "X$additional_libdir" != "X/usr/lib"; then | |
10901 | haveit= | |
10902 | if test "X$additional_libdir" = "X/usr/local/lib"; then | |
10903 | if test -n "$GCC"; then | |
10904 | case $host_os in | |
18fc9bd4 | 10905 | linux*) haveit=yes;; |
dfb77e37 KC |
10906 | esac |
10907 | fi | |
10908 | fi | |
10909 | if test -z "$haveit"; then | |
10910 | haveit= | |
10911 | for x in $LDFLAGS $LIBICONV; do | |
10912 | ||
10913 | acl_save_prefix="$prefix" | |
10914 | prefix="$acl_final_prefix" | |
10915 | acl_save_exec_prefix="$exec_prefix" | |
10916 | exec_prefix="$acl_final_exec_prefix" | |
10917 | eval x=\"$x\" | |
10918 | exec_prefix="$acl_save_exec_prefix" | |
10919 | prefix="$acl_save_prefix" | |
10920 | ||
10921 | if test "X$x" = "X-L$additional_libdir"; then | |
10922 | haveit=yes | |
10923 | break | |
10924 | fi | |
10925 | done | |
10926 | if test -z "$haveit"; then | |
10927 | if test -d "$additional_libdir"; then | |
10928 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" | |
10929 | fi | |
10930 | fi | |
10931 | haveit= | |
10932 | for x in $LDFLAGS $LTLIBICONV; do | |
10933 | ||
10934 | acl_save_prefix="$prefix" | |
10935 | prefix="$acl_final_prefix" | |
10936 | acl_save_exec_prefix="$exec_prefix" | |
10937 | exec_prefix="$acl_final_exec_prefix" | |
10938 | eval x=\"$x\" | |
10939 | exec_prefix="$acl_save_exec_prefix" | |
10940 | prefix="$acl_save_prefix" | |
10941 | ||
10942 | if test "X$x" = "X-L$additional_libdir"; then | |
10943 | haveit=yes | |
10944 | break | |
10945 | fi | |
10946 | done | |
10947 | if test -z "$haveit"; then | |
10948 | if test -d "$additional_libdir"; then | |
10949 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" | |
10950 | fi | |
10951 | fi | |
10952 | fi | |
10953 | fi | |
10954 | ;; | |
10955 | -R*) | |
10956 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
10957 | if test "$enable_rpath" != no; then | |
10958 | haveit= | |
10959 | for x in $rpathdirs; do | |
10960 | if test "X$x" = "X$dir"; then | |
10961 | haveit=yes | |
10962 | break | |
10963 | fi | |
10964 | done | |
10965 | if test -z "$haveit"; then | |
10966 | rpathdirs="$rpathdirs $dir" | |
10967 | fi | |
10968 | haveit= | |
10969 | for x in $ltrpathdirs; do | |
10970 | if test "X$x" = "X$dir"; then | |
10971 | haveit=yes | |
10972 | break | |
10973 | fi | |
10974 | done | |
10975 | if test -z "$haveit"; then | |
10976 | ltrpathdirs="$ltrpathdirs $dir" | |
10977 | fi | |
10978 | fi | |
10979 | ;; | |
10980 | -l*) | |
10981 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | |
10982 | ;; | |
10983 | *.la) | |
10984 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
10985 | ;; | |
10986 | *) | |
10987 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
10988 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
10989 | ;; | |
10990 | esac | |
10991 | done | |
10992 | fi | |
10993 | else | |
10994 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
10995 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
10996 | fi | |
10997 | fi | |
10998 | fi | |
10999 | done | |
11000 | done | |
11001 | if test "X$rpathdirs" != "X"; then | |
11002 | if test -n "$hardcode_libdir_separator"; then | |
11003 | alldirs= | |
11004 | for found_dir in $rpathdirs; do | |
11005 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | |
11006 | done | |
11007 | acl_save_libdir="$libdir" | |
11008 | libdir="$alldirs" | |
11009 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11010 | libdir="$acl_save_libdir" | |
11011 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11012 | else | |
11013 | for found_dir in $rpathdirs; do | |
11014 | acl_save_libdir="$libdir" | |
11015 | libdir="$found_dir" | |
11016 | eval flag=\"$hardcode_libdir_flag_spec\" | |
11017 | libdir="$acl_save_libdir" | |
11018 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
11019 | done | |
11020 | fi | |
11021 | fi | |
11022 | if test "X$ltrpathdirs" != "X"; then | |
11023 | for found_dir in $ltrpathdirs; do | |
11024 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
11025 | done | |
11026 | fi | |
11027 | ||
11028 | ||
11029 | ||
11030 | ||
11031 | ||
11032 | ||
11033 | ||
11034 | am_save_CPPFLAGS="$CPPFLAGS" | |
11035 | ||
11036 | for element in $INCICONV; do | |
11037 | haveit= | |
11038 | for x in $CPPFLAGS; do | |
11039 | ||
11040 | acl_save_prefix="$prefix" | |
11041 | prefix="$acl_final_prefix" | |
11042 | acl_save_exec_prefix="$exec_prefix" | |
11043 | exec_prefix="$acl_final_exec_prefix" | |
11044 | eval x=\"$x\" | |
11045 | exec_prefix="$acl_save_exec_prefix" | |
11046 | prefix="$acl_save_prefix" | |
11047 | ||
11048 | if test "X$x" = "X$element"; then | |
11049 | haveit=yes | |
11050 | break | |
11051 | fi | |
11052 | done | |
11053 | if test -z "$haveit"; then | |
11054 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
11055 | fi | |
11056 | done | |
eb158727 ZW |
11057 | |
11058 | ||
b61ff9c8 BS |
11059 | echo "$as_me:$LINENO: checking for iconv" >&5 |
11060 | echo $ECHO_N "checking for iconv... $ECHO_C" >&6 | |
ba479fd2 NN |
11061 | if test "${am_cv_func_iconv+set}" = set; then |
11062 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11063 | else |
ba479fd2 | 11064 | |
f91abfce TT |
11065 | am_cv_func_iconv="no, consider installing GNU libiconv" |
11066 | am_cv_lib_iconv=no | |
ba479fd2 | 11067 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11068 | /* confdefs.h. */ |
11069 | _ACEOF | |
11070 | cat confdefs.h >>conftest.$ac_ext | |
11071 | cat >>conftest.$ac_ext <<_ACEOF | |
11072 | /* end confdefs.h. */ | |
f91abfce TT |
11073 | #include <stdlib.h> |
11074 | #include <iconv.h> | |
ba479fd2 NN |
11075 | int |
11076 | main () | |
11077 | { | |
f91abfce TT |
11078 | iconv_t cd = iconv_open("",""); |
11079 | iconv(cd,NULL,NULL,NULL,NULL); | |
11080 | iconv_close(cd); | |
ba479fd2 NN |
11081 | ; |
11082 | return 0; | |
11083 | } | |
11084 | _ACEOF | |
11085 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
11086 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
11087 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 11088 | ac_status=$? |
86da66b5 HPN |
11089 | grep -v '^ *+' conftest.er1 >conftest.err |
11090 | rm -f conftest.er1 | |
11091 | cat conftest.err >&5 | |
ba479fd2 | 11092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11093 | (exit $ac_status); } && |
11094 | { ac_try='test -z "$ac_c_werror_flag" | |
11095 | || test ! -s conftest.err' | |
11096 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11097 | (eval $ac_try) 2>&5 | |
11098 | ac_status=$? | |
11099 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11100 | (exit $ac_status); }; } && | |
11101 | { ac_try='test -s conftest$ac_exeext' | |
11102 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11103 | (eval $ac_try) 2>&5 | |
11104 | ac_status=$? | |
11105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11106 | (exit $ac_status); }; }; then | |
f91abfce TT |
11107 | am_cv_func_iconv=yes |
11108 | else | |
ba479fd2 NN |
11109 | echo "$as_me: failed program was:" >&5 |
11110 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11111 | ||
f91abfce | 11112 | fi |
b61ff9c8 | 11113 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 11114 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11115 | if test "$am_cv_func_iconv" != yes; then |
11116 | am_save_LIBS="$LIBS" | |
dfb77e37 | 11117 | LIBS="$LIBS $LIBICONV" |
ba479fd2 | 11118 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11119 | /* confdefs.h. */ |
11120 | _ACEOF | |
11121 | cat confdefs.h >>conftest.$ac_ext | |
11122 | cat >>conftest.$ac_ext <<_ACEOF | |
11123 | /* end confdefs.h. */ | |
f91abfce TT |
11124 | #include <stdlib.h> |
11125 | #include <iconv.h> | |
ba479fd2 NN |
11126 | int |
11127 | main () | |
11128 | { | |
f91abfce TT |
11129 | iconv_t cd = iconv_open("",""); |
11130 | iconv(cd,NULL,NULL,NULL,NULL); | |
11131 | iconv_close(cd); | |
ba479fd2 NN |
11132 | ; |
11133 | return 0; | |
11134 | } | |
11135 | _ACEOF | |
11136 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
11137 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
11138 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 11139 | ac_status=$? |
86da66b5 HPN |
11140 | grep -v '^ *+' conftest.er1 >conftest.err |
11141 | rm -f conftest.er1 | |
11142 | cat conftest.err >&5 | |
ba479fd2 | 11143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11144 | (exit $ac_status); } && |
11145 | { ac_try='test -z "$ac_c_werror_flag" | |
11146 | || test ! -s conftest.err' | |
11147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11148 | (eval $ac_try) 2>&5 | |
11149 | ac_status=$? | |
11150 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11151 | (exit $ac_status); }; } && | |
11152 | { ac_try='test -s conftest$ac_exeext' | |
11153 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11154 | (eval $ac_try) 2>&5 | |
11155 | ac_status=$? | |
11156 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11157 | (exit $ac_status); }; }; then | |
f91abfce TT |
11158 | am_cv_lib_iconv=yes |
11159 | am_cv_func_iconv=yes | |
11160 | else | |
ba479fd2 NN |
11161 | echo "$as_me: failed program was:" >&5 |
11162 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11163 | ||
f91abfce | 11164 | fi |
b61ff9c8 | 11165 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 11166 | conftest$ac_exeext conftest.$ac_ext |
f91abfce TT |
11167 | LIBS="$am_save_LIBS" |
11168 | fi | |
6e3f3080 | 11169 | |
ba479fd2 | 11170 | fi |
b61ff9c8 BS |
11171 | echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 |
11172 | echo "${ECHO_T}$am_cv_func_iconv" >&6 | |
63cf211a | 11173 | if test "$am_cv_func_iconv" = yes; then |
ba479fd2 NN |
11174 | |
11175 | cat >>confdefs.h <<\_ACEOF | |
f91abfce | 11176 | #define HAVE_ICONV 1 |
ba479fd2 | 11177 | _ACEOF |
f91abfce | 11178 | |
dfb77e37 KC |
11179 | fi |
11180 | if test "$am_cv_lib_iconv" = yes; then | |
b61ff9c8 BS |
11181 | echo "$as_me:$LINENO: checking how to link with libiconv" >&5 |
11182 | echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 | |
11183 | echo "$as_me:$LINENO: result: $LIBICONV" >&5 | |
11184 | echo "${ECHO_T}$LIBICONV" >&6 | |
dfb77e37 KC |
11185 | else |
11186 | CPPFLAGS="$am_save_CPPFLAGS" | |
11187 | LIBICONV= | |
11188 | LTLIBICONV= | |
11189 | fi | |
11190 | ||
11191 | ||
11192 | ||
11193 | if test "$am_cv_func_iconv" = yes; then | |
b61ff9c8 BS |
11194 | echo "$as_me:$LINENO: checking for iconv declaration" >&5 |
11195 | echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 | |
ba479fd2 NN |
11196 | if test "${am_cv_proto_iconv+set}" = set; then |
11197 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f91abfce | 11198 | else |
ba479fd2 NN |
11199 | |
11200 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11201 | /* confdefs.h. */ |
11202 | _ACEOF | |
11203 | cat confdefs.h >>conftest.$ac_ext | |
11204 | cat >>conftest.$ac_ext <<_ACEOF | |
11205 | /* end confdefs.h. */ | |
f91abfce TT |
11206 | |
11207 | #include <stdlib.h> | |
11208 | #include <iconv.h> | |
11209 | extern | |
11210 | #ifdef __cplusplus | |
11211 | "C" | |
11212 | #endif | |
11213 | #if defined(__STDC__) || defined(__cplusplus) | |
11214 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
11215 | #else | |
11216 | size_t iconv(); | |
11217 | #endif | |
11218 | ||
ba479fd2 NN |
11219 | int |
11220 | main () | |
11221 | { | |
f91abfce | 11222 | |
ba479fd2 NN |
11223 | ; |
11224 | return 0; | |
11225 | } | |
11226 | _ACEOF | |
11227 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11228 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11229 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11230 | ac_status=$? |
86da66b5 HPN |
11231 | grep -v '^ *+' conftest.er1 >conftest.err |
11232 | rm -f conftest.er1 | |
11233 | cat conftest.err >&5 | |
ba479fd2 | 11234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11235 | (exit $ac_status); } && |
11236 | { ac_try='test -z "$ac_c_werror_flag" | |
11237 | || test ! -s conftest.err' | |
11238 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11239 | (eval $ac_try) 2>&5 | |
11240 | ac_status=$? | |
11241 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11242 | (exit $ac_status); }; } && | |
11243 | { ac_try='test -s conftest.$ac_objext' | |
11244 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11245 | (eval $ac_try) 2>&5 | |
11246 | ac_status=$? | |
11247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11248 | (exit $ac_status); }; }; then | |
f91abfce TT |
11249 | am_cv_proto_iconv_arg1="" |
11250 | else | |
ba479fd2 NN |
11251 | echo "$as_me: failed program was:" >&5 |
11252 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11253 | ||
b61ff9c8 | 11254 | am_cv_proto_iconv_arg1="const" |
f91abfce | 11255 | fi |
b61ff9c8 | 11256 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
f91abfce TT |
11257 | 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);" |
11258 | fi | |
11259 | ||
11260 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
b61ff9c8 | 11261 | echo "$as_me:$LINENO: result: ${ac_t:- |
ba479fd2 NN |
11262 | }$am_cv_proto_iconv" >&5 |
11263 | echo "${ECHO_T}${ac_t:- | |
b61ff9c8 | 11264 | }$am_cv_proto_iconv" >&6 |
ba479fd2 NN |
11265 | |
11266 | cat >>confdefs.h <<_ACEOF | |
f91abfce | 11267 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
ba479fd2 | 11268 | _ACEOF |
f91abfce TT |
11269 | |
11270 | fi | |
f91abfce | 11271 | |
56694dd9 ZW |
11272 | # Until we have in-tree GNU iconv: |
11273 | LIBICONV_DEP= | |
11274 | ||
11275 | ||
18fc9bd4 | 11276 | |
b61ff9c8 BS |
11277 | echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 |
11278 | echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 | |
18fc9bd4 RG |
11279 | if test "${am_cv_val_LC_MESSAGES+set}" = set; then |
11280 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11281 | else | |
11282 | cat >conftest.$ac_ext <<_ACEOF | |
11283 | /* confdefs.h. */ | |
11284 | _ACEOF | |
11285 | cat confdefs.h >>conftest.$ac_ext | |
11286 | cat >>conftest.$ac_ext <<_ACEOF | |
11287 | /* end confdefs.h. */ | |
11288 | #include <locale.h> | |
11289 | int | |
11290 | main () | |
11291 | { | |
11292 | return LC_MESSAGES | |
11293 | ; | |
11294 | return 0; | |
11295 | } | |
11296 | _ACEOF | |
11297 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
11298 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
11299 | (eval $ac_link) 2>conftest.er1 | |
18fc9bd4 RG |
11300 | ac_status=$? |
11301 | grep -v '^ *+' conftest.er1 >conftest.err | |
11302 | rm -f conftest.er1 | |
11303 | cat conftest.err >&5 | |
11304 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
11305 | (exit $ac_status); } && |
11306 | { ac_try='test -z "$ac_c_werror_flag" | |
11307 | || test ! -s conftest.err' | |
11308 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11309 | (eval $ac_try) 2>&5 | |
11310 | ac_status=$? | |
11311 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11312 | (exit $ac_status); }; } && | |
11313 | { ac_try='test -s conftest$ac_exeext' | |
11314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11315 | (eval $ac_try) 2>&5 | |
11316 | ac_status=$? | |
11317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11318 | (exit $ac_status); }; }; then | |
18fc9bd4 RG |
11319 | am_cv_val_LC_MESSAGES=yes |
11320 | else | |
11321 | echo "$as_me: failed program was:" >&5 | |
11322 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11323 | ||
b61ff9c8 | 11324 | am_cv_val_LC_MESSAGES=no |
18fc9bd4 | 11325 | fi |
b61ff9c8 | 11326 | rm -f conftest.err conftest.$ac_objext \ |
18fc9bd4 RG |
11327 | conftest$ac_exeext conftest.$ac_ext |
11328 | fi | |
b61ff9c8 BS |
11329 | echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 |
11330 | echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 | |
18fc9bd4 RG |
11331 | if test $am_cv_val_LC_MESSAGES = yes; then |
11332 | ||
11333 | cat >>confdefs.h <<\_ACEOF | |
11334 | #define HAVE_LC_MESSAGES 1 | |
11335 | _ACEOF | |
11336 | ||
11337 | fi | |
11338 | ||
f91abfce | 11339 | |
a03ea89b | 11340 | |
b61ff9c8 BS |
11341 | echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 |
11342 | echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 | |
a03ea89b BM |
11343 | if test "${am_cv_langinfo_codeset+set}" = set; then |
11344 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11345 | else | |
11346 | cat >conftest.$ac_ext <<_ACEOF | |
11347 | /* confdefs.h. */ | |
11348 | _ACEOF | |
11349 | cat confdefs.h >>conftest.$ac_ext | |
11350 | cat >>conftest.$ac_ext <<_ACEOF | |
11351 | /* end confdefs.h. */ | |
11352 | #include <langinfo.h> | |
11353 | int | |
11354 | main () | |
11355 | { | |
11356 | char* cs = nl_langinfo(CODESET); | |
11357 | ; | |
11358 | return 0; | |
11359 | } | |
11360 | _ACEOF | |
11361 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
11362 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
11363 | (eval $ac_link) 2>conftest.er1 | |
a03ea89b BM |
11364 | ac_status=$? |
11365 | grep -v '^ *+' conftest.er1 >conftest.err | |
11366 | rm -f conftest.er1 | |
11367 | cat conftest.err >&5 | |
11368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
11369 | (exit $ac_status); } && |
11370 | { ac_try='test -z "$ac_c_werror_flag" | |
11371 | || test ! -s conftest.err' | |
11372 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11373 | (eval $ac_try) 2>&5 | |
11374 | ac_status=$? | |
11375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11376 | (exit $ac_status); }; } && | |
11377 | { ac_try='test -s conftest$ac_exeext' | |
11378 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11379 | (eval $ac_try) 2>&5 | |
11380 | ac_status=$? | |
11381 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11382 | (exit $ac_status); }; }; then | |
a03ea89b BM |
11383 | am_cv_langinfo_codeset=yes |
11384 | else | |
11385 | echo "$as_me: failed program was:" >&5 | |
11386 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11387 | ||
b61ff9c8 | 11388 | am_cv_langinfo_codeset=no |
a03ea89b | 11389 | fi |
b61ff9c8 | 11390 | rm -f conftest.err conftest.$ac_objext \ |
a03ea89b BM |
11391 | conftest$ac_exeext conftest.$ac_ext |
11392 | ||
11393 | fi | |
b61ff9c8 BS |
11394 | echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 |
11395 | echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 | |
a03ea89b BM |
11396 | if test $am_cv_langinfo_codeset = yes; then |
11397 | ||
11398 | cat >>confdefs.h <<\_ACEOF | |
11399 | #define HAVE_LANGINFO_CODESET 1 | |
11400 | _ACEOF | |
11401 | ||
11402 | fi | |
11403 | ||
11404 | ||
86cf1cbd KG |
11405 | # We will need to find libiberty.h and ansidecl.h |
11406 | saved_CFLAGS="$CFLAGS" | |
11407 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
ad6717df PB |
11408 | |
11409 | ||
11410 | ||
11411 | ||
11412 | ||
11413 | ||
11414 | ||
11415 | ||
11416 | ||
11417 | ||
11418 | ||
11419 | ||
11420 | ||
11421 | ||
11422 | ||
11423 | ||
11424 | ||
11425 | ||
11426 | ||
11427 | ||
11428 | ||
6a257778 | 11429 | |
ad6717df PB |
11430 | |
11431 | ||
0d667716 KG |
11432 | |
11433 | ||
11434 | ||
11435 | ||
11436 | ||
11437 | ||
11438 | ||
11439 | ||
11440 | ||
11441 | ||
367e8319 | 11442 | |
0d667716 KG |
11443 | |
11444 | ||
7391b66c | 11445 | |
ed5b9f96 GK |
11446 | |
11447 | for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd \ | |
11448 | strsignal strstr strverscmp \ | |
11449 | errno snprintf vsnprintf vasprintf malloc realloc calloc \ | |
367e8319 | 11450 | 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 | 11451 | do |
ad6717df | 11452 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
b61ff9c8 BS |
11453 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11454 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11455 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
ba479fd2 NN |
11456 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11457 | else | |
11458 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11459 | /* confdefs.h. */ |
11460 | _ACEOF | |
11461 | cat confdefs.h >>conftest.$ac_ext | |
11462 | cat >>conftest.$ac_ext <<_ACEOF | |
11463 | /* end confdefs.h. */ | |
7afe8c41 KG |
11464 | #undef $ac_tr_decl |
11465 | #define $ac_tr_decl 1 | |
ba479fd2 | 11466 | |
d02af173 | 11467 | #include "ansidecl.h" |
86cf1cbd | 11468 | #include "system.h" |
f31e826b | 11469 | |
ba479fd2 NN |
11470 | int |
11471 | main () | |
11472 | { | |
86cf1cbd KG |
11473 | #ifndef $ac_func |
11474 | char *(*pfn) = (char *(*)) $ac_func ; | |
11475 | #endif | |
ba479fd2 NN |
11476 | ; |
11477 | return 0; | |
11478 | } | |
11479 | _ACEOF | |
11480 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11481 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11482 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11483 | ac_status=$? |
86da66b5 HPN |
11484 | grep -v '^ *+' conftest.er1 >conftest.err |
11485 | rm -f conftest.er1 | |
11486 | cat conftest.err >&5 | |
ba479fd2 | 11487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11488 | (exit $ac_status); } && |
11489 | { ac_try='test -z "$ac_c_werror_flag" | |
11490 | || test ! -s conftest.err' | |
11491 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11492 | (eval $ac_try) 2>&5 | |
11493 | ac_status=$? | |
11494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11495 | (exit $ac_status); }; } && | |
11496 | { ac_try='test -s conftest.$ac_objext' | |
11497 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11498 | (eval $ac_try) 2>&5 | |
11499 | ac_status=$? | |
11500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11501 | (exit $ac_status); }; }; then | |
f31e826b | 11502 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11503 | else |
ba479fd2 NN |
11504 | echo "$as_me: failed program was:" >&5 |
11505 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11506 | ||
b61ff9c8 | 11507 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 11508 | fi |
b61ff9c8 | 11509 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11510 | fi |
11511 | ||
f31e826b | 11512 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
b61ff9c8 BS |
11513 | echo "$as_me:$LINENO: result: yes" >&5 |
11514 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11515 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11516 | _ACEOF |
11517 | ||
81bf3d9e | 11518 | else |
b61ff9c8 BS |
11519 | echo "$as_me:$LINENO: result: no" >&5 |
11520 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11521 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11522 | _ACEOF |
11523 | ||
81bf3d9e RH |
11524 | fi |
11525 | ||
11526 | done | |
ba479fd2 | 11527 | |
ba479fd2 | 11528 | |
ba479fd2 | 11529 | |
81bf3d9e | 11530 | |
81bf3d9e RH |
11531 | |
11532 | for ac_func in getrlimit setrlimit getrusage | |
11533 | do | |
ad6717df | 11534 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
b61ff9c8 BS |
11535 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11536 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11537 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
ba479fd2 NN |
11538 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11539 | else | |
11540 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11541 | /* confdefs.h. */ |
11542 | _ACEOF | |
11543 | cat confdefs.h >>conftest.$ac_ext | |
11544 | cat >>conftest.$ac_ext <<_ACEOF | |
11545 | /* end confdefs.h. */ | |
7afe8c41 KG |
11546 | #undef $ac_tr_decl |
11547 | #define $ac_tr_decl 1 | |
ba479fd2 | 11548 | |
d02af173 | 11549 | #include "ansidecl.h" |
86cf1cbd | 11550 | #include "system.h" |
81bf3d9e RH |
11551 | #ifdef HAVE_SYS_RESOURCE_H |
11552 | #include <sys/resource.h> | |
11553 | #endif | |
11554 | ||
f31e826b | 11555 | |
ba479fd2 NN |
11556 | int |
11557 | main () | |
11558 | { | |
86cf1cbd KG |
11559 | #ifndef $ac_func |
11560 | char *(*pfn) = (char *(*)) $ac_func ; | |
11561 | #endif | |
ba479fd2 NN |
11562 | ; |
11563 | return 0; | |
11564 | } | |
11565 | _ACEOF | |
11566 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11567 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11568 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11569 | ac_status=$? |
86da66b5 HPN |
11570 | grep -v '^ *+' conftest.er1 >conftest.err |
11571 | rm -f conftest.er1 | |
11572 | cat conftest.err >&5 | |
ba479fd2 | 11573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11574 | (exit $ac_status); } && |
11575 | { ac_try='test -z "$ac_c_werror_flag" | |
11576 | || test ! -s conftest.err' | |
11577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11578 | (eval $ac_try) 2>&5 | |
11579 | ac_status=$? | |
11580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11581 | (exit $ac_status); }; } && | |
11582 | { ac_try='test -s conftest.$ac_objext' | |
11583 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11584 | (eval $ac_try) 2>&5 | |
11585 | ac_status=$? | |
11586 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11587 | (exit $ac_status); }; }; then | |
f31e826b | 11588 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 11589 | else |
ba479fd2 NN |
11590 | echo "$as_me: failed program was:" >&5 |
11591 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11592 | ||
b61ff9c8 | 11593 | eval "gcc_cv_have_decl_$ac_func=no" |
81bf3d9e | 11594 | fi |
b61ff9c8 | 11595 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
81bf3d9e RH |
11596 | fi |
11597 | ||
f31e826b | 11598 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
b61ff9c8 BS |
11599 | echo "$as_me:$LINENO: result: yes" >&5 |
11600 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
86cf1cbd | 11601 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11602 | _ACEOF |
11603 | ||
81bf3d9e | 11604 | else |
b61ff9c8 BS |
11605 | echo "$as_me:$LINENO: result: no" >&5 |
11606 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
f31e826b | 11607 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11608 | _ACEOF |
11609 | ||
81bf3d9e RH |
11610 | fi |
11611 | ||
11612 | done | |
86cf1cbd | 11613 | |
81bf3d9e | 11614 | |
ba479fd2 | 11615 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
11616 | /* confdefs.h. */ |
11617 | _ACEOF | |
11618 | cat confdefs.h >>conftest.$ac_ext | |
11619 | cat >>conftest.$ac_ext <<_ACEOF | |
11620 | /* end confdefs.h. */ | |
b2522d2b HPN |
11621 | |
11622 | #include "ansidecl.h" | |
11623 | #include "system.h" | |
11624 | #ifdef HAVE_SYS_RESOURCE_H | |
11625 | #include <sys/resource.h> | |
11626 | #endif | |
11627 | ||
ba479fd2 NN |
11628 | int |
11629 | main () | |
11630 | { | |
b2522d2b | 11631 | rlim_t l = 0; |
ba479fd2 NN |
11632 | ; |
11633 | return 0; | |
11634 | } | |
11635 | _ACEOF | |
11636 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11637 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11638 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11639 | ac_status=$? |
86da66b5 HPN |
11640 | grep -v '^ *+' conftest.er1 >conftest.err |
11641 | rm -f conftest.er1 | |
11642 | cat conftest.err >&5 | |
ba479fd2 | 11643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11644 | (exit $ac_status); } && |
11645 | { ac_try='test -z "$ac_c_werror_flag" | |
11646 | || test ! -s conftest.err' | |
11647 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11648 | (eval $ac_try) 2>&5 | |
11649 | ac_status=$? | |
11650 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11651 | (exit $ac_status); }; } && | |
11652 | { ac_try='test -s conftest.$ac_objext' | |
11653 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11654 | (eval $ac_try) 2>&5 | |
11655 | ac_status=$? | |
11656 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11657 | (exit $ac_status); }; }; then | |
b2522d2b HPN |
11658 | : |
11659 | else | |
ba479fd2 NN |
11660 | echo "$as_me: failed program was:" >&5 |
11661 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11662 | ||
11663 | ||
11664 | cat >>confdefs.h <<\_ACEOF | |
b2522d2b | 11665 | #define rlim_t long |
ba479fd2 | 11666 | _ACEOF |
b2522d2b HPN |
11667 | |
11668 | fi | |
b61ff9c8 | 11669 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
b2522d2b | 11670 | |
2102b2fe RS |
11671 | # On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible |
11672 | # FREAD and FWRITE macros. Fortunately, for GCC's single usage of ldgetname | |
11673 | # in collect2.c, <fcntl.h> isn't visible, but the configure test below needs | |
11674 | # to undef these macros to get the correct value for HAVE_DECL_LDGETNAME. | |
ad6717df | 11675 | |
351df804 | 11676 | for ac_func in ldgetname |
c1800ec8 | 11677 | do |
ad6717df | 11678 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
b61ff9c8 BS |
11679 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11680 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11681 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
ba479fd2 NN |
11682 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11683 | else | |
11684 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11685 | /* confdefs.h. */ |
11686 | _ACEOF | |
11687 | cat confdefs.h >>conftest.$ac_ext | |
11688 | cat >>conftest.$ac_ext <<_ACEOF | |
11689 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11690 | #undef $ac_tr_decl |
11691 | #define $ac_tr_decl 1 | |
ba479fd2 | 11692 | |
351df804 KG |
11693 | #include "ansidecl.h" |
11694 | #include "system.h" | |
11695 | #ifdef HAVE_LDFCN_H | |
2102b2fe RS |
11696 | #undef FREAD |
11697 | #undef FWRITE | |
351df804 KG |
11698 | #include <ldfcn.h> |
11699 | #endif | |
11700 | ||
11701 | ||
ba479fd2 NN |
11702 | int |
11703 | main () | |
11704 | { | |
351df804 KG |
11705 | #ifndef $ac_func |
11706 | char *(*pfn) = (char *(*)) $ac_func ; | |
11707 | #endif | |
ba479fd2 NN |
11708 | ; |
11709 | return 0; | |
11710 | } | |
11711 | _ACEOF | |
11712 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11713 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11714 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11715 | ac_status=$? |
86da66b5 HPN |
11716 | grep -v '^ *+' conftest.er1 >conftest.err |
11717 | rm -f conftest.er1 | |
11718 | cat conftest.err >&5 | |
ba479fd2 | 11719 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11720 | (exit $ac_status); } && |
11721 | { ac_try='test -z "$ac_c_werror_flag" | |
11722 | || test ! -s conftest.err' | |
11723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11724 | (eval $ac_try) 2>&5 | |
11725 | ac_status=$? | |
11726 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11727 | (exit $ac_status); }; } && | |
11728 | { ac_try='test -s conftest.$ac_objext' | |
11729 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11730 | (eval $ac_try) 2>&5 | |
11731 | ac_status=$? | |
11732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11733 | (exit $ac_status); }; }; then | |
351df804 KG |
11734 | eval "gcc_cv_have_decl_$ac_func=yes" |
11735 | else | |
ba479fd2 NN |
11736 | echo "$as_me: failed program was:" >&5 |
11737 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11738 | ||
b61ff9c8 | 11739 | eval "gcc_cv_have_decl_$ac_func=no" |
351df804 | 11740 | fi |
b61ff9c8 | 11741 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
351df804 KG |
11742 | fi |
11743 | ||
11744 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
b61ff9c8 BS |
11745 | echo "$as_me:$LINENO: result: yes" >&5 |
11746 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11747 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11748 | _ACEOF |
11749 | ||
351df804 | 11750 | else |
b61ff9c8 BS |
11751 | echo "$as_me:$LINENO: result: no" >&5 |
11752 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
351df804 | 11753 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11754 | _ACEOF |
11755 | ||
351df804 KG |
11756 | fi |
11757 | ||
11758 | done | |
ba479fd2 | 11759 | |
351df804 KG |
11760 | |
11761 | ||
11762 | for ac_func in times | |
11763 | do | |
ad6717df | 11764 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` |
b61ff9c8 BS |
11765 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11766 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11767 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
ba479fd2 NN |
11768 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11769 | else | |
11770 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11771 | /* confdefs.h. */ |
11772 | _ACEOF | |
11773 | cat confdefs.h >>conftest.$ac_ext | |
11774 | cat >>conftest.$ac_ext <<_ACEOF | |
11775 | /* end confdefs.h. */ | |
351df804 KG |
11776 | #undef $ac_tr_decl |
11777 | #define $ac_tr_decl 1 | |
ba479fd2 | 11778 | |
c1800ec8 ZW |
11779 | #include "ansidecl.h" |
11780 | #include "system.h" | |
11781 | #ifdef HAVE_SYS_TIMES_H | |
11782 | #include <sys/times.h> | |
11783 | #endif | |
11784 | ||
11785 | ||
ba479fd2 NN |
11786 | int |
11787 | main () | |
11788 | { | |
c1800ec8 ZW |
11789 | #ifndef $ac_func |
11790 | char *(*pfn) = (char *(*)) $ac_func ; | |
11791 | #endif | |
ba479fd2 NN |
11792 | ; |
11793 | return 0; | |
11794 | } | |
11795 | _ACEOF | |
11796 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11797 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11798 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11799 | ac_status=$? |
86da66b5 HPN |
11800 | grep -v '^ *+' conftest.er1 >conftest.err |
11801 | rm -f conftest.er1 | |
11802 | cat conftest.err >&5 | |
ba479fd2 | 11803 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11804 | (exit $ac_status); } && |
11805 | { ac_try='test -z "$ac_c_werror_flag" | |
11806 | || test ! -s conftest.err' | |
11807 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11808 | (eval $ac_try) 2>&5 | |
11809 | ac_status=$? | |
11810 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11811 | (exit $ac_status); }; } && | |
11812 | { ac_try='test -s conftest.$ac_objext' | |
11813 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11814 | (eval $ac_try) 2>&5 | |
11815 | ac_status=$? | |
11816 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11817 | (exit $ac_status); }; }; then | |
2f41c1d6 PB |
11818 | eval "gcc_cv_have_decl_$ac_func=yes" |
11819 | else | |
11820 | echo "$as_me: failed program was:" >&5 | |
11821 | sed 's/^/| /' conftest.$ac_ext >&5 | |
ab22c1fa | 11822 | |
b61ff9c8 | 11823 | eval "gcc_cv_have_decl_$ac_func=no" |
2f41c1d6 | 11824 | fi |
b61ff9c8 | 11825 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 ZW |
11826 | fi |
11827 | ||
11828 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
b61ff9c8 BS |
11829 | echo "$as_me:$LINENO: result: yes" >&5 |
11830 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11831 | #define $ac_tr_decl 1 |
ba479fd2 NN |
11832 | _ACEOF |
11833 | ||
c1800ec8 | 11834 | else |
b61ff9c8 BS |
11835 | echo "$as_me:$LINENO: result: no" >&5 |
11836 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
c1800ec8 | 11837 | #define $ac_tr_decl 0 |
ba479fd2 NN |
11838 | _ACEOF |
11839 | ||
c1800ec8 ZW |
11840 | fi |
11841 | ||
11842 | done | |
c1800ec8 ZW |
11843 | |
11844 | ||
4f6d8cc8 GK |
11845 | |
11846 | for ac_func in sigaltstack | |
11847 | do | |
11848 | ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` | |
b61ff9c8 BS |
11849 | echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 |
11850 | echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6 | |
11851 | if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then | |
4f6d8cc8 GK |
11852 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
11853 | else | |
11854 | cat >conftest.$ac_ext <<_ACEOF | |
11855 | /* confdefs.h. */ | |
11856 | _ACEOF | |
11857 | cat confdefs.h >>conftest.$ac_ext | |
11858 | cat >>conftest.$ac_ext <<_ACEOF | |
11859 | /* end confdefs.h. */ | |
11860 | #undef $ac_tr_decl | |
11861 | #define $ac_tr_decl 1 | |
11862 | ||
11863 | #include "ansidecl.h" | |
11864 | #include "system.h" | |
11865 | #include <signal.h> | |
11866 | ||
11867 | ||
11868 | int | |
11869 | main () | |
11870 | { | |
11871 | #ifndef $ac_func | |
11872 | char *(*pfn) = (char *(*)) $ac_func ; | |
11873 | #endif | |
11874 | ; | |
11875 | return 0; | |
11876 | } | |
11877 | _ACEOF | |
11878 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11879 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11880 | (eval $ac_compile) 2>conftest.er1 | |
4f6d8cc8 GK |
11881 | ac_status=$? |
11882 | grep -v '^ *+' conftest.er1 >conftest.err | |
11883 | rm -f conftest.er1 | |
11884 | cat conftest.err >&5 | |
11885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
11886 | (exit $ac_status); } && |
11887 | { ac_try='test -z "$ac_c_werror_flag" | |
11888 | || test ! -s conftest.err' | |
11889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11890 | (eval $ac_try) 2>&5 | |
11891 | ac_status=$? | |
11892 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11893 | (exit $ac_status); }; } && | |
11894 | { ac_try='test -s conftest.$ac_objext' | |
11895 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11896 | (eval $ac_try) 2>&5 | |
11897 | ac_status=$? | |
11898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11899 | (exit $ac_status); }; }; then | |
8b1f719a PB |
11900 | eval "gcc_cv_have_decl_$ac_func=yes" |
11901 | else | |
11902 | echo "$as_me: failed program was:" >&5 | |
11903 | sed 's/^/| /' conftest.$ac_ext >&5 | |
4f6d8cc8 | 11904 | |
b61ff9c8 | 11905 | eval "gcc_cv_have_decl_$ac_func=no" |
4f6d8cc8 | 11906 | fi |
b61ff9c8 | 11907 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 GK |
11908 | fi |
11909 | ||
11910 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
b61ff9c8 BS |
11911 | echo "$as_me:$LINENO: result: yes" >&5 |
11912 | echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
11913 | #define $ac_tr_decl 1 |
11914 | _ACEOF | |
11915 | ||
11916 | else | |
b61ff9c8 BS |
11917 | echo "$as_me:$LINENO: result: no" >&5 |
11918 | echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF | |
4f6d8cc8 GK |
11919 | #define $ac_tr_decl 0 |
11920 | _ACEOF | |
11921 | ||
11922 | fi | |
11923 | ||
11924 | done | |
11925 | ||
11926 | ||
c1800ec8 | 11927 | # More time-related stuff. |
b61ff9c8 BS |
11928 | echo "$as_me:$LINENO: checking for struct tms" >&5 |
11929 | echo $ECHO_N "checking for struct tms... $ECHO_C" >&6 | |
ba479fd2 NN |
11930 | if test "${ac_cv_struct_tms+set}" = set; then |
11931 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
11932 | else | |
11933 | ||
11934 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
11935 | /* confdefs.h. */ |
11936 | _ACEOF | |
11937 | cat confdefs.h >>conftest.$ac_ext | |
11938 | cat >>conftest.$ac_ext <<_ACEOF | |
11939 | /* end confdefs.h. */ | |
c1800ec8 ZW |
11940 | |
11941 | #include "ansidecl.h" | |
11942 | #include "system.h" | |
11943 | #ifdef HAVE_SYS_TIMES_H | |
11944 | #include <sys/times.h> | |
11945 | #endif | |
11946 | ||
ba479fd2 NN |
11947 | int |
11948 | main () | |
11949 | { | |
c1800ec8 | 11950 | struct tms tms; |
ba479fd2 NN |
11951 | ; |
11952 | return 0; | |
11953 | } | |
11954 | _ACEOF | |
11955 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
11956 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
11957 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 11958 | ac_status=$? |
86da66b5 HPN |
11959 | grep -v '^ *+' conftest.er1 >conftest.err |
11960 | rm -f conftest.er1 | |
11961 | cat conftest.err >&5 | |
ba479fd2 | 11962 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
11963 | (exit $ac_status); } && |
11964 | { ac_try='test -z "$ac_c_werror_flag" | |
11965 | || test ! -s conftest.err' | |
11966 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11967 | (eval $ac_try) 2>&5 | |
11968 | ac_status=$? | |
11969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11970 | (exit $ac_status); }; } && | |
11971 | { ac_try='test -s conftest.$ac_objext' | |
11972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
11973 | (eval $ac_try) 2>&5 | |
11974 | ac_status=$? | |
11975 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
11976 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
11977 | ac_cv_struct_tms=yes |
11978 | else | |
ba479fd2 NN |
11979 | echo "$as_me: failed program was:" >&5 |
11980 | sed 's/^/| /' conftest.$ac_ext >&5 | |
11981 | ||
b61ff9c8 | 11982 | ac_cv_struct_tms=no |
c1800ec8 | 11983 | fi |
b61ff9c8 | 11984 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 11985 | fi |
b61ff9c8 BS |
11986 | echo "$as_me:$LINENO: result: $ac_cv_struct_tms" >&5 |
11987 | echo "${ECHO_T}$ac_cv_struct_tms" >&6 | |
63cf211a | 11988 | if test $ac_cv_struct_tms = yes; then |
ba479fd2 NN |
11989 | |
11990 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 11991 | #define HAVE_STRUCT_TMS 1 |
ba479fd2 | 11992 | _ACEOF |
c1800ec8 ZW |
11993 | |
11994 | fi | |
11995 | ||
11996 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
11997 | # revisit after autoconf 2.50. | |
b61ff9c8 BS |
11998 | echo "$as_me:$LINENO: checking for clock_t" >&5 |
11999 | echo $ECHO_N "checking for clock_t... $ECHO_C" >&6 | |
ba479fd2 NN |
12000 | if test "${gcc_cv_type_clock_t+set}" = set; then |
12001 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12002 | else | |
12003 | ||
12004 | cat >conftest.$ac_ext <<_ACEOF | |
ba479fd2 NN |
12005 | /* confdefs.h. */ |
12006 | _ACEOF | |
12007 | cat confdefs.h >>conftest.$ac_ext | |
12008 | cat >>conftest.$ac_ext <<_ACEOF | |
12009 | /* end confdefs.h. */ | |
c1800ec8 ZW |
12010 | |
12011 | #include "ansidecl.h" | |
12012 | #include "system.h" | |
12013 | ||
ba479fd2 NN |
12014 | int |
12015 | main () | |
12016 | { | |
c1800ec8 | 12017 | clock_t x; |
ba479fd2 NN |
12018 | ; |
12019 | return 0; | |
12020 | } | |
12021 | _ACEOF | |
12022 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
12023 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
12024 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 12025 | ac_status=$? |
86da66b5 HPN |
12026 | grep -v '^ *+' conftest.er1 >conftest.err |
12027 | rm -f conftest.er1 | |
12028 | cat conftest.err >&5 | |
ba479fd2 | 12029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
12030 | (exit $ac_status); } && |
12031 | { ac_try='test -z "$ac_c_werror_flag" | |
12032 | || test ! -s conftest.err' | |
12033 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12034 | (eval $ac_try) 2>&5 | |
12035 | ac_status=$? | |
12036 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12037 | (exit $ac_status); }; } && | |
12038 | { ac_try='test -s conftest.$ac_objext' | |
12039 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12040 | (eval $ac_try) 2>&5 | |
12041 | ac_status=$? | |
12042 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12043 | (exit $ac_status); }; }; then | |
c1800ec8 ZW |
12044 | gcc_cv_type_clock_t=yes |
12045 | else | |
ba479fd2 NN |
12046 | echo "$as_me: failed program was:" >&5 |
12047 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12048 | ||
b61ff9c8 | 12049 | gcc_cv_type_clock_t=no |
c1800ec8 | 12050 | fi |
b61ff9c8 | 12051 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
c1800ec8 | 12052 | fi |
b61ff9c8 BS |
12053 | echo "$as_me:$LINENO: result: $gcc_cv_type_clock_t" >&5 |
12054 | echo "${ECHO_T}$gcc_cv_type_clock_t" >&6 | |
63cf211a | 12055 | if test $gcc_cv_type_clock_t = yes; then |
ba479fd2 NN |
12056 | |
12057 | cat >>confdefs.h <<\_ACEOF | |
c1800ec8 | 12058 | #define HAVE_CLOCK_T 1 |
ba479fd2 | 12059 | _ACEOF |
c1800ec8 ZW |
12060 | |
12061 | fi | |
12062 | ||
eb70d86d AS |
12063 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
12064 | CFLAGS="$saved_CFLAGS" | |
12065 | ||
b61ff9c8 | 12066 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
07cf4226 | 12067 | if test "${enable_initfini_array+set}" = set; then |
b61ff9c8 BS |
12068 | enableval="$enable_initfini_array" |
12069 | ||
07cf4226 | 12070 | else |
ba479fd2 | 12071 | |
b61ff9c8 BS |
12072 | echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5 |
12073 | echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6 | |
ba479fd2 NN |
12074 | if test "${gcc_cv_initfini_array+set}" = set; then |
12075 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
07cf4226 | 12076 | else |
eb70d86d | 12077 | if test "$cross_compiling" = yes; then |
918c4fe4 | 12078 | gcc_cv_initfini_array=no |
eb70d86d | 12079 | else |
ba479fd2 | 12080 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12081 | /* confdefs.h. */ |
12082 | _ACEOF | |
12083 | cat confdefs.h >>conftest.$ac_ext | |
12084 | cat >>conftest.$ac_ext <<_ACEOF | |
12085 | /* end confdefs.h. */ | |
eb70d86d | 12086 | |
07cf4226 DM |
12087 | static int x = -1; |
12088 | int main (void) { return x; } | |
12089 | int foo (void) { x = 0; } | |
12090 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
ba479fd2 NN |
12091 | _ACEOF |
12092 | rm -f conftest$ac_exeext | |
b61ff9c8 BS |
12093 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
12094 | (eval $ac_link) 2>&5 | |
ba479fd2 NN |
12095 | ac_status=$? |
12096 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12097 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
b61ff9c8 BS |
12098 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12099 | (eval $ac_try) 2>&5 | |
ba479fd2 NN |
12100 | ac_status=$? |
12101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12102 | (exit $ac_status); }; }; then | |
918c4fe4 | 12103 | gcc_cv_initfini_array=yes |
eb70d86d | 12104 | else |
ba479fd2 NN |
12105 | echo "$as_me: program exited with status $ac_status" >&5 |
12106 | echo "$as_me: failed program was:" >&5 | |
12107 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12108 | ||
12109 | ( exit $ac_status ) | |
12110 | gcc_cv_initfini_array=no | |
eb70d86d | 12111 | fi |
b61ff9c8 | 12112 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext |
eb70d86d | 12113 | fi |
07cf4226 | 12114 | fi |
b61ff9c8 BS |
12115 | echo "$as_me:$LINENO: result: $gcc_cv_initfini_array" >&5 |
12116 | echo "${ECHO_T}$gcc_cv_initfini_array" >&6 | |
eb70d86d | 12117 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 12118 | |
b61ff9c8 | 12119 | fi; |
63cf211a | 12120 | if test $enable_initfini_array = yes; then |
ba479fd2 NN |
12121 | |
12122 | cat >>confdefs.h <<\_ACEOF | |
eb70d86d | 12123 | #define HAVE_INITFINI_ARRAY 1 |
ba479fd2 | 12124 | _ACEOF |
07cf4226 | 12125 | |
eb70d86d | 12126 | fi |
81bf3d9e | 12127 | |
ba479fd2 | 12128 | # mkdir takes a single argument on some systems. |
b61ff9c8 BS |
12129 | echo "$as_me:$LINENO: checking if mkdir takes one argument" >&5 |
12130 | echo $ECHO_N "checking if mkdir takes one argument... $ECHO_C" >&6 | |
ba479fd2 NN |
12131 | if test "${gcc_cv_mkdir_takes_one_arg+set}" = set; then |
12132 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
75923b2f | 12133 | else |
ba479fd2 | 12134 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12135 | /* confdefs.h. */ |
12136 | _ACEOF | |
12137 | cat confdefs.h >>conftest.$ac_ext | |
12138 | cat >>conftest.$ac_ext <<_ACEOF | |
12139 | /* end confdefs.h. */ | |
75923b2f MK |
12140 | |
12141 | #include <sys/types.h> | |
12142 | #ifdef HAVE_SYS_STAT_H | |
12143 | # include <sys/stat.h> | |
12144 | #endif | |
12145 | #ifdef HAVE_UNISTD_H | |
12146 | # include <unistd.h> | |
12147 | #endif | |
12148 | #ifdef HAVE_DIRECT_H | |
12149 | # include <direct.h> | |
12150 | #endif | |
ba479fd2 NN |
12151 | int |
12152 | main () | |
12153 | { | |
75923b2f | 12154 | mkdir ("foo", 0); |
ba479fd2 NN |
12155 | ; |
12156 | return 0; | |
12157 | } | |
12158 | _ACEOF | |
12159 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
12160 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
12161 | (eval $ac_compile) 2>conftest.er1 | |
ba479fd2 | 12162 | ac_status=$? |
86da66b5 HPN |
12163 | grep -v '^ *+' conftest.er1 >conftest.err |
12164 | rm -f conftest.er1 | |
12165 | cat conftest.err >&5 | |
ba479fd2 | 12166 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
12167 | (exit $ac_status); } && |
12168 | { ac_try='test -z "$ac_c_werror_flag" | |
12169 | || test ! -s conftest.err' | |
12170 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12171 | (eval $ac_try) 2>&5 | |
12172 | ac_status=$? | |
12173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12174 | (exit $ac_status); }; } && | |
12175 | { ac_try='test -s conftest.$ac_objext' | |
12176 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12177 | (eval $ac_try) 2>&5 | |
12178 | ac_status=$? | |
12179 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12180 | (exit $ac_status); }; }; then | |
75923b2f MK |
12181 | gcc_cv_mkdir_takes_one_arg=no |
12182 | else | |
ba479fd2 NN |
12183 | echo "$as_me: failed program was:" >&5 |
12184 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12185 | ||
b61ff9c8 | 12186 | gcc_cv_mkdir_takes_one_arg=yes |
75923b2f | 12187 | fi |
b61ff9c8 | 12188 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
75923b2f | 12189 | fi |
b61ff9c8 BS |
12190 | echo "$as_me:$LINENO: result: $gcc_cv_mkdir_takes_one_arg" >&5 |
12191 | echo "${ECHO_T}$gcc_cv_mkdir_takes_one_arg" >&6 | |
63cf211a | 12192 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then |
ba479fd2 NN |
12193 | |
12194 | cat >>confdefs.h <<\_ACEOF | |
75923b2f | 12195 | #define MKDIR_TAKES_ONE_ARG 1 |
ba479fd2 | 12196 | _ACEOF |
75923b2f MK |
12197 | |
12198 | fi | |
12199 | ||
12200 | ||
861bb6c1 JL |
12201 | # File extensions |
12202 | manext='.1' | |
12203 | objext='.o' | |
12204 | ||
12205 | ||
12206 | ||
4977bab6 | 12207 | # With Setjmp/Longjmp based exception handling. |
b61ff9c8 | 12208 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. |
4977bab6 | 12209 | if test "${enable_sjlj_exceptions+set}" = set; then |
b61ff9c8 BS |
12210 | enableval="$enable_sjlj_exceptions" |
12211 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
63cf211a | 12212 | |
ba479fd2 NN |
12213 | cat >>confdefs.h <<_ACEOF |
12214 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj | |
12215 | _ACEOF | |
4977bab6 | 12216 | |
b61ff9c8 | 12217 | fi; |
4977bab6 | 12218 | |
443728bb L |
12219 | # For platforms with the unwind ABI which includes an unwind library, |
12220 | # libunwind, we can choose to use the system libunwind. | |
4977bab6 | 12221 | |
b61ff9c8 | 12222 | # Check whether --with-system-libunwind or --without-system-libunwind was given. |
443728bb | 12223 | if test "${with_system_libunwind+set}" = set; then |
b61ff9c8 | 12224 | withval="$with_system_libunwind" |
4977bab6 | 12225 | |
b61ff9c8 | 12226 | fi; |
4977bab6 | 12227 | |
e64f5acf SE |
12228 | # config.gcc also contains tests of with_system_libunwind. |
12229 | if test x$with_system_libunwind = xyes; then | |
12230 | ||
12231 | cat >>confdefs.h <<\_ACEOF | |
12232 | #define HAVE_GETIPINFO 1 | |
12233 | _ACEOF | |
12234 | ||
12235 | fi | |
12236 | ||
34a86c2b NN |
12237 | # -------------------------------------------------------- |
12238 | # Build, host, and target specific configuration fragments | |
12239 | # -------------------------------------------------------- | |
12240 | ||
5b28c537 NN |
12241 | # Collect build-machine-specific information. |
12242 | . ${srcdir}/config.build | |
12243 | ||
a89ea0df NN |
12244 | # Collect host-machine-specific information. |
12245 | . ${srcdir}/config.host | |
12246 | ||
ef69da62 | 12247 | target_gtfiles= |
a89ea0df NN |
12248 | |
12249 | # Collect target-machine-specific information. | |
8ad9fb33 | 12250 | . ${srcdir}/config.gcc |
861bb6c1 JL |
12251 | |
12252 | extra_objs="${host_extra_objs} ${extra_objs}" | |
30500d84 | 12253 | extra_gcc_objs="${host_extra_gcc_objs} ${extra_gcc_objs}" |
861bb6c1 JL |
12254 | |
12255 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 12256 | if test x"$tm_file" = x |
861bb6c1 JL |
12257 | then tm_file=$cpu_type/$cpu_type.h; fi |
12258 | ||
6b2adea9 | 12259 | if test x"$extra_headers" = x |
861bb6c1 JL |
12260 | then extra_headers=; fi |
12261 | ||
75bffa71 | 12262 | if test x$md_file = x |
e98e406f | 12263 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 12264 | |
75bffa71 | 12265 | if test x$out_file = x |
861bb6c1 JL |
12266 | then out_file=$cpu_type/$cpu_type.c; fi |
12267 | ||
75bffa71 | 12268 | if test x"$tmake_file" = x |
861bb6c1 JL |
12269 | then tmake_file=$cpu_type/t-$cpu_type |
12270 | fi | |
12271 | ||
90e6a802 | 12272 | if test x"$dwarf2" = xyes |
756ee602 | 12273 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
12274 | fi |
12275 | ||
861bb6c1 | 12276 | # Say what files are being used for the output code and MD file. |
11642c3a | 12277 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
12278 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
12279 | ||
11642c3a | 12280 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
12281 | # about them and drop them. |
12282 | ||
11642c3a ZW |
12283 | bx= |
12284 | for x in $build_xm_file; do | |
12285 | if test -f $srcdir/config/$x | |
12286 | then bx="$bx $x" | |
ba479fd2 NN |
12287 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12288 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12289 | fi |
12290 | done | |
12291 | build_xm_file="$bx" | |
12292 | ||
12293 | hx= | |
12294 | for x in $host_xm_file; do | |
12295 | if test -f $srcdir/config/$x | |
12296 | then hx="$hx $x" | |
ba479fd2 NN |
12297 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12298 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12299 | fi |
12300 | done | |
12301 | host_xm_file="$hx" | |
12302 | ||
12303 | tx= | |
12304 | for x in $xm_file; do | |
12305 | if test -f $srcdir/config/$x | |
12306 | then tx="$tx $x" | |
ba479fd2 NN |
12307 | else { echo "$as_me:$LINENO: WARNING: $srcdir/config/$x does not exist." >&5 |
12308 | echo "$as_me: WARNING: $srcdir/config/$x does not exist." >&2;} | |
11642c3a ZW |
12309 | fi |
12310 | done | |
12311 | xm_file="$tx" | |
12312 | ||
861bb6c1 JL |
12313 | count=a |
12314 | for f in $tm_file; do | |
12315 | count=${count}x | |
12316 | done | |
75bffa71 | 12317 | if test $count = ax; then |
861bb6c1 JL |
12318 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
12319 | else | |
12320 | echo "Using the following target machine macro files:" | |
12321 | for f in $tm_file; do | |
12322 | echo " $srcdir/config/$f" | |
12323 | done | |
12324 | fi | |
12325 | ||
4977bab6 | 12326 | if test x$need_64bit_hwint = xyes; then |
ba479fd2 NN |
12327 | |
12328 | cat >>confdefs.h <<\_ACEOF | |
4977bab6 | 12329 | #define NEED_64BIT_HOST_WIDE_INT 1 |
ba479fd2 | 12330 | _ACEOF |
4977bab6 ZW |
12331 | |
12332 | fi | |
12333 | ||
99fa8911 AP |
12334 | if test x$use_long_long_for_widest_fast_int = xyes; then |
12335 | ||
12336 | cat >>confdefs.h <<\_ACEOF | |
12337 | #define USE_LONG_LONG_FOR_WIDEST_FAST_INT 1 | |
12338 | _ACEOF | |
12339 | ||
12340 | fi | |
12341 | ||
861bb6c1 JL |
12342 | count=a |
12343 | for f in $host_xm_file; do | |
12344 | count=${count}x | |
12345 | done | |
11642c3a ZW |
12346 | if test $count = a; then |
12347 | : | |
12348 | elif test $count = ax; then | |
861bb6c1 JL |
12349 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
12350 | else | |
12351 | echo "Using the following host machine macro files:" | |
12352 | for f in $host_xm_file; do | |
12353 | echo " $srcdir/config/$f" | |
12354 | done | |
12355 | fi | |
476d9098 | 12356 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 12357 | |
75bffa71 | 12358 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
12359 | count=a |
12360 | for f in $build_xm_file; do | |
12361 | count=${count}x | |
12362 | done | |
11642c3a ZW |
12363 | if test $count = a; then |
12364 | : | |
12365 | elif test $count = ax; then | |
861bb6c1 JL |
12366 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
12367 | else | |
12368 | echo "Using the following build machine macro files:" | |
12369 | for f in $build_xm_file; do | |
12370 | echo " $srcdir/config/$f" | |
12371 | done | |
12372 | fi | |
12373 | fi | |
12374 | ||
4f6d8cc8 | 12375 | case ${host} in |
b8ec3cc8 | 12376 | powerpc*-*-darwin*) |
b61ff9c8 BS |
12377 | echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5 |
12378 | echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6 | |
4f6d8cc8 GK |
12379 | if test "${gcc_cv_mcontext_underscores+set}" = set; then |
12380 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12381 | else | |
12382 | cat >conftest.$ac_ext <<_ACEOF | |
12383 | ||
ba7da42a | 12384 | #include <sys/cdefs.h> |
de4fb767 | 12385 | #include <sys/signal.h> |
4f6d8cc8 GK |
12386 | #include <ucontext.h> |
12387 | int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; } | |
12388 | ||
12389 | _ACEOF | |
12390 | rm -f conftest.$ac_objext | |
b61ff9c8 BS |
12391 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |
12392 | (eval $ac_compile) 2>conftest.er1 | |
4f6d8cc8 GK |
12393 | ac_status=$? |
12394 | grep -v '^ *+' conftest.er1 >conftest.err | |
12395 | rm -f conftest.er1 | |
12396 | cat conftest.err >&5 | |
12397 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
12398 | (exit $ac_status); } && |
12399 | { ac_try='test -z "$ac_c_werror_flag" | |
12400 | || test ! -s conftest.err' | |
12401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12402 | (eval $ac_try) 2>&5 | |
12403 | ac_status=$? | |
12404 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12405 | (exit $ac_status); }; } && | |
12406 | { ac_try='test -s conftest.$ac_objext' | |
12407 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12408 | (eval $ac_try) 2>&5 | |
12409 | ac_status=$? | |
12410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12411 | (exit $ac_status); }; }; then | |
4f6d8cc8 GK |
12412 | gcc_cv_mcontext_underscores=no |
12413 | else | |
12414 | echo "$as_me: failed program was:" >&5 | |
12415 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12416 | ||
b61ff9c8 | 12417 | gcc_cv_mcontext_underscores=yes |
4f6d8cc8 | 12418 | fi |
b61ff9c8 | 12419 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext |
4f6d8cc8 | 12420 | fi |
b61ff9c8 BS |
12421 | echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5 |
12422 | echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6 | |
4f6d8cc8 GK |
12423 | if test $gcc_cv_mcontext_underscores = yes; then |
12424 | ||
12425 | cat >>confdefs.h <<\_ACEOF | |
12426 | #define HAS_MCONTEXT_T_UNDERSCORES | |
12427 | _ACEOF | |
12428 | ||
12429 | fi | |
12430 | ;; | |
12431 | esac | |
12432 | ||
8bb915b6 NN |
12433 | # --------- |
12434 | # Threading | |
12435 | # --------- | |
12436 | ||
c2e494a8 | 12437 | # Check if a valid thread package |
615be2cf | 12438 | case ${enable_threads} in |
c2e494a8 NN |
12439 | "" | no) |
12440 | # No threads | |
12441 | target_thread_file='single' | |
12442 | ;; | |
12443 | yes) | |
12444 | # default | |
12445 | target_thread_file='single' | |
12446 | ;; | |
18167442 | 12447 | aix | dce | gnat | irix | posix | posix95 | rtems | \ |
d9dced13 | 12448 | single | solaris | vxworks | win32 | mipssde) |
615be2cf | 12449 | target_thread_file=${enable_threads} |
c2e494a8 NN |
12450 | ;; |
12451 | *) | |
615be2cf | 12452 | echo "${enable_threads} is an unknown thread package" 1>&2 |
c2e494a8 NN |
12453 | exit 1 |
12454 | ;; | |
12455 | esac | |
12456 | ||
12457 | if test x${thread_file} = x; then | |
12458 | # No thread file set by target-specific clauses in config.gcc, | |
12459 | # so use file chosen by default logic above | |
12460 | thread_file=${target_thread_file} | |
861bb6c1 JL |
12461 | fi |
12462 | ||
8bb915b6 NN |
12463 | # Make gthr-default.h if we have a thread file. |
12464 | gthread_flags= | |
12465 | if test $thread_file != single; then | |
12466 | rm -f gthr-default.h | |
12467 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h | |
12468 | gthread_flags=-DHAVE_GTHR_DEFAULT | |
12469 | fi | |
12470 | ||
12471 | ||
12472 | # -------- | |
12473 | # UNSORTED | |
12474 | # -------- | |
12475 | ||
18fbf599 | 12476 | use_cxa_atexit=no |
2121a768 JT |
12477 | if test x$enable___cxa_atexit = xyes || \ |
12478 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
18fbf599 | 12479 | if test x$host = x$target; then |
97388150 DS |
12480 | case $host in |
12481 | # mingw32 doesn't have __cxa_atexit but uses atexit registration | |
12482 | # keyed to flag_use_cxa_atexit | |
12483 | *-*-mingw32*) | |
12484 | use_cxa_atexit=yes | |
12485 | ;; | |
12486 | *) | |
b61ff9c8 BS |
12487 | echo "$as_me:$LINENO: checking for __cxa_atexit" >&5 |
12488 | echo $ECHO_N "checking for __cxa_atexit... $ECHO_C" >&6 | |
354b7da5 DH |
12489 | if test "${ac_cv_func___cxa_atexit+set}" = set; then |
12490 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12491 | else | |
12492 | cat >conftest.$ac_ext <<_ACEOF | |
354b7da5 DH |
12493 | /* confdefs.h. */ |
12494 | _ACEOF | |
12495 | cat confdefs.h >>conftest.$ac_ext | |
12496 | cat >>conftest.$ac_ext <<_ACEOF | |
12497 | /* end confdefs.h. */ | |
86da66b5 HPN |
12498 | /* Define __cxa_atexit to an innocuous variant, in case <limits.h> declares __cxa_atexit. |
12499 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
12500 | #define __cxa_atexit innocuous___cxa_atexit | |
12501 | ||
354b7da5 DH |
12502 | /* System header to define __stub macros and hopefully few prototypes, |
12503 | which can conflict with char __cxa_atexit (); below. | |
12504 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
12505 | <limits.h> exists even on freestanding compilers. */ | |
86da66b5 | 12506 | |
354b7da5 DH |
12507 | #ifdef __STDC__ |
12508 | # include <limits.h> | |
12509 | #else | |
12510 | # include <assert.h> | |
12511 | #endif | |
86da66b5 HPN |
12512 | |
12513 | #undef __cxa_atexit | |
12514 | ||
b61ff9c8 | 12515 | /* Override any gcc2 internal prototype to avoid an error. */ |
354b7da5 DH |
12516 | #ifdef __cplusplus |
12517 | extern "C" | |
b61ff9c8 | 12518 | { |
354b7da5 | 12519 | #endif |
b61ff9c8 BS |
12520 | /* We use char because int might match the return type of a gcc2 |
12521 | builtin and then its argument prototype would still apply. */ | |
354b7da5 DH |
12522 | char __cxa_atexit (); |
12523 | /* The GNU C library defines this for functions which it implements | |
12524 | to always fail with ENOSYS. Some functions are actually named | |
12525 | something starting with __ and the normal name is an alias. */ | |
b61ff9c8 | 12526 | #if defined (__stub___cxa_atexit) || defined (__stub_____cxa_atexit) |
354b7da5 | 12527 | choke me |
b61ff9c8 BS |
12528 | #else |
12529 | char (*f) () = __cxa_atexit; | |
12530 | #endif | |
12531 | #ifdef __cplusplus | |
12532 | } | |
354b7da5 DH |
12533 | #endif |
12534 | ||
12535 | int | |
12536 | main () | |
12537 | { | |
b61ff9c8 | 12538 | return f != __cxa_atexit; |
354b7da5 DH |
12539 | ; |
12540 | return 0; | |
12541 | } | |
12542 | _ACEOF | |
12543 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
12544 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
12545 | (eval $ac_link) 2>conftest.er1 | |
354b7da5 | 12546 | ac_status=$? |
86da66b5 HPN |
12547 | grep -v '^ *+' conftest.er1 >conftest.err |
12548 | rm -f conftest.er1 | |
12549 | cat conftest.err >&5 | |
354b7da5 | 12550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
12551 | (exit $ac_status); } && |
12552 | { ac_try='test -z "$ac_c_werror_flag" | |
12553 | || test ! -s conftest.err' | |
12554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12555 | (eval $ac_try) 2>&5 | |
12556 | ac_status=$? | |
12557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12558 | (exit $ac_status); }; } && | |
12559 | { ac_try='test -s conftest$ac_exeext' | |
12560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12561 | (eval $ac_try) 2>&5 | |
12562 | ac_status=$? | |
12563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12564 | (exit $ac_status); }; }; then | |
354b7da5 DH |
12565 | ac_cv_func___cxa_atexit=yes |
12566 | else | |
12567 | echo "$as_me: failed program was:" >&5 | |
12568 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12569 | ||
b61ff9c8 | 12570 | ac_cv_func___cxa_atexit=no |
354b7da5 | 12571 | fi |
b61ff9c8 | 12572 | rm -f conftest.err conftest.$ac_objext \ |
86da66b5 | 12573 | conftest$ac_exeext conftest.$ac_ext |
354b7da5 | 12574 | fi |
b61ff9c8 BS |
12575 | echo "$as_me:$LINENO: result: $ac_cv_func___cxa_atexit" >&5 |
12576 | echo "${ECHO_T}$ac_cv_func___cxa_atexit" >&6 | |
354b7da5 | 12577 | if test $ac_cv_func___cxa_atexit = yes; then |
18fbf599 PB |
12578 | use_cxa_atexit=yes |
12579 | else | |
12580 | echo "__cxa_atexit can't be enabled on this target" | |
12581 | fi | |
12582 | ||
5f60e48f | 12583 | ;; |
97388150 | 12584 | esac |
18fbf599 PB |
12585 | else |
12586 | # We can't check for __cxa_atexit when building a cross, so assume | |
12587 | # it is available | |
12588 | use_cxa_atexit=yes | |
12589 | fi | |
12590 | if test x$use_cxa_atexit = xyes; then | |
ba479fd2 NN |
12591 | |
12592 | cat >>confdefs.h <<\_ACEOF | |
c7b5e395 | 12593 | #define DEFAULT_USE_CXA_ATEXIT 2 |
ba479fd2 | 12594 | _ACEOF |
2121a768 | 12595 | |
18fbf599 | 12596 | fi |
2121a768 JT |
12597 | fi |
12598 | ||
e64f5acf SE |
12599 | use_getipinfo=yes |
12600 | if test x$with_system_libunwind = xyes; then | |
12601 | if test x$host = x$target; then | |
b61ff9c8 BS |
12602 | echo "$as_me:$LINENO: checking for library containing _Unwind_GetIPInfo" >&5 |
12603 | echo $ECHO_N "checking for library containing _Unwind_GetIPInfo... $ECHO_C" >&6 | |
e64f5acf SE |
12604 | if test "${ac_cv_search__Unwind_GetIPInfo+set}" = set; then |
12605 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12606 | else | |
12607 | ac_func_search_save_LIBS=$LIBS | |
b61ff9c8 | 12608 | ac_cv_search__Unwind_GetIPInfo=no |
e64f5acf SE |
12609 | cat >conftest.$ac_ext <<_ACEOF |
12610 | /* confdefs.h. */ | |
12611 | _ACEOF | |
12612 | cat confdefs.h >>conftest.$ac_ext | |
12613 | cat >>conftest.$ac_ext <<_ACEOF | |
12614 | /* end confdefs.h. */ | |
12615 | ||
b61ff9c8 | 12616 | /* Override any gcc2 internal prototype to avoid an error. */ |
e64f5acf SE |
12617 | #ifdef __cplusplus |
12618 | extern "C" | |
12619 | #endif | |
b61ff9c8 BS |
12620 | /* We use char because int might match the return type of a gcc2 |
12621 | builtin and then its argument prototype would still apply. */ | |
e64f5acf SE |
12622 | char _Unwind_GetIPInfo (); |
12623 | int | |
12624 | main () | |
12625 | { | |
b61ff9c8 | 12626 | _Unwind_GetIPInfo (); |
e64f5acf SE |
12627 | ; |
12628 | return 0; | |
12629 | } | |
12630 | _ACEOF | |
b61ff9c8 BS |
12631 | rm -f conftest.$ac_objext conftest$ac_exeext |
12632 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12633 | (eval $ac_link) 2>conftest.er1 | |
e64f5acf SE |
12634 | ac_status=$? |
12635 | grep -v '^ *+' conftest.er1 >conftest.err | |
12636 | rm -f conftest.er1 | |
12637 | cat conftest.err >&5 | |
12638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
12639 | (exit $ac_status); } && |
12640 | { ac_try='test -z "$ac_c_werror_flag" | |
12641 | || test ! -s conftest.err' | |
12642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12643 | (eval $ac_try) 2>&5 | |
12644 | ac_status=$? | |
12645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12646 | (exit $ac_status); }; } && | |
12647 | { ac_try='test -s conftest$ac_exeext' | |
12648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12649 | (eval $ac_try) 2>&5 | |
12650 | ac_status=$? | |
12651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12652 | (exit $ac_status); }; }; then | |
12653 | ac_cv_search__Unwind_GetIPInfo="none required" | |
e64f5acf SE |
12654 | else |
12655 | echo "$as_me: failed program was:" >&5 | |
12656 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12657 | ||
1a4b763e | 12658 | fi |
b61ff9c8 BS |
12659 | rm -f conftest.err conftest.$ac_objext \ |
12660 | conftest$ac_exeext conftest.$ac_ext | |
12661 | if test "$ac_cv_search__Unwind_GetIPInfo" = no; then | |
12662 | for ac_lib in unwind; do | |
12663 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12664 | cat >conftest.$ac_ext <<_ACEOF | |
12665 | /* confdefs.h. */ | |
12666 | _ACEOF | |
12667 | cat confdefs.h >>conftest.$ac_ext | |
12668 | cat >>conftest.$ac_ext <<_ACEOF | |
12669 | /* end confdefs.h. */ | |
2f41c1d6 | 12670 | |
b61ff9c8 BS |
12671 | /* Override any gcc2 internal prototype to avoid an error. */ |
12672 | #ifdef __cplusplus | |
12673 | extern "C" | |
12674 | #endif | |
12675 | /* We use char because int might match the return type of a gcc2 | |
12676 | builtin and then its argument prototype would still apply. */ | |
12677 | char _Unwind_GetIPInfo (); | |
12678 | int | |
12679 | main () | |
12680 | { | |
12681 | _Unwind_GetIPInfo (); | |
12682 | ; | |
12683 | return 0; | |
12684 | } | |
12685 | _ACEOF | |
12686 | rm -f conftest.$ac_objext conftest$ac_exeext | |
12687 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12688 | (eval $ac_link) 2>conftest.er1 | |
12689 | ac_status=$? | |
12690 | grep -v '^ *+' conftest.er1 >conftest.err | |
12691 | rm -f conftest.er1 | |
12692 | cat conftest.err >&5 | |
12693 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12694 | (exit $ac_status); } && | |
12695 | { ac_try='test -z "$ac_c_werror_flag" | |
12696 | || test ! -s conftest.err' | |
12697 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12698 | (eval $ac_try) 2>&5 | |
12699 | ac_status=$? | |
12700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12701 | (exit $ac_status); }; } && | |
12702 | { ac_try='test -s conftest$ac_exeext' | |
12703 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12704 | (eval $ac_try) 2>&5 | |
12705 | ac_status=$? | |
12706 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12707 | (exit $ac_status); }; }; then | |
12708 | ac_cv_search__Unwind_GetIPInfo="-l$ac_lib" | |
12709 | break | |
1a4b763e | 12710 | else |
b61ff9c8 BS |
12711 | echo "$as_me: failed program was:" >&5 |
12712 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12713 | ||
12714 | fi | |
12715 | rm -f conftest.err conftest.$ac_objext \ | |
12716 | conftest$ac_exeext conftest.$ac_ext | |
12717 | done | |
a6ccdbab | 12718 | fi |
a6ccdbab EC |
12719 | LIBS=$ac_func_search_save_LIBS |
12720 | fi | |
b61ff9c8 BS |
12721 | echo "$as_me:$LINENO: result: $ac_cv_search__Unwind_GetIPInfo" >&5 |
12722 | echo "${ECHO_T}$ac_cv_search__Unwind_GetIPInfo" >&6 | |
12723 | if test "$ac_cv_search__Unwind_GetIPInfo" != no; then | |
12724 | test "$ac_cv_search__Unwind_GetIPInfo" = "none required" || LIBS="$ac_cv_search__Unwind_GetIPInfo $LIBS" | |
a6ccdbab EC |
12725 | |
12726 | else | |
12727 | use_getipinfo=no | |
12728 | fi | |
12729 | ||
12730 | fi | |
12731 | fi | |
12732 | ||
12733 | if test x$use_getipinfo = xyes; then | |
12734 | ||
12735 | cat >>confdefs.h <<\_ACEOF | |
12736 | #define HAVE_GETIPINFO 1 | |
e64f5acf SE |
12737 | _ACEOF |
12738 | ||
12739 | else | |
12740 | echo "The system unwind library does not support _Unwind_GetIPInfo." | |
12741 | fi | |
12742 | ||
a5381466 | 12743 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
12744 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
12745 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
ba479fd2 NN |
12746 | |
12747 | ||
12748 | cat >>confdefs.h <<_ACEOF | |
e22340b0 | 12749 | #define EXTRA_MODES_FILE "config/$extra_modes" |
ba479fd2 | 12750 | _ACEOF |
a5381466 ZW |
12751 | |
12752 | fi | |
12753 | ||
75685792 RS |
12754 | # Convert extra_options into a form suitable for Makefile use. |
12755 | extra_opt_files= | |
12756 | for f in $extra_options; do | |
12757 | extra_opt_files="$extra_opt_files \$(srcdir)/config/$f" | |
12758 | done | |
12759 | ||
12760 | ||
b7cb92ad | 12761 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 12762 | # the first file included by config.h. |
4977bab6 | 12763 | # If host=build, it is correct to have bconfig include auto-host.h |
ba479fd2 | 12764 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 12765 | # work to find out the build config parameters. |
75bffa71 | 12766 | if test x$host = x$build |
db81d74a | 12767 | then |
eaf4e618 | 12768 | build_auto=auto-host.h |
b7cb92ad JL |
12769 | else |
12770 | # We create a subdir, then run autoconf in the subdir. | |
12771 | # To prevent recursion we set host and build for the new | |
12772 | # invocation of configure to the build for this invocation | |
ba479fd2 | 12773 | # of configure. |
b7cb92ad JL |
12774 | tempdir=build.$$ |
12775 | rm -rf $tempdir | |
12776 | mkdir $tempdir | |
12777 | cd $tempdir | |
12778 | case ${srcdir} in | |
255b8a49 | 12779 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
12780 | *) realsrcdir=../${srcdir};; |
12781 | esac | |
d920e825 L |
12782 | saved_CFLAGS="${CFLAGS}" |
12783 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
12784 | ${realsrcdir}/configure \ | |
33e70558 | 12785 | --enable-languages=${enable_languages-all} \ |
534d0cc0 | 12786 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 12787 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
12788 | |
12789 | # We just finished tests for the build machine, so rename | |
12790 | # the file auto-build.h in the gcc directory. | |
12791 | mv auto-host.h ../auto-build.h | |
12792 | cd .. | |
12793 | rm -rf $tempdir | |
eaf4e618 | 12794 | build_auto=auto-build.h |
db81d74a RH |
12795 | fi |
12796 | ||
06f0b04c | 12797 | |
eaf4e618 | 12798 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
12799 | tm_p_file="${tm_p_file} tm-preds.h" |
12800 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
12801 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 12802 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 | 12803 | # put this back in temporarily. |
232b67d9 | 12804 | xm_file="auto-host.h ansidecl.h ${xm_file}" |
0056a9b5 | 12805 | |
34a86c2b NN |
12806 | # -------- |
12807 | # UNSORTED | |
12808 | # -------- | |
12809 | ||
cc1e60ea | 12810 | # Compile in configure arguments. |
8105825d | 12811 | if test -f configargs.h ; then |
cc1e60ea | 12812 | # Being re-configured. |
022dae81 | 12813 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
12814 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
12815 | else | |
12816 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
12817 | fi | |
eeae7b41 DJ |
12818 | |
12819 | # Double all backslashes and backslash all quotes to turn | |
12820 | # gcc_config_arguments into a C string. | |
12821 | sed -e 's/\\/\\\\/g; s/"/\\"/g' <<EOF >conftest.out | |
12822 | $gcc_config_arguments | |
12823 | EOF | |
12824 | gcc_config_arguments_str=`cat conftest.out` | |
12825 | rm -f conftest.out | |
12826 | ||
cc1e60ea JM |
12827 | cat > configargs.h <<EOF |
12828 | /* Generated automatically. */ | |
eeae7b41 | 12829 | static const char configuration_arguments[] = "$gcc_config_arguments_str"; |
a6687d2b | 12830 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
12831 | |
12832 | static const struct { | |
12833 | const char *name, *value; | |
12834 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
12835 | EOF |
12836 | ||
ab87f8c8 | 12837 | # Internationalization |
18fc9bd4 RG |
12838 | # If we haven't got the data from the intl directory, |
12839 | # assume NLS is disabled. | |
12840 | USE_NLS=no | |
12841 | LIBINTL= | |
12842 | LIBINTL_DEP= | |
12843 | INCINTL= | |
12844 | XGETTEXT= | |
12845 | GMSGFMT= | |
12846 | POSUB= | |
12847 | ||
12848 | if test -f ../intl/config.intl; then | |
12849 | . ../intl/config.intl | |
12850 | fi | |
b61ff9c8 BS |
12851 | echo "$as_me:$LINENO: checking whether NLS is requested" >&5 |
12852 | echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 | |
18fc9bd4 | 12853 | if test x"$USE_NLS" != xyes; then |
b61ff9c8 BS |
12854 | echo "$as_me:$LINENO: result: no" >&5 |
12855 | echo "${ECHO_T}no" >&6 | |
18fc9bd4 | 12856 | else |
b61ff9c8 BS |
12857 | echo "$as_me:$LINENO: result: yes" >&5 |
12858 | echo "${ECHO_T}yes" >&6 | |
18fc9bd4 RG |
12859 | |
12860 | cat >>confdefs.h <<\_ACEOF | |
12861 | #define ENABLE_NLS 1 | |
12862 | _ACEOF | |
12863 | ||
12864 | ||
b61ff9c8 BS |
12865 | echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 |
12866 | echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 | |
18fc9bd4 RG |
12867 | # Look for .po and .gmo files in the source directory. |
12868 | CATALOGS= | |
12869 | XLINGUAS= | |
12870 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do | |
12871 | # If there aren't any .gmo files the shell will give us the | |
12872 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
12873 | # weeded out. | |
12874 | case "$cat" in *\**) | |
12875 | continue;; | |
12876 | esac | |
12877 | # The quadruple backslash is collapsed to a double backslash | |
12878 | # by the backticks, then collapsed again by the double quotes, | |
12879 | # leaving us with one backslash in the sed expression (right | |
12880 | # before the dot that mustn't act as a wildcard). | |
12881 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` | |
12882 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` | |
12883 | # The user is allowed to set LINGUAS to a list of languages to | |
12884 | # install catalogs for. If it's empty that means "all of them." | |
12885 | if test "x$LINGUAS" = x; then | |
12886 | CATALOGS="$CATALOGS $cat" | |
12887 | XLINGUAS="$XLINGUAS $lang" | |
12888 | else | |
12889 | case "$LINGUAS" in *$lang*) | |
12890 | CATALOGS="$CATALOGS $cat" | |
12891 | XLINGUAS="$XLINGUAS $lang" | |
12892 | ;; | |
12893 | esac | |
12894 | fi | |
12895 | done | |
12896 | LINGUAS="$XLINGUAS" | |
b61ff9c8 BS |
12897 | echo "$as_me:$LINENO: result: $LINGUAS" >&5 |
12898 | echo "${ECHO_T}$LINGUAS" >&6 | |
18fc9bd4 RG |
12899 | |
12900 | ||
12901 | DATADIRNAME=share | |
12902 | ||
12903 | INSTOBJEXT=.mo | |
12904 | ||
12905 | GENCAT=gencat | |
12906 | ||
12907 | CATOBJEXT=.gmo | |
12908 | ||
12909 | fi | |
861bb6c1 | 12910 | |
56694dd9 ZW |
12911 | # If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get |
12912 | # -liconv on the link line twice. | |
12913 | case "$LIBINTL" in *$LIBICONV*) | |
12914 | LIBICONV= ;; | |
12915 | esac | |
dc6746e7 | 12916 | |
b61ff9c8 | 12917 | # Check whether --enable-secureplt or --disable-secureplt was given. |
7f970b70 | 12918 | if test "${enable_secureplt+set}" = set; then |
b61ff9c8 | 12919 | enableval="$enable_secureplt" |
7f970b70 | 12920 | |
b61ff9c8 | 12921 | fi; |
7f970b70 | 12922 | |
56694dd9 | 12923 | # Windows32 Registry support for specifying GCC installation paths. |
b61ff9c8 | 12924 | # Check whether --enable-win32-registry or --disable-win32-registry was given. |
56694dd9 | 12925 | if test "${enable_win32_registry+set}" = set; then |
b61ff9c8 | 12926 | enableval="$enable_win32_registry" |
dc6746e7 | 12927 | |
b61ff9c8 | 12928 | fi; |
ba479fd2 | 12929 | |
a1286ef5 ZW |
12930 | case $host_os in |
12931 | win32 | pe | cygwin* | mingw32* | uwin*) | |
12932 | if test "x$enable_win32_registry" != xno; then | |
b61ff9c8 BS |
12933 | echo "$as_me:$LINENO: checking for library containing RegOpenKeyExA" >&5 |
12934 | echo $ECHO_N "checking for library containing RegOpenKeyExA... $ECHO_C" >&6 | |
ba479fd2 NN |
12935 | if test "${ac_cv_search_RegOpenKeyExA+set}" = set; then |
12936 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
12937 | else | |
12938 | ac_func_search_save_LIBS=$LIBS | |
b61ff9c8 | 12939 | ac_cv_search_RegOpenKeyExA=no |
ba479fd2 | 12940 | cat >conftest.$ac_ext <<_ACEOF |
ba479fd2 NN |
12941 | /* confdefs.h. */ |
12942 | _ACEOF | |
12943 | cat confdefs.h >>conftest.$ac_ext | |
12944 | cat >>conftest.$ac_ext <<_ACEOF | |
12945 | /* end confdefs.h. */ | |
861bb6c1 | 12946 | |
b61ff9c8 | 12947 | /* Override any gcc2 internal prototype to avoid an error. */ |
ba479fd2 NN |
12948 | #ifdef __cplusplus |
12949 | extern "C" | |
12950 | #endif | |
b61ff9c8 BS |
12951 | /* We use char because int might match the return type of a gcc2 |
12952 | builtin and then its argument prototype would still apply. */ | |
ba479fd2 NN |
12953 | char RegOpenKeyExA (); |
12954 | int | |
12955 | main () | |
12956 | { | |
b61ff9c8 | 12957 | RegOpenKeyExA (); |
ba479fd2 NN |
12958 | ; |
12959 | return 0; | |
12960 | } | |
12961 | _ACEOF | |
b61ff9c8 BS |
12962 | rm -f conftest.$ac_objext conftest$ac_exeext |
12963 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
12964 | (eval $ac_link) 2>conftest.er1 | |
ba479fd2 | 12965 | ac_status=$? |
86da66b5 HPN |
12966 | grep -v '^ *+' conftest.er1 >conftest.err |
12967 | rm -f conftest.er1 | |
12968 | cat conftest.err >&5 | |
ba479fd2 | 12969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
b61ff9c8 BS |
12970 | (exit $ac_status); } && |
12971 | { ac_try='test -z "$ac_c_werror_flag" | |
12972 | || test ! -s conftest.err' | |
12973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12974 | (eval $ac_try) 2>&5 | |
12975 | ac_status=$? | |
12976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12977 | (exit $ac_status); }; } && | |
12978 | { ac_try='test -s conftest$ac_exeext' | |
12979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
12980 | (eval $ac_try) 2>&5 | |
12981 | ac_status=$? | |
12982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
12983 | (exit $ac_status); }; }; then | |
12984 | ac_cv_search_RegOpenKeyExA="none required" | |
ab87f8c8 | 12985 | else |
ba479fd2 NN |
12986 | echo "$as_me: failed program was:" >&5 |
12987 | sed 's/^/| /' conftest.$ac_ext >&5 | |
12988 | ||
1a4b763e | 12989 | fi |
b61ff9c8 BS |
12990 | rm -f conftest.err conftest.$ac_objext \ |
12991 | conftest$ac_exeext conftest.$ac_ext | |
12992 | if test "$ac_cv_search_RegOpenKeyExA" = no; then | |
12993 | for ac_lib in advapi32; do | |
12994 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
12995 | cat >conftest.$ac_ext <<_ACEOF | |
12996 | /* confdefs.h. */ | |
12997 | _ACEOF | |
12998 | cat confdefs.h >>conftest.$ac_ext | |
12999 | cat >>conftest.$ac_ext <<_ACEOF | |
13000 | /* end confdefs.h. */ | |
2f41c1d6 | 13001 | |
b61ff9c8 BS |
13002 | /* Override any gcc2 internal prototype to avoid an error. */ |
13003 | #ifdef __cplusplus | |
13004 | extern "C" | |
13005 | #endif | |
13006 | /* We use char because int might match the return type of a gcc2 | |
13007 | builtin and then its argument prototype would still apply. */ | |
13008 | char RegOpenKeyExA (); | |
13009 | int | |
13010 | main () | |
13011 | { | |
13012 | RegOpenKeyExA (); | |
13013 | ; | |
13014 | return 0; | |
13015 | } | |
13016 | _ACEOF | |
13017 | rm -f conftest.$ac_objext conftest$ac_exeext | |
13018 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
13019 | (eval $ac_link) 2>conftest.er1 | |
13020 | ac_status=$? | |
13021 | grep -v '^ *+' conftest.er1 >conftest.err | |
13022 | rm -f conftest.er1 | |
13023 | cat conftest.err >&5 | |
13024 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13025 | (exit $ac_status); } && | |
13026 | { ac_try='test -z "$ac_c_werror_flag" | |
13027 | || test ! -s conftest.err' | |
13028 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13029 | (eval $ac_try) 2>&5 | |
13030 | ac_status=$? | |
13031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13032 | (exit $ac_status); }; } && | |
13033 | { ac_try='test -s conftest$ac_exeext' | |
13034 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13035 | (eval $ac_try) 2>&5 | |
13036 | ac_status=$? | |
13037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13038 | (exit $ac_status); }; }; then | |
13039 | ac_cv_search_RegOpenKeyExA="-l$ac_lib" | |
13040 | break | |
1a4b763e | 13041 | else |
b61ff9c8 BS |
13042 | echo "$as_me: failed program was:" >&5 |
13043 | sed 's/^/| /' conftest.$ac_ext >&5 | |
13044 | ||
13045 | fi | |
13046 | rm -f conftest.err conftest.$ac_objext \ | |
13047 | conftest$ac_exeext conftest.$ac_ext | |
13048 | done | |
dd7f7a6e EC |
13049 | fi |
13050 | LIBS=$ac_func_search_save_LIBS | |
13051 | fi | |
b61ff9c8 BS |
13052 | echo "$as_me:$LINENO: result: $ac_cv_search_RegOpenKeyExA" >&5 |
13053 | echo "${ECHO_T}$ac_cv_search_RegOpenKeyExA" >&6 | |
13054 | if test "$ac_cv_search_RegOpenKeyExA" != no; then | |
13055 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
dd7f7a6e EC |
13056 | |
13057 | else | |
13058 | enable_win32_registry=no | |
13059 | fi | |
13060 | ||
13061 | fi | |
13062 | ||
13063 | if test "x$enable_win32_registry" != xno; then | |
13064 | ||
13065 | cat >>confdefs.h <<\_ACEOF | |
13066 | #define ENABLE_WIN32_REGISTRY 1 | |
13067 | _ACEOF | |
13068 | ||
13069 | ||
13070 | if test "x$enable_win32_registry" != xyes \ | |
13071 | && test "x$enable_win32_registry" != x; then | |
13072 | ||
13073 | cat >>confdefs.h <<_ACEOF | |
13074 | #define WIN32_REGISTRY_KEY "$enable_win32_registry" | |
13075 | _ACEOF | |
13076 | ||
13077 | fi | |
13078 | fi | |
13079 | ;; | |
13080 | esac | |
ab87f8c8 | 13081 | |
56694dd9 ZW |
13082 | # Get an absolute path to the GCC top-level source directory |
13083 | holddir=`${PWDCMD-pwd}` | |
13084 | cd $srcdir | |
13085 | topdir=`${PWDCMD-pwd}` | |
13086 | cd $holddir | |
ab87f8c8 | 13087 | |
56694dd9 | 13088 | # Conditionalize the makefile for this host machine. |
2ed26f6b | 13089 | xmake_file= |
c406e779 | 13090 | for f in ${host_xmake_file} |
56694dd9 ZW |
13091 | do |
13092 | if test -f ${srcdir}/config/$f | |
13093 | then | |
2ed26f6b | 13094 | xmake_file="${xmake_file} \$(srcdir)/config/$f" |
56694dd9 ZW |
13095 | fi |
13096 | done | |
093e61a6 | 13097 | |
56694dd9 | 13098 | # Conditionalize the makefile for this target machine. |
2ed26f6b | 13099 | tmake_file_= |
c406e779 | 13100 | for f in ${tmake_file} |
56694dd9 ZW |
13101 | do |
13102 | if test -f ${srcdir}/config/$f | |
13103 | then | |
2ed26f6b | 13104 | tmake_file_="${tmake_file_} \$(srcdir)/config/$f" |
56694dd9 ZW |
13105 | fi |
13106 | done | |
2ed26f6b | 13107 | tmake_file="${tmake_file_}" |
71a94577 | 13108 | |
5395b47b NN |
13109 | # This is a terrible hack which will go away some day. |
13110 | host_cc_for_libada=${CC} | |
1e3fad21 NN |
13111 | |
13112 | ||
ab87f8c8 JL |
13113 | out_object_file=`basename $out_file .c`.o |
13114 | ||
75685792 RS |
13115 | tm_file_list="options.h" |
13116 | tm_include_list="options.h" | |
ab87f8c8 | 13117 | for f in $tm_file; do |
64ccbc99 | 13118 | case $f in |
3ca43df7 RS |
13119 | ./* ) |
13120 | f=`echo $f | sed 's/^..//'` | |
13121 | tm_file_list="${tm_file_list} $f" | |
13122 | tm_include_list="${tm_include_list} $f" | |
13123 | ;; | |
d02af173 | 13124 | defaults.h ) |
e22340b0 ZW |
13125 | tm_file_list="${tm_file_list} \$(srcdir)/$f" |
13126 | tm_include_list="${tm_include_list} $f" | |
13127 | ;; | |
13128 | * ) | |
13129 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | |
13130 | tm_include_list="${tm_include_list} config/$f" | |
13131 | ;; | |
64ccbc99 | 13132 | esac |
ab87f8c8 JL |
13133 | done |
13134 | ||
11642c3a | 13135 | tm_p_file_list= |
e22340b0 | 13136 | tm_p_include_list= |
11642c3a | 13137 | for f in $tm_p_file; do |
4977bab6 ZW |
13138 | case $f in |
13139 | tm-preds.h ) | |
e22340b0 ZW |
13140 | tm_p_file_list="${tm_p_file_list} $f" |
13141 | tm_p_include_list="${tm_p_include_list} $f" | |
13142 | ;; | |
13143 | * ) | |
13144 | tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" | |
13145 | tm_p_include_list="${tm_p_include_list} config/$f" | |
13146 | esac | |
13147 | done | |
13148 | ||
13149 | xm_file_list= | |
13150 | xm_include_list= | |
13151 | for f in $xm_file; do | |
13152 | case $f in | |
13153 | ansidecl.h ) | |
13154 | xm_file_list="${xm_file_list} \$(srcdir)/../include/$f" | |
13155 | xm_include_list="${xm_include_list} $f" | |
13156 | ;; | |
13157 | auto-host.h ) | |
13158 | xm_file_list="${xm_file_list} $f" | |
13159 | xm_include_list="${xm_include_list} $f" | |
13160 | ;; | |
13161 | * ) | |
13162 | xm_file_list="${xm_file_list} \$(srcdir)/config/$f" | |
13163 | xm_include_list="${xm_include_list} config/$f" | |
13164 | ;; | |
4977bab6 | 13165 | esac |
11642c3a ZW |
13166 | done |
13167 | ||
ab87f8c8 | 13168 | host_xm_file_list= |
e22340b0 | 13169 | host_xm_include_list= |
ab87f8c8 | 13170 | for f in $host_xm_file; do |
64ccbc99 | 13171 | case $f in |
d02af173 | 13172 | ansidecl.h ) |
e22340b0 ZW |
13173 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/$f" |
13174 | host_xm_include_list="${host_xm_include_list} $f" | |
13175 | ;; | |
e2500fed | 13176 | auto-host.h ) |
e22340b0 ZW |
13177 | host_xm_file_list="${host_xm_file_list} $f" |
13178 | host_xm_include_list="${host_xm_include_list} $f" | |
13179 | ;; | |
13180 | * ) | |
13181 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" | |
13182 | host_xm_include_list="${host_xm_include_list} config/$f" | |
13183 | ;; | |
64ccbc99 | 13184 | esac |
ab87f8c8 JL |
13185 | done |
13186 | ||
13187 | build_xm_file_list= | |
13188 | for f in $build_xm_file; do | |
64ccbc99 | 13189 | case $f in |
d02af173 | 13190 | ansidecl.h ) |
e22340b0 ZW |
13191 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/$f" |
13192 | build_xm_include_list="${build_xm_include_list} $f" | |
13193 | ;; | |
e2500fed | 13194 | auto-build.h | auto-host.h ) |
e22340b0 ZW |
13195 | build_xm_file_list="${build_xm_file_list} $f" |
13196 | build_xm_include_list="${build_xm_include_list} $f" | |
13197 | ;; | |
13198 | * ) | |
13199 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" | |
13200 | build_xm_include_list="${build_xm_include_list} config/$f" | |
13201 | ;; | |
64ccbc99 | 13202 | esac |
ab87f8c8 JL |
13203 | done |
13204 | ||
2989d30c GK |
13205 | # Define macro CROSS_DIRECTORY_STRUCTURE in compilation if this is a |
13206 | # cross-compiler which does not use the native headers and libraries. | |
a078a589 | 13207 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. |
ba479fd2 NN |
13208 | CROSS= |
13209 | ALL=all.internal | |
13210 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
b28250ab MM |
13211 | |
13212 | if test "x$with_build_sysroot" != x; then | |
14da6073 | 13213 | build_system_header_dir=$with_build_sysroot'$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)' |
b28250ab MM |
13214 | else |
13215 | # This value is used, even on a native system, because | |
13216 | # CROSS_SYSTEM_HEADER_DIR is just | |
13217 | # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR). | |
13218 | build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)' | |
13219 | fi | |
13220 | ||
ab87f8c8 JL |
13221 | if test x$host != x$target |
13222 | then | |
2989d30c | 13223 | CROSS="-DCROSS_DIRECTORY_STRUCTURE" |
a078a589 | 13224 | ALL=all.cross |
160633c6 | 13225 | SYSTEM_HEADER_DIR=$build_system_header_dir |
343f59d9 | 13226 | case "$host","$target" in |
3a7e8b87 GK |
13227 | # Darwin crosses can use the host system's libraries and headers, |
13228 | # because of the fat library support. Of course, it must be the | |
13229 | # same version of Darwin on both sides. Allow the user to | |
13230 | # just say --target=foo-darwin without a version number to mean | |
13231 | # "the version on this system". | |
13232 | *-*-darwin*,*-*-darwin*) | |
13233 | hostos=`echo $host | sed 's/.*-darwin/darwin/'` | |
13234 | targetos=`echo $target | sed 's/.*-darwin/darwin/'` | |
13235 | if test $hostos = $targetos -o $targetos = darwin ; then | |
13236 | CROSS= | |
13237 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
13238 | with_headers=yes | |
13239 | fi | |
13240 | ;; | |
13241 | ||
343f59d9 AM |
13242 | i?86-*-*,x86_64-*-* \ |
13243 | | powerpc*-*-*,powerpc64*-*-*) | |
13244 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
13245 | esac | |
7a615b25 | 13246 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
b28250ab | 13247 | SYSTEM_HEADER_DIR=$build_system_header_dir |
ab87f8c8 JL |
13248 | fi |
13249 | ||
b39d221a EC |
13250 | # If this is a cross-compiler that does not |
13251 | # have its own set of headers then define | |
13252 | # inhibit_libc | |
13253 | ||
dc06db20 R |
13254 | # If this is using newlib, without having the headers available now, |
13255 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
13256 | # This prevents libgcc2 from containing any code which requires libc |
13257 | # support. | |
160633c6 | 13258 | inhibit_libc=false |
dc06db20 R |
13259 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
13260 | test x$with_newlib = xyes ; } && | |
e50084fa | 13261 | { test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then |
160633c6 | 13262 | inhibit_libc=true |
b39d221a EC |
13263 | fi |
13264 | ||
13265 | ||
a078a589 ZW |
13266 | # When building gcc with a cross-compiler, we need to adjust things so |
13267 | # that the generator programs are still built with the native compiler. | |
13268 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
13269 | |
13270 | # These are the normal (build=host) settings: | |
ba479fd2 NN |
13271 | CC_FOR_BUILD='$(CC)' |
13272 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
ba479fd2 | 13273 | STMP_FIXINC=stmp-fixinc |
8ad9fb33 AP |
13274 | |
13275 | # Possibly disable fixproto, on a per-target basis. | |
13276 | case ${use_fixproto} in | |
13277 | no) | |
13278 | STMP_FIXPROTO= | |
13279 | ;; | |
13280 | yes) | |
13281 | STMP_FIXPROTO=stmp-fixproto | |
13282 | ;; | |
13283 | esac | |
13284 | ||
a078a589 | 13285 | |
83599948 NS |
13286 | # And these apply if build != host, or we are generating coverage data |
13287 | if test x$build != x$host || test "x$coverage_flags" != x | |
ab87f8c8 | 13288 | then |
b11e4747 | 13289 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' |
a078a589 | 13290 | |
7a615b25 | 13291 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
d8e5117d | 13292 | if test "x$STMP_FIXPROTO" != x; then |
de253ca4 GK |
13293 | STMP_FIXPROTO=stmp-install-fixproto |
13294 | fi | |
7a615b25 | 13295 | fi |
ab87f8c8 JL |
13296 | fi |
13297 | ||
13298 | # Expand extra_headers to include complete path. | |
13299 | # This substitutes for lots of t-* files. | |
13300 | extra_headers_list= | |
b1ef58c8 NN |
13301 | # Prepend $(srcdir)/config/${cpu_type}/ to every entry in extra_headers. |
13302 | for file in ${extra_headers} ; do | |
13303 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" | |
13304 | done | |
ab87f8c8 | 13305 | |
1617e5ee GK |
13306 | # If use_gcc_tgmath is set, append ginclude/tgmath.h. |
13307 | if test x"$use_gcc_tgmath" = xyes | |
13308 | then extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/tgmath.h" | |
13309 | fi | |
13310 | ||
c38f02df ILT |
13311 | # Define collect2 in Makefile. |
13312 | case $host_can_use_collect2 in | |
13313 | no) collect2= ;; | |
13314 | *) collect2='collect2$(exeext)' ;; | |
13315 | esac | |
13316 | ||
13317 | ||
ab87f8c8 | 13318 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
13319 | case $use_collect2 in |
13320 | no) use_collect2= ;; | |
13321 | "") ;; | |
ba479fd2 | 13322 | *) |
34a86c2b NN |
13323 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
13324 | xm_defines="${xm_defines} USE_COLLECT2" | |
c38f02df ILT |
13325 | case $host_can_use_collect2 in |
13326 | no) | |
13327 | { { echo "$as_me:$LINENO: error: collect2 is required but cannot be built on this system" >&5 | |
13328 | echo "$as_me: error: collect2 is required but cannot be built on this system" >&2;} | |
13329 | { (exit 1); exit 1; }; } | |
13330 | ;; | |
13331 | esac | |
34a86c2b NN |
13332 | ;; |
13333 | esac | |
ab87f8c8 | 13334 | |
8bb915b6 NN |
13335 | # --------------------------- |
13336 | # Assembler & linker features | |
13337 | # --------------------------- | |
13338 | ||
d869a8c4 NN |
13339 | # Identify the assembler which will work hand-in-glove with the newly |
13340 | # built GCC, so that we can examine its features. This is the assembler | |
13341 | # which will be driven by the driver program. | |
13342 | # | |
13343 | # If build != host, and we aren't building gas in-tree, we identify a | |
13344 | # build->target assembler and hope that it will have the same features | |
13345 | # as the host->target assembler we'll be using. | |
981d4858 JM |
13346 | gcc_cv_gas_major_version= |
13347 | gcc_cv_gas_minor_version= | |
ab87f8c8 | 13348 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
e8b05380 PB |
13349 | |
13350 | if test "${gcc_cv_as+set}" = set; then | |
13351 | : | |
13352 | else | |
13353 | ||
ab87f8c8 JL |
13354 | if test -x "$DEFAULT_ASSEMBLER"; then |
13355 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
34a86c2b | 13356 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
08d105fa AO |
13357 | && test -f ../gas/Makefile \ |
13358 | && test x$build = x$host; then | |
e8b05380 PB |
13359 | gcc_cv_as=../gas/as-new$build_exeext |
13360 | elif test -x as$build_exeext; then | |
13361 | # Build using assembler in the current directory. | |
13362 | gcc_cv_as=./as$build_exeext | |
13363 | elif test -x $AS_FOR_TARGET; then | |
13364 | gcc_cv_as="$AS_FOR_TARGET" | |
13365 | else | |
13366 | # Extract the first word of "$AS_FOR_TARGET", so it can be a program name with args. | |
13367 | set dummy $AS_FOR_TARGET; ac_word=$2 | |
b61ff9c8 BS |
13368 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13369 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 PB |
13370 | if test "${ac_cv_path_gcc_cv_as+set}" = set; then |
13371 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13372 | else | |
13373 | case $gcc_cv_as in | |
13374 | [\\/]* | ?:[\\/]*) | |
13375 | ac_cv_path_gcc_cv_as="$gcc_cv_as" # Let the user override the test with a path. | |
13376 | ;; | |
13377 | *) | |
13378 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13379 | for as_dir in $PATH | |
13380 | do | |
13381 | IFS=$as_save_IFS | |
13382 | test -z "$as_dir" && as_dir=. | |
13383 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 13384 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e8b05380 PB |
13385 | ac_cv_path_gcc_cv_as="$as_dir/$ac_word$ac_exec_ext" |
13386 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
13387 | break 2 | |
13388 | fi | |
13389 | done | |
13390 | done | |
13391 | ||
13392 | ;; | |
13393 | esac | |
13394 | fi | |
13395 | gcc_cv_as=$ac_cv_path_gcc_cv_as | |
b61ff9c8 | 13396 | |
e8b05380 | 13397 | if test -n "$gcc_cv_as"; then |
b61ff9c8 BS |
13398 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13399 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
e8b05380 | 13400 | else |
b61ff9c8 BS |
13401 | echo "$as_me:$LINENO: result: no" >&5 |
13402 | echo "${ECHO_T}no" >&6 | |
e8b05380 PB |
13403 | fi |
13404 | ||
13405 | fi | |
13406 | fi | |
13407 | ||
13408 | ||
13409 | ORIGINAL_AS_FOR_TARGET=$gcc_cv_as | |
13410 | ||
be0fe523 PB |
13411 | case "$ORIGINAL_AS_FOR_TARGET" in |
13412 | ./as | ./as$build_exeext) ;; | |
b61ff9c8 | 13413 | *) ac_config_files="$ac_config_files as:exec-tool.in" |
be0fe523 PB |
13414 | ;; |
13415 | esac | |
e8b05380 | 13416 | |
b61ff9c8 BS |
13417 | echo "$as_me:$LINENO: checking what assembler to use" >&5 |
13418 | echo $ECHO_N "checking what assembler to use... $ECHO_C" >&6 | |
e8b05380 | 13419 | if test "$gcc_cv_as" = ../gas/as-new$build_exeext; then |
08d105fa AO |
13420 | # Single tree build which includes gas. We want to prefer it |
13421 | # over whatever linker top-level may have detected, since | |
13422 | # we'll use what we're building after installation anyway. | |
b61ff9c8 BS |
13423 | echo "$as_me:$LINENO: result: newly built gas" >&5 |
13424 | echo "${ECHO_T}newly built gas" >&6 | |
ad9c4d9f NN |
13425 | in_tree_gas=yes |
13426 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
13427 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
13428 | $gcc_cv_as_gas_srcdir/configure \ | |
13429 | $gcc_cv_as_gas_srcdir/configure.in \ | |
13430 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
58ea87a9 | 13431 | gcc_cv_gas_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` |
ad9c4d9f NN |
13432 | if test x$gcc_cv_gas_version != x; then |
13433 | break | |
13434 | fi | |
13435 | done | |
13436 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
13437 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13438 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
5aaaf0e8 NN |
13439 | case $gcc_cv_gas_patch_version in |
13440 | "") gcc_cv_gas_patch_version="0" ;; | |
13441 | esac | |
8ada417f ZW |
13442 | gcc_cv_gas_vers=`expr \( \( $gcc_cv_gas_major_version \* 1000 \) \ |
13443 | + $gcc_cv_gas_minor_version \) \* 1000 \ | |
13444 | + $gcc_cv_gas_patch_version` | |
ad9c4d9f | 13445 | |
5408ac6c HPN |
13446 | in_tree_gas_is_elf=no |
13447 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
13448 | || (grep 'obj_format = multi' ../gas/Makefile \ | |
13449 | && grep 'extra_objects =.* obj-elf' ../gas/Makefile) > /dev/null | |
13450 | then | |
13451 | in_tree_gas_is_elf=yes | |
13452 | fi | |
e8b05380 | 13453 | else |
b61ff9c8 BS |
13454 | echo "$as_me:$LINENO: result: $gcc_cv_as" >&5 |
13455 | echo "${ECHO_T}$gcc_cv_as" >&6 | |
e8b05380 | 13456 | in_tree_gas=no |
981d4858 | 13457 | fi |
9e423e6d | 13458 | |
e8b05380 PB |
13459 | # Identify the linker which will work hand-in-glove with the newly |
13460 | # built GCC, so that we can examine its features. This is the linker | |
13461 | # which will be driven by the driver program. | |
9f18db39 | 13462 | # |
e8b05380 PB |
13463 | # If build != host, and we aren't building gas in-tree, we identify a |
13464 | # build->target linker and hope that it will have the same features | |
13465 | # as the host->target linker we'll be using. | |
13466 | gcc_cv_gld_major_version= | |
13467 | gcc_cv_gld_minor_version= | |
13468 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
13469 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
9f18db39 | 13470 | |
e8b05380 PB |
13471 | if test "${gcc_cv_ld+set}" = set; then |
13472 | : | |
9f18db39 | 13473 | else |
9f18db39 | 13474 | |
e8b05380 PB |
13475 | if test -x "$DEFAULT_LINKER"; then |
13476 | gcc_cv_ld="$DEFAULT_LINKER" | |
13477 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ | |
13478 | && test -f ../ld/Makefile \ | |
13479 | && test x$build = x$host; then | |
13480 | gcc_cv_ld=../ld/ld-new$build_exeext | |
13481 | elif test -x collect-ld$build_exeext; then | |
13482 | # Build using linker in the current directory. | |
13483 | gcc_cv_ld=./collect-ld$build_exeext | |
13484 | elif test -x $LD_FOR_TARGET; then | |
13485 | gcc_cv_ld="$LD_FOR_TARGET" | |
13486 | else | |
13487 | # Extract the first word of "$LD_FOR_TARGET", so it can be a program name with args. | |
13488 | set dummy $LD_FOR_TARGET; ac_word=$2 | |
b61ff9c8 BS |
13489 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13490 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13491 | if test "${ac_cv_path_gcc_cv_ld+set}" = set; then |
d739199a DJ |
13492 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13493 | else | |
e8b05380 | 13494 | case $gcc_cv_ld in |
d739199a | 13495 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13496 | ac_cv_path_gcc_cv_ld="$gcc_cv_ld" # Let the user override the test with a path. |
d739199a DJ |
13497 | ;; |
13498 | *) | |
13499 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13500 | for as_dir in $PATH | |
13501 | do | |
13502 | IFS=$as_save_IFS | |
13503 | test -z "$as_dir" && as_dir=. | |
13504 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 13505 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e8b05380 | 13506 | ac_cv_path_gcc_cv_ld="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13507 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13508 | break 2 | |
13509 | fi | |
13510 | done | |
13511 | done | |
13512 | ||
13513 | ;; | |
13514 | esac | |
13515 | fi | |
e8b05380 | 13516 | gcc_cv_ld=$ac_cv_path_gcc_cv_ld |
b61ff9c8 | 13517 | |
e8b05380 | 13518 | if test -n "$gcc_cv_ld"; then |
b61ff9c8 BS |
13519 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13520 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
d739199a | 13521 | else |
b61ff9c8 BS |
13522 | echo "$as_me:$LINENO: result: no" >&5 |
13523 | echo "${ECHO_T}no" >&6 | |
d739199a DJ |
13524 | fi |
13525 | ||
13526 | fi | |
e8b05380 PB |
13527 | fi |
13528 | ||
13529 | ||
13530 | ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld | |
13531 | ||
be0fe523 PB |
13532 | case "$ORIGINAL_LD_FOR_TARGET" in |
13533 | ./collect-ld | ./collect-ld$build_exeext) ;; | |
b61ff9c8 | 13534 | *) ac_config_files="$ac_config_files collect-ld:exec-tool.in" |
be0fe523 PB |
13535 | ;; |
13536 | esac | |
e8b05380 | 13537 | |
b61ff9c8 BS |
13538 | echo "$as_me:$LINENO: checking what linker to use" >&5 |
13539 | echo $ECHO_N "checking what linker to use... $ECHO_C" >&6 | |
e8b05380 PB |
13540 | if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then |
13541 | # Single tree build which includes ld. We want to prefer it | |
13542 | # over whatever linker top-level may have detected, since | |
13543 | # we'll use what we're building after installation anyway. | |
b61ff9c8 BS |
13544 | echo "$as_me:$LINENO: result: newly built ld" >&5 |
13545 | echo "${ECHO_T}newly built ld" >&6 | |
e8b05380 PB |
13546 | in_tree_ld=yes |
13547 | in_tree_ld_is_elf=no | |
13548 | if (grep 'EMUL = .*elf' ../ld/Makefile \ | |
13549 | || grep 'EMUL = .*linux' ../ld/Makefile \ | |
13550 | || grep 'EMUL = .*lynx' ../ld/Makefile) > /dev/null; then | |
13551 | in_tree_ld_is_elf=yes | |
13552 | fi | |
13553 | 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 | |
13554 | do | |
13555 | gcc_cv_gld_version=`sed -n -e 's/^[ ]*\(VERSION=[0-9]*\.[0-9]*.*\)/\1/p' < $f` | |
13556 | if test x$gcc_cv_gld_version != x; then | |
13557 | break | |
13558 | fi | |
13559 | done | |
13560 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
13561 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
13562 | else | |
b61ff9c8 BS |
13563 | echo "$as_me:$LINENO: result: $gcc_cv_ld" >&5 |
13564 | echo "${ECHO_T}$gcc_cv_ld" >&6 | |
e8b05380 PB |
13565 | in_tree_ld=no |
13566 | fi | |
13567 | ||
13568 | # Figure out what nm we will be using. | |
13569 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils | |
13570 | if test "${gcc_cv_nm+set}" = set; then | |
13571 | : | |
13572 | else | |
13573 | ||
13574 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13575 | && test -f ../binutils/Makefile \ |
13576 | && test x$build = x$host; then | |
e8b05380 PB |
13577 | gcc_cv_nm=../binutils/nm-new$build_exeext |
13578 | elif test -x nm$build_exeext; then | |
13579 | gcc_cv_nm=./nm$build_exeext | |
13580 | elif test -x $NM_FOR_TARGET; then | |
13581 | gcc_cv_nm="$NM_FOR_TARGET" | |
13582 | else | |
13583 | # Extract the first word of "$NM_FOR_TARGET", so it can be a program name with args. | |
13584 | set dummy $NM_FOR_TARGET; ac_word=$2 | |
b61ff9c8 BS |
13585 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13586 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13587 | if test "${ac_cv_path_gcc_cv_nm+set}" = set; then |
d739199a DJ |
13588 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13589 | else | |
e8b05380 | 13590 | case $gcc_cv_nm in |
d739199a | 13591 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13592 | ac_cv_path_gcc_cv_nm="$gcc_cv_nm" # Let the user override the test with a path. |
d739199a DJ |
13593 | ;; |
13594 | *) | |
13595 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
13596 | for as_dir in $PATH | |
13597 | do | |
13598 | IFS=$as_save_IFS | |
13599 | test -z "$as_dir" && as_dir=. | |
13600 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 13601 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e8b05380 | 13602 | ac_cv_path_gcc_cv_nm="$as_dir/$ac_word$ac_exec_ext" |
d739199a DJ |
13603 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13604 | break 2 | |
13605 | fi | |
13606 | done | |
13607 | done | |
13608 | ||
13609 | ;; | |
13610 | esac | |
13611 | fi | |
e8b05380 | 13612 | gcc_cv_nm=$ac_cv_path_gcc_cv_nm |
b61ff9c8 | 13613 | |
e8b05380 | 13614 | if test -n "$gcc_cv_nm"; then |
b61ff9c8 BS |
13615 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
13616 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
d739199a | 13617 | else |
b61ff9c8 BS |
13618 | echo "$as_me:$LINENO: result: no" >&5 |
13619 | echo "${ECHO_T}no" >&6 | |
d739199a DJ |
13620 | fi |
13621 | ||
13622 | fi | |
e8b05380 | 13623 | fi |
d739199a | 13624 | |
e8b05380 | 13625 | |
b61ff9c8 BS |
13626 | echo "$as_me:$LINENO: checking what nm to use" >&5 |
13627 | echo $ECHO_N "checking what nm to use... $ECHO_C" >&6 | |
e8b05380 PB |
13628 | if test "$gcc_cv_nm" = ../binutils/nm-new$build_exeext; then |
13629 | # Single tree build which includes binutils. | |
b61ff9c8 BS |
13630 | echo "$as_me:$LINENO: result: newly built nm" >&5 |
13631 | echo "${ECHO_T}newly built nm" >&6 | |
e8b05380 PB |
13632 | in_tree_nm=yes |
13633 | else | |
b61ff9c8 BS |
13634 | echo "$as_me:$LINENO: result: $gcc_cv_nm" >&5 |
13635 | echo "${ECHO_T}$gcc_cv_nm" >&6 | |
e8b05380 PB |
13636 | in_tree_nm=no |
13637 | fi | |
13638 | ||
13639 | ORIGINAL_NM_FOR_TARGET=$gcc_cv_nm | |
13640 | ||
be0fe523 PB |
13641 | case "$ORIGINAL_NM_FOR_TARGET" in |
13642 | ./nm | ./nm$build_exeext) ;; | |
b61ff9c8 | 13643 | *) ac_config_files="$ac_config_files nm:exec-tool.in" |
be0fe523 PB |
13644 | ;; |
13645 | esac | |
13646 | ||
e8b05380 PB |
13647 | |
13648 | # Figure out what objdump we will be using. | |
13649 | if test "${gcc_cv_objdump+set}" = set; then | |
13650 | : | |
13651 | else | |
13652 | ||
13653 | if test -f $gcc_cv_binutils_srcdir/configure.in \ | |
c15b113b DD |
13654 | && test -f ../binutils/Makefile \ |
13655 | && test x$build = x$host; then | |
e8b05380 PB |
13656 | # Single tree build which includes binutils. |
13657 | gcc_cv_objdump=../binutils/objdump$build_exeext | |
13658 | elif test -x objdump$build_exeext; then | |
13659 | gcc_cv_objdump=./objdump$build_exeext | |
13660 | elif test -x $OBJDUMP_FOR_TARGET; then | |
13661 | gcc_cv_objdump="$OBJDUMP_FOR_TARGET" | |
13662 | else | |
13663 | # Extract the first word of "$OBJDUMP_FOR_TARGET", so it can be a program name with args. | |
13664 | set dummy $OBJDUMP_FOR_TARGET; ac_word=$2 | |
b61ff9c8 BS |
13665 | echo "$as_me:$LINENO: checking for $ac_word" >&5 |
13666 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
e8b05380 | 13667 | if test "${ac_cv_path_gcc_cv_objdump+set}" = set; then |
9f18db39 PB |
13668 | echo $ECHO_N "(cached) $ECHO_C" >&6 |
13669 | else | |
e8b05380 | 13670 | case $gcc_cv_objdump in |
9f18db39 | 13671 | [\\/]* | ?:[\\/]*) |
e8b05380 | 13672 | ac_cv_path_gcc_cv_objdump="$gcc_cv_objdump" # Let the user override the test with a path. |
9f18db39 PB |
13673 | ;; |
13674 | *) | |
13675 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
e8b05380 | 13676 | for as_dir in $PATH |
9f18db39 PB |
13677 | do |
13678 | IFS=$as_save_IFS | |
13679 | test -z "$as_dir" && as_dir=. | |
13680 | for ac_exec_ext in '' $ac_executable_extensions; do | |
b61ff9c8 | 13681 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
e8b05380 | 13682 | ac_cv_path_gcc_cv_objdump="$as_dir/$ac_word$ac_exec_ext" |
9f18db39 PB |
13683 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 |
13684 | break 2 | |
13685 | fi | |
13686 | done | |
13687 | done | |
779243f7 | 13688 | |
9f18db39 PB |
13689 | ;; |
13690 | esac | |
13691 | fi | |
e8b05380 | 13692 | gcc_cv_objdump=$ac_cv_path_gcc_cv_objdump |
b61ff9c8 | 13693 | |
e8b05380 | 13694 | if test -n "$gcc_cv_objdump"; then |
b61ff9c8 BS |
13695 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
13696 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
9f18db39 | 13697 | else |
b61ff9c8 BS |
13698 | echo "$as_me:$LINENO: result: no" >&5 |
13699 | echo "${ECHO_T}no" >&6 | |
9f18db39 PB |
13700 | fi |
13701 | ||
e8b05380 PB |
13702 | fi |
13703 | fi | |
9f18db39 | 13704 | |
e8b05380 | 13705 | |
b61ff9c8 BS |
13706 | echo "$as_me:$LINENO: checking what objdump to use" >&5 |
13707 | echo $ECHO_N "checking what objdump to use... $ECHO_C" >&6 | |
e8b05380 PB |
13708 | if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then |
13709 | # Single tree build which includes binutils. | |
b61ff9c8 BS |
13710 | echo "$as_me:$LINENO: result: newly built objdump" >&5 |
13711 | echo "${ECHO_T}newly built objdump" >&6 | |
e8b05380 | 13712 | elif test x$gcc_cv_objdump = x; then |
b61ff9c8 BS |
13713 | echo "$as_me:$LINENO: result: not found" >&5 |
13714 | echo "${ECHO_T}not found" >&6 | |
e8b05380 | 13715 | else |
b61ff9c8 BS |
13716 | echo "$as_me:$LINENO: result: $gcc_cv_objdump" >&5 |
13717 | echo "${ECHO_T}$gcc_cv_objdump" >&6 | |
a2eafc76 | 13718 | fi |
3cae5780 | 13719 | |
981d4858 | 13720 | # Figure out what assembler alignment features are present. |
b61ff9c8 BS |
13721 | echo "$as_me:$LINENO: checking assembler for .balign and .p2align" >&5 |
13722 | echo $ECHO_N "checking assembler for .balign and .p2align... $ECHO_C" >&6 | |
ba479fd2 NN |
13723 | if test "${gcc_cv_as_balign_and_p2align+set}" = set; then |
13724 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13725 | else |
13726 | gcc_cv_as_balign_and_p2align=no | |
13727 | if test $in_tree_gas = yes; then | |
13728 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 6 \) \* 1000 + 0` | |
13729 | then gcc_cv_as_balign_and_p2align=yes | |
13730 | fi | |
13731 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13732 | echo '.balign 4 |
8ada417f | 13733 | .p2align 2' > conftest.s |
ba479fd2 NN |
13734 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13736 | (eval $ac_try) 2>&5 | |
13737 | ac_status=$? | |
13738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13739 | (exit $ac_status); }; } | |
8ada417f ZW |
13740 | then |
13741 | gcc_cv_as_balign_and_p2align=yes | |
13742 | else | |
13743 | echo "configure: failed program was" >&5 | |
13744 | cat conftest.s >&5 | |
13745 | fi | |
13746 | rm -f conftest.o conftest.s | |
13747 | fi | |
13748 | fi | |
b61ff9c8 BS |
13749 | echo "$as_me:$LINENO: result: $gcc_cv_as_balign_and_p2align" >&5 |
13750 | echo "${ECHO_T}$gcc_cv_as_balign_and_p2align" >&6 | |
63cf211a | 13751 | if test $gcc_cv_as_balign_and_p2align = yes; then |
ba479fd2 NN |
13752 | |
13753 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13754 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
ba479fd2 | 13755 | _ACEOF |
981d4858 | 13756 | |
ad9c4d9f NN |
13757 | fi |
13758 | ||
b61ff9c8 BS |
13759 | echo "$as_me:$LINENO: checking assembler for .p2align with maximum skip" >&5 |
13760 | echo $ECHO_N "checking assembler for .p2align with maximum skip... $ECHO_C" >&6 | |
ba479fd2 NN |
13761 | if test "${gcc_cv_as_max_skip_p2align+set}" = set; then |
13762 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13763 | else |
13764 | gcc_cv_as_max_skip_p2align=no | |
13765 | if test $in_tree_gas = yes; then | |
13766 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13767 | then gcc_cv_as_max_skip_p2align=yes | |
13768 | fi | |
13769 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 13770 | echo '.p2align 4,,7' > conftest.s |
ba479fd2 NN |
13771 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13772 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13773 | (eval $ac_try) 2>&5 | |
13774 | ac_status=$? | |
13775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13776 | (exit $ac_status); }; } | |
8ada417f ZW |
13777 | then |
13778 | gcc_cv_as_max_skip_p2align=yes | |
13779 | else | |
13780 | echo "configure: failed program was" >&5 | |
13781 | cat conftest.s >&5 | |
13782 | fi | |
13783 | rm -f conftest.o conftest.s | |
13784 | fi | |
ad9c4d9f | 13785 | fi |
b61ff9c8 BS |
13786 | echo "$as_me:$LINENO: result: $gcc_cv_as_max_skip_p2align" >&5 |
13787 | echo "${ECHO_T}$gcc_cv_as_max_skip_p2align" >&6 | |
63cf211a | 13788 | if test $gcc_cv_as_max_skip_p2align = yes; then |
ba479fd2 NN |
13789 | |
13790 | cat >>confdefs.h <<\_ACEOF | |
9e423e6d | 13791 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
ba479fd2 | 13792 | _ACEOF |
9e423e6d | 13793 | |
9e423e6d | 13794 | fi |
ad9c4d9f | 13795 | |
b61ff9c8 BS |
13796 | echo "$as_me:$LINENO: checking assembler for .literal16" >&5 |
13797 | echo $ECHO_N "checking assembler for .literal16... $ECHO_C" >&6 | |
5708d18d MS |
13798 | if test "${gcc_cv_as_literal16+set}" = set; then |
13799 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13800 | else | |
13801 | gcc_cv_as_literal16=no | |
13802 | if test $in_tree_gas = yes; then | |
13803 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 8 \) \* 1000 + 0` | |
13804 | then gcc_cv_as_literal16=yes | |
13805 | fi | |
13806 | elif test x$gcc_cv_as != x; then | |
13807 | echo '.literal16' > conftest.s | |
13808 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13809 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13810 | (eval $ac_try) 2>&5 | |
13811 | ac_status=$? | |
13812 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13813 | (exit $ac_status); }; } | |
13814 | then | |
13815 | gcc_cv_as_literal16=yes | |
13816 | else | |
13817 | echo "configure: failed program was" >&5 | |
13818 | cat conftest.s >&5 | |
13819 | fi | |
13820 | rm -f conftest.o conftest.s | |
13821 | fi | |
13822 | fi | |
b61ff9c8 BS |
13823 | echo "$as_me:$LINENO: result: $gcc_cv_as_literal16" >&5 |
13824 | echo "${ECHO_T}$gcc_cv_as_literal16" >&6 | |
5708d18d MS |
13825 | if test $gcc_cv_as_literal16 = yes; then |
13826 | ||
13827 | cat >>confdefs.h <<\_ACEOF | |
13828 | #define HAVE_GAS_LITERAL16 1 | |
13829 | _ACEOF | |
13830 | ||
13831 | fi | |
13832 | ||
b61ff9c8 BS |
13833 | echo "$as_me:$LINENO: checking assembler for working .subsection -1" >&5 |
13834 | echo $ECHO_N "checking assembler for working .subsection -1... $ECHO_C" >&6 | |
ba479fd2 NN |
13835 | if test "${gcc_cv_as_subsection_m1+set}" = set; then |
13836 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13837 | else |
13838 | gcc_cv_as_subsection_m1=no | |
13839 | if test $in_tree_gas = yes; then | |
13840 | if test $in_tree_gas_is_elf = yes \ | |
13841 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
13842 | then gcc_cv_as_subsection_m1=yes | |
ad9c4d9f | 13843 | fi |
8ada417f | 13844 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13845 | echo 'conftest_label1: .word 0 |
d1accaa3 JJ |
13846 | .subsection -1 |
13847 | conftest_label2: .word 0 | |
8ada417f | 13848 | .previous' > conftest.s |
ba479fd2 NN |
13849 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13850 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13851 | (eval $ac_try) 2>&5 | |
13852 | ac_status=$? | |
13853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13854 | (exit $ac_status); }; } | |
8ada417f ZW |
13855 | then |
13856 | if test x$gcc_cv_nm != x; then | |
13857 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
13858 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
13859 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1 | |
13860 | then : | |
13861 | else gcc_cv_as_subsection_m1=yes | |
13862 | fi | |
13863 | rm -f conftest.nm1 conftest.nm2 | |
13864 | fi | |
13865 | else | |
13866 | echo "configure: failed program was" >&5 | |
13867 | cat conftest.s >&5 | |
13868 | fi | |
13869 | rm -f conftest.o conftest.s | |
13870 | fi | |
981d4858 | 13871 | fi |
b61ff9c8 BS |
13872 | echo "$as_me:$LINENO: result: $gcc_cv_as_subsection_m1" >&5 |
13873 | echo "${ECHO_T}$gcc_cv_as_subsection_m1" >&6 | |
63cf211a | 13874 | if test $gcc_cv_as_subsection_m1 = yes; then |
ba479fd2 NN |
13875 | |
13876 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13877 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
ba479fd2 | 13878 | _ACEOF |
981d4858 | 13879 | |
d1accaa3 | 13880 | fi |
ad9c4d9f | 13881 | |
b61ff9c8 BS |
13882 | echo "$as_me:$LINENO: checking assembler for .weak" >&5 |
13883 | echo $ECHO_N "checking assembler for .weak... $ECHO_C" >&6 | |
ba479fd2 NN |
13884 | if test "${gcc_cv_as_weak+set}" = set; then |
13885 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
13886 | else |
13887 | gcc_cv_as_weak=no | |
13888 | if test $in_tree_gas = yes; then | |
13889 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 2 \) \* 1000 + 0` | |
13890 | then gcc_cv_as_weak=yes | |
ad9c4d9f | 13891 | fi |
8ada417f | 13892 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 13893 | echo ' .weak foobar' > conftest.s |
ba479fd2 NN |
13894 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
13895 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13896 | (eval $ac_try) 2>&5 | |
13897 | ac_status=$? | |
13898 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13899 | (exit $ac_status); }; } | |
8ada417f ZW |
13900 | then |
13901 | gcc_cv_as_weak=yes | |
13902 | else | |
13903 | echo "configure: failed program was" >&5 | |
13904 | cat conftest.s >&5 | |
13905 | fi | |
13906 | rm -f conftest.o conftest.s | |
13907 | fi | |
981d4858 | 13908 | fi |
b61ff9c8 BS |
13909 | echo "$as_me:$LINENO: result: $gcc_cv_as_weak" >&5 |
13910 | echo "${ECHO_T}$gcc_cv_as_weak" >&6 | |
63cf211a | 13911 | if test $gcc_cv_as_weak = yes; then |
ba479fd2 NN |
13912 | |
13913 | cat >>confdefs.h <<\_ACEOF | |
981d4858 | 13914 | #define HAVE_GAS_WEAK 1 |
ba479fd2 | 13915 | _ACEOF |
981d4858 | 13916 | |
12822146 | 13917 | fi |
ad9c4d9f | 13918 | |
b61ff9c8 BS |
13919 | echo "$as_me:$LINENO: checking assembler for .weakref" >&5 |
13920 | echo $ECHO_N "checking assembler for .weakref... $ECHO_C" >&6 | |
a0203ca7 AO |
13921 | if test "${gcc_cv_as_weakref+set}" = set; then |
13922 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13923 | else | |
13924 | gcc_cv_as_weakref=no | |
13925 | if test $in_tree_gas = yes; then | |
13926 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
13927 | then gcc_cv_as_weakref=yes | |
13928 | fi | |
13929 | elif test x$gcc_cv_as != x; then | |
13930 | echo ' .weakref foobar, barfnot' > conftest.s | |
13931 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13932 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13933 | (eval $ac_try) 2>&5 | |
13934 | ac_status=$? | |
13935 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13936 | (exit $ac_status); }; } | |
13937 | then | |
13938 | gcc_cv_as_weakref=yes | |
13939 | else | |
13940 | echo "configure: failed program was" >&5 | |
13941 | cat conftest.s >&5 | |
13942 | fi | |
13943 | rm -f conftest.o conftest.s | |
13944 | fi | |
13945 | fi | |
b61ff9c8 BS |
13946 | echo "$as_me:$LINENO: result: $gcc_cv_as_weakref" >&5 |
13947 | echo "${ECHO_T}$gcc_cv_as_weakref" >&6 | |
a0203ca7 AO |
13948 | if test $gcc_cv_as_weakref = yes; then |
13949 | ||
13950 | cat >>confdefs.h <<\_ACEOF | |
13951 | #define HAVE_GAS_WEAKREF 1 | |
13952 | _ACEOF | |
13953 | ||
13954 | fi | |
13955 | ||
b61ff9c8 BS |
13956 | echo "$as_me:$LINENO: checking assembler for .nsubspa comdat" >&5 |
13957 | echo $ECHO_N "checking assembler for .nsubspa comdat... $ECHO_C" >&6 | |
e41f3691 JDA |
13958 | if test "${gcc_cv_as_nsubspa_comdat+set}" = set; then |
13959 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
13960 | else | |
13961 | gcc_cv_as_nsubspa_comdat=no | |
13962 | if test $in_tree_gas = yes; then | |
13963 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
13964 | then gcc_cv_as_nsubspa_comdat=yes | |
13965 | fi | |
13966 | elif test x$gcc_cv_as != x; then | |
13967 | echo ' .SPACE $TEXT$ | |
13968 | .NSUBSPA $CODE$,COMDAT' > conftest.s | |
13969 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
13970 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
13971 | (eval $ac_try) 2>&5 | |
13972 | ac_status=$? | |
13973 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
13974 | (exit $ac_status); }; } | |
13975 | then | |
13976 | gcc_cv_as_nsubspa_comdat=yes | |
13977 | else | |
13978 | echo "configure: failed program was" >&5 | |
13979 | cat conftest.s >&5 | |
13980 | fi | |
13981 | rm -f conftest.o conftest.s | |
13982 | fi | |
13983 | fi | |
b61ff9c8 BS |
13984 | echo "$as_me:$LINENO: result: $gcc_cv_as_nsubspa_comdat" >&5 |
13985 | echo "${ECHO_T}$gcc_cv_as_nsubspa_comdat" >&6 | |
e41f3691 JDA |
13986 | if test $gcc_cv_as_nsubspa_comdat = yes; then |
13987 | ||
13988 | cat >>confdefs.h <<\_ACEOF | |
13989 | #define HAVE_GAS_NSUBSPA_COMDAT 1 | |
13990 | _ACEOF | |
13991 | ||
13992 | fi | |
13993 | ||
8ada417f ZW |
13994 | # .hidden needs to be supported in both the assembler and the linker, |
13995 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
13996 | # This is irritatingly difficult to feature test for; we have to check the | |
13997 | # date string after the version number. If we've got an in-tree | |
13998 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
13999 | # to be safe. | |
14000 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
b61ff9c8 BS |
14001 | echo "$as_me:$LINENO: checking assembler for .hidden" >&5 |
14002 | echo $ECHO_N "checking assembler for .hidden... $ECHO_C" >&6 | |
ba479fd2 NN |
14003 | if test "${gcc_cv_as_hidden+set}" = set; then |
14004 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14005 | else |
14006 | gcc_cv_as_hidden=no | |
14007 | if test $in_tree_gas = yes; then | |
14008 | if test $in_tree_gas_is_elf = yes \ | |
14009 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 13 \) \* 1000 + 0` | |
14010 | then gcc_cv_as_hidden=yes | |
14011 | fi | |
14012 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14013 | echo ' .hidden foobar |
8ada417f | 14014 | foobar:' > conftest.s |
ba479fd2 NN |
14015 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14016 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14017 | (eval $ac_try) 2>&5 | |
14018 | ac_status=$? | |
14019 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14020 | (exit $ac_status); }; } | |
8ada417f ZW |
14021 | then |
14022 | gcc_cv_as_hidden=yes | |
14023 | else | |
14024 | echo "configure: failed program was" >&5 | |
14025 | cat conftest.s >&5 | |
14026 | fi | |
14027 | rm -f conftest.o conftest.s | |
14028 | fi | |
14029 | fi | |
b61ff9c8 BS |
14030 | echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 |
14031 | echo "${ECHO_T}$gcc_cv_as_hidden" >&6 | |
63cf211a | 14032 | |
ad9c4d9f | 14033 | |
b61ff9c8 BS |
14034 | echo "$as_me:$LINENO: checking linker for .hidden support" >&5 |
14035 | echo $ECHO_N "checking linker for .hidden support... $ECHO_C" >&6 | |
ba479fd2 NN |
14036 | if test "${gcc_cv_ld_hidden+set}" = set; then |
14037 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14038 | else |
14039 | if test $in_tree_ld = yes ; then | |
14040 | gcc_cv_ld_hidden=no | |
14041 | 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 \ | |
14042 | && test $in_tree_ld_is_elf = yes; then | |
14043 | gcc_cv_ld_hidden=yes | |
14044 | fi | |
14045 | else | |
14046 | gcc_cv_ld_hidden=yes | |
bace148a | 14047 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` |
8ada417f ZW |
14048 | if echo "$ld_ver" | grep GNU > /dev/null; then |
14049 | ld_vers=`echo $ld_ver | sed -n \ | |
115e6e55 | 14050 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` |
8ada417f | 14051 | 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 |
14052 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` |
14053 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
14054 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
14055 | if test 0"$ld_date" -lt 20020404; then |
14056 | if test -n "$ld_date"; then | |
14057 | # If there was date string, but was earlier than 2002-04-04, fail | |
14058 | gcc_cv_ld_hidden=no | |
14059 | elif test -z "$ld_vers"; then | |
14060 | # If there was no date string nor ld version number, something is wrong | |
14061 | gcc_cv_ld_hidden=no | |
14062 | else | |
8ada417f ZW |
14063 | test -z "$ld_vers_patch" && ld_vers_patch=0 |
14064 | if test "$ld_vers_major" -lt 2; then | |
14065 | gcc_cv_ld_hidden=no | |
14066 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
14067 | gcc_cv_ld_hidden="no" | |
14068 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 -a "$ld_vers_patch" -eq 0; then | |
14069 | gcc_cv_ld_hidden=no | |
c72931a6 | 14070 | fi |
8ada417f | 14071 | fi |
789b7de5 | 14072 | fi |
8ada417f | 14073 | else |
28690784 | 14074 | case "${target}" in |
b0fd7d27 | 14075 | hppa64*-*-hpux* | ia64*-*-hpux*) |
28690784 JDA |
14076 | gcc_cv_ld_hidden=yes |
14077 | ;; | |
14078 | *) | |
14079 | gcc_cv_ld_hidden=no | |
14080 | ;; | |
14081 | esac | |
8ada417f ZW |
14082 | fi |
14083 | fi | |
6d07784a | 14084 | fi |
b61ff9c8 BS |
14085 | echo "$as_me:$LINENO: result: $gcc_cv_ld_hidden" >&5 |
14086 | echo "${ECHO_T}$gcc_cv_ld_hidden" >&6 | |
8ada417f | 14087 | libgcc_visibility=no |
ad9c4d9f | 14088 | |
232b67d9 | 14089 | |
8e3940b2 | 14090 | if test $gcc_cv_as_hidden = yes && test $gcc_cv_ld_hidden = yes; then |
8ada417f | 14091 | libgcc_visibility=yes |
ba479fd2 NN |
14092 | |
14093 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14094 | #define HAVE_GAS_HIDDEN 1 |
ba479fd2 | 14095 | _ACEOF |
ad9c4d9f NN |
14096 | |
14097 | fi | |
14098 | ||
8ada417f | 14099 | # Check if we have .[us]leb128, and support symbol arithmetic with it. |
b61ff9c8 BS |
14100 | echo "$as_me:$LINENO: checking assembler for .sleb128 and .uleb128" >&5 |
14101 | echo $ECHO_N "checking assembler for .sleb128 and .uleb128... $ECHO_C" >&6 | |
ba479fd2 NN |
14102 | if test "${gcc_cv_as_leb128+set}" = set; then |
14103 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14104 | else |
14105 | gcc_cv_as_leb128=no | |
14106 | if test $in_tree_gas = yes; then | |
14107 | if test $in_tree_gas_is_elf = yes \ | |
14108 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
14109 | then gcc_cv_as_leb128=yes | |
14110 | fi | |
14111 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14112 | echo ' .data |
b7460f24 RH |
14113 | .uleb128 L2 - L1 |
14114 | L1: | |
14115 | .uleb128 1280 | |
14116 | .sleb128 -1010 | |
8ada417f | 14117 | L2:' > conftest.s |
ba479fd2 NN |
14118 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14119 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14120 | (eval $ac_try) 2>&5 | |
14121 | ac_status=$? | |
14122 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14123 | (exit $ac_status); }; } | |
8ada417f ZW |
14124 | then |
14125 | # GAS versions before 2.11 do not support uleb128, | |
14126 | # despite appearing to. | |
14127 | # ??? There exists an elf-specific test that will crash | |
14128 | # the assembler. Perhaps it's better to figure out whether | |
14129 | # arbitrary sections are supported and try the test. | |
bace148a | 14130 | as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q` |
8ada417f | 14131 | if echo "$as_ver" | grep GNU > /dev/null; then |
ddcd0f6f | 14132 | as_vers=`echo $as_ver | sed -n \ |
115e6e55 | 14133 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` |
ddcd0f6f BS |
14134 | as_major=`expr "$as_vers" : '\([0-9]*\)'` |
14135 | as_minor=`expr "$as_vers" : '[0-9]*\.\([0-9]*\)'` | |
8ada417f ZW |
14136 | if test $as_major -eq 2 && test $as_minor -lt 11 |
14137 | then : | |
14138 | else gcc_cv_as_leb128=yes | |
14139 | fi | |
14140 | fi | |
14141 | else | |
14142 | echo "configure: failed program was" >&5 | |
14143 | cat conftest.s >&5 | |
14144 | fi | |
14145 | rm -f conftest.o conftest.s | |
14146 | fi | |
b7460f24 | 14147 | fi |
b61ff9c8 BS |
14148 | echo "$as_me:$LINENO: result: $gcc_cv_as_leb128" >&5 |
14149 | echo "${ECHO_T}$gcc_cv_as_leb128" >&6 | |
63cf211a | 14150 | if test $gcc_cv_as_leb128 = yes; then |
ba479fd2 NN |
14151 | |
14152 | cat >>confdefs.h <<\_ACEOF | |
b7460f24 | 14153 | #define HAVE_AS_LEB128 1 |
ba479fd2 | 14154 | _ACEOF |
b7460f24 RH |
14155 | |
14156 | fi | |
ad9c4d9f | 14157 | |
8ada417f ZW |
14158 | # GAS versions up to and including 2.11.0 may mis-optimize |
14159 | # .eh_frame data. | |
b61ff9c8 BS |
14160 | echo "$as_me:$LINENO: checking assembler for eh_frame optimization" >&5 |
14161 | echo $ECHO_N "checking assembler for eh_frame optimization... $ECHO_C" >&6 | |
ba479fd2 NN |
14162 | if test "${gcc_cv_as_eh_frame+set}" = set; then |
14163 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14164 | else |
14165 | gcc_cv_as_eh_frame=no | |
14166 | if test $in_tree_gas = yes; then | |
14167 | if test $in_tree_gas_is_elf = yes \ | |
14168 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14169 | then gcc_cv_as_eh_frame=yes | |
ad9c4d9f | 14170 | fi |
8ada417f | 14171 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14172 | echo ' .text |
c64688ae RH |
14173 | .LFB1: |
14174 | .4byte 0 | |
14175 | .L1: | |
14176 | .4byte 0 | |
14177 | .LFE1: | |
14178 | .section .eh_frame,"aw",@progbits | |
14179 | __FRAME_BEGIN__: | |
14180 | .4byte .LECIE1-.LSCIE1 | |
14181 | .LSCIE1: | |
14182 | .4byte 0x0 | |
14183 | .byte 0x1 | |
14184 | .ascii "z\0" | |
14185 | .byte 0x1 | |
14186 | .byte 0x78 | |
14187 | .byte 0x1a | |
14188 | .byte 0x0 | |
14189 | .byte 0x4 | |
14190 | .4byte 1 | |
14191 | .p2align 1 | |
14192 | .LECIE1: | |
14193 | .LSFDE1: | |
14194 | .4byte .LEFDE1-.LASFDE1 | |
14195 | .LASFDE1: | |
14196 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
14197 | .4byte .LFB1 | |
14198 | .4byte .LFE1-.LFB1 | |
14199 | .byte 0x4 | |
14200 | .4byte .LFE1-.LFB1 | |
14201 | .byte 0x4 | |
14202 | .4byte .L1-.LFB1 | |
8ada417f | 14203 | .LEFDE1:' > conftest.s |
ba479fd2 NN |
14204 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14205 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14206 | (eval $ac_try) 2>&5 | |
14207 | ac_status=$? | |
14208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14209 | (exit $ac_status); }; } | |
8ada417f ZW |
14210 | then |
14211 | cat > conftest.lit <<EOF | |
c64688ae RH |
14212 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
14213 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 14214 | 0020 08000000 04080000 0044 .........D |
01efb963 | 14215 | EOF |
ba479fd2 | 14216 | cat > conftest.big <<EOF |
01efb963 AS |
14217 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... |
14218 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 14219 | 0020 00000008 04000000 0844 .........D |
c64688ae | 14220 | EOF |
8ada417f ZW |
14221 | # If the assembler didn't choke, and we can objdump, |
14222 | # and we got the correct data, then succeed. | |
dbc02e7f AS |
14223 | # The text in the here-document typically retains its unix-style line |
14224 | # endings, while the output of objdump will use host line endings. | |
14225 | # Therefore, use diff -b for the comparisons. | |
8ada417f ZW |
14226 | if test x$gcc_cv_objdump != x \ |
14227 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ | |
14228 | | tail -3 > conftest.got \ | |
dbc02e7f AS |
14229 | && { diff -b conftest.lit conftest.got > /dev/null 2>&1 \ |
14230 | || diff -b conftest.big conftest.got > /dev/null 2>&1; } | |
8ada417f ZW |
14231 | then |
14232 | gcc_cv_as_eh_frame=yes | |
ba479fd2 NN |
14233 | elif { ac_try='$gcc_cv_as -o conftest.o --traditional-format /dev/null' |
14234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14235 | (eval $ac_try) 2>&5 | |
14236 | ac_status=$? | |
14237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14238 | (exit $ac_status); }; }; then | |
8ada417f ZW |
14239 | gcc_cv_as_eh_frame=buggy |
14240 | else | |
14241 | # Uh oh, what do we do now? | |
14242 | gcc_cv_as_eh_frame=no | |
14243 | fi | |
14244 | else | |
14245 | echo "configure: failed program was" >&5 | |
14246 | cat conftest.s >&5 | |
14247 | fi | |
14248 | rm -f conftest.o conftest.s | |
14249 | fi | |
c64688ae | 14250 | fi |
b61ff9c8 BS |
14251 | echo "$as_me:$LINENO: result: $gcc_cv_as_eh_frame" >&5 |
14252 | echo "${ECHO_T}$gcc_cv_as_eh_frame" >&6 | |
ad9c4d9f | 14253 | |
6e3f3080 | 14254 | |
63cf211a | 14255 | if test $gcc_cv_as_eh_frame = buggy; then |
ba479fd2 NN |
14256 | |
14257 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 14258 | #define USE_AS_TRADITIONAL_FORMAT 1 |
ba479fd2 | 14259 | _ACEOF |
ad9c4d9f NN |
14260 | |
14261 | fi | |
14262 | ||
b61ff9c8 BS |
14263 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14264 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
ba479fd2 NN |
14265 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14266 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14267 | else |
14268 | gcc_cv_as_shf_merge=no | |
14269 | if test $in_tree_gas = yes; then | |
14270 | if test $in_tree_gas_is_elf = yes \ | |
14271 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14272 | then gcc_cv_as_shf_merge=yes | |
14273 | fi | |
14274 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 14275 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s |
ba479fd2 NN |
14276 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' |
14277 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14278 | (eval $ac_try) 2>&5 | |
14279 | ac_status=$? | |
14280 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14281 | (exit $ac_status); }; } | |
8ada417f ZW |
14282 | then |
14283 | gcc_cv_as_shf_merge=yes | |
14284 | else | |
14285 | echo "configure: failed program was" >&5 | |
14286 | cat conftest.s >&5 | |
14287 | fi | |
14288 | rm -f conftest.o conftest.s | |
14289 | fi | |
201556f0 | 14290 | fi |
b61ff9c8 BS |
14291 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14292 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
8ada417f | 14293 | |
c18a5b6c | 14294 | if test $gcc_cv_as_shf_merge = no; then |
b61ff9c8 BS |
14295 | echo "$as_me:$LINENO: checking assembler for section merging support" >&5 |
14296 | echo $ECHO_N "checking assembler for section merging support... $ECHO_C" >&6 | |
c18a5b6c MM |
14297 | if test "${gcc_cv_as_shf_merge+set}" = set; then |
14298 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14299 | else | |
14300 | gcc_cv_as_shf_merge=no | |
14301 | if test $in_tree_gas = yes; then | |
14302 | if test $in_tree_gas_is_elf = yes \ | |
14303 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14304 | then gcc_cv_as_shf_merge=yes | |
14305 | fi | |
14306 | elif test x$gcc_cv_as != x; then | |
14307 | echo '.section .rodata.str, "aMS", %progbits, 1' > conftest.s | |
14308 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14309 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14310 | (eval $ac_try) 2>&5 | |
14311 | ac_status=$? | |
14312 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14313 | (exit $ac_status); }; } | |
14314 | then | |
14315 | gcc_cv_as_shf_merge=yes | |
14316 | else | |
14317 | echo "configure: failed program was" >&5 | |
14318 | cat conftest.s >&5 | |
14319 | fi | |
14320 | rm -f conftest.o conftest.s | |
14321 | fi | |
14322 | fi | |
b61ff9c8 BS |
14323 | echo "$as_me:$LINENO: result: $gcc_cv_as_shf_merge" >&5 |
14324 | echo "${ECHO_T}$gcc_cv_as_shf_merge" >&6 | |
c18a5b6c MM |
14325 | |
14326 | fi | |
8ad9fb33 | 14327 | |
ba479fd2 | 14328 | cat >>confdefs.h <<_ACEOF |
8ad9fb33 | 14329 | #define HAVE_GAS_SHF_MERGE `if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 14330 | _ACEOF |
201556f0 | 14331 | |
201556f0 | 14332 | |
b61ff9c8 BS |
14333 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14334 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
c18a5b6c MM |
14335 | if test "${gcc_cv_as_comdat_group+set}" = set; then |
14336 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14337 | else | |
14338 | gcc_cv_as_comdat_group=no | |
14339 | if test $in_tree_gas = yes; then | |
14340 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14341 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14342 | then gcc_cv_as_comdat_group=yes |
14343 | fi | |
14344 | elif test x$gcc_cv_as != x; then | |
14345 | echo '.section .text,"axG",@progbits,.foo,comdat' > conftest.s | |
14346 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14347 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14348 | (eval $ac_try) 2>&5 | |
14349 | ac_status=$? | |
14350 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14351 | (exit $ac_status); }; } | |
14352 | then | |
14353 | gcc_cv_as_comdat_group=yes | |
14354 | else | |
14355 | echo "configure: failed program was" >&5 | |
14356 | cat conftest.s >&5 | |
14357 | fi | |
14358 | rm -f conftest.o conftest.s | |
14359 | fi | |
14360 | fi | |
b61ff9c8 BS |
14361 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group" >&5 |
14362 | echo "${ECHO_T}$gcc_cv_as_comdat_group" >&6 | |
c18a5b6c MM |
14363 | |
14364 | if test $gcc_cv_as_comdat_group = yes; then | |
14365 | gcc_cv_as_comdat_group_percent=no | |
14366 | else | |
b61ff9c8 BS |
14367 | echo "$as_me:$LINENO: checking assembler for COMDAT group support" >&5 |
14368 | echo $ECHO_N "checking assembler for COMDAT group support... $ECHO_C" >&6 | |
c18a5b6c MM |
14369 | if test "${gcc_cv_as_comdat_group_percent+set}" = set; then |
14370 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14371 | else | |
14372 | gcc_cv_as_comdat_group_percent=no | |
14373 | if test $in_tree_gas = yes; then | |
14374 | if test $in_tree_gas_is_elf = yes \ | |
11176d2a | 14375 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` |
c18a5b6c MM |
14376 | then gcc_cv_as_comdat_group_percent=yes |
14377 | fi | |
14378 | elif test x$gcc_cv_as != x; then | |
14379 | echo '.section .text,"axG",%progbits,.foo,comdat' > conftest.s | |
14380 | if { ac_try='$gcc_cv_as --fatal-warnings -o conftest.o conftest.s >&5' | |
14381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14382 | (eval $ac_try) 2>&5 | |
14383 | ac_status=$? | |
14384 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14385 | (exit $ac_status); }; } | |
14386 | then | |
14387 | gcc_cv_as_comdat_group_percent=yes | |
14388 | else | |
14389 | echo "configure: failed program was" >&5 | |
14390 | cat conftest.s >&5 | |
14391 | fi | |
14392 | rm -f conftest.o conftest.s | |
14393 | fi | |
14394 | fi | |
b61ff9c8 BS |
14395 | echo "$as_me:$LINENO: result: $gcc_cv_as_comdat_group_percent" >&5 |
14396 | echo "${ECHO_T}$gcc_cv_as_comdat_group_percent" >&6 | |
c18a5b6c MM |
14397 | |
14398 | fi | |
11176d2a JB |
14399 | if test $in_tree_ld != yes && test x"$ld_vers" != x; then |
14400 | comdat_group=yes | |
14401 | if test 0"$ld_date" -lt 20050308; then | |
14402 | if test -n "$ld_date"; then | |
14403 | # If there was date string, but was earlier than 2005-03-08, fail | |
14404 | comdat_group=no | |
14405 | elif test "$ld_vers_major" -lt 2; then | |
14406 | comdat_group=no | |
14407 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then | |
14408 | comdat_group=no | |
14409 | fi | |
14410 | fi | |
1cf0118d RO |
14411 | else |
14412 | # assume linkers other than GNU ld don't support COMDAT group | |
14413 | comdat_group=no | |
14414 | fi | |
14415 | if test $comdat_group = no; then | |
14416 | gcc_cv_as_comdat_group=no | |
14417 | gcc_cv_as_comdat_group_percent=no | |
11176d2a | 14418 | fi |
c18a5b6c MM |
14419 | |
14420 | cat >>confdefs.h <<_ACEOF | |
11176d2a | 14421 | #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 |
14422 | _ACEOF |
14423 | ||
14424 | ||
8ada417f | 14425 | # Thread-local storage - the check is heavily parametrized. |
f996902d RH |
14426 | conftest_s= |
14427 | tls_first_major= | |
14428 | tls_first_minor= | |
9739c90c | 14429 | tls_as_opt= |
f996902d | 14430 | case "$target" in |
6f9b006d RH |
14431 | alpha*-*-*) |
14432 | conftest_s=' | |
14433 | .section ".tdata","awT",@progbits | |
14434 | foo: .long 25 | |
14435 | .text | |
14436 | ldq $27,__tls_get_addr($29) !literal!1 | |
14437 | lda $16,foo($29) !tlsgd!1 | |
14438 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
14439 | ldq $27,__tls_get_addr($29) !literal!2 | |
14440 | lda $16,foo($29) !tlsldm!2 | |
14441 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
14442 | ldq $1,foo($29) !gotdtprel | |
14443 | ldah $2,foo($29) !dtprelhi | |
14444 | lda $3,foo($2) !dtprello | |
14445 | lda $4,foo($29) !dtprel | |
14446 | ldq $1,foo($29) !gottprel | |
14447 | ldah $2,foo($29) !tprelhi | |
14448 | lda $3,foo($2) !tprello | |
14449 | lda $4,foo($29) !tprel' | |
14450 | tls_first_major=2 | |
14451 | tls_first_minor=13 | |
2f3321ca | 14452 | tls_as_opt=--fatal-warnings |
6f9b006d | 14453 | ;; |
e4dd71de AH |
14454 | frv*-*-*) |
14455 | conftest_s=' | |
14456 | .section ".tdata","awT",@progbits | |
14457 | x: .long 25 | |
14458 | .text | |
14459 | call #gettlsoff(x)' | |
14460 | tls_first_major=2 | |
14461 | tls_first_minor=14 | |
14462 | ;; | |
51076f96 RC |
14463 | hppa*-*-linux*) |
14464 | conftest_s=' | |
14465 | t1: .reg %r20 | |
14466 | t2: .reg %r21 | |
14467 | gp: .reg %r19 | |
14468 | .section ".tdata","awT",@progbits | |
14469 | foo: .long 25 | |
14470 | .text | |
14471 | .align 4 | |
14472 | addil LT%foo-$tls_gdidx$,gp | |
14473 | ldo RT%foo-$tls_gdidx$(%r1),%arg0 | |
14474 | b __tls_get_addr | |
14475 | nop | |
14476 | addil LT%foo-$tls_ldidx$,gp | |
14477 | b __tls_get_addr | |
14478 | ldo RT%foo-$tls_ldidx$(%r1),%arg0 | |
14479 | addil LR%foo-$tls_dtpoff$,%ret0 | |
14480 | ldo RR%foo-$tls_dtpoff$(%r1),%t1 | |
14481 | mfctl %cr27,%t1 | |
14482 | addil LT%foo-$tls_ieoff$,gp | |
14483 | ldw RT%foo-$tls_ieoff$(%r1),%t2 | |
14484 | add %t1,%t2,%t3 | |
14485 | mfctl %cr27,%t1 | |
14486 | addil LR%foo-$tls_leoff$,%t1 | |
14487 | ldo RR%foo-$tls_leoff$(%r1),%t2' | |
14488 | tls_first_major=2 | |
14489 | tls_first_minor=15 | |
14490 | tls_as_opt=--fatal-warnings | |
14491 | ;; | |
d3585b76 DJ |
14492 | arm*-*-*) |
14493 | conftest_s=' | |
14494 | .section ".tdata","awT",%progbits | |
14495 | foo: .long 25 | |
14496 | .text | |
14497 | .word foo(gottpoff) | |
14498 | .word foo(tpoff) | |
14499 | .word foo(tlsgd) | |
14500 | .word foo(tlsldm) | |
14501 | .word foo(tlsldo)' | |
14502 | tls_first_major=2 | |
14503 | tls_first_minor=17 | |
14504 | ;; | |
f996902d RH |
14505 | i[34567]86-*-*) |
14506 | conftest_s=' | |
14507 | .section ".tdata","awT",@progbits | |
14508 | foo: .long 25 | |
14509 | .text | |
14510 | movl %gs:0, %eax | |
14511 | leal foo@TLSGD(,%ebx,1), %eax | |
14512 | leal foo@TLSLDM(%ebx), %eax | |
14513 | leal foo@DTPOFF(%eax), %edx | |
14514 | movl foo@GOTTPOFF(%ebx), %eax | |
14515 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
14516 | addl foo@GOTNTPOFF(%ebx), %eax |
14517 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
14518 | movl $foo@TPOFF, %eax |
14519 | subl $foo@TPOFF, %eax | |
14520 | leal foo@NTPOFF(%ecx), %eax' | |
14521 | tls_first_major=2 | |
75d38379 | 14522 | tls_first_minor=14 |
2f3321ca | 14523 | tls_as_opt=--fatal-warnings |
75d38379 JJ |
14524 | ;; |
14525 | x86_64-*-*) | |
14526 | conftest_s=' | |
14527 | .section ".tdata","awT",@progbits | |
14528 | foo: .long 25 | |
14529 | .text | |
14530 | movq %fs:0, %rax | |
14531 | leaq foo@TLSGD(%rip), %rdi | |
14532 | leaq foo@TLSLD(%rip), %rdi | |
14533 | leaq foo@DTPOFF(%rax), %rdx | |
14534 | movq foo@GOTTPOFF(%rip), %rax | |
14535 | movq $foo@TPOFF, %rax' | |
14536 | tls_first_major=2 | |
14537 | tls_first_minor=14 | |
2f3321ca | 14538 | tls_as_opt=--fatal-warnings |
f996902d | 14539 | ;; |
7b6e506e RH |
14540 | ia64-*-*) |
14541 | conftest_s=' | |
14542 | .section ".tdata","awT",@progbits | |
14543 | foo: data8 25 | |
14544 | .text | |
14545 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
14546 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
14547 | addl r18 = @ltoff(@tprel(foo#)), gp | |
14548 | addl r19 = @dtprel(foo#), gp | |
14549 | adds r21 = @dtprel(foo#), r13 | |
14550 | movl r23 = @dtprel(foo#) | |
14551 | addl r20 = @tprel(foo#), gp | |
14552 | adds r22 = @tprel(foo#), r13 | |
14553 | movl r24 = @tprel(foo#)' | |
14554 | tls_first_major=2 | |
14555 | tls_first_minor=13 | |
2f3321ca | 14556 | tls_as_opt=--fatal-warnings |
7b6e506e | 14557 | ;; |
69229b81 DJ |
14558 | mips*-*-*) |
14559 | conftest_s=' | |
14560 | .section .tdata,"awT",@progbits | |
14561 | x: | |
14562 | .word 2 | |
14563 | .text | |
14564 | addiu $4, $28, %tlsgd(x) | |
14565 | addiu $4, $28, %tlsldm(x) | |
14566 | lui $4, %dtprel_hi(x) | |
14567 | addiu $4, $4, %dtprel_lo(x) | |
14568 | lw $4, %gottprel(x)($28) | |
14569 | lui $4, %tprel_hi(x) | |
14570 | addiu $4, $4, %tprel_lo(x)' | |
14571 | tls_first_major=2 | |
14572 | tls_first_minor=16 | |
14573 | tls_as_opt='-32 --fatal-warnings' | |
14574 | ;; | |
c4501e62 JJ |
14575 | powerpc-*-*) |
14576 | conftest_s=' | |
14577 | .section ".tdata","awT",@progbits | |
14578 | .align 2 | |
14579 | ld0: .space 4 | |
14580 | ld1: .space 4 | |
14581 | x1: .space 4 | |
14582 | x2: .space 4 | |
14583 | x3: .space 4 | |
14584 | .text | |
14585 | addi 3,31,ld0@got@tlsgd | |
14586 | bl __tls_get_addr | |
14587 | addi 3,31,x1@got@tlsld | |
14588 | bl __tls_get_addr | |
14589 | addi 9,3,x1@dtprel | |
14590 | addis 9,3,x2@dtprel@ha | |
14591 | addi 9,9,x2@dtprel@l | |
14592 | lwz 9,x3@got@tprel(31) | |
14593 | add 9,9,x@tls | |
14594 | addi 9,2,x1@tprel | |
14595 | addis 9,2,x2@tprel@ha | |
14596 | addi 9,9,x2@tprel@l' | |
14597 | tls_first_major=2 | |
14598 | tls_first_minor=14 | |
2f3321ca | 14599 | tls_as_opt="-a32 --fatal-warnings" |
c4501e62 JJ |
14600 | ;; |
14601 | powerpc64-*-*) | |
14602 | conftest_s=' | |
14603 | .section ".tdata","awT",@progbits | |
14604 | .align 3 | |
14605 | ld0: .space 8 | |
14606 | ld1: .space 8 | |
14607 | x1: .space 8 | |
14608 | x2: .space 8 | |
14609 | x3: .space 8 | |
14610 | .text | |
14611 | addi 3,2,ld0@got@tlsgd | |
14612 | bl .__tls_get_addr | |
14613 | nop | |
14614 | addi 3,2,ld1@toc | |
14615 | bl .__tls_get_addr | |
14616 | nop | |
14617 | addi 3,2,x1@got@tlsld | |
14618 | bl .__tls_get_addr | |
14619 | nop | |
14620 | addi 9,3,x1@dtprel | |
14621 | bl .__tls_get_addr | |
14622 | nop | |
14623 | addis 9,3,x2@dtprel@ha | |
14624 | addi 9,9,x2@dtprel@l | |
14625 | bl .__tls_get_addr | |
14626 | nop | |
14627 | ld 9,x3@got@dtprel(2) | |
14628 | add 9,9,3 | |
14629 | bl .__tls_get_addr | |
14630 | nop' | |
14631 | tls_first_major=2 | |
14632 | tls_first_minor=14 | |
2f3321ca | 14633 | tls_as_opt="-a64 --fatal-warnings" |
c4501e62 | 14634 | ;; |
fd3cd001 UW |
14635 | s390-*-*) |
14636 | conftest_s=' | |
14637 | .section ".tdata","awT",@progbits | |
14638 | foo: .long 25 | |
14639 | .text | |
14640 | .long foo@TLSGD | |
14641 | .long foo@TLSLDM | |
14642 | .long foo@DTPOFF | |
14643 | .long foo@NTPOFF | |
14644 | .long foo@GOTNTPOFF | |
14645 | .long foo@INDNTPOFF | |
14646 | l %r1,foo@GOTNTPOFF(%r12) | |
14647 | l %r1,0(%r1):tls_load:foo | |
14648 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
14649 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
14650 | tls_first_major=2 | |
14651 | tls_first_minor=14 | |
2f3321ca | 14652 | tls_as_opt="-m31 --fatal-warnings" |
fd3cd001 UW |
14653 | ;; |
14654 | s390x-*-*) | |
14655 | conftest_s=' | |
14656 | .section ".tdata","awT",@progbits | |
14657 | foo: .long 25 | |
14658 | .text | |
14659 | .quad foo@TLSGD | |
14660 | .quad foo@TLSLDM | |
14661 | .quad foo@DTPOFF | |
14662 | .quad foo@NTPOFF | |
14663 | .quad foo@GOTNTPOFF | |
14664 | lg %r1,foo@GOTNTPOFF(%r12) | |
14665 | larl %r1,foo@INDNTPOFF | |
14666 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
14667 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
14668 | tls_first_major=2 | |
14669 | tls_first_minor=14 | |
2f3321ca | 14670 | tls_as_opt="-m64 -Aesame --fatal-warnings" |
fd3cd001 | 14671 | ;; |
9ff13962 KK |
14672 | sh-*-* | sh[34]-*-*) |
14673 | conftest_s=' | |
14674 | .section ".tdata","awT",@progbits | |
14675 | foo: .long 25 | |
14676 | .text | |
14677 | .long foo@TLSGD | |
14678 | .long foo@TLSLDM | |
14679 | .long foo@DTPOFF | |
14680 | .long foo@GOTTPOFF | |
14681 | .long foo@TPOFF' | |
14682 | tls_first_major=2 | |
14683 | tls_first_minor=13 | |
2f3321ca | 14684 | tls_as_opt=--fatal-warnings |
9ff13962 | 14685 | ;; |
5751a10b | 14686 | sparc*-*-*) |
2f3321ca | 14687 | case "$target" in |
7935dc1b EB |
14688 | sparc*-sun-solaris2.[56789]*) |
14689 | # TLS was introduced in the Solaris 9 4/04 release but | |
14690 | # we do not enable it by default on Solaris 9 either. | |
14691 | if test "x$enable_tls" = xyes ; then | |
14692 | on_solaris=yes | |
14693 | else | |
14694 | enable_tls=no; | |
14695 | fi | |
14696 | ;; | |
2f3321ca EB |
14697 | sparc*-sun-solaris2.*) |
14698 | on_solaris=yes | |
14699 | ;; | |
14700 | *) | |
14701 | on_solaris=no | |
14702 | ;; | |
14703 | esac | |
14704 | if test x$on_solaris = xyes && test x$gas_flag = xno; then | |
14705 | conftest_s=' | |
14706 | .section ".tdata",#alloc,#write,#tls | |
14707 | foo: .long 25 | |
14708 | .text | |
14709 | sethi %tgd_hi22(foo), %o0 | |
14710 | add %o0, %tgd_lo10(foo), %o1 | |
14711 | add %l7, %o1, %o0, %tgd_add(foo) | |
14712 | call __tls_get_addr, %tgd_call(foo) | |
14713 | sethi %tldm_hi22(foo), %l1 | |
14714 | add %l1, %tldm_lo10(foo), %l2 | |
14715 | add %l7, %l2, %o0, %tldm_add(foo) | |
14716 | call __tls_get_addr, %tldm_call(foo) | |
14717 | sethi %tldo_hix22(foo), %l3 | |
14718 | xor %l3, %tldo_lox10(foo), %l4 | |
14719 | add %o0, %l4, %l5, %tldo_add(foo) | |
14720 | sethi %tie_hi22(foo), %o3 | |
14721 | add %o3, %tie_lo10(foo), %o3 | |
14722 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14723 | add %g7, %o2, %o4, %tie_add(foo) | |
14724 | sethi %tle_hix22(foo), %l1 | |
14725 | xor %l1, %tle_lox10(foo), %o5 | |
14726 | ld [%g7 + %o5], %o1' | |
14727 | tls_first_major=0 | |
14728 | tls_first_minor=0 | |
14729 | else | |
14730 | conftest_s=' | |
5751a10b JJ |
14731 | .section ".tdata","awT",@progbits |
14732 | foo: .long 25 | |
14733 | .text | |
14734 | sethi %tgd_hi22(foo), %o0 | |
14735 | add %o0, %tgd_lo10(foo), %o1 | |
14736 | add %l7, %o1, %o0, %tgd_add(foo) | |
14737 | call __tls_get_addr, %tgd_call(foo) | |
14738 | sethi %tldm_hi22(foo), %l1 | |
14739 | add %l1, %tldm_lo10(foo), %l2 | |
14740 | add %l7, %l2, %o0, %tldm_add(foo) | |
14741 | call __tls_get_addr, %tldm_call(foo) | |
14742 | sethi %tldo_hix22(foo), %l3 | |
14743 | xor %l3, %tldo_lox10(foo), %l4 | |
14744 | add %o0, %l4, %l5, %tldo_add(foo) | |
14745 | sethi %tie_hi22(foo), %o3 | |
14746 | add %o3, %tie_lo10(foo), %o3 | |
14747 | ld [%l7 + %o3], %o2, %tie_ld(foo) | |
14748 | add %g7, %o2, %o4, %tie_add(foo) | |
14749 | sethi %tle_hix22(foo), %l1 | |
14750 | xor %l1, %tle_lox10(foo), %o5 | |
14751 | ld [%g7 + %o5], %o1' | |
14752 | tls_first_major=2 | |
14753 | tls_first_minor=14 | |
2f3321ca EB |
14754 | tls_as_opt="-32 --fatal-warnings" |
14755 | fi | |
5751a10b | 14756 | ;; |
f996902d | 14757 | esac |
8dea1cca DD |
14758 | set_have_as_tls=no |
14759 | if test "x$enable_tls" = xno ; then | |
14760 | : # TLS explicitly disabled. | |
14761 | elif test "x$enable_tls" = xyes ; then | |
14762 | set_have_as_tls=yes # TLS explicitly enabled. | |
14763 | elif test -z "$tls_first_major"; then | |
8ada417f ZW |
14764 | : # If we don't have a check, assume no support. |
14765 | else | |
b61ff9c8 BS |
14766 | echo "$as_me:$LINENO: checking assembler for thread-local storage support" >&5 |
14767 | echo $ECHO_N "checking assembler for thread-local storage support... $ECHO_C" >&6 | |
ba479fd2 NN |
14768 | if test "${gcc_cv_as_tls+set}" = set; then |
14769 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
14770 | else |
14771 | gcc_cv_as_tls=no | |
14772 | if test $in_tree_gas = yes; then | |
14773 | if test $gcc_cv_gas_vers -ge `expr \( \( $tls_first_major \* 1000 \) + $tls_first_minor \) \* 1000 + 0` | |
14774 | then gcc_cv_as_tls=yes | |
ad9c4d9f | 14775 | fi |
8ada417f | 14776 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14777 | echo "$conftest_s" > conftest.s |
2f3321ca | 14778 | if { ac_try='$gcc_cv_as $tls_as_opt -o conftest.o conftest.s >&5' |
ba479fd2 NN |
14779 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
14780 | (eval $ac_try) 2>&5 | |
14781 | ac_status=$? | |
14782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14783 | (exit $ac_status); }; } | |
8ada417f ZW |
14784 | then |
14785 | gcc_cv_as_tls=yes | |
14786 | else | |
14787 | echo "configure: failed program was" >&5 | |
14788 | cat conftest.s >&5 | |
14789 | fi | |
14790 | rm -f conftest.o conftest.s | |
f996902d | 14791 | fi |
f996902d | 14792 | fi |
b61ff9c8 BS |
14793 | echo "$as_me:$LINENO: result: $gcc_cv_as_tls" >&5 |
14794 | echo "${ECHO_T}$gcc_cv_as_tls" >&6 | |
63cf211a | 14795 | if test $gcc_cv_as_tls = yes; then |
8dea1cca DD |
14796 | set_have_as_tls=yes |
14797 | fi | |
14798 | fi | |
14799 | if test $set_have_as_tls = yes ; then | |
ba479fd2 NN |
14800 | |
14801 | cat >>confdefs.h <<\_ACEOF | |
f996902d | 14802 | #define HAVE_AS_TLS 1 |
ba479fd2 | 14803 | _ACEOF |
f996902d | 14804 | |
8ada417f ZW |
14805 | fi |
14806 | ||
14807 | # Target-specific assembler checks. | |
f996902d | 14808 | |
b61ff9c8 BS |
14809 | echo "$as_me:$LINENO: checking linker -Bstatic/-Bdynamic option" >&5 |
14810 | echo $ECHO_N "checking linker -Bstatic/-Bdynamic option... $ECHO_C" >&6 | |
7e9d8517 L |
14811 | gcc_cv_ld_static_dynamic=no |
14812 | if test $in_tree_ld = yes ; then | |
14813 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then | |
14814 | gcc_cv_ld_static_dynamic=yes | |
14815 | fi | |
14816 | elif test x$gcc_cv_ld != x; then | |
14817 | # Check if linker supports -Bstatic/-Bdynamic option | |
14818 | if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ | |
14819 | && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then | |
14820 | gcc_cv_ld_static_dynamic=yes | |
14821 | fi | |
14822 | fi | |
14823 | if test x"$gcc_cv_ld_static_dynamic" = xyes; then | |
14824 | ||
14825 | cat >>confdefs.h <<\_ACEOF | |
14826 | #define HAVE_LD_STATIC_DYNAMIC 1 | |
14827 | _ACEOF | |
14828 | ||
14829 | fi | |
b61ff9c8 BS |
14830 | echo "$as_me:$LINENO: result: $gcc_cv_ld_static_dynamic" >&5 |
14831 | echo "${ECHO_T}$gcc_cv_ld_static_dynamic" >&6 | |
7e9d8517 | 14832 | |
d594623a | 14833 | if test x"$demangler_in_ld" = xyes; then |
b61ff9c8 BS |
14834 | echo "$as_me:$LINENO: checking linker --demangle support" >&5 |
14835 | echo $ECHO_N "checking linker --demangle support... $ECHO_C" >&6 | |
d594623a L |
14836 | gcc_cv_ld_demangle=no |
14837 | if test $in_tree_ld = yes; then | |
14838 | 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 \ | |
14839 | gcc_cv_ld_demangle=yes | |
14840 | fi | |
14841 | elif test x$gcc_cv_ld != x -a x"$gnu_ld" = xyes; then | |
14842 | # Check if the GNU linker supports --demangle option | |
14843 | if $gcc_cv_ld --help 2>/dev/null | grep no-demangle > /dev/null; then | |
14844 | gcc_cv_ld_demangle=yes | |
14845 | fi | |
14846 | fi | |
14847 | if test x"$gcc_cv_ld_demangle" = xyes; then | |
14848 | ||
14849 | cat >>confdefs.h <<\_ACEOF | |
14850 | #define HAVE_LD_DEMANGLE 1 | |
14851 | _ACEOF | |
14852 | ||
14853 | fi | |
b61ff9c8 BS |
14854 | echo "$as_me:$LINENO: result: $gcc_cv_ld_demangle" >&5 |
14855 | echo "${ECHO_T}$gcc_cv_ld_demangle" >&6 | |
d594623a L |
14856 | fi |
14857 | ||
3a37b08e RH |
14858 | case "$target" in |
14859 | # All TARGET_ABI_OSF targets. | |
14860 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
b61ff9c8 BS |
14861 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
14862 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
ba479fd2 NN |
14863 | if test "${gcc_cv_as_alpha_explicit_relocs+set}" = set; then |
14864 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3a37b08e | 14865 | else |
8ada417f ZW |
14866 | gcc_cv_as_alpha_explicit_relocs=no |
14867 | if test $in_tree_gas = yes; then | |
14868 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 12 \) \* 1000 + 0` | |
14869 | then gcc_cv_as_alpha_explicit_relocs=yes | |
ad9c4d9f | 14870 | fi |
8ada417f | 14871 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 14872 | echo ' .set nomacro |
3a37b08e RH |
14873 | .text |
14874 | extbl $3, $2, $3 !lituse_bytoff!1 | |
14875 | ldq $2, a($29) !literal!1 | |
14876 | ldq $4, b($29) !literal!2 | |
14877 | ldq_u $3, 0($2) !lituse_base!1 | |
14878 | ldq $27, f($29) !literal!5 | |
14879 | jsr $26, ($27), f !lituse_jsr!5 | |
14880 | ldah $29, 0($26) !gpdisp!3 | |
14881 | lda $0, c($29) !gprel | |
14882 | ldah $1, d($29) !gprelhigh | |
14883 | lda $1, d($1) !gprellow | |
8ada417f | 14884 | lda $29, 0($29) !gpdisp!3' > conftest.s |
ba479fd2 NN |
14885 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14887 | (eval $ac_try) 2>&5 | |
14888 | ac_status=$? | |
14889 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14890 | (exit $ac_status); }; } | |
8ada417f ZW |
14891 | then |
14892 | gcc_cv_as_alpha_explicit_relocs=yes | |
14893 | else | |
14894 | echo "configure: failed program was" >&5 | |
14895 | cat conftest.s >&5 | |
14896 | fi | |
14897 | rm -f conftest.o conftest.s | |
14898 | fi | |
cafe096b | 14899 | fi |
b61ff9c8 BS |
14900 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_explicit_relocs" >&5 |
14901 | echo "${ECHO_T}$gcc_cv_as_alpha_explicit_relocs" >&6 | |
63cf211a | 14902 | if test $gcc_cv_as_alpha_explicit_relocs = yes; then |
ba479fd2 NN |
14903 | |
14904 | cat >>confdefs.h <<\_ACEOF | |
3a37b08e | 14905 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
ba479fd2 | 14906 | _ACEOF |
3a37b08e | 14907 | |
d006f5eb | 14908 | fi |
b61ff9c8 BS |
14909 | echo "$as_me:$LINENO: checking assembler for jsrdirect relocation support" >&5 |
14910 | echo $ECHO_N "checking assembler for jsrdirect relocation support... $ECHO_C" >&6 | |
d006f5eb RH |
14911 | if test "${gcc_cv_as_alpha_jsrdirect_relocs+set}" = set; then |
14912 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14913 | else | |
14914 | gcc_cv_as_alpha_jsrdirect_relocs=no | |
14915 | if test $in_tree_gas = yes; then | |
14916 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 90` | |
14917 | then gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14918 | fi | |
14919 | elif test x$gcc_cv_as != x; then | |
14920 | echo ' .set nomacro | |
14921 | .text | |
14922 | ldq $27, a($29) !literal!1 | |
14923 | jsr $26, ($27), a !lituse_jsrdirect!1' > conftest.s | |
14924 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
14925 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14926 | (eval $ac_try) 2>&5 | |
14927 | ac_status=$? | |
14928 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14929 | (exit $ac_status); }; } | |
14930 | then | |
14931 | gcc_cv_as_alpha_jsrdirect_relocs=yes | |
14932 | else | |
14933 | echo "configure: failed program was" >&5 | |
14934 | cat conftest.s >&5 | |
14935 | fi | |
14936 | rm -f conftest.o conftest.s | |
14937 | fi | |
14938 | fi | |
b61ff9c8 BS |
14939 | echo "$as_me:$LINENO: result: $gcc_cv_as_alpha_jsrdirect_relocs" >&5 |
14940 | echo "${ECHO_T}$gcc_cv_as_alpha_jsrdirect_relocs" >&6 | |
d006f5eb RH |
14941 | if test $gcc_cv_as_alpha_jsrdirect_relocs = yes; then |
14942 | ||
14943 | cat >>confdefs.h <<\_ACEOF | |
14944 | #define HAVE_AS_JSRDIRECT_RELOCS 1 | |
14945 | _ACEOF | |
14946 | ||
86da66b5 HPN |
14947 | fi |
14948 | ;; | |
14949 | ||
14950 | cris-*-*) | |
b61ff9c8 BS |
14951 | echo "$as_me:$LINENO: checking assembler for -no-mul-bug-abort option" >&5 |
14952 | echo $ECHO_N "checking assembler for -no-mul-bug-abort option... $ECHO_C" >&6 | |
86da66b5 HPN |
14953 | if test "${gcc_cv_as_cris_no_mul_bug+set}" = set; then |
14954 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
14955 | else | |
14956 | gcc_cv_as_cris_no_mul_bug=no | |
14957 | if test $in_tree_gas = yes; then | |
14958 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
14959 | then gcc_cv_as_cris_no_mul_bug=yes | |
14960 | fi | |
14961 | elif test x$gcc_cv_as != x; then | |
14962 | echo '.text' > conftest.s | |
14963 | if { ac_try='$gcc_cv_as -no-mul-bug-abort -o conftest.o conftest.s >&5' | |
14964 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
14965 | (eval $ac_try) 2>&5 | |
14966 | ac_status=$? | |
14967 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
14968 | (exit $ac_status); }; } | |
14969 | then | |
14970 | gcc_cv_as_cris_no_mul_bug=yes | |
14971 | else | |
14972 | echo "configure: failed program was" >&5 | |
14973 | cat conftest.s >&5 | |
14974 | fi | |
14975 | rm -f conftest.o conftest.s | |
14976 | fi | |
14977 | fi | |
b61ff9c8 BS |
14978 | echo "$as_me:$LINENO: result: $gcc_cv_as_cris_no_mul_bug" >&5 |
14979 | echo "${ECHO_T}$gcc_cv_as_cris_no_mul_bug" >&6 | |
86da66b5 HPN |
14980 | if test $gcc_cv_as_cris_no_mul_bug = yes; then |
14981 | ||
14982 | cat >>confdefs.h <<\_ACEOF | |
14983 | #define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1 | |
14984 | _ACEOF | |
14985 | ||
8ada417f | 14986 | fi |
3a37b08e | 14987 | ;; |
8ada417f | 14988 | |
1cb36a98 | 14989 | sparc*-*-*) |
b61ff9c8 BS |
14990 | echo "$as_me:$LINENO: checking assembler for .register" >&5 |
14991 | echo $ECHO_N "checking assembler for .register... $ECHO_C" >&6 | |
ba479fd2 NN |
14992 | if test "${gcc_cv_as_sparc_register_op+set}" = set; then |
14993 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 14994 | else |
8ada417f ZW |
14995 | gcc_cv_as_sparc_register_op=no |
14996 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 14997 | echo '.register %g2, #scratch' > conftest.s |
ba479fd2 NN |
14998 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
14999 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15000 | (eval $ac_try) 2>&5 | |
15001 | ac_status=$? | |
15002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15003 | (exit $ac_status); }; } | |
8ada417f ZW |
15004 | then |
15005 | gcc_cv_as_sparc_register_op=yes | |
15006 | else | |
15007 | echo "configure: failed program was" >&5 | |
15008 | cat conftest.s >&5 | |
15009 | fi | |
15010 | rm -f conftest.o conftest.s | |
15011 | fi | |
cafe096b | 15012 | fi |
b61ff9c8 BS |
15013 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_register_op" >&5 |
15014 | echo "${ECHO_T}$gcc_cv_as_sparc_register_op" >&6 | |
63cf211a | 15015 | if test $gcc_cv_as_sparc_register_op = yes; then |
ba479fd2 NN |
15016 | |
15017 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15018 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
ba479fd2 | 15019 | _ACEOF |
1cb36a98 | 15020 | |
8ada417f | 15021 | fi |
1cb36a98 | 15022 | |
b61ff9c8 BS |
15023 | echo "$as_me:$LINENO: checking assembler for -relax option" >&5 |
15024 | echo $ECHO_N "checking assembler for -relax option... $ECHO_C" >&6 | |
ba479fd2 NN |
15025 | if test "${gcc_cv_as_sparc_relax+set}" = set; then |
15026 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
e95b1e6a | 15027 | else |
8ada417f ZW |
15028 | gcc_cv_as_sparc_relax=no |
15029 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15030 | echo '.text' > conftest.s |
ba479fd2 NN |
15031 | if { ac_try='$gcc_cv_as -relax -o conftest.o conftest.s >&5' |
15032 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15033 | (eval $ac_try) 2>&5 | |
15034 | ac_status=$? | |
15035 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15036 | (exit $ac_status); }; } | |
8ada417f ZW |
15037 | then |
15038 | gcc_cv_as_sparc_relax=yes | |
15039 | else | |
15040 | echo "configure: failed program was" >&5 | |
15041 | cat conftest.s >&5 | |
15042 | fi | |
15043 | rm -f conftest.o conftest.s | |
15044 | fi | |
cafe096b | 15045 | fi |
b61ff9c8 BS |
15046 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_relax" >&5 |
15047 | echo "${ECHO_T}$gcc_cv_as_sparc_relax" >&6 | |
63cf211a | 15048 | if test $gcc_cv_as_sparc_relax = yes; then |
ba479fd2 NN |
15049 | |
15050 | cat >>confdefs.h <<\_ACEOF | |
e95b1e6a | 15051 | #define HAVE_AS_RELAX_OPTION 1 |
ba479fd2 | 15052 | _ACEOF |
e95b1e6a | 15053 | |
8ada417f | 15054 | fi |
e95b1e6a | 15055 | |
b61ff9c8 BS |
15056 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs" >&5 |
15057 | echo $ECHO_N "checking assembler for unaligned pcrel relocs... $ECHO_C" >&6 | |
ba479fd2 NN |
15058 | if test "${gcc_cv_as_sparc_ua_pcrel+set}" = set; then |
15059 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
17e9e88c | 15060 | else |
8ada417f ZW |
15061 | gcc_cv_as_sparc_ua_pcrel=no |
15062 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15063 | echo '.text |
8ada417f ZW |
15064 | foo: |
15065 | nop | |
15066 | .data | |
15067 | .align 4 | |
15068 | .byte 0 | |
15069 | .uaword %r_disp32(foo)' > conftest.s | |
ba479fd2 NN |
15070 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15071 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15072 | (eval $ac_try) 2>&5 | |
15073 | ac_status=$? | |
15074 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15075 | (exit $ac_status); }; } | |
8ada417f ZW |
15076 | then |
15077 | if test x$gcc_cv_ld != x \ | |
15078 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
15079 | gcc_cv_as_sparc_ua_pcrel=yes | |
15080 | fi | |
15081 | rm -f conftest | |
15082 | else | |
15083 | echo "configure: failed program was" >&5 | |
15084 | cat conftest.s >&5 | |
15085 | fi | |
15086 | rm -f conftest.o conftest.s | |
15087 | fi | |
cafe096b | 15088 | fi |
b61ff9c8 BS |
15089 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel" >&5 |
15090 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel" >&6 | |
63cf211a | 15091 | if test $gcc_cv_as_sparc_ua_pcrel = yes; then |
ba479fd2 NN |
15092 | |
15093 | cat >>confdefs.h <<\_ACEOF | |
17e9e88c | 15094 | #define HAVE_AS_SPARC_UA_PCREL 1 |
ba479fd2 | 15095 | _ACEOF |
17e9e88c | 15096 | |
17e9e88c | 15097 | |
b61ff9c8 BS |
15098 | echo "$as_me:$LINENO: checking assembler for unaligned pcrel relocs against hidden symbols" >&5 |
15099 | echo $ECHO_N "checking assembler for unaligned pcrel relocs against hidden symbols... $ECHO_C" >&6 | |
ba479fd2 NN |
15100 | if test "${gcc_cv_as_sparc_ua_pcrel_hidden+set}" = set; then |
15101 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
cf7b8b0d | 15102 | else |
8ada417f ZW |
15103 | gcc_cv_as_sparc_ua_pcrel_hidden=no |
15104 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15105 | echo '.data |
8ada417f ZW |
15106 | .align 4 |
15107 | .byte 0x31 | |
15108 | .uaword %r_disp32(foo) | |
15109 | .byte 0x32, 0x33, 0x34 | |
15110 | .global foo | |
15111 | .hidden foo | |
15112 | foo: | |
15113 | .skip 4' > conftest.s | |
ba479fd2 NN |
15114 | if { ac_try='$gcc_cv_as -K PIC -o conftest.o conftest.s >&5' |
15115 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15116 | (eval $ac_try) 2>&5 | |
15117 | ac_status=$? | |
15118 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15119 | (exit $ac_status); }; } | |
8ada417f ZW |
15120 | then |
15121 | if test x$gcc_cv_ld != x && test x$gcc_cv_objdump != x \ | |
15122 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
15123 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
15124 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
15125 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
15126 | | grep 'DISP32' > /dev/null 2>&1; then | |
15127 | : | |
15128 | else | |
15129 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
cf7b8b0d | 15130 | fi |
8ada417f ZW |
15131 | fi |
15132 | rm -f conftest | |
15133 | else | |
15134 | echo "configure: failed program was" >&5 | |
15135 | cat conftest.s >&5 | |
15136 | fi | |
15137 | rm -f conftest.o conftest.s | |
15138 | fi | |
cafe096b | 15139 | fi |
b61ff9c8 BS |
15140 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_ua_pcrel_hidden" >&5 |
15141 | echo "${ECHO_T}$gcc_cv_as_sparc_ua_pcrel_hidden" >&6 | |
63cf211a | 15142 | if test $gcc_cv_as_sparc_ua_pcrel_hidden = yes; then |
ba479fd2 NN |
15143 | |
15144 | cat >>confdefs.h <<\_ACEOF | |
cf7b8b0d | 15145 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
ba479fd2 | 15146 | _ACEOF |
cf7b8b0d | 15147 | |
8ada417f | 15148 | fi |
ba479fd2 | 15149 | |
8ada417f | 15150 | fi # unaligned pcrel relocs |
cf7b8b0d | 15151 | |
b61ff9c8 BS |
15152 | echo "$as_me:$LINENO: checking assembler for offsetable %lo()" >&5 |
15153 | echo $ECHO_N "checking assembler for offsetable %lo()... $ECHO_C" >&6 | |
ba479fd2 NN |
15154 | if test "${gcc_cv_as_sparc_offsetable_lo10+set}" = set; then |
15155 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5b68c389 | 15156 | else |
8ada417f ZW |
15157 | gcc_cv_as_sparc_offsetable_lo10=no |
15158 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15159 | echo '.text |
8ada417f ZW |
15160 | or %g1, %lo(ab) + 12, %g1 |
15161 | or %g1, %lo(ab + 12), %g1' > conftest.s | |
ba479fd2 NN |
15162 | if { ac_try='$gcc_cv_as -xarch=v9 -o conftest.o conftest.s >&5' |
15163 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15164 | (eval $ac_try) 2>&5 | |
15165 | ac_status=$? | |
15166 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15167 | (exit $ac_status); }; } | |
8ada417f ZW |
15168 | then |
15169 | if test x$gcc_cv_objdump != x \ | |
ecb0ccbc | 15170 | && $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \ |
8ada417f | 15171 | | grep ' 82106000 82106000' > /dev/null 2>&1; then |
1b5c0152 | 15172 | gcc_cv_as_sparc_offsetable_lo10=yes |
8ada417f ZW |
15173 | fi |
15174 | else | |
15175 | echo "configure: failed program was" >&5 | |
15176 | cat conftest.s >&5 | |
15177 | fi | |
15178 | rm -f conftest.o conftest.s | |
15179 | fi | |
cafe096b | 15180 | fi |
b61ff9c8 BS |
15181 | echo "$as_me:$LINENO: result: $gcc_cv_as_sparc_offsetable_lo10" >&5 |
15182 | echo "${ECHO_T}$gcc_cv_as_sparc_offsetable_lo10" >&6 | |
63cf211a | 15183 | if test $gcc_cv_as_sparc_offsetable_lo10 = yes; then |
ba479fd2 NN |
15184 | |
15185 | cat >>confdefs.h <<\_ACEOF | |
1cb36a98 | 15186 | #define HAVE_AS_OFFSETABLE_LO10 1 |
ba479fd2 | 15187 | _ACEOF |
1cb36a98 | 15188 | |
8ada417f | 15189 | fi |
1cb36a98 RH |
15190 | ;; |
15191 | ||
c307e6dd | 15192 | i[34567]86-*-* | x86_64-*-*) |
d38bc601 BF |
15193 | case $target_os in |
15194 | cygwin* | pe | mingw32*) | |
15195 | # Used for DWARF 2 in PE | |
b61ff9c8 BS |
15196 | echo "$as_me:$LINENO: checking assembler for .secrel32 relocs" >&5 |
15197 | echo $ECHO_N "checking assembler for .secrel32 relocs... $ECHO_C" >&6 | |
d38bc601 BF |
15198 | if test "${gcc_cv_as_ix86_pe_secrel32+set}" = set; then |
15199 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15200 | else | |
15201 | gcc_cv_as_ix86_pe_secrel32=no | |
15202 | if test $in_tree_gas = yes; then | |
15203 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 15 \) \* 1000 + 91` | |
15204 | then gcc_cv_as_ix86_pe_secrel32=yes | |
15205 | fi | |
15206 | elif test x$gcc_cv_as != x; then | |
15207 | echo '.text | |
15208 | foo: nop | |
15209 | .data | |
15210 | .secrel32 foo' > conftest.s | |
15211 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15212 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15213 | (eval $ac_try) 2>&5 | |
15214 | ac_status=$? | |
15215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15216 | (exit $ac_status); }; } | |
15217 | then | |
15218 | if test x$gcc_cv_ld != x \ | |
15219 | && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1; then | |
15220 | gcc_cv_as_ix86_pe_secrel32=yes | |
15221 | fi | |
15222 | rm -f conftest | |
15223 | else | |
15224 | echo "configure: failed program was" >&5 | |
15225 | cat conftest.s >&5 | |
15226 | fi | |
15227 | rm -f conftest.o conftest.s | |
15228 | fi | |
15229 | fi | |
b61ff9c8 BS |
15230 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_pe_secrel32" >&5 |
15231 | echo "${ECHO_T}$gcc_cv_as_ix86_pe_secrel32" >&6 | |
d38bc601 BF |
15232 | if test $gcc_cv_as_ix86_pe_secrel32 = yes; then |
15233 | ||
15234 | cat >>confdefs.h <<\_ACEOF | |
15235 | #define HAVE_GAS_PE_SECREL32_RELOC 1 | |
15236 | _ACEOF | |
15237 | ||
15238 | fi | |
15239 | ;; | |
15240 | esac | |
15241 | ||
b61ff9c8 BS |
15242 | echo "$as_me:$LINENO: checking assembler for filds and fists mnemonics" >&5 |
15243 | echo $ECHO_N "checking assembler for filds and fists mnemonics... $ECHO_C" >&6 | |
ba479fd2 NN |
15244 | if test "${gcc_cv_as_ix86_filds_fists+set}" = set; then |
15245 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15246 | else |
15247 | gcc_cv_as_ix86_filds_fists=no | |
15248 | if test $in_tree_gas = yes; then | |
15249 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 9 \) \* 1000 + 0` | |
15250 | then gcc_cv_as_ix86_filds_fists=yes | |
ad9c4d9f | 15251 | fi |
8ada417f | 15252 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15253 | echo 'filds mem; fists mem' > conftest.s |
ba479fd2 NN |
15254 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15256 | (eval $ac_try) 2>&5 | |
15257 | ac_status=$? | |
15258 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15259 | (exit $ac_status); }; } | |
8ada417f ZW |
15260 | then |
15261 | gcc_cv_as_ix86_filds_fists=yes | |
15262 | else | |
15263 | echo "configure: failed program was" >&5 | |
15264 | cat conftest.s >&5 | |
981d4858 | 15265 | fi |
8ada417f ZW |
15266 | rm -f conftest.o conftest.s |
15267 | fi | |
15268 | fi | |
b61ff9c8 BS |
15269 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_filds_fists" >&5 |
15270 | echo "${ECHO_T}$gcc_cv_as_ix86_filds_fists" >&6 | |
63cf211a | 15271 | if test $gcc_cv_as_ix86_filds_fists = yes; then |
ba479fd2 NN |
15272 | |
15273 | cat >>confdefs.h <<\_ACEOF | |
8ada417f | 15274 | #define HAVE_GAS_FILDS_FISTS 1 |
ba479fd2 | 15275 | _ACEOF |
ad9c4d9f | 15276 | |
f6f5dff2 RO |
15277 | fi |
15278 | ||
b61ff9c8 BS |
15279 | echo "$as_me:$LINENO: checking assembler for cmov syntax" >&5 |
15280 | echo $ECHO_N "checking assembler for cmov syntax... $ECHO_C" >&6 | |
ba479fd2 NN |
15281 | if test "${gcc_cv_as_ix86_cmov_sun_syntax+set}" = set; then |
15282 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
f6f5dff2 RO |
15283 | else |
15284 | gcc_cv_as_ix86_cmov_sun_syntax=no | |
15285 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 15286 | echo 'cmovl.l %edx, %eax' > conftest.s |
ba479fd2 NN |
15287 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15288 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15289 | (eval $ac_try) 2>&5 | |
15290 | ac_status=$? | |
15291 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15292 | (exit $ac_status); }; } | |
f6f5dff2 RO |
15293 | then |
15294 | gcc_cv_as_ix86_cmov_sun_syntax=yes | |
15295 | else | |
15296 | echo "configure: failed program was" >&5 | |
15297 | cat conftest.s >&5 | |
15298 | fi | |
15299 | rm -f conftest.o conftest.s | |
15300 | fi | |
15301 | fi | |
b61ff9c8 BS |
15302 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_cmov_sun_syntax" >&5 |
15303 | echo "${ECHO_T}$gcc_cv_as_ix86_cmov_sun_syntax" >&6 | |
63cf211a | 15304 | if test $gcc_cv_as_ix86_cmov_sun_syntax = yes; then |
ba479fd2 NN |
15305 | |
15306 | cat >>confdefs.h <<\_ACEOF | |
f6f5dff2 | 15307 | #define HAVE_AS_IX86_CMOV_SUN_SYNTAX 1 |
ba479fd2 | 15308 | _ACEOF |
f6f5dff2 | 15309 | |
b6c03bcd RS |
15310 | fi |
15311 | ||
b61ff9c8 BS |
15312 | echo "$as_me:$LINENO: checking assembler for ffreep mnemonic" >&5 |
15313 | echo $ECHO_N "checking assembler for ffreep mnemonic... $ECHO_C" >&6 | |
b6c03bcd RS |
15314 | if test "${gcc_cv_as_ix86_ffreep+set}" = set; then |
15315 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15316 | else | |
15317 | gcc_cv_as_ix86_ffreep=no | |
15318 | if test x$gcc_cv_as != x; then | |
15319 | echo 'ffreep %st(1)' > conftest.s | |
15320 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15321 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15322 | (eval $ac_try) 2>&5 | |
15323 | ac_status=$? | |
15324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15325 | (exit $ac_status); }; } | |
15326 | then | |
15327 | gcc_cv_as_ix86_ffreep=yes | |
15328 | else | |
15329 | echo "configure: failed program was" >&5 | |
15330 | cat conftest.s >&5 | |
15331 | fi | |
15332 | rm -f conftest.o conftest.s | |
15333 | fi | |
15334 | fi | |
b61ff9c8 BS |
15335 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_ffreep" >&5 |
15336 | echo "${ECHO_T}$gcc_cv_as_ix86_ffreep" >&6 | |
b6c03bcd RS |
15337 | if test $gcc_cv_as_ix86_ffreep = yes; then |
15338 | ||
15339 | cat >>confdefs.h <<\_ACEOF | |
15340 | #define HAVE_AS_IX86_FFREEP 1 | |
15341 | _ACEOF | |
15342 | ||
38ca3765 UB |
15343 | fi |
15344 | ||
b61ff9c8 BS |
15345 | echo "$as_me:$LINENO: checking assembler for sahf mnemonic" >&5 |
15346 | echo $ECHO_N "checking assembler for sahf mnemonic... $ECHO_C" >&6 | |
38ca3765 UB |
15347 | if test "${gcc_cv_as_ix86_sahf+set}" = set; then |
15348 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15349 | else | |
15350 | gcc_cv_as_ix86_sahf=no | |
15351 | if test x$gcc_cv_as != x; then | |
15352 | echo 'sahf' > conftest.s | |
15353 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15354 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15355 | (eval $ac_try) 2>&5 | |
15356 | ac_status=$? | |
15357 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15358 | (exit $ac_status); }; } | |
15359 | then | |
15360 | gcc_cv_as_ix86_sahf=yes | |
15361 | else | |
15362 | echo "configure: failed program was" >&5 | |
15363 | cat conftest.s >&5 | |
15364 | fi | |
15365 | rm -f conftest.o conftest.s | |
15366 | fi | |
15367 | fi | |
b61ff9c8 BS |
15368 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_sahf" >&5 |
15369 | echo "${ECHO_T}$gcc_cv_as_ix86_sahf" >&6 | |
38ca3765 UB |
15370 | if test $gcc_cv_as_ix86_sahf = yes; then |
15371 | ||
15372 | cat >>confdefs.h <<\_ACEOF | |
15373 | #define HAVE_AS_IX86_SAHF 1 | |
15374 | _ACEOF | |
15375 | ||
68b92f78 RS |
15376 | fi |
15377 | ||
b61ff9c8 BS |
15378 | echo "$as_me:$LINENO: checking assembler for different section symbol subtraction" >&5 |
15379 | echo $ECHO_N "checking assembler for different section symbol subtraction... $ECHO_C" >&6 | |
68b92f78 RS |
15380 | if test "${gcc_cv_as_ix86_diff_sect_delta+set}" = set; then |
15381 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15382 | else | |
15383 | gcc_cv_as_ix86_diff_sect_delta=no | |
15384 | if test x$gcc_cv_as != x; then | |
15385 | echo '.section .rodata | |
15386 | .L1: | |
15387 | .long .L2-.L1 | |
15388 | .long .L3-.L1 | |
15389 | .text | |
15390 | .L3: nop | |
15391 | .L2: nop' > conftest.s | |
15392 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15393 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15394 | (eval $ac_try) 2>&5 | |
15395 | ac_status=$? | |
15396 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15397 | (exit $ac_status); }; } | |
15398 | then | |
15399 | gcc_cv_as_ix86_diff_sect_delta=yes | |
15400 | else | |
15401 | echo "configure: failed program was" >&5 | |
15402 | cat conftest.s >&5 | |
15403 | fi | |
15404 | rm -f conftest.o conftest.s | |
15405 | fi | |
15406 | fi | |
b61ff9c8 BS |
15407 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_diff_sect_delta" >&5 |
15408 | echo "${ECHO_T}$gcc_cv_as_ix86_diff_sect_delta" >&6 | |
68b92f78 RS |
15409 | if test $gcc_cv_as_ix86_diff_sect_delta = yes; then |
15410 | ||
15411 | cat >>confdefs.h <<\_ACEOF | |
15412 | #define HAVE_AS_IX86_DIFF_SECT_DELTA 1 | |
15413 | _ACEOF | |
15414 | ||
ad9c4d9f NN |
15415 | fi |
15416 | ||
6f3ca281 ZW |
15417 | # This one is used unconditionally by i386.[ch]; it is to be defined |
15418 | # to 1 if the feature is present, 0 otherwise. | |
b61ff9c8 BS |
15419 | echo "$as_me:$LINENO: checking assembler for GOTOFF in data" >&5 |
15420 | echo $ECHO_N "checking assembler for GOTOFF in data... $ECHO_C" >&6 | |
ba479fd2 NN |
15421 | if test "${gcc_cv_as_ix86_gotoff_in_data+set}" = set; then |
15422 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15423 | else |
15424 | gcc_cv_as_ix86_gotoff_in_data=no | |
15425 | if test $in_tree_gas = yes; then | |
15426 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
15427 | then gcc_cv_as_ix86_gotoff_in_data=yes | |
15428 | fi | |
15429 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15430 | echo ' .text |
f88c65f7 RH |
15431 | .L0: |
15432 | nop | |
15433 | .data | |
8ada417f | 15434 | .long .L0@GOTOFF' > conftest.s |
ba479fd2 NN |
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); }; } | |
8ada417f ZW |
15441 | then |
15442 | gcc_cv_as_ix86_gotoff_in_data=yes | |
15443 | else | |
15444 | echo "configure: failed program was" >&5 | |
15445 | cat conftest.s >&5 | |
f88c65f7 | 15446 | fi |
8ada417f ZW |
15447 | rm -f conftest.o conftest.s |
15448 | fi | |
15449 | fi | |
b61ff9c8 BS |
15450 | echo "$as_me:$LINENO: result: $gcc_cv_as_ix86_gotoff_in_data" >&5 |
15451 | echo "${ECHO_T}$gcc_cv_as_ix86_gotoff_in_data" >&6 | |
8ada417f | 15452 | |
6f3ca281 | 15453 | |
ba479fd2 | 15454 | cat >>confdefs.h <<_ACEOF |
6f3ca281 | 15455 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_ix86_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
ba479fd2 | 15456 | _ACEOF |
f88c65f7 | 15457 | |
1cb36a98 | 15458 | ;; |
ef1ecf87 RH |
15459 | |
15460 | ia64*-*-*) | |
b61ff9c8 BS |
15461 | echo "$as_me:$LINENO: checking assembler for ltoffx and ldxmov relocs" >&5 |
15462 | echo $ECHO_N "checking assembler for ltoffx and ldxmov relocs... $ECHO_C" >&6 | |
ba479fd2 NN |
15463 | if test "${gcc_cv_as_ia64_ltoffx_ldxmov_relocs+set}" = set; then |
15464 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
ef1ecf87 | 15465 | else |
8ada417f ZW |
15466 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=no |
15467 | if test $in_tree_gas = yes; then | |
15468 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15469 | then gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes | |
ad9c4d9f | 15470 | fi |
8ada417f | 15471 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15472 | echo ' .text |
ef1ecf87 RH |
15473 | addl r15 = @ltoffx(x#), gp |
15474 | ;; | |
cfa9ee99 | 15475 | ld8.mov r16 = [r15], x#' > conftest.s |
ba479fd2 NN |
15476 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15477 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15478 | (eval $ac_try) 2>&5 | |
15479 | ac_status=$? | |
15480 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15481 | (exit $ac_status); }; } | |
8ada417f | 15482 | then |
cfa9ee99 | 15483 | gcc_cv_as_ia64_ltoffx_ldxmov_relocs=yes |
8ada417f ZW |
15484 | else |
15485 | echo "configure: failed program was" >&5 | |
15486 | cat conftest.s >&5 | |
2c4a9cff | 15487 | fi |
8ada417f ZW |
15488 | rm -f conftest.o conftest.s |
15489 | fi | |
15490 | fi | |
b61ff9c8 BS |
15491 | echo "$as_me:$LINENO: result: $gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&5 |
15492 | echo "${ECHO_T}$gcc_cv_as_ia64_ltoffx_ldxmov_relocs" >&6 | |
63cf211a | 15493 | if test $gcc_cv_as_ia64_ltoffx_ldxmov_relocs = yes; then |
ba479fd2 NN |
15494 | |
15495 | cat >>confdefs.h <<\_ACEOF | |
cfa9ee99 | 15496 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
ba479fd2 | 15497 | _ACEOF |
8ada417f | 15498 | |
cfa9ee99 | 15499 | fi |
8ada417f | 15500 | |
2c4a9cff | 15501 | ;; |
8ada417f | 15502 | |
2c4a9cff | 15503 | powerpc*-*-*) |
8ada417f | 15504 | case $target in |
432218ba DE |
15505 | *-*-aix*) conftest_s=' .machine "pwr5" |
15506 | .csect .text[PR] | |
6b37db3c | 15507 | mfcr 3,128';; |
8af4d362 | 15508 | *-*-darwin*) |
b61ff9c8 BS |
15509 | echo "$as_me:$LINENO: checking assembler for .machine directive support" >&5 |
15510 | echo $ECHO_N "checking assembler for .machine directive support... $ECHO_C" >&6 | |
8af4d362 PB |
15511 | if test "${gcc_cv_as_machine_directive+set}" = set; then |
15512 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15513 | else | |
15514 | gcc_cv_as_machine_directive=no | |
15515 | if test x$gcc_cv_as != x; then | |
15516 | echo ' .machine ppc7400' > conftest.s | |
15517 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15519 | (eval $ac_try) 2>&5 | |
15520 | ac_status=$? | |
15521 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15522 | (exit $ac_status); }; } | |
15523 | then | |
15524 | gcc_cv_as_machine_directive=yes | |
15525 | else | |
15526 | echo "configure: failed program was" >&5 | |
15527 | cat conftest.s >&5 | |
15528 | fi | |
15529 | rm -f conftest.o conftest.s | |
15530 | fi | |
15531 | fi | |
b61ff9c8 BS |
15532 | echo "$as_me:$LINENO: result: $gcc_cv_as_machine_directive" >&5 |
15533 | echo "${ECHO_T}$gcc_cv_as_machine_directive" >&6 | |
8af4d362 PB |
15534 | |
15535 | if test x$gcc_cv_as_machine_directive != xyes; then | |
15536 | echo "*** This target requires an assembler supporting \".machine\"" >&2 | |
15537 | echo you can get it from: ftp://gcc.gnu.org/pub/gcc/infrastructure/cctools-528.5.dmg >&2 | |
15538 | test x$build = x$target && exit 1 | |
15539 | fi | |
15540 | conftest_s=' .text | |
6b37db3c | 15541 | mfcr r3,128';; |
4c67db14 | 15542 | *) conftest_s=' .machine power4 |
d2ab3e37 | 15543 | .text |
6b37db3c | 15544 | mfcr 3,128';; |
8ada417f | 15545 | esac |
8ada417f | 15546 | |
b61ff9c8 BS |
15547 | echo "$as_me:$LINENO: checking assembler for mfcr field support" >&5 |
15548 | echo $ECHO_N "checking assembler for mfcr field support... $ECHO_C" >&6 | |
ba479fd2 NN |
15549 | if test "${gcc_cv_as_powerpc_mfcrf+set}" = set; then |
15550 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2c4a9cff | 15551 | else |
8ada417f ZW |
15552 | gcc_cv_as_powerpc_mfcrf=no |
15553 | if test $in_tree_gas = yes; then | |
15554 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15555 | then gcc_cv_as_powerpc_mfcrf=yes | |
2c4a9cff | 15556 | fi |
8ada417f | 15557 | elif test x$gcc_cv_as != x; then |
6e3f3080 | 15558 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
15559 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15561 | (eval $ac_try) 2>&5 | |
15562 | ac_status=$? | |
15563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15564 | (exit $ac_status); }; } | |
8ada417f ZW |
15565 | then |
15566 | gcc_cv_as_powerpc_mfcrf=yes | |
15567 | else | |
15568 | echo "configure: failed program was" >&5 | |
15569 | cat conftest.s >&5 | |
15570 | fi | |
15571 | rm -f conftest.o conftest.s | |
15572 | fi | |
2c4a9cff | 15573 | fi |
b61ff9c8 BS |
15574 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfcrf" >&5 |
15575 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfcrf" >&6 | |
63cf211a | 15576 | if test $gcc_cv_as_powerpc_mfcrf = yes; then |
ba479fd2 NN |
15577 | |
15578 | cat >>confdefs.h <<\_ACEOF | |
2c4a9cff | 15579 | #define HAVE_AS_MFCRF 1 |
ba479fd2 | 15580 | _ACEOF |
ef1ecf87 | 15581 | |
8ada417f | 15582 | fi |
432218ba DE |
15583 | |
15584 | case $target in | |
15585 | *-*-aix*) conftest_s=' .machine "pwr5" | |
15586 | .csect .text[PR] | |
15587 | popcntb 3,3';; | |
15588 | *) conftest_s=' .machine power5 | |
15589 | .text | |
15590 | popcntb 3,3';; | |
15591 | esac | |
15592 | ||
b61ff9c8 BS |
15593 | echo "$as_me:$LINENO: checking assembler for popcntb support" >&5 |
15594 | echo $ECHO_N "checking assembler for popcntb support... $ECHO_C" >&6 | |
432218ba DE |
15595 | if test "${gcc_cv_as_powerpc_popcntb+set}" = set; then |
15596 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15597 | else | |
15598 | gcc_cv_as_powerpc_popcntb=no | |
15599 | if test $in_tree_gas = yes; then | |
15600 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15601 | then gcc_cv_as_powerpc_popcntb=yes | |
15602 | fi | |
15603 | elif test x$gcc_cv_as != x; then | |
15604 | echo "$conftest_s" > conftest.s | |
15605 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15607 | (eval $ac_try) 2>&5 | |
15608 | ac_status=$? | |
15609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15610 | (exit $ac_status); }; } | |
15611 | then | |
15612 | gcc_cv_as_powerpc_popcntb=yes | |
15613 | else | |
15614 | echo "configure: failed program was" >&5 | |
15615 | cat conftest.s >&5 | |
15616 | fi | |
15617 | rm -f conftest.o conftest.s | |
15618 | fi | |
15619 | fi | |
b61ff9c8 BS |
15620 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_popcntb" >&5 |
15621 | echo "${ECHO_T}$gcc_cv_as_powerpc_popcntb" >&6 | |
432218ba DE |
15622 | if test $gcc_cv_as_powerpc_popcntb = yes; then |
15623 | ||
15624 | cat >>confdefs.h <<\_ACEOF | |
15625 | #define HAVE_AS_POPCNTB 1 | |
15626 | _ACEOF | |
15627 | ||
9719f3b7 DE |
15628 | fi |
15629 | ||
15630 | case $target in | |
15631 | *-*-aix*) conftest_s=' .machine "pwr5x" | |
15632 | .csect .text[PR] | |
15633 | frin 1,1';; | |
1e04bfdc | 15634 | *) conftest_s=' .machine power5 |
9719f3b7 DE |
15635 | .text |
15636 | frin 1,1';; | |
15637 | esac | |
15638 | ||
b61ff9c8 BS |
15639 | echo "$as_me:$LINENO: checking assembler for fp round support" >&5 |
15640 | echo $ECHO_N "checking assembler for fp round support... $ECHO_C" >&6 | |
9719f3b7 DE |
15641 | if test "${gcc_cv_as_powerpc_fprnd+set}" = set; then |
15642 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15643 | else | |
15644 | gcc_cv_as_powerpc_fprnd=no | |
15645 | if test $in_tree_gas = yes; then | |
15646 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15647 | then gcc_cv_as_powerpc_fprnd=yes | |
15648 | fi | |
15649 | elif test x$gcc_cv_as != x; then | |
15650 | echo "$conftest_s" > conftest.s | |
15651 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15653 | (eval $ac_try) 2>&5 | |
15654 | ac_status=$? | |
15655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15656 | (exit $ac_status); }; } | |
15657 | then | |
15658 | gcc_cv_as_powerpc_fprnd=yes | |
15659 | else | |
15660 | echo "configure: failed program was" >&5 | |
15661 | cat conftest.s >&5 | |
15662 | fi | |
15663 | rm -f conftest.o conftest.s | |
15664 | fi | |
15665 | fi | |
b61ff9c8 BS |
15666 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_fprnd" >&5 |
15667 | echo "${ECHO_T}$gcc_cv_as_powerpc_fprnd" >&6 | |
9719f3b7 DE |
15668 | if test $gcc_cv_as_powerpc_fprnd = yes; then |
15669 | ||
15670 | cat >>confdefs.h <<\_ACEOF | |
15671 | #define HAVE_AS_FPRND 1 | |
15672 | _ACEOF | |
15673 | ||
44cd321e PS |
15674 | fi |
15675 | ||
15676 | case $target in | |
15677 | *-*-aix*) conftest_s=' .machine "pwr6" | |
15678 | .csect .text[PR] | |
15679 | mffgpr 1,3';; | |
15680 | *) conftest_s=' .machine power6 | |
15681 | .text | |
15682 | mffgpr 1,3';; | |
15683 | esac | |
15684 | ||
b61ff9c8 BS |
15685 | echo "$as_me:$LINENO: checking assembler for move fp gpr support" >&5 |
15686 | echo $ECHO_N "checking assembler for move fp gpr support... $ECHO_C" >&6 | |
44cd321e PS |
15687 | if test "${gcc_cv_as_powerpc_mfpgpr+set}" = set; then |
15688 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15689 | else | |
15690 | gcc_cv_as_powerpc_mfpgpr=no | |
15691 | if test $in_tree_gas = yes; then | |
15692 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
15693 | then gcc_cv_as_powerpc_mfpgpr=yes | |
15694 | fi | |
15695 | elif test x$gcc_cv_as != x; then | |
15696 | echo "$conftest_s" > conftest.s | |
15697 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15699 | (eval $ac_try) 2>&5 | |
15700 | ac_status=$? | |
15701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15702 | (exit $ac_status); }; } | |
15703 | then | |
15704 | gcc_cv_as_powerpc_mfpgpr=yes | |
15705 | else | |
15706 | echo "configure: failed program was" >&5 | |
15707 | cat conftest.s >&5 | |
15708 | fi | |
15709 | rm -f conftest.o conftest.s | |
15710 | fi | |
15711 | fi | |
b61ff9c8 BS |
15712 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_mfpgpr" >&5 |
15713 | echo "${ECHO_T}$gcc_cv_as_powerpc_mfpgpr" >&6 | |
44cd321e PS |
15714 | if test $gcc_cv_as_powerpc_mfpgpr = yes; then |
15715 | ||
15716 | cat >>confdefs.h <<\_ACEOF | |
15717 | #define HAVE_AS_MFPGPR 1 | |
15718 | _ACEOF | |
15719 | ||
432218ba DE |
15720 | fi |
15721 | ||
7f970b70 AM |
15722 | case $target in |
15723 | *-*-aix*) conftest_s=' .csect .text[PR] | |
15724 | LCF..0: | |
15725 | addis 11,30,_GLOBAL_OFFSET_TABLE_-LCF..0@ha';; | |
15726 | *-*-darwin*) | |
15727 | conftest_s=' .text | |
15728 | LCF0: | |
15729 | addis r11,r30,_GLOBAL_OFFSET_TABLE_-LCF0@ha';; | |
15730 | *) conftest_s=' .text | |
15731 | .LCF0: | |
15732 | addis 11,30,_GLOBAL_OFFSET_TABLE_-.LCF0@ha';; | |
15733 | esac | |
15734 | ||
b61ff9c8 BS |
15735 | echo "$as_me:$LINENO: checking assembler for rel16 relocs" >&5 |
15736 | echo $ECHO_N "checking assembler for rel16 relocs... $ECHO_C" >&6 | |
695d8830 AS |
15737 | if test "${gcc_cv_as_powerpc_rel16+set}" = set; then |
15738 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15739 | else | |
15740 | gcc_cv_as_powerpc_rel16=no | |
15741 | if test $in_tree_gas = yes; then | |
15742 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 17 \) \* 1000 + 0` | |
15743 | then gcc_cv_as_powerpc_rel16=yes | |
15744 | fi | |
15745 | elif test x$gcc_cv_as != x; then | |
15746 | echo "$conftest_s" > conftest.s | |
15747 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15749 | (eval $ac_try) 2>&5 | |
15750 | ac_status=$? | |
15751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15752 | (exit $ac_status); }; } | |
15753 | then | |
15754 | gcc_cv_as_powerpc_rel16=yes | |
15755 | else | |
15756 | echo "configure: failed program was" >&5 | |
15757 | cat conftest.s >&5 | |
15758 | fi | |
15759 | rm -f conftest.o conftest.s | |
15760 | fi | |
15761 | fi | |
b61ff9c8 BS |
15762 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_rel16" >&5 |
15763 | echo "${ECHO_T}$gcc_cv_as_powerpc_rel16" >&6 | |
695d8830 AS |
15764 | if test $gcc_cv_as_powerpc_rel16 = yes; then |
15765 | ||
15766 | cat >>confdefs.h <<\_ACEOF | |
15767 | #define HAVE_AS_REL16 1 | |
15768 | _ACEOF | |
15769 | ||
15770 | fi | |
15771 | ||
b639c3c2 JJ |
15772 | case $target in |
15773 | *-*-aix*) conftest_s=' .machine "pwr6" | |
15774 | .csect .text[PR] | |
15775 | cmpb 3,4,5';; | |
15776 | *) conftest_s=' .machine power6 | |
15777 | .text | |
15778 | cmpb 3,4,5';; | |
15779 | esac | |
15780 | ||
b61ff9c8 BS |
15781 | echo "$as_me:$LINENO: checking assembler for compare bytes support" >&5 |
15782 | echo $ECHO_N "checking assembler for compare bytes support... $ECHO_C" >&6 | |
b639c3c2 JJ |
15783 | if test "${gcc_cv_as_powerpc_cmpb+set}" = set; then |
15784 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15785 | else | |
15786 | gcc_cv_as_powerpc_cmpb=no | |
15787 | if test $in_tree_gas = yes; then | |
15788 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
15789 | then gcc_cv_as_powerpc_cmpb=yes | |
15790 | fi | |
15791 | elif test x$gcc_cv_as != x; then | |
15792 | echo "$conftest_s" > conftest.s | |
15793 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15794 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15795 | (eval $ac_try) 2>&5 | |
15796 | ac_status=$? | |
15797 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15798 | (exit $ac_status); }; } | |
15799 | then | |
15800 | gcc_cv_as_powerpc_cmpb=yes | |
15801 | else | |
15802 | echo "configure: failed program was" >&5 | |
15803 | cat conftest.s >&5 | |
15804 | fi | |
15805 | rm -f conftest.o conftest.s | |
15806 | fi | |
15807 | fi | |
b61ff9c8 BS |
15808 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_cmpb" >&5 |
15809 | echo "${ECHO_T}$gcc_cv_as_powerpc_cmpb" >&6 | |
b639c3c2 JJ |
15810 | if test $gcc_cv_as_powerpc_cmpb = yes; then |
15811 | ||
15812 | cat >>confdefs.h <<\_ACEOF | |
15813 | #define HAVE_AS_CMPB 1 | |
15814 | _ACEOF | |
15815 | ||
15816 | fi | |
15817 | ||
15818 | case $target in | |
15819 | *-*-aix*) conftest_s=' .machine "pwr6" | |
15820 | .csect .text[PR] | |
0d74c0ee | 15821 | dadd 1,2,3';; |
b639c3c2 JJ |
15822 | *) conftest_s=' .machine power6 |
15823 | .text | |
0d74c0ee | 15824 | dadd 1,2,3';; |
b639c3c2 JJ |
15825 | esac |
15826 | ||
b61ff9c8 BS |
15827 | echo "$as_me:$LINENO: checking assembler for decimal float support" >&5 |
15828 | echo $ECHO_N "checking assembler for decimal float support... $ECHO_C" >&6 | |
b639c3c2 JJ |
15829 | if test "${gcc_cv_as_powerpc_dfp+set}" = set; then |
15830 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15831 | else | |
15832 | gcc_cv_as_powerpc_dfp=no | |
15833 | if test $in_tree_gas = yes; then | |
15834 | if test $gcc_cv_gas_vers -ge `expr \( \( 9 \* 1000 \) + 99 \) \* 1000 + 0` | |
15835 | then gcc_cv_as_powerpc_dfp=yes | |
15836 | fi | |
15837 | elif test x$gcc_cv_as != x; then | |
15838 | echo "$conftest_s" > conftest.s | |
15839 | if { ac_try='$gcc_cv_as -a32 -o conftest.o conftest.s >&5' | |
15840 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15841 | (eval $ac_try) 2>&5 | |
15842 | ac_status=$? | |
15843 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15844 | (exit $ac_status); }; } | |
15845 | then | |
15846 | gcc_cv_as_powerpc_dfp=yes | |
15847 | else | |
15848 | echo "configure: failed program was" >&5 | |
15849 | cat conftest.s >&5 | |
15850 | fi | |
15851 | rm -f conftest.o conftest.s | |
15852 | fi | |
15853 | fi | |
b61ff9c8 BS |
15854 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_dfp" >&5 |
15855 | echo "${ECHO_T}$gcc_cv_as_powerpc_dfp" >&6 | |
b639c3c2 JJ |
15856 | if test $gcc_cv_as_powerpc_dfp = yes; then |
15857 | ||
15858 | cat >>confdefs.h <<\_ACEOF | |
15859 | #define HAVE_AS_DFP 1 | |
15860 | _ACEOF | |
15861 | ||
e51917ae JM |
15862 | fi |
15863 | ||
b61ff9c8 BS |
15864 | echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5 |
15865 | echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6 | |
e51917ae JM |
15866 | if test "${gcc_cv_as_powerpc_gnu_attribute+set}" = set; then |
15867 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15868 | else | |
15869 | gcc_cv_as_powerpc_gnu_attribute=no | |
15870 | if test $in_tree_gas = yes; then | |
15871 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
15872 | then gcc_cv_as_powerpc_gnu_attribute=yes | |
15873 | fi | |
15874 | elif test x$gcc_cv_as != x; then | |
15875 | echo '.gnu_attribute 4,1' > conftest.s | |
15876 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15877 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15878 | (eval $ac_try) 2>&5 | |
15879 | ac_status=$? | |
15880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15881 | (exit $ac_status); }; } | |
15882 | then | |
15883 | gcc_cv_as_powerpc_gnu_attribute=yes | |
15884 | else | |
15885 | echo "configure: failed program was" >&5 | |
15886 | cat conftest.s >&5 | |
15887 | fi | |
15888 | rm -f conftest.o conftest.s | |
15889 | fi | |
15890 | fi | |
b61ff9c8 BS |
15891 | echo "$as_me:$LINENO: result: $gcc_cv_as_powerpc_gnu_attribute" >&5 |
15892 | echo "${ECHO_T}$gcc_cv_as_powerpc_gnu_attribute" >&6 | |
e51917ae JM |
15893 | if test $gcc_cv_as_powerpc_gnu_attribute = yes; then |
15894 | ||
15895 | cat >>confdefs.h <<\_ACEOF | |
15896 | #define HAVE_AS_GNU_ATTRIBUTE 1 | |
15897 | _ACEOF | |
15898 | ||
7f970b70 | 15899 | fi |
8ada417f ZW |
15900 | ;; |
15901 | ||
15902 | mips*-*-*) | |
b61ff9c8 BS |
15903 | echo "$as_me:$LINENO: checking assembler for explicit relocation support" >&5 |
15904 | echo $ECHO_N "checking assembler for explicit relocation support... $ECHO_C" >&6 | |
ba479fd2 NN |
15905 | if test "${gcc_cv_as_mips_explicit_relocs+set}" = set; then |
15906 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
15907 | else |
15908 | gcc_cv_as_mips_explicit_relocs=no | |
15909 | if test $in_tree_gas = yes; then | |
15910 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 14 \) \* 1000 + 0` | |
15911 | then gcc_cv_as_mips_explicit_relocs=yes | |
15912 | fi | |
15913 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 15914 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
ba479fd2 NN |
15915 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
15916 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15917 | (eval $ac_try) 2>&5 | |
15918 | ac_status=$? | |
15919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15920 | (exit $ac_status); }; } | |
8ada417f ZW |
15921 | then |
15922 | gcc_cv_as_mips_explicit_relocs=yes | |
15923 | else | |
15924 | echo "configure: failed program was" >&5 | |
15925 | cat conftest.s >&5 | |
ef1ecf87 | 15926 | fi |
8ada417f ZW |
15927 | rm -f conftest.o conftest.s |
15928 | fi | |
15929 | fi | |
b61ff9c8 BS |
15930 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_explicit_relocs" >&5 |
15931 | echo "${ECHO_T}$gcc_cv_as_mips_explicit_relocs" >&6 | |
8ada417f ZW |
15932 | if test $gcc_cv_as_mips_explicit_relocs = yes; then |
15933 | if test x$target_cpu_default = x | |
15934 | then target_cpu_default=MASK_EXPLICIT_RELOCS | |
15935 | else target_cpu_default="($target_cpu_default)|MASK_EXPLICIT_RELOCS" | |
15936 | fi | |
4551169f | 15937 | fi |
b61ff9c8 BS |
15938 | echo "$as_me:$LINENO: checking assembler for -mno-shared support" >&5 |
15939 | echo $ECHO_N "checking assembler for -mno-shared support... $ECHO_C" >&6 | |
4551169f RS |
15940 | if test "${gcc_cv_as_mips_no_shared+set}" = set; then |
15941 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15942 | else | |
15943 | gcc_cv_as_mips_no_shared=no | |
15944 | if test $in_tree_gas = yes; then | |
15945 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 0` | |
15946 | then gcc_cv_as_mips_no_shared=yes | |
15947 | fi | |
15948 | elif test x$gcc_cv_as != x; then | |
15949 | echo 'nop' > conftest.s | |
15950 | if { ac_try='$gcc_cv_as -mno-shared -o conftest.o conftest.s >&5' | |
15951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15952 | (eval $ac_try) 2>&5 | |
15953 | ac_status=$? | |
15954 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15955 | (exit $ac_status); }; } | |
15956 | then | |
15957 | gcc_cv_as_mips_no_shared=yes | |
15958 | else | |
15959 | echo "configure: failed program was" >&5 | |
15960 | cat conftest.s >&5 | |
15961 | fi | |
15962 | rm -f conftest.o conftest.s | |
15963 | fi | |
15964 | fi | |
b61ff9c8 BS |
15965 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_no_shared" >&5 |
15966 | echo "${ECHO_T}$gcc_cv_as_mips_no_shared" >&6 | |
4551169f RS |
15967 | if test $gcc_cv_as_mips_no_shared = yes; then |
15968 | ||
15969 | cat >>confdefs.h <<\_ACEOF | |
15970 | #define HAVE_AS_NO_SHARED 1 | |
15971 | _ACEOF | |
15972 | ||
dcb957d9 JM |
15973 | fi |
15974 | ||
b61ff9c8 BS |
15975 | echo "$as_me:$LINENO: checking assembler for .gnu_attribute support" >&5 |
15976 | echo $ECHO_N "checking assembler for .gnu_attribute support... $ECHO_C" >&6 | |
dcb957d9 JM |
15977 | if test "${gcc_cv_as_mips_gnu_attribute+set}" = set; then |
15978 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
15979 | else | |
15980 | gcc_cv_as_mips_gnu_attribute=no | |
15981 | if test $in_tree_gas = yes; then | |
15982 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
15983 | then gcc_cv_as_mips_gnu_attribute=yes | |
15984 | fi | |
15985 | elif test x$gcc_cv_as != x; then | |
15986 | echo '.gnu_attribute 4,1' > conftest.s | |
15987 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
15988 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
15989 | (eval $ac_try) 2>&5 | |
15990 | ac_status=$? | |
15991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
15992 | (exit $ac_status); }; } | |
15993 | then | |
15994 | gcc_cv_as_mips_gnu_attribute=yes | |
15995 | else | |
15996 | echo "configure: failed program was" >&5 | |
15997 | cat conftest.s >&5 | |
15998 | fi | |
15999 | rm -f conftest.o conftest.s | |
16000 | fi | |
16001 | fi | |
b61ff9c8 BS |
16002 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_gnu_attribute" >&5 |
16003 | echo "${ECHO_T}$gcc_cv_as_mips_gnu_attribute" >&6 | |
dcb957d9 JM |
16004 | if test $gcc_cv_as_mips_gnu_attribute = yes; then |
16005 | ||
16006 | cat >>confdefs.h <<\_ACEOF | |
16007 | #define HAVE_AS_GNU_ATTRIBUTE 1 | |
16008 | _ACEOF | |
16009 | ||
a44380d2 JM |
16010 | fi |
16011 | ||
b61ff9c8 BS |
16012 | echo "$as_me:$LINENO: checking assembler for .dtprelword support" >&5 |
16013 | echo $ECHO_N "checking assembler for .dtprelword support... $ECHO_C" >&6 | |
a44380d2 JM |
16014 | if test "${gcc_cv_as_mips_dtprelword+set}" = set; then |
16015 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16016 | else | |
16017 | gcc_cv_as_mips_dtprelword=no | |
16018 | if test $in_tree_gas = yes; then | |
16019 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` | |
16020 | then gcc_cv_as_mips_dtprelword=yes | |
16021 | fi | |
16022 | elif test x$gcc_cv_as != x; then | |
16023 | echo '.section .tdata,"awT",@progbits | |
16024 | x: | |
16025 | .word 2 | |
16026 | .text | |
16027 | .dtprelword x+0x8000' > conftest.s | |
16028 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' | |
16029 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16030 | (eval $ac_try) 2>&5 | |
16031 | ac_status=$? | |
16032 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16033 | (exit $ac_status); }; } | |
16034 | then | |
16035 | gcc_cv_as_mips_dtprelword=yes | |
16036 | else | |
16037 | echo "configure: failed program was" >&5 | |
16038 | cat conftest.s >&5 | |
16039 | fi | |
16040 | rm -f conftest.o conftest.s | |
16041 | fi | |
16042 | fi | |
b61ff9c8 BS |
16043 | echo "$as_me:$LINENO: result: $gcc_cv_as_mips_dtprelword" >&5 |
16044 | echo "${ECHO_T}$gcc_cv_as_mips_dtprelword" >&6 | |
a44380d2 JM |
16045 | if test $gcc_cv_as_mips_dtprelword = yes; then |
16046 | ||
16047 | cat >>confdefs.h <<\_ACEOF | |
16048 | #define HAVE_AS_DTPRELWORD 1 | |
16049 | _ACEOF | |
16050 | ||
8ada417f | 16051 | fi |
dbad5e72 SE |
16052 | ;; |
16053 | esac | |
8ada417f | 16054 | |
dbad5e72 SE |
16055 | # Mips and HP-UX need the GNU assembler. |
16056 | # Linux on IA64 might be able to use the Intel assembler. | |
16057 | ||
16058 | case "$target" in | |
16059 | mips*-*-* | *-*-hpux* ) | |
82563d35 RS |
16060 | if test x$gas_flag = xyes \ |
16061 | || test x"$host" != x"$build" \ | |
16062 | || test ! -x "$gcc_cv_as" \ | |
16063 | || "$gcc_cv_as" -v < /dev/null 2>&1 | grep GNU > /dev/null; then | |
16064 | : | |
16065 | else | |
16066 | echo "*** This configuration requires the GNU assembler" >&2 | |
16067 | exit 1 | |
16068 | fi | |
ef1ecf87 | 16069 | ;; |
1cb36a98 | 16070 | esac |
dbad5e72 | 16071 | |
9d147085 RH |
16072 | # ??? Not all targets support dwarf2 debug_line, even within a version |
16073 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
16074 | # info to the output file. So, as supported targets are added to gas 2.11, | |
16075 | # add some instruction here to (also) show we expect this might work. | |
16076 | # ??? Once 2.11 is released, probably need to add first known working | |
16077 | # version to the per-target configury. | |
16078 | case "$target" in | |
80486e06 | 16079 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a | 16080 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
714f737f | 16081 | | xstormy16*-*-* | cris-*-* | xtensa-*-* | bfin-*-* | score*-*-* | spu-*-*) |
9d147085 RH |
16082 | insn="nop" |
16083 | ;; | |
57116d8d | 16084 | ia64*-*-* | s390*-*-*) |
9d147085 RH |
16085 | insn="nop 0" |
16086 | ;; | |
2853bc5a HPN |
16087 | mmix-*-*) |
16088 | insn="swym 0" | |
16089 | ;; | |
8ada417f ZW |
16090 | esac |
16091 | if test x"$insn" != x; then | |
16092 | conftest_s="\ | |
16093 | .file 1 \"conftest.s\" | |
16094 | .loc 1 3 0 | |
16095 | $insn" | |
b61ff9c8 BS |
16096 | echo "$as_me:$LINENO: checking assembler for dwarf2 debug_line support" >&5 |
16097 | echo $ECHO_N "checking assembler for dwarf2 debug_line support... $ECHO_C" >&6 | |
ba479fd2 NN |
16098 | if test "${gcc_cv_as_dwarf2_debug_line+set}" = set; then |
16099 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16100 | else |
16101 | gcc_cv_as_dwarf2_debug_line=no | |
16102 | if test $in_tree_gas = yes; then | |
16103 | if test $in_tree_gas_is_elf = yes \ | |
16104 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16105 | then gcc_cv_as_dwarf2_debug_line=yes | |
16106 | fi | |
16107 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16108 | echo "$conftest_s" > conftest.s |
ba479fd2 NN |
16109 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16110 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16111 | (eval $ac_try) 2>&5 | |
16112 | ac_status=$? | |
16113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16114 | (exit $ac_status); }; } | |
8ada417f | 16115 | then |
080a5bb0 EB |
16116 | if test x$gcc_cv_objdump != x \ |
16117 | && $gcc_cv_objdump -h conftest.o 2> /dev/null \ | |
16118 | | grep debug_line > /dev/null 2>&1; then | |
8ada417f ZW |
16119 | gcc_cv_as_dwarf2_debug_line=yes |
16120 | fi | |
16121 | else | |
16122 | echo "configure: failed program was" >&5 | |
16123 | cat conftest.s >&5 | |
16124 | fi | |
16125 | rm -f conftest.o conftest.s | |
16126 | fi | |
16127 | fi | |
b61ff9c8 BS |
16128 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_debug_line" >&5 |
16129 | echo "${ECHO_T}$gcc_cv_as_dwarf2_debug_line" >&6 | |
ad9c4d9f | 16130 | |
ad9c4d9f | 16131 | |
8ada417f ZW |
16132 | # The .debug_line file table must be in the exact order that |
16133 | # we specified the files, since these indices are also used | |
16134 | # by DW_AT_decl_file. Approximate this test by testing if | |
16135 | # the assembler bitches if the same index is assigned twice. | |
b61ff9c8 BS |
16136 | echo "$as_me:$LINENO: checking assembler for buggy dwarf2 .file directive" >&5 |
16137 | echo $ECHO_N "checking assembler for buggy dwarf2 .file directive... $ECHO_C" >&6 | |
ba479fd2 NN |
16138 | if test "${gcc_cv_as_dwarf2_file_buggy+set}" = set; then |
16139 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16140 | else |
16141 | gcc_cv_as_dwarf2_file_buggy=no | |
16142 | if test x$gcc_cv_as != x; then | |
6e3f3080 | 16143 | echo ' .file 1 "foo.s" |
8ada417f | 16144 | .file 1 "bar.s"' > conftest.s |
ba479fd2 NN |
16145 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5' |
16146 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16147 | (eval $ac_try) 2>&5 | |
16148 | ac_status=$? | |
16149 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16150 | (exit $ac_status); }; } | |
8ada417f ZW |
16151 | then |
16152 | gcc_cv_as_dwarf2_file_buggy=yes | |
16153 | else | |
16154 | echo "configure: failed program was" >&5 | |
16155 | cat conftest.s >&5 | |
16156 | fi | |
16157 | rm -f conftest.o conftest.s | |
16158 | fi | |
ad9c4d9f | 16159 | fi |
b61ff9c8 BS |
16160 | echo "$as_me:$LINENO: result: $gcc_cv_as_dwarf2_file_buggy" >&5 |
16161 | echo "${ECHO_T}$gcc_cv_as_dwarf2_file_buggy" >&6 | |
8ada417f ZW |
16162 | |
16163 | ||
16164 | if test $gcc_cv_as_dwarf2_debug_line = yes \ | |
16165 | && test $gcc_cv_as_dwarf2_file_buggy = no; then | |
ba479fd2 NN |
16166 | |
16167 | cat >>confdefs.h <<\_ACEOF | |
9d147085 | 16168 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
ba479fd2 | 16169 | _ACEOF |
9d147085 | 16170 | |
8ada417f | 16171 | fi |
ad9c4d9f | 16172 | |
b61ff9c8 BS |
16173 | echo "$as_me:$LINENO: checking assembler for --gdwarf2 option" >&5 |
16174 | echo $ECHO_N "checking assembler for --gdwarf2 option... $ECHO_C" >&6 | |
ba479fd2 NN |
16175 | if test "${gcc_cv_as_gdwarf2_flag+set}" = set; then |
16176 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16177 | else |
16178 | gcc_cv_as_gdwarf2_flag=no | |
16179 | if test $in_tree_gas = yes; then | |
16180 | if test $in_tree_gas_is_elf = yes \ | |
16181 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16182 | then gcc_cv_as_gdwarf2_flag=yes | |
16183 | fi | |
16184 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16185 | echo "$insn" > conftest.s |
ba479fd2 NN |
16186 | if { ac_try='$gcc_cv_as --gdwarf2 -o conftest.o conftest.s >&5' |
16187 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16188 | (eval $ac_try) 2>&5 | |
16189 | ac_status=$? | |
16190 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16191 | (exit $ac_status); }; } | |
8ada417f ZW |
16192 | then |
16193 | gcc_cv_as_gdwarf2_flag=yes | |
16194 | else | |
16195 | echo "configure: failed program was" >&5 | |
16196 | cat conftest.s >&5 | |
16197 | fi | |
16198 | rm -f conftest.o conftest.s | |
16199 | fi | |
ad9c4d9f | 16200 | fi |
b61ff9c8 BS |
16201 | echo "$as_me:$LINENO: result: $gcc_cv_as_gdwarf2_flag" >&5 |
16202 | echo "${ECHO_T}$gcc_cv_as_gdwarf2_flag" >&6 | |
63cf211a | 16203 | if test $gcc_cv_as_gdwarf2_flag = yes; then |
ba479fd2 NN |
16204 | |
16205 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16206 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
ba479fd2 | 16207 | _ACEOF |
5f0e9ea2 GK |
16208 | |
16209 | fi | |
ad9c4d9f | 16210 | |
b61ff9c8 BS |
16211 | echo "$as_me:$LINENO: checking assembler for --gstabs option" >&5 |
16212 | echo $ECHO_N "checking assembler for --gstabs option... $ECHO_C" >&6 | |
ba479fd2 NN |
16213 | if test "${gcc_cv_as_gstabs_flag+set}" = set; then |
16214 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
8ada417f ZW |
16215 | else |
16216 | gcc_cv_as_gstabs_flag=no | |
16217 | if test $in_tree_gas = yes; then | |
16218 | if test $in_tree_gas_is_elf = yes \ | |
16219 | && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 11 \) \* 1000 + 0` | |
16220 | then gcc_cv_as_gstabs_flag=yes | |
16221 | fi | |
16222 | elif test x$gcc_cv_as != x; then | |
6e3f3080 | 16223 | echo "$insn" > conftest.s |
ba479fd2 NN |
16224 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s >&5' |
16225 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16226 | (eval $ac_try) 2>&5 | |
16227 | ac_status=$? | |
16228 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16229 | (exit $ac_status); }; } | |
8ada417f ZW |
16230 | then |
16231 | # The native Solaris 9/Intel assembler doesn't understand --gstabs | |
16232 | # and warns about it, but still exits successfully. So check for | |
16233 | # this. | |
ba479fd2 NN |
16234 | if { ac_try='$gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | grep -i warning > /dev/null' |
16235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16236 | (eval $ac_try) 2>&5 | |
16237 | ac_status=$? | |
16238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16239 | (exit $ac_status); }; } | |
8ada417f ZW |
16240 | then : |
16241 | else gcc_cv_as_gstabs_flag=yes | |
16242 | fi | |
16243 | else | |
16244 | echo "configure: failed program was" >&5 | |
16245 | cat conftest.s >&5 | |
16246 | fi | |
16247 | rm -f conftest.o conftest.s | |
16248 | fi | |
ad9c4d9f | 16249 | fi |
b61ff9c8 BS |
16250 | echo "$as_me:$LINENO: result: $gcc_cv_as_gstabs_flag" >&5 |
16251 | echo "${ECHO_T}$gcc_cv_as_gstabs_flag" >&6 | |
63cf211a | 16252 | if test $gcc_cv_as_gstabs_flag = yes; then |
ba479fd2 NN |
16253 | |
16254 | cat >>confdefs.h <<\_ACEOF | |
5f0e9ea2 | 16255 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
ba479fd2 | 16256 | _ACEOF |
5f0e9ea2 | 16257 | |
c8aea42c PB |
16258 | fi |
16259 | ||
b61ff9c8 BS |
16260 | echo "$as_me:$LINENO: checking assembler for --debug-prefix-map option" >&5 |
16261 | echo $ECHO_N "checking assembler for --debug-prefix-map option... $ECHO_C" >&6 | |
c8aea42c PB |
16262 | if test "${gcc_cv_as_debug_prefix_map_flag+set}" = set; then |
16263 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16264 | else | |
16265 | gcc_cv_as_debug_prefix_map_flag=no | |
16266 | if test $in_tree_gas = yes; then | |
303a4698 | 16267 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 18 \) \* 1000 + 0` |
c8aea42c PB |
16268 | then gcc_cv_as_debug_prefix_map_flag=yes |
16269 | fi | |
16270 | elif test x$gcc_cv_as != x; then | |
16271 | echo "$insn" > conftest.s | |
16272 | if { ac_try='$gcc_cv_as --debug-prefix-map /a=/b -o conftest.o conftest.s >&5' | |
16273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16274 | (eval $ac_try) 2>&5 | |
16275 | ac_status=$? | |
16276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16277 | (exit $ac_status); }; } | |
16278 | then | |
16279 | gcc_cv_as_debug_prefix_map_flag=yes | |
16280 | else | |
16281 | echo "configure: failed program was" >&5 | |
16282 | cat conftest.s >&5 | |
16283 | fi | |
16284 | rm -f conftest.o conftest.s | |
16285 | fi | |
16286 | fi | |
b61ff9c8 BS |
16287 | echo "$as_me:$LINENO: result: $gcc_cv_as_debug_prefix_map_flag" >&5 |
16288 | echo "${ECHO_T}$gcc_cv_as_debug_prefix_map_flag" >&6 | |
c8aea42c PB |
16289 | if test $gcc_cv_as_debug_prefix_map_flag = yes; then |
16290 | ||
16291 | cat >>confdefs.h <<\_ACEOF | |
16292 | #define HAVE_AS_DEBUG_PREFIX_MAP 1 | |
16293 | _ACEOF | |
16294 | ||
5f0e9ea2 | 16295 | fi |
8ada417f | 16296 | fi |
5f0e9ea2 | 16297 | |
b61ff9c8 BS |
16298 | echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5 |
16299 | echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6 | |
03943c05 AO |
16300 | if test "${gcc_cv_as_line_zero+set}" = set; then |
16301 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16302 | else | |
16303 | gcc_cv_as_line_zero=no | |
16304 | if test $in_tree_gas = yes; then | |
cf0eb7a1 AO |
16305 | if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 16 \) \* 1000 + 91` |
16306 | then gcc_cv_as_line_zero=yes | |
03943c05 AO |
16307 | fi |
16308 | elif test "x$gcc_cv_as" != x; then | |
16309 | { echo '# 1 "test.s" 1'; echo '# 0 "" 2'; } > conftest.s | |
16310 | if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5 2>conftest.out' | |
16311 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16312 | (eval $ac_try) 2>&5 | |
16313 | ac_status=$? | |
16314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16315 | (exit $ac_status); }; } && | |
16316 | test "x`cat conftest.out`" = x | |
16317 | then | |
16318 | gcc_cv_as_line_zero=yes | |
16319 | else | |
16320 | echo "configure: failed program was" >&5 | |
16321 | cat conftest.s >&5 | |
16322 | echo "configure: error output was" >&5 | |
16323 | cat conftest.out >&5 | |
16324 | fi | |
16325 | rm -f conftest.o conftest.s conftest.out | |
16326 | fi | |
16327 | fi | |
b61ff9c8 BS |
16328 | echo "$as_me:$LINENO: result: $gcc_cv_as_line_zero" >&5 |
16329 | echo "${ECHO_T}$gcc_cv_as_line_zero" >&6 | |
03943c05 AO |
16330 | if test "x$gcc_cv_as_line_zero" = xyes; then |
16331 | ||
16332 | cat >>confdefs.h <<\_ACEOF | |
16333 | #define HAVE_AS_LINE_ZERO 1 | |
16334 | _ACEOF | |
16335 | ||
16336 | fi | |
16337 | ||
b61ff9c8 BS |
16338 | echo "$as_me:$LINENO: checking linker read-only and read-write section mixing" >&5 |
16339 | echo $ECHO_N "checking linker read-only and read-write section mixing... $ECHO_C" >&6 | |
96d0f4dc | 16340 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 16341 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16342 | 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 \ |
16343 | && test $in_tree_ld_is_elf = yes; then | |
96d0f4dc JJ |
16344 | gcc_cv_ld_ro_rw_mix=read-write |
16345 | fi | |
16346 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
16347 | echo '.section myfoosect, "a"' > conftest1.s |
16348 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 16349 | echo '.byte 1' >> conftest2.s |
90e145da | 16350 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 16351 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
16352 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
16353 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16354 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 16355 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 16356 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 16357 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 16358 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
16359 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
16360 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
16361 | gcc_cv_ld_ro_rw_mix=read-only | |
16362 | else | |
16363 | gcc_cv_ld_ro_rw_mix=read-write | |
16364 | fi | |
16365 | fi | |
16366 | fi | |
16367 | rm -f conftest.* conftest[123].* | |
16368 | fi | |
16369 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
ba479fd2 NN |
16370 | |
16371 | cat >>confdefs.h <<\_ACEOF | |
96d0f4dc | 16372 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
ba479fd2 | 16373 | _ACEOF |
96d0f4dc JJ |
16374 | |
16375 | fi | |
b61ff9c8 BS |
16376 | echo "$as_me:$LINENO: result: $gcc_cv_ld_ro_rw_mix" >&5 |
16377 | echo "${ECHO_T}$gcc_cv_ld_ro_rw_mix" >&6 | |
96d0f4dc | 16378 | |
b61ff9c8 BS |
16379 | echo "$as_me:$LINENO: checking linker PT_GNU_EH_FRAME support" >&5 |
16380 | echo $ECHO_N "checking linker PT_GNU_EH_FRAME support... $ECHO_C" >&6 | |
275b60d6 | 16381 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 16382 | if test $in_tree_ld = yes ; then |
5408ac6c HPN |
16383 | 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 \ |
16384 | && test $in_tree_ld_is_elf = yes; then | |
275b60d6 JJ |
16385 | gcc_cv_ld_eh_frame_hdr=yes |
16386 | fi | |
16387 | elif test x$gcc_cv_ld != x; then | |
16388 | # Check if linker supports --eh-frame-hdr option | |
16389 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
16390 | gcc_cv_ld_eh_frame_hdr=yes | |
16391 | fi | |
16392 | fi | |
232b67d9 | 16393 | |
275b60d6 | 16394 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then |
ba479fd2 NN |
16395 | |
16396 | cat >>confdefs.h <<\_ACEOF | |
275b60d6 | 16397 | #define HAVE_LD_EH_FRAME_HDR 1 |
ba479fd2 | 16398 | _ACEOF |
275b60d6 JJ |
16399 | |
16400 | fi | |
b61ff9c8 BS |
16401 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_frame_hdr" >&5 |
16402 | echo "${ECHO_T}$gcc_cv_ld_eh_frame_hdr" >&6 | |
275b60d6 | 16403 | |
b61ff9c8 BS |
16404 | echo "$as_me:$LINENO: checking linker position independent executable support" >&5 |
16405 | echo $ECHO_N "checking linker position independent executable support... $ECHO_C" >&6 | |
24a4dd31 JJ |
16406 | gcc_cv_ld_pie=no |
16407 | if test $in_tree_ld = yes ; then | |
5408ac6c HPN |
16408 | 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 \ |
16409 | && test $in_tree_ld_is_elf = yes; then | |
24a4dd31 JJ |
16410 | gcc_cv_ld_pie=yes |
16411 | fi | |
16412 | elif test x$gcc_cv_ld != x; then | |
16413 | # Check if linker supports -pie option | |
16414 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
16415 | gcc_cv_ld_pie=yes | |
16416 | fi | |
16417 | fi | |
16418 | if test x"$gcc_cv_ld_pie" = xyes; then | |
ba479fd2 NN |
16419 | |
16420 | cat >>confdefs.h <<\_ACEOF | |
24a4dd31 | 16421 | #define HAVE_LD_PIE 1 |
ba479fd2 | 16422 | _ACEOF |
24a4dd31 JJ |
16423 | |
16424 | fi | |
b61ff9c8 BS |
16425 | echo "$as_me:$LINENO: result: $gcc_cv_ld_pie" >&5 |
16426 | echo "${ECHO_T}$gcc_cv_ld_pie" >&6 | |
24a4dd31 | 16427 | |
b61ff9c8 BS |
16428 | echo "$as_me:$LINENO: checking linker EH-compatible garbage collection of sections" >&5 |
16429 | echo $ECHO_N "checking linker EH-compatible garbage collection of sections... $ECHO_C" >&6 | |
22ba88ef | 16430 | gcc_cv_ld_eh_gc_sections=no |
b639c3c2 JJ |
16431 | if test $in_tree_ld = yes ; then |
16432 | 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 \ | |
16433 | && test $in_tree_ld_is_elf = yes; then | |
16434 | gcc_cv_ld_eh_gc_sections=yes | |
16435 | fi | |
16436 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
16437 | cat > conftest.s <<EOF | |
16438 | .section .text | |
16439 | .globl _start | |
16440 | .type _start, @function | |
16441 | _start: | |
16442 | .long foo | |
16443 | .size _start, .-_start | |
16444 | .section .text.foo,"ax",@progbits | |
16445 | .type foo, @function | |
16446 | foo: | |
16447 | .long 0 | |
16448 | .size foo, .-foo | |
16449 | .section .gcc_except_table.foo,"a",@progbits | |
16450 | .L0: | |
16451 | .long 0 | |
16452 | .section .eh_frame,"a",@progbits | |
16453 | .long .L0 | |
16454 | EOF | |
16455 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16456 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16457 | | grep "gc-sections option ignored" > /dev/null; then | |
16458 | gcc_cv_ld_eh_gc_sections=no | |
16459 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16460 | gcc_cv_ld_eh_gc_sections=yes | |
16461 | # If no COMDAT groups, the compiler will emit .gnu.linkonce.t. sections. | |
16462 | if test x$gcc_cv_as_comdat_group != xyes; then | |
16463 | gcc_cv_ld_eh_gc_sections=no | |
16464 | cat > conftest.s <<EOF | |
16465 | .section .text | |
16466 | .globl _start | |
16467 | .type _start, @function | |
16468 | _start: | |
16469 | .long foo | |
16470 | .size _start, .-_start | |
16471 | .section .gnu.linkonce.t.foo,"ax",@progbits | |
16472 | .type foo, @function | |
16473 | foo: | |
16474 | .long 0 | |
16475 | .size foo, .-foo | |
16476 | .section .gcc_except_table.foo,"a",@progbits | |
16477 | .L0: | |
16478 | .long 0 | |
16479 | .section .eh_frame,"a",@progbits | |
16480 | .long .L0 | |
16481 | EOF | |
16482 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
16483 | if $gcc_cv_ld -o conftest conftest.o --entry=_start --gc-sections 2>&1 \ | |
16484 | | grep "gc-sections option ignored" > /dev/null; then | |
16485 | gcc_cv_ld_eh_gc_sections=no | |
16486 | elif $gcc_cv_objdump -h conftest | grep gcc_except_table > /dev/null; then | |
16487 | gcc_cv_ld_eh_gc_sections=yes | |
16488 | fi | |
16489 | fi | |
16490 | fi | |
16491 | fi | |
16492 | fi | |
16493 | rm -f conftest.s conftest.o conftest | |
16494 | fi | |
e9d207d9 EB |
16495 | case "$target" in |
16496 | hppa*-*-linux*) | |
16497 | # ??? This apparently exposes a binutils bug with PC-relative relocations. | |
16498 | gcc_cv_ld_eh_gc_sections=no | |
16499 | ;; | |
16500 | esac | |
22ba88ef EB |
16501 | if test x$gcc_cv_ld_eh_gc_sections = xyes; then |
16502 | ||
16503 | cat >>confdefs.h <<\_ACEOF | |
16504 | #define HAVE_LD_EH_GC_SECTIONS 1 | |
16505 | _ACEOF | |
16506 | ||
16507 | fi | |
b61ff9c8 BS |
16508 | echo "$as_me:$LINENO: result: $gcc_cv_ld_eh_gc_sections" >&5 |
16509 | echo "${ECHO_T}$gcc_cv_ld_eh_gc_sections" >&6 | |
22ba88ef | 16510 | |
8bb915b6 NN |
16511 | # -------- |
16512 | # UNSORTED | |
16513 | # -------- | |
16514 | ||
b61ff9c8 BS |
16515 | echo "$as_me:$LINENO: checking linker --as-needed support" >&5 |
16516 | echo $ECHO_N "checking linker --as-needed support... $ECHO_C" >&6 | |
82e923f6 RS |
16517 | if test "${gcc_cv_ld_as_needed+set}" = set; then |
16518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16519 | else | |
16520 | gcc_cv_ld_as_needed=no | |
765f1bf9 AM |
16521 | if test $in_tree_ld = yes ; then |
16522 | 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 \ | |
16523 | && test $in_tree_ld_is_elf = yes; then | |
16524 | gcc_cv_ld_as_needed=yes | |
16525 | fi | |
16526 | elif test x$gcc_cv_ld != x; then | |
16527 | # Check if linker supports --as-needed and --no-as-needed options | |
16528 | if $gcc_cv_ld --help 2>/dev/null | grep as-needed > /dev/null; then | |
16529 | gcc_cv_ld_as_needed=yes | |
16530 | fi | |
16531 | fi | |
82e923f6 RS |
16532 | |
16533 | fi | |
b61ff9c8 BS |
16534 | echo "$as_me:$LINENO: result: $gcc_cv_ld_as_needed" >&5 |
16535 | echo "${ECHO_T}$gcc_cv_ld_as_needed" >&6 | |
765f1bf9 AM |
16536 | if test x"$gcc_cv_ld_as_needed" = xyes; then |
16537 | ||
16538 | cat >>confdefs.h <<\_ACEOF | |
16539 | #define HAVE_LD_AS_NEEDED 1 | |
16540 | _ACEOF | |
16541 | ||
16542 | fi | |
765f1bf9 | 16543 | |
d82bf747 AM |
16544 | case "$target:$tm_file" in |
16545 | powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*) | |
b61ff9c8 BS |
16546 | echo "$as_me:$LINENO: checking linker support for omitting dot symbols" >&5 |
16547 | echo $ECHO_N "checking linker support for omitting dot symbols... $ECHO_C" >&6 | |
85b776df AM |
16548 | if test "${gcc_cv_ld_no_dot_syms+set}" = set; then |
16549 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16550 | else | |
16551 | gcc_cv_ld_no_dot_syms=no | |
16552 | if test $in_tree_ld = yes ; then | |
16553 | 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 | |
16554 | gcc_cv_ld_no_dot_syms=yes | |
16555 | fi | |
16556 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x ; then | |
16557 | cat > conftest1.s <<EOF | |
16558 | .text | |
16559 | bl .foo | |
16560 | EOF | |
16561 | cat > conftest2.s <<EOF | |
16562 | .section ".opd","aw" | |
16563 | .align 3 | |
16564 | .globl foo | |
16565 | .type foo,@function | |
16566 | foo: | |
16567 | .quad .LEfoo,.TOC.@tocbase,0 | |
16568 | .text | |
16569 | .LEfoo: | |
16570 | blr | |
16571 | .size foo,.-.LEfoo | |
16572 | EOF | |
16573 | if $gcc_cv_as -a64 -o conftest1.o conftest1.s > /dev/null 2>&1 \ | |
16574 | && $gcc_cv_as -a64 -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
16575 | && $gcc_cv_ld -melf64ppc -o conftest conftest1.o conftest2.o > /dev/null 2>&1; then | |
16576 | gcc_cv_ld_no_dot_syms=yes | |
16577 | fi | |
16578 | rm -f conftest conftest1.o conftest2.o conftest1.s conftest2.s | |
16579 | fi | |
16580 | ||
16581 | fi | |
b61ff9c8 BS |
16582 | echo "$as_me:$LINENO: result: $gcc_cv_ld_no_dot_syms" >&5 |
16583 | echo "${ECHO_T}$gcc_cv_ld_no_dot_syms" >&6 | |
85b776df AM |
16584 | if test x"$gcc_cv_ld_no_dot_syms" = xyes; then |
16585 | ||
16586 | cat >>confdefs.h <<\_ACEOF | |
16587 | #define HAVE_LD_NO_DOT_SYMS 1 | |
16588 | _ACEOF | |
16589 | ||
16590 | fi | |
16591 | ;; | |
16592 | esac | |
16593 | ||
b61ff9c8 BS |
16594 | echo "$as_me:$LINENO: checking linker --sysroot support" >&5 |
16595 | echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6 | |
380e5ca4 MM |
16596 | if test "${gcc_cv_ld_sysroot+set}" = set; then |
16597 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16598 | else | |
16599 | gcc_cv_ld_sysroot=no | |
16600 | if test $in_tree_ld = yes ; then | |
16601 | 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 | 16602 | gcc_cv_ld_sysroot=yes |
380e5ca4 MM |
16603 | fi |
16604 | elif test x$gcc_cv_ld != x; then | |
16605 | if $gcc_cv_ld --help 2>/dev/null | grep sysroot > /dev/null; then | |
16606 | gcc_cv_ld_sysroot=yes | |
16607 | fi | |
16608 | fi | |
16609 | fi | |
b61ff9c8 BS |
16610 | echo "$as_me:$LINENO: result: $gcc_cv_ld_sysroot" >&5 |
16611 | echo "${ECHO_T}$gcc_cv_ld_sysroot" >&6 | |
380e5ca4 MM |
16612 | if test x"$gcc_cv_ld_sysroot" = xyes; then |
16613 | ||
16614 | cat >>confdefs.h <<\_ACEOF | |
16615 | #define HAVE_LD_SYSROOT 1 | |
16616 | _ACEOF | |
16617 | ||
16618 | fi | |
16619 | ||
9fb28a67 | 16620 | if test x$with_sysroot = x && test x$host = x$target \ |
c794c06f CD |
16621 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" \ |
16622 | && test "$prefix" != "NONE"; then | |
ba479fd2 NN |
16623 | |
16624 | cat >>confdefs.h <<_ACEOF | |
793e9558 | 16625 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
ba479fd2 | 16626 | _ACEOF |
793e9558 PB |
16627 | |
16628 | fi | |
16629 | ||
77008252 | 16630 | # Test for stack protector support in target C library. |
b61ff9c8 BS |
16631 | echo "$as_me:$LINENO: checking __stack_chk_fail in target C library" >&5 |
16632 | echo $ECHO_N "checking __stack_chk_fail in target C library... $ECHO_C" >&6 | |
77008252 JJ |
16633 | if test "${gcc_cv_libc_provides_ssp+set}" = set; then |
16634 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16635 | else | |
16636 | gcc_cv_libc_provides_ssp=no | |
a6ccdbab EC |
16637 | case "$target" in |
16638 | *-*-linux*) | |
77008252 JJ |
16639 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then |
16640 | if test "x$with_sysroot" = x; then | |
16641 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
16642 | elif test "x$with_build_sysroot" != "x"; then |
16643 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
77008252 JJ |
16644 | elif test "x$with_sysroot" = xyes; then |
16645 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16646 | else | |
16647 | glibc_header_dir="${with_sysroot}/usr/include" | |
16648 | fi | |
16649 | else | |
16650 | glibc_header_dir=/usr/include | |
16651 | fi | |
16652 | # glibc 2.4 and later provides __stack_chk_fail and | |
16653 | # either __stack_chk_guard, or TLS access to stack guard canary. | |
16654 | if test -f $glibc_header_dir/features.h \ | |
16655 | && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ | |
16656 | $glibc_header_dir/features.h > /dev/null; then | |
16657 | if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ | |
16658 | $glibc_header_dir/features.h > /dev/null; then | |
16659 | gcc_cv_libc_provides_ssp=yes | |
16660 | elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ | |
16661 | $glibc_header_dir/features.h > /dev/null \ | |
16662 | && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ | |
16663 | $glibc_header_dir/features.h > /dev/null; then | |
16664 | gcc_cv_libc_provides_ssp=yes | |
16665 | fi | |
a6ccdbab EC |
16666 | fi |
16667 | ;; | |
16668 | *-*-darwin*) | |
b61ff9c8 BS |
16669 | echo "$as_me:$LINENO: checking for __stack_chk_fail" >&5 |
16670 | echo $ECHO_N "checking for __stack_chk_fail... $ECHO_C" >&6 | |
a6ccdbab EC |
16671 | if test "${ac_cv_func___stack_chk_fail+set}" = set; then |
16672 | echo $ECHO_N "(cached) $ECHO_C" >&6 | |
16673 | else | |
16674 | cat >conftest.$ac_ext <<_ACEOF | |
16675 | /* confdefs.h. */ | |
16676 | _ACEOF | |
16677 | cat confdefs.h >>conftest.$ac_ext | |
16678 | cat >>conftest.$ac_ext <<_ACEOF | |
16679 | /* end confdefs.h. */ | |
16680 | /* Define __stack_chk_fail to an innocuous variant, in case <limits.h> declares __stack_chk_fail. | |
16681 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
16682 | #define __stack_chk_fail innocuous___stack_chk_fail | |
16683 | ||
16684 | /* System header to define __stub macros and hopefully few prototypes, | |
16685 | which can conflict with char __stack_chk_fail (); below. | |
16686 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
16687 | <limits.h> exists even on freestanding compilers. */ | |
16688 | ||
16689 | #ifdef __STDC__ | |
16690 | # include <limits.h> | |
16691 | #else | |
16692 | # include <assert.h> | |
16693 | #endif | |
16694 | ||
16695 | #undef __stack_chk_fail | |
16696 | ||
b61ff9c8 | 16697 | /* Override any gcc2 internal prototype to avoid an error. */ |
a6ccdbab EC |
16698 | #ifdef __cplusplus |
16699 | extern "C" | |
b61ff9c8 | 16700 | { |
a6ccdbab | 16701 | #endif |
b61ff9c8 BS |
16702 | /* We use char because int might match the return type of a gcc2 |
16703 | builtin and then its argument prototype would still apply. */ | |
a6ccdbab EC |
16704 | char __stack_chk_fail (); |
16705 | /* The GNU C library defines this for functions which it implements | |
16706 | to always fail with ENOSYS. Some functions are actually named | |
16707 | something starting with __ and the normal name is an alias. */ | |
b61ff9c8 | 16708 | #if defined (__stub___stack_chk_fail) || defined (__stub_____stack_chk_fail) |
a6ccdbab | 16709 | choke me |
b61ff9c8 BS |
16710 | #else |
16711 | char (*f) () = __stack_chk_fail; | |
16712 | #endif | |
16713 | #ifdef __cplusplus | |
16714 | } | |
a6ccdbab EC |
16715 | #endif |
16716 | ||
16717 | int | |
16718 | main () | |
16719 | { | |
b61ff9c8 | 16720 | return f != __stack_chk_fail; |
a6ccdbab EC |
16721 | ; |
16722 | return 0; | |
16723 | } | |
16724 | _ACEOF | |
16725 | rm -f conftest.$ac_objext conftest$ac_exeext | |
b61ff9c8 BS |
16726 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
16727 | (eval $ac_link) 2>conftest.er1 | |
a6ccdbab EC |
16728 | ac_status=$? |
16729 | grep -v '^ *+' conftest.er1 >conftest.err | |
16730 | rm -f conftest.er1 | |
16731 | cat conftest.err >&5 | |
16732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
b61ff9c8 BS |
16733 | (exit $ac_status); } && |
16734 | { ac_try='test -z "$ac_c_werror_flag" | |
16735 | || test ! -s conftest.err' | |
16736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16737 | (eval $ac_try) 2>&5 | |
16738 | ac_status=$? | |
16739 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16740 | (exit $ac_status); }; } && | |
16741 | { ac_try='test -s conftest$ac_exeext' | |
16742 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
16743 | (eval $ac_try) 2>&5 | |
16744 | ac_status=$? | |
16745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
16746 | (exit $ac_status); }; }; then | |
8b1f719a PB |
16747 | ac_cv_func___stack_chk_fail=yes |
16748 | else | |
a6ccdbab EC |
16749 | echo "$as_me: failed program was:" >&5 |
16750 | sed 's/^/| /' conftest.$ac_ext >&5 | |
16751 | ||
b61ff9c8 | 16752 | ac_cv_func___stack_chk_fail=no |
a6ccdbab | 16753 | fi |
b61ff9c8 | 16754 | rm -f conftest.err conftest.$ac_objext \ |
a6ccdbab EC |
16755 | conftest$ac_exeext conftest.$ac_ext |
16756 | fi | |
b61ff9c8 BS |
16757 | echo "$as_me:$LINENO: result: $ac_cv_func___stack_chk_fail" >&5 |
16758 | echo "${ECHO_T}$ac_cv_func___stack_chk_fail" >&6 | |
a6ccdbab EC |
16759 | if test $ac_cv_func___stack_chk_fail = yes; then |
16760 | gcc_cv_libc_provides_ssp=yes | |
16761 | else | |
16762 | echo "no __stack_chk_fail on this target" | |
77008252 | 16763 | fi |
a6ccdbab EC |
16764 | |
16765 | ;; | |
77008252 | 16766 | *) gcc_cv_libc_provides_ssp=no ;; |
a6ccdbab EC |
16767 | esac |
16768 | fi | |
b61ff9c8 BS |
16769 | echo "$as_me:$LINENO: result: $gcc_cv_libc_provides_ssp" >&5 |
16770 | echo "${ECHO_T}$gcc_cv_libc_provides_ssp" >&6 | |
a6ccdbab | 16771 | |
77008252 JJ |
16772 | if test x$gcc_cv_libc_provides_ssp = xyes; then |
16773 | ||
16774 | cat >>confdefs.h <<\_ACEOF | |
16775 | #define TARGET_LIBC_PROVIDES_SSP 1 | |
16776 | _ACEOF | |
16777 | ||
16778 | fi | |
16779 | ||
ed965309 JJ |
16780 | # Check if TFmode long double should be used by default or not. |
16781 | # Some glibc targets used DFmode long double, but with glibc 2.4 | |
16782 | # and later they can use TFmode. | |
16783 | case "$target" in | |
f7cc5390 JM |
16784 | powerpc*-*-linux* | \ |
16785 | powerpc*-*-gnu* | \ | |
ed965309 JJ |
16786 | sparc*-*-linux* | \ |
16787 | s390*-*-linux* | \ | |
16788 | alpha*-*-linux*) | |
16789 | ||
b61ff9c8 | 16790 | # Check whether --with-long-double-128 or --without-long-double-128 was given. |
ed965309 | 16791 | if test "${with_long_double_128+set}" = set; then |
b61ff9c8 BS |
16792 | withval="$with_long_double_128" |
16793 | gcc_cv_target_ldbl128="$with_long_double_128" | |
ed965309 JJ |
16794 | else |
16795 | gcc_cv_target_ldbl128=no | |
16796 | if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then | |
16797 | if test "x$with_sysroot" = x; then | |
16798 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" | |
c9ecbf86 JM |
16799 | elif test "x$with_build_sysroot" != "x"; then |
16800 | glibc_header_dir="${with_build_sysroot}/usr/include" | |
ed965309 JJ |
16801 | elif test "x$with_sysroot" = xyes; then |
16802 | glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" | |
16803 | else | |
16804 | glibc_header_dir="${with_sysroot}/usr/include" | |
16805 | fi | |
16806 | else | |
16807 | glibc_header_dir=/usr/include | |
16808 | fi | |
65280f6c | 16809 | grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ |
ed965309 JJ |
16810 | $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ |
16811 | && gcc_cv_target_ldbl128=yes | |
65280f6c | 16812 | |
b61ff9c8 | 16813 | fi; |
ed965309 JJ |
16814 | ;; |
16815 | esac | |
16816 | if test x$gcc_cv_target_ldbl128 = xyes; then | |
16817 | ||
16818 | cat >>confdefs.h <<\_ACEOF | |
16819 | #define TARGET_DEFAULT_LONG_DOUBLE_128 1 | |
16820 | _ACEOF | |
16821 | ||
16822 | fi | |
16823 | ||
81bf3d9e | 16824 | # Find out what GC implementation we want, or may, use. |
ba479fd2 | 16825 | |
b61ff9c8 | 16826 | # Check whether --with-gc or --without-gc was given. |
81bf3d9e | 16827 | if test "${with_gc+set}" = set; then |
b61ff9c8 BS |
16828 | withval="$with_gc" |
16829 | case "$withval" in | |
08cee789 | 16830 | page) |
81bf3d9e | 16831 | GGC=ggc-$withval |
08cee789 DJ |
16832 | ;; |
16833 | zone) | |
16834 | GGC=ggc-$withval | |
16835 | ||
16836 | cat >>confdefs.h <<\_ACEOF | |
16837 | #define GGC_ZONE 1 | |
16838 | _ACEOF | |
16839 | ||
81bf3d9e RH |
16840 | ;; |
16841 | *) | |
ba479fd2 NN |
16842 | { { echo "$as_me:$LINENO: error: $withval is an invalid option to --with-gc" >&5 |
16843 | echo "$as_me: error: $withval is an invalid option to --with-gc" >&2;} | |
16844 | { (exit 1); exit 1; }; } | |
81bf3d9e RH |
16845 | ;; |
16846 | esac | |
16847 | else | |
005537df | 16848 | GGC=ggc-page |
b61ff9c8 | 16849 | fi; |
81bf3d9e RH |
16850 | |
16851 | echo "Using $GGC for garbage collection." | |
16852 | ||
3c809ba4 | 16853 | # Use the system's zlib library. |
b8dad04b ZW |
16854 | zlibdir=-L../zlib |
16855 | zlibinc="-I\$(srcdir)/../zlib" | |
ba479fd2 | 16856 | |
b61ff9c8 | 16857 | # Check whether --with-system-zlib or --without-system-zlib was given. |
3c809ba4 | 16858 | if test "${with_system_zlib+set}" = set; then |
b61ff9c8 BS |
16859 | withval="$with_system_zlib" |
16860 | zlibdir= | |
3c809ba4 AG |
16861 | zlibinc= |
16862 | ||
b61ff9c8 | 16863 | fi; |
b8ec3cc8 | 16864 | |
703d89ab | 16865 | |
ab22c1fa | 16866 | |
1a4b763e | 16867 | |
b61ff9c8 BS |
16868 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
16869 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | |
16870 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | |
dc6746e7 | 16871 | if test "${enable_maintainer_mode+set}" = set; then |
b61ff9c8 BS |
16872 | enableval="$enable_maintainer_mode" |
16873 | maintainer_mode=$enableval | |
dc6746e7 PT |
16874 | else |
16875 | maintainer_mode=no | |
b61ff9c8 | 16876 | fi; |
a6ccdbab | 16877 | |
b61ff9c8 BS |
16878 | echo "$as_me:$LINENO: result: $maintainer_mode" >&5 |
16879 | echo "${ECHO_T}$maintainer_mode" >&6 | |
dc6746e7 PT |
16880 | |
16881 | if test "$maintainer_mode" = "yes"; then | |
16882 | MAINT='' | |
16883 | else | |
16884 | MAINT='#' | |
16885 | fi | |
16886 | ||
8bb915b6 NN |
16887 | # -------------- |
16888 | # Language hooks | |
16889 | # -------------- | |
16890 | ||
861bb6c1 JL |
16891 | # Make empty files to contain the specs and options for each language. |
16892 | # Then add #include lines to for a compiler that has specs and/or options. | |
16893 | ||
cc11cc9b | 16894 | subdirs= |
d7b42618 | 16895 | lang_opt_files= |
861bb6c1 | 16896 | lang_specs_files= |
3103b7db | 16897 | lang_tree_files= |
861bb6c1 JL |
16898 | # These (without "all_") are set in each config-lang.in. |
16899 | # `language' must be a single word so is spelled singularly. | |
16900 | all_languages= | |
861bb6c1 | 16901 | all_compilers= |
fa958513 | 16902 | all_outputs='Makefile gccbug libada-mk' |
861bb6c1 | 16903 | # List of language makefile fragments. |
2ed26f6b ZW |
16904 | all_lang_makefrags= |
16905 | # List of language subdirectory makefiles. Deprecated. | |
861bb6c1 | 16906 | all_lang_makefiles= |
703d89ab | 16907 | # Additional files for gengtype |
ef69da62 | 16908 | all_gtfiles="$target_gtfiles" |
861bb6c1 | 16909 | |
cc11cc9b PB |
16910 | # These are the languages that are set in --enable-languages, |
16911 | # and are available in the GCC tree. | |
16912 | all_selected_languages= | |
16913 | ||
861bb6c1 JL |
16914 | # Add the language fragments. |
16915 | # Languages are added via two mechanisms. Some information must be | |
16916 | # recorded in makefile variables, these are defined in config-lang.in. | |
16917 | # We accumulate them and plug them into the main Makefile. | |
16918 | # The other mechanism is a set of hooks for each of the main targets | |
16919 | # like `clean', `install', etc. | |
16920 | ||
861bb6c1 | 16921 | language_hooks="Make-hooks" |
861bb6c1 | 16922 | |
cc11cc9b | 16923 | for lang in ${srcdir}/*/config-lang.in |
861bb6c1 | 16924 | do |
1546bb64 PB |
16925 | test "$lang" = "${srcdir}/*/config-lang.in" && continue |
16926 | ||
cc11cc9b PB |
16927 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` |
16928 | if test "x$lang_alias" = x | |
16929 | then | |
16930 | echo "$lang doesn't set \$language." 1>&2 | |
16931 | exit 1 | |
16932 | fi | |
16933 | subdir="`echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
16934 | subdirs="$subdirs $subdir" | |
16935 | case ",$enable_languages," in | |
16936 | *,$lang_alias,*) | |
16937 | all_selected_languages="$all_selected_languages $lang_alias" | |
16938 | if test -f $srcdir/$subdir/lang-specs.h; then | |
16939 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" | |
16940 | fi | |
16941 | ;; | |
16942 | esac | |
16943 | ||
cc11cc9b PB |
16944 | language= |
16945 | boot_language= | |
16946 | compilers= | |
cc11cc9b PB |
16947 | outputs= |
16948 | gtfiles= | |
1546bb64 | 16949 | subdir_requires= |
cc11cc9b PB |
16950 | . ${srcdir}/$subdir/config-lang.in |
16951 | if test "x$language" = x | |
16952 | then | |
16953 | echo "${srcdir}/$subdir/config-lang.in doesn't set \$language." 1>&2 | |
16954 | exit 1 | |
16955 | fi | |
1546bb64 PB |
16956 | |
16957 | ok=: | |
16958 | case ",$enable_languages," in | |
16959 | *,$lang_alias,*) ;; | |
16960 | *) | |
16961 | for i in $subdir_requires; do | |
b6348cb3 | 16962 | test -f "${srcdir}/$i/config-lang.in" && continue |
1546bb64 PB |
16963 | ok=false |
16964 | break | |
16965 | done | |
16966 | ;; | |
16967 | esac | |
16968 | $ok || continue | |
16969 | ||
cc11cc9b | 16970 | all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$subdir/Make-lang.in" |
1546bb64 PB |
16971 | if test -f $srcdir/$subdir/lang.opt; then |
16972 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
16973 | fi | |
16974 | if test -f $srcdir/$subdir/$subdir-tree.def; then | |
16975 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" | |
16976 | fi | |
cc11cc9b PB |
16977 | if test -f ${srcdir}/$subdir/Makefile.in |
16978 | then all_lang_makefiles="$subdir/Makefile" | |
16979 | fi | |
16980 | all_languages="$all_languages $language" | |
cc11cc9b | 16981 | all_compilers="$all_compilers $compilers" |
cc11cc9b | 16982 | all_outputs="$all_outputs $outputs" |
703d89ab | 16983 | all_gtfiles="$all_gtfiles [$subdir] $gtfiles" |
861bb6c1 JL |
16984 | done |
16985 | ||
8ac9d31f TJ |
16986 | # Pick up gtfiles for c |
16987 | gtfiles= | |
8ac9d31f | 16988 | . ${srcdir}/c-config-lang.in |
703d89ab | 16989 | all_gtfiles="$all_gtfiles [c] $gtfiles" |
8ac9d31f | 16990 | |
cbc59f01 | 16991 | check_languages= |
cc11cc9b | 16992 | for language in $all_selected_languages |
cbc59f01 | 16993 | do |
cc11cc9b | 16994 | check_languages="$check_languages check-$language" |
cbc59f01 DD |
16995 | done |
16996 | ||
62b81e45 | 16997 | # We link each language in with a set of hooks, reached indirectly via |
cc11cc9b | 16998 | # lang.${target}. Only do so for selected languages. |
861bb6c1 JL |
16999 | |
17000 | rm -f Make-hooks | |
17001 | touch Make-hooks | |
bd97af06 | 17002 | target_list="all.cross start.encap rest.encap tags \ |
bcc3d150 BM |
17003 | install-common install-man install-info install-pdf dvi pdf \ |
17004 | html uninstall info man srcextra srcman srcinfo \ | |
8b1f719a | 17005 | mostlyclean clean distclean maintainer-clean" |
cc11cc9b | 17006 | |
861bb6c1 JL |
17007 | for t in $target_list |
17008 | do | |
17009 | x= | |
cc11cc9b | 17010 | for lang in $all_selected_languages |
861bb6c1 | 17011 | do |
cc11cc9b | 17012 | x="$x $lang.$t" |
861bb6c1 JL |
17013 | done |
17014 | echo "lang.$t: $x" >> Make-hooks | |
17015 | done | |
17016 | ||
8bb915b6 NN |
17017 | # -------- |
17018 | # UNSORTED | |
17019 | # -------- | |
17020 | ||
cc06d68c | 17021 | # Create .gdbinit. |
861bb6c1 | 17022 | |
cc06d68c GP |
17023 | echo "dir ." > .gdbinit |
17024 | echo "dir ${srcdir}" >> .gdbinit | |
17025 | if test x$gdb_needs_out_file_path = xyes | |
17026 | then | |
17027 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
17028 | fi | |
17029 | if test "x$subdirs" != x; then | |
17030 | for s in $subdirs | |
17031 | do | |
17032 | echo "dir ${srcdir}/$s" >> .gdbinit | |
17033 | done | |
861bb6c1 | 17034 | fi |
cc06d68c | 17035 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 17036 | |
15c723f3 | 17037 | gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' |
d062c304 JL |
17038 | |
17039 | ||
2ce3c6c6 | 17040 | |
2bbea3a6 RH |
17041 | # Find a directory in which to install a shared libgcc. |
17042 | ||
b61ff9c8 | 17043 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. |
2bbea3a6 | 17044 | if test "${enable_version_specific_runtime_libs+set}" = set; then |
b61ff9c8 | 17045 | enableval="$enable_version_specific_runtime_libs" |
ba479fd2 | 17046 | |
b61ff9c8 | 17047 | fi; |
2bbea3a6 RH |
17048 | |
17049 | ||
b61ff9c8 | 17050 | # Check whether --with-slibdir or --without-slibdir was given. |
5b15f277 | 17051 | if test "${with_slibdir+set}" = set; then |
b61ff9c8 BS |
17052 | withval="$with_slibdir" |
17053 | slibdir="$with_slibdir" | |
5b15f277 RH |
17054 | else |
17055 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 17056 | slibdir='$(libsubdir)' |
5b15f277 | 17057 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
17058 | slibdir='$(build_tooldir)/lib' |
17059 | else | |
5b15f277 | 17060 | slibdir='$(libdir)' |
2bbea3a6 | 17061 | fi |
b61ff9c8 | 17062 | fi; |
2bbea3a6 RH |
17063 | |
17064 | ||
1e6347d8 | 17065 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
17066 | |
17067 | ||
22482f74 | 17068 | |
b61ff9c8 | 17069 | # Check whether --with-datarootdir or --without-datarootdir was given. |
22482f74 | 17070 | if test "${with_datarootdir+set}" = set; then |
b61ff9c8 BS |
17071 | withval="$with_datarootdir" |
17072 | datarootdir="\${prefix}/$with_datarootdir" | |
22482f74 MS |
17073 | else |
17074 | datarootdir='$(prefix)/share' | |
b61ff9c8 | 17075 | fi; |
22482f74 MS |
17076 | |
17077 | ||
a6ccdbab | 17078 | |
b61ff9c8 | 17079 | # Check whether --with-docdir or --without-docdir was given. |
22482f74 | 17080 | if test "${with_docdir+set}" = set; then |
b61ff9c8 BS |
17081 | withval="$with_docdir" |
17082 | docdir="\${prefix}/$with_docdir" | |
22482f74 MS |
17083 | else |
17084 | docdir='$(datarootdir)' | |
b61ff9c8 | 17085 | fi; |
703d89ab | 17086 | |
ab22c1fa | 17087 | |
1a4b763e | 17088 | |
b61ff9c8 | 17089 | # Check whether --with-htmldir or --without-htmldir was given. |
22482f74 | 17090 | if test "${with_htmldir+set}" = set; then |
b61ff9c8 BS |
17091 | withval="$with_htmldir" |
17092 | htmldir="\${prefix}/$with_htmldir" | |
22482f74 MS |
17093 | else |
17094 | htmldir='$(docdir)' | |
b61ff9c8 | 17095 | fi; |
861bb6c1 JL |
17096 | |
17097 | ||
703d89ab | 17098 | # Substitute configuration variables |
861bb6c1 JL |
17099 | |
17100 | ||
17101 | ||
17102 | ||
17103 | ||
17104 | ||
17105 | ||
17106 | ||
17107 | ||
17108 | ||
17109 | ||
17110 | ||
17111 | ||
17112 | ||
17113 | ||
17114 | ||
17115 | ||
17116 | ||
17117 | ||
17118 | ||
17119 | ||
17120 | ||
17121 | ||
17122 | ||
17123 | ||
17124 | ||
17125 | ||
17126 | ||
17127 | ||
17128 | ||
17129 | ||
17130 | ||
17131 | ||
17132 | ||
17133 | ||
17134 | ||
17135 | ||
17136 | ||
17137 | ||
17138 | ||
17139 | ||
17140 | ||
17141 | ||
17142 | ||
9b16d2c4 | 17143 | |
e9a25f70 | 17144 | |
6e26218f | 17145 | |
c8724862 | 17146 | |
11642c3a ZW |
17147 | |
17148 | ||
17149 | ||
3d9d2476 | 17150 | |
e2500fed | 17151 | |
51b9ff45 | 17152 | |
861bb6c1 | 17153 | |
6e3f3080 NN |
17154 | # Echo link setup. |
17155 | if test x${build} = x${host} ; then | |
17156 | if test x${host} = x${target} ; then | |
17157 | echo "Links are now set up to build a native compiler for ${target}." 1>&2 | |
17158 | else | |
17159 | echo "Links are now set up to build a cross-compiler" 1>&2 | |
17160 | echo " from ${host} to ${target}." 1>&2 | |
17161 | fi | |
17162 | else | |
17163 | if test x${host} = x${target} ; then | |
17164 | echo "Links are now set up to build (on ${build}) a native compiler" 1>&2 | |
17165 | echo " for ${target}." 1>&2 | |
17166 | else | |
17167 | echo "Links are now set up to build (on ${build}) a cross-compiler" 1>&2 | |
17168 | echo " from ${host} to ${target}." 1>&2 | |
17169 | fi | |
17170 | fi | |
17171 | ||
6de9cd9a DN |
17172 | |
17173 | ||
17174 | ||
6e3f3080 NN |
17175 | # Configure the subdirectories |
17176 | # AC_CONFIG_SUBDIRS($subdirs) | |
17177 | ||
17178 | # Create the Makefile | |
17179 | # and configure language subdirectories | |
b61ff9c8 | 17180 | ac_config_files="$ac_config_files $all_outputs" |
914c5af7 NN |
17181 | |
17182 | ||
b61ff9c8 | 17183 | ac_config_commands="$ac_config_commands default" |
914c5af7 | 17184 | |
ba479fd2 | 17185 | cat >confcache <<\_ACEOF |
6e3f3080 NN |
17186 | # This file is a shell script that caches the results of configure |
17187 | # tests run on this system so they can be shared between configure | |
ba479fd2 NN |
17188 | # scripts and configure runs, see configure's option --config-cache. |
17189 | # It is not useful on other systems. If it contains results you don't | |
17190 | # want to keep, you may remove or edit it. | |
6e3f3080 | 17191 | # |
ba479fd2 NN |
17192 | # config.status only pays attention to the cache file if you give it |
17193 | # the --recheck option to rerun configure. | |
6e3f3080 | 17194 | # |
ba479fd2 NN |
17195 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
17196 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | |
17197 | # following values. | |
17198 | ||
17199 | _ACEOF | |
17200 | ||
6e3f3080 NN |
17201 | # The following way of writing the cache mishandles newlines in values, |
17202 | # but we know of no workaround that is simple, portable, and efficient. | |
b61ff9c8 | 17203 | # So, don't put newlines in cache variables' values. |
6e3f3080 NN |
17204 | # Ultrix sh set writes to stderr and can't be redirected directly, |
17205 | # and sets the high bit in the cache file unless we assign to the vars. | |
b61ff9c8 | 17206 | { |
ba479fd2 | 17207 | (set) 2>&1 | |
b61ff9c8 BS |
17208 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
17209 | *ac_space=\ *) | |
ba479fd2 NN |
17210 | # `set' does not quote correctly, so add quotes (double-quote |
17211 | # substitution turns \\\\ into \\, and sed turns \\ into \). | |
17212 | sed -n \ | |
86da66b5 HPN |
17213 | "s/'/'\\\\''/g; |
17214 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
b61ff9c8 | 17215 | ;; |
ba479fd2 NN |
17216 | *) |
17217 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
b61ff9c8 BS |
17218 | sed -n \ |
17219 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
ba479fd2 | 17220 | ;; |
b61ff9c8 BS |
17221 | esac; |
17222 | } | | |
ba479fd2 NN |
17223 | sed ' |
17224 | t clear | |
b61ff9c8 | 17225 | : clear |
ba479fd2 NN |
17226 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
17227 | t end | |
b61ff9c8 BS |
17228 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
17229 | : end' >>confcache | |
17230 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
17231 | if test -w $cache_file; then | |
17232 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" | |
ba479fd2 | 17233 | cat confcache >$cache_file |
6e3f3080 | 17234 | else |
b61ff9c8 | 17235 | echo "not updating unwritable cache $cache_file" |
6e3f3080 NN |
17236 | fi |
17237 | fi | |
17238 | rm -f confcache | |
17239 | ||
17240 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
17241 | # Let make expand exec_prefix. | |
17242 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
17243 | ||
b61ff9c8 BS |
17244 | # VPATH may cause trouble with some makes, so we remove $(srcdir), |
17245 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
17246 | # trailing colons and then remove the whole line if VPATH becomes empty | |
17247 | # (actually we leave an empty line to preserve line numbers). | |
17248 | if test "x$srcdir" = x.; then | |
17249 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
17250 | s/:*\$(srcdir):*/:/; | |
17251 | s/:*\${srcdir}:*/:/; | |
17252 | s/:*@srcdir@:*/:/; | |
17253 | s/^\([^=]*=[ ]*\):*/\1/; | |
17254 | s/:*$//; | |
17255 | s/^[^=]*=[ ]*$//; | |
17256 | }' | |
17257 | fi | |
17258 | ||
63cf211a | 17259 | DEFS=-DHAVE_CONFIG_H |
6e3f3080 | 17260 | |
ba479fd2 NN |
17261 | ac_libobjs= |
17262 | ac_ltlibobjs= | |
17263 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
17264 | # 1. Remove the extension, and $U if already installed. | |
b61ff9c8 BS |
17265 | ac_i=`echo "$ac_i" | |
17266 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` | |
17267 | # 2. Add them. | |
17268 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
17269 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
ba479fd2 NN |
17270 | done |
17271 | LIBOBJS=$ac_libobjs | |
63cf211a | 17272 | |
ba479fd2 NN |
17273 | LTLIBOBJS=$ac_ltlibobjs |
17274 | ||
17275 | ||
17276 | ||
17277 | : ${CONFIG_STATUS=./config.status} | |
17278 | ac_clean_files_save=$ac_clean_files | |
17279 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
17280 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
17281 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
17282 | cat >$CONFIG_STATUS <<_ACEOF | |
17283 | #! $SHELL | |
17284 | # Generated by $as_me. | |
6e3f3080 NN |
17285 | # Run this file to recreate the current configuration. |
17286 | # Compiler output produced by configure, useful for debugging | |
ba479fd2 | 17287 | # configure, is in config.log if it exists. |
6e3f3080 | 17288 | |
ba479fd2 NN |
17289 | debug=false |
17290 | ac_cs_recheck=false | |
17291 | ac_cs_silent=false | |
17292 | SHELL=\${CONFIG_SHELL-$SHELL} | |
17293 | _ACEOF | |
17294 | ||
17295 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17296 | ## --------------------- ## | |
17297 | ## M4sh Initialization. ## | |
17298 | ## --------------------- ## | |
17299 | ||
b61ff9c8 | 17300 | # Be Bourne compatible |
ba479fd2 NN |
17301 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
17302 | emulate sh | |
17303 | NULLCMD=: | |
17304 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
17305 | # is contrary to our usage. Disable this feature. | |
17306 | alias -g '${1+"$@"}'='"$@"' | |
b61ff9c8 BS |
17307 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then |
17308 | set -o posix | |
2f41c1d6 | 17309 | fi |
b61ff9c8 | 17310 | DUALCASE=1; export DUALCASE # for MKS sh |
ab22c1fa | 17311 | |
1a4b763e BS |
17312 | # Support unset when possible. |
17313 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
17314 | as_unset=unset | |
17315 | else | |
17316 | as_unset=false | |
17317 | fi | |
17318 | ||
ab22c1fa | 17319 | |
1a4b763e | 17320 | # Work around bugs in pre-3.0 UWIN ksh. |
b61ff9c8 | 17321 | $as_unset ENV MAIL MAILPATH |
1a4b763e BS |
17322 | PS1='$ ' |
17323 | PS2='> ' | |
17324 | PS4='+ ' | |
17325 | ||
17326 | # NLS nuisances. | |
17327 | for as_var in \ | |
17328 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
17329 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
17330 | LC_TELEPHONE LC_TIME | |
2f41c1d6 | 17331 | do |
1a4b763e BS |
17332 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then |
17333 | eval $as_var=C; export $as_var | |
17334 | else | |
b61ff9c8 | 17335 | $as_unset $as_var |
1a4b763e BS |
17336 | fi |
17337 | done | |
17338 | ||
17339 | # Required to use basename. | |
b61ff9c8 | 17340 | if expr a : '\(a\)' >/dev/null 2>&1; then |
1a4b763e BS |
17341 | as_expr=expr |
17342 | else | |
17343 | as_expr=false | |
17344 | fi | |
17345 | ||
b61ff9c8 | 17346 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then |
1a4b763e BS |
17347 | as_basename=basename |
17348 | else | |
17349 | as_basename=false | |
17350 | fi | |
17351 | ||
17352 | ||
17353 | # Name of the executable. | |
b61ff9c8 | 17354 | as_me=`$as_basename "$0" || |
1a4b763e BS |
17355 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
17356 | X"$0" : 'X\(//\)$' \| \ | |
b61ff9c8 BS |
17357 | X"$0" : 'X\(/\)$' \| \ |
17358 | . : '\(.\)' 2>/dev/null || | |
1a4b763e | 17359 | echo X/"$0" | |
b61ff9c8 BS |
17360 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } |
17361 | /^X\/\(\/\/\)$/{ s//\1/; q; } | |
17362 | /^X\/\(\/\).*/{ s//\1/; q; } | |
17363 | s/.*/./; q'` | |
1a4b763e | 17364 | |
b61ff9c8 BS |
17365 | |
17366 | # PATH needs CR, and LINENO needs CR and PATH. | |
17367 | # Avoid depending upon Character Ranges. | |
17368 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
17369 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
17370 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
17371 | as_cr_digits='0123456789' | |
17372 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
17373 | ||
17374 | # The user is always right. | |
17375 | if test "${PATH_SEPARATOR+set}" != set; then | |
17376 | echo "#! /bin/sh" >conf$$.sh | |
17377 | echo "exit 0" >>conf$$.sh | |
17378 | chmod +x conf$$.sh | |
17379 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
17380 | PATH_SEPARATOR=';' | |
17381 | else | |
17382 | PATH_SEPARATOR=: | |
17383 | fi | |
17384 | rm -f conf$$.sh | |
17385 | fi | |
1a4b763e BS |
17386 | |
17387 | ||
b61ff9c8 BS |
17388 | as_lineno_1=$LINENO |
17389 | as_lineno_2=$LINENO | |
17390 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
17391 | test "x$as_lineno_1" != "x$as_lineno_2" && | |
17392 | test "x$as_lineno_3" = "x$as_lineno_2" || { | |
17393 | # Find who we are. Look in the path if we contain no path at all | |
17394 | # relative or not. | |
17395 | case $0 in | |
17396 | *[\\/]* ) as_myself=$0 ;; | |
17397 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17398 | for as_dir in $PATH | |
17399 | do | |
17400 | IFS=$as_save_IFS | |
17401 | test -z "$as_dir" && as_dir=. | |
17402 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
17403 | done | |
1a4b763e | 17404 | |
b61ff9c8 BS |
17405 | ;; |
17406 | esac | |
17407 | # We did not find ourselves, most probably we were run as `sh COMMAND' | |
17408 | # in which case we are not to be found in the path. | |
17409 | if test "x$as_myself" = x; then | |
17410 | as_myself=$0 | |
17411 | fi | |
17412 | if test ! -f "$as_myself"; then | |
17413 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
17414 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
17415 | { (exit 1); exit 1; }; } | |
17416 | fi | |
17417 | case $CONFIG_SHELL in | |
17418 | '') | |
17419 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
17420 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
17421 | do | |
17422 | IFS=$as_save_IFS | |
17423 | test -z "$as_dir" && as_dir=. | |
17424 | for as_base in sh bash ksh sh5; do | |
17425 | case $as_dir in | |
17426 | /*) | |
17427 | if ("$as_dir/$as_base" -c ' | |
8b1f719a PB |
17428 | as_lineno_1=$LINENO |
17429 | as_lineno_2=$LINENO | |
b61ff9c8 | 17430 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` |
8b1f719a | 17431 | test "x$as_lineno_1" != "x$as_lineno_2" && |
b61ff9c8 BS |
17432 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then |
17433 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
17434 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
17435 | CONFIG_SHELL=$as_dir/$as_base | |
17436 | export CONFIG_SHELL | |
17437 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
17438 | fi;; | |
17439 | esac | |
17440 | done | |
17441 | done | |
17442 | ;; | |
17443 | esac | |
ba479fd2 NN |
17444 | |
17445 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
17446 | # uniformly replaced by the line number. The first 'sed' inserts a | |
b61ff9c8 BS |
17447 | # line-number line before each line; the second 'sed' does the real |
17448 | # work. The second script uses 'N' to pair each line-number line | |
17449 | # with the numbered line, and appends trailing '-' during | |
17450 | # substitution so that $LINENO is not a special case at line end. | |
ba479fd2 | 17451 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the |
b61ff9c8 BS |
17452 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) |
17453 | sed '=' <$as_myself | | |
ba479fd2 NN |
17454 | sed ' |
17455 | N | |
b61ff9c8 BS |
17456 | s,$,-, |
17457 | : loop | |
17458 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
ba479fd2 | 17459 | t loop |
b61ff9c8 BS |
17460 | s,-$,, |
17461 | s,^['$as_cr_digits']*\n,, | |
ba479fd2 | 17462 | ' >$as_me.lineno && |
b61ff9c8 BS |
17463 | chmod +x $as_me.lineno || |
17464 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
17465 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
ba479fd2 NN |
17466 | { (exit 1); exit 1; }; } |
17467 | ||
17468 | # Don't try to exec as it changes $[0], causing all sort of problems | |
17469 | # (the dirname of $[0] is not the place where we might find the | |
b61ff9c8 BS |
17470 | # original and so on. Autoconf is especially sensible to this). |
17471 | . ./$as_me.lineno | |
ba479fd2 NN |
17472 | # Exit status is that of the last command. |
17473 | exit | |
17474 | } | |
17475 | ||
17476 | ||
b61ff9c8 BS |
17477 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in |
17478 | *c*,-n*) ECHO_N= ECHO_C=' | |
17479 | ' ECHO_T=' ' ;; | |
17480 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
17481 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
ba479fd2 NN |
17482 | esac |
17483 | ||
b61ff9c8 | 17484 | if expr a : '\(a\)' >/dev/null 2>&1; then |
ba479fd2 NN |
17485 | as_expr=expr |
17486 | else | |
17487 | as_expr=false | |
17488 | fi | |
17489 | ||
17490 | rm -f conf$$ conf$$.exe conf$$.file | |
17491 | echo >conf$$.file | |
17492 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
b61ff9c8 BS |
17493 | # We could just check for DJGPP; but this test a) works b) is more generic |
17494 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
17495 | if test -f conf$$.exe; then | |
17496 | # Don't use ln at all; we don't have any links | |
ba479fd2 | 17497 | as_ln_s='cp -p' |
b61ff9c8 BS |
17498 | else |
17499 | as_ln_s='ln -s' | |
17500 | fi | |
ba479fd2 NN |
17501 | elif ln conf$$.file conf$$ 2>/dev/null; then |
17502 | as_ln_s=ln | |
17503 | else | |
17504 | as_ln_s='cp -p' | |
17505 | fi | |
b61ff9c8 | 17506 | rm -f conf$$ conf$$.exe conf$$.file |
ba479fd2 NN |
17507 | |
17508 | if mkdir -p . 2>/dev/null; then | |
17509 | as_mkdir_p=: | |
17510 | else | |
86da66b5 | 17511 | test -d ./-p && rmdir ./-p |
ba479fd2 NN |
17512 | as_mkdir_p=false |
17513 | fi | |
17514 | ||
b61ff9c8 | 17515 | as_executable_p="test -f" |
ba479fd2 NN |
17516 | |
17517 | # Sed expression to map a string onto a valid CPP name. | |
86da66b5 | 17518 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17519 | |
17520 | # Sed expression to map a string onto a valid variable name. | |
86da66b5 | 17521 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
ba479fd2 NN |
17522 | |
17523 | ||
b61ff9c8 BS |
17524 | # IFS |
17525 | # We need space, tab and new line, in precisely that order. | |
17526 | as_nl=' | |
17527 | ' | |
17528 | IFS=" $as_nl" | |
17529 | ||
17530 | # CDPATH. | |
17531 | $as_unset CDPATH | |
17532 | ||
ba479fd2 NN |
17533 | exec 6>&1 |
17534 | ||
b61ff9c8 | 17535 | # Open the log real soon, to keep \$[0] and so on meaningful, and to |
ba479fd2 | 17536 | # report actual input values of CONFIG_FILES etc. instead of their |
b61ff9c8 BS |
17537 | # values after options handling. Logging --version etc. is OK. |
17538 | exec 5>>config.log | |
17539 | { | |
17540 | echo | |
17541 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
17542 | ## Running $as_me. ## | |
17543 | _ASBOX | |
17544 | } >&5 | |
17545 | cat >&5 <<_CSEOF | |
17546 | ||
ba479fd2 | 17547 | This file was extended by $as_me, which was |
b61ff9c8 | 17548 | generated by GNU Autoconf 2.59. Invocation command line was |
ba479fd2 NN |
17549 | |
17550 | CONFIG_FILES = $CONFIG_FILES | |
17551 | CONFIG_HEADERS = $CONFIG_HEADERS | |
17552 | CONFIG_LINKS = $CONFIG_LINKS | |
17553 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
17554 | $ $0 $@ | |
17555 | ||
b61ff9c8 BS |
17556 | _CSEOF |
17557 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
17558 | echo >&5 | |
ba479fd2 NN |
17559 | _ACEOF |
17560 | ||
17561 | # Files that config.status was made for. | |
b61ff9c8 BS |
17562 | if test -n "$ac_config_files"; then |
17563 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
17564 | fi | |
2f41c1d6 | 17565 | |
b61ff9c8 BS |
17566 | if test -n "$ac_config_headers"; then |
17567 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
17568 | fi | |
17569 | ||
17570 | if test -n "$ac_config_links"; then | |
17571 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
17572 | fi | |
17573 | ||
17574 | if test -n "$ac_config_commands"; then | |
17575 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
17576 | fi | |
ba479fd2 NN |
17577 | |
17578 | cat >>$CONFIG_STATUS <<\_ACEOF | |
b61ff9c8 | 17579 | |
ba479fd2 NN |
17580 | ac_cs_usage="\ |
17581 | \`$as_me' instantiates files from templates according to the | |
17582 | current configuration. | |
17583 | ||
17584 | Usage: $0 [OPTIONS] [FILE]... | |
17585 | ||
17586 | -h, --help print this help, then exit | |
b61ff9c8 | 17587 | -V, --version print version number, then exit |
ba479fd2 NN |
17588 | -q, --quiet do not print progress messages |
17589 | -d, --debug don't remove temporary files | |
17590 | --recheck update $as_me by reconfiguring in the same conditions | |
17591 | --file=FILE[:TEMPLATE] | |
86da66b5 | 17592 | instantiate the configuration file FILE |
ba479fd2 | 17593 | --header=FILE[:TEMPLATE] |
86da66b5 | 17594 | instantiate the configuration header FILE |
ba479fd2 NN |
17595 | |
17596 | Configuration files: | |
17597 | $config_files | |
17598 | ||
17599 | Configuration headers: | |
17600 | $config_headers | |
17601 | ||
17602 | Configuration commands: | |
17603 | $config_commands | |
17604 | ||
17605 | Report bugs to <bug-autoconf@gnu.org>." | |
1a4b763e | 17606 | _ACEOF |
b61ff9c8 | 17607 | |
ba479fd2 NN |
17608 | cat >>$CONFIG_STATUS <<_ACEOF |
17609 | ac_cs_version="\\ | |
17610 | config.status | |
b61ff9c8 BS |
17611 | configured by $0, generated by GNU Autoconf 2.59, |
17612 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" | |
ba479fd2 | 17613 | |
b61ff9c8 | 17614 | Copyright (C) 2003 Free Software Foundation, Inc. |
ba479fd2 NN |
17615 | This config.status script is free software; the Free Software Foundation |
17616 | gives unlimited permission to copy, distribute and modify it." | |
b61ff9c8 | 17617 | srcdir=$srcdir |
ba479fd2 NN |
17618 | _ACEOF |
17619 | ||
17620 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17621 | # If no file are specified by the user, then we need to provide default | |
17622 | # value. By we need to know if files were specified by the user. | |
17623 | ac_need_defaults=: | |
17624 | while test $# != 0 | |
17625 | do | |
17626 | case $1 in | |
17627 | --*=*) | |
b61ff9c8 BS |
17628 | ac_option=`expr "x$1" : 'x\([^=]*\)='` |
17629 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
ba479fd2 NN |
17630 | ac_shift=: |
17631 | ;; | |
b61ff9c8 | 17632 | -*) |
ba479fd2 NN |
17633 | ac_option=$1 |
17634 | ac_optarg=$2 | |
17635 | ac_shift=shift | |
17636 | ;; | |
b61ff9c8 BS |
17637 | *) # This is not an option, so the user has probably given explicit |
17638 | # arguments. | |
17639 | ac_option=$1 | |
17640 | ac_need_defaults=false;; | |
ba479fd2 NN |
17641 | esac |
17642 | ||
17643 | case $ac_option in | |
17644 | # Handling of the options. | |
b61ff9c8 BS |
17645 | _ACEOF |
17646 | cat >>$CONFIG_STATUS <<\_ACEOF | |
ba479fd2 NN |
17647 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
17648 | ac_cs_recheck=: ;; | |
b61ff9c8 BS |
17649 | --version | --vers* | -V ) |
17650 | echo "$ac_cs_version"; exit 0 ;; | |
17651 | --he | --h) | |
17652 | # Conflict between --help and --header | |
17653 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
17654 | Try \`$0 --help' for more information." >&5 | |
17655 | echo "$as_me: error: ambiguous option: $1 | |
17656 | Try \`$0 --help' for more information." >&2;} | |
17657 | { (exit 1); exit 1; }; };; | |
17658 | --help | --hel | -h ) | |
17659 | echo "$ac_cs_usage"; exit 0 ;; | |
17660 | --debug | --d* | -d ) | |
ba479fd2 NN |
17661 | debug=: ;; |
17662 | --file | --fil | --fi | --f ) | |
17663 | $ac_shift | |
17664 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
17665 | ac_need_defaults=false;; | |
17666 | --header | --heade | --head | --hea ) | |
17667 | $ac_shift | |
17668 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
17669 | ac_need_defaults=false;; | |
17670 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
17671 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
17672 | ac_cs_silent=: ;; | |
17673 | ||
17674 | # This is an error. | |
b61ff9c8 BS |
17675 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 |
17676 | Try \`$0 --help' for more information." >&5 | |
17677 | echo "$as_me: error: unrecognized option: $1 | |
17678 | Try \`$0 --help' for more information." >&2;} | |
ba479fd2 NN |
17679 | { (exit 1); exit 1; }; } ;; |
17680 | ||
b61ff9c8 | 17681 | *) ac_config_targets="$ac_config_targets $1" ;; |
ba479fd2 NN |
17682 | |
17683 | esac | |
17684 | shift | |
6e3f3080 | 17685 | done |
ba479fd2 NN |
17686 | |
17687 | ac_configure_extra_args= | |
17688 | ||
17689 | if $ac_cs_silent; then | |
17690 | exec 6>/dev/null | |
17691 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
861bb6c1 JL |
17692 | fi |
17693 | ||
ba479fd2 NN |
17694 | _ACEOF |
17695 | cat >>$CONFIG_STATUS <<_ACEOF | |
17696 | if \$ac_cs_recheck; then | |
b61ff9c8 BS |
17697 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 |
17698 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
ba479fd2 | 17699 | fi |
861bb6c1 | 17700 | |
ba479fd2 NN |
17701 | _ACEOF |
17702 | ||
17703 | cat >>$CONFIG_STATUS <<_ACEOF | |
17704 | # | |
b61ff9c8 | 17705 | # INIT-COMMANDS section. |
ba479fd2 | 17706 | # |
b61ff9c8 | 17707 | |
ba479fd2 | 17708 | subdirs='$subdirs' |
ba479fd2 NN |
17709 | |
17710 | _ACEOF | |
17711 | ||
1a4b763e | 17712 | |
b61ff9c8 BS |
17713 | |
17714 | cat >>$CONFIG_STATUS <<\_ACEOF | |
ba479fd2 NN |
17715 | for ac_config_target in $ac_config_targets |
17716 | do | |
b61ff9c8 BS |
17717 | case "$ac_config_target" in |
17718 | # Handling of arguments. | |
17719 | "as" ) CONFIG_FILES="$CONFIG_FILES as:exec-tool.in" ;; | |
17720 | "collect-ld" ) CONFIG_FILES="$CONFIG_FILES collect-ld:exec-tool.in" ;; | |
17721 | "nm" ) CONFIG_FILES="$CONFIG_FILES nm:exec-tool.in" ;; | |
17722 | "$all_outputs" ) CONFIG_FILES="$CONFIG_FILES $all_outputs" ;; | |
17723 | "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; | |
17724 | "auto-host.h" ) CONFIG_HEADERS="$CONFIG_HEADERS auto-host.h:config.in" ;; | |
ba479fd2 NN |
17725 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 |
17726 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
17727 | { (exit 1); exit 1; }; };; | |
861bb6c1 | 17728 | esac |
ba479fd2 NN |
17729 | done |
17730 | ||
17731 | # If the user did not use the arguments to specify the items to instantiate, | |
17732 | # then the envvar interface is used. Set only those that are not. | |
17733 | # We use the long form for the default assignment because of an extremely | |
17734 | # bizarre bug on SunOS 4.1.3. | |
17735 | if $ac_need_defaults; then | |
17736 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
17737 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
17738 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | |
17739 | fi | |
17740 | ||
17741 | # Have a temporary directory for convenience. Make it in the build tree | |
b61ff9c8 | 17742 | # simply because there is no reason to put it here, and in addition, |
ba479fd2 | 17743 | # creating and moving files from /tmp can sometimes cause problems. |
b61ff9c8 | 17744 | # Create a temporary directory, and hook for its removal unless debugging. |
ba479fd2 NN |
17745 | $debug || |
17746 | { | |
b61ff9c8 | 17747 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 |
ba479fd2 NN |
17748 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
17749 | } | |
b61ff9c8 | 17750 | |
ba479fd2 | 17751 | # Create a (secure) tmp directory for tmp files. |
6e3f3080 | 17752 | |
ba479fd2 | 17753 | { |
b61ff9c8 | 17754 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && |
ba479fd2 NN |
17755 | test -n "$tmp" && test -d "$tmp" |
17756 | } || | |
17757 | { | |
b61ff9c8 BS |
17758 | tmp=./confstat$$-$RANDOM |
17759 | (umask 077 && mkdir $tmp) | |
ba479fd2 NN |
17760 | } || |
17761 | { | |
17762 | echo "$me: cannot create a temporary directory in ." >&2 | |
17763 | { (exit 1); exit 1; } | |
17764 | } | |
17765 | ||
b61ff9c8 BS |
17766 | _ACEOF |
17767 | ||
17768 | cat >>$CONFIG_STATUS <<_ACEOF | |
17769 | ||
ba479fd2 | 17770 | # |
b61ff9c8 | 17771 | # CONFIG_FILES section. |
ba479fd2 NN |
17772 | # |
17773 | ||
17774 | # No need to generate the scripts if there are no CONFIG_FILES. | |
17775 | # This happens for instance when ./config.status config.h | |
b61ff9c8 BS |
17776 | if test -n "\$CONFIG_FILES"; then |
17777 | # Protect against being on the right side of a sed subst in config.status. | |
17778 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
17779 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
17780 | s,@SHELL@,$SHELL,;t t | |
17781 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
17782 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
17783 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
17784 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
17785 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
17786 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
17787 | s,@exec_prefix@,$exec_prefix,;t t | |
17788 | s,@prefix@,$prefix,;t t | |
17789 | s,@program_transform_name@,$program_transform_name,;t t | |
17790 | s,@bindir@,$bindir,;t t | |
17791 | s,@sbindir@,$sbindir,;t t | |
17792 | s,@libexecdir@,$libexecdir,;t t | |
17793 | s,@datadir@,$datadir,;t t | |
17794 | s,@sysconfdir@,$sysconfdir,;t t | |
17795 | s,@sharedstatedir@,$sharedstatedir,;t t | |
17796 | s,@localstatedir@,$localstatedir,;t t | |
17797 | s,@libdir@,$libdir,;t t | |
17798 | s,@includedir@,$includedir,;t t | |
17799 | s,@oldincludedir@,$oldincludedir,;t t | |
17800 | s,@infodir@,$infodir,;t t | |
17801 | s,@mandir@,$mandir,;t t | |
17802 | s,@build_alias@,$build_alias,;t t | |
17803 | s,@host_alias@,$host_alias,;t t | |
17804 | s,@target_alias@,$target_alias,;t t | |
17805 | s,@DEFS@,$DEFS,;t t | |
17806 | s,@ECHO_C@,$ECHO_C,;t t | |
17807 | s,@ECHO_N@,$ECHO_N,;t t | |
17808 | s,@ECHO_T@,$ECHO_T,;t t | |
17809 | s,@LIBS@,$LIBS,;t t | |
17810 | s,@build@,$build,;t t | |
17811 | s,@build_cpu@,$build_cpu,;t t | |
17812 | s,@build_vendor@,$build_vendor,;t t | |
17813 | s,@build_os@,$build_os,;t t | |
17814 | s,@host@,$host,;t t | |
17815 | s,@host_cpu@,$host_cpu,;t t | |
17816 | s,@host_vendor@,$host_vendor,;t t | |
17817 | s,@host_os@,$host_os,;t t | |
17818 | s,@target@,$target,;t t | |
17819 | s,@target_cpu@,$target_cpu,;t t | |
17820 | s,@target_vendor@,$target_vendor,;t t | |
17821 | s,@target_os@,$target_os,;t t | |
17822 | s,@target_noncanonical@,$target_noncanonical,;t t | |
17823 | s,@build_libsubdir@,$build_libsubdir,;t t | |
17824 | s,@build_subdir@,$build_subdir,;t t | |
17825 | s,@host_subdir@,$host_subdir,;t t | |
17826 | s,@target_subdir@,$target_subdir,;t t | |
17827 | s,@GENINSRC@,$GENINSRC,;t t | |
17828 | s,@CC@,$CC,;t t | |
17829 | s,@CFLAGS@,$CFLAGS,;t t | |
17830 | s,@LDFLAGS@,$LDFLAGS,;t t | |
17831 | s,@CPPFLAGS@,$CPPFLAGS,;t t | |
17832 | s,@ac_ct_CC@,$ac_ct_CC,;t t | |
17833 | s,@EXEEXT@,$EXEEXT,;t t | |
17834 | s,@OBJEXT@,$OBJEXT,;t t | |
17835 | s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t | |
17836 | s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t | |
17837 | s,@CPP@,$CPP,;t t | |
17838 | s,@EGREP@,$EGREP,;t t | |
17839 | s,@loose_warn@,$loose_warn,;t t | |
17840 | s,@cxx_compat_warn@,$cxx_compat_warn,;t t | |
17841 | s,@strict_warn@,$strict_warn,;t t | |
17842 | s,@warn_cflags@,$warn_cflags,;t t | |
17843 | s,@nocommon_flag@,$nocommon_flag,;t t | |
17844 | s,@TREEBROWSER@,$TREEBROWSER,;t t | |
17845 | s,@valgrind_path@,$valgrind_path,;t t | |
17846 | s,@valgrind_path_defines@,$valgrind_path_defines,;t t | |
17847 | s,@valgrind_command@,$valgrind_command,;t t | |
17848 | s,@coverage_flags@,$coverage_flags,;t t | |
17849 | s,@enable_multilib@,$enable_multilib,;t t | |
17850 | s,@enable_decimal_float@,$enable_decimal_float,;t t | |
17851 | s,@enable_fixed_point@,$enable_fixed_point,;t t | |
17852 | s,@enable_shared@,$enable_shared,;t t | |
17853 | s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t | |
17854 | s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t | |
17855 | s,@CROSS_SYSTEM_HEADER_DIR@,$CROSS_SYSTEM_HEADER_DIR,;t t | |
17856 | s,@onestep@,$onestep,;t t | |
17857 | s,@PKGVERSION@,$PKGVERSION,;t t | |
17858 | s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t | |
17859 | s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t | |
17860 | s,@datarootdir@,$datarootdir,;t t | |
17861 | s,@docdir@,$docdir,;t t | |
17862 | s,@htmldir@,$htmldir,;t t | |
17863 | s,@SET_MAKE@,$SET_MAKE,;t t | |
17864 | s,@AWK@,$AWK,;t t | |
17865 | s,@LN_S@,$LN_S,;t t | |
17866 | s,@LN@,$LN,;t t | |
17867 | s,@RANLIB@,$RANLIB,;t t | |
17868 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
17869 | s,@ranlib_flags@,$ranlib_flags,;t t | |
17870 | s,@INSTALL@,$INSTALL,;t t | |
17871 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
17872 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
17873 | s,@make_compare_target@,$make_compare_target,;t t | |
17874 | s,@have_mktemp_command@,$have_mktemp_command,;t t | |
17875 | s,@MAKEINFO@,$MAKEINFO,;t t | |
17876 | s,@BUILD_INFO@,$BUILD_INFO,;t t | |
17877 | s,@GENERATED_MANPAGES@,$GENERATED_MANPAGES,;t t | |
17878 | s,@FLEX@,$FLEX,;t t | |
17879 | s,@BISON@,$BISON,;t t | |
17880 | s,@NM@,$NM,;t t | |
17881 | s,@AR@,$AR,;t t | |
17882 | s,@COLLECT2_LIBS@,$COLLECT2_LIBS,;t t | |
17883 | s,@GNAT_LIBEXC@,$GNAT_LIBEXC,;t t | |
17884 | s,@LDEXP_LIB@,$LDEXP_LIB,;t t | |
17885 | s,@TARGET_GETGROUPS_T@,$TARGET_GETGROUPS_T,;t t | |
17886 | s,@LIBICONV@,$LIBICONV,;t t | |
17887 | s,@LTLIBICONV@,$LTLIBICONV,;t t | |
17888 | s,@LIBICONV_DEP@,$LIBICONV_DEP,;t t | |
17889 | s,@manext@,$manext,;t t | |
17890 | s,@objext@,$objext,;t t | |
17891 | s,@gthread_flags@,$gthread_flags,;t t | |
17892 | s,@extra_modes_file@,$extra_modes_file,;t t | |
17893 | s,@extra_opt_files@,$extra_opt_files,;t t | |
17894 | s,@USE_NLS@,$USE_NLS,;t t | |
17895 | s,@LIBINTL@,$LIBINTL,;t t | |
17896 | s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t | |
17897 | s,@INCINTL@,$INCINTL,;t t | |
17898 | s,@XGETTEXT@,$XGETTEXT,;t t | |
17899 | s,@GMSGFMT@,$GMSGFMT,;t t | |
17900 | s,@POSUB@,$POSUB,;t t | |
17901 | s,@CATALOGS@,$CATALOGS,;t t | |
17902 | s,@DATADIRNAME@,$DATADIRNAME,;t t | |
17903 | s,@INSTOBJEXT@,$INSTOBJEXT,;t t | |
17904 | s,@GENCAT@,$GENCAT,;t t | |
17905 | s,@CATOBJEXT@,$CATOBJEXT,;t t | |
17906 | s,@host_cc_for_libada@,$host_cc_for_libada,;t t | |
17907 | s,@CROSS@,$CROSS,;t t | |
17908 | s,@ALL@,$ALL,;t t | |
17909 | s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR,;t t | |
17910 | s,@inhibit_libc@,$inhibit_libc,;t t | |
17911 | s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t | |
17912 | s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t | |
17913 | s,@STMP_FIXINC@,$STMP_FIXINC,;t t | |
17914 | s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t | |
17915 | s,@collect2@,$collect2,;t t | |
17916 | s,@gcc_cv_as@,$gcc_cv_as,;t t | |
17917 | s,@ORIGINAL_AS_FOR_TARGET@,$ORIGINAL_AS_FOR_TARGET,;t t | |
17918 | s,@gcc_cv_ld@,$gcc_cv_ld,;t t | |
17919 | s,@ORIGINAL_LD_FOR_TARGET@,$ORIGINAL_LD_FOR_TARGET,;t t | |
17920 | s,@gcc_cv_nm@,$gcc_cv_nm,;t t | |
17921 | s,@ORIGINAL_NM_FOR_TARGET@,$ORIGINAL_NM_FOR_TARGET,;t t | |
17922 | s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t | |
17923 | s,@libgcc_visibility@,$libgcc_visibility,;t t | |
17924 | s,@GGC@,$GGC,;t t | |
17925 | s,@zlibdir@,$zlibdir,;t t | |
17926 | s,@zlibinc@,$zlibinc,;t t | |
17927 | s,@MAINT@,$MAINT,;t t | |
17928 | s,@gcc_tooldir@,$gcc_tooldir,;t t | |
17929 | s,@dollar@,$dollar,;t t | |
17930 | s,@slibdir@,$slibdir,;t t | |
17931 | s,@objdir@,$objdir,;t t | |
17932 | s,@subdirs@,$subdirs,;t t | |
17933 | s,@srcdir@,$srcdir,;t t | |
17934 | s,@all_compilers@,$all_compilers,;t t | |
17935 | s,@all_gtfiles@,$all_gtfiles,;t t | |
17936 | s,@all_lang_makefrags@,$all_lang_makefrags,;t t | |
17937 | s,@all_lang_makefiles@,$all_lang_makefiles,;t t | |
17938 | s,@all_languages@,$all_languages,;t t | |
17939 | s,@all_selected_languages@,$all_selected_languages,;t t | |
17940 | s,@build_exeext@,$build_exeext,;t t | |
17941 | s,@build_install_headers_dir@,$build_install_headers_dir,;t t | |
17942 | s,@build_xm_file_list@,$build_xm_file_list,;t t | |
17943 | s,@build_xm_include_list@,$build_xm_include_list,;t t | |
17944 | s,@build_xm_defines@,$build_xm_defines,;t t | |
17945 | s,@check_languages@,$check_languages,;t t | |
17946 | s,@cpp_install_dir@,$cpp_install_dir,;t t | |
17947 | s,@xmake_file@,$xmake_file,;t t | |
17948 | s,@tmake_file@,$tmake_file,;t t | |
17949 | s,@extra_gcc_objs@,$extra_gcc_objs,;t t | |
17950 | s,@extra_headers_list@,$extra_headers_list,;t t | |
17951 | s,@extra_objs@,$extra_objs,;t t | |
17952 | s,@extra_parts@,$extra_parts,;t t | |
17953 | s,@extra_passes@,$extra_passes,;t t | |
17954 | s,@extra_programs@,$extra_programs,;t t | |
17955 | s,@float_h_file@,$float_h_file,;t t | |
17956 | s,@gcc_config_arguments@,$gcc_config_arguments,;t t | |
17957 | s,@gcc_gxx_include_dir@,$gcc_gxx_include_dir,;t t | |
17958 | s,@host_exeext@,$host_exeext,;t t | |
17959 | s,@host_xm_file_list@,$host_xm_file_list,;t t | |
17960 | s,@host_xm_include_list@,$host_xm_include_list,;t t | |
17961 | s,@host_xm_defines@,$host_xm_defines,;t t | |
17962 | s,@out_host_hook_obj@,$out_host_hook_obj,;t t | |
17963 | s,@install@,$install,;t t | |
17964 | s,@lang_opt_files@,$lang_opt_files,;t t | |
17965 | s,@lang_specs_files@,$lang_specs_files,;t t | |
17966 | s,@lang_tree_files@,$lang_tree_files,;t t | |
17967 | s,@local_prefix@,$local_prefix,;t t | |
17968 | s,@md_file@,$md_file,;t t | |
17969 | s,@objc_boehm_gc@,$objc_boehm_gc,;t t | |
17970 | s,@out_file@,$out_file,;t t | |
17971 | s,@out_object_file@,$out_object_file,;t t | |
17972 | s,@thread_file@,$thread_file,;t t | |
17973 | s,@tm_file_list@,$tm_file_list,;t t | |
17974 | s,@tm_include_list@,$tm_include_list,;t t | |
17975 | s,@tm_defines@,$tm_defines,;t t | |
17976 | s,@tm_p_file_list@,$tm_p_file_list,;t t | |
17977 | s,@tm_p_include_list@,$tm_p_include_list,;t t | |
17978 | s,@xm_file_list@,$xm_file_list,;t t | |
17979 | s,@xm_include_list@,$xm_include_list,;t t | |
17980 | s,@xm_defines@,$xm_defines,;t t | |
17981 | s,@c_target_objs@,$c_target_objs,;t t | |
17982 | s,@cxx_target_objs@,$cxx_target_objs,;t t | |
17983 | s,@target_cpu_default@,$target_cpu_default,;t t | |
17984 | s,@GMPLIBS@,$GMPLIBS,;t t | |
17985 | s,@GMPINC@,$GMPINC,;t t | |
17986 | s,@LIBOBJS@,$LIBOBJS,;t t | |
17987 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
17988 | /@language_hooks@/r $language_hooks | |
17989 | s,@language_hooks@,,;t t | |
17990 | CEOF | |
17991 | ||
17992 | _ACEOF | |
17993 | ||
17994 | cat >>$CONFIG_STATUS <<\_ACEOF | |
17995 | # Split the substitutions into bite-sized pieces for seds with | |
17996 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
17997 | ac_max_sed_lines=48 | |
17998 | ac_sed_frag=1 # Number of current file. | |
17999 | ac_beg=1 # First line for current file. | |
18000 | ac_end=$ac_max_sed_lines # Line after last line for current file. | |
18001 | ac_more_lines=: | |
18002 | ac_sed_cmds= | |
18003 | while $ac_more_lines; do | |
18004 | if test $ac_beg -gt 1; then | |
18005 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
18006 | else | |
18007 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
18008 | fi | |
18009 | if test ! -s $tmp/subs.frag; then | |
18010 | ac_more_lines=false | |
18011 | else | |
18012 | # The purpose of the label and of the branching condition is to | |
18013 | # speed up the sed processing (if there are no `@' at all, there | |
18014 | # is no need to browse any of the substitutions). | |
18015 | # These are the two extra sed commands mentioned above. | |
18016 | (echo ':t | |
18017 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
18018 | if test -z "$ac_sed_cmds"; then | |
18019 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" | |
18020 | else | |
18021 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" | |
18022 | fi | |
18023 | ac_sed_frag=`expr $ac_sed_frag + 1` | |
18024 | ac_beg=$ac_end | |
18025 | ac_end=`expr $ac_end + $ac_max_sed_lines` | |
18026 | fi | |
18027 | done | |
18028 | if test -z "$ac_sed_cmds"; then | |
18029 | ac_sed_cmds=cat | |
1a4b763e | 18030 | fi |
b61ff9c8 | 18031 | fi # test -n "$CONFIG_FILES" |
1a4b763e | 18032 | |
1a4b763e | 18033 | _ACEOF |
ba479fd2 | 18034 | cat >>$CONFIG_STATUS <<\_ACEOF |
b61ff9c8 BS |
18035 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue |
18036 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
18037 | case $ac_file in | |
18038 | - | *:- | *:-:* ) # input from stdin | |
18039 | cat >$tmp/stdin | |
18040 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
18041 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
18042 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
18043 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
18044 | * ) ac_file_in=$ac_file.in ;; | |
703d89ab ZW |
18045 | esac |
18046 | ||
b61ff9c8 BS |
18047 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. |
18048 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
ba479fd2 | 18049 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18050 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
18051 | X"$ac_file" : 'X\(//\)$' \| \ | |
b61ff9c8 BS |
18052 | X"$ac_file" : 'X\(/\)' \| \ |
18053 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 | 18054 | echo X"$ac_file" | |
b61ff9c8 BS |
18055 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
18056 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18057 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18058 | /^X\(\/\).*/{ s//\1/; q; } | |
18059 | s/.*/./; q'` | |
18060 | { if $as_mkdir_p; then | |
18061 | mkdir -p "$ac_dir" | |
18062 | else | |
18063 | as_dir="$ac_dir" | |
ba479fd2 | 18064 | as_dirs= |
b61ff9c8 BS |
18065 | while test ! -d "$as_dir"; do |
18066 | as_dirs="$as_dir $as_dirs" | |
18067 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
ba479fd2 | 18068 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
86da66b5 HPN |
18069 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
18070 | X"$as_dir" : 'X\(//\)$' \| \ | |
b61ff9c8 BS |
18071 | X"$as_dir" : 'X\(/\)' \| \ |
18072 | . : '\(.\)' 2>/dev/null || | |
ba479fd2 | 18073 | echo X"$as_dir" | |
b61ff9c8 BS |
18074 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } |
18075 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18076 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18077 | /^X\(\/\).*/{ s//\1/; q; } | |
18078 | s/.*/./; q'` | |
ba479fd2 | 18079 | done |
b61ff9c8 BS |
18080 | test ! -n "$as_dirs" || mkdir $as_dirs |
18081 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
18082 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
ba479fd2 | 18083 | { (exit 1); exit 1; }; }; } |
b61ff9c8 | 18084 | |
ba479fd2 NN |
18085 | ac_builddir=. |
18086 | ||
b61ff9c8 | 18087 | if test "$ac_dir" != .; then |
ba479fd2 | 18088 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` |
b61ff9c8 BS |
18089 | # A "../" for each directory in $ac_dir_suffix. |
18090 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
18091 | else | |
18092 | ac_dir_suffix= ac_top_builddir= | |
18093 | fi | |
ba479fd2 NN |
18094 | |
18095 | case $srcdir in | |
b61ff9c8 | 18096 | .) # No --srcdir option. We are building in place. |
ba479fd2 | 18097 | ac_srcdir=. |
b61ff9c8 BS |
18098 | if test -z "$ac_top_builddir"; then |
18099 | ac_top_srcdir=. | |
18100 | else | |
18101 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
18102 | fi ;; | |
18103 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
ba479fd2 | 18104 | ac_srcdir=$srcdir$ac_dir_suffix; |
b61ff9c8 BS |
18105 | ac_top_srcdir=$srcdir ;; |
18106 | *) # Relative path. | |
18107 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
18108 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
ba479fd2 | 18109 | esac |
ba479fd2 | 18110 | |
b61ff9c8 BS |
18111 | # Do not use `cd foo && pwd` to compute absolute paths, because |
18112 | # the directories may not exist. | |
18113 | case `pwd` in | |
18114 | .) ac_abs_builddir="$ac_dir";; | |
18115 | *) | |
18116 | case "$ac_dir" in | |
18117 | .) ac_abs_builddir=`pwd`;; | |
18118 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
18119 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
18120 | esac;; | |
18121 | esac | |
18122 | case $ac_abs_builddir in | |
18123 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
18124 | *) | |
18125 | case ${ac_top_builddir}. in | |
18126 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
18127 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
18128 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
18129 | esac;; | |
18130 | esac | |
18131 | case $ac_abs_builddir in | |
18132 | .) ac_abs_srcdir=$ac_srcdir;; | |
18133 | *) | |
18134 | case $ac_srcdir in | |
18135 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
18136 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
18137 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
18138 | esac;; | |
18139 | esac | |
18140 | case $ac_abs_builddir in | |
18141 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
18142 | *) | |
18143 | case $ac_top_srcdir in | |
18144 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
18145 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
18146 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
18147 | esac;; | |
18148 | esac | |
703d89ab | 18149 | |
ab22c1fa | 18150 | |
1a4b763e | 18151 | |
b61ff9c8 BS |
18152 | if test x"$ac_file" != x-; then |
18153 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
18154 | echo "$as_me: creating $ac_file" >&6;} | |
18155 | rm -f "$ac_file" | |
18156 | fi | |
18157 | # Let's still pretend it is `configure' which instantiates (i.e., don't | |
18158 | # use $as_me), people would be surprised to read: | |
18159 | # /* config.h. Generated by config.status. */ | |
18160 | if test x"$ac_file" = x-; then | |
18161 | configure_input= | |
18162 | else | |
18163 | configure_input="$ac_file. " | |
18164 | fi | |
18165 | configure_input=$configure_input"Generated from `echo $ac_file_in | | |
18166 | sed 's,.*/,,'` by configure." | |
18167 | ||
18168 | # First look for the input files in the build tree, otherwise in the | |
18169 | # src tree. | |
18170 | ac_file_inputs=`IFS=: | |
18171 | for f in $ac_file_in; do | |
18172 | case $f in | |
18173 | -) echo $tmp/stdin ;; | |
18174 | [\\/$]*) | |
18175 | # Absolute (can't be DOS-style, as IFS=:) | |
18176 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
18177 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
18178 | { (exit 1); exit 1; }; } | |
18179 | echo "$f";; | |
18180 | *) # Relative | |
18181 | if test -f "$f"; then | |
18182 | # Build tree | |
18183 | echo "$f" | |
18184 | elif test -f "$srcdir/$f"; then | |
18185 | # Source tree | |
18186 | echo "$srcdir/$f" | |
18187 | else | |
18188 | # /dev/null tree | |
18189 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
18190 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
18191 | { (exit 1); exit 1; }; } | |
18192 | fi;; | |
18193 | esac | |
18194 | done` || { (exit 1); exit 1; } | |
a6ccdbab | 18195 | _ACEOF |
ba479fd2 NN |
18196 | cat >>$CONFIG_STATUS <<_ACEOF |
18197 | sed "$ac_vpsub | |
18198 | $extrasub | |
18199 | _ACEOF | |
18200 | cat >>$CONFIG_STATUS <<\_ACEOF | |
18201 | :t | |
18202 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
b61ff9c8 BS |
18203 | s,@configure_input@,$configure_input,;t t |
18204 | s,@srcdir@,$ac_srcdir,;t t | |
18205 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
18206 | s,@top_srcdir@,$ac_top_srcdir,;t t | |
18207 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
18208 | s,@builddir@,$ac_builddir,;t t | |
18209 | s,@abs_builddir@,$ac_abs_builddir,;t t | |
18210 | s,@top_builddir@,$ac_top_builddir,;t t | |
18211 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
18212 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
18213 | rm -f $tmp/stdin | |
18214 | if test x"$ac_file" != x-; then | |
18215 | mv $tmp/out $ac_file | |
18216 | else | |
18217 | cat $tmp/out | |
18218 | rm -f $tmp/out | |
18219 | fi | |
18220 | ||
18221 | # Run the commands associated with the file. | |
be0fe523 | 18222 | case $ac_file in |
b61ff9c8 BS |
18223 | as ) chmod +x as ;; |
18224 | collect-ld ) chmod +x collect-ld ;; | |
18225 | nm ) chmod +x nm ;; | |
be0fe523 | 18226 | esac |
b61ff9c8 BS |
18227 | done |
18228 | _ACEOF | |
18229 | cat >>$CONFIG_STATUS <<\_ACEOF | |
18230 | ||
18231 | # | |
18232 | # CONFIG_HEADER section. | |
18233 | # | |
18234 | ||
18235 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
18236 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
18237 | # | |
18238 | # ac_d sets the value in "#define NAME VALUE" lines. | |
18239 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
18240 | ac_dB='[ ].*$,\1#\2' | |
a3bba767 | 18241 | ac_dC=' ' |
b61ff9c8 BS |
18242 | ac_dD=',;t' |
18243 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
18244 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
18245 | ac_uB='$,\1#\2define\3' | |
18246 | ac_uC=' ' | |
18247 | ac_uD=',;t' | |
18248 | ||
18249 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
18250 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
18251 | case $ac_file in | |
18252 | - | *:- | *:-:* ) # input from stdin | |
18253 | cat >$tmp/stdin | |
18254 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
18255 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
18256 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
18257 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
18258 | * ) ac_file_in=$ac_file.in ;; | |
18259 | esac | |
18260 | ||
18261 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
18262 | echo "$as_me: creating $ac_file" >&6;} | |
18263 | ||
18264 | # First look for the input files in the build tree, otherwise in the | |
18265 | # src tree. | |
18266 | ac_file_inputs=`IFS=: | |
18267 | for f in $ac_file_in; do | |
18268 | case $f in | |
18269 | -) echo $tmp/stdin ;; | |
18270 | [\\/$]*) | |
18271 | # Absolute (can't be DOS-style, as IFS=:) | |
18272 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
18273 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
18274 | { (exit 1); exit 1; }; } | |
18275 | # Do quote $f, to prevent DOS paths from being IFS'd. | |
18276 | echo "$f";; | |
18277 | *) # Relative | |
18278 | if test -f "$f"; then | |
18279 | # Build tree | |
18280 | echo "$f" | |
18281 | elif test -f "$srcdir/$f"; then | |
18282 | # Source tree | |
18283 | echo "$srcdir/$f" | |
18284 | else | |
18285 | # /dev/null tree | |
18286 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
18287 | echo "$as_me: error: cannot find input file: $f" >&2;} | |
18288 | { (exit 1); exit 1; }; } | |
18289 | fi;; | |
18290 | esac | |
18291 | done` || { (exit 1); exit 1; } | |
18292 | # Remove the trailing spaces. | |
18293 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in | |
18294 | ||
18295 | _ACEOF | |
18296 | ||
18297 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | |
18298 | # `conftest.undefs', that substitutes the proper values into | |
18299 | # config.h.in to produce config.h. The first handles `#define' | |
18300 | # templates, and the second `#undef' templates. | |
18301 | # And first: Protect against being on the right side of a sed subst in | |
18302 | # config.status. Protect against being in an unquoted here document | |
18303 | # in config.status. | |
18304 | rm -f conftest.defines conftest.undefs | |
18305 | # Using a here document instead of a string reduces the quoting nightmare. | |
18306 | # Putting comments in sed scripts is not portable. | |
18307 | # | |
18308 | # `end' is used to avoid that the second main sed command (meant for | |
18309 | # 0-ary CPP macros) applies to n-ary macro definitions. | |
18310 | # See the Autoconf documentation for `clear'. | |
18311 | cat >confdef2sed.sed <<\_ACEOF | |
18312 | s/[\\&,]/\\&/g | |
18313 | s,[\\$`],\\&,g | |
18314 | t clear | |
18315 | : clear | |
18316 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp | |
18317 | t end | |
18318 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp | |
18319 | : end | |
18320 | _ACEOF | |
18321 | # If some macros were called several times there might be several times | |
18322 | # the same #defines, which is useless. Nevertheless, we may not want to | |
18323 | # sort them, since we want the *last* AC-DEFINE to be honored. | |
18324 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
18325 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
18326 | rm -f confdef2sed.sed | |
18327 | ||
18328 | # This sed command replaces #undef with comments. This is necessary, for | |
861bb6c1 JL |
18329 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
18330 | # on some systems where configure will not decide to define it. | |
b61ff9c8 BS |
18331 | cat >>conftest.undefs <<\_ACEOF |
18332 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, | |
18333 | _ACEOF | |
18334 | ||
18335 | # Break up conftest.defines because some shells have a limit on the size | |
18336 | # of here documents, and old seds have small limits too (100 cmds). | |
18337 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
18338 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS | |
18339 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS | |
18340 | echo ' :' >>$CONFIG_STATUS | |
18341 | rm -f conftest.tail | |
18342 | while grep . conftest.defines >/dev/null | |
ba479fd2 | 18343 | do |
b61ff9c8 BS |
18344 | # Write a limited-size here document to $tmp/defines.sed. |
18345 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
18346 | # Speed up: don't consider the non `#define' lines. | |
18347 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS | |
18348 | # Work around the forget-to-reset-the-flag bug. | |
18349 | echo 't clr' >>$CONFIG_STATUS | |
18350 | echo ': clr' >>$CONFIG_STATUS | |
18351 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
ba479fd2 | 18352 | echo 'CEOF |
b61ff9c8 BS |
18353 | sed -f $tmp/defines.sed $tmp/in >$tmp/out |
18354 | rm -f $tmp/in | |
18355 | mv $tmp/out $tmp/in | |
18356 | ' >>$CONFIG_STATUS | |
18357 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
ba479fd2 NN |
18358 | rm -f conftest.defines |
18359 | mv conftest.tail conftest.defines | |
18360 | done | |
b61ff9c8 BS |
18361 | rm -f conftest.defines |
18362 | echo ' fi # grep' >>$CONFIG_STATUS | |
18363 | echo >>$CONFIG_STATUS | |
18364 | ||
18365 | # Break up conftest.undefs because some shells have a limit on the size | |
18366 | # of here documents, and old seds have small limits too (100 cmds). | |
18367 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
18368 | rm -f conftest.tail | |
18369 | while grep . conftest.undefs >/dev/null | |
18370 | do | |
18371 | # Write a limited-size here document to $tmp/undefs.sed. | |
18372 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
18373 | # Speed up: don't consider the non `#undef' | |
18374 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS | |
18375 | # Work around the forget-to-reset-the-flag bug. | |
18376 | echo 't clr' >>$CONFIG_STATUS | |
18377 | echo ': clr' >>$CONFIG_STATUS | |
18378 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
18379 | echo 'CEOF | |
18380 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out | |
18381 | rm -f $tmp/in | |
18382 | mv $tmp/out $tmp/in | |
18383 | ' >>$CONFIG_STATUS | |
18384 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
18385 | rm -f conftest.undefs | |
18386 | mv conftest.tail conftest.undefs | |
18387 | done | |
18388 | rm -f conftest.undefs | |
ba479fd2 NN |
18389 | |
18390 | cat >>$CONFIG_STATUS <<\_ACEOF | |
b61ff9c8 BS |
18391 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
18392 | # use $as_me), people would be surprised to read: | |
18393 | # /* config.h. Generated by config.status. */ | |
18394 | if test x"$ac_file" = x-; then | |
18395 | echo "/* Generated by configure. */" >$tmp/config.h | |
18396 | else | |
18397 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h | |
18398 | fi | |
18399 | cat $tmp/in >>$tmp/config.h | |
18400 | rm -f $tmp/in | |
ba479fd2 | 18401 | if test x"$ac_file" != x-; then |
b61ff9c8 | 18402 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then |
ba479fd2 NN |
18403 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 |
18404 | echo "$as_me: $ac_file is unchanged" >&6;} | |
18405 | else | |
b61ff9c8 BS |
18406 | ac_dir=`(dirname "$ac_file") 2>/dev/null || |
18407 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18408 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
18409 | X"$ac_file" : 'X\(//\)$' \| \ | |
18410 | X"$ac_file" : 'X\(/\)' \| \ | |
18411 | . : '\(.\)' 2>/dev/null || | |
18412 | echo X"$ac_file" | | |
18413 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
18414 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18415 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18416 | /^X\(\/\).*/{ s//\1/; q; } | |
18417 | s/.*/./; q'` | |
18418 | { if $as_mkdir_p; then | |
18419 | mkdir -p "$ac_dir" | |
18420 | else | |
18421 | as_dir="$ac_dir" | |
18422 | as_dirs= | |
18423 | while test ! -d "$as_dir"; do | |
18424 | as_dirs="$as_dir $as_dirs" | |
18425 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
18426 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18427 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18428 | X"$as_dir" : 'X\(//\)$' \| \ | |
18429 | X"$as_dir" : 'X\(/\)' \| \ | |
18430 | . : '\(.\)' 2>/dev/null || | |
18431 | echo X"$as_dir" | | |
18432 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
18433 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18434 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18435 | /^X\(\/\).*/{ s//\1/; q; } | |
18436 | s/.*/./; q'` | |
18437 | done | |
18438 | test ! -n "$as_dirs" || mkdir $as_dirs | |
18439 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
18440 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
18441 | { (exit 1); exit 1; }; }; } | |
18442 | ||
ba479fd2 | 18443 | rm -f $ac_file |
b61ff9c8 | 18444 | mv $tmp/config.h $ac_file |
ba479fd2 NN |
18445 | fi |
18446 | else | |
b61ff9c8 BS |
18447 | cat $tmp/config.h |
18448 | rm -f $tmp/config.h | |
ba479fd2 | 18449 | fi |
b61ff9c8 BS |
18450 | done |
18451 | _ACEOF | |
18452 | cat >>$CONFIG_STATUS <<\_ACEOF | |
2f41c1d6 | 18453 | |
b61ff9c8 BS |
18454 | # |
18455 | # CONFIG_COMMANDS section. | |
18456 | # | |
18457 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | |
18458 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | |
18459 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
18460 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | |
18461 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18462 | X"$ac_dest" : 'X\(//\)[^/]' \| \ | |
18463 | X"$ac_dest" : 'X\(//\)$' \| \ | |
18464 | X"$ac_dest" : 'X\(/\)' \| \ | |
18465 | . : '\(.\)' 2>/dev/null || | |
18466 | echo X"$ac_dest" | | |
18467 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
18468 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18469 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18470 | /^X\(\/\).*/{ s//\1/; q; } | |
18471 | s/.*/./; q'` | |
18472 | { if $as_mkdir_p; then | |
18473 | mkdir -p "$ac_dir" | |
18474 | else | |
18475 | as_dir="$ac_dir" | |
18476 | as_dirs= | |
18477 | while test ! -d "$as_dir"; do | |
18478 | as_dirs="$as_dir $as_dirs" | |
18479 | as_dir=`(dirname "$as_dir") 2>/dev/null || | |
18480 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
18481 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
18482 | X"$as_dir" : 'X\(//\)$' \| \ | |
18483 | X"$as_dir" : 'X\(/\)' \| \ | |
18484 | . : '\(.\)' 2>/dev/null || | |
18485 | echo X"$as_dir" | | |
18486 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
18487 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
18488 | /^X\(\/\/\)$/{ s//\1/; q; } | |
18489 | /^X\(\/\).*/{ s//\1/; q; } | |
18490 | s/.*/./; q'` | |
18491 | done | |
18492 | test ! -n "$as_dirs" || mkdir $as_dirs | |
18493 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
18494 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
18495 | { (exit 1); exit 1; }; }; } | |
2f41c1d6 | 18496 | |
b61ff9c8 | 18497 | ac_builddir=. |
2f41c1d6 | 18498 | |
b61ff9c8 BS |
18499 | if test "$ac_dir" != .; then |
18500 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
18501 | # A "../" for each directory in $ac_dir_suffix. | |
18502 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
18503 | else | |
18504 | ac_dir_suffix= ac_top_builddir= | |
18505 | fi | |
18506 | ||
18507 | case $srcdir in | |
18508 | .) # No --srcdir option. We are building in place. | |
18509 | ac_srcdir=. | |
18510 | if test -z "$ac_top_builddir"; then | |
18511 | ac_top_srcdir=. | |
18512 | else | |
18513 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
18514 | fi ;; | |
18515 | [\\/]* | ?:[\\/]* ) # Absolute path. | |
18516 | ac_srcdir=$srcdir$ac_dir_suffix; | |
18517 | ac_top_srcdir=$srcdir ;; | |
18518 | *) # Relative path. | |
18519 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
18520 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
18521 | esac | |
18522 | ||
18523 | # Do not use `cd foo && pwd` to compute absolute paths, because | |
18524 | # the directories may not exist. | |
18525 | case `pwd` in | |
18526 | .) ac_abs_builddir="$ac_dir";; | |
18527 | *) | |
18528 | case "$ac_dir" in | |
18529 | .) ac_abs_builddir=`pwd`;; | |
18530 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
18531 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
18532 | esac;; | |
18533 | esac | |
18534 | case $ac_abs_builddir in | |
18535 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | |
18536 | *) | |
18537 | case ${ac_top_builddir}. in | |
18538 | .) ac_abs_top_builddir=$ac_abs_builddir;; | |
18539 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
18540 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
18541 | esac;; | |
18542 | esac | |
18543 | case $ac_abs_builddir in | |
18544 | .) ac_abs_srcdir=$ac_srcdir;; | |
18545 | *) | |
18546 | case $ac_srcdir in | |
18547 | .) ac_abs_srcdir=$ac_abs_builddir;; | |
18548 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
18549 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
18550 | esac;; | |
18551 | esac | |
18552 | case $ac_abs_builddir in | |
18553 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | |
18554 | *) | |
18555 | case $ac_top_srcdir in | |
18556 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
18557 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
18558 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
18559 | esac;; | |
18560 | esac | |
18561 | ||
18562 | ||
18563 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | |
18564 | echo "$as_me: executing $ac_dest commands" >&6;} | |
18565 | case $ac_dest in | |
18566 | default ) | |
f1faaabd NN |
18567 | case ${CONFIG_HEADERS} in |
18568 | *auto-host.h:config.in*) | |
18569 | echo > cstamp-h ;; | |
861bb6c1 | 18570 | esac |
2ed26f6b | 18571 | # Make sure all the subdirs exist. |
3b620440 | 18572 | for d in $subdirs doc build |
2ed26f6b | 18573 | do |
2ed26f6b | 18574 | test -d $d || mkdir $d |
2ed26f6b | 18575 | done |
ba479fd2 NN |
18576 | ;; |
18577 | esac | |
b61ff9c8 BS |
18578 | done |
18579 | _ACEOF | |
cafe096b | 18580 | |
b61ff9c8 | 18581 | cat >>$CONFIG_STATUS <<\_ACEOF |
ba479fd2 NN |
18582 | |
18583 | { (exit 0); exit 0; } | |
18584 | _ACEOF | |
861bb6c1 | 18585 | chmod +x $CONFIG_STATUS |
ba479fd2 NN |
18586 | ac_clean_files=$ac_clean_files_save |
18587 | ||
18588 | ||
18589 | # configure is writing to config.log, and then calls config.status. | |
18590 | # config.status does its own redirection, appending to config.log. | |
18591 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
18592 | # by configure, so config.status won't be able to write to it; its | |
18593 | # output is simply discarded. So we exec the FD to /dev/null, | |
18594 | # effectively closing config.log, so it can be properly (re)opened and | |
18595 | # appended to by config.status. When coming back to configure, we | |
18596 | # need to make the FD available again. | |
18597 | if test "$no_create" != yes; then | |
18598 | ac_cs_success=: | |
18599 | ac_config_status_args= | |
18600 | test "$silent" = yes && | |
18601 | ac_config_status_args="$ac_config_status_args --quiet" | |
18602 | exec 5>/dev/null | |
18603 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
18604 | exec 5>>config.log | |
18605 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
18606 | # would make configure fail if this is the last instruction. | |
18607 | $ac_cs_success || { (exit 1); exit 1; } | |
18608 | fi | |
861bb6c1 | 18609 |