]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
093e61a6 | 2 | |
861bb6c1 | 3 | # Guess values for system-dependent variables and create Makefiles. |
093e61a6 RS |
4 | # Generated automatically using autoconf version 2.13 |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
861bb6c1 JL |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
093e61a6 RS |
10 | # Defaults: |
11 | ac_help= | |
861bb6c1 | 12 | ac_default_prefix=/usr/local |
093e61a6 RS |
13 | # Any additions from configure.in: |
14 | ac_help="$ac_help | |
15 | --with-local-prefix=DIR specifies directory to put local include" | |
16 | ac_help="$ac_help | |
17 | --with-gxx-include-dir=DIR | |
18 | specifies directory to put g++ header files" | |
19 | ac_help="$ac_help | |
20 | --with-cpp-install-dir=DIR | |
21 | install the user visible C preprocessor in DIR | |
22 | (relative to PREFIX) as well as PREFIX/bin" | |
23 | ac_help="$ac_help | |
24 | --with-gnu-ld arrange to work with GNU ld." | |
25 | ac_help="$ac_help | |
26 | --with-ld arrange to use the specified ld (full pathname)" | |
27 | ac_help="$ac_help | |
28 | --with-gnu-as arrange to work with GNU as" | |
29 | ac_help="$ac_help | |
30 | --with-as arrange to use the specified as (full pathname)" | |
31 | ac_help="$ac_help | |
32 | --enable-werror enable -Werror in bootstrap stage2 and later" | |
33 | ac_help="$ac_help | |
34 | --enable-checking[=LIST] | |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
37 | Categories are: misc,tree,rtl,rtlflag,gc,gcac; | |
38 | default is misc,tree,gc,rtlflag" | |
39 | ac_help="$ac_help | |
40 | --enable-coverage[=LEVEL] | |
41 | enable compiler\'s code coverage collection. | |
42 | Use to measure compiler performance and locate | |
43 | unused parts of the compiler. With LEVEL, specify | |
44 | optimization. Values are opt, noopt, | |
45 | default is noopt" | |
46 | ac_help="$ac_help | |
47 | --with-stabs arrange to use stabs instead of host debug format" | |
48 | ac_help="$ac_help | |
49 | --with-elf arrange to use ELF instead of host debug format" | |
50 | ac_help="$ac_help | |
51 | --enable-multilib enable library support for multiple ABIs" | |
52 | ac_help="$ac_help | |
53 | --enable-__cxa_atexit enable __cxa_atexit for C++" | |
54 | ac_help="$ac_help | |
55 | --enable-c-mbchar enable multibyte characters for C and C++" | |
56 | ac_help="$ac_help | |
57 | --enable-threads enable thread usage for target GCC | |
58 | --enable-threads=LIB use LIB thread package for target GCC" | |
59 | ac_help="$ac_help | |
60 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
61 | the GNU Objective-C runtime" | |
62 | ac_help="$ac_help | |
63 | --with-dwarf2 force the default debug format to be DWARF 2" | |
64 | ac_help="$ac_help | |
65 | --disable-shared don't provide a shared libgcc" | |
66 | ac_help="$ac_help | |
67 | --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR." | |
68 | ac_help="$ac_help | |
69 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
70 | ac_help="$ac_help | |
71 | --enable-initfini-array use .init_array/.fini_array sections" | |
72 | ac_help="$ac_help | |
73 | --enable-sjlj-exceptions | |
74 | arrange to use setjmp/longjmp exception handling" | |
75 | ac_help="$ac_help | |
76 | --enable-libunwind-exceptions force use libunwind for exceptions" | |
77 | ac_help="$ac_help | |
78 | --enable-nls use Native Language Support (default)" | |
79 | ac_help="$ac_help | |
80 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
81 | ac_help="$ac_help | |
82 | --disable-nls do not use Native Language Support" | |
83 | ac_help="$ac_help | |
84 | --with-included-gettext use the GNU gettext library included here" | |
85 | ac_help="$ac_help | |
86 | --disable-win32-registry | |
87 | disable lookup of installation paths in the | |
88 | Registry on Windows hosts | |
89 | --enable-win32-registry enable registry lookup (default) | |
90 | --enable-win32-registry=KEY | |
91 | use KEY instead of GCC version as the last portion | |
92 | of the registry key" | |
93 | ac_help="$ac_help | |
94 | --with-gc={simple,page} choose the garbage collection mechanism to use | |
95 | with the compiler" | |
96 | ac_help="$ac_help | |
97 | --with-system-zlib use installed libz" | |
98 | ac_help="$ac_help | |
99 | --enable-maintainer-mode | |
100 | enable make rules and dependencies not useful | |
101 | (and sometimes confusing) to the casual installer" | |
102 | ac_help="$ac_help | |
103 | --enable-version-specific-runtime-libs | |
104 | specify that runtime libraries should be | |
105 | installed in a compiler-specific directory" | |
106 | ac_help="$ac_help | |
107 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
108 | |
109 | # Initialize some variables set by options. | |
110 | # The variables have the same names as the options, with | |
111 | # dashes changed to underlines. | |
093e61a6 RS |
112 | build=NONE |
113 | cache_file=./config.cache | |
861bb6c1 | 114 | exec_prefix=NONE |
093e61a6 | 115 | host=NONE |
861bb6c1 | 116 | no_create= |
093e61a6 | 117 | nonopt=NONE |
861bb6c1 JL |
118 | no_recursion= |
119 | prefix=NONE | |
120 | program_prefix=NONE | |
121 | program_suffix=NONE | |
122 | program_transform_name=s,x,x, | |
123 | silent= | |
124 | site= | |
125 | srcdir= | |
093e61a6 | 126 | target=NONE |
861bb6c1 JL |
127 | verbose= |
128 | x_includes=NONE | |
129 | x_libraries=NONE | |
130 | bindir='${exec_prefix}/bin' | |
131 | sbindir='${exec_prefix}/sbin' | |
132 | libexecdir='${exec_prefix}/libexec' | |
133 | datadir='${prefix}/share' | |
134 | sysconfdir='${prefix}/etc' | |
135 | sharedstatedir='${prefix}/com' | |
136 | localstatedir='${prefix}/var' | |
137 | libdir='${exec_prefix}/lib' | |
138 | includedir='${prefix}/include' | |
139 | oldincludedir='/usr/include' | |
140 | infodir='${prefix}/info' | |
141 | mandir='${prefix}/man' | |
142 | ||
093e61a6 RS |
143 | # Initialize some other variables. |
144 | subdirs= | |
145 | MFLAGS= MAKEFLAGS= | |
146 | SHELL=${CONFIG_SHELL-/bin/sh} | |
147 | # Maximum number of lines to put in a shell here document. | |
148 | ac_max_here_lines=12 | |
149 | ||
861bb6c1 JL |
150 | ac_prev= |
151 | for ac_option | |
152 | do | |
093e61a6 | 153 | |
861bb6c1 JL |
154 | # If the previous option needs an argument, assign it. |
155 | if test -n "$ac_prev"; then | |
156 | eval "$ac_prev=\$ac_option" | |
157 | ac_prev= | |
158 | continue | |
159 | fi | |
160 | ||
093e61a6 RS |
161 | case "$ac_option" in |
162 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
163 | *) ac_optarg= ;; | |
164 | esac | |
861bb6c1 JL |
165 | |
166 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
167 | ||
093e61a6 | 168 | case "$ac_option" in |
861bb6c1 JL |
169 | |
170 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
171 | ac_prev=bindir ;; | |
172 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
093e61a6 | 173 | bindir="$ac_optarg" ;; |
861bb6c1 JL |
174 | |
175 | -build | --build | --buil | --bui | --bu) | |
093e61a6 | 176 | ac_prev=build ;; |
861bb6c1 | 177 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
093e61a6 | 178 | build="$ac_optarg" ;; |
861bb6c1 JL |
179 | |
180 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
181 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
182 | ac_prev=cache_file ;; | |
183 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
184 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
093e61a6 | 185 | cache_file="$ac_optarg" ;; |
861bb6c1 JL |
186 | |
187 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
188 | ac_prev=datadir ;; | |
189 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
190 | | --da=*) | |
093e61a6 | 191 | datadir="$ac_optarg" ;; |
861bb6c1 JL |
192 | |
193 | -disable-* | --disable-*) | |
093e61a6 | 194 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
861bb6c1 | 195 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
196 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
197 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
198 | fi | |
199 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
200 | eval "enable_${ac_feature}=no" ;; | |
861bb6c1 JL |
201 | |
202 | -enable-* | --enable-*) | |
093e61a6 | 203 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
861bb6c1 | 204 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
205 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
206 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
207 | fi | |
208 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
209 | case "$ac_option" in | |
210 | *=*) ;; | |
861bb6c1 JL |
211 | *) ac_optarg=yes ;; |
212 | esac | |
093e61a6 | 213 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
861bb6c1 JL |
214 | |
215 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
216 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
217 | | --exec | --exe | --ex) | |
218 | ac_prev=exec_prefix ;; | |
219 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
220 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
221 | | --exec=* | --exe=* | --ex=*) | |
093e61a6 | 222 | exec_prefix="$ac_optarg" ;; |
861bb6c1 JL |
223 | |
224 | -gas | --gas | --ga | --g) | |
225 | # Obsolete; use --with-gas. | |
226 | with_gas=yes ;; | |
227 | ||
093e61a6 RS |
228 | -help | --help | --hel | --he) |
229 | # Omit some internal or obsolete options to make the list less imposing. | |
230 | # This message is too long to be a string in the A/UX 3.1 sh. | |
231 | cat << EOF | |
232 | Usage: configure [options] [host] | |
233 | Options: [defaults in brackets after descriptions] | |
234 | Configuration: | |
235 | --cache-file=FILE cache test results in FILE | |
236 | --help print this message | |
237 | --no-create do not create output files | |
238 | --quiet, --silent do not print \`checking...' messages | |
239 | --version print the version of autoconf that created configure | |
240 | Directory and file names: | |
241 | --prefix=PREFIX install architecture-independent files in PREFIX | |
242 | [$ac_default_prefix] | |
243 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
244 | [same as prefix] | |
245 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
246 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
247 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
248 | --datadir=DIR read-only architecture-independent data in DIR | |
249 | [PREFIX/share] | |
250 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
251 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
252 | [PREFIX/com] | |
253 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
254 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
255 | --includedir=DIR C header files in DIR [PREFIX/include] | |
256 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
257 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
258 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
259 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
260 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
261 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
262 | --program-transform-name=PROGRAM | |
263 | run sed PROGRAM on installed program names | |
264 | EOF | |
265 | cat << EOF | |
266 | Host type: | |
267 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
268 | --host=HOST configure for HOST [guessed] | |
269 | --target=TARGET configure for TARGET [TARGET=HOST] | |
270 | Features and packages: | |
271 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
272 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
273 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
274 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
275 | --x-includes=DIR X include files are in DIR | |
276 | --x-libraries=DIR X library files are in DIR | |
277 | EOF | |
278 | if test -n "$ac_help"; then | |
279 | echo "--enable and --with options recognized:$ac_help" | |
280 | fi | |
281 | exit 0 ;; | |
861bb6c1 JL |
282 | |
283 | -host | --host | --hos | --ho) | |
093e61a6 | 284 | ac_prev=host ;; |
861bb6c1 | 285 | -host=* | --host=* | --hos=* | --ho=*) |
093e61a6 | 286 | host="$ac_optarg" ;; |
861bb6c1 JL |
287 | |
288 | -includedir | --includedir | --includedi | --included | --include \ | |
289 | | --includ | --inclu | --incl | --inc) | |
290 | ac_prev=includedir ;; | |
291 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
292 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
093e61a6 | 293 | includedir="$ac_optarg" ;; |
861bb6c1 JL |
294 | |
295 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
296 | ac_prev=infodir ;; | |
297 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
093e61a6 | 298 | infodir="$ac_optarg" ;; |
861bb6c1 JL |
299 | |
300 | -libdir | --libdir | --libdi | --libd) | |
301 | ac_prev=libdir ;; | |
302 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
093e61a6 | 303 | libdir="$ac_optarg" ;; |
861bb6c1 JL |
304 | |
305 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
306 | | --libexe | --libex | --libe) | |
307 | ac_prev=libexecdir ;; | |
308 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
309 | | --libexe=* | --libex=* | --libe=*) | |
093e61a6 | 310 | libexecdir="$ac_optarg" ;; |
861bb6c1 JL |
311 | |
312 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
313 | | --localstate | --localstat | --localsta | --localst \ | |
314 | | --locals | --local | --loca | --loc | --lo) | |
315 | ac_prev=localstatedir ;; | |
316 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
317 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
318 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
093e61a6 | 319 | localstatedir="$ac_optarg" ;; |
861bb6c1 JL |
320 | |
321 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
322 | ac_prev=mandir ;; | |
323 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
093e61a6 | 324 | mandir="$ac_optarg" ;; |
861bb6c1 JL |
325 | |
326 | -nfp | --nfp | --nf) | |
327 | # Obsolete; use --without-fp. | |
328 | with_fp=no ;; | |
329 | ||
330 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
093e61a6 | 331 | | --no-cr | --no-c) |
861bb6c1 JL |
332 | no_create=yes ;; |
333 | ||
334 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
335 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
336 | no_recursion=yes ;; | |
337 | ||
338 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
339 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
340 | | --oldin | --oldi | --old | --ol | --o) | |
341 | ac_prev=oldincludedir ;; | |
342 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
343 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
344 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
093e61a6 | 345 | oldincludedir="$ac_optarg" ;; |
861bb6c1 JL |
346 | |
347 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
348 | ac_prev=prefix ;; | |
349 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
093e61a6 | 350 | prefix="$ac_optarg" ;; |
861bb6c1 JL |
351 | |
352 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
353 | | --program-pre | --program-pr | --program-p) | |
354 | ac_prev=program_prefix ;; | |
355 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
356 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
093e61a6 | 357 | program_prefix="$ac_optarg" ;; |
861bb6c1 JL |
358 | |
359 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
360 | | --program-suf | --program-su | --program-s) | |
361 | ac_prev=program_suffix ;; | |
362 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
363 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
093e61a6 | 364 | program_suffix="$ac_optarg" ;; |
861bb6c1 JL |
365 | |
366 | -program-transform-name | --program-transform-name \ | |
367 | | --program-transform-nam | --program-transform-na \ | |
368 | | --program-transform-n | --program-transform- \ | |
369 | | --program-transform | --program-transfor \ | |
370 | | --program-transfo | --program-transf \ | |
371 | | --program-trans | --program-tran \ | |
372 | | --progr-tra | --program-tr | --program-t) | |
373 | ac_prev=program_transform_name ;; | |
374 | -program-transform-name=* | --program-transform-name=* \ | |
375 | | --program-transform-nam=* | --program-transform-na=* \ | |
376 | | --program-transform-n=* | --program-transform-=* \ | |
377 | | --program-transform=* | --program-transfor=* \ | |
378 | | --program-transfo=* | --program-transf=* \ | |
379 | | --program-trans=* | --program-tran=* \ | |
380 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
093e61a6 | 381 | program_transform_name="$ac_optarg" ;; |
861bb6c1 JL |
382 | |
383 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
384 | | -silent | --silent | --silen | --sile | --sil) | |
385 | silent=yes ;; | |
386 | ||
387 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
388 | ac_prev=sbindir ;; | |
389 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
390 | | --sbi=* | --sb=*) | |
093e61a6 | 391 | sbindir="$ac_optarg" ;; |
861bb6c1 JL |
392 | |
393 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
394 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
395 | | --sharedst | --shareds | --shared | --share | --shar \ | |
396 | | --sha | --sh) | |
397 | ac_prev=sharedstatedir ;; | |
398 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
399 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
400 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
401 | | --sha=* | --sh=*) | |
093e61a6 | 402 | sharedstatedir="$ac_optarg" ;; |
861bb6c1 JL |
403 | |
404 | -site | --site | --sit) | |
405 | ac_prev=site ;; | |
406 | -site=* | --site=* | --sit=*) | |
093e61a6 | 407 | site="$ac_optarg" ;; |
861bb6c1 JL |
408 | |
409 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
410 | ac_prev=srcdir ;; | |
411 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
093e61a6 | 412 | srcdir="$ac_optarg" ;; |
861bb6c1 JL |
413 | |
414 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
415 | | --syscon | --sysco | --sysc | --sys | --sy) | |
416 | ac_prev=sysconfdir ;; | |
417 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
418 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
093e61a6 | 419 | sysconfdir="$ac_optarg" ;; |
861bb6c1 JL |
420 | |
421 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
093e61a6 | 422 | ac_prev=target ;; |
861bb6c1 | 423 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
093e61a6 | 424 | target="$ac_optarg" ;; |
861bb6c1 JL |
425 | |
426 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
427 | verbose=yes ;; | |
428 | ||
093e61a6 RS |
429 | -version | --version | --versio | --versi | --vers) |
430 | echo "configure generated by autoconf version 2.13" | |
431 | exit 0 ;; | |
861bb6c1 JL |
432 | |
433 | -with-* | --with-*) | |
093e61a6 | 434 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
861bb6c1 | 435 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
436 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
437 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
438 | fi | |
861bb6c1 | 439 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
093e61a6 RS |
440 | case "$ac_option" in |
441 | *=*) ;; | |
861bb6c1 JL |
442 | *) ac_optarg=yes ;; |
443 | esac | |
093e61a6 | 444 | eval "with_${ac_package}='$ac_optarg'" ;; |
861bb6c1 JL |
445 | |
446 | -without-* | --without-*) | |
093e61a6 | 447 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
861bb6c1 | 448 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
449 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
450 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
451 | fi | |
452 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
453 | eval "with_${ac_package}=no" ;; | |
861bb6c1 JL |
454 | |
455 | --x) | |
456 | # Obsolete; use --with-x. | |
457 | with_x=yes ;; | |
458 | ||
459 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
460 | | --x-incl | --x-inc | --x-in | --x-i) | |
461 | ac_prev=x_includes ;; | |
462 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
463 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
093e61a6 | 464 | x_includes="$ac_optarg" ;; |
861bb6c1 JL |
465 | |
466 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
467 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
468 | ac_prev=x_libraries ;; | |
469 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
470 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
093e61a6 | 471 | x_libraries="$ac_optarg" ;; |
861bb6c1 | 472 | |
093e61a6 | 473 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
861bb6c1 JL |
474 | ;; |
475 | ||
476 | *) | |
093e61a6 RS |
477 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
478 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
479 | fi | |
480 | if test "x$nonopt" != xNONE; then | |
481 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
482 | fi | |
483 | nonopt="$ac_option" | |
861bb6c1 JL |
484 | ;; |
485 | ||
486 | esac | |
487 | done | |
488 | ||
489 | if test -n "$ac_prev"; then | |
093e61a6 | 490 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
861bb6c1 | 491 | fi |
861bb6c1 | 492 | |
093e61a6 | 493 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
861bb6c1 | 494 | |
093e61a6 RS |
495 | # File descriptor usage: |
496 | # 0 standard input | |
497 | # 1 file creation | |
498 | # 2 errors and warnings | |
499 | # 3 some systems may open it to /dev/tty | |
500 | # 4 used on the Kubota Titan | |
501 | # 6 checking for... messages and results | |
502 | # 5 compiler messages saved in config.log | |
503 | if test "$silent" = yes; then | |
504 | exec 6>/dev/null | |
505 | else | |
506 | exec 6>&1 | |
507 | fi | |
508 | exec 5>./config.log | |
509 | ||
510 | echo "\ | |
511 | This file contains any messages produced by compilers while | |
512 | running configure, to aid debugging if configure makes a mistake. | |
513 | " 1>&5 | |
514 | ||
515 | # Strip out --no-create and --no-recursion so they do not pile up. | |
516 | # Also quote any args containing shell metacharacters. | |
517 | ac_configure_args= | |
518 | for ac_arg | |
861bb6c1 | 519 | do |
093e61a6 RS |
520 | case "$ac_arg" in |
521 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
522 | | --no-cr | --no-c) ;; | |
523 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
524 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
525 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
526 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
527 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
861bb6c1 JL |
528 | esac |
529 | done | |
530 | ||
093e61a6 RS |
531 | # NLS nuisances. |
532 | # Only set these to C if already set. These must not be set unconditionally | |
533 | # because not all systems understand e.g. LANG=C (notably SCO). | |
534 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
535 | # Non-C LC_CTYPE values break the ctype check. | |
536 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
537 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
538 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
539 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
cafe096b | 540 | |
093e61a6 RS |
541 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
542 | rm -rf conftest* confdefs.h | |
543 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
544 | echo > confdefs.h | |
861bb6c1 | 545 | |
093e61a6 RS |
546 | # A filename unique to this package, relative to the directory that |
547 | # configure is in, which we can look for to find out if srcdir is correct. | |
548 | ac_unique_file=tree.c | |
861bb6c1 JL |
549 | |
550 | # Find the source files, if location was not specified. | |
551 | if test -z "$srcdir"; then | |
552 | ac_srcdir_defaulted=yes | |
553 | # Try the directory containing this script, then its parent. | |
093e61a6 RS |
554 | ac_prog=$0 |
555 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
556 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
861bb6c1 JL |
557 | srcdir=$ac_confdir |
558 | if test ! -r $srcdir/$ac_unique_file; then | |
559 | srcdir=.. | |
560 | fi | |
561 | else | |
562 | ac_srcdir_defaulted=no | |
563 | fi | |
564 | if test ! -r $srcdir/$ac_unique_file; then | |
565 | if test "$ac_srcdir_defaulted" = yes; then | |
093e61a6 | 566 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
789b7de5 | 567 | else |
093e61a6 | 568 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
861bb6c1 JL |
569 | fi |
570 | fi | |
093e61a6 | 571 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
861bb6c1 | 572 | |
093e61a6 | 573 | # Prefer explicitly selected file to automatically selected ones. |
96ef4bdc MM |
574 | if test -z "$CONFIG_SITE"; then |
575 | if test "x$prefix" != xNONE; then | |
576 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
577 | else | |
578 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
093e61a6 RS |
579 | fi |
580 | fi | |
581 | for ac_site_file in $CONFIG_SITE; do | |
582 | if test -r "$ac_site_file"; then | |
583 | echo "loading site script $ac_site_file" | |
584 | . "$ac_site_file" | |
585 | fi | |
586 | done | |
587 | ||
588 | if test -r "$cache_file"; then | |
589 | echo "loading cache $cache_file" | |
590 | . $cache_file | |
591 | else | |
592 | echo "creating cache $cache_file" | |
593 | > $cache_file | |
594 | fi | |
861bb6c1 | 595 | |
093e61a6 RS |
596 | ac_ext=c |
597 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
598 | ac_cpp='$CPP $CPPFLAGS' | |
599 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
600 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
601 | cross_compiling=$ac_cv_prog_cc_cross | |
602 | ||
603 | ac_exeext= | |
604 | ac_objext=o | |
605 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
606 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
607 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
608 | ac_n= ac_c=' | |
609 | ' ac_t=' ' | |
610 | else | |
611 | ac_n=-n ac_c= ac_t= | |
612 | fi | |
613 | else | |
614 | ac_n= ac_c='\c' ac_t= | |
615 | fi | |
861bb6c1 JL |
616 | |
617 | ||
618 | ||
619 | ||
093e61a6 RS |
620 | # Determine the host, build, and target systems |
621 | ac_aux_dir= | |
622 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
623 | if test -f $ac_dir/install-sh; then | |
624 | ac_aux_dir=$ac_dir | |
625 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
626 | break | |
627 | elif test -f $ac_dir/install.sh; then | |
628 | ac_aux_dir=$ac_dir | |
629 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
630 | break | |
631 | fi | |
632 | done | |
633 | if test -z "$ac_aux_dir"; then | |
634 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
635 | fi | |
636 | ac_config_guess=$ac_aux_dir/config.guess | |
637 | ac_config_sub=$ac_aux_dir/config.sub | |
638 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
13c22933 JJ |
639 | |
640 | ||
093e61a6 RS |
641 | # Do some error checking and defaulting for the host and target type. |
642 | # The inputs are: | |
643 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
644 | # | |
645 | # The rules are: | |
646 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
647 | # same time. | |
648 | # 2. Host defaults to nonopt. | |
649 | # 3. If nonopt is not specified, then host defaults to the current host, | |
650 | # as determined by config.guess. | |
651 | # 4. Target and build default to nonopt. | |
652 | # 5. If nonopt is not specified, then target and build default to host. | |
13c22933 | 653 | |
093e61a6 RS |
654 | # The aliases save the names the user supplied, while $host etc. |
655 | # will get canonicalized. | |
656 | case $host---$target---$nonopt in | |
657 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
658 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
659 | esac | |
13c22933 JJ |
660 | |
661 | ||
093e61a6 RS |
662 | # Make sure we can run config.sub. |
663 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
664 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
13c22933 JJ |
665 | fi |
666 | ||
093e61a6 | 667 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
96ef4bdc | 668 | echo "configure:669: checking host system type" >&5 |
13c22933 | 669 | |
093e61a6 RS |
670 | host_alias=$host |
671 | case "$host_alias" in | |
672 | NONE) | |
673 | case $nonopt in | |
674 | NONE) | |
675 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
676 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
677 | fi ;; | |
678 | *) host_alias=$nonopt ;; | |
679 | esac ;; | |
680 | esac | |
13c22933 | 681 | |
093e61a6 RS |
682 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
683 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
684 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
685 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
686 | echo "$ac_t""$host" 1>&6 | |
687 | ||
688 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
96ef4bdc | 689 | echo "configure:690: checking target system type" >&5 |
093e61a6 RS |
690 | |
691 | target_alias=$target | |
692 | case "$target_alias" in | |
693 | NONE) | |
694 | case $nonopt in | |
695 | NONE) target_alias=$host_alias ;; | |
696 | *) target_alias=$nonopt ;; | |
697 | esac ;; | |
698 | esac | |
13c22933 | 699 | |
093e61a6 RS |
700 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
701 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
702 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
703 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
704 | echo "$ac_t""$target" 1>&6 | |
705 | ||
706 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
96ef4bdc | 707 | echo "configure:708: checking build system type" >&5 |
093e61a6 RS |
708 | |
709 | build_alias=$build | |
710 | case "$build_alias" in | |
711 | NONE) | |
712 | case $nonopt in | |
713 | NONE) build_alias=$host_alias ;; | |
714 | *) build_alias=$nonopt ;; | |
715 | esac ;; | |
716 | esac | |
717 | ||
718 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
719 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
720 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
721 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
722 | echo "$ac_t""$build" 1>&6 | |
13c22933 | 723 | |
093e61a6 RS |
724 | test "$host_alias" != "$target_alias" && |
725 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
726 | NONENONEs,x,x, && | |
727 | program_prefix=${target_alias}- | |
13c22933 | 728 | |
73458fb7 | 729 | |
4665e56c NN |
730 | # Determine the target- and build-specific subdirectories |
731 | case ${build_alias} in | |
732 | "") build_noncanonical=${build} ;; | |
733 | *) build_noncanonical=${build_alias} ;; | |
734 | esac | |
73458fb7 | 735 | |
4665e56c NN |
736 | case ${host_alias} in |
737 | "") host_noncanonical=${build_noncanonical} ;; | |
738 | *) host_noncanonical=${host_alias} ;; | |
739 | esac | |
73458fb7 | 740 | |
4665e56c NN |
741 | case ${target_alias} in |
742 | "") target_noncanonical=${host_noncanonical} ;; | |
743 | *) target_noncanonical=${target_alias} ;; | |
744 | esac | |
093e61a6 | 745 | |
4665e56c NN |
746 | # Prefix 'build-' so this never conflicts with target_subdir. |
747 | build_subdir="build-${build_noncanonical}" | |
748 | # Not really a subdirectory, but here for completeness. | |
749 | host_subdir=. | |
750 | # No prefix. | |
751 | target_subdir=${target_noncanonical} | |
752 | ||
73458fb7 | 753 | |
093e61a6 RS |
754 | # Set program_transform_name |
755 | if test "$program_transform_name" = s,x,x,; then | |
756 | program_transform_name= | |
13c22933 | 757 | else |
093e61a6 RS |
758 | # Double any \ or $. echo might interpret backslashes. |
759 | cat <<\EOF_SED > conftestsed | |
760 | s,\\,\\\\,g; s,\$,$$,g | |
761 | EOF_SED | |
762 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
763 | rm -f conftestsed | |
cafe096b | 764 | fi |
13c22933 | 765 | test "$program_prefix" != NONE && |
093e61a6 | 766 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
767 | # Use a double $ so make ignores it. |
768 | test "$program_suffix" != NONE && | |
093e61a6 RS |
769 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
770 | ||
771 | # sed with no file args requires a program. | |
772 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
773 | |
774 | ||
34a86c2b NN |
775 | # Check for bogus environment variables. |
776 | # Test if LIBRARY_PATH contains the notation for the current directory | |
777 | # since this would lead to problems installing/building glibc. | |
778 | # LIBRARY_PATH contains the current directory if one of the following | |
779 | # is true: | |
780 | # - one of the terminals (":" and ";") is the first or last sign | |
781 | # - two terminals occur directly after each other | |
782 | # - the path contains an element with a dot in it | |
093e61a6 | 783 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
4665e56c | 784 | echo "configure:785: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
785 | case ${LIBRARY_PATH} in |
786 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
787 | library_path_setting="contains current directory" | |
788 | ;; | |
789 | *) | |
790 | library_path_setting="ok" | |
791 | ;; | |
792 | esac | |
093e61a6 | 793 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 794 | if test "$library_path_setting" != "ok"; then |
093e61a6 | 795 | { echo "configure: error: |
34a86c2b NN |
796 | *** LIBRARY_PATH shouldn't contain the current directory when |
797 | *** building gcc. Please change the environment variable | |
093e61a6 | 798 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
799 | fi |
800 | ||
34a86c2b NN |
801 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
802 | # since this would lead to problems installing/building glibc. | |
803 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
804 | # is true: | |
805 | # - one of the terminals (":" and ";") is the first or last sign | |
806 | # - two terminals occur directly after each other | |
807 | # - the path contains an element with a dot in it | |
093e61a6 | 808 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
4665e56c | 809 | echo "configure:810: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
810 | case ${GCC_EXEC_PREFIX} in |
811 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
812 | gcc_exec_prefix_setting="contains current directory" | |
813 | ;; | |
814 | *) | |
815 | gcc_exec_prefix_setting="ok" | |
816 | ;; | |
817 | esac | |
093e61a6 | 818 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 819 | if test "$gcc_exec_prefix_setting" != "ok"; then |
093e61a6 | 820 | { echo "configure: error: |
cafe096b EC |
821 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
822 | *** building gcc. Please change the environment variable | |
093e61a6 | 823 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
824 | fi |
825 | ||
826 | # ----------- | |
827 | # Directories | |
828 | # ----------- | |
829 | ||
830 | # Specify the local prefix | |
831 | local_prefix= | |
832 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
833 | if test "${with_local_prefix+set}" = set; then | |
834 | withval="$with_local_prefix" | |
835 | case "${withval}" in | |
093e61a6 | 836 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
837 | no) ;; |
838 | *) local_prefix=$with_local_prefix ;; | |
839 | esac | |
093e61a6 RS |
840 | fi |
841 | ||
34a86c2b NN |
842 | |
843 | # Default local prefix if it is empty | |
844 | if test x$local_prefix = x; then | |
845 | local_prefix=/usr/local | |
846 | fi | |
847 | ||
848 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
849 | # passed in by the toplevel make and thus we'd get different behavior | |
850 | # depending on where we built the sources. | |
851 | gcc_gxx_include_dir= | |
852 | # Specify the g++ header file directory | |
853 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
854 | if test "${with_gxx_include_dir+set}" = set; then | |
855 | withval="$with_gxx_include_dir" | |
856 | case "${withval}" in | |
093e61a6 | 857 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
858 | no) ;; |
859 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
860 | esac | |
093e61a6 RS |
861 | fi |
862 | ||
34a86c2b NN |
863 | |
864 | if test x${gcc_gxx_include_dir} = x; then | |
865 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
866 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
867 | else | |
868 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
869 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
870 | fi | |
871 | fi | |
872 | ||
873 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
874 | if test "${with_cpp_install_dir+set}" = set; then | |
875 | withval="$with_cpp_install_dir" | |
876 | if test x$withval = xyes; then | |
093e61a6 | 877 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
878 | elif test x$withval != xno; then |
879 | cpp_install_dir=$withval | |
880 | fi | |
093e61a6 RS |
881 | fi |
882 | ||
34a86c2b NN |
883 | |
884 | # ------------------- | |
885 | # Find default linker | |
886 | # ------------------- | |
887 | ||
888 | # With GNU ld | |
889 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
890 | if test "${with_gnu_ld+set}" = set; then | |
891 | withval="$with_gnu_ld" | |
892 | gnu_ld_flag="$with_gnu_ld" | |
893 | else | |
894 | gnu_ld_flag=no | |
093e61a6 | 895 | fi |
34a86c2b | 896 | |
cafe096b | 897 | |
093e61a6 | 898 | # With pre-defined ld |
34a86c2b NN |
899 | # Check whether --with-ld or --without-ld was given. |
900 | if test "${with_ld+set}" = set; then | |
901 | withval="$with_ld" | |
902 | DEFAULT_LINKER="$with_ld" | |
093e61a6 RS |
903 | fi |
904 | ||
34a86c2b NN |
905 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
906 | if test ! -x "$DEFAULT_LINKER"; then | |
093e61a6 | 907 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
908 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
909 | gnu_ld_flag=yes | |
910 | fi | |
093e61a6 | 911 | cat >> confdefs.h <<EOF |
34a86c2b | 912 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
093e61a6 | 913 | EOF |
34a86c2b NN |
914 | |
915 | fi | |
916 | ||
093e61a6 | 917 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
4665e56c | 918 | echo "configure:919: checking whether a default linker was specified" >&5 |
34a86c2b NN |
919 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
920 | if test x"$gnu_ld_flag" = x"no"; then | |
093e61a6 | 921 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 922 | else |
093e61a6 | 923 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
924 | fi |
925 | else | |
093e61a6 | 926 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
927 | fi |
928 | ||
929 | # ---------------------- | |
930 | # Find default assembler | |
931 | # ---------------------- | |
932 | ||
933 | # With GNU as | |
934 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
935 | if test "${with_gnu_as+set}" = set; then | |
936 | withval="$with_gnu_as" | |
937 | gas_flag="$with_gnu_as" | |
938 | else | |
939 | gas_flag=no | |
093e61a6 | 940 | fi |
34a86c2b NN |
941 | |
942 | ||
943 | # Check whether --with-as or --without-as was given. | |
944 | if test "${with_as+set}" = set; then | |
945 | withval="$with_as" | |
946 | DEFAULT_ASSEMBLER="$with_as" | |
093e61a6 RS |
947 | fi |
948 | ||
34a86c2b NN |
949 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
950 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
093e61a6 | 951 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
952 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
953 | gas_flag=yes | |
954 | fi | |
093e61a6 | 955 | cat >> confdefs.h <<EOF |
34a86c2b | 956 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
093e61a6 | 957 | EOF |
34a86c2b NN |
958 | |
959 | fi | |
960 | ||
093e61a6 | 961 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
4665e56c | 962 | echo "configure:963: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
963 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
964 | if test x"$gas_flag" = x"no"; then | |
093e61a6 | 965 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 966 | else |
093e61a6 | 967 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
968 | fi |
969 | else | |
093e61a6 | 970 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
971 | fi |
972 | ||
973 | # --------------- | |
974 | # Find C compiler | |
975 | # --------------- | |
976 | ||
977 | # Find the native compiler | |
093e61a6 | 978 | # Extract the first word of "gcc", so it can be a program name with args. |
34a86c2b | 979 | set dummy gcc; ac_word=$2 |
093e61a6 | 980 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 981 | echo "configure:982: checking for $ac_word" >&5 |
093e61a6 RS |
982 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
983 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
984 | else |
985 | if test -n "$CC"; then | |
986 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
987 | else | |
093e61a6 RS |
988 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
989 | ac_dummy="$PATH" | |
990 | for ac_dir in $ac_dummy; do | |
991 | test -z "$ac_dir" && ac_dir=. | |
992 | if test -f $ac_dir/$ac_word; then | |
993 | ac_cv_prog_CC="gcc" | |
994 | break | |
995 | fi | |
996 | done | |
997 | IFS="$ac_save_ifs" | |
34a86c2b NN |
998 | fi |
999 | fi | |
093e61a6 | 1000 | CC="$ac_cv_prog_CC" |
34a86c2b | 1001 | if test -n "$CC"; then |
093e61a6 | 1002 | echo "$ac_t""$CC" 1>&6 |
cafe096b | 1003 | else |
093e61a6 | 1004 | echo "$ac_t""no" 1>&6 |
cafe096b | 1005 | fi |
cafe096b | 1006 | |
34a86c2b NN |
1007 | if test -z "$CC"; then |
1008 | # Extract the first word of "cc", so it can be a program name with args. | |
1009 | set dummy cc; ac_word=$2 | |
093e61a6 | 1010 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 1011 | echo "configure:1012: checking for $ac_word" >&5 |
093e61a6 RS |
1012 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 JL |
1014 | else |
1015 | if test -n "$CC"; then | |
1016 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1017 | else | |
093e61a6 | 1018 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1019 | ac_prog_rejected=no |
093e61a6 RS |
1020 | ac_dummy="$PATH" |
1021 | for ac_dir in $ac_dummy; do | |
1022 | test -z "$ac_dir" && ac_dir=. | |
1023 | if test -f $ac_dir/$ac_word; then | |
1024 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1025 | ac_prog_rejected=yes | |
1026 | continue | |
1027 | fi | |
1028 | ac_cv_prog_CC="cc" | |
1029 | break | |
1030 | fi | |
1031 | done | |
1032 | IFS="$ac_save_ifs" | |
e9a25f70 JL |
1033 | if test $ac_prog_rejected = yes; then |
1034 | # We found a bogon in the path, so make sure we never use it. | |
1035 | set dummy $ac_cv_prog_CC | |
1036 | shift | |
093e61a6 | 1037 | if test $# -gt 0; then |
e9a25f70 JL |
1038 | # We chose a different compiler from the bogus one. |
1039 | # However, it has the same basename, so the bogon will be chosen | |
1040 | # first if we set CC to just the basename; use the full file name. | |
1041 | shift | |
093e61a6 RS |
1042 | set dummy "$ac_dir/$ac_word" "$@" |
1043 | shift | |
1044 | ac_cv_prog_CC="$@" | |
e9a25f70 JL |
1045 | fi |
1046 | fi | |
1047 | fi | |
1048 | fi | |
093e61a6 | 1049 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1050 | if test -n "$CC"; then |
093e61a6 | 1051 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1052 | else |
093e61a6 | 1053 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
1054 | fi |
1055 | ||
093e61a6 RS |
1056 | if test -z "$CC"; then |
1057 | case "`uname -s`" in | |
1058 | *win32* | *WIN32*) | |
1059 | # Extract the first word of "cl", so it can be a program name with args. | |
1060 | set dummy cl; ac_word=$2 | |
1061 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4665e56c | 1062 | echo "configure:1063: checking for $ac_word" >&5 |
093e61a6 RS |
1063 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1064 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
1065 | else |
1066 | if test -n "$CC"; then | |
1067 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1068 | else | |
093e61a6 RS |
1069 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1070 | ac_dummy="$PATH" | |
1071 | for ac_dir in $ac_dummy; do | |
1072 | test -z "$ac_dir" && ac_dir=. | |
1073 | if test -f $ac_dir/$ac_word; then | |
1074 | ac_cv_prog_CC="cl" | |
1075 | break | |
1076 | fi | |
1077 | done | |
1078 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1079 | fi |
1080 | fi | |
093e61a6 | 1081 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1082 | if test -n "$CC"; then |
093e61a6 | 1083 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1084 | else |
093e61a6 | 1085 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1086 | fi |
093e61a6 RS |
1087 | ;; |
1088 | esac | |
cafe096b | 1089 | fi |
093e61a6 | 1090 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
cafe096b | 1091 | fi |
e9a25f70 | 1092 | |
093e61a6 | 1093 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
4665e56c | 1094 | echo "configure:1095: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 | 1095 | |
093e61a6 RS |
1096 | ac_ext=c |
1097 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1098 | ac_cpp='$CPP $CPPFLAGS' | |
1099 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1100 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1101 | cross_compiling=$ac_cv_prog_cc_cross | |
b27d2bd5 | 1102 | |
093e61a6 | 1103 | cat > conftest.$ac_ext << EOF |
b27d2bd5 | 1104 | |
4665e56c | 1105 | #line 1106 "configure" |
093e61a6 RS |
1106 | #include "confdefs.h" |
1107 | ||
1108 | main(){return(0);} | |
1109 | EOF | |
4665e56c | 1110 | if { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
1111 | ac_cv_prog_cc_works=yes |
1112 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1113 | if (./conftest; exit) 2>/dev/null; then | |
1114 | ac_cv_prog_cc_cross=no | |
e9a25f70 | 1115 | else |
093e61a6 | 1116 | ac_cv_prog_cc_cross=yes |
e9a25f70 | 1117 | fi |
e9a25f70 | 1118 | else |
093e61a6 RS |
1119 | echo "configure: failed program was:" >&5 |
1120 | cat conftest.$ac_ext >&5 | |
1121 | ac_cv_prog_cc_works=no | |
e9a25f70 | 1122 | fi |
093e61a6 RS |
1123 | rm -fr conftest* |
1124 | ac_ext=c | |
1125 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1126 | ac_cpp='$CPP $CPPFLAGS' | |
1127 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1128 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1129 | cross_compiling=$ac_cv_prog_cc_cross | |
cafe096b | 1130 | |
093e61a6 RS |
1131 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
1132 | if test $ac_cv_prog_cc_works = no; then | |
1133 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
e9a25f70 | 1134 | fi |
093e61a6 | 1135 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
4665e56c | 1136 | echo "configure:1137: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
093e61a6 RS |
1137 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1138 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 | 1139 | |
093e61a6 | 1140 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
4665e56c | 1141 | echo "configure:1142: checking whether we are using GNU C" >&5 |
093e61a6 RS |
1142 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1143 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1144 | else | |
1145 | cat > conftest.c <<EOF | |
1146 | #ifdef __GNUC__ | |
1147 | yes; | |
cafe096b | 1148 | #endif |
093e61a6 | 1149 | EOF |
4665e56c | 1150 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
093e61a6 RS |
1151 | ac_cv_prog_gcc=yes |
1152 | else | |
1153 | ac_cv_prog_gcc=no | |
1154 | fi | |
1155 | fi | |
e9a25f70 | 1156 | |
093e61a6 | 1157 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
cd9e5e7c | 1158 | |
093e61a6 RS |
1159 | if test $ac_cv_prog_gcc = yes; then |
1160 | GCC=yes | |
1161 | else | |
1162 | GCC= | |
1163 | fi | |
cafe096b | 1164 | |
093e61a6 RS |
1165 | ac_test_CFLAGS="${CFLAGS+set}" |
1166 | ac_save_CFLAGS="$CFLAGS" | |
1167 | CFLAGS= | |
1168 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
4665e56c | 1169 | echo "configure:1170: checking whether ${CC-cc} accepts -g" >&5 |
093e61a6 RS |
1170 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | echo 'void f(){}' > conftest.c | |
1174 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
e9a25f70 JL |
1175 | ac_cv_prog_cc_g=yes |
1176 | else | |
093e61a6 | 1177 | ac_cv_prog_cc_g=no |
e9a25f70 | 1178 | fi |
093e61a6 RS |
1179 | rm -f conftest* |
1180 | ||
cafe096b | 1181 | fi |
093e61a6 RS |
1182 | |
1183 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1184 | if test "$ac_test_CFLAGS" = set; then |
093e61a6 | 1185 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1186 | elif test $ac_cv_prog_cc_g = yes; then |
1187 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1188 | CFLAGS="-g -O2" |
1189 | else | |
cd9e5e7c | 1190 | CFLAGS="-g" |
81814e35 | 1191 | fi |
3723cad9 | 1192 | else |
cd9e5e7c MK |
1193 | if test "$GCC" = yes; then |
1194 | CFLAGS="-O2" | |
1195 | else | |
1196 | CFLAGS= | |
1197 | fi | |
e9a25f70 JL |
1198 | fi |
1199 | ||
3ec83fc2 | 1200 | if test "x$CC" != xcc; then |
093e61a6 | 1201 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 |
4665e56c | 1202 | echo "configure:1203: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1203 | else |
093e61a6 | 1204 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
4665e56c | 1205 | echo "configure:1206: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 | 1206 | fi |
093e61a6 RS |
1207 | set dummy $CC; ac_cc="`echo $2 | |
1208 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1209 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1211 | else |
093e61a6 | 1212 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1213 | # Make sure it works both with $CC and with simple cc. |
1214 | # We do the test twice because some compilers refuse to overwrite an | |
1215 | # existing .o file with -o, though they will create one. | |
093e61a6 | 1216 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
4665e56c NN |
1217 | if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1218 | test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1219 | then |
1220 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1221 | if test "x$CC" != xcc; then | |
1222 | # Test first that cc exists at all. | |
4665e56c | 1223 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
093e61a6 | 1224 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
4665e56c NN |
1225 | if { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1226 | test -f conftest.o && { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1227 | then |
1228 | # cc works too. | |
1229 | : | |
1230 | else | |
1231 | # cc exists but doesn't like -o. | |
1232 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1233 | fi | |
1234 | fi | |
1235 | fi | |
1236 | else | |
1237 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1238 | fi | |
1239 | rm -f conftest* | |
1240 | ||
1241 | fi | |
1242 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
093e61a6 | 1243 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1244 | else |
093e61a6 RS |
1245 | echo "$ac_t""no" 1>&6 |
1246 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1247 | #define NO_MINUS_C_MINUS_O 1 |
093e61a6 | 1248 | EOF |
3ec83fc2 RH |
1249 | |
1250 | fi | |
1251 | ||
414d23ae HPN |
1252 | # autoconf is lame and doesn't give us any substitution variable for this. |
1253 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1254 | NO_MINUS_C_MINUS_O=yes | |
1255 | else | |
1256 | OUTPUT_OPTION='-o $@' | |
1257 | fi | |
1258 | ||
1259 | ||
1260 | ||
73458fb7 NN |
1261 | # ------------------------- |
1262 | # Check C compiler features | |
1263 | # ------------------------- | |
1264 | ||
093e61a6 | 1265 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
4665e56c | 1266 | echo "configure:1267: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1267 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1269 | else |
1270 | save_CFLAGS="$CFLAGS" | |
1271 | CFLAGS="-Wno-long-long" | |
093e61a6 | 1272 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1273 | #line 1274 "configure" |
093e61a6 | 1274 | #include "confdefs.h" |
75e93faa | 1275 | |
093e61a6 | 1276 | int main() { |
75e93faa | 1277 | |
093e61a6 RS |
1278 | ; return 0; } |
1279 | EOF | |
4665e56c | 1280 | if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1281 | rm -rf conftest* |
34a86c2b | 1282 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1283 | else |
093e61a6 RS |
1284 | echo "configure: failed program was:" >&5 |
1285 | cat conftest.$ac_ext >&5 | |
1286 | rm -rf conftest* | |
1287 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1288 | fi |
093e61a6 | 1289 | rm -f conftest* |
34a86c2b | 1290 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1291 | fi |
1292 | ||
093e61a6 RS |
1293 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1294 | ||
1295 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
4665e56c | 1296 | echo "configure:1297: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1297 | # On Suns, sometimes $CPP names a directory. |
1298 | if test -n "$CPP" && test -d "$CPP"; then | |
1299 | CPP= | |
1300 | fi | |
1301 | if test -z "$CPP"; then | |
093e61a6 RS |
1302 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1304 | else |
093e61a6 RS |
1305 | # This must be in double quotes, not single quotes, because CPP may get |
1306 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1307 | CPP="${CC-cc} -E" | |
84c041a1 | 1308 | # On the NeXT, cc -E runs the code through the compiler's parser, |
093e61a6 RS |
1309 | # not just through cpp. |
1310 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1311 | #line 1312 "configure" |
093e61a6 RS |
1312 | #include "confdefs.h" |
1313 | #include <assert.h> | |
1314 | Syntax Error | |
1315 | EOF | |
1316 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1317 | { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1318 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1319 | if test -z "$ac_err"; then | |
84c041a1 ZW |
1320 | : |
1321 | else | |
093e61a6 RS |
1322 | echo "$ac_err" >&5 |
1323 | echo "configure: failed program was:" >&5 | |
1324 | cat conftest.$ac_ext >&5 | |
1325 | rm -rf conftest* | |
1326 | CPP="${CC-cc} -E -traditional-cpp" | |
1327 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1328 | #line 1329 "configure" |
093e61a6 RS |
1329 | #include "confdefs.h" |
1330 | #include <assert.h> | |
1331 | Syntax Error | |
1332 | EOF | |
1333 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1334 | { (eval echo configure:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1335 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1336 | if test -z "$ac_err"; then | |
1337 | : | |
cafe096b | 1338 | else |
093e61a6 RS |
1339 | echo "$ac_err" >&5 |
1340 | echo "configure: failed program was:" >&5 | |
1341 | cat conftest.$ac_ext >&5 | |
1342 | rm -rf conftest* | |
1343 | CPP="${CC-cc} -nologo -E" | |
1344 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1345 | #line 1346 "configure" |
093e61a6 RS |
1346 | #include "confdefs.h" |
1347 | #include <assert.h> | |
1348 | Syntax Error | |
1349 | EOF | |
1350 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1351 | { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1352 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1353 | if test -z "$ac_err"; then | |
1354 | : | |
cafe096b | 1355 | else |
093e61a6 RS |
1356 | echo "$ac_err" >&5 |
1357 | echo "configure: failed program was:" >&5 | |
1358 | cat conftest.$ac_ext >&5 | |
1359 | rm -rf conftest* | |
1360 | CPP=/lib/cpp | |
cafe096b | 1361 | fi |
093e61a6 | 1362 | rm -f conftest* |
cafe096b | 1363 | fi |
093e61a6 | 1364 | rm -f conftest* |
cafe096b | 1365 | fi |
093e61a6 RS |
1366 | rm -f conftest* |
1367 | ac_cv_prog_CPP="$CPP" | |
414d23ae | 1368 | fi |
093e61a6 | 1369 | CPP="$ac_cv_prog_CPP" |
414d23ae | 1370 | else |
093e61a6 | 1371 | ac_cv_prog_CPP="$CPP" |
414d23ae | 1372 | fi |
093e61a6 | 1373 | echo "$ac_t""$CPP" 1>&6 |
414d23ae | 1374 | |
093e61a6 | 1375 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
4665e56c | 1376 | echo "configure:1377: checking for inline" >&5 |
093e61a6 RS |
1377 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1379 | else |
1380 | ac_cv_c_inline=no | |
1381 | for ac_kw in inline __inline__ __inline; do | |
093e61a6 | 1382 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1383 | #line 1384 "configure" |
093e61a6 | 1384 | #include "confdefs.h" |
414d23ae | 1385 | |
093e61a6 RS |
1386 | int main() { |
1387 | } $ac_kw foo() { | |
1388 | ; return 0; } | |
1389 | EOF | |
4665e56c | 1390 | if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1391 | rm -rf conftest* |
414d23ae HPN |
1392 | ac_cv_c_inline=$ac_kw; break |
1393 | else | |
093e61a6 RS |
1394 | echo "configure: failed program was:" >&5 |
1395 | cat conftest.$ac_ext >&5 | |
414d23ae | 1396 | fi |
093e61a6 | 1397 | rm -f conftest* |
414d23ae HPN |
1398 | done |
1399 | ||
1400 | fi | |
093e61a6 RS |
1401 | |
1402 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1403 | case "$ac_cv_c_inline" in | |
414d23ae | 1404 | inline | yes) ;; |
093e61a6 RS |
1405 | no) cat >> confdefs.h <<\EOF |
1406 | #define inline | |
1407 | EOF | |
414d23ae | 1408 | ;; |
093e61a6 | 1409 | *) cat >> confdefs.h <<EOF |
414d23ae | 1410 | #define inline $ac_cv_c_inline |
093e61a6 | 1411 | EOF |
414d23ae HPN |
1412 | ;; |
1413 | esac | |
1414 | ||
093e61a6 | 1415 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 |
4665e56c | 1416 | echo "configure:1417: checking for volatile" >&5 |
093e61a6 RS |
1417 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1419 | else |
093e61a6 | 1420 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1421 | #line 1422 "configure" |
093e61a6 | 1422 | #include "confdefs.h" |
414d23ae | 1423 | |
093e61a6 | 1424 | int main() { |
414d23ae | 1425 | volatile int foo; |
093e61a6 RS |
1426 | ; return 0; } |
1427 | EOF | |
4665e56c | 1428 | if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1429 | rm -rf conftest* |
414d23ae HPN |
1430 | gcc_cv_c_volatile=yes |
1431 | else | |
093e61a6 RS |
1432 | echo "configure: failed program was:" >&5 |
1433 | cat conftest.$ac_ext >&5 | |
1434 | rm -rf conftest* | |
1435 | gcc_cv_c_volatile=no | |
414d23ae | 1436 | fi |
093e61a6 | 1437 | rm -f conftest* |
414d23ae | 1438 | fi |
cafe096b | 1439 | |
093e61a6 RS |
1440 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 |
1441 | if test $gcc_cv_c_volatile = yes ; then | |
1442 | cat >> confdefs.h <<\EOF | |
414d23ae | 1443 | #define HAVE_VOLATILE 1 |
093e61a6 | 1444 | EOF |
414d23ae HPN |
1445 | |
1446 | fi | |
1447 | ||
1448 | ||
093e61a6 | 1449 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
4665e56c | 1450 | echo "configure:1451: checking for long double" >&5 |
093e61a6 RS |
1451 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1452 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1453 | else |
1454 | if test "$GCC" = yes; then | |
1455 | gcc_cv_c_long_double=yes | |
1456 | else | |
093e61a6 | 1457 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1458 | #line 1459 "configure" |
093e61a6 | 1459 | #include "confdefs.h" |
414d23ae | 1460 | |
093e61a6 | 1461 | int main() { |
414d23ae HPN |
1462 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ |
1463 | long double foo = 0.0; | |
1464 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1465 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
093e61a6 RS |
1466 | ; return 0; } |
1467 | EOF | |
4665e56c | 1468 | if { (eval echo configure:1469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1469 | rm -rf conftest* |
414d23ae HPN |
1470 | gcc_cv_c_long_double=yes |
1471 | else | |
093e61a6 RS |
1472 | echo "configure: failed program was:" >&5 |
1473 | cat conftest.$ac_ext >&5 | |
1474 | rm -rf conftest* | |
1475 | gcc_cv_c_long_double=no | |
414d23ae | 1476 | fi |
093e61a6 | 1477 | rm -f conftest* |
414d23ae HPN |
1478 | fi |
1479 | fi | |
cafe096b | 1480 | |
093e61a6 RS |
1481 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 |
1482 | if test $gcc_cv_c_long_double = yes; then | |
1483 | cat >> confdefs.h <<\EOF | |
414d23ae | 1484 | #define HAVE_LONG_DOUBLE 1 |
093e61a6 | 1485 | EOF |
414d23ae HPN |
1486 | |
1487 | fi | |
1488 | ||
093e61a6 | 1489 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
4665e56c | 1490 | echo "configure:1491: checking for long long int" >&5 |
093e61a6 RS |
1491 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1492 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1493 | else |
093e61a6 | 1494 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1495 | #line 1496 "configure" |
093e61a6 | 1496 | #include "confdefs.h" |
414d23ae | 1497 | |
093e61a6 | 1498 | int main() { |
414d23ae | 1499 | long long int i; |
093e61a6 RS |
1500 | ; return 0; } |
1501 | EOF | |
4665e56c | 1502 | if { (eval echo configure:1503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1503 | rm -rf conftest* |
414d23ae HPN |
1504 | ac_cv_c_long_long=yes |
1505 | else | |
093e61a6 RS |
1506 | echo "configure: failed program was:" >&5 |
1507 | cat conftest.$ac_ext >&5 | |
1508 | rm -rf conftest* | |
1509 | ac_cv_c_long_long=no | |
414d23ae | 1510 | fi |
093e61a6 | 1511 | rm -f conftest* |
414d23ae | 1512 | fi |
cafe096b | 1513 | |
093e61a6 RS |
1514 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1515 | if test $ac_cv_c_long_long = yes; then | |
1516 | cat >> confdefs.h <<\EOF | |
414d23ae | 1517 | #define HAVE_LONG_LONG 1 |
093e61a6 | 1518 | EOF |
414d23ae HPN |
1519 | |
1520 | fi | |
093e61a6 | 1521 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
4665e56c | 1522 | echo "configure:1523: checking for __int64" >&5 |
093e61a6 RS |
1523 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1524 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1525 | else | |
1526 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1527 | #line 1528 "configure" |
093e61a6 | 1528 | #include "confdefs.h" |
414d23ae | 1529 | |
093e61a6 | 1530 | int main() { |
414d23ae | 1531 | __int64 i; |
093e61a6 RS |
1532 | ; return 0; } |
1533 | EOF | |
4665e56c | 1534 | if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1535 | rm -rf conftest* |
414d23ae HPN |
1536 | ac_cv_c___int64=yes |
1537 | else | |
093e61a6 RS |
1538 | echo "configure: failed program was:" >&5 |
1539 | cat conftest.$ac_ext >&5 | |
1540 | rm -rf conftest* | |
1541 | ac_cv_c___int64=no | |
414d23ae | 1542 | fi |
093e61a6 | 1543 | rm -f conftest* |
414d23ae | 1544 | fi |
cafe096b | 1545 | |
093e61a6 RS |
1546 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1547 | if test $ac_cv_c___int64 = yes; then | |
1548 | cat >> confdefs.h <<\EOF | |
414d23ae | 1549 | #define HAVE___INT64 1 |
093e61a6 | 1550 | EOF |
414d23ae HPN |
1551 | |
1552 | fi | |
1553 | ||
093e61a6 | 1554 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
4665e56c | 1555 | echo "configure:1556: checking for built-in _Bool" >&5 |
093e61a6 RS |
1556 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1557 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1558 | else |
093e61a6 | 1559 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1560 | #line 1561 "configure" |
093e61a6 | 1561 | #include "confdefs.h" |
414d23ae | 1562 | |
093e61a6 | 1563 | int main() { |
414d23ae | 1564 | _Bool foo; |
093e61a6 RS |
1565 | ; return 0; } |
1566 | EOF | |
4665e56c | 1567 | if { (eval echo configure:1568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1568 | rm -rf conftest* |
414d23ae HPN |
1569 | gcc_cv_c__bool=yes |
1570 | else | |
093e61a6 RS |
1571 | echo "configure: failed program was:" >&5 |
1572 | cat conftest.$ac_ext >&5 | |
1573 | rm -rf conftest* | |
1574 | gcc_cv_c__bool=no | |
414d23ae | 1575 | fi |
093e61a6 | 1576 | rm -f conftest* |
414d23ae | 1577 | |
cafe096b | 1578 | fi |
cafe096b | 1579 | |
093e61a6 RS |
1580 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1581 | if test $gcc_cv_c__bool = yes; then | |
1582 | cat >> confdefs.h <<\EOF | |
414d23ae | 1583 | #define HAVE__BOOL 1 |
093e61a6 | 1584 | EOF |
414d23ae HPN |
1585 | |
1586 | fi | |
1587 | ||
1588 | ||
1589 | # sizeof(char) is 1 by definition. | |
093e61a6 | 1590 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
4665e56c | 1591 | echo "configure:1592: checking size of short" >&5 |
093e61a6 RS |
1592 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1593 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1594 | else |
4977bab6 | 1595 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1596 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1597 | #line 1598 "configure" |
093e61a6 | 1598 | #include "confdefs.h" |
414d23ae HPN |
1599 | #include "confdefs.h" |
1600 | #include <sys/types.h> | |
1601 | ||
1602 | ||
093e61a6 | 1603 | int main() { |
414d23ae | 1604 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
093e61a6 RS |
1605 | ; return 0; } |
1606 | EOF | |
4665e56c | 1607 | if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1608 | rm -rf conftest* |
414d23ae HPN |
1609 | ac_cv_sizeof_short=$ac_size |
1610 | else | |
093e61a6 RS |
1611 | echo "configure: failed program was:" >&5 |
1612 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1613 | fi |
093e61a6 | 1614 | rm -f conftest* |
414d23ae HPN |
1615 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1616 | done | |
1617 | ||
84c041a1 | 1618 | fi |
414d23ae HPN |
1619 | |
1620 | if test x$ac_cv_sizeof_short = x ; then | |
093e61a6 | 1621 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1622 | fi |
093e61a6 RS |
1623 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1624 | cat >> confdefs.h <<EOF | |
414d23ae | 1625 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
093e61a6 | 1626 | EOF |
84c041a1 | 1627 | |
414d23ae | 1628 | |
093e61a6 | 1629 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
4665e56c | 1630 | echo "configure:1631: checking size of int" >&5 |
093e61a6 RS |
1631 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1632 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1633 | else |
4977bab6 | 1634 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1635 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1636 | #line 1637 "configure" |
093e61a6 | 1637 | #include "confdefs.h" |
414d23ae HPN |
1638 | #include "confdefs.h" |
1639 | #include <sys/types.h> | |
1640 | ||
75e93faa | 1641 | |
093e61a6 | 1642 | int main() { |
414d23ae | 1643 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
093e61a6 RS |
1644 | ; return 0; } |
1645 | EOF | |
4665e56c | 1646 | if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1647 | rm -rf conftest* |
414d23ae | 1648 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1649 | else |
093e61a6 RS |
1650 | echo "configure: failed program was:" >&5 |
1651 | cat conftest.$ac_ext >&5 | |
75e93faa | 1652 | fi |
093e61a6 | 1653 | rm -f conftest* |
414d23ae | 1654 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1655 | done |
1656 | ||
1657 | fi | |
1658 | ||
414d23ae | 1659 | if test x$ac_cv_sizeof_int = x ; then |
093e61a6 | 1660 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1661 | fi |
093e61a6 RS |
1662 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1663 | cat >> confdefs.h <<EOF | |
414d23ae | 1664 | #define SIZEOF_INT $ac_cv_sizeof_int |
093e61a6 | 1665 | EOF |
75e93faa | 1666 | |
414d23ae | 1667 | |
093e61a6 | 1668 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
4665e56c | 1669 | echo "configure:1670: checking size of long" >&5 |
093e61a6 RS |
1670 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1672 | else |
4977bab6 | 1673 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1674 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1675 | #line 1676 "configure" |
093e61a6 | 1676 | #include "confdefs.h" |
75e93faa | 1677 | #include "confdefs.h" |
414d23ae HPN |
1678 | #include <sys/types.h> |
1679 | ||
75e93faa | 1680 | |
093e61a6 | 1681 | int main() { |
414d23ae | 1682 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
093e61a6 RS |
1683 | ; return 0; } |
1684 | EOF | |
4665e56c | 1685 | if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1686 | rm -rf conftest* |
414d23ae | 1687 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1688 | else |
093e61a6 RS |
1689 | echo "configure: failed program was:" >&5 |
1690 | cat conftest.$ac_ext >&5 | |
75e93faa | 1691 | fi |
093e61a6 | 1692 | rm -f conftest* |
414d23ae HPN |
1693 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1694 | done | |
75e93faa | 1695 | |
414d23ae | 1696 | fi |
75e93faa | 1697 | |
414d23ae | 1698 | if test x$ac_cv_sizeof_long = x ; then |
093e61a6 | 1699 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1700 | fi |
093e61a6 RS |
1701 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1702 | cat >> confdefs.h <<EOF | |
414d23ae | 1703 | #define SIZEOF_LONG $ac_cv_sizeof_long |
093e61a6 | 1704 | EOF |
75e93faa ZW |
1705 | |
1706 | ||
414d23ae | 1707 | if test $ac_cv_c_long_long = yes; then |
093e61a6 | 1708 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
4665e56c | 1709 | echo "configure:1710: checking size of long long" >&5 |
093e61a6 RS |
1710 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1711 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1712 | else |
4977bab6 | 1713 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1714 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1715 | #line 1716 "configure" |
093e61a6 | 1716 | #include "confdefs.h" |
414d23ae HPN |
1717 | #include "confdefs.h" |
1718 | #include <sys/types.h> | |
1719 | ||
04cabffc | 1720 | |
093e61a6 | 1721 | int main() { |
414d23ae | 1722 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
093e61a6 RS |
1723 | ; return 0; } |
1724 | EOF | |
4665e56c | 1725 | if { (eval echo configure:1726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1726 | rm -rf conftest* |
414d23ae | 1727 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1728 | else |
093e61a6 RS |
1729 | echo "configure: failed program was:" >&5 |
1730 | cat conftest.$ac_ext >&5 | |
04cabffc | 1731 | fi |
093e61a6 | 1732 | rm -f conftest* |
414d23ae HPN |
1733 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1734 | done | |
1735 | ||
04cabffc KG |
1736 | fi |
1737 | ||
414d23ae | 1738 | if test x$ac_cv_sizeof_long_long = x ; then |
093e61a6 | 1739 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1740 | fi |
093e61a6 RS |
1741 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1742 | cat >> confdefs.h <<EOF | |
414d23ae | 1743 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
093e61a6 | 1744 | EOF |
04cabffc | 1745 | |
04cabffc | 1746 | |
414d23ae HPN |
1747 | fi |
1748 | if test $ac_cv_c___int64 = yes; then | |
093e61a6 | 1749 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
4665e56c | 1750 | echo "configure:1751: checking size of __int64" >&5 |
093e61a6 RS |
1751 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1752 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1753 | else |
4977bab6 | 1754 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1755 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1756 | #line 1757 "configure" |
093e61a6 | 1757 | #include "confdefs.h" |
414d23ae HPN |
1758 | #include "confdefs.h" |
1759 | #include <sys/types.h> | |
1760 | ||
61842080 | 1761 | |
093e61a6 | 1762 | int main() { |
414d23ae | 1763 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
093e61a6 RS |
1764 | ; return 0; } |
1765 | EOF | |
4665e56c | 1766 | if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1767 | rm -rf conftest* |
414d23ae | 1768 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1769 | else |
093e61a6 RS |
1770 | echo "configure: failed program was:" >&5 |
1771 | cat conftest.$ac_ext >&5 | |
75e93faa | 1772 | fi |
093e61a6 | 1773 | rm -f conftest* |
414d23ae HPN |
1774 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1775 | done | |
1776 | ||
75e93faa ZW |
1777 | fi |
1778 | ||
414d23ae | 1779 | if test x$ac_cv_sizeof___int64 = x ; then |
093e61a6 | 1780 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1781 | fi |
093e61a6 RS |
1782 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1783 | cat >> confdefs.h <<EOF | |
414d23ae | 1784 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
093e61a6 | 1785 | EOF |
414d23ae | 1786 | |
cafe096b | 1787 | |
cafe096b | 1788 | fi |
cafe096b | 1789 | |
093e61a6 | 1790 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
4665e56c | 1791 | echo "configure:1792: checking execution character set" >&5 |
093e61a6 RS |
1792 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1793 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 1794 | else |
093e61a6 | 1795 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1796 | #line 1797 "configure" |
093e61a6 | 1797 | #include "confdefs.h" |
414d23ae HPN |
1798 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ |
1799 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1800 | ASCII | |
1801 | #endif | |
093e61a6 | 1802 | EOF |
414d23ae | 1803 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1804 | egrep "ASCII" >/dev/null 2>&1; then |
1805 | rm -rf conftest* | |
414d23ae HPN |
1806 | ac_cv_c_charset=ASCII |
1807 | fi | |
1808 | rm -f conftest* | |
5c3bc9fb | 1809 | |
414d23ae | 1810 | if test x${ac_cv_c_charset+set} != xset; then |
093e61a6 | 1811 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1812 | #line 1813 "configure" |
093e61a6 | 1813 | #include "confdefs.h" |
414d23ae HPN |
1814 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ |
1815 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1816 | EBCDIC | |
1817 | #endif | |
093e61a6 | 1818 | EOF |
414d23ae | 1819 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1820 | egrep "EBCDIC" >/dev/null 2>&1; then |
1821 | rm -rf conftest* | |
414d23ae HPN |
1822 | ac_cv_c_charset=EBCDIC |
1823 | fi | |
1824 | rm -f conftest* | |
1825 | ||
1826 | fi | |
1827 | if test x${ac_cv_c_charset+set} != xset; then | |
1828 | ac_cv_c_charset=unknown | |
1829 | fi | |
1830 | fi | |
093e61a6 RS |
1831 | |
1832 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
414d23ae | 1833 | if test $ac_cv_c_charset = unknown; then |
093e61a6 | 1834 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } |
414d23ae | 1835 | elif test $ac_cv_c_charset = EBCDIC; then |
093e61a6 | 1836 | cat >> confdefs.h <<\EOF |
414d23ae | 1837 | #define HOST_EBCDIC 1 |
093e61a6 | 1838 | EOF |
414d23ae HPN |
1839 | |
1840 | fi | |
1841 | ||
34a86c2b NN |
1842 | # ----------------- |
1843 | # Find Ada compiler | |
1844 | # ----------------- | |
1845 | ||
1846 | # See if GNAT has been installed | |
093e61a6 RS |
1847 | if test $host != $build; then |
1848 | ac_tool_prefix=${host_alias}- | |
1849 | else | |
1850 | ac_tool_prefix= | |
1851 | fi | |
34a86c2b NN |
1852 | |
1853 | ||
093e61a6 | 1854 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1855 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
093e61a6 | 1856 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 1857 | echo "configure:1858: checking for $ac_word" >&5 |
093e61a6 RS |
1858 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1859 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1860 | else |
1861 | if test -n "$GNATBIND"; then | |
1862 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1863 | else | |
093e61a6 RS |
1864 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1865 | ac_dummy="$PATH" | |
1866 | for ac_dir in $ac_dummy; do | |
1867 | test -z "$ac_dir" && ac_dir=. | |
1868 | if test -f $ac_dir/$ac_word; then | |
1869 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1870 | break | |
1871 | fi | |
1872 | done | |
1873 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1874 | fi |
1875 | fi | |
093e61a6 | 1876 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1877 | if test -n "$GNATBIND"; then |
093e61a6 | 1878 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1879 | else |
093e61a6 | 1880 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1881 | fi |
1882 | ||
093e61a6 | 1883 | |
34a86c2b | 1884 | if test -z "$ac_cv_prog_GNATBIND"; then |
093e61a6 | 1885 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1886 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1887 | set dummy gnatbind; ac_word=$2 | |
093e61a6 | 1888 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 1889 | echo "configure:1890: checking for $ac_word" >&5 |
093e61a6 RS |
1890 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1892 | else |
093e61a6 RS |
1893 | if test -n "$GNATBIND"; then |
1894 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1895 | else |
093e61a6 RS |
1896 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1897 | ac_dummy="$PATH" | |
1898 | for ac_dir in $ac_dummy; do | |
1899 | test -z "$ac_dir" && ac_dir=. | |
1900 | if test -f $ac_dir/$ac_word; then | |
1901 | ac_cv_prog_GNATBIND="gnatbind" | |
1902 | break | |
1903 | fi | |
1904 | done | |
1905 | IFS="$ac_save_ifs" | |
1906 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1907 | fi |
1908 | fi | |
093e61a6 RS |
1909 | GNATBIND="$ac_cv_prog_GNATBIND" |
1910 | if test -n "$GNATBIND"; then | |
1911 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1912 | else |
093e61a6 | 1913 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1914 | fi |
1915 | ||
1916 | else | |
093e61a6 RS |
1917 | GNATBIND="no" |
1918 | fi | |
34a86c2b NN |
1919 | fi |
1920 | ||
093e61a6 | 1921 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 |
4665e56c | 1922 | echo "configure:1923: checking for compiler driver that understands Ada" >&5 |
093e61a6 RS |
1923 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1924 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1925 | else |
1926 | cat >conftest.adb <<EOF | |
1927 | procedure conftest is begin null; end conftest; | |
1928 | EOF | |
1929 | gcc_cv_prog_adac=no | |
1930 | # Have to do ac_tool_prefix and user overrides by hand. | |
1931 | for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ | |
1932 | ${ac_tool_prefix}gcc gcc \ | |
1933 | ${ac_tool_prefix}cc cc \ | |
1934 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1935 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1936 | ${ac_tool_prefix}adagcc adagcc \ | |
1937 | ${ac_tool_prefix}adacc adacc ; do | |
1938 | # There is a bug in all released versions of GCC which causes the | |
1939 | # driver to exit successfully when the appropriate language module | |
1940 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1941 | # Therefore we must check for the error message as well as an | |
1942 | # unsuccessful exit. | |
1943 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1944 | if test x"$errors" = x; then | |
1945 | gcc_cv_prog_adac=$cand | |
1946 | break | |
1947 | fi | |
1948 | done | |
1949 | rm -f conftest.* | |
1950 | fi | |
093e61a6 RS |
1951 | |
1952 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
34a86c2b NN |
1953 | ADAC=$gcc_cv_prog_adac |
1954 | ||
1955 | ||
1956 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1957 | have_gnat=yes | |
1958 | else | |
1959 | have_gnat=no | |
1960 | fi | |
1961 | ||
1962 | ||
093e61a6 RS |
1963 | if test x$have_gnat != xno ; then |
1964 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
4665e56c | 1965 | echo "configure:1966: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1966 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1968 | else |
1969 | cat >conftest.adb <<EOF | |
1970 | procedure conftest is begin null; end conftest; | |
1971 | EOF | |
1972 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1973 | ac_cv_prog_adac_no_long_long=yes | |
1974 | else | |
1975 | ac_cv_prog_adac_no_long_long=no | |
1976 | fi | |
1977 | rm -f conftest* | |
1978 | fi | |
093e61a6 RS |
1979 | |
1980 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
34a86c2b NN |
1981 | else |
1982 | ac_cv_prog_adac_no_long_long=yes | |
1983 | fi | |
1984 | ||
1985 | # --------------------- | |
1986 | # Warnings and checking | |
1987 | # --------------------- | |
1988 | ||
1989 | strict1_warn= | |
1990 | if test $ac_cv_prog_cc_no_long_long = yes && \ | |
1991 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
1992 | strict1_warn="-pedantic -Wno-long-long" | |
1993 | fi | |
1994 | ||
1995 | ||
093e61a6 | 1996 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1997 | # That's useful for people building cross-compilers, or just running a |
1998 | # quick `make'. | |
1999 | warn_cflags= | |
2000 | if test "x$GCC" = "xyes"; then | |
2001 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
2002 | fi | |
2003 | ||
2004 | ||
dd859b8a KG |
2005 | # Enable -Werror in bootstrap stage2 and later. |
2006 | # Change the default to "no" on release branches. | |
2007 | # Check whether --enable-werror or --disable-werror was given. | |
2008 | if test "${enable_werror+set}" = set; then | |
2009 | enableval="$enable_werror" | |
093e61a6 | 2010 | : |
dd859b8a KG |
2011 | else |
2012 | enable_werror=yes | |
093e61a6 RS |
2013 | fi |
2014 | ||
dd859b8a KG |
2015 | if test x$enable_werror = xyes ; then |
2016 | WERROR=-Werror | |
2017 | fi | |
2018 | ||
2019 | ||
414d23ae HPN |
2020 | # Enable expensive internal checks |
2021 | # Check whether --enable-checking or --disable-checking was given. | |
2022 | if test "${enable_checking+set}" = set; then | |
2023 | enableval="$enable_checking" | |
2024 | ac_checking= | |
2025 | ac_tree_checking= | |
2026 | ac_rtl_checking= | |
2027 | ac_rtlflag_checking= | |
2028 | ac_gc_checking= | |
2029 | ac_gc_always_collect= | |
2030 | case "${enableval}" in | |
2031 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
2032 | ac_rtlflag_checking=1 ;; | |
2033 | no) ;; | |
2034 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
2035 | set fnord $enableval; shift | |
2036 | IFS="$ac_save_IFS" | |
2037 | for check | |
2038 | do | |
2039 | case $check in | |
2040 | misc) ac_checking=1 ;; | |
2041 | tree) ac_tree_checking=1 ;; | |
2042 | rtlflag) ac_rtlflag_checking=1 ;; | |
2043 | rtl) ac_rtl_checking=1 ;; | |
2044 | gc) ac_gc_checking=1 ;; | |
2045 | gcac) ac_gc_always_collect=1 ;; | |
2046 | valgrind) ac_checking_valgrind=1 ;; | |
093e61a6 | 2047 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
2048 | esac |
2049 | done | |
2050 | ;; | |
2051 | esac | |
2052 | ||
75e93faa | 2053 | else |
414d23ae HPN |
2054 | # Enable some checks by default for development versions of GCC |
2055 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
093e61a6 RS |
2056 | fi |
2057 | ||
414d23ae HPN |
2058 | nocommon_flag="" |
2059 | if test x$ac_checking != x ; then | |
093e61a6 | 2060 | cat >> confdefs.h <<\EOF |
414d23ae | 2061 | #define ENABLE_CHECKING 1 |
093e61a6 | 2062 | EOF |
75e93faa | 2063 | |
414d23ae HPN |
2064 | nocommon_flag=-fno-common |
2065 | fi | |
827ae6cf | 2066 | |
414d23ae | 2067 | if test x$ac_tree_checking != x ; then |
093e61a6 | 2068 | cat >> confdefs.h <<\EOF |
414d23ae | 2069 | #define ENABLE_TREE_CHECKING 1 |
093e61a6 | 2070 | EOF |
827ae6cf RO |
2071 | |
2072 | fi | |
414d23ae | 2073 | if test x$ac_rtl_checking != x ; then |
093e61a6 | 2074 | cat >> confdefs.h <<\EOF |
414d23ae | 2075 | #define ENABLE_RTL_CHECKING 1 |
093e61a6 | 2076 | EOF |
827ae6cf | 2077 | |
414d23ae HPN |
2078 | fi |
2079 | if test x$ac_rtlflag_checking != x ; then | |
093e61a6 | 2080 | cat >> confdefs.h <<\EOF |
414d23ae | 2081 | #define ENABLE_RTL_FLAG_CHECKING 1 |
093e61a6 | 2082 | EOF |
827ae6cf RO |
2083 | |
2084 | fi | |
414d23ae | 2085 | if test x$ac_gc_checking != x ; then |
093e61a6 | 2086 | cat >> confdefs.h <<\EOF |
414d23ae | 2087 | #define ENABLE_GC_CHECKING 1 |
093e61a6 | 2088 | EOF |
827ae6cf | 2089 | |
414d23ae HPN |
2090 | fi |
2091 | if test x$ac_gc_always_collect != x ; then | |
093e61a6 | 2092 | cat >> confdefs.h <<\EOF |
414d23ae | 2093 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
093e61a6 | 2094 | EOF |
75e93faa | 2095 | |
414d23ae HPN |
2096 | fi |
2097 | valgrind_path_defines= | |
2098 | valgrind_command= | |
2099 | if test x$ac_checking_valgrind != x ; then | |
2100 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2101 | # GCC relies on making annotations so we must have both. | |
093e61a6 | 2102 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 |
4665e56c | 2103 | echo "configure:2104: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 |
093e61a6 | 2104 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2105 | #line 2106 "configure" |
093e61a6 | 2106 | #include "confdefs.h" |
14011ca4 AJ |
2107 | #include <memcheck.h> |
2108 | #ifndef VALGRIND_DISCARD | |
2109 | #error VALGRIND_DISCARD not defined | |
2110 | #endif | |
093e61a6 RS |
2111 | EOF |
2112 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 2113 | { (eval echo configure:2114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2114 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2115 | if test -z "$ac_err"; then | |
2116 | rm -rf conftest* | |
14011ca4 AJ |
2117 | gcc_cv_header_memcheck_h=yes |
2118 | else | |
093e61a6 RS |
2119 | echo "$ac_err" >&5 |
2120 | echo "configure: failed program was:" >&5 | |
2121 | cat conftest.$ac_ext >&5 | |
2122 | rm -rf conftest* | |
cafe096b EC |
2123 | gcc_cv_header_memcheck_h=no |
2124 | fi | |
cafe096b | 2125 | rm -f conftest* |
093e61a6 RS |
2126 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 |
2127 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2128 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
4665e56c | 2129 | echo "configure:2130: checking for valgrind.h" >&5 |
093e61a6 RS |
2130 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2131 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2132 | else | |
2133 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 2134 | #line 2135 "configure" |
093e61a6 RS |
2135 | #include "confdefs.h" |
2136 | #include <valgrind.h> | |
2137 | EOF | |
2138 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 2139 | { (eval echo configure:2140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2140 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2141 | if test -z "$ac_err"; then | |
2142 | rm -rf conftest* | |
2143 | eval "ac_cv_header_$ac_safe=yes" | |
2144 | else | |
2145 | echo "$ac_err" >&5 | |
2146 | echo "configure: failed program was:" >&5 | |
2147 | cat conftest.$ac_ext >&5 | |
2148 | rm -rf conftest* | |
2149 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa | 2150 | fi |
093e61a6 | 2151 | rm -f conftest* |
414d23ae | 2152 | fi |
093e61a6 RS |
2153 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2154 | echo "$ac_t""yes" 1>&6 | |
414d23ae HPN |
2155 | have_valgrind_h=yes |
2156 | else | |
093e61a6 RS |
2157 | echo "$ac_t""no" 1>&6 |
2158 | have_valgrind_h=no | |
75e93faa ZW |
2159 | fi |
2160 | ||
414d23ae HPN |
2161 | # Extract the first word of "valgrind", so it can be a program name with args. |
2162 | set dummy valgrind; ac_word=$2 | |
093e61a6 | 2163 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2164 | echo "configure:2165: checking for $ac_word" >&5 |
093e61a6 RS |
2165 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2167 | else |
2168 | case "$valgrind_path" in | |
2169 | /*) | |
2170 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2171 | ;; | |
2172 | *) | |
2173 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2174 | for ac_dir in $PATH; do | |
2175 | test -z "$ac_dir" && ac_dir=. | |
2176 | if test -f $ac_dir/$ac_word; then | |
2177 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2178 | ac_cv_path_valgrind_path="$ac_dir/$ac_word" | |
2179 | break | |
2180 | fi | |
2181 | fi | |
2182 | done | |
2183 | IFS="$ac_save_ifs" | |
2184 | ;; | |
2185 | esac | |
75e93faa | 2186 | fi |
414d23ae HPN |
2187 | valgrind_path="$ac_cv_path_valgrind_path" |
2188 | if test -n "$valgrind_path"; then | |
093e61a6 | 2189 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2190 | else |
093e61a6 | 2191 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2192 | fi |
2193 | ||
72bd67f9 | 2194 | if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then |
093e61a6 | 2195 | { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; } |
414d23ae HPN |
2196 | fi |
2197 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2198 | valgrind_command="$valgrind_path -q" | |
093e61a6 | 2199 | cat >> confdefs.h <<\EOF |
414d23ae | 2200 | #define ENABLE_VALGRIND_CHECKING 1 |
093e61a6 | 2201 | EOF |
75e93faa | 2202 | |
14011ca4 | 2203 | if test $gcc_cv_header_memcheck_h = yes; then |
093e61a6 | 2204 | cat >> confdefs.h <<\EOF |
14011ca4 | 2205 | #define HAVE_MEMCHECK_H 1 |
093e61a6 | 2206 | EOF |
14011ca4 AJ |
2207 | |
2208 | fi | |
414d23ae | 2209 | fi |
75e93faa | 2210 | |
75e93faa ZW |
2211 | |
2212 | ||
414d23ae HPN |
2213 | # Enable code coverage collection |
2214 | # Check whether --enable-coverage or --disable-coverage was given. | |
2215 | if test "${enable_coverage+set}" = set; then | |
2216 | enableval="$enable_coverage" | |
2217 | case "${enableval}" in | |
2218 | yes|noopt) | |
eb70d86d | 2219 | coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1" |
414d23ae HPN |
2220 | ;; |
2221 | opt) | |
eb70d86d | 2222 | coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2" |
414d23ae HPN |
2223 | ;; |
2224 | *) | |
093e61a6 | 2225 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2226 | ;; |
2227 | esac | |
75e93faa | 2228 | else |
414d23ae | 2229 | coverage_flags="" |
093e61a6 RS |
2230 | fi |
2231 | ||
5c3bc9fb | 2232 | |
414d23ae | 2233 | |
73458fb7 NN |
2234 | # ------------------------------- |
2235 | # Miscenalleous configure options | |
2236 | # ------------------------------- | |
34a86c2b NN |
2237 | |
2238 | # With stabs | |
2239 | # Check whether --with-stabs or --without-stabs was given. | |
2240 | if test "${with_stabs+set}" = set; then | |
2241 | withval="$with_stabs" | |
2242 | stabs="$with_stabs" | |
2243 | else | |
2244 | stabs=no | |
093e61a6 | 2245 | fi |
34a86c2b | 2246 | |
cafe096b | 2247 | |
093e61a6 | 2248 | # With ELF |
34a86c2b NN |
2249 | # Check whether --with-elf or --without-elf was given. |
2250 | if test "${with_elf+set}" = set; then | |
2251 | withval="$with_elf" | |
2252 | elf="$with_elf" | |
2253 | else | |
2254 | elf=no | |
093e61a6 RS |
2255 | fi |
2256 | ||
34a86c2b NN |
2257 | |
2258 | # Determine whether or not multilibs are enabled. | |
2259 | # Check whether --enable-multilib or --disable-multilib was given. | |
2260 | if test "${enable_multilib+set}" = set; then | |
2261 | enableval="$enable_multilib" | |
093e61a6 | 2262 | : |
34a86c2b NN |
2263 | else |
2264 | enable_multilib=yes | |
093e61a6 RS |
2265 | fi |
2266 | ||
75e93faa | 2267 | |
34a86c2b | 2268 | |
414d23ae HPN |
2269 | # Enable __cxa_atexit for C++. |
2270 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2271 | if test "${enable___cxa_atexit+set}" = set; then | |
2272 | enableval="$enable___cxa_atexit" | |
093e61a6 RS |
2273 | : |
2274 | fi | |
75e93faa ZW |
2275 | |
2276 | ||
414d23ae HPN |
2277 | # Enable Multibyte Characters for C/C++ |
2278 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
2279 | if test "${enable_c_mbchar+set}" = set; then | |
2280 | enableval="$enable_c_mbchar" | |
2281 | if test x$enable_c_mbchar != xno; then | |
093e61a6 | 2282 | cat >> confdefs.h <<\EOF |
414d23ae | 2283 | #define MULTIBYTE_CHARS 1 |
093e61a6 | 2284 | EOF |
414d23ae HPN |
2285 | |
2286 | fi | |
093e61a6 | 2287 | fi |
75e93faa | 2288 | |
093e61a6 | 2289 | |
414d23ae HPN |
2290 | # Enable threads |
2291 | # Pass with no value to take the default | |
2292 | # Pass with a value to specify a thread package | |
2293 | # Check whether --enable-threads or --disable-threads was given. | |
2294 | if test "${enable_threads+set}" = set; then | |
2295 | enableval="$enable_threads" | |
093e61a6 | 2296 | : |
414d23ae HPN |
2297 | else |
2298 | enable_threads='' | |
093e61a6 RS |
2299 | fi |
2300 | ||
414d23ae HPN |
2301 | |
2302 | enable_threads_flag=$enable_threads | |
2303 | # Check if a valid thread package | |
2304 | case x${enable_threads_flag} in | |
2305 | x | xno) | |
2306 | # No threads | |
2307 | target_thread_file='single' | |
2308 | ;; | |
2309 | xyes) | |
2310 | # default | |
2311 | target_thread_file='' | |
2312 | ;; | |
2313 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
6d412a7b | 2314 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat) |
414d23ae HPN |
2315 | target_thread_file=$enable_threads_flag |
2316 | ;; | |
2317 | *) | |
2318 | echo "$enable_threads is an unknown thread package" 1>&2 | |
2319 | exit 1 | |
2320 | ;; | |
2321 | esac | |
2322 | ||
2323 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2324 | if test "${enable_objc_gc+set}" = set; then | |
2325 | enableval="$enable_objc_gc" | |
2326 | if test x$enable_objc_gc = xno; then | |
2327 | objc_boehm_gc='' | |
2328 | else | |
2329 | objc_boehm_gc=1 | |
2330 | fi | |
2331 | else | |
2332 | objc_boehm_gc='' | |
093e61a6 | 2333 | fi |
75e93faa ZW |
2334 | |
2335 | ||
414d23ae HPN |
2336 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2337 | if test "${with_dwarf2+set}" = set; then | |
2338 | withval="$with_dwarf2" | |
2339 | dwarf2="$with_dwarf2" | |
75e93faa | 2340 | else |
414d23ae | 2341 | dwarf2=no |
093e61a6 RS |
2342 | fi |
2343 | ||
75e93faa | 2344 | |
414d23ae HPN |
2345 | # Check whether --enable-shared or --disable-shared was given. |
2346 | if test "${enable_shared+set}" = set; then | |
2347 | enableval="$enable_shared" | |
093e61a6 | 2348 | |
414d23ae HPN |
2349 | case $enable_shared in |
2350 | yes | no) ;; | |
2351 | *) | |
2352 | enable_shared=no | |
2353 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2354 | for pkg in $enableval; do | |
2355 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2356 | enable_shared=yes | |
2357 | fi | |
2358 | done | |
2359 | IFS="$ac_save_ifs" | |
2360 | ;; | |
2361 | esac | |
2362 | ||
75e93faa | 2363 | else |
414d23ae | 2364 | enable_shared=yes |
093e61a6 | 2365 | fi |
75e93faa | 2366 | |
75e93faa | 2367 | |
75e93faa | 2368 | |
4977bab6 ZW |
2369 | # Check whether --with-sysroot or --without-sysroot was given. |
2370 | if test "${with_sysroot+set}" = set; then | |
2371 | withval="$with_sysroot" | |
093e61a6 | 2372 | |
4977bab6 | 2373 | case ${with_sysroot} in |
91710e62 | 2374 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
4977bab6 ZW |
2375 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2376 | esac | |
093e61a6 | 2377 | |
4977bab6 ZW |
2378 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2379 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2380 | ||
047d636f DJ |
2381 | if test "x$exec_prefix" = xNONE; then |
2382 | if test "x$prefix" = xNONE; then | |
2383 | test_prefix=/usr/local | |
2384 | else | |
2385 | test_prefix=$prefix | |
2386 | fi | |
2387 | else | |
2388 | test_prefix=$exec_prefix | |
2389 | fi | |
2390 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2391 | "${test_prefix}"|"${test_prefix}/"*|\ |
2392 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2393 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2394 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2395 | ;; | |
2396 | esac | |
2397 | ||
4977bab6 | 2398 | else |
093e61a6 | 2399 | |
4977bab6 | 2400 | TARGET_SYSTEM_ROOT= |
db720d9a | 2401 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2402 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2403 | ||
093e61a6 RS |
2404 | fi |
2405 | ||
4977bab6 ZW |
2406 | |
2407 | ||
2408 | ||
2409 | ||
73458fb7 NN |
2410 | # ------------------------- |
2411 | # Checks for other programs | |
2412 | # ------------------------- | |
5b67ad6f | 2413 | |
093e61a6 | 2414 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
4665e56c | 2415 | echo "configure:2416: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
093e61a6 RS |
2416 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2417 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2418 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2419 | else |
093e61a6 | 2420 | cat > conftestmake <<\EOF |
e9a25f70 | 2421 | all: |
093e61a6 RS |
2422 | @echo 'ac_maketemp="${MAKE}"' |
2423 | EOF | |
e9a25f70 | 2424 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
093e61a6 | 2425 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2426 | if test -n "$ac_maketemp"; then |
2427 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2428 | else | |
2429 | eval ac_cv_prog_make_${ac_make}_set=no | |
2430 | fi | |
093e61a6 | 2431 | rm -f conftestmake |
e9a25f70 JL |
2432 | fi |
2433 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
093e61a6 | 2434 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2435 | SET_MAKE= |
2436 | else | |
093e61a6 | 2437 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2438 | SET_MAKE="MAKE=${MAKE-make}" |
2439 | fi | |
2440 | ||
2441 | ||
861bb6c1 | 2442 | # Find some useful tools |
2853bc5a | 2443 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 2444 | do |
093e61a6 | 2445 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2446 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 2447 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2448 | echo "configure:2449: checking for $ac_word" >&5 |
093e61a6 RS |
2449 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2450 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2451 | else |
2452 | if test -n "$AWK"; then | |
2453 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2454 | else | |
093e61a6 RS |
2455 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2456 | ac_dummy="$PATH" | |
2457 | for ac_dir in $ac_dummy; do | |
2458 | test -z "$ac_dir" && ac_dir=. | |
2459 | if test -f $ac_dir/$ac_word; then | |
2460 | ac_cv_prog_AWK="$ac_prog" | |
2461 | break | |
2462 | fi | |
2463 | done | |
2464 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2465 | fi |
2466 | fi | |
093e61a6 | 2467 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2468 | if test -n "$AWK"; then |
093e61a6 | 2469 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2470 | else |
093e61a6 | 2471 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2472 | fi |
2473 | ||
093e61a6 | 2474 | test -n "$AWK" && break |
861bb6c1 JL |
2475 | done |
2476 | ||
093e61a6 | 2477 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
4665e56c | 2478 | echo "configure:2479: checking whether ln works" >&5 |
093e61a6 RS |
2479 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2481 | else |
2482 | rm -f conftestdata_t | |
2483 | echo >conftestdata_f | |
2484 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2485 | then | |
2486 | gcc_cv_prog_LN="ln" | |
2487 | else | |
2488 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2489 | then | |
2490 | gcc_cv_prog_LN="ln -s" | |
2491 | else | |
2492 | gcc_cv_prog_LN=cp | |
2493 | fi | |
2494 | fi | |
2495 | rm -f conftestdata_f conftestdata_t | |
2496 | ||
2497 | fi | |
2498 | LN="$gcc_cv_prog_LN" | |
2499 | if test "$gcc_cv_prog_LN" = "ln"; then | |
093e61a6 | 2500 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2501 | else |
2502 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
093e61a6 | 2503 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2504 | else |
093e61a6 | 2505 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2506 | fi |
2507 | fi | |
2508 | ||
093e61a6 | 2509 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
4665e56c | 2510 | echo "configure:2511: checking whether ln -s works" >&5 |
093e61a6 RS |
2511 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2513 | else |
2514 | rm -f conftestdata_t | |
2515 | echo >conftestdata_f | |
2516 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2517 | then | |
2518 | gcc_cv_prog_LN_S="ln -s" | |
2519 | else | |
2520 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2521 | then | |
2522 | gcc_cv_prog_LN_S=ln | |
2523 | else | |
2524 | gcc_cv_prog_LN_S=cp | |
2525 | fi | |
2526 | fi | |
2527 | rm -f conftestdata_f conftestdata_t | |
2528 | ||
2529 | fi | |
2530 | LN_S="$gcc_cv_prog_LN_S" | |
2531 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
093e61a6 | 2532 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2533 | else |
2534 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
093e61a6 | 2535 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2536 | else |
093e61a6 | 2537 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2538 | fi |
2539 | fi | |
2540 | ||
093e61a6 RS |
2541 | # Extract the first word of "ranlib", so it can be a program name with args. |
2542 | set dummy ranlib; ac_word=$2 | |
2543 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4665e56c | 2544 | echo "configure:2545: checking for $ac_word" >&5 |
093e61a6 RS |
2545 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2546 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2547 | else |
2548 | if test -n "$RANLIB"; then | |
2549 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2550 | else | |
093e61a6 RS |
2551 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2552 | ac_dummy="$PATH" | |
2553 | for ac_dir in $ac_dummy; do | |
2554 | test -z "$ac_dir" && ac_dir=. | |
2555 | if test -f $ac_dir/$ac_word; then | |
2556 | ac_cv_prog_RANLIB="ranlib" | |
2557 | break | |
2558 | fi | |
2559 | done | |
2560 | IFS="$ac_save_ifs" | |
2561 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
861bb6c1 JL |
2562 | fi |
2563 | fi | |
093e61a6 | 2564 | RANLIB="$ac_cv_prog_RANLIB" |
861bb6c1 | 2565 | if test -n "$RANLIB"; then |
093e61a6 | 2566 | echo "$ac_t""$RANLIB" 1>&6 |
cafe096b | 2567 | else |
093e61a6 | 2568 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2569 | fi |
2570 | ||
0a4b6309 RL |
2571 | # Find a good install program. We prefer a C program (faster), |
2572 | # so one script is as good as another. But avoid the broken or | |
2573 | # incompatible versions: | |
2574 | # SysV /etc/install, /usr/sbin/install | |
2575 | # SunOS /usr/etc/install | |
2576 | # IRIX /sbin/install | |
2577 | # AIX /bin/install | |
2578 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2579 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2580 | # ./install, which can be erroneously created by make from ./install.sh. | |
093e61a6 | 2581 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
4665e56c | 2582 | echo "configure:2583: checking for a BSD compatible install" >&5 |
0a4b6309 | 2583 | if test -z "$INSTALL"; then |
093e61a6 RS |
2584 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2585 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2586 | else |
2587 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2588 | for ac_dir in $PATH; do | |
2589 | # Account for people who put trailing slashes in PATH elements. | |
2590 | case "$ac_dir/" in | |
2591 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2592 | *) | |
2593 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2594 | for ac_prog in ginstall scoinst install; do | |
2595 | if test -f $ac_dir/$ac_prog; then | |
2596 | if test $ac_prog = install && | |
2597 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2598 | # AIX install. It has an incompatible calling convention. | |
2599 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2600 | : | |
2601 | else | |
2602 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2603 | break 2 | |
2604 | fi | |
2605 | fi | |
2606 | done | |
2607 | ;; | |
2608 | esac | |
2609 | done | |
2610 | IFS="$ac_save_IFS" | |
2611 | ||
2612 | fi | |
2613 | if test "${ac_cv_path_install+set}" = set; then | |
2614 | INSTALL="$ac_cv_path_install" | |
2615 | else | |
2616 | # As a last resort, use the slow shell script. We don't cache a | |
2617 | # path for INSTALL within a source directory, because that will | |
2618 | # break other packages using the cache if that directory is | |
2619 | # removed, or if the path is relative. | |
2620 | INSTALL="$ac_install_sh" | |
2621 | fi | |
2622 | fi | |
093e61a6 | 2623 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2624 | |
2625 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2626 | # It thinks the first close brace ends the variable substitution. | |
2627 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2628 | ||
2629 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2630 | ||
861bb6c1 | 2631 | |
73458fb7 NN |
2632 | # See if we have the mktemp command. |
2633 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2634 | set dummy mktemp; ac_word=$2 | |
093e61a6 | 2635 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2636 | echo "configure:2637: checking for $ac_word" >&5 |
093e61a6 RS |
2637 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2639 | else |
2640 | if test -n "$have_mktemp_command"; then | |
2641 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2642 | else | |
093e61a6 RS |
2643 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2644 | ac_dummy="$PATH" | |
2645 | for ac_dir in $ac_dummy; do | |
2646 | test -z "$ac_dir" && ac_dir=. | |
2647 | if test -f $ac_dir/$ac_word; then | |
2648 | ac_cv_prog_have_mktemp_command="yes" | |
2649 | break | |
2650 | fi | |
2651 | done | |
2652 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2653 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2654 | fi | |
2655 | fi | |
093e61a6 | 2656 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2657 | if test -n "$have_mktemp_command"; then |
093e61a6 | 2658 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2659 | else |
093e61a6 | 2660 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2661 | fi |
2662 | ||
2663 | ||
2664 | # Do we have a single-tree copy of texinfo? | |
2665 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2666 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2667 | gcc_cv_prog_makeinfo_modern=yes | |
093e61a6 | 2668 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2669 | else |
2670 | # See if makeinfo has been installed and is modern enough | |
2671 | # that we can use it. | |
2672 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2673 | set dummy makeinfo; ac_word=$2 | |
093e61a6 | 2674 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2675 | echo "configure:2676: checking for $ac_word" >&5 |
093e61a6 RS |
2676 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2677 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2678 | else |
2679 | if test -n "$MAKEINFO"; then | |
2680 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2681 | else | |
093e61a6 RS |
2682 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2683 | ac_dummy="$PATH" | |
2684 | for ac_dir in $ac_dummy; do | |
2685 | test -z "$ac_dir" && ac_dir=. | |
2686 | if test -f $ac_dir/$ac_word; then | |
2687 | ac_cv_prog_MAKEINFO="makeinfo" | |
2688 | break | |
2689 | fi | |
2690 | done | |
2691 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2692 | fi |
2693 | fi | |
093e61a6 | 2694 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2695 | if test -n "$MAKEINFO"; then |
093e61a6 | 2696 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2697 | else |
093e61a6 | 2698 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2699 | fi |
2700 | ||
2701 | if test -n "$MAKEINFO"; then | |
2702 | # Found it, now check the version. | |
093e61a6 | 2703 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
4665e56c | 2704 | echo "configure:2705: checking for modern makeinfo" >&5 |
093e61a6 RS |
2705 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2706 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2707 | else |
2708 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2709 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
4665e56c | 2710 | echo "configure:2711: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2711 | case $ac_prog_version in |
2712 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2713 | 4.[2-9]*) | |
2714 | gcc_cv_prog_makeinfo_modern=yes;; | |
2715 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2716 | esac | |
2717 | ||
2718 | fi | |
093e61a6 RS |
2719 | |
2720 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2721 | else |
2722 | gcc_cv_prog_makeinfo_modern=no | |
2723 | fi | |
2724 | ||
2725 | fi | |
2726 | ||
2727 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
093e61a6 | 2728 | echo "configure: warning: |
cafe096b | 2729 | *** Makeinfo is missing or too old. |
093e61a6 | 2730 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2731 | BUILD_INFO= |
2732 | else | |
093e61a6 | 2733 | BUILD_INFO=info |
73458fb7 NN |
2734 | fi |
2735 | ||
2736 | # Is pod2man recent enough to regenerate manpages? | |
093e61a6 | 2737 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
4665e56c | 2738 | echo "configure:2739: checking for recent Pod::Man" >&5 |
73458fb7 | 2739 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
093e61a6 RS |
2740 | echo "$ac_t""yes" 1>&6 |
2741 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2742 | else |
093e61a6 | 2743 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2744 | GENERATED_MANPAGES= |
2745 | fi | |
2746 | ||
baade80b PE |
2747 | # 'make compare' can be significantly faster, if cmp itself can |
2748 | # skip bytes instead of using tail. The test being performed is | |
2749 | # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" | |
2750 | # but we need to sink errors and handle broken shells. | |
093e61a6 | 2751 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 |
4665e56c | 2752 | echo "configure:2753: checking for cmp's capabilities" >&5 |
baade80b PE |
2753 | echo abfoo >t1 |
2754 | echo cdfoo >t2 | |
2755 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
2756 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
2757 | make_compare_target=slowcompare | |
2758 | else | |
2759 | make_compare_target=gnucompare | |
2760 | fi | |
c7a5cf61 PE |
2761 | else |
2762 | make_compare_target=slowcompare | |
2763 | fi | |
baade80b | 2764 | rm t1 t2 |
c7a5cf61 | 2765 | |
093e61a6 | 2766 | echo "$ac_t""$make_compare_target" 1>&6 |
c7a5cf61 | 2767 | |
73458fb7 NN |
2768 | # How about lex? |
2769 | if test -f $srcdir/../flex/skel.c; then | |
2770 | FLEX='$(objdir)/../flex/flex' | |
2771 | else | |
2772 | # Extract the first word of "flex", so it can be a program name with args. | |
2773 | set dummy flex; ac_word=$2 | |
093e61a6 | 2774 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2775 | echo "configure:2776: checking for $ac_word" >&5 |
093e61a6 RS |
2776 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2778 | else |
2779 | if test -n "$FLEX"; then | |
2780 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2781 | else | |
093e61a6 RS |
2782 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2783 | ac_dummy="$PATH" | |
2784 | for ac_dir in $ac_dummy; do | |
2785 | test -z "$ac_dir" && ac_dir=. | |
2786 | if test -f $ac_dir/$ac_word; then | |
2787 | ac_cv_prog_FLEX="flex" | |
2788 | break | |
2789 | fi | |
2790 | done | |
2791 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2792 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2793 | fi | |
2794 | fi | |
093e61a6 | 2795 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2796 | if test -n "$FLEX"; then |
093e61a6 | 2797 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2798 | else |
093e61a6 | 2799 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2800 | fi |
2801 | ||
2802 | fi | |
2803 | ||
2804 | # Bison? | |
2805 | # The -L switch is so bison can find its skeleton file. | |
2806 | if test -f $srcdir/../bison/bison.simple; then | |
2807 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2808 | else | |
2809 | # Extract the first word of "bison", so it can be a program name with args. | |
2810 | set dummy bison; ac_word=$2 | |
093e61a6 | 2811 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 2812 | echo "configure:2813: checking for $ac_word" >&5 |
093e61a6 RS |
2813 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2814 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2815 | else |
2816 | if test -n "$BISON"; then | |
2817 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2818 | else | |
093e61a6 RS |
2819 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2820 | ac_dummy="$PATH" | |
2821 | for ac_dir in $ac_dummy; do | |
2822 | test -z "$ac_dir" && ac_dir=. | |
2823 | if test -f $ac_dir/$ac_word; then | |
2824 | ac_cv_prog_BISON="bison" | |
2825 | break | |
2826 | fi | |
2827 | done | |
2828 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2829 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2830 | fi | |
2831 | fi | |
093e61a6 | 2832 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2833 | if test -n "$BISON"; then |
093e61a6 | 2834 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2835 | else |
093e61a6 | 2836 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2837 | fi |
2838 | ||
2839 | fi | |
2840 | ||
2841 | # -------------------- | |
2842 | # Checks for C headers | |
2843 | # -------------------- | |
2844 | ||
093e61a6 | 2845 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
4665e56c | 2846 | echo "configure:2847: checking for GNU C library" >&5 |
093e61a6 RS |
2847 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2848 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2849 | else | |
2850 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 2851 | #line 2852 "configure" |
093e61a6 | 2852 | #include "confdefs.h" |
73458fb7 | 2853 | #include <features.h> |
093e61a6 | 2854 | int main() { |
73458fb7 NN |
2855 | |
2856 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2857 | #error Not a GNU C library system | |
2858 | #endif | |
093e61a6 RS |
2859 | ; return 0; } |
2860 | EOF | |
4665e56c | 2861 | if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2862 | rm -rf conftest* |
73458fb7 NN |
2863 | gcc_cv_glibc=yes |
2864 | else | |
093e61a6 RS |
2865 | echo "configure: failed program was:" >&5 |
2866 | cat conftest.$ac_ext >&5 | |
2867 | rm -rf conftest* | |
2868 | gcc_cv_glibc=no | |
73458fb7 | 2869 | fi |
093e61a6 | 2870 | rm -f conftest* |
73458fb7 NN |
2871 | fi |
2872 | ||
093e61a6 | 2873 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2874 | if test $gcc_cv_glibc = yes; then |
093e61a6 | 2875 | cat >> confdefs.h <<\EOF |
73458fb7 | 2876 | #define _GNU_SOURCE 1 |
093e61a6 | 2877 | EOF |
73458fb7 NN |
2878 | |
2879 | fi | |
2880 | ||
093e61a6 | 2881 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
4665e56c | 2882 | echo "configure:2883: checking for ANSI C header files" >&5 |
093e61a6 RS |
2883 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2884 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2885 | else |
093e61a6 | 2886 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2887 | #line 2888 "configure" |
093e61a6 | 2888 | #include "confdefs.h" |
956d6950 JL |
2889 | #include <stdlib.h> |
2890 | #include <stdarg.h> | |
2891 | #include <string.h> | |
2892 | #include <float.h> | |
093e61a6 RS |
2893 | EOF |
2894 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 2895 | { (eval echo configure:2896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2896 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2897 | if test -z "$ac_err"; then | |
2898 | rm -rf conftest* | |
956d6950 JL |
2899 | ac_cv_header_stdc=yes |
2900 | else | |
093e61a6 RS |
2901 | echo "$ac_err" >&5 |
2902 | echo "configure: failed program was:" >&5 | |
2903 | cat conftest.$ac_ext >&5 | |
2904 | rm -rf conftest* | |
2905 | ac_cv_header_stdc=no | |
956d6950 | 2906 | fi |
093e61a6 | 2907 | rm -f conftest* |
956d6950 JL |
2908 | |
2909 | if test $ac_cv_header_stdc = yes; then | |
2910 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
093e61a6 | 2911 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2912 | #line 2913 "configure" |
093e61a6 | 2913 | #include "confdefs.h" |
956d6950 | 2914 | #include <string.h> |
093e61a6 | 2915 | EOF |
956d6950 | 2916 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2917 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2918 | : |
2919 | else | |
093e61a6 | 2920 | rm -rf conftest* |
956d6950 JL |
2921 | ac_cv_header_stdc=no |
2922 | fi | |
2923 | rm -f conftest* | |
2924 | ||
2925 | fi | |
2926 | ||
2927 | if test $ac_cv_header_stdc = yes; then | |
2928 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
093e61a6 | 2929 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2930 | #line 2931 "configure" |
093e61a6 | 2931 | #include "confdefs.h" |
956d6950 | 2932 | #include <stdlib.h> |
093e61a6 | 2933 | EOF |
956d6950 | 2934 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2935 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2936 | : |
2937 | else | |
093e61a6 | 2938 | rm -rf conftest* |
956d6950 JL |
2939 | ac_cv_header_stdc=no |
2940 | fi | |
2941 | rm -f conftest* | |
2942 | ||
2943 | fi | |
2944 | ||
2945 | if test $ac_cv_header_stdc = yes; then | |
2946 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
093e61a6 | 2947 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2948 | : |
2949 | else | |
093e61a6 | 2950 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2951 | #line 2952 "configure" |
093e61a6 | 2952 | #include "confdefs.h" |
956d6950 | 2953 | #include <ctype.h> |
093e61a6 RS |
2954 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2955 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
cafe096b | 2956 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
093e61a6 RS |
2957 | int main () { int i; for (i = 0; i < 256; i++) |
2958 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2959 | exit (0); } | |
2960 | ||
2961 | EOF | |
4665e56c | 2962 | if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 2963 | then |
956d6950 JL |
2964 | : |
2965 | else | |
093e61a6 RS |
2966 | echo "configure: failed program was:" >&5 |
2967 | cat conftest.$ac_ext >&5 | |
2968 | rm -fr conftest* | |
2969 | ac_cv_header_stdc=no | |
956d6950 | 2970 | fi |
093e61a6 | 2971 | rm -fr conftest* |
956d6950 | 2972 | fi |
093e61a6 | 2973 | |
956d6950 JL |
2974 | fi |
2975 | fi | |
cafe096b | 2976 | |
093e61a6 RS |
2977 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2978 | if test $ac_cv_header_stdc = yes; then | |
2979 | cat >> confdefs.h <<\EOF | |
956d6950 | 2980 | #define STDC_HEADERS 1 |
093e61a6 | 2981 | EOF |
956d6950 JL |
2982 | |
2983 | fi | |
2984 | ||
093e61a6 | 2985 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
4665e56c | 2986 | echo "configure:2987: checking whether time.h and sys/time.h may both be included" >&5 |
093e61a6 RS |
2987 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2988 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2989 | else |
093e61a6 | 2990 | cat > conftest.$ac_ext <<EOF |
4665e56c | 2991 | #line 2992 "configure" |
093e61a6 | 2992 | #include "confdefs.h" |
956d6950 JL |
2993 | #include <sys/types.h> |
2994 | #include <sys/time.h> | |
2995 | #include <time.h> | |
093e61a6 RS |
2996 | int main() { |
2997 | struct tm *tp; | |
2998 | ; return 0; } | |
2999 | EOF | |
4665e56c | 3000 | if { (eval echo configure:3001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3001 | rm -rf conftest* |
956d6950 JL |
3002 | ac_cv_header_time=yes |
3003 | else | |
093e61a6 RS |
3004 | echo "configure: failed program was:" >&5 |
3005 | cat conftest.$ac_ext >&5 | |
3006 | rm -rf conftest* | |
3007 | ac_cv_header_time=no | |
956d6950 | 3008 | fi |
093e61a6 | 3009 | rm -f conftest* |
956d6950 | 3010 | fi |
cafe096b | 3011 | |
093e61a6 RS |
3012 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
3013 | if test $ac_cv_header_time = yes; then | |
3014 | cat >> confdefs.h <<\EOF | |
956d6950 | 3015 | #define TIME_WITH_SYS_TIME 1 |
093e61a6 | 3016 | EOF |
956d6950 JL |
3017 | |
3018 | fi | |
3019 | ||
093e61a6 | 3020 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
4665e56c | 3021 | echo "configure:3022: checking for working stdbool.h" >&5 |
093e61a6 RS |
3022 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
3023 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 3024 | else |
093e61a6 | 3025 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3026 | #line 3027 "configure" |
093e61a6 | 3027 | #include "confdefs.h" |
827ae6cf | 3028 | #include <stdbool.h> |
093e61a6 | 3029 | int main() { |
827ae6cf | 3030 | bool foo = false; |
093e61a6 RS |
3031 | ; return 0; } |
3032 | EOF | |
4665e56c | 3033 | if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3034 | rm -rf conftest* |
827ae6cf RO |
3035 | ac_cv_header_stdbool_h=yes |
3036 | else | |
093e61a6 RS |
3037 | echo "configure: failed program was:" >&5 |
3038 | cat conftest.$ac_ext >&5 | |
3039 | rm -rf conftest* | |
3040 | ac_cv_header_stdbool_h=no | |
827ae6cf | 3041 | fi |
093e61a6 | 3042 | rm -f conftest* |
827ae6cf | 3043 | fi |
cafe096b | 3044 | |
093e61a6 RS |
3045 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
3046 | if test $ac_cv_header_stdbool_h = yes; then | |
3047 | cat >> confdefs.h <<\EOF | |
827ae6cf | 3048 | #define HAVE_STDBOOL_H 1 |
093e61a6 | 3049 | EOF |
827ae6cf RO |
3050 | |
3051 | fi | |
3052 | ||
093e61a6 | 3053 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
4665e56c | 3054 | echo "configure:3055: checking whether string.h and strings.h may both be included" >&5 |
093e61a6 RS |
3055 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
3056 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 3057 | else |
093e61a6 | 3058 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3059 | #line 3060 "configure" |
093e61a6 | 3060 | #include "confdefs.h" |
0a4b6309 RL |
3061 | #include <string.h> |
3062 | #include <strings.h> | |
093e61a6 | 3063 | int main() { |
0a4b6309 | 3064 | |
093e61a6 RS |
3065 | ; return 0; } |
3066 | EOF | |
4665e56c | 3067 | if { (eval echo configure:3068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3068 | rm -rf conftest* |
0a4b6309 RL |
3069 | gcc_cv_header_string=yes |
3070 | else | |
093e61a6 RS |
3071 | echo "configure: failed program was:" >&5 |
3072 | cat conftest.$ac_ext >&5 | |
3073 | rm -rf conftest* | |
3074 | gcc_cv_header_string=no | |
0a4b6309 | 3075 | fi |
093e61a6 | 3076 | rm -f conftest* |
0a4b6309 | 3077 | fi |
cafe096b | 3078 | |
093e61a6 RS |
3079 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
3080 | if test $gcc_cv_header_string = yes; then | |
3081 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3082 | #define STRING_WITH_STRINGS 1 |
093e61a6 | 3083 | EOF |
0a4b6309 RL |
3084 | |
3085 | fi | |
3086 | ||
093e61a6 | 3087 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
4665e56c | 3088 | echo "configure:3089: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
093e61a6 RS |
3089 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
3090 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 3091 | else |
093e61a6 | 3092 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3093 | #line 3094 "configure" |
093e61a6 | 3094 | #include "confdefs.h" |
e9831ca0 KG |
3095 | #include <sys/types.h> |
3096 | #include <sys/wait.h> | |
3097 | #ifndef WEXITSTATUS | |
093e61a6 | 3098 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
3099 | #endif |
3100 | #ifndef WIFEXITED | |
093e61a6 | 3101 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 3102 | #endif |
093e61a6 RS |
3103 | int main() { |
3104 | int s; | |
3105 | wait (&s); | |
3106 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3107 | ; return 0; } | |
3108 | EOF | |
4665e56c | 3109 | if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3110 | rm -rf conftest* |
e9831ca0 KG |
3111 | ac_cv_header_sys_wait_h=yes |
3112 | else | |
093e61a6 RS |
3113 | echo "configure: failed program was:" >&5 |
3114 | cat conftest.$ac_ext >&5 | |
3115 | rm -rf conftest* | |
3116 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 3117 | fi |
093e61a6 | 3118 | rm -f conftest* |
e9831ca0 | 3119 | fi |
cafe096b | 3120 | |
093e61a6 RS |
3121 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
3122 | if test $ac_cv_header_sys_wait_h = yes; then | |
3123 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 3124 | #define HAVE_SYS_WAIT_H 1 |
093e61a6 | 3125 | EOF |
e9831ca0 KG |
3126 | |
3127 | fi | |
3128 | ||
093e61a6 | 3129 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3130 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3131 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
2bd02043 | 3132 | direct.h malloc.h langinfo.h ldfcn.h wchar.h |
861bb6c1 | 3133 | do |
093e61a6 RS |
3134 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3135 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4665e56c | 3136 | echo "configure:3137: checking for $ac_hdr" >&5 |
093e61a6 RS |
3137 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3138 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3139 | else | |
3140 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3141 | #line 3142 "configure" |
093e61a6 RS |
3142 | #include "confdefs.h" |
3143 | #include <$ac_hdr> | |
3144 | EOF | |
3145 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 3146 | { (eval echo configure:3147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3147 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3148 | if test -z "$ac_err"; then | |
3149 | rm -rf conftest* | |
3150 | eval "ac_cv_header_$ac_safe=yes" | |
3151 | else | |
3152 | echo "$ac_err" >&5 | |
3153 | echo "configure: failed program was:" >&5 | |
3154 | cat conftest.$ac_ext >&5 | |
3155 | rm -rf conftest* | |
3156 | eval "ac_cv_header_$ac_safe=no" | |
956d6950 | 3157 | fi |
093e61a6 | 3158 | rm -f conftest* |
956d6950 | 3159 | fi |
093e61a6 RS |
3160 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3161 | echo "$ac_t""yes" 1>&6 | |
3162 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3163 | cat >> confdefs.h <<EOF | |
3164 | #define $ac_tr_hdr 1 | |
3165 | EOF | |
3166 | ||
3167 | else | |
3168 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3169 | fi |
3170 | done | |
3171 | ||
3172 | ||
f24af81b | 3173 | # Check for thread headers. |
093e61a6 RS |
3174 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3175 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
4665e56c | 3176 | echo "configure:3177: checking for thread.h" >&5 |
093e61a6 RS |
3177 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3178 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3179 | else | |
3180 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3181 | #line 3182 "configure" |
093e61a6 | 3182 | #include "confdefs.h" |
cafe096b | 3183 | #include <thread.h> |
093e61a6 RS |
3184 | EOF |
3185 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 3186 | { (eval echo configure:3187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3187 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3188 | if test -z "$ac_err"; then | |
3189 | rm -rf conftest* | |
3190 | eval "ac_cv_header_$ac_safe=yes" | |
3191 | else | |
3192 | echo "$ac_err" >&5 | |
3193 | echo "configure: failed program was:" >&5 | |
3194 | cat conftest.$ac_ext >&5 | |
3195 | rm -rf conftest* | |
3196 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3197 | fi |
093e61a6 | 3198 | rm -f conftest* |
f24af81b | 3199 | fi |
093e61a6 RS |
3200 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3201 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3202 | have_thread_h=yes |
3203 | else | |
093e61a6 RS |
3204 | echo "$ac_t""no" 1>&6 |
3205 | have_thread_h= | |
f24af81b TT |
3206 | fi |
3207 | ||
093e61a6 RS |
3208 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3209 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
4665e56c | 3210 | echo "configure:3211: checking for pthread.h" >&5 |
093e61a6 RS |
3211 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3212 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3213 | else |
093e61a6 | 3214 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3215 | #line 3216 "configure" |
093e61a6 | 3216 | #include "confdefs.h" |
cafe096b | 3217 | #include <pthread.h> |
093e61a6 RS |
3218 | EOF |
3219 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 3220 | { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3221 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3222 | if test -z "$ac_err"; then | |
3223 | rm -rf conftest* | |
3224 | eval "ac_cv_header_$ac_safe=yes" | |
3225 | else | |
3226 | echo "$ac_err" >&5 | |
3227 | echo "configure: failed program was:" >&5 | |
3228 | cat conftest.$ac_ext >&5 | |
3229 | rm -rf conftest* | |
3230 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3231 | fi |
093e61a6 | 3232 | rm -f conftest* |
f24af81b | 3233 | fi |
093e61a6 RS |
3234 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3235 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3236 | have_pthread_h=yes |
3237 | else | |
093e61a6 RS |
3238 | echo "$ac_t""no" 1>&6 |
3239 | have_pthread_h= | |
f24af81b TT |
3240 | fi |
3241 | ||
3242 | ||
84c041a1 | 3243 | # These tests can't be done till we know if we have limits.h. |
093e61a6 | 3244 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
4665e56c | 3245 | echo "configure:3246: checking for CHAR_BIT" >&5 |
093e61a6 RS |
3246 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3247 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3248 | else | |
3249 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3250 | #line 3251 "configure" |
093e61a6 | 3251 | #include "confdefs.h" |
75e93faa ZW |
3252 | #ifdef HAVE_LIMITS_H |
3253 | #include <limits.h> | |
3254 | #endif | |
3255 | #ifdef CHAR_BIT | |
3256 | found | |
3257 | #endif | |
093e61a6 | 3258 | EOF |
75e93faa | 3259 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3260 | egrep "found" >/dev/null 2>&1; then |
3261 | rm -rf conftest* | |
75e93faa ZW |
3262 | gcc_cv_decl_char_bit=yes |
3263 | else | |
093e61a6 | 3264 | rm -rf conftest* |
75e93faa ZW |
3265 | gcc_cv_decl_char_bit=no |
3266 | fi | |
3267 | rm -f conftest* | |
3268 | ||
3269 | ||
3270 | fi | |
093e61a6 RS |
3271 | |
3272 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3273 | if test $gcc_cv_decl_char_bit = no; then |
093e61a6 | 3274 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
4665e56c | 3275 | echo "configure:3276: checking number of bits in a byte" >&5 |
093e61a6 RS |
3276 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3277 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3278 | else |
3279 | i=8 | |
3280 | gcc_cv_c_nbby= | |
3281 | while test $i -lt 65; do | |
093e61a6 | 3282 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3283 | #line 3284 "configure" |
093e61a6 | 3284 | #include "confdefs.h" |
75e93faa | 3285 | |
093e61a6 | 3286 | int main() { |
4e70264f ZW |
3287 | switch(0) { |
3288 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3289 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3290 | ; } | |
093e61a6 RS |
3291 | ; return 0; } |
3292 | EOF | |
4665e56c | 3293 | if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3294 | rm -rf conftest* |
4e70264f | 3295 | gcc_cv_c_nbby=$i; break |
75e93faa | 3296 | else |
093e61a6 RS |
3297 | echo "configure: failed program was:" >&5 |
3298 | cat conftest.$ac_ext >&5 | |
75e93faa | 3299 | fi |
093e61a6 | 3300 | rm -f conftest* |
75e93faa ZW |
3301 | i=`expr $i + 1` |
3302 | done | |
3303 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3304 | ||
3305 | fi | |
093e61a6 RS |
3306 | |
3307 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3308 | if test $gcc_cv_c_nbby = failed; then |
093e61a6 | 3309 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3310 | else |
093e61a6 | 3311 | cat >> confdefs.h <<EOF |
75e93faa | 3312 | #define CHAR_BIT $gcc_cv_c_nbby |
093e61a6 | 3313 | EOF |
75e93faa ZW |
3314 | |
3315 | fi | |
3316 | fi | |
093e61a6 | 3317 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
4665e56c | 3318 | echo "configure:3319: checking whether byte ordering is bigendian" >&5 |
093e61a6 RS |
3319 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3321 | else |
4977bab6 ZW |
3322 | ac_cv_c_bigendian=unknown |
3323 | # See if sys/param.h defines the BYTE_ORDER macro. | |
093e61a6 | 3324 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3325 | #line 3326 "configure" |
093e61a6 | 3326 | #include "confdefs.h" |
4977bab6 ZW |
3327 | #include <sys/types.h> |
3328 | #include <sys/param.h> | |
093e61a6 | 3329 | int main() { |
2d6eb5bf | 3330 | |
4977bab6 ZW |
3331 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3332 | bogus endian macros | |
84c041a1 | 3333 | #endif |
093e61a6 RS |
3334 | ; return 0; } |
3335 | EOF | |
4665e56c | 3336 | if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3337 | rm -rf conftest* |
4977bab6 | 3338 | # It does; now see whether it defined to BIG_ENDIAN or not. |
093e61a6 | 3339 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3340 | #line 3341 "configure" |
093e61a6 | 3341 | #include "confdefs.h" |
4977bab6 ZW |
3342 | #include <sys/types.h> |
3343 | #include <sys/param.h> | |
093e61a6 | 3344 | int main() { |
4977bab6 ZW |
3345 | |
3346 | #if BYTE_ORDER != BIG_ENDIAN | |
3347 | not big endian | |
84c041a1 | 3348 | #endif |
093e61a6 RS |
3349 | ; return 0; } |
3350 | EOF | |
4665e56c | 3351 | if { (eval echo configure:3352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3352 | rm -rf conftest* |
4977bab6 ZW |
3353 | ac_cv_c_bigendian=yes |
3354 | else | |
093e61a6 RS |
3355 | echo "configure: failed program was:" >&5 |
3356 | cat conftest.$ac_ext >&5 | |
3357 | rm -rf conftest* | |
3358 | ac_cv_c_bigendian=no | |
4977bab6 | 3359 | fi |
093e61a6 | 3360 | rm -f conftest* |
4977bab6 | 3361 | else |
093e61a6 RS |
3362 | echo "configure: failed program was:" >&5 |
3363 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3364 | fi |
093e61a6 | 3365 | rm -f conftest* |
4977bab6 ZW |
3366 | if test $ac_cv_c_bigendian = unknown; then |
3367 | if test "$cross_compiling" = yes; then | |
093e61a6 RS |
3368 | echo $ac_n "cross-compiling... " 2>&6 |
3369 | else | |
3370 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3371 | #line 3372 "configure" |
093e61a6 | 3372 | #include "confdefs.h" |
4977bab6 ZW |
3373 | main () { |
3374 | /* Are we little or big endian? From Harbison&Steele. */ | |
3375 | union | |
3376 | { | |
3377 | long l; | |
3378 | char c[sizeof (long)]; | |
3379 | } u; | |
3380 | u.l = 1; | |
3381 | exit (u.c[sizeof (long) - 1] == 1); | |
3382 | } | |
093e61a6 | 3383 | EOF |
4665e56c | 3384 | if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3385 | then |
4977bab6 ZW |
3386 | ac_cv_c_bigendian=no |
3387 | else | |
093e61a6 RS |
3388 | echo "configure: failed program was:" >&5 |
3389 | cat conftest.$ac_ext >&5 | |
3390 | rm -fr conftest* | |
3391 | ac_cv_c_bigendian=yes | |
4977bab6 | 3392 | fi |
093e61a6 | 3393 | rm -fr conftest* |
84c041a1 | 3394 | fi |
093e61a6 | 3395 | |
4977bab6 ZW |
3396 | fi |
3397 | fi | |
093e61a6 RS |
3398 | |
3399 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3400 | if test $ac_cv_c_bigendian = unknown; then |
093e61a6 | 3401 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
4665e56c | 3402 | echo "configure:3403: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3403 | |
4977bab6 ZW |
3404 | cat >conftest.c <<EOF |
3405 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3406 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3407 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3408 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3409 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3410 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3411 | int main() { _ascii (); _ebcdic (); return 0; } | |
3412 | EOF | |
3413 | if test -f conftest.c ; then | |
3414 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3415 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3416 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3417 | ac_cv_c_bigendian=yes | |
3418 | fi | |
3419 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3420 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3421 | if test $ac_cv_c_bigendian = yes ; then | |
3422 | ac_cv_c_bigendian=unknown; | |
3423 | else | |
3424 | ac_cv_c_bigendian=no | |
3425 | fi | |
3426 | fi | |
3427 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3428 | fi | |
3429 | fi | |
093e61a6 | 3430 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3431 | fi |
4977bab6 | 3432 | if test $ac_cv_c_bigendian = yes; then |
093e61a6 | 3433 | cat >> confdefs.h <<\EOF |
4977bab6 | 3434 | #define WORDS_BIGENDIAN 1 |
093e61a6 | 3435 | EOF |
cafe096b | 3436 | |
093e61a6 | 3437 | cat >> confdefs.h <<\EOF |
84c041a1 | 3438 | #define HOST_WORDS_BIG_ENDIAN 1 |
093e61a6 | 3439 | EOF |
84c041a1 | 3440 | |
4977bab6 ZW |
3441 | BYTEORDER=4321 |
3442 | else | |
3443 | BYTEORDER=1234 | |
3444 | fi | |
093e61a6 | 3445 | cat >> confdefs.h <<EOF |
4977bab6 | 3446 | #define BYTEORDER $BYTEORDER |
093e61a6 | 3447 | EOF |
4977bab6 ZW |
3448 | |
3449 | if test $ac_cv_c_bigendian = unknown; then | |
093e61a6 | 3450 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3451 | fi |
3452 | ||
75e93faa | 3453 | |
73458fb7 NN |
3454 | # -------- |
3455 | # UNSORTED | |
3456 | # -------- | |
1e608388 | 3457 | |
73458fb7 NN |
3458 | # Stage specific cflags for build. |
3459 | stage1_cflags= | |
3460 | case $build in | |
3461 | vax-*-*) | |
3462 | if test x$GCC = xyes | |
3463 | then | |
3464 | stage1_cflags="-Wa,-J" | |
3465 | else | |
3466 | stage1_cflags="-J" | |
3467 | fi | |
3468 | ;; | |
3469 | powerpc-*-darwin*) | |
3470 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3471 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3472 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3473 | # that too. | |
3474 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3475 | ;; | |
3476 | esac | |
1e608388 | 3477 | |
1e608388 | 3478 | |
4e70264f ZW |
3479 | # These libraries may be used by collect2. |
3480 | # We may need a special search path to get them linked. | |
093e61a6 | 3481 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
4665e56c | 3482 | echo "configure:3483: checking for collect2 libraries" >&5 |
093e61a6 RS |
3483 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3485 | else |
3486 | save_LIBS="$LIBS" | |
7f2749d4 | 3487 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3488 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3489 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3490 | do | |
3491 | LIBS="$libs" | |
093e61a6 | 3492 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3493 | #line 3494 "configure" |
093e61a6 | 3494 | #include "confdefs.h" |
4e70264f ZW |
3495 | /* Override any gcc2 internal prototype to avoid an error. */ |
3496 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3497 | builtin and then its argument prototype would still apply. */ |
3498 | char ldopen(); | |
3499 | ||
3500 | int main() { | |
3501 | ldopen() | |
3502 | ; return 0; } | |
3503 | EOF | |
4665e56c | 3504 | if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3505 | rm -rf conftest* |
4e70264f ZW |
3506 | gcc_cv_collect2_libs="$libs"; break |
3507 | else | |
093e61a6 RS |
3508 | echo "configure: failed program was:" >&5 |
3509 | cat conftest.$ac_ext >&5 | |
4e70264f | 3510 | fi |
093e61a6 | 3511 | rm -f conftest* |
4e70264f ZW |
3512 | done |
3513 | LIBS="$save_LIBS" | |
3514 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3515 | fi | |
093e61a6 RS |
3516 | |
3517 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3518 | case $gcc_cv_collect2_libs in |
3519 | "none required") ;; | |
3520 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3521 | esac | |
3522 | ||
3523 | ||
7f2749d4 RK |
3524 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3525 | # -lexc. So test for it. | |
3526 | save_LIBS="$LIBS" | |
3527 | LIBS= | |
3528 | ||
093e61a6 | 3529 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
4665e56c | 3530 | echo "configure:3531: checking for library containing exc_resume" >&5 |
093e61a6 RS |
3531 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3532 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3533 | else | |
3534 | ac_func_search_save_LIBS="$LIBS" | |
3535 | ac_cv_search_exc_resume="no" | |
3536 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3537 | #line 3538 "configure" |
093e61a6 | 3538 | #include "confdefs.h" |
7f2749d4 RK |
3539 | /* Override any gcc2 internal prototype to avoid an error. */ |
3540 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3541 | builtin and then its argument prototype would still apply. */ |
3542 | char exc_resume(); | |
3543 | ||
3544 | int main() { | |
3545 | exc_resume() | |
3546 | ; return 0; } | |
3547 | EOF | |
4665e56c | 3548 | if { (eval echo configure:3549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3549 | rm -rf conftest* |
7f2749d4 RK |
3550 | ac_cv_search_exc_resume="none required" |
3551 | else | |
093e61a6 RS |
3552 | echo "configure: failed program was:" >&5 |
3553 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3554 | fi |
093e61a6 RS |
3555 | rm -f conftest* |
3556 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3557 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3558 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3559 | #line 3560 "configure" |
093e61a6 | 3560 | #include "confdefs.h" |
7f2749d4 RK |
3561 | /* Override any gcc2 internal prototype to avoid an error. */ |
3562 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3563 | builtin and then its argument prototype would still apply. */ |
3564 | char exc_resume(); | |
3565 | ||
3566 | int main() { | |
3567 | exc_resume() | |
3568 | ; return 0; } | |
3569 | EOF | |
4665e56c | 3570 | if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3571 | rm -rf conftest* |
3572 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3573 | break |
3574 | else | |
093e61a6 RS |
3575 | echo "configure: failed program was:" >&5 |
3576 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3577 | fi |
093e61a6 RS |
3578 | rm -f conftest* |
3579 | done | |
3580 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3581 | fi |
cafe096b | 3582 | |
093e61a6 RS |
3583 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3584 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3585 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3586 | ||
3587 | else : | |
3588 | ||
7f2749d4 RK |
3589 | fi |
3590 | GNAT_LIBEXC="$LIBS" | |
3591 | LIBS="$save_LIBS" | |
3592 | ||
3593 | ||
62c9aa5f ZW |
3594 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3595 | # they're both in the same place. jcf-dump needs them. | |
3596 | save_LIBS="$LIBS" | |
3597 | LIBS= | |
3598 | ||
093e61a6 | 3599 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
4665e56c | 3600 | echo "configure:3601: checking for library containing ldexp" >&5 |
093e61a6 RS |
3601 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3602 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3603 | else | |
3604 | ac_func_search_save_LIBS="$LIBS" | |
3605 | ac_cv_search_ldexp="no" | |
3606 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3607 | #line 3608 "configure" |
093e61a6 | 3608 | #include "confdefs.h" |
62c9aa5f ZW |
3609 | /* Override any gcc2 internal prototype to avoid an error. */ |
3610 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3611 | builtin and then its argument prototype would still apply. */ |
3612 | char ldexp(); | |
3613 | ||
3614 | int main() { | |
3615 | ldexp() | |
3616 | ; return 0; } | |
3617 | EOF | |
4665e56c | 3618 | if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3619 | rm -rf conftest* |
62c9aa5f ZW |
3620 | ac_cv_search_ldexp="none required" |
3621 | else | |
093e61a6 RS |
3622 | echo "configure: failed program was:" >&5 |
3623 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3624 | fi |
093e61a6 RS |
3625 | rm -f conftest* |
3626 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3627 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3628 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3629 | #line 3630 "configure" |
093e61a6 | 3630 | #include "confdefs.h" |
62c9aa5f ZW |
3631 | /* Override any gcc2 internal prototype to avoid an error. */ |
3632 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3633 | builtin and then its argument prototype would still apply. */ |
3634 | char ldexp(); | |
3635 | ||
3636 | int main() { | |
3637 | ldexp() | |
3638 | ; return 0; } | |
3639 | EOF | |
4665e56c | 3640 | if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3641 | rm -rf conftest* |
3642 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3643 | break |
3644 | else | |
093e61a6 RS |
3645 | echo "configure: failed program was:" >&5 |
3646 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3647 | fi |
093e61a6 RS |
3648 | rm -f conftest* |
3649 | done | |
3650 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3651 | fi |
cafe096b | 3652 | |
093e61a6 RS |
3653 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3654 | if test "$ac_cv_search_ldexp" != "no"; then | |
3655 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3656 | ||
3657 | else : | |
3658 | ||
62c9aa5f ZW |
3659 | fi |
3660 | LDEXP_LIB="$LIBS" | |
3661 | LIBS="$save_LIBS" | |
3662 | ||
3663 | ||
890ad3ea | 3664 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3665 | # preprocessor stringification operator. (Used by symcat.h.) |
093e61a6 RS |
3666 | |
3667 | ||
3668 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
4665e56c | 3669 | echo "configure:3670: checking for preprocessor stringizing operator" >&5 |
093e61a6 RS |
3670 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
3671 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3672 | else | |
3673 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3674 | #line 3675 "configure" |
093e61a6 RS |
3675 | #include "confdefs.h" |
3676 | ||
890ad3ea KG |
3677 | #define x(y) #y |
3678 | ||
3679 | char *s = x(teststring); | |
093e61a6 RS |
3680 | |
3681 | EOF | |
890ad3ea | 3682 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3683 | egrep "#teststring" >/dev/null 2>&1; then |
3684 | rm -rf conftest* | |
890ad3ea | 3685 | ac_cv_c_stringize=no |
76844337 | 3686 | else |
093e61a6 | 3687 | rm -rf conftest* |
890ad3ea | 3688 | ac_cv_c_stringize=yes |
76844337 RH |
3689 | fi |
3690 | rm -f conftest* | |
890ad3ea | 3691 | |
76844337 RH |
3692 | fi |
3693 | ||
093e61a6 RS |
3694 | if test "${ac_cv_c_stringize}" = yes |
3695 | then | |
3696 | cat >> confdefs.h <<\EOF | |
890ad3ea | 3697 | #define HAVE_STRINGIZE 1 |
093e61a6 | 3698 | EOF |
76844337 RH |
3699 | |
3700 | fi | |
093e61a6 | 3701 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
890ad3ea | 3702 | |
76844337 | 3703 | |
956d6950 JL |
3704 | # Use <inttypes.h> only if it exists, |
3705 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
093e61a6 | 3706 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
4665e56c | 3707 | echo "configure:3708: checking for inttypes.h" >&5 |
093e61a6 RS |
3708 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3709 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3710 | else | |
3711 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3712 | #line 3713 "configure" |
093e61a6 | 3713 | #include "confdefs.h" |
956d6950 JL |
3714 | #include <sys/types.h> |
3715 | #include <inttypes.h> | |
093e61a6 | 3716 | int main() { |
956d6950 | 3717 | intmax_t i = -1; |
093e61a6 RS |
3718 | ; return 0; } |
3719 | EOF | |
4665e56c | 3720 | if { (eval echo configure:3721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3721 | rm -rf conftest* |
0056a9b5 | 3722 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3723 | else |
093e61a6 RS |
3724 | echo "configure: failed program was:" >&5 |
3725 | cat conftest.$ac_ext >&5 | |
3726 | rm -rf conftest* | |
3727 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3728 | fi |
093e61a6 | 3729 | rm -f conftest* |
956d6950 JL |
3730 | fi |
3731 | ||
093e61a6 | 3732 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3733 | if test $gcc_cv_header_inttypes_h = yes; then |
093e61a6 | 3734 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3735 | #define HAVE_INTTYPES_H 1 |
093e61a6 | 3736 | EOF |
0056a9b5 KG |
3737 | |
3738 | fi | |
956d6950 | 3739 | |
c149cc37 | 3740 | |
6af8c740 KG |
3741 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3742 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 | 3743 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
8eb6a092 | 3744 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore |
956d6950 | 3745 | do |
093e61a6 | 3746 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
4665e56c | 3747 | echo "configure:3748: checking for $ac_func" >&5 |
093e61a6 RS |
3748 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3749 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3750 | else | |
3751 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3752 | #line 3753 "configure" |
093e61a6 | 3753 | #include "confdefs.h" |
956d6950 | 3754 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
3755 | which can conflict with char $ac_func(); below. */ |
3756 | #include <assert.h> | |
956d6950 JL |
3757 | /* Override any gcc2 internal prototype to avoid an error. */ |
3758 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3759 | builtin and then its argument prototype would still apply. */ |
3760 | char $ac_func(); | |
3761 | ||
3762 | int main() { | |
3763 | ||
956d6950 JL |
3764 | /* The GNU C library defines this for functions which it implements |
3765 | to always fail with ENOSYS. Some functions are actually named | |
3766 | something starting with __ and the normal name is an alias. */ | |
3767 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3768 | choke me | |
3769 | #else | |
093e61a6 | 3770 | $ac_func(); |
956d6950 JL |
3771 | #endif |
3772 | ||
093e61a6 RS |
3773 | ; return 0; } |
3774 | EOF | |
4665e56c | 3775 | if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3776 | rm -rf conftest* |
3777 | eval "ac_cv_func_$ac_func=yes" | |
3778 | else | |
3779 | echo "configure: failed program was:" >&5 | |
3780 | cat conftest.$ac_ext >&5 | |
3781 | rm -rf conftest* | |
3782 | eval "ac_cv_func_$ac_func=no" | |
3783 | fi | |
3784 | rm -f conftest* | |
3785 | fi | |
956d6950 | 3786 | |
093e61a6 RS |
3787 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3788 | echo "$ac_t""yes" 1>&6 | |
3789 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3790 | cat >> confdefs.h <<EOF | |
3791 | #define $ac_tr_func 1 | |
3792 | EOF | |
3793 | ||
3794 | else | |
3795 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3796 | fi |
3797 | done | |
3798 | ||
6885fc87 | 3799 | |
39f6c4c8 | 3800 | if test x$ac_cv_func_mbstowcs = xyes; then |
093e61a6 | 3801 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
4665e56c | 3802 | echo "configure:3803: checking whether mbstowcs works" >&5 |
093e61a6 RS |
3803 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3804 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3805 | else |
3806 | if test "$cross_compiling" = yes; then | |
3807 | gcc_cv_func_mbstowcs_works=yes | |
3808 | else | |
093e61a6 | 3809 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3810 | #line 3811 "configure" |
093e61a6 | 3811 | #include "confdefs.h" |
39f6c4c8 KW |
3812 | #include <stdlib.h> |
3813 | int main() | |
3814 | { | |
3815 | mbstowcs(0, "", 0); | |
3816 | return 0; | |
3817 | } | |
093e61a6 | 3818 | EOF |
4665e56c | 3819 | if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3820 | then |
39f6c4c8 KW |
3821 | gcc_cv_func_mbstowcs_works=yes |
3822 | else | |
093e61a6 RS |
3823 | echo "configure: failed program was:" >&5 |
3824 | cat conftest.$ac_ext >&5 | |
3825 | rm -fr conftest* | |
3826 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3827 | fi |
093e61a6 | 3828 | rm -fr conftest* |
39f6c4c8 | 3829 | fi |
093e61a6 | 3830 | |
39f6c4c8 | 3831 | fi |
cafe096b | 3832 | |
093e61a6 RS |
3833 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3834 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3835 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3836 | #define HAVE_WORKING_MBSTOWCS 1 |
093e61a6 | 3837 | EOF |
39f6c4c8 KW |
3838 | |
3839 | fi | |
3840 | fi | |
3841 | ||
093e61a6 | 3842 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
4665e56c | 3843 | echo "configure:3844: checking for ssize_t" >&5 |
093e61a6 RS |
3844 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3845 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f12bc141 | 3846 | else |
093e61a6 | 3847 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3848 | #line 3849 "configure" |
093e61a6 RS |
3849 | #include "confdefs.h" |
3850 | #include <sys/types.h> | |
3851 | #if STDC_HEADERS | |
3852 | #include <stdlib.h> | |
3853 | #include <stddef.h> | |
3854 | #endif | |
3855 | EOF | |
3856 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3857 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3858 | rm -rf conftest* | |
cb65112a | 3859 | ac_cv_type_ssize_t=yes |
f12bc141 | 3860 | else |
093e61a6 RS |
3861 | rm -rf conftest* |
3862 | ac_cv_type_ssize_t=no | |
f12bc141 | 3863 | fi |
093e61a6 | 3864 | rm -f conftest* |
cafe096b | 3865 | |
093e61a6 RS |
3866 | fi |
3867 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3868 | if test $ac_cv_type_ssize_t = no; then | |
3869 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3870 | #define ssize_t int |
093e61a6 | 3871 | EOF |
f12bc141 ZW |
3872 | |
3873 | fi | |
3874 | ||
0b9d02c6 | 3875 | |
e256b8b6 DA |
3876 | # Try to determine the array type of the second argument of getgroups |
3877 | # for the target system (int or gid_t). | |
093e61a6 | 3878 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
4665e56c | 3879 | echo "configure:3880: checking for uid_t in sys/types.h" >&5 |
093e61a6 RS |
3880 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3881 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3882 | else | |
3883 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 3884 | #line 3885 "configure" |
093e61a6 | 3885 | #include "confdefs.h" |
e256b8b6 | 3886 | #include <sys/types.h> |
093e61a6 | 3887 | EOF |
e256b8b6 | 3888 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3889 | egrep "uid_t" >/dev/null 2>&1; then |
3890 | rm -rf conftest* | |
e256b8b6 DA |
3891 | ac_cv_type_uid_t=yes |
3892 | else | |
093e61a6 | 3893 | rm -rf conftest* |
e256b8b6 DA |
3894 | ac_cv_type_uid_t=no |
3895 | fi | |
3896 | rm -f conftest* | |
3897 | ||
3898 | fi | |
cafe096b | 3899 | |
093e61a6 RS |
3900 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3901 | if test $ac_cv_type_uid_t = no; then | |
3902 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3903 | #define uid_t int |
093e61a6 | 3904 | EOF |
cafe096b | 3905 | |
093e61a6 | 3906 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3907 | #define gid_t int |
093e61a6 | 3908 | EOF |
e256b8b6 DA |
3909 | |
3910 | fi | |
3911 | ||
093e61a6 | 3912 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
4665e56c | 3913 | echo "configure:3914: checking type of array argument to getgroups" >&5 |
093e61a6 RS |
3914 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3915 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3916 | else |
3917 | if test "$cross_compiling" = yes; then | |
3918 | ac_cv_type_getgroups=cross | |
3919 | else | |
093e61a6 | 3920 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3921 | #line 3922 "configure" |
093e61a6 RS |
3922 | #include "confdefs.h" |
3923 | ||
e256b8b6 DA |
3924 | /* Thanks to Mike Rendell for this test. */ |
3925 | #include <sys/types.h> | |
3926 | #define NGID 256 | |
3927 | #undef MAX | |
3928 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
093e61a6 | 3929 | main() |
e256b8b6 DA |
3930 | { |
3931 | gid_t gidset[NGID]; | |
3932 | int i, n; | |
3933 | union { gid_t gval; long lval; } val; | |
3934 | ||
3935 | val.lval = -1; | |
3936 | for (i = 0; i < NGID; i++) | |
3937 | gidset[i] = val.gval; | |
3938 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3939 | gidset); | |
3940 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3941 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3942 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3943 | } | |
cafe096b | 3944 | |
093e61a6 | 3945 | EOF |
4665e56c | 3946 | if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 RS |
3947 | then |
3948 | ac_cv_type_getgroups=gid_t | |
3949 | else | |
3950 | echo "configure: failed program was:" >&5 | |
3951 | cat conftest.$ac_ext >&5 | |
3952 | rm -fr conftest* | |
3953 | ac_cv_type_getgroups=int | |
e256b8b6 | 3954 | fi |
093e61a6 | 3955 | rm -fr conftest* |
e256b8b6 | 3956 | fi |
093e61a6 | 3957 | |
e256b8b6 | 3958 | if test $ac_cv_type_getgroups = cross; then |
093e61a6 | 3959 | cat > conftest.$ac_ext <<EOF |
4665e56c | 3960 | #line 3961 "configure" |
093e61a6 | 3961 | #include "confdefs.h" |
e256b8b6 | 3962 | #include <unistd.h> |
093e61a6 | 3963 | EOF |
e256b8b6 | 3964 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3965 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3966 | rm -rf conftest* | |
e256b8b6 DA |
3967 | ac_cv_type_getgroups=gid_t |
3968 | else | |
093e61a6 | 3969 | rm -rf conftest* |
e256b8b6 DA |
3970 | ac_cv_type_getgroups=int |
3971 | fi | |
3972 | rm -f conftest* | |
3973 | ||
3974 | fi | |
3975 | fi | |
3976 | ||
093e61a6 RS |
3977 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3978 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3979 | #define GETGROUPS_T $ac_cv_type_getgroups |
093e61a6 | 3980 | EOF |
e256b8b6 DA |
3981 | |
3982 | ||
3983 | if test "${target}" = "${build}"; then | |
3984 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3985 | else | |
3986 | case "${target}" in | |
3987 | # This condition may need some tweaking. It should include all | |
3988 | # targets where the array type of the second argument of getgroups | |
3989 | # is int and the type of gid_t is not equivalent to int. | |
3990 | *-*-sunos* | *-*-ultrix*) | |
3991 | TARGET_GETGROUPS_T=int | |
3992 | ;; | |
3993 | *) | |
3994 | TARGET_GETGROUPS_T=gid_t | |
3995 | ;; | |
3996 | esac | |
3997 | fi | |
3998 | ||
3999 | ||
093e61a6 | 4000 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
4665e56c | 4001 | echo "configure:4002: checking whether the printf functions support %p" >&5 |
093e61a6 RS |
4002 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
4003 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
4004 | else |
4005 | if test "$cross_compiling" = yes; then | |
4006 | gcc_cv_func_printf_ptr=no | |
4007 | else | |
093e61a6 | 4008 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4009 | #line 4010 "configure" |
093e61a6 | 4010 | #include "confdefs.h" |
0a4b6309 RL |
4011 | #include <stdio.h> |
4012 | ||
86cf1cbd | 4013 | int main() |
0a4b6309 RL |
4014 | { |
4015 | char buf[64]; | |
4016 | char *p = buf, *q = NULL; | |
4017 | sprintf(buf, "%p", p); | |
4018 | sscanf(buf, "%p", &q); | |
86cf1cbd | 4019 | return (p != q); |
0a4b6309 | 4020 | } |
093e61a6 | 4021 | EOF |
4665e56c | 4022 | if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4023 | then |
0a4b6309 RL |
4024 | gcc_cv_func_printf_ptr=yes |
4025 | else | |
093e61a6 RS |
4026 | echo "configure: failed program was:" >&5 |
4027 | cat conftest.$ac_ext >&5 | |
4028 | rm -fr conftest* | |
4029 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 4030 | fi |
093e61a6 | 4031 | rm -fr conftest* |
0a4b6309 | 4032 | fi |
093e61a6 | 4033 | |
0a4b6309 RL |
4034 | rm -f core core.* *.core |
4035 | fi | |
cafe096b | 4036 | |
093e61a6 RS |
4037 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
4038 | if test $gcc_cv_func_printf_ptr = yes ; then | |
4039 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 4040 | #define HAVE_PRINTF_PTR 1 |
093e61a6 | 4041 | EOF |
0a4b6309 RL |
4042 | |
4043 | fi | |
4044 | ||
1072ec3f ZW |
4045 | if test $ac_cv_header_sys_mman_h != yes \ |
4046 | || test $ac_cv_func_mmap != yes; then | |
4047 | gcc_cv_func_mmap_file=no | |
4048 | gcc_cv_func_mmap_dev_zero=no | |
4049 | gcc_cv_func_mmap_anon=no | |
4050 | else | |
4051 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 | |
4665e56c | 4052 | echo "configure:4053: checking whether read-only mmap of a plain file works" >&5 |
1072ec3f ZW |
4053 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then |
4054 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4055 | else | |
4056 | # Add a system to this blacklist if | |
4057 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a | |
4058 | # memory area containing the same data that you'd get if you applied | |
4059 | # read() to the same fd. The only system known to have a problem here | |
4060 | # is VMS, where text files have record structure. | |
4061 | case "$host_os" in | |
4062 | vms*) | |
4063 | gcc_cv_func_mmap_file=no ;; | |
4064 | *) | |
4065 | gcc_cv_func_mmap_file=yes;; | |
4066 | esac | |
4067 | fi | |
4068 | ||
4069 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
4070 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
4665e56c | 4071 | echo "configure:4072: checking whether mmap from /dev/zero works" >&5 |
1072ec3f ZW |
4072 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4073 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4074 | else | |
4075 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
4076 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
4077 | # zeroed pages with both the following properties: | |
4078 | # 1. If you map N consecutive pages in with one call, and then | |
4079 | # unmap any subset of those pages, the pages that were not | |
4080 | # explicitly unmapped remain accessible. | |
4081 | # 2. If you map two adjacent blocks of memory and then unmap them | |
4082 | # both at once, they must both go away. | |
4083 | # Systems known to be in this category are Windows (all variants), | |
4084 | # VMS, and Darwin. | |
4085 | case "$host_os" in | |
4086 | vms* | cygwin* | pe | mingw* | darwin*) | |
4087 | gcc_cv_func_mmap_dev_zero=no ;; | |
4088 | *) | |
4089 | gcc_cv_func_mmap_dev_zero=yes;; | |
4090 | esac | |
4091 | fi | |
4092 | ||
4093 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
4094 | ||
4095 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
4096 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
4665e56c | 4097 | echo "configure:4098: checking for MAP_ANON(YMOUS)" >&5 |
1072ec3f ZW |
4098 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then |
4099 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4100 | else | |
4101 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4102 | #line 4103 "configure" |
1072ec3f ZW |
4103 | #include "confdefs.h" |
4104 | #include <sys/types.h> | |
4105 | #include <sys/mman.h> | |
4106 | #include <unistd.h> | |
4107 | ||
4108 | #ifndef MAP_ANONYMOUS | |
4109 | #define MAP_ANONYMOUS MAP_ANON | |
4110 | #endif | |
4111 | ||
4112 | int main() { | |
4113 | int n = MAP_ANONYMOUS; | |
4114 | ; return 0; } | |
4115 | EOF | |
4665e56c | 4116 | if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1072ec3f ZW |
4117 | rm -rf conftest* |
4118 | gcc_cv_decl_map_anon=yes | |
4119 | else | |
4120 | echo "configure: failed program was:" >&5 | |
4121 | cat conftest.$ac_ext >&5 | |
4122 | rm -rf conftest* | |
4123 | gcc_cv_decl_map_anon=no | |
4124 | fi | |
4125 | rm -f conftest* | |
4126 | fi | |
4127 | ||
4128 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
4129 | ||
4130 | if test $gcc_cv_decl_map_anon = no; then | |
4131 | gcc_cv_func_mmap_anon=no | |
4132 | else | |
4133 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 | |
4665e56c | 4134 | echo "configure:4135: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
1072ec3f ZW |
4135 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then |
4136 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4137 | else | |
4138 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
4139 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
4140 | # doesn't give anonymous zeroed pages with the same properties listed | |
4141 | # above for use of /dev/zero. | |
4142 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
4143 | case "$host_os" in | |
4144 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
4145 | gcc_cv_func_mmap_anon=no ;; | |
4146 | *) | |
4147 | gcc_cv_func_mmap_anon=yes;; | |
4148 | esac | |
4149 | fi | |
4150 | ||
4151 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
4152 | fi | |
4153 | fi | |
4154 | ||
4155 | if test $gcc_cv_func_mmap_file = yes; then | |
4156 | cat >> confdefs.h <<\EOF | |
4157 | #define HAVE_MMAP_FILE 1 | |
4158 | EOF | |
4159 | ||
4160 | fi | |
4161 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
4162 | cat >> confdefs.h <<\EOF | |
4163 | #define HAVE_MMAP_DEV_ZERO 1 | |
4164 | EOF | |
4165 | ||
4166 | fi | |
4167 | if test $gcc_cv_func_mmap_anon = yes; then | |
4168 | cat >> confdefs.h <<\EOF | |
4169 | #define HAVE_MMAP_ANON 1 | |
4170 | EOF | |
4171 | ||
4172 | fi | |
4173 | ||
b27d2bd5 MK |
4174 | |
4175 | case "${host}" in | |
4176 | *-*-uwin*) | |
093e61a6 | 4177 | { echo "configure: error: |
cafe096b | 4178 | *** UWIN may not be used as a host platform because |
093e61a6 | 4179 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } |
b27d2bd5 | 4180 | ;; |
ee262b6f | 4181 | *-*-*vms*) |
093e61a6 | 4182 | # Under VMS, vfork works very different than on Unix. The standard test |
ee262b6f DR |
4183 | # won't work, and it isn't easily adaptable. It makes more sense to |
4184 | # just force it. | |
4185 | ac_cv_func_vfork_works=yes | |
4186 | ;; | |
b27d2bd5 | 4187 | esac |
093e61a6 | 4188 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
4665e56c | 4189 | echo "configure:4190: checking for pid_t" >&5 |
093e61a6 RS |
4190 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4191 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4192 | else | |
4193 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4194 | #line 4195 "configure" |
093e61a6 RS |
4195 | #include "confdefs.h" |
4196 | #include <sys/types.h> | |
4197 | #if STDC_HEADERS | |
4198 | #include <stdlib.h> | |
4199 | #include <stddef.h> | |
4200 | #endif | |
4201 | EOF | |
4202 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4203 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4204 | rm -rf conftest* | |
cb65112a | 4205 | ac_cv_type_pid_t=yes |
c375c43b | 4206 | else |
093e61a6 RS |
4207 | rm -rf conftest* |
4208 | ac_cv_type_pid_t=no | |
c375c43b | 4209 | fi |
093e61a6 | 4210 | rm -f conftest* |
cafe096b | 4211 | |
093e61a6 RS |
4212 | fi |
4213 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4214 | if test $ac_cv_type_pid_t = no; then | |
4215 | cat >> confdefs.h <<\EOF | |
c375c43b | 4216 | #define pid_t int |
093e61a6 | 4217 | EOF |
c375c43b KG |
4218 | |
4219 | fi | |
4220 | ||
093e61a6 RS |
4221 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4222 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
4665e56c | 4223 | echo "configure:4224: checking for vfork.h" >&5 |
093e61a6 RS |
4224 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4225 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 4226 | else |
093e61a6 | 4227 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4228 | #line 4229 "configure" |
093e61a6 RS |
4229 | #include "confdefs.h" |
4230 | #include <vfork.h> | |
4231 | EOF | |
4232 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 4233 | { (eval echo configure:4234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
4234 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4235 | if test -z "$ac_err"; then | |
4236 | rm -rf conftest* | |
4237 | eval "ac_cv_header_$ac_safe=yes" | |
4238 | else | |
4239 | echo "$ac_err" >&5 | |
4240 | echo "configure: failed program was:" >&5 | |
4241 | cat conftest.$ac_ext >&5 | |
4242 | rm -rf conftest* | |
4243 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4244 | fi |
093e61a6 | 4245 | rm -f conftest* |
c375c43b | 4246 | fi |
093e61a6 RS |
4247 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4248 | echo "$ac_t""yes" 1>&6 | |
4249 | cat >> confdefs.h <<\EOF | |
4250 | #define HAVE_VFORK_H 1 | |
4251 | EOF | |
c375c43b | 4252 | |
093e61a6 RS |
4253 | else |
4254 | echo "$ac_t""no" 1>&6 | |
c375c43b KG |
4255 | fi |
4256 | ||
093e61a6 | 4257 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
4665e56c | 4258 | echo "configure:4259: checking for working vfork" >&5 |
093e61a6 RS |
4259 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4260 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4261 | else | |
4262 | if test "$cross_compiling" = yes; then | |
4263 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
4665e56c | 4264 | echo "configure:4265: checking for vfork" >&5 |
093e61a6 RS |
4265 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4266 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4267 | else | |
4268 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4269 | #line 4270 "configure" |
093e61a6 | 4270 | #include "confdefs.h" |
c375c43b | 4271 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
4272 | which can conflict with char vfork(); below. */ |
4273 | #include <assert.h> | |
c375c43b KG |
4274 | /* Override any gcc2 internal prototype to avoid an error. */ |
4275 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
4276 | builtin and then its argument prototype would still apply. */ |
4277 | char vfork(); | |
4278 | ||
4279 | int main() { | |
4280 | ||
c375c43b KG |
4281 | /* The GNU C library defines this for functions which it implements |
4282 | to always fail with ENOSYS. Some functions are actually named | |
4283 | something starting with __ and the normal name is an alias. */ | |
093e61a6 | 4284 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4285 | choke me |
4286 | #else | |
093e61a6 | 4287 | vfork(); |
c375c43b KG |
4288 | #endif |
4289 | ||
093e61a6 RS |
4290 | ; return 0; } |
4291 | EOF | |
4665e56c | 4292 | if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4293 | rm -rf conftest* |
4294 | eval "ac_cv_func_vfork=yes" | |
4295 | else | |
4296 | echo "configure: failed program was:" >&5 | |
4297 | cat conftest.$ac_ext >&5 | |
4298 | rm -rf conftest* | |
4299 | eval "ac_cv_func_vfork=no" | |
4300 | fi | |
4301 | rm -f conftest* | |
c375c43b KG |
4302 | fi |
4303 | ||
093e61a6 RS |
4304 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4305 | echo "$ac_t""yes" 1>&6 | |
4306 | : | |
c375c43b | 4307 | else |
093e61a6 | 4308 | echo "$ac_t""no" 1>&6 |
c375c43b | 4309 | fi |
093e61a6 | 4310 | |
c375c43b KG |
4311 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4312 | else | |
093e61a6 | 4313 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4314 | #line 4315 "configure" |
093e61a6 | 4315 | #include "confdefs.h" |
c375c43b KG |
4316 | /* Thanks to Paul Eggert for this test. */ |
4317 | #include <stdio.h> | |
4318 | #include <sys/types.h> | |
4319 | #include <sys/stat.h> | |
093e61a6 RS |
4320 | #ifdef HAVE_UNISTD_H |
4321 | #include <unistd.h> | |
c375c43b | 4322 | #endif |
093e61a6 RS |
4323 | #ifdef HAVE_VFORK_H |
4324 | #include <vfork.h> | |
c375c43b KG |
4325 | #endif |
4326 | /* On some sparc systems, changes by the child to local and incoming | |
093e61a6 RS |
4327 | argument registers are propagated back to the parent. |
4328 | The compiler is told about this with #include <vfork.h>, | |
4329 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4330 | Test for this by using a static variable whose address | |
4331 | is put into a register that is clobbered by the vfork. */ | |
4332 | static | |
c375c43b KG |
4333 | #ifdef __cplusplus |
4334 | sparc_address_test (int arg) | |
093e61a6 | 4335 | #else |
c375c43b KG |
4336 | sparc_address_test (arg) int arg; |
4337 | #endif | |
4338 | { | |
4339 | static pid_t child; | |
4340 | if (!child) { | |
4341 | child = vfork (); | |
4342 | if (child < 0) { | |
4343 | perror ("vfork"); | |
4344 | _exit(2); | |
4345 | } | |
4346 | if (!child) { | |
4347 | arg = getpid(); | |
4348 | write(-1, "", 0); | |
4349 | _exit (arg); | |
4350 | } | |
4351 | } | |
4352 | } | |
093e61a6 | 4353 | main() { |
c375c43b KG |
4354 | pid_t parent = getpid (); |
4355 | pid_t child; | |
4356 | ||
093e61a6 | 4357 | sparc_address_test (); |
c375c43b KG |
4358 | |
4359 | child = vfork (); | |
4360 | ||
4361 | if (child == 0) { | |
093e61a6 RS |
4362 | /* Here is another test for sparc vfork register problems. |
4363 | This test uses lots of local variables, at least | |
4364 | as many local variables as main has allocated so far | |
4365 | including compiler temporaries. 4 locals are enough for | |
4366 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4367 | A buggy compiler should reuse the register of parent | |
4368 | for one of the local variables, since it will think that | |
4369 | parent can't possibly be used any more in this routine. | |
4370 | Assigning to the local variable will thus munge parent | |
4371 | in the parent process. */ | |
c375c43b KG |
4372 | pid_t |
4373 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4374 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4375 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4376 | use the same hardware register for all 8 local variables. */ | |
4377 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4378 | || p != p5 || p != p6 || p != p7) | |
4379 | _exit(1); | |
4380 | ||
093e61a6 RS |
4381 | /* On some systems (e.g. IRIX 3.3), |
4382 | vfork doesn't separate parent from child file descriptors. | |
4383 | If the child closes a descriptor before it execs or exits, | |
4384 | this munges the parent's descriptor as well. | |
4385 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4386 | _exit(close(fileno(stdout)) != 0); |
4387 | } else { | |
4388 | int status; | |
4389 | struct stat st; | |
4390 | ||
4391 | while (wait(&status) != child) | |
4392 | ; | |
4393 | exit( | |
4394 | /* Was there some problem with vforking? */ | |
4395 | child < 0 | |
4396 | ||
4397 | /* Did the child fail? (This shouldn't happen.) */ | |
4398 | || status | |
4399 | ||
4400 | /* Did the vfork/compiler bug occur? */ | |
4401 | || parent != getpid() | |
4402 | ||
4403 | /* Did the file descriptor bug occur? */ | |
4404 | || fstat(fileno(stdout), &st) != 0 | |
4405 | ); | |
4406 | } | |
4407 | } | |
093e61a6 | 4408 | EOF |
4665e56c | 4409 | if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4410 | then |
c375c43b KG |
4411 | ac_cv_func_vfork_works=yes |
4412 | else | |
093e61a6 RS |
4413 | echo "configure: failed program was:" >&5 |
4414 | cat conftest.$ac_ext >&5 | |
4415 | rm -fr conftest* | |
4416 | ac_cv_func_vfork_works=no | |
c375c43b | 4417 | fi |
093e61a6 | 4418 | rm -fr conftest* |
cafe096b | 4419 | fi |
c375c43b KG |
4420 | |
4421 | fi | |
4422 | ||
093e61a6 RS |
4423 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4424 | if test $ac_cv_func_vfork_works = no; then | |
4425 | cat >> confdefs.h <<\EOF | |
c375c43b | 4426 | #define vfork fork |
093e61a6 | 4427 | EOF |
c375c43b KG |
4428 | |
4429 | fi | |
4430 | ||
81bf3d9e | 4431 | |
f91abfce | 4432 | |
093e61a6 | 4433 | |
b7f2fb96 | 4434 | am_cv_lib_iconv_ldpath= |
093e61a6 | 4435 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4436 | if test "${with_libiconv_prefix+set}" = set; then |
4437 | withval="$with_libiconv_prefix" | |
093e61a6 | 4438 | |
f91abfce TT |
4439 | for dir in `echo "$withval" | tr : ' '`; do |
4440 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4441 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4442 | done |
093e61a6 RS |
4443 | |
4444 | fi | |
f91abfce TT |
4445 | |
4446 | ||
093e61a6 | 4447 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
4665e56c | 4448 | echo "configure:4449: checking for iconv" >&5 |
093e61a6 RS |
4449 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4450 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4451 | else |
093e61a6 | 4452 | |
f91abfce TT |
4453 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4454 | am_cv_lib_iconv=no | |
093e61a6 | 4455 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4456 | #line 4457 "configure" |
093e61a6 | 4457 | #include "confdefs.h" |
f91abfce TT |
4458 | #include <stdlib.h> |
4459 | #include <iconv.h> | |
093e61a6 | 4460 | int main() { |
f91abfce TT |
4461 | iconv_t cd = iconv_open("",""); |
4462 | iconv(cd,NULL,NULL,NULL,NULL); | |
4463 | iconv_close(cd); | |
093e61a6 RS |
4464 | ; return 0; } |
4465 | EOF | |
4665e56c | 4466 | if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4467 | rm -rf conftest* |
f91abfce TT |
4468 | am_cv_func_iconv=yes |
4469 | else | |
093e61a6 RS |
4470 | echo "configure: failed program was:" >&5 |
4471 | cat conftest.$ac_ext >&5 | |
f91abfce | 4472 | fi |
093e61a6 | 4473 | rm -f conftest* |
f91abfce TT |
4474 | if test "$am_cv_func_iconv" != yes; then |
4475 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4476 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 4477 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4478 | #line 4479 "configure" |
093e61a6 | 4479 | #include "confdefs.h" |
f91abfce TT |
4480 | #include <stdlib.h> |
4481 | #include <iconv.h> | |
093e61a6 | 4482 | int main() { |
f91abfce TT |
4483 | iconv_t cd = iconv_open("",""); |
4484 | iconv(cd,NULL,NULL,NULL,NULL); | |
4485 | iconv_close(cd); | |
093e61a6 RS |
4486 | ; return 0; } |
4487 | EOF | |
4665e56c | 4488 | if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4489 | rm -rf conftest* |
f91abfce TT |
4490 | am_cv_lib_iconv=yes |
4491 | am_cv_func_iconv=yes | |
4492 | else | |
093e61a6 RS |
4493 | echo "configure: failed program was:" >&5 |
4494 | cat conftest.$ac_ext >&5 | |
f91abfce | 4495 | fi |
093e61a6 | 4496 | rm -f conftest* |
f91abfce TT |
4497 | LIBS="$am_save_LIBS" |
4498 | fi | |
093e61a6 | 4499 | |
cafe096b | 4500 | fi |
cafe096b | 4501 | |
093e61a6 RS |
4502 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4503 | if test "$am_cv_func_iconv" = yes; then | |
4504 | cat >> confdefs.h <<\EOF | |
f91abfce | 4505 | #define HAVE_ICONV 1 |
093e61a6 | 4506 | EOF |
f91abfce | 4507 | |
093e61a6 | 4508 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
4665e56c | 4509 | echo "configure:4510: checking for iconv declaration" >&5 |
093e61a6 RS |
4510 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4511 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4512 | else |
093e61a6 RS |
4513 | |
4514 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4515 | #line 4516 "configure" |
093e61a6 | 4516 | #include "confdefs.h" |
f91abfce TT |
4517 | |
4518 | #include <stdlib.h> | |
4519 | #include <iconv.h> | |
4520 | extern | |
4521 | #ifdef __cplusplus | |
4522 | "C" | |
4523 | #endif | |
4524 | #if defined(__STDC__) || defined(__cplusplus) | |
4525 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4526 | #else | |
4527 | size_t iconv(); | |
4528 | #endif | |
4529 | ||
093e61a6 | 4530 | int main() { |
f91abfce | 4531 | |
093e61a6 RS |
4532 | ; return 0; } |
4533 | EOF | |
4665e56c | 4534 | if { (eval echo configure:4535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4535 | rm -rf conftest* |
f91abfce TT |
4536 | am_cv_proto_iconv_arg1="" |
4537 | else | |
093e61a6 RS |
4538 | echo "configure: failed program was:" >&5 |
4539 | cat conftest.$ac_ext >&5 | |
4540 | rm -rf conftest* | |
4541 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4542 | fi |
093e61a6 | 4543 | rm -f conftest* |
f91abfce TT |
4544 | 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);" |
4545 | fi | |
4546 | ||
4547 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
4548 | echo "$ac_t""${ac_t:- |
4549 | }$am_cv_proto_iconv" 1>&6 | |
4550 | cat >> confdefs.h <<EOF | |
f91abfce | 4551 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 4552 | EOF |
f91abfce TT |
4553 | |
4554 | fi | |
4555 | LIBICONV= | |
4556 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4557 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4558 | fi |
093e61a6 | 4559 | |
f91abfce TT |
4560 | |
4561 | ||
86cf1cbd KG |
4562 | # We will need to find libiberty.h and ansidecl.h |
4563 | saved_CFLAGS="$CFLAGS" | |
4564 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4565 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4566 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
a7475ab1 | 4567 | fprintf_unlocked strstr errno vasprintf \ |
c1800ec8 | 4568 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4569 | do |
f31e826b | 4570 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4571 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
4665e56c | 4572 | echo "configure:4573: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4573 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4574 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4575 | else | |
4576 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4577 | #line 4578 "configure" |
093e61a6 | 4578 | #include "confdefs.h" |
7afe8c41 KG |
4579 | #undef $ac_tr_decl |
4580 | #define $ac_tr_decl 1 | |
093e61a6 | 4581 | |
d02af173 | 4582 | #include "ansidecl.h" |
86cf1cbd | 4583 | #include "system.h" |
f31e826b | 4584 | |
093e61a6 | 4585 | int main() { |
86cf1cbd KG |
4586 | #ifndef $ac_func |
4587 | char *(*pfn) = (char *(*)) $ac_func ; | |
4588 | #endif | |
093e61a6 RS |
4589 | ; return 0; } |
4590 | EOF | |
4665e56c | 4591 | if { (eval echo configure:4592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4592 | rm -rf conftest* |
f31e826b | 4593 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4594 | else |
093e61a6 RS |
4595 | echo "configure: failed program was:" >&5 |
4596 | cat conftest.$ac_ext >&5 | |
4597 | rm -rf conftest* | |
4598 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4599 | fi |
093e61a6 | 4600 | rm -f conftest* |
81bf3d9e RH |
4601 | fi |
4602 | ||
f31e826b | 4603 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4604 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4605 | #define $ac_tr_decl 1 |
093e61a6 RS |
4606 | EOF |
4607 | ||
81bf3d9e | 4608 | else |
093e61a6 | 4609 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4610 | #define $ac_tr_decl 0 |
093e61a6 RS |
4611 | EOF |
4612 | ||
81bf3d9e RH |
4613 | fi |
4614 | ||
4615 | done | |
86cf1cbd | 4616 | if test x = y ; then |
093e61a6 | 4617 | cat >> confdefs.h <<\EOF |
f31e826b | 4618 | #define HAVE_DECL_GETENV 1 |
093e61a6 RS |
4619 | EOF |
4620 | cat >> confdefs.h <<\EOF | |
f31e826b | 4621 | #define HAVE_DECL_ATOL 1 |
093e61a6 RS |
4622 | EOF |
4623 | cat >> confdefs.h <<\EOF | |
f31e826b | 4624 | #define HAVE_DECL_SBRK 1 |
093e61a6 RS |
4625 | EOF |
4626 | cat >> confdefs.h <<\EOF | |
f31e826b | 4627 | #define HAVE_DECL_ABORT 1 |
093e61a6 RS |
4628 | EOF |
4629 | cat >> confdefs.h <<\EOF | |
f31e826b | 4630 | #define HAVE_DECL_ATOF 1 |
093e61a6 RS |
4631 | EOF |
4632 | cat >> confdefs.h <<\EOF | |
f31e826b | 4633 | #define HAVE_DECL_GETCWD 1 |
093e61a6 RS |
4634 | EOF |
4635 | cat >> confdefs.h <<\EOF | |
f31e826b | 4636 | #define HAVE_DECL_GETWD 1 |
093e61a6 | 4637 | EOF |
86cf1cbd | 4638 | \ |
093e61a6 | 4639 | cat >> confdefs.h <<\EOF |
f31e826b | 4640 | #define HAVE_DECL_STRSIGNAL 1 |
093e61a6 RS |
4641 | EOF |
4642 | cat >> confdefs.h <<\EOF | |
f31e826b | 4643 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
093e61a6 RS |
4644 | EOF |
4645 | cat >> confdefs.h <<\EOF | |
f31e826b | 4646 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
093e61a6 RS |
4647 | EOF |
4648 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4649 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
093e61a6 | 4650 | EOF |
3b681e9d | 4651 | \ |
093e61a6 | 4652 | cat >> confdefs.h <<\EOF |
3b681e9d | 4653 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
093e61a6 RS |
4654 | EOF |
4655 | cat >> confdefs.h <<\EOF | |
f31e826b | 4656 | #define HAVE_DECL_STRSTR 1 |
093e61a6 RS |
4657 | EOF |
4658 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4659 | #define HAVE_DECL_ERRNO 1 |
093e61a6 RS |
4660 | EOF |
4661 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4662 | #define HAVE_DECL_VASPRINTF 1 |
093e61a6 | 4663 | EOF |
86cf1cbd | 4664 | \ |
093e61a6 | 4665 | cat >> confdefs.h <<\EOF |
f31e826b | 4666 | #define HAVE_DECL_MALLOC 1 |
093e61a6 RS |
4667 | EOF |
4668 | cat >> confdefs.h <<\EOF | |
f31e826b | 4669 | #define HAVE_DECL_REALLOC 1 |
093e61a6 RS |
4670 | EOF |
4671 | cat >> confdefs.h <<\EOF | |
f31e826b | 4672 | #define HAVE_DECL_CALLOC 1 |
093e61a6 RS |
4673 | EOF |
4674 | cat >> confdefs.h <<\EOF | |
f31e826b | 4675 | #define HAVE_DECL_FREE 1 |
093e61a6 RS |
4676 | EOF |
4677 | cat >> confdefs.h <<\EOF | |
f31e826b | 4678 | #define HAVE_DECL_BASENAME 1 |
093e61a6 RS |
4679 | EOF |
4680 | cat >> confdefs.h <<\EOF | |
f31e826b | 4681 | #define HAVE_DECL_GETOPT 1 |
093e61a6 RS |
4682 | EOF |
4683 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4684 | #define HAVE_DECL_CLOCK 1 |
093e61a6 | 4685 | EOF |
81bf3d9e RH |
4686 | fi |
4687 | ||
81bf3d9e RH |
4688 | |
4689 | for ac_func in getrlimit setrlimit getrusage | |
4690 | do | |
f31e826b | 4691 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4692 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
4665e56c | 4693 | echo "configure:4694: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4694 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4695 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4696 | else | |
4697 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4698 | #line 4699 "configure" |
093e61a6 | 4699 | #include "confdefs.h" |
7afe8c41 KG |
4700 | #undef $ac_tr_decl |
4701 | #define $ac_tr_decl 1 | |
093e61a6 | 4702 | |
d02af173 | 4703 | #include "ansidecl.h" |
86cf1cbd | 4704 | #include "system.h" |
81bf3d9e RH |
4705 | #ifdef HAVE_SYS_RESOURCE_H |
4706 | #include <sys/resource.h> | |
4707 | #endif | |
4708 | ||
f31e826b | 4709 | |
093e61a6 | 4710 | int main() { |
86cf1cbd KG |
4711 | #ifndef $ac_func |
4712 | char *(*pfn) = (char *(*)) $ac_func ; | |
4713 | #endif | |
093e61a6 RS |
4714 | ; return 0; } |
4715 | EOF | |
4665e56c | 4716 | if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4717 | rm -rf conftest* |
f31e826b | 4718 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4719 | else |
093e61a6 RS |
4720 | echo "configure: failed program was:" >&5 |
4721 | cat conftest.$ac_ext >&5 | |
4722 | rm -rf conftest* | |
4723 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4724 | fi |
093e61a6 | 4725 | rm -f conftest* |
81bf3d9e RH |
4726 | fi |
4727 | ||
f31e826b | 4728 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4729 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4730 | #define $ac_tr_decl 1 |
093e61a6 RS |
4731 | EOF |
4732 | ||
81bf3d9e | 4733 | else |
093e61a6 | 4734 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4735 | #define $ac_tr_decl 0 |
093e61a6 RS |
4736 | EOF |
4737 | ||
81bf3d9e RH |
4738 | fi |
4739 | ||
4740 | done | |
86cf1cbd | 4741 | if test x = y ; then |
093e61a6 | 4742 | cat >> confdefs.h <<\EOF |
f31e826b | 4743 | #define HAVE_DECL_GETRLIMIT 1 |
093e61a6 RS |
4744 | EOF |
4745 | cat >> confdefs.h <<\EOF | |
f31e826b | 4746 | #define HAVE_DECL_SETRLIMIT 1 |
093e61a6 RS |
4747 | EOF |
4748 | cat >> confdefs.h <<\EOF | |
f31e826b | 4749 | #define HAVE_DECL_GETRUSAGE 1 |
093e61a6 | 4750 | EOF |
86cf1cbd KG |
4751 | fi |
4752 | ||
81bf3d9e | 4753 | |
093e61a6 | 4754 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4755 | #line 4756 "configure" |
093e61a6 | 4756 | #include "confdefs.h" |
b2522d2b HPN |
4757 | |
4758 | #include "ansidecl.h" | |
4759 | #include "system.h" | |
4760 | #ifdef HAVE_SYS_RESOURCE_H | |
4761 | #include <sys/resource.h> | |
4762 | #endif | |
4763 | ||
093e61a6 | 4764 | int main() { |
b2522d2b | 4765 | rlim_t l = 0; |
093e61a6 RS |
4766 | ; return 0; } |
4767 | EOF | |
4665e56c | 4768 | if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4769 | : |
4770 | else | |
093e61a6 RS |
4771 | echo "configure: failed program was:" >&5 |
4772 | cat conftest.$ac_ext >&5 | |
4773 | rm -rf conftest* | |
4774 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4775 | #define rlim_t long |
093e61a6 | 4776 | EOF |
b2522d2b HPN |
4777 | |
4778 | fi | |
093e61a6 | 4779 | rm -f conftest* |
b2522d2b | 4780 | |
351df804 | 4781 | for ac_func in ldgetname |
c1800ec8 ZW |
4782 | do |
4783 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4784 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
4665e56c | 4785 | echo "configure:4786: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4786 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4787 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4788 | else | |
4789 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4790 | #line 4791 "configure" |
093e61a6 | 4791 | #include "confdefs.h" |
c1800ec8 ZW |
4792 | #undef $ac_tr_decl |
4793 | #define $ac_tr_decl 1 | |
093e61a6 | 4794 | |
351df804 KG |
4795 | #include "ansidecl.h" |
4796 | #include "system.h" | |
4797 | #ifdef HAVE_LDFCN_H | |
4798 | #include <ldfcn.h> | |
4799 | #endif | |
4800 | ||
4801 | ||
093e61a6 | 4802 | int main() { |
351df804 KG |
4803 | #ifndef $ac_func |
4804 | char *(*pfn) = (char *(*)) $ac_func ; | |
4805 | #endif | |
093e61a6 RS |
4806 | ; return 0; } |
4807 | EOF | |
4665e56c | 4808 | if { (eval echo configure:4809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4809 | rm -rf conftest* |
351df804 KG |
4810 | eval "gcc_cv_have_decl_$ac_func=yes" |
4811 | else | |
093e61a6 RS |
4812 | echo "configure: failed program was:" >&5 |
4813 | cat conftest.$ac_ext >&5 | |
4814 | rm -rf conftest* | |
4815 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4816 | fi |
093e61a6 | 4817 | rm -f conftest* |
351df804 KG |
4818 | fi |
4819 | ||
4820 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4821 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4822 | #define $ac_tr_decl 1 |
093e61a6 RS |
4823 | EOF |
4824 | ||
351df804 | 4825 | else |
093e61a6 | 4826 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4827 | #define $ac_tr_decl 0 |
093e61a6 RS |
4828 | EOF |
4829 | ||
351df804 KG |
4830 | fi |
4831 | ||
4832 | done | |
4833 | if test x = y ; then | |
093e61a6 | 4834 | cat >> confdefs.h <<\EOF |
351df804 | 4835 | #define HAVE_DECL_LDGETNAME 1 |
093e61a6 | 4836 | EOF |
351df804 KG |
4837 | fi |
4838 | ||
4839 | ||
4840 | for ac_func in times | |
4841 | do | |
4842 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4843 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
4665e56c | 4844 | echo "configure:4845: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4845 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4846 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4847 | else | |
4848 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4849 | #line 4850 "configure" |
093e61a6 | 4850 | #include "confdefs.h" |
351df804 KG |
4851 | #undef $ac_tr_decl |
4852 | #define $ac_tr_decl 1 | |
093e61a6 | 4853 | |
c1800ec8 ZW |
4854 | #include "ansidecl.h" |
4855 | #include "system.h" | |
4856 | #ifdef HAVE_SYS_TIMES_H | |
4857 | #include <sys/times.h> | |
4858 | #endif | |
4859 | ||
4860 | ||
093e61a6 | 4861 | int main() { |
c1800ec8 ZW |
4862 | #ifndef $ac_func |
4863 | char *(*pfn) = (char *(*)) $ac_func ; | |
4864 | #endif | |
093e61a6 RS |
4865 | ; return 0; } |
4866 | EOF | |
4665e56c | 4867 | if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4868 | rm -rf conftest* |
c1800ec8 ZW |
4869 | eval "gcc_cv_have_decl_$ac_func=yes" |
4870 | else | |
093e61a6 RS |
4871 | echo "configure: failed program was:" >&5 |
4872 | cat conftest.$ac_ext >&5 | |
4873 | rm -rf conftest* | |
4874 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4875 | fi |
093e61a6 | 4876 | rm -f conftest* |
c1800ec8 ZW |
4877 | fi |
4878 | ||
4879 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4880 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4881 | #define $ac_tr_decl 1 |
093e61a6 RS |
4882 | EOF |
4883 | ||
c1800ec8 | 4884 | else |
093e61a6 | 4885 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4886 | #define $ac_tr_decl 0 |
093e61a6 RS |
4887 | EOF |
4888 | ||
c1800ec8 ZW |
4889 | fi |
4890 | ||
4891 | done | |
4892 | if test x = y ; then | |
093e61a6 | 4893 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4894 | #define HAVE_DECL_TIMES 1 |
093e61a6 | 4895 | EOF |
c1800ec8 ZW |
4896 | fi |
4897 | ||
4898 | ||
4899 | # More time-related stuff. | |
093e61a6 | 4900 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
4665e56c | 4901 | echo "configure:4902: checking for struct tms" >&5 |
093e61a6 RS |
4902 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4903 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4904 | else | |
4905 | ||
4906 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4907 | #line 4908 "configure" |
093e61a6 | 4908 | #include "confdefs.h" |
c1800ec8 ZW |
4909 | |
4910 | #include "ansidecl.h" | |
4911 | #include "system.h" | |
4912 | #ifdef HAVE_SYS_TIMES_H | |
4913 | #include <sys/times.h> | |
4914 | #endif | |
4915 | ||
093e61a6 | 4916 | int main() { |
c1800ec8 | 4917 | struct tms tms; |
093e61a6 RS |
4918 | ; return 0; } |
4919 | EOF | |
4665e56c | 4920 | if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4921 | rm -rf conftest* |
c1800ec8 ZW |
4922 | ac_cv_struct_tms=yes |
4923 | else | |
093e61a6 RS |
4924 | echo "configure: failed program was:" >&5 |
4925 | cat conftest.$ac_ext >&5 | |
4926 | rm -rf conftest* | |
4927 | ac_cv_struct_tms=no | |
c1800ec8 | 4928 | fi |
093e61a6 | 4929 | rm -f conftest* |
c1800ec8 | 4930 | fi |
cafe096b | 4931 | |
093e61a6 RS |
4932 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4933 | if test $ac_cv_struct_tms = yes; then | |
4934 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4935 | #define HAVE_STRUCT_TMS 1 |
093e61a6 | 4936 | EOF |
c1800ec8 ZW |
4937 | |
4938 | fi | |
4939 | ||
4940 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4941 | # revisit after autoconf 2.50. | |
093e61a6 | 4942 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
4665e56c | 4943 | echo "configure:4944: checking for clock_t" >&5 |
093e61a6 RS |
4944 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4945 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4946 | else | |
4947 | ||
4948 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 4949 | #line 4950 "configure" |
093e61a6 | 4950 | #include "confdefs.h" |
c1800ec8 ZW |
4951 | |
4952 | #include "ansidecl.h" | |
4953 | #include "system.h" | |
4954 | ||
093e61a6 | 4955 | int main() { |
c1800ec8 | 4956 | clock_t x; |
093e61a6 RS |
4957 | ; return 0; } |
4958 | EOF | |
4665e56c | 4959 | if { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4960 | rm -rf conftest* |
c1800ec8 ZW |
4961 | gcc_cv_type_clock_t=yes |
4962 | else | |
093e61a6 RS |
4963 | echo "configure: failed program was:" >&5 |
4964 | cat conftest.$ac_ext >&5 | |
4965 | rm -rf conftest* | |
4966 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4967 | fi |
093e61a6 | 4968 | rm -f conftest* |
c1800ec8 | 4969 | fi |
cafe096b | 4970 | |
093e61a6 RS |
4971 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4972 | if test $gcc_cv_type_clock_t = yes; then | |
4973 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4974 | #define HAVE_CLOCK_T 1 |
093e61a6 | 4975 | EOF |
c1800ec8 ZW |
4976 | |
4977 | fi | |
4978 | ||
093e61a6 | 4979 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
4665e56c | 4980 | echo "configure:4981: checking for uchar" >&5 |
093e61a6 RS |
4981 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4982 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4983 | else |
093e61a6 | 4984 | cat > conftest.$ac_ext <<EOF |
4665e56c | 4985 | #line 4986 "configure" |
093e61a6 | 4986 | #include "confdefs.h" |
a12b5bd9 ZW |
4987 | |
4988 | #include "ansidecl.h" | |
4989 | #include "system.h" | |
4990 | ||
093e61a6 | 4991 | int main() { |
a12b5bd9 ZW |
4992 | if ((uchar *)0) return 0; |
4993 | if (sizeof(uchar)) return 0; | |
093e61a6 RS |
4994 | ; return 0; } |
4995 | EOF | |
4665e56c | 4996 | if { (eval echo configure:4997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4997 | rm -rf conftest* |
a12b5bd9 ZW |
4998 | ac_cv_type_uchar=yes |
4999 | else | |
093e61a6 RS |
5000 | echo "configure: failed program was:" >&5 |
5001 | cat conftest.$ac_ext >&5 | |
5002 | rm -rf conftest* | |
5003 | ac_cv_type_uchar=no | |
a12b5bd9 | 5004 | fi |
093e61a6 | 5005 | rm -f conftest* |
a12b5bd9 | 5006 | fi |
cafe096b | 5007 | |
093e61a6 RS |
5008 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
5009 | if test $ac_cv_type_uchar = yes; then | |
5010 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 5011 | #define HAVE_UCHAR 1 |
093e61a6 | 5012 | EOF |
a12b5bd9 ZW |
5013 | |
5014 | fi | |
5015 | ||
eb70d86d AS |
5016 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5017 | CFLAGS="$saved_CFLAGS" | |
5018 | ||
07cf4226 DM |
5019 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5020 | if test "${enable_initfini_array+set}" = set; then | |
5021 | enableval="$enable_initfini_array" | |
093e61a6 | 5022 | : |
07cf4226 | 5023 | else |
093e61a6 RS |
5024 | |
5025 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
4665e56c | 5026 | echo "configure:5027: checking for .preinit_array/.init_array/.fini_array support" >&5 |
093e61a6 RS |
5027 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
5028 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 5029 | else |
eb70d86d | 5030 | if test "$cross_compiling" = yes; then |
918c4fe4 | 5031 | gcc_cv_initfini_array=no |
eb70d86d | 5032 | else |
093e61a6 | 5033 | cat > conftest.$ac_ext <<EOF |
4665e56c | 5034 | #line 5035 "configure" |
093e61a6 | 5035 | #include "confdefs.h" |
eb70d86d | 5036 | |
07cf4226 DM |
5037 | static int x = -1; |
5038 | int main (void) { return x; } | |
5039 | int foo (void) { x = 0; } | |
5040 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
093e61a6 | 5041 | EOF |
4665e56c | 5042 | if { (eval echo configure:5043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5043 | then |
918c4fe4 | 5044 | gcc_cv_initfini_array=yes |
eb70d86d | 5045 | else |
093e61a6 RS |
5046 | echo "configure: failed program was:" >&5 |
5047 | cat conftest.$ac_ext >&5 | |
5048 | rm -fr conftest* | |
5049 | gcc_cv_initfini_array=no | |
eb70d86d | 5050 | fi |
093e61a6 | 5051 | rm -fr conftest* |
eb70d86d | 5052 | fi |
093e61a6 | 5053 | |
07cf4226 | 5054 | fi |
093e61a6 RS |
5055 | |
5056 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 5057 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 5058 | |
093e61a6 | 5059 | fi |
cafe096b | 5060 | |
093e61a6 RS |
5061 | if test $enable_initfini_array = yes; then |
5062 | cat >> confdefs.h <<\EOF | |
eb70d86d | 5063 | #define HAVE_INITFINI_ARRAY 1 |
093e61a6 | 5064 | EOF |
07cf4226 | 5065 | |
eb70d86d | 5066 | fi |
81bf3d9e | 5067 | |
093e61a6 RS |
5068 | # mkdir takes a single argument on some systems. |
5069 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
4665e56c | 5070 | echo "configure:5071: checking if mkdir takes one argument" >&5 |
093e61a6 RS |
5071 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5072 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 5073 | else |
093e61a6 | 5074 | cat > conftest.$ac_ext <<EOF |
4665e56c | 5075 | #line 5076 "configure" |
093e61a6 | 5076 | #include "confdefs.h" |
75923b2f MK |
5077 | |
5078 | #include <sys/types.h> | |
5079 | #ifdef HAVE_SYS_STAT_H | |
5080 | # include <sys/stat.h> | |
5081 | #endif | |
5082 | #ifdef HAVE_UNISTD_H | |
5083 | # include <unistd.h> | |
5084 | #endif | |
5085 | #ifdef HAVE_DIRECT_H | |
5086 | # include <direct.h> | |
5087 | #endif | |
093e61a6 | 5088 | int main() { |
75923b2f | 5089 | mkdir ("foo", 0); |
093e61a6 RS |
5090 | ; return 0; } |
5091 | EOF | |
4665e56c | 5092 | if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5093 | rm -rf conftest* |
75923b2f MK |
5094 | gcc_cv_mkdir_takes_one_arg=no |
5095 | else | |
093e61a6 RS |
5096 | echo "configure: failed program was:" >&5 |
5097 | cat conftest.$ac_ext >&5 | |
5098 | rm -rf conftest* | |
5099 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 5100 | fi |
093e61a6 | 5101 | rm -f conftest* |
75923b2f | 5102 | fi |
cafe096b | 5103 | |
093e61a6 RS |
5104 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
5105 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5106 | cat >> confdefs.h <<\EOF | |
75923b2f | 5107 | #define MKDIR_TAKES_ONE_ARG 1 |
093e61a6 | 5108 | EOF |
75923b2f MK |
5109 | |
5110 | fi | |
5111 | ||
5112 | ||
861bb6c1 JL |
5113 | # File extensions |
5114 | manext='.1' | |
5115 | objext='.o' | |
5116 | ||
5117 | ||
5118 | ||
4977bab6 ZW |
5119 | # With Setjmp/Longjmp based exception handling. |
5120 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
5121 | if test "${enable_sjlj_exceptions+set}" = set; then | |
5122 | enableval="$enable_sjlj_exceptions" | |
5123 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 5124 | cat >> confdefs.h <<EOF |
cafe096b | 5125 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
093e61a6 RS |
5126 | EOF |
5127 | ||
5128 | fi | |
4977bab6 ZW |
5129 | |
5130 | ||
093e61a6 | 5131 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 |
4665e56c | 5132 | echo "configure:5133: checking for main in -lunwind" >&5 |
093e61a6 RS |
5133 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
5134 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 5136 | else |
093e61a6 | 5137 | ac_save_LIBS="$LIBS" |
4977bab6 | 5138 | LIBS="-lunwind $LIBS" |
093e61a6 | 5139 | cat > conftest.$ac_ext <<EOF |
4665e56c | 5140 | #line 5141 "configure" |
093e61a6 | 5141 | #include "confdefs.h" |
4977bab6 | 5142 | |
093e61a6 RS |
5143 | int main() { |
5144 | main() | |
5145 | ; return 0; } | |
5146 | EOF | |
4665e56c | 5147 | if { (eval echo configure:5148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5148 | rm -rf conftest* |
5149 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5150 | else | |
5151 | echo "configure: failed program was:" >&5 | |
5152 | cat conftest.$ac_ext >&5 | |
5153 | rm -rf conftest* | |
5154 | eval "ac_cv_lib_$ac_lib_var=no" | |
5155 | fi | |
5156 | rm -f conftest* | |
5157 | LIBS="$ac_save_LIBS" | |
4977bab6 | 5158 | |
093e61a6 RS |
5159 | fi |
5160 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5161 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
5162 | use_libunwind_default=yes |
5163 | else | |
093e61a6 RS |
5164 | echo "$ac_t""no" 1>&6 |
5165 | use_libunwind_default=no | |
4977bab6 ZW |
5166 | fi |
5167 | ||
5168 | # Use libunwind based exception handling. | |
5169 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5170 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5171 | enableval="$enable_libunwind_exceptions" | |
5172 | use_libunwind_exceptions=$enableval | |
5173 | else | |
5174 | use_libunwind_exceptions=$use_libunwind_default | |
093e61a6 | 5175 | fi |
cafe096b | 5176 | |
093e61a6 RS |
5177 | if test x"$use_libunwind_exceptions" = xyes; then |
5178 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5179 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
093e61a6 | 5180 | EOF |
4977bab6 ZW |
5181 | |
5182 | fi | |
5183 | ||
34a86c2b NN |
5184 | # -------------------------------------------------------- |
5185 | # Build, host, and target specific configuration fragments | |
5186 | # -------------------------------------------------------- | |
5187 | ||
ef69da62 | 5188 | target_gtfiles= |
861bb6c1 | 5189 | build_xm_file= |
f6cb0e63 | 5190 | build_xm_defines= |
861bb6c1 JL |
5191 | build_install_headers_dir=install-headers-tar |
5192 | build_exeext= | |
5193 | host_xm_file= | |
f6cb0e63 | 5194 | host_xm_defines= |
861bb6c1 | 5195 | host_xmake_file= |
6e26218f | 5196 | host_exeext= |
861bb6c1 JL |
5197 | |
5198 | # Decode the host machine, then the target machine. | |
5199 | # For the host machine, we save the xm_file variable as host_xm_file; | |
5200 | # then we decode the target machine and forget everything else | |
5201 | # that came from the host machine. | |
5202 | for machine in $build $host $target; do | |
61ed06c3 | 5203 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5204 | done |
5205 | ||
5206 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5207 | ||
5208 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5209 | if test x"$tm_file" = x |
861bb6c1 JL |
5210 | then tm_file=$cpu_type/$cpu_type.h; fi |
5211 | ||
6b2adea9 | 5212 | if test x"$extra_headers" = x |
861bb6c1 JL |
5213 | then extra_headers=; fi |
5214 | ||
75bffa71 | 5215 | if test x$md_file = x |
e98e406f | 5216 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5217 | |
75bffa71 | 5218 | if test x$out_file = x |
861bb6c1 JL |
5219 | then out_file=$cpu_type/$cpu_type.c; fi |
5220 | ||
75bffa71 | 5221 | if test x"$tmake_file" = x |
861bb6c1 JL |
5222 | then tmake_file=$cpu_type/t-$cpu_type |
5223 | fi | |
5224 | ||
90e6a802 | 5225 | if test x"$dwarf2" = xyes |
756ee602 | 5226 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5227 | fi |
5228 | ||
861bb6c1 | 5229 | # Say what files are being used for the output code and MD file. |
11642c3a | 5230 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5231 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5232 | ||
11642c3a | 5233 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5234 | # about them and drop them. |
5235 | ||
11642c3a ZW |
5236 | bx= |
5237 | for x in $build_xm_file; do | |
5238 | if test -f $srcdir/config/$x | |
5239 | then bx="$bx $x" | |
093e61a6 | 5240 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5241 | fi |
5242 | done | |
5243 | build_xm_file="$bx" | |
5244 | ||
5245 | hx= | |
5246 | for x in $host_xm_file; do | |
5247 | if test -f $srcdir/config/$x | |
5248 | then hx="$hx $x" | |
093e61a6 | 5249 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5250 | fi |
5251 | done | |
5252 | host_xm_file="$hx" | |
5253 | ||
5254 | tx= | |
5255 | for x in $xm_file; do | |
5256 | if test -f $srcdir/config/$x | |
5257 | then tx="$tx $x" | |
093e61a6 | 5258 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5259 | fi |
5260 | done | |
5261 | xm_file="$tx" | |
5262 | ||
861bb6c1 JL |
5263 | count=a |
5264 | for f in $tm_file; do | |
5265 | count=${count}x | |
5266 | done | |
75bffa71 | 5267 | if test $count = ax; then |
861bb6c1 JL |
5268 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5269 | else | |
5270 | echo "Using the following target machine macro files:" | |
5271 | for f in $tm_file; do | |
5272 | echo " $srcdir/config/$f" | |
5273 | done | |
5274 | fi | |
5275 | ||
4977bab6 | 5276 | if test x$need_64bit_hwint = xyes; then |
093e61a6 | 5277 | cat >> confdefs.h <<\EOF |
4977bab6 | 5278 | #define NEED_64BIT_HOST_WIDE_INT 1 |
093e61a6 | 5279 | EOF |
4977bab6 ZW |
5280 | |
5281 | fi | |
5282 | ||
861bb6c1 JL |
5283 | count=a |
5284 | for f in $host_xm_file; do | |
5285 | count=${count}x | |
5286 | done | |
11642c3a ZW |
5287 | if test $count = a; then |
5288 | : | |
5289 | elif test $count = ax; then | |
861bb6c1 JL |
5290 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5291 | else | |
5292 | echo "Using the following host machine macro files:" | |
5293 | for f in $host_xm_file; do | |
5294 | echo " $srcdir/config/$f" | |
5295 | done | |
5296 | fi | |
476d9098 | 5297 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5298 | |
75bffa71 | 5299 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5300 | count=a |
5301 | for f in $build_xm_file; do | |
5302 | count=${count}x | |
5303 | done | |
11642c3a ZW |
5304 | if test $count = a; then |
5305 | : | |
5306 | elif test $count = ax; then | |
861bb6c1 JL |
5307 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5308 | else | |
5309 | echo "Using the following build machine macro files:" | |
5310 | for f in $build_xm_file; do | |
5311 | echo " $srcdir/config/$f" | |
5312 | done | |
5313 | fi | |
5314 | fi | |
5315 | ||
75bffa71 ILT |
5316 | if test x$thread_file = x; then |
5317 | if test x$target_thread_file != x; then | |
a851212a JW |
5318 | thread_file=$target_thread_file |
5319 | else | |
5320 | thread_file='single' | |
5321 | fi | |
861bb6c1 JL |
5322 | fi |
5323 | ||
2121a768 JT |
5324 | if test x$enable___cxa_atexit = xyes || \ |
5325 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
5326 | cat >> confdefs.h <<\EOF | |
5327 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
5328 | EOF | |
5329 | ||
5330 | fi | |
5331 | ||
a5381466 | 5332 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5333 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5334 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
093e61a6 RS |
5335 | |
5336 | cat >> confdefs.h <<EOF | |
1c0ca89d | 5337 | #define EXTRA_MODES_FILE "$extra_modes" |
093e61a6 | 5338 | EOF |
cafe096b | 5339 | |
093e61a6 | 5340 | cat >> confdefs.h <<\EOF |
a5381466 | 5341 | #define EXTRA_CC_MODES 1 |
093e61a6 | 5342 | EOF |
a5381466 ZW |
5343 | |
5344 | fi | |
5345 | ||
b7cb92ad | 5346 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5347 | # the first file included by config.h. |
4977bab6 | 5348 | # If host=build, it is correct to have bconfig include auto-host.h |
093e61a6 | 5349 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5350 | # work to find out the build config parameters. |
75bffa71 | 5351 | if test x$host = x$build |
db81d74a | 5352 | then |
eaf4e618 | 5353 | build_auto=auto-host.h |
06f0b04c | 5354 | FORBUILD=.. |
b7cb92ad JL |
5355 | else |
5356 | # We create a subdir, then run autoconf in the subdir. | |
5357 | # To prevent recursion we set host and build for the new | |
5358 | # invocation of configure to the build for this invocation | |
093e61a6 | 5359 | # of configure. |
b7cb92ad JL |
5360 | tempdir=build.$$ |
5361 | rm -rf $tempdir | |
5362 | mkdir $tempdir | |
5363 | cd $tempdir | |
5364 | case ${srcdir} in | |
255b8a49 | 5365 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5366 | *) realsrcdir=../${srcdir};; |
5367 | esac | |
d920e825 L |
5368 | saved_CFLAGS="${CFLAGS}" |
5369 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5370 | ${realsrcdir}/configure \ | |
534d0cc0 | 5371 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5372 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5373 | |
5374 | # We just finished tests for the build machine, so rename | |
5375 | # the file auto-build.h in the gcc directory. | |
5376 | mv auto-host.h ../auto-build.h | |
5377 | cd .. | |
5378 | rm -rf $tempdir | |
eaf4e618 | 5379 | build_auto=auto-build.h |
3b1b059c | 5380 | FORBUILD=../${build_subdir} |
db81d74a RH |
5381 | fi |
5382 | ||
06f0b04c | 5383 | |
eaf4e618 | 5384 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5385 | tm_p_file="${tm_p_file} tm-preds.h" |
5386 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5387 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5388 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5389 | # put this back in temporarily. |
5390 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5391 | |
34a86c2b NN |
5392 | # -------- |
5393 | # UNSORTED | |
5394 | # -------- | |
5395 | ||
f1943b77 | 5396 | # Get the version trigger filename from the toplevel |
75bffa71 | 5397 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5398 | gcc_version_trigger=$with_gcc_version_trigger |
5399 | else | |
5400 | gcc_version_trigger=${srcdir}/version.c | |
5401 | fi | |
022dae81 | 5402 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5403 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5404 | |
cc1e60ea | 5405 | # Compile in configure arguments. |
8105825d | 5406 | if test -f configargs.h ; then |
cc1e60ea | 5407 | # Being re-configured. |
022dae81 | 5408 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5409 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5410 | else | |
5411 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5412 | fi | |
5413 | cat > configargs.h <<EOF | |
5414 | /* Generated automatically. */ | |
5415 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5416 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5417 | |
5418 | static const struct { | |
5419 | const char *name, *value; | |
5420 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5421 | EOF |
5422 | ||
ab87f8c8 JL |
5423 | # Internationalization |
5424 | PACKAGE=gcc | |
5425 | VERSION="$gcc_version" | |
861bb6c1 | 5426 | |
ab87f8c8 JL |
5427 | |
5428 | ||
dc6746e7 | 5429 | # Enable NLS support by default |
ab87f8c8 JL |
5430 | # Check whether --enable-nls or --disable-nls was given. |
5431 | if test "${enable_nls+set}" = set; then | |
5432 | enableval="$enable_nls" | |
093e61a6 | 5433 | : |
861bb6c1 | 5434 | else |
dc6746e7 | 5435 | enable_nls=yes |
093e61a6 RS |
5436 | fi |
5437 | ||
861bb6c1 | 5438 | |
dc6746e7 PT |
5439 | # if cross compiling, disable NLS support. |
5440 | # It's not worth the trouble, at least for now. | |
5441 | ||
063a4b85 | 5442 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
093e61a6 | 5443 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
dc6746e7 PT |
5444 | enable_nls=no |
5445 | fi | |
5446 | ||
861bb6c1 | 5447 | |
093e61a6 RS |
5448 | |
5449 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
619833ad | 5450 | echo "configure:5451: checking for library containing strerror" >&5 |
093e61a6 RS |
5451 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
5452 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5453 | else |
093e61a6 RS |
5454 | ac_func_search_save_LIBS="$LIBS" |
5455 | ac_cv_search_strerror="no" | |
5456 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5457 | #line 5458 "configure" |
093e61a6 | 5458 | #include "confdefs.h" |
ab87f8c8 JL |
5459 | /* Override any gcc2 internal prototype to avoid an error. */ |
5460 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5461 | builtin and then its argument prototype would still apply. */ |
5462 | char strerror(); | |
5463 | ||
5464 | int main() { | |
5465 | strerror() | |
5466 | ; return 0; } | |
5467 | EOF | |
619833ad | 5468 | if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5469 | rm -rf conftest* |
71a94577 | 5470 | ac_cv_search_strerror="none required" |
ab87f8c8 | 5471 | else |
093e61a6 RS |
5472 | echo "configure: failed program was:" >&5 |
5473 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5474 | fi |
093e61a6 RS |
5475 | rm -f conftest* |
5476 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do | |
5477 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5478 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5479 | #line 5480 "configure" |
093e61a6 | 5480 | #include "confdefs.h" |
71a94577 ZW |
5481 | /* Override any gcc2 internal prototype to avoid an error. */ |
5482 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5483 | builtin and then its argument prototype would still apply. */ |
5484 | char strerror(); | |
5485 | ||
5486 | int main() { | |
5487 | strerror() | |
5488 | ; return 0; } | |
5489 | EOF | |
619833ad | 5490 | if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5491 | rm -rf conftest* |
5492 | ac_cv_search_strerror="-l$i" | |
71a94577 | 5493 | break |
861bb6c1 | 5494 | else |
093e61a6 RS |
5495 | echo "configure: failed program was:" >&5 |
5496 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5497 | fi |
093e61a6 RS |
5498 | rm -f conftest* |
5499 | done | |
5500 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 5501 | fi |
cafe096b | 5502 | |
093e61a6 RS |
5503 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5504 | if test "$ac_cv_search_strerror" != "no"; then | |
5505 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5506 | ||
5507 | else : | |
5508 | ||
71a94577 | 5509 | fi |
093e61a6 | 5510 | |
2ce3c6c6 | 5511 | |
093e61a6 | 5512 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
619833ad | 5513 | echo "configure:5514: checking for working const" >&5 |
093e61a6 RS |
5514 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5515 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5516 | else |
093e61a6 | 5517 | cat > conftest.$ac_ext <<EOF |
619833ad | 5518 | #line 5519 "configure" |
093e61a6 | 5519 | #include "confdefs.h" |
ab87f8c8 | 5520 | |
093e61a6 RS |
5521 | int main() { |
5522 | ||
5523 | /* Ultrix mips cc rejects this. */ | |
5524 | typedef int charset[2]; const charset x; | |
5525 | /* SunOS 4.1.1 cc rejects this. */ | |
5526 | char const *const *ccp; | |
5527 | char **p; | |
5528 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5529 | struct point {int x, y;}; | |
5530 | static struct point const zero = {0,0}; | |
5531 | /* AIX XL C 1.02.0.0 rejects this. | |
5532 | It does not let you subtract one const X* pointer from another in an arm | |
5533 | of an if-expression whose if-part is not a constant expression */ | |
5534 | const char *g = "string"; | |
5535 | ccp = &g + (g ? g-g : 0); | |
5536 | /* HPUX 7.0 cc rejects these. */ | |
5537 | ++ccp; | |
5538 | p = (char**) ccp; | |
5539 | ccp = (char const *const *) p; | |
5540 | { /* SCO 3.2v4 cc rejects this. */ | |
5541 | char *t; | |
5542 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5543 | ||
5544 | *t++ = 0; | |
5545 | } | |
5546 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5547 | int x[] = {25, 17}; | |
5548 | const int *foo = &x[0]; | |
5549 | ++foo; | |
5550 | } | |
5551 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5552 | typedef const int *iptr; | |
5553 | iptr p = 0; | |
5554 | ++p; | |
cafe096b | 5555 | } |
093e61a6 RS |
5556 | { /* AIX XL C 1.02.0.0 rejects this saying |
5557 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5558 | struct s { int j; const int *ap[3]; }; | |
5559 | struct s *b; b->j = 5; | |
5560 | } | |
5561 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5562 | const int foo = 10; | |
5563 | } | |
5564 | ||
5565 | ; return 0; } | |
5566 | EOF | |
619833ad | 5567 | if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5568 | rm -rf conftest* |
ab87f8c8 | 5569 | ac_cv_c_const=yes |
861bb6c1 | 5570 | else |
093e61a6 RS |
5571 | echo "configure: failed program was:" >&5 |
5572 | cat conftest.$ac_ext >&5 | |
5573 | rm -rf conftest* | |
5574 | ac_cv_c_const=no | |
861bb6c1 | 5575 | fi |
093e61a6 | 5576 | rm -f conftest* |
861bb6c1 JL |
5577 | fi |
5578 | ||
093e61a6 RS |
5579 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5580 | if test $ac_cv_c_const = no; then | |
5581 | cat >> confdefs.h <<\EOF | |
5582 | #define const | |
5583 | EOF | |
ab87f8c8 JL |
5584 | |
5585 | fi | |
093e61a6 RS |
5586 | |
5587 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
619833ad | 5588 | echo "configure:5589: checking for off_t" >&5 |
093e61a6 RS |
5589 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5591 | else | |
5592 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5593 | #line 5594 "configure" |
093e61a6 RS |
5594 | #include "confdefs.h" |
5595 | #include <sys/types.h> | |
5596 | #if STDC_HEADERS | |
5597 | #include <stdlib.h> | |
5598 | #include <stddef.h> | |
5599 | #endif | |
5600 | EOF | |
5601 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5602 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5603 | rm -rf conftest* | |
5604 | ac_cv_type_off_t=yes | |
cafe096b | 5605 | else |
093e61a6 RS |
5606 | rm -rf conftest* |
5607 | ac_cv_type_off_t=no | |
5608 | fi | |
5609 | rm -f conftest* | |
cafe096b | 5610 | |
093e61a6 RS |
5611 | fi |
5612 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
5613 | if test $ac_cv_type_off_t = no; then | |
5614 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5615 | #define off_t long |
093e61a6 | 5616 | EOF |
ab87f8c8 JL |
5617 | |
5618 | fi | |
5619 | ||
093e61a6 | 5620 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
619833ad | 5621 | echo "configure:5622: checking for size_t" >&5 |
093e61a6 RS |
5622 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5624 | else |
093e61a6 | 5625 | cat > conftest.$ac_ext <<EOF |
619833ad | 5626 | #line 5627 "configure" |
093e61a6 RS |
5627 | #include "confdefs.h" |
5628 | #include <sys/types.h> | |
5629 | #if STDC_HEADERS | |
5630 | #include <stdlib.h> | |
5631 | #include <stddef.h> | |
5632 | #endif | |
5633 | EOF | |
5634 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5635 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5636 | rm -rf conftest* | |
cb65112a | 5637 | ac_cv_type_size_t=yes |
ab87f8c8 | 5638 | else |
093e61a6 RS |
5639 | rm -rf conftest* |
5640 | ac_cv_type_size_t=no | |
ab87f8c8 | 5641 | fi |
093e61a6 | 5642 | rm -f conftest* |
cafe096b | 5643 | |
093e61a6 RS |
5644 | fi |
5645 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
5646 | if test $ac_cv_type_size_t = no; then | |
5647 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5648 | #define size_t unsigned |
093e61a6 | 5649 | EOF |
ab87f8c8 JL |
5650 | |
5651 | fi | |
5652 | ||
71a94577 ZW |
5653 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5654 | # for constant arguments. Useless! | |
093e61a6 | 5655 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
619833ad | 5656 | echo "configure:5657: checking for working alloca.h" >&5 |
093e61a6 RS |
5657 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5658 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5659 | else | |
5660 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5661 | #line 5662 "configure" |
093e61a6 | 5662 | #include "confdefs.h" |
71a94577 | 5663 | #include <alloca.h> |
093e61a6 RS |
5664 | int main() { |
5665 | char *p = alloca(2 * sizeof(int)); | |
5666 | ; return 0; } | |
5667 | EOF | |
619833ad | 5668 | if { (eval echo configure:5669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5669 | rm -rf conftest* |
5670 | ac_cv_header_alloca_h=yes | |
5671 | else | |
5672 | echo "configure: failed program was:" >&5 | |
5673 | cat conftest.$ac_ext >&5 | |
5674 | rm -rf conftest* | |
5675 | ac_cv_header_alloca_h=no | |
5676 | fi | |
5677 | rm -f conftest* | |
5678 | fi | |
5679 | ||
5680 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5681 | if test $ac_cv_header_alloca_h = yes; then | |
5682 | cat >> confdefs.h <<\EOF | |
71a94577 | 5683 | #define HAVE_ALLOCA_H 1 |
093e61a6 | 5684 | EOF |
71a94577 | 5685 | |
ab87f8c8 | 5686 | fi |
ab87f8c8 | 5687 | |
093e61a6 | 5688 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
619833ad | 5689 | echo "configure:5690: checking for alloca" >&5 |
093e61a6 RS |
5690 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5692 | else |
093e61a6 | 5693 | cat > conftest.$ac_ext <<EOF |
619833ad | 5694 | #line 5695 "configure" |
093e61a6 RS |
5695 | #include "confdefs.h" |
5696 | ||
71a94577 ZW |
5697 | #ifdef __GNUC__ |
5698 | # define alloca __builtin_alloca | |
ab87f8c8 | 5699 | #else |
71a94577 ZW |
5700 | # ifdef _MSC_VER |
5701 | # include <malloc.h> | |
5702 | # define alloca _alloca | |
5703 | # else | |
5704 | # if HAVE_ALLOCA_H | |
5705 | # include <alloca.h> | |
5706 | # else | |
5707 | # ifdef _AIX | |
5708 | #pragma alloca | |
5709 | # else | |
5710 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5711 | char *alloca (); | |
5712 | # endif | |
5713 | # endif | |
5714 | # endif | |
5715 | # endif | |
ab87f8c8 JL |
5716 | #endif |
5717 | ||
093e61a6 RS |
5718 | int main() { |
5719 | char *p = (char *) alloca(1); | |
5720 | ; return 0; } | |
5721 | EOF | |
619833ad | 5722 | if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5723 | rm -rf conftest* |
71a94577 | 5724 | ac_cv_func_alloca_works=yes |
ab87f8c8 | 5725 | else |
093e61a6 RS |
5726 | echo "configure: failed program was:" >&5 |
5727 | cat conftest.$ac_ext >&5 | |
5728 | rm -rf conftest* | |
5729 | ac_cv_func_alloca_works=no | |
ab87f8c8 | 5730 | fi |
093e61a6 | 5731 | rm -f conftest* |
ab87f8c8 JL |
5732 | fi |
5733 | ||
093e61a6 | 5734 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
71a94577 | 5735 | if test $ac_cv_func_alloca_works = yes; then |
093e61a6 | 5736 | cat >> confdefs.h <<\EOF |
cafe096b | 5737 | #define HAVE_ALLOCA 1 |
093e61a6 | 5738 | EOF |
cafe096b | 5739 | |
093e61a6 | 5740 | fi |
cafe096b | 5741 | |
093e61a6 RS |
5742 | if test $ac_cv_func_alloca_works = no; then |
5743 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5744 | # that cause trouble. Some versions do not even contain alloca or | |
5745 | # contain a buggy version. If you still want to use their alloca, | |
5746 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5747 | ALLOCA=alloca.${ac_objext} | |
5748 | cat >> confdefs.h <<\EOF | |
71a94577 | 5749 | #define C_ALLOCA 1 |
093e61a6 | 5750 | EOF |
71a94577 ZW |
5751 | |
5752 | ||
093e61a6 | 5753 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
619833ad | 5754 | echo "configure:5755: checking whether alloca needs Cray hooks" >&5 |
093e61a6 RS |
5755 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5756 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5757 | else |
093e61a6 | 5758 | cat > conftest.$ac_ext <<EOF |
619833ad | 5759 | #line 5760 "configure" |
093e61a6 | 5760 | #include "confdefs.h" |
71a94577 ZW |
5761 | #if defined(CRAY) && ! defined(CRAY2) |
5762 | webecray | |
5763 | #else | |
5764 | wenotbecray | |
5765 | #endif | |
5766 | ||
093e61a6 | 5767 | EOF |
71a94577 | 5768 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5769 | egrep "webecray" >/dev/null 2>&1; then |
5770 | rm -rf conftest* | |
71a94577 ZW |
5771 | ac_cv_os_cray=yes |
5772 | else | |
093e61a6 | 5773 | rm -rf conftest* |
71a94577 | 5774 | ac_cv_os_cray=no |
ab87f8c8 | 5775 | fi |
71a94577 | 5776 | rm -f conftest* |
ab87f8c8 | 5777 | |
71a94577 | 5778 | fi |
093e61a6 RS |
5779 | |
5780 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
71a94577 | 5781 | if test $ac_cv_os_cray = yes; then |
093e61a6 RS |
5782 | for ac_func in _getb67 GETB67 getb67; do |
5783 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
619833ad | 5784 | echo "configure:5785: checking for $ac_func" >&5 |
093e61a6 RS |
5785 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5786 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5787 | else | |
5788 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5789 | #line 5790 "configure" |
093e61a6 | 5790 | #include "confdefs.h" |
ab87f8c8 | 5791 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5792 | which can conflict with char $ac_func(); below. */ |
5793 | #include <assert.h> | |
ab87f8c8 JL |
5794 | /* Override any gcc2 internal prototype to avoid an error. */ |
5795 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5796 | builtin and then its argument prototype would still apply. */ |
5797 | char $ac_func(); | |
5798 | ||
5799 | int main() { | |
5800 | ||
ab87f8c8 JL |
5801 | /* The GNU C library defines this for functions which it implements |
5802 | to always fail with ENOSYS. Some functions are actually named | |
5803 | something starting with __ and the normal name is an alias. */ | |
5804 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5805 | choke me | |
5806 | #else | |
093e61a6 | 5807 | $ac_func(); |
ab87f8c8 JL |
5808 | #endif |
5809 | ||
093e61a6 RS |
5810 | ; return 0; } |
5811 | EOF | |
619833ad | 5812 | if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5813 | rm -rf conftest* |
5814 | eval "ac_cv_func_$ac_func=yes" | |
5815 | else | |
5816 | echo "configure: failed program was:" >&5 | |
5817 | cat conftest.$ac_ext >&5 | |
5818 | rm -rf conftest* | |
5819 | eval "ac_cv_func_$ac_func=no" | |
5820 | fi | |
5821 | rm -f conftest* | |
5822 | fi | |
5823 | ||
5824 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5825 | echo "$ac_t""yes" 1>&6 | |
5826 | cat >> confdefs.h <<EOF | |
71a94577 | 5827 | #define CRAY_STACKSEG_END $ac_func |
093e61a6 | 5828 | EOF |
71a94577 | 5829 | |
093e61a6 RS |
5830 | break |
5831 | else | |
5832 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5833 | fi |
ab87f8c8 | 5834 | |
093e61a6 | 5835 | done |
71a94577 | 5836 | fi |
ab87f8c8 | 5837 | |
093e61a6 | 5838 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
619833ad | 5839 | echo "configure:5840: checking stack direction for C alloca" >&5 |
093e61a6 RS |
5840 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5841 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
5842 | else |
5843 | if test "$cross_compiling" = yes; then | |
5844 | ac_cv_c_stack_direction=0 | |
ab87f8c8 | 5845 | else |
093e61a6 | 5846 | cat > conftest.$ac_ext <<EOF |
619833ad | 5847 | #line 5848 "configure" |
093e61a6 | 5848 | #include "confdefs.h" |
71a94577 ZW |
5849 | find_stack_direction () |
5850 | { | |
5851 | static char *addr = 0; | |
5852 | auto char dummy; | |
5853 | if (addr == 0) | |
5854 | { | |
5855 | addr = &dummy; | |
5856 | return find_stack_direction (); | |
5857 | } | |
5858 | else | |
5859 | return (&dummy > addr) ? 1 : -1; | |
5860 | } | |
5861 | main () | |
5862 | { | |
093e61a6 | 5863 | exit (find_stack_direction() < 0); |
71a94577 | 5864 | } |
093e61a6 | 5865 | EOF |
619833ad | 5866 | if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5867 | then |
71a94577 | 5868 | ac_cv_c_stack_direction=1 |
ab87f8c8 | 5869 | else |
093e61a6 RS |
5870 | echo "configure: failed program was:" >&5 |
5871 | cat conftest.$ac_ext >&5 | |
5872 | rm -fr conftest* | |
5873 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5874 | fi |
093e61a6 | 5875 | rm -fr conftest* |
ab87f8c8 | 5876 | fi |
093e61a6 | 5877 | |
71a94577 ZW |
5878 | fi |
5879 | ||
093e61a6 RS |
5880 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
5881 | cat >> confdefs.h <<EOF | |
71a94577 | 5882 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
093e61a6 | 5883 | EOF |
ab87f8c8 | 5884 | |
ab87f8c8 JL |
5885 | fi |
5886 | ||
ab87f8c8 | 5887 | |
093e61a6 | 5888 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
619833ad | 5889 | echo "configure:5890: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
093e61a6 RS |
5890 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 5892 | else |
093e61a6 | 5893 | cat > conftest.$ac_ext <<EOF |
619833ad | 5894 | #line 5895 "configure" |
093e61a6 | 5895 | #include "confdefs.h" |
ab87f8c8 | 5896 | |
71a94577 ZW |
5897 | #include <features.h> |
5898 | #ifdef __GNU_LIBRARY__ | |
5899 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5900 | Lucky GNU user | |
5901 | #endif | |
5902 | #endif | |
093e61a6 RS |
5903 | |
5904 | EOF | |
71a94577 | 5905 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5906 | egrep "Lucky GNU user" >/dev/null 2>&1; then |
5907 | rm -rf conftest* | |
71a94577 | 5908 | ac_cv_gnu_library_2_1=yes |
ab87f8c8 | 5909 | else |
093e61a6 | 5910 | rm -rf conftest* |
71a94577 | 5911 | ac_cv_gnu_library_2_1=no |
ab87f8c8 | 5912 | fi |
71a94577 | 5913 | rm -f conftest* |
ab87f8c8 | 5914 | |
093e61a6 RS |
5915 | |
5916 | ||
71a94577 | 5917 | fi |
ab87f8c8 | 5918 | |
093e61a6 RS |
5919 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5920 | ||
71a94577 | 5921 | GLIBC21="$ac_cv_gnu_library_2_1" |
093e61a6 | 5922 | |
ab87f8c8 | 5923 | |
093e61a6 RS |
5924 | |
5925 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
71a94577 ZW |
5926 | stdlib.h string.h unistd.h sys/param.h |
5927 | do | |
093e61a6 RS |
5928 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5929 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
619833ad | 5930 | echo "configure:5931: checking for $ac_hdr" >&5 |
093e61a6 RS |
5931 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5932 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5933 | else | |
5934 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5935 | #line 5936 "configure" |
093e61a6 RS |
5936 | #include "confdefs.h" |
5937 | #include <$ac_hdr> | |
5938 | EOF | |
5939 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
619833ad | 5940 | { (eval echo configure:5941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
5941 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5942 | if test -z "$ac_err"; then | |
5943 | rm -rf conftest* | |
5944 | eval "ac_cv_header_$ac_safe=yes" | |
5945 | else | |
5946 | echo "$ac_err" >&5 | |
5947 | echo "configure: failed program was:" >&5 | |
5948 | cat conftest.$ac_ext >&5 | |
5949 | rm -rf conftest* | |
5950 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 5951 | fi |
093e61a6 | 5952 | rm -f conftest* |
ab87f8c8 | 5953 | fi |
093e61a6 RS |
5954 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5955 | echo "$ac_t""yes" 1>&6 | |
5956 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5957 | cat >> confdefs.h <<EOF | |
5958 | #define $ac_tr_hdr 1 | |
5959 | EOF | |
5960 | ||
5961 | else | |
5962 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5963 | fi |
71a94577 | 5964 | done |
ab87f8c8 | 5965 | |
093e61a6 | 5966 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
71a94577 ZW |
5967 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ |
5968 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5969 | do | |
093e61a6 | 5970 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
619833ad | 5971 | echo "configure:5972: checking for $ac_func" >&5 |
093e61a6 RS |
5972 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5974 | else | |
5975 | cat > conftest.$ac_ext <<EOF | |
619833ad | 5976 | #line 5977 "configure" |
093e61a6 | 5977 | #include "confdefs.h" |
71a94577 | 5978 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5979 | which can conflict with char $ac_func(); below. */ |
5980 | #include <assert.h> | |
ab87f8c8 JL |
5981 | /* Override any gcc2 internal prototype to avoid an error. */ |
5982 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5983 | builtin and then its argument prototype would still apply. */ |
5984 | char $ac_func(); | |
5985 | ||
5986 | int main() { | |
5987 | ||
71a94577 ZW |
5988 | /* The GNU C library defines this for functions which it implements |
5989 | to always fail with ENOSYS. Some functions are actually named | |
5990 | something starting with __ and the normal name is an alias. */ | |
5991 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5992 | choke me | |
5993 | #else | |
093e61a6 | 5994 | $ac_func(); |
71a94577 ZW |
5995 | #endif |
5996 | ||
093e61a6 RS |
5997 | ; return 0; } |
5998 | EOF | |
619833ad | 5999 | if { (eval echo configure:6000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6000 | rm -rf conftest* |
6001 | eval "ac_cv_func_$ac_func=yes" | |
6002 | else | |
6003 | echo "configure: failed program was:" >&5 | |
6004 | cat conftest.$ac_ext >&5 | |
6005 | rm -rf conftest* | |
6006 | eval "ac_cv_func_$ac_func=no" | |
6007 | fi | |
6008 | rm -f conftest* | |
6009 | fi | |
71a94577 | 6010 | |
093e61a6 RS |
6011 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6012 | echo "$ac_t""yes" 1>&6 | |
6013 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6014 | cat >> confdefs.h <<EOF | |
6015 | #define $ac_tr_func 1 | |
6016 | EOF | |
6017 | ||
6018 | else | |
6019 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6020 | fi |
6021 | done | |
6022 | ||
6023 | ||
093e61a6 RS |
6024 | |
6025 | ||
b7f2fb96 | 6026 | am_cv_lib_iconv_ldpath= |
093e61a6 | 6027 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
71a94577 ZW |
6028 | if test "${with_libiconv_prefix+set}" = set; then |
6029 | withval="$with_libiconv_prefix" | |
093e61a6 | 6030 | |
71a94577 ZW |
6031 | for dir in `echo "$withval" | tr : ' '`; do |
6032 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 6033 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 | 6034 | done |
093e61a6 RS |
6035 | |
6036 | fi | |
ab87f8c8 | 6037 | |
71a94577 | 6038 | |
093e61a6 | 6039 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
619833ad | 6040 | echo "configure:6041: checking for iconv" >&5 |
093e61a6 RS |
6041 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
6042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 6043 | else |
093e61a6 | 6044 | |
71a94577 ZW |
6045 | am_cv_func_iconv="no, consider installing GNU libiconv" |
6046 | am_cv_lib_iconv=no | |
093e61a6 | 6047 | cat > conftest.$ac_ext <<EOF |
619833ad | 6048 | #line 6049 "configure" |
093e61a6 | 6049 | #include "confdefs.h" |
71a94577 ZW |
6050 | #include <stdlib.h> |
6051 | #include <iconv.h> | |
093e61a6 | 6052 | int main() { |
71a94577 ZW |
6053 | iconv_t cd = iconv_open("",""); |
6054 | iconv(cd,NULL,NULL,NULL,NULL); | |
6055 | iconv_close(cd); | |
093e61a6 RS |
6056 | ; return 0; } |
6057 | EOF | |
619833ad | 6058 | if { (eval echo configure:6059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6059 | rm -rf conftest* |
71a94577 | 6060 | am_cv_func_iconv=yes |
ab87f8c8 | 6061 | else |
093e61a6 RS |
6062 | echo "configure: failed program was:" >&5 |
6063 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6064 | fi |
093e61a6 | 6065 | rm -f conftest* |
71a94577 ZW |
6066 | if test "$am_cv_func_iconv" != yes; then |
6067 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 6068 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 6069 | cat > conftest.$ac_ext <<EOF |
619833ad | 6070 | #line 6071 "configure" |
093e61a6 | 6071 | #include "confdefs.h" |
71a94577 ZW |
6072 | #include <stdlib.h> |
6073 | #include <iconv.h> | |
093e61a6 | 6074 | int main() { |
71a94577 ZW |
6075 | iconv_t cd = iconv_open("",""); |
6076 | iconv(cd,NULL,NULL,NULL,NULL); | |
6077 | iconv_close(cd); | |
093e61a6 RS |
6078 | ; return 0; } |
6079 | EOF | |
619833ad | 6080 | if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6081 | rm -rf conftest* |
71a94577 ZW |
6082 | am_cv_lib_iconv=yes |
6083 | am_cv_func_iconv=yes | |
ab87f8c8 | 6084 | else |
093e61a6 RS |
6085 | echo "configure: failed program was:" >&5 |
6086 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6087 | fi |
093e61a6 | 6088 | rm -f conftest* |
71a94577 ZW |
6089 | LIBS="$am_save_LIBS" |
6090 | fi | |
093e61a6 | 6091 | |
cafe096b | 6092 | fi |
cafe096b | 6093 | |
093e61a6 RS |
6094 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
6095 | if test "$am_cv_func_iconv" = yes; then | |
6096 | cat >> confdefs.h <<\EOF | |
71a94577 | 6097 | #define HAVE_ICONV 1 |
093e61a6 | 6098 | EOF |
71a94577 | 6099 | |
093e61a6 | 6100 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
619833ad | 6101 | echo "configure:6102: checking for iconv declaration" >&5 |
093e61a6 RS |
6102 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
6103 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6104 | else |
093e61a6 RS |
6105 | |
6106 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6107 | #line 6108 "configure" |
093e61a6 | 6108 | #include "confdefs.h" |
ab87f8c8 | 6109 | |
71a94577 ZW |
6110 | #include <stdlib.h> |
6111 | #include <iconv.h> | |
6112 | extern | |
6113 | #ifdef __cplusplus | |
6114 | "C" | |
6115 | #endif | |
6116 | #if defined(__STDC__) || defined(__cplusplus) | |
6117 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6118 | #else | |
6119 | size_t iconv(); | |
6120 | #endif | |
ab87f8c8 | 6121 | |
093e61a6 | 6122 | int main() { |
380a627a | 6123 | |
093e61a6 RS |
6124 | ; return 0; } |
6125 | EOF | |
619833ad | 6126 | if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 6127 | rm -rf conftest* |
71a94577 | 6128 | am_cv_proto_iconv_arg1="" |
ab87f8c8 | 6129 | else |
093e61a6 RS |
6130 | echo "configure: failed program was:" >&5 |
6131 | cat conftest.$ac_ext >&5 | |
6132 | rm -rf conftest* | |
6133 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 6134 | fi |
093e61a6 | 6135 | rm -f conftest* |
71a94577 | 6136 | 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);" |
ab87f8c8 | 6137 | fi |
71a94577 ZW |
6138 | |
6139 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
6140 | echo "$ac_t""${ac_t:- |
6141 | }$am_cv_proto_iconv" 1>&6 | |
6142 | cat >> confdefs.h <<EOF | |
71a94577 | 6143 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 6144 | EOF |
71a94577 ZW |
6145 | |
6146 | fi | |
6147 | LIBICONV= | |
6148 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 6149 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 | 6150 | fi |
093e61a6 | 6151 | |
71a94577 | 6152 | |
093e61a6 RS |
6153 | |
6154 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
619833ad | 6155 | echo "configure:6156: checking for nl_langinfo and CODESET" >&5 |
093e61a6 RS |
6156 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
6157 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6158 | else |
093e61a6 | 6159 | cat > conftest.$ac_ext <<EOF |
619833ad | 6160 | #line 6161 "configure" |
093e61a6 | 6161 | #include "confdefs.h" |
71a94577 | 6162 | #include <langinfo.h> |
093e61a6 | 6163 | int main() { |
71a94577 | 6164 | char* cs = nl_langinfo(CODESET); |
093e61a6 RS |
6165 | ; return 0; } |
6166 | EOF | |
619833ad | 6167 | if { (eval echo configure:6168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6168 | rm -rf conftest* |
71a94577 | 6169 | am_cv_langinfo_codeset=yes |
ab87f8c8 | 6170 | else |
093e61a6 RS |
6171 | echo "configure: failed program was:" >&5 |
6172 | cat conftest.$ac_ext >&5 | |
6173 | rm -rf conftest* | |
6174 | am_cv_langinfo_codeset=no | |
ab87f8c8 | 6175 | fi |
093e61a6 RS |
6176 | rm -f conftest* |
6177 | ||
cafe096b | 6178 | fi |
cafe096b | 6179 | |
093e61a6 RS |
6180 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
6181 | if test $am_cv_langinfo_codeset = yes; then | |
6182 | cat >> confdefs.h <<\EOF | |
71a94577 | 6183 | #define HAVE_LANGINFO_CODESET 1 |
093e61a6 | 6184 | EOF |
ab87f8c8 | 6185 | |
71a94577 ZW |
6186 | fi |
6187 | ||
6188 | if test $ac_cv_header_locale_h = yes; then | |
093e61a6 | 6189 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
619833ad | 6190 | echo "configure:6191: checking for LC_MESSAGES" >&5 |
093e61a6 RS |
6191 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
6192 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6193 | else | |
6194 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6195 | #line 6196 "configure" |
093e61a6 | 6196 | #include "confdefs.h" |
71a94577 | 6197 | #include <locale.h> |
093e61a6 | 6198 | int main() { |
71a94577 | 6199 | return LC_MESSAGES |
093e61a6 RS |
6200 | ; return 0; } |
6201 | EOF | |
619833ad | 6202 | if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6203 | rm -rf conftest* |
71a94577 ZW |
6204 | am_cv_val_LC_MESSAGES=yes |
6205 | else | |
093e61a6 RS |
6206 | echo "configure: failed program was:" >&5 |
6207 | cat conftest.$ac_ext >&5 | |
6208 | rm -rf conftest* | |
6209 | am_cv_val_LC_MESSAGES=no | |
71a94577 | 6210 | fi |
093e61a6 | 6211 | rm -f conftest* |
71a94577 | 6212 | fi |
cafe096b | 6213 | |
093e61a6 RS |
6214 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
6215 | if test $am_cv_val_LC_MESSAGES = yes; then | |
6216 | cat >> confdefs.h <<\EOF | |
71a94577 | 6217 | #define HAVE_LC_MESSAGES 1 |
093e61a6 | 6218 | EOF |
71a94577 | 6219 | |
ab87f8c8 | 6220 | fi |
71a94577 | 6221 | fi |
093e61a6 | 6222 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
619833ad | 6223 | echo "configure:6224: checking whether NLS is requested" >&5 |
71a94577 ZW |
6224 | # Check whether --enable-nls or --disable-nls was given. |
6225 | if test "${enable_nls+set}" = set; then | |
6226 | enableval="$enable_nls" | |
6227 | USE_NLS=$enableval | |
6228 | else | |
6229 | USE_NLS=yes | |
093e61a6 | 6230 | fi |
71a94577 | 6231 | |
093e61a6 RS |
6232 | echo "$ac_t""$USE_NLS" 1>&6 |
6233 | ||
71a94577 ZW |
6234 | |
6235 | BUILD_INCLUDED_LIBINTL=no | |
6236 | USE_INCLUDED_LIBINTL=no | |
6237 | INTLLIBS= | |
77c06844 | 6238 | INTLDEPS= |
71a94577 ZW |
6239 | |
6240 | if test "$USE_NLS" = "yes"; then | |
093e61a6 | 6241 | cat >> confdefs.h <<\EOF |
71a94577 | 6242 | #define ENABLE_NLS 1 |
093e61a6 | 6243 | EOF |
71a94577 | 6244 | |
093e61a6 | 6245 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 |
619833ad | 6246 | echo "configure:6247: checking whether included gettext is requested" >&5 |
093e61a6 | 6247 | # Check whether --with-included-gettext or --without-included-gettext was given. |
71a94577 ZW |
6248 | if test "${with_included_gettext+set}" = set; then |
6249 | withval="$with_included_gettext" | |
6250 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 6251 | else |
71a94577 | 6252 | nls_cv_force_use_gnu_gettext=no |
093e61a6 RS |
6253 | fi |
6254 | ||
6255 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
71a94577 ZW |
6256 | |
6257 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
6258 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
6259 | CATOBJEXT=NONE | |
6260 | ||
093e61a6 RS |
6261 | |
6262 | ||
71a94577 | 6263 | |
093e61a6 RS |
6264 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` |
6265 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
619833ad | 6266 | echo "configure:6267: checking for libintl.h" >&5 |
093e61a6 RS |
6267 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6269 | else |
093e61a6 | 6270 | cat > conftest.$ac_ext <<EOF |
619833ad | 6271 | #line 6272 "configure" |
093e61a6 | 6272 | #include "confdefs.h" |
cafe096b | 6273 | #include <libintl.h> |
093e61a6 RS |
6274 | EOF |
6275 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
619833ad | 6276 | { (eval echo configure:6277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
6277 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6278 | if test -z "$ac_err"; then | |
6279 | rm -rf conftest* | |
6280 | eval "ac_cv_header_$ac_safe=yes" | |
6281 | else | |
6282 | echo "$ac_err" >&5 | |
6283 | echo "configure: failed program was:" >&5 | |
6284 | cat conftest.$ac_ext >&5 | |
6285 | rm -rf conftest* | |
6286 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6287 | fi |
093e61a6 | 6288 | rm -f conftest* |
71a94577 | 6289 | fi |
093e61a6 RS |
6290 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6291 | echo "$ac_t""yes" 1>&6 | |
6292 | cat >> confdefs.h <<\EOF | |
cafe096b | 6293 | #define HAVE_LIBINTL_H 1 |
093e61a6 RS |
6294 | EOF |
6295 | ||
6296 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
619833ad | 6297 | echo "configure:6298: checking for GNU gettext in libc" >&5 |
093e61a6 RS |
6298 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6299 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6300 | else | |
6301 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6302 | #line 6303 "configure" |
093e61a6 | 6303 | #include "confdefs.h" |
71a94577 | 6304 | #include <libintl.h> |
ab87f8c8 | 6305 | extern int _nl_msg_cat_cntr; |
093e61a6 | 6306 | int main() { |
71a94577 ZW |
6307 | bindtextdomain ("", ""); |
6308 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6309 | ; return 0; } |
6310 | EOF | |
619833ad | 6311 | if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6312 | rm -rf conftest* |
71a94577 | 6313 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 | 6314 | else |
093e61a6 RS |
6315 | echo "configure: failed program was:" >&5 |
6316 | cat conftest.$ac_ext >&5 | |
6317 | rm -rf conftest* | |
6318 | gt_cv_func_gnugettext1_libc=no | |
ab87f8c8 | 6319 | fi |
093e61a6 | 6320 | rm -f conftest* |
ab87f8c8 | 6321 | fi |
093e61a6 RS |
6322 | |
6323 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 | |
ab87f8c8 | 6324 | |
71a94577 | 6325 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
093e61a6 | 6326 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 |
619833ad | 6327 | echo "configure:6328: checking for GNU gettext in libintl" >&5 |
093e61a6 RS |
6328 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
6329 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6330 | else |
71a94577 ZW |
6331 | gt_save_LIBS="$LIBS" |
6332 | LIBS="$LIBS -lintl $LIBICONV" | |
093e61a6 | 6333 | cat > conftest.$ac_ext <<EOF |
619833ad | 6334 | #line 6335 "configure" |
093e61a6 | 6335 | #include "confdefs.h" |
71a94577 ZW |
6336 | #include <libintl.h> |
6337 | extern int _nl_msg_cat_cntr; | |
093e61a6 | 6338 | int main() { |
71a94577 ZW |
6339 | bindtextdomain ("", ""); |
6340 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6341 | ; return 0; } |
6342 | EOF | |
619833ad | 6343 | if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6344 | rm -rf conftest* |
71a94577 | 6345 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 | 6346 | else |
093e61a6 RS |
6347 | echo "configure: failed program was:" >&5 |
6348 | cat conftest.$ac_ext >&5 | |
6349 | rm -rf conftest* | |
6350 | gt_cv_func_gnugettext1_libintl=no | |
ab87f8c8 | 6351 | fi |
093e61a6 | 6352 | rm -f conftest* |
71a94577 | 6353 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6354 | fi |
093e61a6 RS |
6355 | |
6356 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
71a94577 ZW |
6357 | fi |
6358 | ||
6359 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6360 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6361 | && test "$PACKAGE" != gettext; }; then | |
093e61a6 | 6362 | cat >> confdefs.h <<\EOF |
71a94577 | 6363 | #define HAVE_GETTEXT 1 |
093e61a6 | 6364 | EOF |
ab87f8c8 | 6365 | |
ab87f8c8 | 6366 | |
71a94577 ZW |
6367 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6368 | INTLLIBS="-lintl $LIBICONV" | |
6369 | fi | |
ab87f8c8 | 6370 | |
71a94577 ZW |
6371 | gt_save_LIBS="$LIBS" |
6372 | LIBS="$LIBS $INTLLIBS" | |
093e61a6 | 6373 | for ac_func in dcgettext |
71a94577 | 6374 | do |
093e61a6 | 6375 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
619833ad | 6376 | echo "configure:6377: checking for $ac_func" >&5 |
093e61a6 RS |
6377 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6379 | else | |
6380 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6381 | #line 6382 "configure" |
093e61a6 | 6382 | #include "confdefs.h" |
ab87f8c8 | 6383 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
6384 | which can conflict with char $ac_func(); below. */ |
6385 | #include <assert.h> | |
ab87f8c8 JL |
6386 | /* Override any gcc2 internal prototype to avoid an error. */ |
6387 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6388 | builtin and then its argument prototype would still apply. */ |
6389 | char $ac_func(); | |
6390 | ||
6391 | int main() { | |
6392 | ||
ab87f8c8 JL |
6393 | /* The GNU C library defines this for functions which it implements |
6394 | to always fail with ENOSYS. Some functions are actually named | |
6395 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6396 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6397 | choke me |
6398 | #else | |
093e61a6 | 6399 | $ac_func(); |
ab87f8c8 JL |
6400 | #endif |
6401 | ||
093e61a6 RS |
6402 | ; return 0; } |
6403 | EOF | |
619833ad | 6404 | if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6405 | rm -rf conftest* |
6406 | eval "ac_cv_func_$ac_func=yes" | |
6407 | else | |
6408 | echo "configure: failed program was:" >&5 | |
6409 | cat conftest.$ac_ext >&5 | |
6410 | rm -rf conftest* | |
6411 | eval "ac_cv_func_$ac_func=no" | |
6412 | fi | |
6413 | rm -f conftest* | |
6414 | fi | |
ab87f8c8 | 6415 | |
093e61a6 RS |
6416 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6417 | echo "$ac_t""yes" 1>&6 | |
6418 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6419 | cat >> confdefs.h <<EOF | |
6420 | #define $ac_tr_func 1 | |
6421 | EOF | |
6422 | ||
6423 | else | |
6424 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6425 | fi |
6426 | done | |
ab87f8c8 | 6427 | |
71a94577 ZW |
6428 | LIBS="$gt_save_LIBS" |
6429 | ||
6430 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6431 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6432 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6433 | echo "configure:6434: checking for $ac_word" >&5 |
093e61a6 RS |
6434 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6435 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6436 | else |
71a94577 | 6437 | case "$MSGFMT" in |
ab87f8c8 | 6438 | /*) |
71a94577 | 6439 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6440 | ;; |
6441 | *) | |
71a94577 ZW |
6442 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6443 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6444 | test -z "$ac_dir" && ac_dir=. |
6445 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6446 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6447 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6448 | break | |
6449 | fi | |
ab87f8c8 JL |
6450 | fi |
6451 | done | |
6452 | IFS="$ac_save_ifs" | |
71a94577 | 6453 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6454 | ;; |
6455 | esac | |
6456 | fi | |
71a94577 ZW |
6457 | MSGFMT="$ac_cv_path_MSGFMT" |
6458 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6459 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6460 | else |
093e61a6 | 6461 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 6462 | fi |
71a94577 ZW |
6463 | |
6464 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 | 6465 | set dummy gmsgfmt; ac_word=$2 |
093e61a6 | 6466 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6467 | echo "configure:6468: checking for $ac_word" >&5 |
093e61a6 RS |
6468 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6469 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6470 | else |
093e61a6 RS |
6471 | case "$GMSGFMT" in |
6472 | /*) | |
71a94577 | 6473 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6474 | ;; |
093e61a6 RS |
6475 | ?:/*) |
6476 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6477 | ;; | |
ab87f8c8 | 6478 | *) |
093e61a6 RS |
6479 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6480 | ac_dummy="$PATH" | |
6481 | for ac_dir in $ac_dummy; do | |
6482 | test -z "$ac_dir" && ac_dir=. | |
6483 | if test -f $ac_dir/$ac_word; then | |
6484 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6485 | break | |
6486 | fi | |
6487 | done | |
6488 | IFS="$ac_save_ifs" | |
71a94577 | 6489 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6490 | ;; |
6491 | esac | |
6492 | fi | |
093e61a6 | 6493 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6494 | if test -n "$GMSGFMT"; then |
093e61a6 | 6495 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6496 | else |
093e61a6 | 6497 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6498 | fi |
6499 | ||
ab87f8c8 | 6500 | |
71a94577 | 6501 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 | 6502 | set dummy xgettext; ac_word=$2 |
093e61a6 | 6503 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6504 | echo "configure:6505: checking for $ac_word" >&5 |
093e61a6 RS |
6505 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6507 | else |
6508 | case "$XGETTEXT" in | |
6509 | /*) | |
71a94577 | 6510 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6511 | ;; |
6512 | *) | |
6513 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6514 | for ac_dir in $PATH; do | |
6515 | test -z "$ac_dir" && ac_dir=. | |
6516 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6517 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6518 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6519 | break |
6520 | fi | |
6521 | fi | |
6522 | done | |
6523 | IFS="$ac_save_ifs" | |
71a94577 | 6524 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6525 | ;; |
6526 | esac | |
6527 | fi | |
71a94577 ZW |
6528 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6529 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6530 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6531 | else |
093e61a6 | 6532 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6533 | fi |
6534 | ||
71a94577 ZW |
6535 | |
6536 | CATOBJEXT=.gmo | |
6537 | fi | |
093e61a6 RS |
6538 | |
6539 | else | |
6540 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 JL |
6541 | fi |
6542 | ||
ab87f8c8 JL |
6543 | |
6544 | if test "$CATOBJEXT" = "NONE"; then | |
6545 | nls_cv_use_gnu_gettext=yes | |
6546 | fi | |
6547 | fi | |
6548 | ||
6549 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6550 | INTLOBJS="\$(GETTOBJS)" | |
6551 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6552 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6553 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6554 | echo "configure:6555: checking for $ac_word" >&5 |
093e61a6 RS |
6555 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6556 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6557 | else |
6558 | case "$MSGFMT" in | |
6559 | /*) | |
71a94577 | 6560 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6561 | ;; |
6562 | *) | |
6563 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6564 | for ac_dir in $PATH; do | |
6565 | test -z "$ac_dir" && ac_dir=. | |
6566 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6567 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6568 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6569 | break |
6570 | fi | |
6571 | fi | |
6572 | done | |
6573 | IFS="$ac_save_ifs" | |
71a94577 | 6574 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6575 | ;; |
6576 | esac | |
6577 | fi | |
71a94577 ZW |
6578 | MSGFMT="$ac_cv_path_MSGFMT" |
6579 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6580 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6581 | else |
093e61a6 | 6582 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6583 | fi |
6584 | ||
6585 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6586 | set dummy gmsgfmt; ac_word=$2 | |
093e61a6 | 6587 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6588 | echo "configure:6589: checking for $ac_word" >&5 |
093e61a6 RS |
6589 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6591 | else |
093e61a6 RS |
6592 | case "$GMSGFMT" in |
6593 | /*) | |
71a94577 | 6594 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6595 | ;; |
093e61a6 RS |
6596 | ?:/*) |
6597 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6598 | ;; | |
ab87f8c8 | 6599 | *) |
093e61a6 RS |
6600 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6601 | ac_dummy="$PATH" | |
6602 | for ac_dir in $ac_dummy; do | |
6603 | test -z "$ac_dir" && ac_dir=. | |
6604 | if test -f $ac_dir/$ac_word; then | |
6605 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6606 | break | |
6607 | fi | |
6608 | done | |
6609 | IFS="$ac_save_ifs" | |
71a94577 | 6610 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6611 | ;; |
6612 | esac | |
6613 | fi | |
093e61a6 | 6614 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6615 | if test -n "$GMSGFMT"; then |
093e61a6 | 6616 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6617 | else |
093e61a6 | 6618 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6619 | fi |
6620 | ||
6621 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6622 | set dummy xgettext; ac_word=$2 | |
093e61a6 | 6623 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6624 | echo "configure:6625: checking for $ac_word" >&5 |
093e61a6 RS |
6625 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6627 | else |
6628 | case "$XGETTEXT" in | |
6629 | /*) | |
71a94577 | 6630 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6631 | ;; |
6632 | *) | |
6633 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6634 | for ac_dir in $PATH; do | |
6635 | test -z "$ac_dir" && ac_dir=. | |
6636 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6637 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6638 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6639 | break |
6640 | fi | |
6641 | fi | |
6642 | done | |
6643 | IFS="$ac_save_ifs" | |
71a94577 | 6644 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6645 | ;; |
6646 | esac | |
6647 | fi | |
71a94577 ZW |
6648 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6649 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6650 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6651 | else |
093e61a6 | 6652 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6653 | fi |
6654 | ||
093e61a6 | 6655 | |
71a94577 | 6656 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6657 | USE_INCLUDED_LIBINTL=yes |
6658 | CATOBJEXT=.gmo | |
71a94577 | 6659 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6660 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6661 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6662 | fi | |
6663 | ||
6664 | if test "$GMSGFMT" != ":"; then | |
6665 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6666 | : ; | |
6667 | else | |
093e61a6 | 6668 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 |
71a94577 ZW |
6669 | GMSGFMT=":" |
6670 | fi | |
ab87f8c8 JL |
6671 | fi |
6672 | ||
71a94577 ZW |
6673 | if test "$XGETTEXT" != ":"; then |
6674 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6675 | : ; |
6676 | else | |
093e61a6 | 6677 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 |
ab87f8c8 JL |
6678 | XGETTEXT=":" |
6679 | fi | |
6680 | fi | |
6681 | ||
71a94577 ZW |
6682 | POSUB=po |
6683 | fi | |
093e61a6 | 6684 | |
17297c41 PT |
6685 | |
6686 | ||
71a94577 ZW |
6687 | if test "$PACKAGE" = gettext; then |
6688 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6689 | fi |
ab87f8c8 | 6690 | |
71a94577 ZW |
6691 | for ac_prog in bison |
6692 | do | |
093e61a6 | 6693 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
71a94577 | 6694 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 6695 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
619833ad | 6696 | echo "configure:6697: checking for $ac_word" >&5 |
093e61a6 RS |
6697 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6698 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
6699 | else |
6700 | if test -n "$INTLBISON"; then | |
6701 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6702 | else | |
093e61a6 RS |
6703 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6704 | ac_dummy="$PATH" | |
6705 | for ac_dir in $ac_dummy; do | |
6706 | test -z "$ac_dir" && ac_dir=. | |
6707 | if test -f $ac_dir/$ac_word; then | |
6708 | ac_cv_prog_INTLBISON="$ac_prog" | |
6709 | break | |
6710 | fi | |
6711 | done | |
6712 | IFS="$ac_save_ifs" | |
71a94577 ZW |
6713 | fi |
6714 | fi | |
093e61a6 | 6715 | INTLBISON="$ac_cv_prog_INTLBISON" |
71a94577 | 6716 | if test -n "$INTLBISON"; then |
093e61a6 | 6717 | echo "$ac_t""$INTLBISON" 1>&6 |
71a94577 | 6718 | else |
093e61a6 | 6719 | echo "$ac_t""no" 1>&6 |
71a94577 ZW |
6720 | fi |
6721 | ||
093e61a6 | 6722 | test -n "$INTLBISON" && break |
71a94577 | 6723 | done |
ab87f8c8 | 6724 | |
71a94577 ZW |
6725 | if test -z "$INTLBISON"; then |
6726 | ac_verc_fail=yes | |
6727 | else | |
093e61a6 | 6728 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 |
619833ad | 6729 | echo "configure:6730: checking version of bison" >&5 |
71a94577 ZW |
6730 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6731 | case $ac_prog_version in | |
6732 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6733 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6734 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6735 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6736 | esac | |
093e61a6 | 6737 | echo "$ac_t""$ac_prog_version" 1>&6 |
71a94577 ZW |
6738 | fi |
6739 | if test $ac_verc_fail = yes; then | |
6740 | INTLBISON=: | |
ab87f8c8 JL |
6741 | fi |
6742 | ||
093e61a6 RS |
6743 | |
6744 | ||
6745 | ||
6746 | ||
6747 | ||
6748 | ||
6749 | ||
6750 | ||
6751 | ||
191bf464 | 6752 | if test $USE_INCLUDED_LIBINTL = yes; then |
093e61a6 | 6753 | cat >> confdefs.h <<\EOF |
191bf464 | 6754 | #define USE_INCLUDED_LIBINTL 1 |
093e61a6 | 6755 | EOF |
191bf464 ZW |
6756 | |
6757 | fi | |
71a94577 ZW |
6758 | |
6759 | nls_cv_header_intl= | |
6760 | nls_cv_header_libgt= | |
6761 | ||
6762 | DATADIRNAME=share | |
093e61a6 | 6763 | |
71a94577 ZW |
6764 | |
6765 | INSTOBJEXT=.mo | |
093e61a6 | 6766 | |
ab87f8c8 | 6767 | |
71a94577 | 6768 | GENCAT=gencat |
093e61a6 RS |
6769 | |
6770 | ||
9fdf713f | 6771 | |
9f6682b7 | 6772 | if test "x$CATOBJEXT" != x; then |
093e61a6 | 6773 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
619833ad | 6774 | echo "configure:6775: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6775 | # Look for .po and .gmo files in the source directory. |
6776 | CATALOGS= | |
6777 | XLINGUAS= | |
6778 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6779 | # If there aren't any .gmo files the shell will give us the | |
6780 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6781 | # weeded out. | |
6782 | case "$cat" in *\**) | |
6783 | continue;; | |
6784 | esac | |
6785 | # The quadruple backslash is collapsed to a double backslash | |
6786 | # by the backticks, then collapsed again by the double quotes, | |
6787 | # leaving us with one backslash in the sed expression (right | |
6788 | # before the dot that mustn't act as a wildcard). The dot to | |
6789 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6790 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6791 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6792 | # The user is allowed to set LINGUAS to a list of languages to | |
6793 | # install catalogs for. If it's empty that means "all of them." | |
6794 | if test "x$LINGUAS" = x; then | |
6795 | CATALOGS="$CATALOGS $cat" | |
6796 | XLINGUAS="$XLINGUAS $lang" | |
6797 | else | |
6798 | case "$LINGUAS" in *$lang*) | |
6799 | CATALOGS="$CATALOGS $cat" | |
6800 | XLINGUAS="$XLINGUAS $lang" | |
6801 | ;; | |
6802 | esac | |
6803 | fi | |
6804 | done | |
6805 | LINGUAS="$XLINGUAS" | |
093e61a6 | 6806 | echo "$ac_t""$LINGUAS" 1>&6 |
ab87f8c8 JL |
6807 | fi |
6808 | ||
ab87f8c8 JL |
6809 | MKINSTALLDIRS= |
6810 | if test -n "$ac_aux_dir"; then | |
6811 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6812 | fi | |
6813 | if test -z "$MKINSTALLDIRS"; then | |
6814 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6815 | fi | |
093e61a6 | 6816 | |
ab87f8c8 | 6817 | |
71a94577 | 6818 | INTL_LIBTOOL_SUFFIX_PREFIX= |
093e61a6 RS |
6819 | |
6820 | ||
ab87f8c8 | 6821 | |
f4ab28e3 MK |
6822 | # Windows32 Registry support for specifying GCC installation paths. |
6823 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6824 | if test "${enable_win32_registry+set}" = set; then | |
6825 | enableval="$enable_win32_registry" | |
093e61a6 RS |
6826 | : |
6827 | fi | |
f4ab28e3 | 6828 | |
4e70264f ZW |
6829 | case $host_os in |
6830 | win32 | pe | cygwin* | mingw32* | uwin*) | |
093e61a6 | 6831 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
619833ad | 6832 | echo "configure:6833: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6833 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6834 | cat >> confdefs.h <<\EOF |
f4ab28e3 | 6835 | #define ENABLE_WIN32_REGISTRY 1 |
093e61a6 | 6836 | EOF |
f4ab28e3 | 6837 | |
093e61a6 RS |
6838 | echo "$ac_t""yes" 1>&6 |
6839 | ||
6840 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
619833ad | 6841 | echo "configure:6842: checking for library containing RegOpenKeyExA" >&5 |
093e61a6 RS |
6842 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6843 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6844 | else | |
6845 | ac_func_search_save_LIBS="$LIBS" | |
6846 | ac_cv_search_RegOpenKeyExA="no" | |
6847 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6848 | #line 6849 "configure" |
093e61a6 | 6849 | #include "confdefs.h" |
4e70264f ZW |
6850 | /* Override any gcc2 internal prototype to avoid an error. */ |
6851 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6852 | builtin and then its argument prototype would still apply. */ |
6853 | char RegOpenKeyExA(); | |
6854 | ||
6855 | int main() { | |
6856 | RegOpenKeyExA() | |
6857 | ; return 0; } | |
6858 | EOF | |
619833ad | 6859 | if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6860 | rm -rf conftest* |
4e70264f ZW |
6861 | ac_cv_search_RegOpenKeyExA="none required" |
6862 | else | |
093e61a6 RS |
6863 | echo "configure: failed program was:" >&5 |
6864 | cat conftest.$ac_ext >&5 | |
4e70264f | 6865 | fi |
093e61a6 RS |
6866 | rm -f conftest* |
6867 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6868 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6869 | cat > conftest.$ac_ext <<EOF | |
619833ad | 6870 | #line 6871 "configure" |
093e61a6 | 6871 | #include "confdefs.h" |
4e70264f ZW |
6872 | /* Override any gcc2 internal prototype to avoid an error. */ |
6873 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6874 | builtin and then its argument prototype would still apply. */ |
6875 | char RegOpenKeyExA(); | |
6876 | ||
6877 | int main() { | |
6878 | RegOpenKeyExA() | |
6879 | ; return 0; } | |
6880 | EOF | |
619833ad | 6881 | if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6882 | rm -rf conftest* |
6883 | ac_cv_search_RegOpenKeyExA="-l$i" | |
4e70264f ZW |
6884 | break |
6885 | else | |
093e61a6 RS |
6886 | echo "configure: failed program was:" >&5 |
6887 | cat conftest.$ac_ext >&5 | |
4e70264f | 6888 | fi |
093e61a6 RS |
6889 | rm -f conftest* |
6890 | done | |
6891 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 6892 | fi |
cafe096b | 6893 | |
093e61a6 RS |
6894 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
6895 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6896 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6897 | ||
6898 | else : | |
6899 | ||
4e70264f | 6900 | fi |
f4ab28e3 | 6901 | else |
093e61a6 | 6902 | echo "$ac_t""no" 1>&6 |
f4ab28e3 MK |
6903 | fi |
6904 | ||
6905 | # Check if user specified a different registry key. | |
9dd53f2c | 6906 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6907 | x | xyes) |
6908 | # default. | |
6909 | gcc_cv_win32_registry_key="$VERSION" | |
6910 | ;; | |
6911 | xno) | |
6912 | # no registry lookup. | |
6913 | gcc_cv_win32_registry_key='' | |
6914 | ;; | |
6915 | *) | |
6916 | # user-specified key. | |
6917 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6918 | ;; | |
6919 | esac | |
6920 | ||
9dd53f2c | 6921 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6922 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
619833ad | 6923 | echo "configure:6924: checking registry key on windows hosts" >&5 |
093e61a6 | 6924 | cat >> confdefs.h <<EOF |
f4ab28e3 | 6925 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
093e61a6 | 6926 | EOF |
f4ab28e3 | 6927 | |
093e61a6 | 6928 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
f4ab28e3 | 6929 | fi |
4e70264f ZW |
6930 | ;; |
6931 | esac | |
f4ab28e3 | 6932 | |
ab87f8c8 | 6933 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6934 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6935 | cd $srcdir |
1e6347d8 | 6936 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6937 | cd $holddir |
6938 | ||
6939 | # Conditionalize the makefile for this host machine. | |
6940 | # Make-host contains the concatenation of all host makefile fragments | |
6941 | # [there can be more than one]. This file is built by configure.frag. | |
6942 | host_overrides=Make-host | |
6943 | dep_host_xmake_file= | |
6944 | for f in .. ${host_xmake_file} | |
6945 | do | |
6946 | if test -f ${srcdir}/config/$f | |
6947 | then | |
6948 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6949 | fi | |
6950 | done | |
6951 | ||
6952 | # Conditionalize the makefile for this target machine. | |
6953 | # Make-target contains the concatenation of all host makefile fragments | |
6954 | # [there can be more than one]. This file is built by configure.frag. | |
6955 | target_overrides=Make-target | |
6956 | dep_tmake_file= | |
6957 | for f in .. ${tmake_file} | |
6958 | do | |
6959 | if test -f ${srcdir}/config/$f | |
6960 | then | |
6961 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6962 | fi | |
6963 | done | |
6964 | ||
34a86c2b NN |
6965 | symbolic_link='ln -s' |
6966 | ||
ab87f8c8 JL |
6967 | # If the host doesn't support symlinks, modify CC in |
6968 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6969 | # Otherwise, we can use "CC=$(CC)". | |
6970 | rm -f symtest.tem | |
6971 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6972 | then | |
6973 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6974 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6975 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6976 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6977 | else |
6978 | rm -f symtest.tem | |
6979 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6980 | then | |
6981 | symbolic_link="cp -p" | |
6982 | else | |
6983 | symbolic_link="cp" | |
6984 | fi | |
6985 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6986 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6987 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6988 | quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`" |
ab87f8c8 JL |
6989 | fi |
6990 | rm -f symtest.tem | |
6991 | ||
6992 | out_object_file=`basename $out_file .c`.o | |
6993 | ||
6994 | tm_file_list= | |
6995 | for f in $tm_file; do | |
64ccbc99 | 6996 | case $f in |
d02af173 ZW |
6997 | ansidecl.h ) |
6998 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6999 | defaults.h ) | |
e2500fed | 7000 | tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; |
64ccbc99 KG |
7001 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; |
7002 | esac | |
ab87f8c8 JL |
7003 | done |
7004 | ||
11642c3a ZW |
7005 | tm_p_file_list= |
7006 | for f in $tm_p_file; do | |
4977bab6 ZW |
7007 | case $f in |
7008 | tm-preds.h ) | |
7009 | tm_p_file_list="${tm_p_file_list} $f" ;; | |
7010 | *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;; | |
7011 | esac | |
11642c3a ZW |
7012 | done |
7013 | ||
ab87f8c8 JL |
7014 | host_xm_file_list= |
7015 | for f in $host_xm_file; do | |
64ccbc99 | 7016 | case $f in |
d02af173 ZW |
7017 | ansidecl.h ) |
7018 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7019 | auto-host.h ) |
64ccbc99 | 7020 | host_xm_file_list="${host_xm_file_list} $f" ;; |
e2500fed GK |
7021 | defaults.h ) |
7022 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7023 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; |
7024 | esac | |
ab87f8c8 JL |
7025 | done |
7026 | ||
7027 | build_xm_file_list= | |
7028 | for f in $build_xm_file; do | |
64ccbc99 | 7029 | case $f in |
d02af173 ZW |
7030 | ansidecl.h ) |
7031 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7032 | auto-build.h | auto-host.h ) |
64ccbc99 | 7033 | build_xm_file_list="${build_xm_file_list} $f" ;; |
e2500fed GK |
7034 | defaults.h ) |
7035 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7036 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; |
7037 | esac | |
ab87f8c8 JL |
7038 | done |
7039 | ||
a078a589 ZW |
7040 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
7041 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
093e61a6 RS |
7042 | CROSS= |
7043 | ALL=all.internal | |
7044 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7045 | if test x$host != x$target |
7046 | then | |
a078a589 ZW |
7047 | CROSS="-DCROSS_COMPILE" |
7048 | ALL=all.cross | |
7049 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
7050 | case "$host","$target" in |
7051 | i?86-*-*,x86_64-*-* \ | |
7052 | | powerpc*-*-*,powerpc64*-*-*) | |
7053 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
7054 | esac | |
7a615b25 AO |
7055 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
7056 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
7057 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7058 | fi |
7059 | ||
b39d221a EC |
7060 | # If this is a cross-compiler that does not |
7061 | # have its own set of headers then define | |
7062 | # inhibit_libc | |
7063 | ||
dc06db20 R |
7064 | # If this is using newlib, without having the headers available now, |
7065 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
7066 | # This prevents libgcc2 from containing any code which requires libc |
7067 | # support. | |
b39d221a | 7068 | inhibit_libc= |
dc06db20 R |
7069 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
7070 | test x$with_newlib = xyes ; } && | |
7071 | test "x$with_headers" = x ; then | |
b39d221a | 7072 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
7073 | fi |
7074 | ||
7075 | ||
a078a589 ZW |
7076 | # When building gcc with a cross-compiler, we need to adjust things so |
7077 | # that the generator programs are still built with the native compiler. | |
7078 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
7079 | |
7080 | # These are the normal (build=host) settings: | |
093e61a6 RS |
7081 | BUILD_PREFIX= |
7082 | BUILD_PREFIX_1=ignore- | |
7083 | BUILD_CC='$(CC)' | |
7084 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 7085 | |
093e61a6 RS |
7086 | STMP_FIXINC=stmp-fixinc |
7087 | STMP_FIXPROTO=stmp-fixproto | |
a078a589 ZW |
7088 | |
7089 | # And these apply if build != host. | |
ab87f8c8 JL |
7090 | if test x$build != x$host |
7091 | then | |
5c35940c NN |
7092 | BUILD_PREFIX=build- |
7093 | BUILD_PREFIX_1=build- | |
4977bab6 ZW |
7094 | BUILD_CC='$(CC_FOR_BUILD)' |
7095 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' | |
a078a589 | 7096 | |
7a615b25 AO |
7097 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
7098 | STMP_FIXINC= | |
7099 | STMP_FIXPROTO= | |
7100 | fi | |
ab87f8c8 JL |
7101 | fi |
7102 | ||
7103 | # Expand extra_headers to include complete path. | |
7104 | # This substitutes for lots of t-* files. | |
7105 | extra_headers_list= | |
7106 | if test "x$extra_headers" = x | |
7107 | then true | |
7108 | else | |
29f7a208 | 7109 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
7110 | for file in $extra_headers; |
7111 | do | |
29f7a208 | 7112 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
7113 | done |
7114 | fi | |
7115 | ||
ab87f8c8 | 7116 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
7117 | case $use_collect2 in |
7118 | no) use_collect2= ;; | |
7119 | "") ;; | |
093e61a6 | 7120 | *) |
34a86c2b NN |
7121 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
7122 | xm_defines="${xm_defines} USE_COLLECT2" | |
7123 | ;; | |
7124 | esac | |
ab87f8c8 | 7125 | |
d869a8c4 NN |
7126 | # Identify the assembler which will work hand-in-glove with the newly |
7127 | # built GCC, so that we can examine its features. This is the assembler | |
7128 | # which will be driven by the driver program. | |
7129 | # | |
7130 | # If build != host, and we aren't building gas in-tree, we identify a | |
7131 | # build->target assembler and hope that it will have the same features | |
7132 | # as the host->target assembler we'll be using. | |
093e61a6 | 7133 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
619833ad | 7134 | echo "configure:7135: checking what assembler to use" >&5 |
34a86c2b | 7135 | in_tree_gas=no |
ab87f8c8 | 7136 | gcc_cv_as= |
981d4858 JM |
7137 | gcc_cv_gas_major_version= |
7138 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
7139 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
7140 | if test -x "$DEFAULT_ASSEMBLER"; then | |
7141 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
7142 | elif test -x "$AS"; then | |
7143 | gcc_cv_as="$AS" | |
7144 | elif test -x as$host_exeext; then | |
7145 | # Build using assembler in the current directory. | |
7146 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
7147 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
7148 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
7149 | # Single tree build which includes gas. |
7150 | in_tree_gas=yes | |
7151 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7152 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
7153 | $gcc_cv_as_gas_srcdir/configure \ | |
7154 | $gcc_cv_as_gas_srcdir/configure.in \ | |
7155 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
7156 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7157 | if test x$gcc_cv_gas_version != x; then | |
7158 | break | |
7159 | fi | |
7160 | done | |
7161 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
7162 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
7163 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
7164 | ||
f9c1196a ZW |
7165 | rm -f as$host_exeext |
7166 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
981d4858 | 7167 | fi |
9e423e6d | 7168 | |
534d0cc0 | 7169 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
7170 | # Search the same directories that the installed compiler will |
7171 | # search. Else we may find the wrong assembler and lose. If we | |
7172 | # do not find a suitable assembler binary, then try the user's | |
7173 | # path. | |
7174 | # | |
7175 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7176 | # user's path. Unfortunately, there is no good way to get at the | |
7177 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7178 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7179 | # to be fixed as part of the make/configure rewrite too. | |
7180 | ||
7181 | if test "x$exec_prefix" = xNONE; then | |
7182 | if test "x$prefix" = xNONE; then | |
7183 | test_prefix=/usr/local | |
7184 | else | |
7185 | test_prefix=$prefix | |
7186 | fi | |
7187 | else | |
7188 | test_prefix=$exec_prefix | |
7189 | fi | |
7190 | ||
7191 | # If the loop below does not find an assembler, then use whatever | |
7192 | # one we can find in the users's path. | |
7193 | # user's path. | |
55a2ea2a AM |
7194 | if test "x$program_prefix" != xNONE; then |
7195 | gcc_cv_as=${program_prefix}as$host_exeext | |
7196 | else | |
7197 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
7198 | fi | |
7199 | ||
7200 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7201 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7202 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7203 | /usr/lib/gcc/$target_alias \ | |
7204 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7205 | $test_prefix/$target_alias/bin" | |
7206 | ||
7207 | if test x$host = x$target; then | |
7208 | test_dirs="$test_dirs \ | |
779243f7 JL |
7209 | /usr/libexec \ |
7210 | /usr/ccs/gcc \ | |
7211 | /usr/ccs/bin \ | |
7212 | /udk/usr/ccs/bin \ | |
7213 | /bsd43/usr/lib/cmplrs/cc \ | |
7214 | /usr/cross64/usr/bin \ | |
7215 | /usr/lib/cmplrs/cc \ | |
7216 | /sysv/usr/lib/cmplrs/cc \ | |
7217 | /svr4/usr/lib/cmplrs/cc \ | |
7218 | /usr/bin" | |
55a2ea2a | 7219 | fi |
779243f7 JL |
7220 | |
7221 | for dir in $test_dirs; do | |
55a2ea2a | 7222 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
7223 | gcc_cv_as=$dir/as$host_exeext |
7224 | break; | |
7225 | fi | |
7226 | done | |
9e423e6d | 7227 | fi |
34a86c2b NN |
7228 | case $in_tree_gas in |
7229 | yes) | |
093e61a6 | 7230 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
7231 | ;; |
7232 | no) | |
093e61a6 | 7233 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
7234 | ;; |
7235 | esac | |
981d4858 | 7236 | |
d869a8c4 NN |
7237 | # Identify the linker which will work hand-in-glove with the newly |
7238 | # built GCC, so that we can examine its features. This is the linker | |
7239 | # which will be driven by the driver program. | |
7240 | # | |
7241 | # If build != host, and we aren't building gas in-tree, we identify a | |
7242 | # build->target linker and hope that it will have the same features | |
7243 | # as the host->target linker we'll be using. | |
093e61a6 | 7244 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
619833ad | 7245 | echo "configure:7246: checking what linker to use" >&5 |
34a86c2b | 7246 | in_tree_ld=no |
275b60d6 JJ |
7247 | gcc_cv_ld= |
7248 | gcc_cv_gld_major_version= | |
7249 | gcc_cv_gld_minor_version= | |
7250 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
7251 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7252 | if test -x "$DEFAULT_LINKER"; then | |
7253 | gcc_cv_ld="$DEFAULT_LINKER" | |
7254 | elif test -x "$LD"; then | |
7255 | gcc_cv_ld="$LD" | |
f9c1196a | 7256 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 7257 | # Build using linker in the current directory. |
f9c1196a | 7258 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
7259 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
7260 | && test -f ../ld/Makefile; then | |
275b60d6 | 7261 | # Single tree build which includes ld. |
34a86c2b | 7262 | in_tree_ld=yes |
275b60d6 JJ |
7263 | 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 |
7264 | do | |
7265 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7266 | if test x$gcc_cv_gld_version != x; then | |
7267 | break | |
7268 | fi | |
7269 | done | |
7270 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
7271 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
7272 | rm -f collect-ld$host_exeext |
7273 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
7274 | 2>/dev/null | |
275b60d6 JJ |
7275 | fi |
7276 | ||
534d0cc0 | 7277 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
7278 | # Search the same directories that the installed compiler will |
7279 | # search. Else we may find the wrong linker and lose. If we | |
7280 | # do not find a suitable linker binary, then try the user's | |
7281 | # path. | |
7282 | # | |
7283 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7284 | # user's path. Unfortunately, there is no good way to get at the | |
7285 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7286 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7287 | # to be fixed as part of the make/configure rewrite too. | |
7288 | ||
7289 | if test "x$exec_prefix" = xNONE; then | |
7290 | if test "x$prefix" = xNONE; then | |
7291 | test_prefix=/usr/local | |
7292 | else | |
7293 | test_prefix=$prefix | |
7294 | fi | |
7295 | else | |
7296 | test_prefix=$exec_prefix | |
7297 | fi | |
7298 | ||
7299 | # If the loop below does not find an linker, then use whatever | |
7300 | # one we can find in the users's path. | |
7301 | # user's path. | |
55a2ea2a AM |
7302 | if test "x$program_prefix" != xNONE; then |
7303 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7304 | else | |
7305 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7306 | fi | |
7307 | ||
7308 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7309 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7310 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7311 | /usr/lib/gcc/$target_alias \ | |
7312 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7313 | $test_prefix/$target_alias/bin" | |
7314 | ||
7315 | if test x$host = x$target; then | |
7316 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7317 | /usr/libexec \ |
7318 | /usr/ccs/gcc \ | |
7319 | /usr/ccs/bin \ | |
7320 | /udk/usr/ccs/bin \ | |
7321 | /bsd43/usr/lib/cmplrs/cc \ | |
7322 | /usr/cross64/usr/bin \ | |
7323 | /usr/lib/cmplrs/cc \ | |
7324 | /sysv/usr/lib/cmplrs/cc \ | |
7325 | /svr4/usr/lib/cmplrs/cc \ | |
7326 | /usr/bin" | |
55a2ea2a | 7327 | fi |
275b60d6 JJ |
7328 | |
7329 | for dir in $test_dirs; do | |
55a2ea2a | 7330 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7331 | gcc_cv_ld=$dir/ld$host_exeext |
7332 | break; | |
7333 | fi | |
7334 | done | |
7335 | fi | |
34a86c2b NN |
7336 | case $in_tree_ld in |
7337 | yes) | |
093e61a6 | 7338 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
7339 | ;; |
7340 | no) | |
093e61a6 | 7341 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
7342 | ;; |
7343 | esac | |
275b60d6 | 7344 | |
981d4858 | 7345 | # Figure out what nm we will be using. |
f9c1196a | 7346 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
093e61a6 | 7347 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
619833ad | 7348 | echo "configure:7349: checking what nm to use" >&5 |
f9c1196a | 7349 | in_tree_nm=no |
981d4858 JM |
7350 | if test -x nm$host_exeext; then |
7351 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
7352 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7353 | && test -f ../binutils/Makefile; then | |
7354 | # Single tree build which includes binutils. | |
7355 | in_tree_nm=yes | |
7356 | gcc_cv_nm=./nm$host_exeext | |
7357 | rm -f nm$host_exeext | |
7358 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
7359 | elif test "x$program_prefix" != xNONE; then |
7360 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7361 | else | |
7362 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 7363 | fi |
f9c1196a | 7364 | case $in_tree_nm in |
093e61a6 RS |
7365 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
7366 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 7367 | esac |
981d4858 | 7368 | |
3cae5780 | 7369 | # Figure out what objdump we will be using. |
093e61a6 | 7370 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
619833ad | 7371 | echo "configure:7372: checking what objdump to use" >&5 |
f9c1196a | 7372 | in_tree_objdump=no |
3cae5780 AS |
7373 | if test -x objdump$host_exeext; then |
7374 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
7375 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7376 | && test -f ../binutils/Makefile; then | |
7377 | # Single tree build which includes binutils. | |
7378 | in_tree_objdump=yes | |
7379 | gcc_cv_objdump=./objdump$host_exeext | |
7380 | rm -f objdump$host_exeext | |
7381 | $symbolic_link ../binutils/objdump$host_exeext \ | |
7382 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
7383 | elif test "x$program_prefix" != xNONE; then |
7384 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7385 | else | |
f9c1196a ZW |
7386 | gcc_cv_objdump=`echo objdump | \ |
7387 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 7388 | fi |
f9c1196a | 7389 | case $in_tree_objdump in |
093e61a6 RS |
7390 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
7391 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 7392 | esac |
3cae5780 | 7393 | |
981d4858 | 7394 | # Figure out what assembler alignment features are present. |
093e61a6 | 7395 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 |
619833ad | 7396 | echo "configure:7397: checking assembler alignment features" >&5 |
9d147085 | 7397 | gcc_cv_as_alignment_features=none |
34a86c2b | 7398 | if test $in_tree_gas = yes; then |
ad9c4d9f NN |
7399 | # Gas version 2.6 and later support for .balign and .p2align. |
7400 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7401 | && test $gcc_cv_gas_minor_version -ge 6 \ | |
7402 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7403 | ||
7404 | ||
7405 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7406 | cat >> confdefs.h <<\EOF |
981d4858 | 7407 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7408 | EOF |
981d4858 | 7409 | |
093e61a6 | 7410 | |
ad9c4d9f NN |
7411 | |
7412 | fi | |
7413 | ||
7414 | # Gas version 2.8 and later support specifying the maximum | |
7415 | # bytes to skip when using .p2align. | |
7416 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7417 | && test $gcc_cv_gas_minor_version -ge 8 \ | |
7418 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7419 | ||
7420 | ||
7421 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7422 | cat >> confdefs.h <<\EOF |
981d4858 | 7423 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7424 | EOF |
981d4858 | 7425 | |
093e61a6 | 7426 | |
ad9c4d9f NN |
7427 | |
7428 | fi | |
7429 | ||
981d4858 | 7430 | elif test x$gcc_cv_as != x; then |
00ccc16d JL |
7431 | # Check if we have .balign and .p2align |
7432 | echo ".balign 4" > conftest.s | |
7433 | echo ".p2align 2" >> conftest.s | |
7434 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7435 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7436 | cat >> confdefs.h <<\EOF |
00ccc16d | 7437 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7438 | EOF |
00ccc16d JL |
7439 | |
7440 | fi | |
7441 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7442 | # Check if specifying the maximum bytes to skip when |
7443 | # using .p2align is supported. | |
7444 | echo ".p2align 4,,7" > conftest.s | |
7445 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7446 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7447 | cat >> confdefs.h <<\EOF |
9e423e6d | 7448 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7449 | EOF |
9e423e6d JW |
7450 | |
7451 | fi | |
7452 | rm -f conftest.s conftest.o | |
7453 | fi | |
093e61a6 | 7454 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 |
9e423e6d | 7455 | |
093e61a6 | 7456 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
619833ad | 7457 | echo "configure:7458: checking assembler subsection support" >&5 |
9d147085 | 7458 | gcc_cv_as_subsections=no |
34a86c2b | 7459 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7460 | if test $gcc_cv_gas_major_version -eq 2 \ |
7461 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
7462 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7463 | ||
7464 | ||
7465 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7466 | gcc_cv_as_subsections="working .subsection -1" | |
7467 | fi | |
093e61a6 | 7468 | |
ad9c4d9f NN |
7469 | |
7470 | fi | |
7471 | ||
981d4858 | 7472 | elif test x$gcc_cv_as != x; then |
d1accaa3 JJ |
7473 | # Check if we have .subsection |
7474 | echo ".subsection 1" > conftest.s | |
7475 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7476 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7477 | if test x$gcc_cv_nm != x; then |
7478 | cat > conftest.s <<EOF | |
7479 | conftest_label1: .word 0 | |
7480 | .subsection -1 | |
7481 | conftest_label2: .word 0 | |
7482 | .previous | |
7483 | EOF | |
7484 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7485 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7486 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7487 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7488 | : | |
7489 | else | |
d1accaa3 | 7490 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7491 | fi |
7492 | fi | |
7493 | fi | |
7494 | fi | |
7495 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7496 | fi |
7497 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
093e61a6 | 7498 | cat >> confdefs.h <<\EOF |
981d4858 | 7499 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
093e61a6 | 7500 | EOF |
981d4858 | 7501 | |
d1accaa3 | 7502 | fi |
093e61a6 | 7503 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 |
d1accaa3 | 7504 | |
093e61a6 | 7505 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
619833ad | 7506 | echo "configure:7507: checking assembler weak support" >&5 |
9d147085 | 7507 | gcc_cv_as_weak=no |
34a86c2b | 7508 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7509 | if test $gcc_cv_gas_major_version -eq 2 \ |
7510 | && test $gcc_cv_gas_minor_version -ge 2 \ | |
7511 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7512 | ||
7513 | ||
981d4858 | 7514 | gcc_cv_as_weak="yes" |
093e61a6 | 7515 | |
ad9c4d9f NN |
7516 | |
7517 | fi | |
7518 | ||
981d4858 | 7519 | elif test x$gcc_cv_as != x; then |
12822146 JL |
7520 | # Check if we have .weak |
7521 | echo " .weak foobar" > conftest.s | |
7522 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7523 | gcc_cv_as_weak="yes" |
7524 | fi | |
7525 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7526 | fi |
7527 | if test x"$gcc_cv_as_weak" = xyes; then | |
093e61a6 | 7528 | cat >> confdefs.h <<\EOF |
981d4858 | 7529 | #define HAVE_GAS_WEAK 1 |
093e61a6 | 7530 | EOF |
981d4858 | 7531 | |
12822146 | 7532 | fi |
093e61a6 | 7533 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 |
12822146 | 7534 | |
093e61a6 | 7535 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
619833ad | 7536 | echo "configure:7537: checking assembler hidden support" >&5 |
9d147085 | 7537 | gcc_cv_as_hidden=no |
34a86c2b | 7538 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7539 | if test $gcc_cv_gas_major_version -eq 2 \ |
7540 | && (test $gcc_cv_gas_minor_version -gt 12 \ | |
7541 | || (test $gcc_cv_gas_minor_version -eq 12 \ | |
7542 | && test $gcc_cv_gas_patch_version -ge 1 )) \ | |
7543 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7544 | ||
7545 | ||
7546 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7547 | gcc_cv_as_hidden="yes" | |
7548 | fi | |
093e61a6 | 7549 | |
ad9c4d9f NN |
7550 | |
7551 | fi | |
7552 | ||
981d4858 | 7553 | elif test x$gcc_cv_as != x; then |
6a9c5260 UD |
7554 | # Check if we have .hidden |
7555 | echo " .hidden foobar" > conftest.s | |
7556 | echo "foobar:" >> conftest.s | |
7557 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7558 | gcc_cv_as_hidden="yes" |
7559 | fi | |
7560 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7561 | |
7562 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
093e61a6 | 7563 | # This is irritatingly difficult to feature test for. Look for |
c72931a6 RH |
7564 | # the date string after the version number. |
7565 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7566 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
96ef4bdc MM |
7567 | ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'` |
7568 | 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'` | |
c72931a6 | 7569 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7570 | if test -n "$ld_date"; then |
7571 | # If there was date string, but was earlier than 2002-04-04, fail | |
7572 | gcc_cv_as_hidden="no" | |
7573 | elif test -z "$ld_vers"; then | |
7574 | # If there was no date string nor ld version number, something is wrong | |
7575 | gcc_cv_as_hidden="no" | |
7576 | else | |
7577 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7578 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7579 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7580 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7581 | if test "$ld_vers_major" -lt 2; then | |
7582 | gcc_cv_as_hidden="no" | |
7583 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7584 | gcc_cv_as_hidden="no" | |
7585 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7586 | -a "$ld_vers_patch" -eq 0; then | |
7587 | gcc_cv_as_hidden="no" | |
7588 | fi | |
7589 | fi | |
c72931a6 RH |
7590 | fi |
7591 | fi | |
981d4858 | 7592 | fi |
789b7de5 | 7593 | case "$target" in |
027faee7 | 7594 | mips-sgi-irix6*) |
789b7de5 RO |
7595 | if test x"$gnu_ld_flag" = x"no"; then |
7596 | # Even if using gas with .hidden support, the resulting object files | |
027faee7 AO |
7597 | # cannot be linked with the IRIX 6 O32 linker. With the N32 and |
7598 | # N64 linkers, the problem is that the linker refuses to accept | |
7599 | # -call_shared (passed by default to the linker) and -r (used to | |
7600 | # link the object file generated without .hidden directives with | |
7601 | # one that hides symbols), so we also lose. | |
6d07784a | 7602 | gcc_cv_as_hidden=no |
789b7de5 RO |
7603 | fi |
7604 | ;; | |
7605 | esac | |
6d07784a RO |
7606 | if test x"$gcc_cv_as_hidden" = xyes; then |
7607 | cat >> confdefs.h <<\EOF | |
7608 | #define HAVE_GAS_HIDDEN 1 | |
7609 | EOF | |
7610 | ||
7611 | fi | |
7612 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7613 | libgcc_visibility=$gcc_cv_as_hidden | |
9e944a16 | 7614 | |
6a9c5260 | 7615 | |
093e61a6 | 7616 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
619833ad | 7617 | echo "configure:7618: checking assembler leb128 support" >&5 |
fbe42b1b | 7618 | gcc_cv_as_leb128=no |
34a86c2b | 7619 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7620 | if test $gcc_cv_gas_major_version -eq 2 \ |
7621 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
7622 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7623 | ||
7624 | ||
7625 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7626 | gcc_cv_as_leb128="yes" | |
7627 | fi | |
093e61a6 | 7628 | |
ad9c4d9f NN |
7629 | |
7630 | fi | |
7631 | ||
b7460f24 RH |
7632 | elif test x$gcc_cv_as != x; then |
7633 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7634 | cat > conftest.s <<EOF | |
7635 | .data | |
7636 | .uleb128 L2 - L1 | |
7637 | L1: | |
7638 | .uleb128 1280 | |
7639 | .sleb128 -1010 | |
7640 | L2: | |
7641 | EOF | |
7642 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7643 | gcc_cv_as_leb128="yes" |
7644 | ||
7645 | # GAS versions before 2.11 do not support uleb128, | |
7646 | # despite appearing to. | |
7647 | # ??? There exists an elf-specific test that will crash | |
7648 | # the assembler. Perhaps it's better to figure out whether | |
7649 | # arbitrary sections are supported and try the test. | |
7650 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7651 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7652 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7653 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7654 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7655 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7656 | gcc_cv_as_leb128="no" | |
7657 | fi | |
fbe42b1b | 7658 | fi |
b7460f24 RH |
7659 | fi |
7660 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7661 | fi | |
7662 | if test x"$gcc_cv_as_leb128" = xyes; then | |
093e61a6 | 7663 | cat >> confdefs.h <<\EOF |
b7460f24 | 7664 | #define HAVE_AS_LEB128 1 |
093e61a6 | 7665 | EOF |
b7460f24 RH |
7666 | |
7667 | fi | |
093e61a6 | 7668 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 |
b7460f24 | 7669 | |
093e61a6 | 7670 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
619833ad | 7671 | echo "configure:7672: checking assembler eh_frame optimization" >&5 |
c64688ae | 7672 | gcc_cv_as_eh_frame=no |
34a86c2b | 7673 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7674 | if test $gcc_cv_gas_major_version -eq 2 \ |
7675 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7676 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7677 | ||
7678 | ||
7679 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7680 | gcc_cv_as_eh_frame="yes" | |
7681 | fi | |
093e61a6 | 7682 | |
ad9c4d9f NN |
7683 | |
7684 | fi | |
7685 | ||
c64688ae RH |
7686 | elif test x$gcc_cv_as != x; then |
7687 | # Check if this is GAS. | |
41948db5 SS |
7688 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7689 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7690 | if echo "$as_ver" | grep GNU > /dev/null; then |
7691 | # Versions up to and including 2.11.0 may mis-optimize | |
7692 | # .eh_frame data. Try something. | |
7693 | cat > conftest.s <<EOF | |
7694 | .text | |
7695 | .LFB1: | |
7696 | .4byte 0 | |
7697 | .L1: | |
7698 | .4byte 0 | |
7699 | .LFE1: | |
7700 | .section .eh_frame,"aw",@progbits | |
7701 | __FRAME_BEGIN__: | |
7702 | .4byte .LECIE1-.LSCIE1 | |
7703 | .LSCIE1: | |
7704 | .4byte 0x0 | |
7705 | .byte 0x1 | |
7706 | .ascii "z\0" | |
7707 | .byte 0x1 | |
7708 | .byte 0x78 | |
7709 | .byte 0x1a | |
7710 | .byte 0x0 | |
7711 | .byte 0x4 | |
7712 | .4byte 1 | |
7713 | .p2align 1 | |
7714 | .LECIE1: | |
7715 | .LSFDE1: | |
7716 | .4byte .LEFDE1-.LASFDE1 | |
7717 | .LASFDE1: | |
7718 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7719 | .4byte .LFB1 | |
7720 | .4byte .LFE1-.LFB1 | |
7721 | .byte 0x4 | |
7722 | .4byte .LFE1-.LFB1 | |
7723 | .byte 0x4 | |
7724 | .4byte .L1-.LFB1 | |
7725 | .LEFDE1: | |
7726 | EOF | |
01efb963 | 7727 | cat > conftest.lit <<EOF |
c64688ae RH |
7728 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7729 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 7730 | 0020 08000000 04080000 0044 .........D |
01efb963 AS |
7731 | EOF |
7732 | cat > conftest.big <<EOF | |
7733 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7734 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 7735 | 0020 00000008 04000000 0844 .........D |
c64688ae RH |
7736 | EOF |
7737 | # If the assembler didn't choke, and we can objdump, | |
7738 | # and we got the correct data, then succeed. | |
7739 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7740 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7741 | | tail -3 > conftest.got \ |
01efb963 AS |
7742 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7743 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7744 | then |
7745 | gcc_cv_as_eh_frame="yes" | |
7746 | else | |
7747 | gcc_cv_as_eh_frame="bad" | |
7748 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
093e61a6 | 7749 | cat >> confdefs.h <<\EOF |
c64688ae | 7750 | #define USE_AS_TRADITIONAL_FORMAT 1 |
093e61a6 | 7751 | EOF |
c64688ae RH |
7752 | |
7753 | fi | |
7754 | fi | |
7755 | fi | |
7756 | rm -f conftest.* | |
7757 | fi | |
093e61a6 | 7758 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
c64688ae | 7759 | |
093e61a6 | 7760 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
619833ad | 7761 | echo "configure:7762: checking assembler section merging support" >&5 |
201556f0 | 7762 | gcc_cv_as_shf_merge=no |
34a86c2b | 7763 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7764 | if test $gcc_cv_gas_major_version -eq 2 \ |
7765 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7766 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7767 | ||
7768 | ||
7769 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7770 | gcc_cv_as_shf_merge=yes | |
7771 | fi | |
093e61a6 | 7772 | |
ad9c4d9f NN |
7773 | |
7774 | fi | |
7775 | ||
201556f0 JJ |
7776 | elif test x$gcc_cv_as != x; then |
7777 | # Check if we support SHF_MERGE sections | |
7778 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7779 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7780 | gcc_cv_as_shf_merge=yes |
7781 | fi | |
7782 | rm -f conftest.s conftest.o | |
7783 | fi | |
7784 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
093e61a6 | 7785 | cat >> confdefs.h <<\EOF |
201556f0 | 7786 | #define HAVE_GAS_SHF_MERGE 1 |
093e61a6 | 7787 | EOF |
201556f0 JJ |
7788 | |
7789 | fi | |
093e61a6 | 7790 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 |
201556f0 | 7791 | |
093e61a6 | 7792 | echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 |
619833ad | 7793 | echo "configure:7794: checking assembler thread-local storage support" >&5 |
f996902d RH |
7794 | gcc_cv_as_tls=no |
7795 | conftest_s= | |
7796 | tls_first_major= | |
7797 | tls_first_minor= | |
9739c90c | 7798 | tls_as_opt= |
f996902d | 7799 | case "$target" in |
6f9b006d RH |
7800 | alpha*-*-*) |
7801 | conftest_s=' | |
7802 | .section ".tdata","awT",@progbits | |
7803 | foo: .long 25 | |
7804 | .text | |
7805 | ldq $27,__tls_get_addr($29) !literal!1 | |
7806 | lda $16,foo($29) !tlsgd!1 | |
7807 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
7808 | ldq $27,__tls_get_addr($29) !literal!2 | |
7809 | lda $16,foo($29) !tlsldm!2 | |
7810 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
7811 | ldq $1,foo($29) !gotdtprel | |
7812 | ldah $2,foo($29) !dtprelhi | |
7813 | lda $3,foo($2) !dtprello | |
7814 | lda $4,foo($29) !dtprel | |
7815 | ldq $1,foo($29) !gottprel | |
7816 | ldah $2,foo($29) !tprelhi | |
7817 | lda $3,foo($2) !tprello | |
7818 | lda $4,foo($29) !tprel' | |
7819 | tls_first_major=2 | |
7820 | tls_first_minor=13 | |
7821 | ;; | |
f996902d RH |
7822 | i[34567]86-*-*) |
7823 | conftest_s=' | |
7824 | .section ".tdata","awT",@progbits | |
7825 | foo: .long 25 | |
7826 | .text | |
7827 | movl %gs:0, %eax | |
7828 | leal foo@TLSGD(,%ebx,1), %eax | |
7829 | leal foo@TLSLDM(%ebx), %eax | |
7830 | leal foo@DTPOFF(%eax), %edx | |
7831 | movl foo@GOTTPOFF(%ebx), %eax | |
7832 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
7833 | addl foo@GOTNTPOFF(%ebx), %eax |
7834 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
7835 | movl $foo@TPOFF, %eax |
7836 | subl $foo@TPOFF, %eax | |
7837 | leal foo@NTPOFF(%ecx), %eax' | |
7838 | tls_first_major=2 | |
75d38379 JJ |
7839 | tls_first_minor=14 |
7840 | ;; | |
7841 | x86_64-*-*) | |
7842 | conftest_s=' | |
7843 | .section ".tdata","awT",@progbits | |
7844 | foo: .long 25 | |
7845 | .text | |
7846 | movq %fs:0, %rax | |
7847 | leaq foo@TLSGD(%rip), %rdi | |
7848 | leaq foo@TLSLD(%rip), %rdi | |
7849 | leaq foo@DTPOFF(%rax), %rdx | |
7850 | movq foo@GOTTPOFF(%rip), %rax | |
7851 | movq $foo@TPOFF, %rax' | |
7852 | tls_first_major=2 | |
7853 | tls_first_minor=14 | |
f996902d | 7854 | ;; |
7b6e506e RH |
7855 | ia64-*-*) |
7856 | conftest_s=' | |
7857 | .section ".tdata","awT",@progbits | |
7858 | foo: data8 25 | |
7859 | .text | |
7860 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
7861 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
7862 | addl r18 = @ltoff(@tprel(foo#)), gp | |
7863 | addl r19 = @dtprel(foo#), gp | |
7864 | adds r21 = @dtprel(foo#), r13 | |
7865 | movl r23 = @dtprel(foo#) | |
7866 | addl r20 = @tprel(foo#), gp | |
7867 | adds r22 = @tprel(foo#), r13 | |
7868 | movl r24 = @tprel(foo#)' | |
7869 | tls_first_major=2 | |
7870 | tls_first_minor=13 | |
7871 | ;; | |
c4501e62 JJ |
7872 | powerpc-*-*) |
7873 | conftest_s=' | |
7874 | .section ".tdata","awT",@progbits | |
7875 | .align 2 | |
7876 | ld0: .space 4 | |
7877 | ld1: .space 4 | |
7878 | x1: .space 4 | |
7879 | x2: .space 4 | |
7880 | x3: .space 4 | |
7881 | .text | |
7882 | addi 3,31,ld0@got@tlsgd | |
7883 | bl __tls_get_addr | |
7884 | addi 3,31,x1@got@tlsld | |
7885 | bl __tls_get_addr | |
7886 | addi 9,3,x1@dtprel | |
7887 | addis 9,3,x2@dtprel@ha | |
7888 | addi 9,9,x2@dtprel@l | |
7889 | lwz 9,x3@got@tprel(31) | |
7890 | add 9,9,x@tls | |
7891 | addi 9,2,x1@tprel | |
7892 | addis 9,2,x2@tprel@ha | |
7893 | addi 9,9,x2@tprel@l' | |
7894 | tls_first_major=2 | |
7895 | tls_first_minor=14 | |
9739c90c | 7896 | tls_as_opt=-a32 |
c4501e62 JJ |
7897 | ;; |
7898 | powerpc64-*-*) | |
7899 | conftest_s=' | |
7900 | .section ".tdata","awT",@progbits | |
7901 | .align 3 | |
7902 | ld0: .space 8 | |
7903 | ld1: .space 8 | |
7904 | x1: .space 8 | |
7905 | x2: .space 8 | |
7906 | x3: .space 8 | |
7907 | .text | |
7908 | addi 3,2,ld0@got@tlsgd | |
7909 | bl .__tls_get_addr | |
7910 | nop | |
7911 | addi 3,2,ld1@toc | |
7912 | bl .__tls_get_addr | |
7913 | nop | |
7914 | addi 3,2,x1@got@tlsld | |
7915 | bl .__tls_get_addr | |
7916 | nop | |
7917 | addi 9,3,x1@dtprel | |
7918 | bl .__tls_get_addr | |
7919 | nop | |
7920 | addis 9,3,x2@dtprel@ha | |
7921 | addi 9,9,x2@dtprel@l | |
7922 | bl .__tls_get_addr | |
7923 | nop | |
7924 | ld 9,x3@got@dtprel(2) | |
7925 | add 9,9,3 | |
7926 | bl .__tls_get_addr | |
7927 | nop' | |
7928 | tls_first_major=2 | |
7929 | tls_first_minor=14 | |
9739c90c | 7930 | tls_as_opt=-a64 |
c4501e62 | 7931 | ;; |
fd3cd001 UW |
7932 | s390-*-*) |
7933 | conftest_s=' | |
7934 | .section ".tdata","awT",@progbits | |
7935 | foo: .long 25 | |
7936 | .text | |
7937 | .long foo@TLSGD | |
7938 | .long foo@TLSLDM | |
7939 | .long foo@DTPOFF | |
7940 | .long foo@NTPOFF | |
7941 | .long foo@GOTNTPOFF | |
7942 | .long foo@INDNTPOFF | |
7943 | l %r1,foo@GOTNTPOFF(%r12) | |
7944 | l %r1,0(%r1):tls_load:foo | |
7945 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
7946 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
7947 | tls_first_major=2 | |
7948 | tls_first_minor=14 | |
9739c90c | 7949 | tls_as_opt=-m31 |
fd3cd001 UW |
7950 | ;; |
7951 | s390x-*-*) | |
7952 | conftest_s=' | |
7953 | .section ".tdata","awT",@progbits | |
7954 | foo: .long 25 | |
7955 | .text | |
7956 | .quad foo@TLSGD | |
7957 | .quad foo@TLSLDM | |
7958 | .quad foo@DTPOFF | |
7959 | .quad foo@NTPOFF | |
7960 | .quad foo@GOTNTPOFF | |
7961 | lg %r1,foo@GOTNTPOFF(%r12) | |
7962 | larl %r1,foo@INDNTPOFF | |
7963 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
7964 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
7965 | tls_first_major=2 | |
7966 | tls_first_minor=14 | |
9739c90c | 7967 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 7968 | ;; |
f996902d RH |
7969 | esac |
7970 | if test -z "$tls_first_major"; then | |
7971 | : | |
34a86c2b | 7972 | elif test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7973 | if test $gcc_cv_gas_major_version -eq $tls_first_major \ |
7974 | && test $gcc_cv_gas_minor_version -ge $tls_first_minor \ | |
7975 | || test $gcc_cv_gas_major_version -gt $tls_first_major ; then | |
7976 | ||
7977 | ||
f996902d | 7978 | gcc_cv_as_tls=yes |
093e61a6 | 7979 | |
ad9c4d9f NN |
7980 | |
7981 | fi | |
7982 | ||
f996902d RH |
7983 | elif test x$gcc_cv_as != x; then |
7984 | echo "$conftest_s" > conftest.s | |
9739c90c | 7985 | if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 |
f996902d RH |
7986 | then |
7987 | gcc_cv_as_tls=yes | |
7988 | fi | |
7989 | rm -f conftest.s conftest.o | |
7990 | fi | |
7991 | if test "$gcc_cv_as_tls" = yes; then | |
093e61a6 | 7992 | cat >> confdefs.h <<\EOF |
f996902d | 7993 | #define HAVE_AS_TLS 1 |
093e61a6 | 7994 | EOF |
f996902d RH |
7995 | |
7996 | fi | |
093e61a6 | 7997 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 |
f996902d | 7998 | |
3a37b08e RH |
7999 | case "$target" in |
8000 | # All TARGET_ABI_OSF targets. | |
8001 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
093e61a6 | 8002 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 |
619833ad | 8003 | echo "configure:8004: checking assembler supports explicit relocations" >&5 |
093e61a6 RS |
8004 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
8005 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a37b08e | 8006 | else |
093e61a6 | 8007 | |
3a37b08e | 8008 | gcc_cv_as_explicit_relocs=unknown |
34a86c2b | 8009 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8010 | if test $gcc_cv_gas_major_version -eq 2 \ |
8011 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
8012 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8013 | ||
8014 | ||
3a37b08e | 8015 | gcc_cv_as_explicit_relocs=yes |
093e61a6 | 8016 | |
ad9c4d9f NN |
8017 | |
8018 | fi | |
8019 | ||
3a37b08e RH |
8020 | elif test x$gcc_cv_as != x; then |
8021 | cat > conftest.s << 'EOF' | |
8022 | .set nomacro | |
8023 | .text | |
8024 | extbl $3, $2, $3 !lituse_bytoff!1 | |
8025 | ldq $2, a($29) !literal!1 | |
8026 | ldq $4, b($29) !literal!2 | |
8027 | ldq_u $3, 0($2) !lituse_base!1 | |
8028 | ldq $27, f($29) !literal!5 | |
8029 | jsr $26, ($27), f !lituse_jsr!5 | |
8030 | ldah $29, 0($26) !gpdisp!3 | |
8031 | lda $0, c($29) !gprel | |
8032 | ldah $1, d($29) !gprelhigh | |
8033 | lda $1, d($1) !gprellow | |
8034 | lda $29, 0($29) !gpdisp!3 | |
8035 | EOF | |
8036 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8037 | gcc_cv_as_explicit_relocs=yes | |
8038 | else | |
8039 | gcc_cv_as_explicit_relocs=no | |
8040 | fi | |
8041 | rm -f conftest.s conftest.o | |
8042 | fi | |
093e61a6 | 8043 | |
cafe096b | 8044 | fi |
cafe096b | 8045 | |
093e61a6 RS |
8046 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 |
8047 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
8048 | cat >> confdefs.h <<\EOF | |
3a37b08e | 8049 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
093e61a6 | 8050 | EOF |
3a37b08e RH |
8051 | |
8052 | fi | |
8053 | ;; | |
1cb36a98 | 8054 | sparc*-*-*) |
093e61a6 | 8055 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 |
619833ad | 8056 | echo "configure:8057: checking assembler .register pseudo-op support" >&5 |
093e61a6 RS |
8057 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
8058 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8059 | else |
093e61a6 | 8060 | |
5b68c389 AO |
8061 | gcc_cv_as_register_pseudo_op=unknown |
8062 | if test x$gcc_cv_as != x; then | |
8063 | # Check if we have .register | |
8064 | echo ".register %g2, #scratch" > conftest.s | |
8065 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 8066 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
8067 | else |
8068 | gcc_cv_as_register_pseudo_op=no | |
8069 | fi | |
8070 | rm -f conftest.s conftest.o | |
8071 | fi | |
093e61a6 | 8072 | |
cafe096b | 8073 | fi |
cafe096b | 8074 | |
093e61a6 RS |
8075 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 |
8076 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
8077 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8078 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
093e61a6 | 8079 | EOF |
1cb36a98 | 8080 | |
1cb36a98 | 8081 | fi |
1cb36a98 | 8082 | |
093e61a6 | 8083 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
619833ad | 8084 | echo "configure:8085: checking assembler supports -relax" >&5 |
093e61a6 RS |
8085 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
8086 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e95b1e6a | 8087 | else |
093e61a6 | 8088 | |
e95b1e6a JJ |
8089 | gcc_cv_as_relax_opt=unknown |
8090 | if test x$gcc_cv_as != x; then | |
8091 | # Check if gas supports -relax | |
8092 | echo ".text" > conftest.s | |
8093 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
8094 | gcc_cv_as_relax_opt=yes | |
8095 | else | |
8096 | gcc_cv_as_relax_opt=no | |
8097 | fi | |
8098 | rm -f conftest.s conftest.o | |
8099 | fi | |
093e61a6 | 8100 | |
cafe096b | 8101 | fi |
cafe096b | 8102 | |
093e61a6 RS |
8103 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 |
8104 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
8105 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 8106 | #define HAVE_AS_RELAX_OPTION 1 |
093e61a6 | 8107 | EOF |
e95b1e6a JJ |
8108 | |
8109 | fi | |
8110 | ||
093e61a6 | 8111 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
619833ad | 8112 | echo "configure:8113: checking assembler and linker support unaligned pc related relocs" >&5 |
093e61a6 RS |
8113 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
8114 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 8115 | else |
093e61a6 | 8116 | |
17e9e88c JJ |
8117 | gcc_cv_as_sparc_ua_pcrel=unknown |
8118 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
8119 | gcc_cv_as_sparc_ua_pcrel=no | |
8120 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
8121 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
8122 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
8123 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
8124 | fi |
8125 | rm -f conftest.s conftest.o conftest | |
8126 | fi | |
093e61a6 | 8127 | |
cafe096b | 8128 | fi |
cafe096b | 8129 | |
093e61a6 RS |
8130 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
8131 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
8132 | cat >> confdefs.h <<\EOF | |
17e9e88c | 8133 | #define HAVE_AS_SPARC_UA_PCREL 1 |
093e61a6 | 8134 | EOF |
17e9e88c JJ |
8135 | |
8136 | fi | |
8137 | ||
093e61a6 | 8138 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
619833ad | 8139 | echo "configure:8140: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
093e61a6 RS |
8140 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
8141 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 8142 | else |
093e61a6 | 8143 | |
cf7b8b0d JJ |
8144 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then |
8145 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
8146 | if test x$gcc_cv_objdump != x; then | |
8147 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
8148 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
8149 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
8150 | echo "foo: .skip 4" >> conftest.s | |
8151 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
8152 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
8153 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
8154 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
8155 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
8156 | | grep 'DISP32' > /dev/null 2>&1; then | |
8157 | : | |
8158 | else | |
8159 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
8160 | fi | |
8161 | fi | |
8162 | fi | |
8163 | rm -f conftest.s conftest.o conftest | |
8164 | else | |
8165 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
8166 | fi | |
093e61a6 | 8167 | |
cafe096b | 8168 | fi |
cafe096b | 8169 | |
093e61a6 RS |
8170 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
8171 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
8172 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 8173 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
093e61a6 | 8174 | EOF |
cf7b8b0d JJ |
8175 | |
8176 | fi | |
8177 | ||
093e61a6 | 8178 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 |
619833ad | 8179 | echo "configure:8180: checking for assembler offsetable %lo() support" >&5 |
093e61a6 RS |
8180 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
8181 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8182 | else |
093e61a6 | 8183 | |
22252625 JJ |
8184 | gcc_cv_as_offsetable_lo10=unknown |
8185 | if test "x$gcc_cv_as" != x; then | |
8186 | # Check if assembler has offsetable %lo() | |
8187 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
8188 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
8189 | if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ | |
8190 | > /dev/null 2>&1 && | |
8191 | $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ | |
8192 | > /dev/null 2>&1; then | |
8193 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
5b68c389 | 8194 | gcc_cv_as_offsetable_lo10=no |
22252625 JJ |
8195 | else |
8196 | gcc_cv_as_offsetable_lo10=yes | |
5b68c389 | 8197 | fi |
22252625 JJ |
8198 | else |
8199 | gcc_cv_as_offsetable_lo10=no | |
5b68c389 | 8200 | fi |
22252625 JJ |
8201 | rm -f conftest.s conftest.o conftest1.s conftest1.o |
8202 | fi | |
093e61a6 | 8203 | |
cafe096b | 8204 | fi |
cafe096b | 8205 | |
093e61a6 RS |
8206 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 |
8207 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
8208 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8209 | #define HAVE_AS_OFFSETABLE_LO10 1 |
093e61a6 | 8210 | EOF |
1cb36a98 | 8211 | |
1cb36a98 | 8212 | fi |
43160d01 | 8213 | |
1cb36a98 RH |
8214 | ;; |
8215 | ||
c307e6dd | 8216 | i[34567]86-*-* | x86_64-*-*) |
093e61a6 | 8217 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
619833ad | 8218 | echo "configure:8219: checking assembler instructions" >&5 |
1cb36a98 | 8219 | gcc_cv_as_instructions= |
093e61a6 | 8220 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8221 | if test $gcc_cv_gas_major_version -eq 2 \ |
8222 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
8223 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8224 | ||
8225 | ||
981d4858 | 8226 | gcc_cv_as_instructions="filds fists" |
093e61a6 | 8227 | |
ad9c4d9f NN |
8228 | |
8229 | fi | |
8230 | ||
981d4858 | 8231 | elif test x$gcc_cv_as != x; then |
53b5ce19 JW |
8232 | set "filds fists" "filds mem; fists mem" |
8233 | while test $# -gt 0 | |
8234 | do | |
8235 | echo "$2" > conftest.s | |
8236 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8237 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
8238 | fi |
8239 | shift 2 | |
8240 | done | |
8241 | rm -f conftest.s conftest.o | |
1cb36a98 | 8242 | fi |
981d4858 | 8243 | if test x"$gcc_cv_as_instructions" != x; then |
093e61a6 | 8244 | cat >> confdefs.h <<EOF |
ee7692d2 | 8245 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
093e61a6 | 8246 | EOF |
981d4858 JM |
8247 | |
8248 | fi | |
093e61a6 | 8249 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 | 8250 | |
093e61a6 | 8251 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 |
619833ad | 8252 | echo "configure:8253: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 | 8253 | gcc_cv_as_gotoff_in_data=no |
34a86c2b | 8254 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8255 | if test $gcc_cv_gas_major_version -eq 2 \ |
8256 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8257 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8258 | ||
8259 | ||
f88c65f7 | 8260 | gcc_cv_as_gotoff_in_data=yes |
093e61a6 | 8261 | |
ad9c4d9f NN |
8262 | |
8263 | fi | |
8264 | ||
f88c65f7 RH |
8265 | elif test x$gcc_cv_as != x; then |
8266 | cat > conftest.s <<EOF | |
8267 | .text | |
8268 | .L0: | |
8269 | nop | |
8270 | .data | |
8271 | .long .L0@GOTOFF | |
8272 | EOF | |
8273 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8274 | gcc_cv_as_gotoff_in_data=yes | |
8275 | fi | |
8276 | fi | |
093e61a6 | 8277 | cat >> confdefs.h <<EOF |
f88c65f7 | 8278 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
093e61a6 | 8279 | EOF |
f88c65f7 | 8280 | |
093e61a6 | 8281 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 |
1cb36a98 | 8282 | ;; |
ef1ecf87 RH |
8283 | |
8284 | ia64*-*-*) | |
093e61a6 | 8285 | echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 |
619833ad | 8286 | echo "configure:8287: checking assembler supports ltoffx and ldxmov" >&5 |
093e61a6 RS |
8287 | if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
8288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ef1ecf87 | 8289 | else |
093e61a6 | 8290 | |
ef1ecf87 | 8291 | gcc_cv_as_ltoffx_ldxmov_relocs=unknown |
ad9c4d9f NN |
8292 | if test $in_tree_gas = yes ; then |
8293 | if test $gcc_cv_gas_major_version -eq 2 \ | |
8294 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8295 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8296 | ||
8297 | ||
8298 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
093e61a6 | 8299 | |
ad9c4d9f NN |
8300 | |
8301 | fi | |
8302 | ||
ef1ecf87 RH |
8303 | elif test x$gcc_cv_as != x; then |
8304 | cat > conftest.s << 'EOF' | |
8305 | .text | |
8306 | addl r15 = @ltoffx(x#), gp | |
8307 | ;; | |
8308 | ld8.mov r16 = [r15], x# | |
8309 | EOF | |
8310 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8311 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
8312 | else | |
8313 | gcc_cv_as_ltoffx_ldxmov_relocs=no | |
8314 | fi | |
8315 | rm -f conftest.s conftest.o | |
8316 | fi | |
093e61a6 | 8317 | |
cafe096b | 8318 | fi |
cafe096b | 8319 | |
093e61a6 RS |
8320 | echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6 |
8321 | if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then | |
8322 | cat >> confdefs.h <<\EOF | |
ef1ecf87 | 8323 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
093e61a6 | 8324 | EOF |
ef1ecf87 RH |
8325 | |
8326 | fi | |
8327 | ;; | |
1cb36a98 | 8328 | esac |
53b5ce19 | 8329 | |
093e61a6 | 8330 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
619833ad | 8331 | echo "configure:8332: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
8332 | gcc_cv_as_dwarf2_debug_line=no |
8333 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
8334 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
8335 | # info to the output file. So, as supported targets are added to gas 2.11, | |
8336 | # add some instruction here to (also) show we expect this might work. | |
8337 | # ??? Once 2.11 is released, probably need to add first known working | |
8338 | # version to the per-target configury. | |
8339 | case "$target" in | |
80486e06 | 8340 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a HPN |
8341 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
8342 | | xstormy16*-*-* | cris-*-*) | |
9d147085 RH |
8343 | insn="nop" |
8344 | ;; | |
8345 | ia64*-*-*) | |
8346 | insn="nop 0" | |
8347 | ;; | |
2853bc5a HPN |
8348 | mmix-*-*) |
8349 | insn="swym 0" | |
8350 | ;; | |
9d147085 | 8351 | esac |
34a86c2b | 8352 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8353 | if test $gcc_cv_gas_major_version -eq 2 \ |
8354 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8355 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8356 | ||
8357 | ||
8358 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8359 | && test x"$insn" != x ; then | |
8360 | gcc_cv_as_dwarf2_debug_line="yes" | |
8361 | fi | |
093e61a6 | 8362 | |
ad9c4d9f NN |
8363 | |
8364 | fi | |
8365 | ||
9d147085 | 8366 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
acc187f5 RH |
8367 | echo ' .file 1 "conftest.s"' > conftest.s |
8368 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 8369 | echo " $insn" >> conftest.s |
981975b6 | 8370 | # ??? This fails with non-gnu grep. |
9d147085 RH |
8371 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
8372 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 8373 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 8374 | # we specified the files, since these indices are also used |
981975b6 RH |
8375 | # by DW_AT_decl_file. Approximate this test by testing if |
8376 | # the assembler bitches if the same index is assigned twice. | |
8377 | echo ' .file 1 "foo.s"' > conftest.s | |
8378 | echo ' .file 1 "bar.s"' >> conftest.s | |
8379 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
8380 | then | |
8381 | gcc_cv_as_dwarf2_debug_line="no" | |
8382 | else | |
8383 | gcc_cv_as_dwarf2_debug_line="yes" | |
8384 | fi | |
9d147085 RH |
8385 | fi |
8386 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
8387 | fi | |
8388 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
093e61a6 | 8389 | cat >> confdefs.h <<\EOF |
9d147085 | 8390 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
093e61a6 | 8391 | EOF |
9d147085 RH |
8392 | |
8393 | fi | |
093e61a6 | 8394 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 |
9d147085 | 8395 | |
093e61a6 | 8396 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
2853bc5a | 8397 | echo "configure:8398: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 | 8398 | gcc_cv_as_gdwarf2_flag=no |
34a86c2b | 8399 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8400 | if test $gcc_cv_gas_major_version -eq 2 \ |
8401 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8402 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8403 | ||
8404 | ||
8405 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8406 | && test x"$insn" != x ; then | |
8407 | gcc_cv_as_gdwarf2_flag="yes" | |
8408 | fi | |
093e61a6 | 8409 | |
ad9c4d9f NN |
8410 | |
8411 | fi | |
8412 | ||
5f0e9ea2 GK |
8413 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8414 | echo '' > conftest.s | |
8415 | # ??? This fails with non-gnu grep. | |
8416 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
8417 | then | |
8418 | gcc_cv_as_gdwarf2_flag="yes" | |
8419 | fi | |
8420 | rm -f conftest.s conftest.o | |
8421 | fi | |
8422 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
093e61a6 | 8423 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8424 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
093e61a6 | 8425 | EOF |
5f0e9ea2 GK |
8426 | |
8427 | fi | |
093e61a6 | 8428 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
5f0e9ea2 | 8429 | |
093e61a6 | 8430 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 |
2853bc5a | 8431 | echo "configure:8432: checking assembler --gstabs support" >&5 |
5f0e9ea2 | 8432 | gcc_cv_as_gstabs_flag=no |
34a86c2b | 8433 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8434 | if test $gcc_cv_gas_major_version -eq 2 \ |
8435 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8436 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8437 | ||
8438 | ||
8439 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8440 | && test x"$insn" != x ; then | |
8441 | gcc_cv_as_gstabs_flag="yes" | |
8442 | fi | |
093e61a6 | 8443 | |
ad9c4d9f NN |
8444 | |
8445 | fi | |
8446 | ||
5f0e9ea2 GK |
8447 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8448 | echo '' > conftest.s | |
8449 | # ??? This fails with non-gnu grep. | |
8450 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
8451 | gcc_cv_as_gstabs_flag="yes" | |
8452 | fi | |
8453 | rm -f conftest.s conftest.o | |
8454 | fi | |
8455 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
093e61a6 | 8456 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8457 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
093e61a6 | 8458 | EOF |
5f0e9ea2 GK |
8459 | |
8460 | fi | |
093e61a6 | 8461 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
5f0e9ea2 | 8462 | |
093e61a6 | 8463 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
2853bc5a | 8464 | echo "configure:8465: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 8465 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 8466 | if test $in_tree_ld = yes ; then |
96d0f4dc JJ |
8467 | 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 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then |
8468 | gcc_cv_ld_ro_rw_mix=read-write | |
8469 | fi | |
8470 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
8471 | echo '.section myfoosect, "a"' > conftest1.s |
8472 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 8473 | echo '.byte 1' >> conftest2.s |
90e145da | 8474 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 8475 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
8476 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
8477 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
8478 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 8479 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 8480 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 8481 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 8482 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
8483 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
8484 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
8485 | gcc_cv_ld_ro_rw_mix=read-only | |
8486 | else | |
8487 | gcc_cv_ld_ro_rw_mix=read-write | |
8488 | fi | |
8489 | fi | |
8490 | fi | |
8491 | rm -f conftest.* conftest[123].* | |
8492 | fi | |
8493 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
093e61a6 | 8494 | cat >> confdefs.h <<\EOF |
96d0f4dc | 8495 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
093e61a6 | 8496 | EOF |
96d0f4dc JJ |
8497 | |
8498 | fi | |
093e61a6 | 8499 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 8500 | |
093e61a6 | 8501 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
2853bc5a | 8502 | echo "configure:8503: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 8503 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 8504 | if test $in_tree_ld = yes ; then |
275b60d6 JJ |
8505 | 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 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then |
8506 | gcc_cv_ld_eh_frame_hdr=yes | |
8507 | fi | |
8508 | elif test x$gcc_cv_ld != x; then | |
8509 | # Check if linker supports --eh-frame-hdr option | |
8510 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
8511 | gcc_cv_ld_eh_frame_hdr=yes | |
8512 | fi | |
8513 | fi | |
8514 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
093e61a6 | 8515 | cat >> confdefs.h <<\EOF |
275b60d6 | 8516 | #define HAVE_LD_EH_FRAME_HDR 1 |
093e61a6 | 8517 | EOF |
275b60d6 JJ |
8518 | |
8519 | fi | |
093e61a6 | 8520 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 8521 | |
24a4dd31 | 8522 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
2853bc5a | 8523 | echo "configure:8524: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
8524 | gcc_cv_ld_pie=no |
8525 | if test $in_tree_ld = yes ; then | |
8526 | 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 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then | |
8527 | gcc_cv_ld_pie=yes | |
8528 | fi | |
8529 | elif test x$gcc_cv_ld != x; then | |
8530 | # Check if linker supports -pie option | |
8531 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
8532 | gcc_cv_ld_pie=yes | |
8533 | fi | |
8534 | fi | |
8535 | if test x"$gcc_cv_ld_pie" = xyes; then | |
8536 | cat >> confdefs.h <<\EOF | |
8537 | #define HAVE_LD_PIE 1 | |
8538 | EOF | |
8539 | ||
8540 | fi | |
8541 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 | |
8542 | ||
4357a6c3 CD |
8543 | # Miscellaneous target-specific checks. |
8544 | case "$target" in | |
8545 | mips*-*-*) | |
093e61a6 | 8546 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 |
2853bc5a | 8547 | echo "configure:8548: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
8548 | gcc_cv_mips_libgloss_startup=no |
8549 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
8550 | if test "x$exec_prefix" = xNONE; then | |
8551 | if test "x$prefix" = xNONE; then | |
8552 | test_prefix=/usr/local | |
8553 | else | |
8554 | test_prefix=$prefix | |
8555 | fi | |
8556 | else | |
8557 | test_prefix=$exec_prefix | |
8558 | fi | |
8559 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld | |
8560 | do | |
8561 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
8562 | gcc_cv_mips_libgloss_startup=yes | |
8563 | break | |
8564 | fi | |
8565 | done | |
8566 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
093e61a6 | 8567 | cat >> confdefs.h <<\EOF |
4357a6c3 | 8568 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 |
093e61a6 | 8569 | EOF |
4357a6c3 CD |
8570 | |
8571 | fi | |
093e61a6 | 8572 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 |
cafe096b | 8573 | |
093e61a6 | 8574 | echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6 |
2853bc5a | 8575 | echo "configure:8576: checking whether the assembler has explicit relocation support" >&5 |
cafe096b EC |
8576 | if test x$gcc_cv_mips_explicit_relocs = x; then |
8577 | gcc_cv_mips_explicit_relocs=no | |
4665e56c | 8578 | if test $in_tree_gas = yes; then |
4dd03b27 RS |
8579 | if test $gcc_cv_gas_major_version -eq 2 \ |
8580 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8581 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8582 | ||
8583 | ||
8584 | gcc_cv_mips_explicit_relocs=yes | |
8585 | ||
8586 | ||
8587 | fi | |
8588 | ||
8589 | elif test x$gcc_cv_as != x; then | |
cafe096b EC |
8590 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
8591 | if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then | |
8592 | gcc_cv_mips_explicit_relocs=yes | |
8593 | fi | |
8594 | rm -f conftest.s conftest.o | |
8595 | fi | |
8596 | fi | |
8597 | if test $gcc_cv_mips_explicit_relocs = yes; then | |
8598 | test x$target_cpu_default != x || target_cpu_default=0 | |
8599 | target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)" | |
8600 | fi | |
093e61a6 | 8601 | echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6 |
4357a6c3 CD |
8602 | ;; |
8603 | esac | |
8604 | ||
9fb28a67 | 8605 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 8606 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
093e61a6 | 8607 | cat >> confdefs.h <<EOF |
793e9558 | 8608 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
093e61a6 | 8609 | EOF |
793e9558 PB |
8610 | |
8611 | fi | |
8612 | ||
861bb6c1 | 8613 | # Figure out what language subdirectories are present. |
71205e0b MH |
8614 | # Look if the user specified --enable-languages="..."; if not, use |
8615 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
8616 | # go away some day. | |
cc9a08e0 | 8617 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
8618 | if test x"${enable_languages+set}" != xset; then |
8619 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 8620 | enable_languages="${LANGUAGES}" |
093e61a6 | 8621 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 |
cc9a08e0 | 8622 | |
71205e0b MH |
8623 | else |
8624 | enable_languages=all | |
8625 | fi | |
d6c6b553 | 8626 | else |
015089dd TJ |
8627 | if test x"${enable_languages}" = x \ |
8628 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 8629 | then |
093e61a6 | 8630 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } |
d6c6b553 | 8631 | fi |
71205e0b | 8632 | fi |
cc9a08e0 | 8633 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
8634 | |
8635 | # First scan to see if an enabled language requires some other language. | |
8636 | # We assume that a given config-lang.in will list all the language | |
8637 | # front ends it requires, even if some are required indirectly. | |
8638 | for lang in ${srcdir}/*/config-lang.in .. | |
8639 | do | |
8640 | case $lang in | |
8641 | ..) | |
8642 | ;; | |
8643 | # The odd quoting in the next line works around | |
8644 | # an apparent bug in bash 1.12 on linux. | |
8645 | ${srcdir}/[*]/config-lang.in) | |
8646 | ;; | |
8647 | *) | |
8648 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
8649 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
8650 | for other in $this_lang_requires | |
8651 | do | |
8652 | case ,${enable_languages}, in | |
8653 | *,$other,*) | |
8654 | ;; | |
8655 | *,all,*) | |
8656 | ;; | |
1bf17cc4 | 8657 | *,$lang_alias,*) |
75382c6d TT |
8658 | enable_languages="$enable_languages,$other" |
8659 | ;; | |
8660 | esac | |
8661 | done | |
8662 | ;; | |
8663 | esac | |
8664 | done | |
8665 | ||
015089dd TJ |
8666 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
8667 | found_languages= | |
861bb6c1 JL |
8668 | subdirs= |
8669 | for lang in ${srcdir}/*/config-lang.in .. | |
8670 | do | |
8671 | case $lang in | |
8672 | ..) ;; | |
8673 | # The odd quoting in the next line works around | |
8674 | # an apparent bug in bash 1.12 on linux. | |
8675 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
8676 | *) |
8677 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
8678 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
8679 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
8680 | if test "x$lang_alias" = x |
8681 | then | |
8682 | echo "$lang doesn't set \$language." 1>&2 | |
8683 | exit 1 | |
8684 | fi | |
2b60b2cb AO |
8685 | case ${build_by_default},${enable_languages}, in |
8686 | *,$lang_alias,*) add_this_lang=yes ;; | |
8687 | no,*) add_this_lang=no ;; | |
8688 | *,all,*) add_this_lang=yes ;; | |
8689 | *) add_this_lang=no ;; | |
8690 | esac | |
015089dd | 8691 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
8692 | if test x"${add_this_lang}" = xyes; then |
8693 | case $lang in | |
8694 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 8695 | if test x$have_gnat = xyes ; then |
71205e0b MH |
8696 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
8697 | fi | |
8698 | ;; | |
8699 | *) | |
8700 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
8701 | ;; | |
8702 | esac | |
8703 | fi | |
8704 | ;; | |
861bb6c1 JL |
8705 | esac |
8706 | done | |
8707 | ||
015089dd TJ |
8708 | missing_languages= |
8709 | for expected_language in ${expected_languages} .. | |
093e61a6 | 8710 | do |
015089dd TJ |
8711 | if test "${expected_language}" != ..; then |
8712 | missing_language="${expected_language}" | |
8713 | if test "${expected_language}" = "c" \ | |
8714 | || test "${expected_language}" = "all"; then | |
8715 | missing_language= | |
8716 | fi | |
8717 | for found_language in ${found_languages} .. | |
093e61a6 | 8718 | do |
015089dd TJ |
8719 | if test "${found_language}" != ..; then |
8720 | if test "${expected_language}" = "${found_language}"; then | |
8721 | missing_language= | |
8722 | fi | |
8723 | fi | |
8724 | done | |
8725 | if test "x${missing_language}" != x; then | |
8726 | missing_languages="${missing_languages} ${missing_language}" | |
8727 | fi | |
8728 | fi | |
8729 | done | |
8730 | ||
8731 | if test "x$missing_languages" != x; then | |
093e61a6 | 8732 | { echo "configure: error: |
015089dd | 8733 | The following requested languages were not found:${missing_languages} |
093e61a6 | 8734 | The following languages were available: c${found_languages}" 1>&2; exit 1; } |
02ef40d9 TJ |
8735 | fi |
8736 | ||
f24af81b TT |
8737 | # Make gthr-default.h if we have a thread file. |
8738 | gthread_flags= | |
75bffa71 | 8739 | if test $thread_file != single; then |
f24af81b | 8740 | rm -f gthr-default.h |
db0d1ed9 | 8741 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
8742 | gthread_flags=-DHAVE_GTHR_DEFAULT |
8743 | fi | |
8744 | ||
8745 | ||
81bf3d9e RH |
8746 | # Find out what GC implementation we want, or may, use. |
8747 | # Check whether --with-gc or --without-gc was given. | |
8748 | if test "${with_gc+set}" = set; then | |
8749 | withval="$with_gc" | |
8750 | case "$withval" in | |
8751 | simple | page) | |
8752 | GGC=ggc-$withval | |
8753 | ;; | |
8754 | *) | |
093e61a6 | 8755 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } |
81bf3d9e RH |
8756 | ;; |
8757 | esac | |
8758 | else | |
005537df | 8759 | GGC=ggc-page |
093e61a6 RS |
8760 | fi |
8761 | ||
81bf3d9e RH |
8762 | |
8763 | echo "Using $GGC for garbage collection." | |
8764 | ||
3c809ba4 | 8765 | # Use the system's zlib library. |
b8dad04b ZW |
8766 | zlibdir=-L../zlib |
8767 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
8768 | # Check whether --with-system-zlib or --without-system-zlib was given. |
8769 | if test "${with_system_zlib+set}" = set; then | |
8770 | withval="$with_system_zlib" | |
8771 | zlibdir= | |
8772 | zlibinc= | |
8773 | ||
093e61a6 RS |
8774 | fi |
8775 | ||
3c809ba4 AG |
8776 | |
8777 | ||
8778 | ||
dc6746e7 | 8779 | |
093e61a6 | 8780 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
2853bc5a | 8781 | echo "configure:8782: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
8782 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
8783 | if test "${enable_maintainer_mode+set}" = set; then | |
8784 | enableval="$enable_maintainer_mode" | |
8785 | maintainer_mode=$enableval | |
8786 | else | |
8787 | maintainer_mode=no | |
093e61a6 RS |
8788 | fi |
8789 | ||
dc6746e7 | 8790 | |
093e61a6 | 8791 | echo "$ac_t""$maintainer_mode" 1>&6 |
dc6746e7 PT |
8792 | |
8793 | if test "$maintainer_mode" = "yes"; then | |
8794 | MAINT='' | |
8795 | else | |
8796 | MAINT='#' | |
8797 | fi | |
8798 | ||
861bb6c1 JL |
8799 | # Make empty files to contain the specs and options for each language. |
8800 | # Then add #include lines to for a compiler that has specs and/or options. | |
8801 | ||
8802 | lang_specs_files= | |
8803 | lang_options_files= | |
3103b7db | 8804 | lang_tree_files= |
861bb6c1 JL |
8805 | for subdir in . $subdirs |
8806 | do | |
75bffa71 | 8807 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 8808 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 8809 | fi |
75bffa71 | 8810 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 8811 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 8812 | fi |
3103b7db | 8813 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 8814 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 8815 | fi |
861bb6c1 JL |
8816 | done |
8817 | ||
8818 | # These (without "all_") are set in each config-lang.in. | |
8819 | # `language' must be a single word so is spelled singularly. | |
8820 | all_languages= | |
8821 | all_boot_languages= | |
8822 | all_compilers= | |
8823 | all_stagestuff= | |
e34a3d31 | 8824 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 JL |
8825 | # List of language makefile fragments. |
8826 | all_lang_makefiles= | |
e2500fed | 8827 | # Files for gengtype |
ef69da62 | 8828 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
8829 | # Files for gengtype with language |
8830 | all_gtfiles_files_langs= | |
8831 | all_gtfiles_files_files= | |
861bb6c1 JL |
8832 | |
8833 | # Add the language fragments. | |
8834 | # Languages are added via two mechanisms. Some information must be | |
8835 | # recorded in makefile variables, these are defined in config-lang.in. | |
8836 | # We accumulate them and plug them into the main Makefile. | |
8837 | # The other mechanism is a set of hooks for each of the main targets | |
8838 | # like `clean', `install', etc. | |
8839 | ||
8840 | language_fragments="Make-lang" | |
8841 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8842 | |
8843 | for s in .. $subdirs | |
8844 | do | |
75bffa71 | 8845 | if test $s != ".." |
861bb6c1 JL |
8846 | then |
8847 | language= | |
8848 | boot_language= | |
8849 | compilers= | |
8850 | stagestuff= | |
861bb6c1 | 8851 | outputs= |
e2500fed | 8852 | gtfiles= |
861bb6c1 | 8853 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8854 | if test "x$language" = x |
861bb6c1 JL |
8855 | then |
8856 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8857 | exit 1 | |
8858 | fi | |
72aaffbd ZW |
8859 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8860 | if test -f ${srcdir}/$s/Makefile.in | |
8861 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8862 | fi | |
861bb6c1 | 8863 | all_languages="$all_languages $language" |
75bffa71 | 8864 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8865 | then |
8866 | all_boot_languages="$all_boot_languages $language" | |
8867 | fi | |
8868 | all_compilers="$all_compilers $compilers" | |
8869 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8870 | all_outputs="$all_outputs $outputs" |
e2500fed | 8871 | all_gtfiles="$all_gtfiles $gtfiles" |
8ac9d31f TJ |
8872 | for f in .. $gtfiles |
8873 | do | |
8874 | if test $f != ".." | |
8875 | then | |
8876 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8877 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8878 | fi | |
8879 | done | |
861bb6c1 JL |
8880 | fi |
8881 | done | |
8882 | ||
8ac9d31f TJ |
8883 | # Pick up gtfiles for c |
8884 | gtfiles= | |
8885 | s="c" | |
8886 | . ${srcdir}/c-config-lang.in | |
8887 | all_gtfiles="$all_gtfiles $gtfiles" | |
8888 | for f in .. $gtfiles | |
8889 | do | |
8890 | if test $f != ".." | |
8891 | then | |
8892 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8893 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8894 | fi | |
8895 | done | |
8896 | ||
cbc59f01 DD |
8897 | check_languages= |
8898 | for language in .. $all_languages | |
8899 | do | |
8900 | if test $language != ".." | |
8901 | then | |
8902 | check_languages="$check_languages check-$language" | |
8903 | fi | |
8904 | done | |
8905 | ||
861bb6c1 JL |
8906 | # Since we can't use `::' targets, we link each language in |
8907 | # with a set of hooks, reached indirectly via lang.${target}. | |
8908 | ||
8909 | rm -f Make-hooks | |
8910 | touch Make-hooks | |
65ebbf81 | 8911 | target_list="all.build all.cross start.encap rest.encap tags \ |
d3945f0a | 8912 | info dvi generated-manpages \ |
861bb6c1 | 8913 | install-normal install-common install-info install-man \ |
436a88a6 | 8914 | uninstall \ |
861bb6c1 | 8915 | mostlyclean clean distclean extraclean maintainer-clean \ |
8f231b5d | 8916 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
8917 | for t in $target_list |
8918 | do | |
8919 | x= | |
ab87f8c8 | 8920 | for lang in .. $all_languages |
861bb6c1 | 8921 | do |
ab87f8c8 JL |
8922 | if test $lang != ".."; then |
8923 | x="$x $lang.$t" | |
861bb6c1 JL |
8924 | fi |
8925 | done | |
8926 | echo "lang.$t: $x" >> Make-hooks | |
8927 | done | |
8928 | ||
cc06d68c | 8929 | # Create .gdbinit. |
861bb6c1 | 8930 | |
cc06d68c GP |
8931 | echo "dir ." > .gdbinit |
8932 | echo "dir ${srcdir}" >> .gdbinit | |
8933 | if test x$gdb_needs_out_file_path = xyes | |
8934 | then | |
8935 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8936 | fi | |
8937 | if test "x$subdirs" != x; then | |
8938 | for s in $subdirs | |
8939 | do | |
8940 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8941 | done | |
861bb6c1 | 8942 | fi |
cc06d68c | 8943 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8944 | |
8f8d3278 NC |
8945 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8946 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8947 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8948 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8949 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8950 | # make and thus we'd get different behavior depending on where we built the | |
8951 | # sources. | |
5949a9fc | 8952 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8953 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8954 | else | |
8f8d3278 NC |
8955 | # An explanation of the sed strings: |
8956 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8957 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8958 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8959 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8960 | # |
8961 | # (*) Note this pattern overwrites the first character of the string | |
8962 | # with a forward slash if one is not already present. This is not a | |
8963 | # problem because the exact names of the sub-directories concerned is | |
8964 | # unimportant, just the number of them matters. | |
8965 | # | |
8966 | # The practical upshot of these patterns is like this: | |
8967 | # | |
8968 | # prefix exec_prefix result | |
8969 | # ------ ----------- ------ | |
8970 | # /foo /foo/bar ../ | |
8971 | # /foo/ /foo/bar ../ | |
8972 | # /foo /foo/bar/ ../ | |
8973 | # /foo/ /foo/bar/ ../ | |
8974 | # /foo /foo/bar/ugg ../../ | |
8975 | # | |
4c112cda NC |
8976 | dollar='$$' |
8977 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8978 | fi |
8979 | ||
8980 | ||
2ce3c6c6 | 8981 | |
2bbea3a6 RH |
8982 | # Find a directory in which to install a shared libgcc. |
8983 | ||
8984 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8985 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8986 | enableval="$enable_version_specific_runtime_libs" | |
093e61a6 RS |
8987 | : |
8988 | fi | |
2bbea3a6 RH |
8989 | |
8990 | ||
5b15f277 RH |
8991 | # Check whether --with-slibdir or --without-slibdir was given. |
8992 | if test "${with_slibdir+set}" = set; then | |
8993 | withval="$with_slibdir" | |
8994 | slibdir="$with_slibdir" | |
8995 | else | |
8996 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8997 | slibdir='$(libsubdir)' |
5b15f277 | 8998 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8999 | slibdir='$(build_tooldir)/lib' |
9000 | else | |
5b15f277 | 9001 | slibdir='$(libdir)' |
2bbea3a6 | 9002 | fi |
093e61a6 RS |
9003 | fi |
9004 | ||
2bbea3a6 RH |
9005 | |
9006 | ||
1e6347d8 | 9007 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
9008 | |
9009 | ||
861bb6c1 JL |
9010 | # Process the language and host/target makefile fragments. |
9011 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
9012 | ||
9013 | # Substitute configuration variables | |
9014 | ||
9015 | ||
9016 | ||
9017 | ||
9018 | ||
9019 | ||
9020 | ||
9021 | ||
9022 | ||
9023 | ||
9024 | ||
9025 | ||
9026 | ||
9027 | ||
9028 | ||
9029 | ||
9030 | ||
9031 | ||
9032 | ||
9033 | ||
9034 | ||
9035 | ||
9036 | ||
9037 | ||
9038 | ||
9039 | ||
9040 | ||
9041 | ||
9042 | ||
9043 | ||
9044 | ||
9045 | ||
9046 | ||
9047 | ||
9048 | ||
9049 | ||
9050 | ||
9051 | ||
9052 | ||
9053 | ||
9054 | ||
9055 | ||
9056 | ||
9057 | ||
9058 | ||
9059 | ||
9b16d2c4 | 9060 | |
e9a25f70 | 9061 | |
6e26218f | 9062 | |
c8724862 | 9063 | |
e061d1ce | 9064 | |
d8bb17c8 | 9065 | |
11642c3a ZW |
9066 | |
9067 | ||
9068 | ||
9069 | ||
9070 | ||
9071 | ||
9072 | ||
3d9d2476 | 9073 | |
596151e1 | 9074 | |
8ac9d31f TJ |
9075 | |
9076 | ||
9077 | ||
e2500fed | 9078 | |
d5355cb2 | 9079 | |
476d9098 | 9080 | |
861bb6c1 JL |
9081 | |
9082 | ||
9083 | # Echo that links are built | |
75bffa71 | 9084 | if test x$host = x$target |
861bb6c1 JL |
9085 | then |
9086 | str1="native " | |
9087 | else | |
9088 | str1="cross-" | |
9089 | str2=" from $host" | |
9090 | fi | |
9091 | ||
75bffa71 | 9092 | if test x$host != x$build |
861bb6c1 JL |
9093 | then |
9094 | str3=" on a $build system" | |
9095 | fi | |
9096 | ||
75bffa71 | 9097 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9098 | then |
9099 | str4= | |
9100 | fi | |
9101 | ||
9102 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
9103 | ||
75bffa71 | 9104 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9105 | then |
9106 | echo " ${str2}${str3}." 1>&2 | |
9107 | fi | |
9108 | ||
9109 | # Configure the subdirectories | |
9110 | # AC_CONFIG_SUBDIRS($subdirs) | |
9111 | ||
9112 | # Create the Makefile | |
9113 | # and configure language subdirectories | |
093e61a6 RS |
9114 | trap '' 1 2 15 |
9115 | cat > confcache <<\EOF | |
861bb6c1 JL |
9116 | # This file is a shell script that caches the results of configure |
9117 | # tests run on this system so they can be shared between configure | |
093e61a6 RS |
9118 | # scripts and configure runs. It is not useful on other systems. |
9119 | # If it contains results you don't want to keep, you may remove or edit it. | |
861bb6c1 | 9120 | # |
093e61a6 RS |
9121 | # By default, configure uses ./config.cache as the cache file, |
9122 | # creating it if it does not exist already. You can give configure | |
9123 | # the --cache-file=FILE option to use a different cache file; that is | |
9124 | # what configure does when it calls configure scripts in | |
9125 | # subdirectories, so they share the cache. | |
9126 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
9127 | # config.status only pays attention to the cache file if you give it the | |
9128 | # --recheck option to rerun configure. | |
861bb6c1 | 9129 | # |
093e61a6 | 9130 | EOF |
861bb6c1 JL |
9131 | # The following way of writing the cache mishandles newlines in values, |
9132 | # but we know of no workaround that is simple, portable, and efficient. | |
9133 | # So, don't put newlines in cache variables' values. | |
9134 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
9135 | # and sets the high bit in the cache file unless we assign to the vars. | |
093e61a6 RS |
9136 | (set) 2>&1 | |
9137 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
9138 | *ac_space=\ *) | |
9139 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
9140 | # turns \\\\ into \\, and sed turns \\ into \). | |
9141 | sed -n \ | |
9142 | -e "s/'/'\\\\''/g" \ | |
9143 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
9144 | ;; | |
9145 | *) | |
9146 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
9147 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
9148 | ;; | |
9149 | esac >> confcache | |
9150 | if cmp -s $cache_file confcache; then | |
9151 | : | |
9152 | else | |
861bb6c1 | 9153 | if test -w $cache_file; then |
093e61a6 RS |
9154 | echo "updating cache $cache_file" |
9155 | cat confcache > $cache_file | |
861bb6c1 JL |
9156 | else |
9157 | echo "not updating unwritable cache $cache_file" | |
9158 | fi | |
9159 | fi | |
9160 | rm -f confcache | |
9161 | ||
093e61a6 RS |
9162 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
9163 | ||
861bb6c1 JL |
9164 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
9165 | # Let make expand exec_prefix. | |
9166 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9167 | ||
093e61a6 RS |
9168 | # Any assignment to VPATH causes Sun make to only execute |
9169 | # the first set of double-colon rules, so remove it if not needed. | |
9170 | # If there is a colon in the path, we need to keep it. | |
861bb6c1 | 9171 | if test "x$srcdir" = x.; then |
093e61a6 | 9172 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
861bb6c1 JL |
9173 | fi |
9174 | ||
093e61a6 | 9175 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
cafe096b | 9176 | |
093e61a6 | 9177 | DEFS=-DHAVE_CONFIG_H |
cafe096b | 9178 | |
093e61a6 | 9179 | # Without the "./", some shells look in PATH for config.status. |
cafe096b | 9180 | : ${CONFIG_STATUS=./config.status} |
cafe096b | 9181 | |
093e61a6 RS |
9182 | echo creating $CONFIG_STATUS |
9183 | rm -f $CONFIG_STATUS | |
9184 | cat > $CONFIG_STATUS <<EOF | |
9185 | #! /bin/sh | |
9186 | # Generated automatically by configure. | |
9187 | # Run this file to recreate the current configuration. | |
9188 | # This directory was configured as follows, | |
9189 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
cafe096b | 9190 | # |
093e61a6 | 9191 | # $0 $ac_configure_args |
cafe096b | 9192 | # |
093e61a6 RS |
9193 | # Compiler output produced by configure, useful for debugging |
9194 | # configure, is in ./config.log if it exists. | |
cafe096b | 9195 | |
093e61a6 RS |
9196 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
9197 | for ac_option | |
cafe096b | 9198 | do |
093e61a6 RS |
9199 | case "\$ac_option" in |
9200 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9201 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
9202 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
9203 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
9204 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
9205 | exit 0 ;; | |
9206 | -help | --help | --hel | --he | --h) | |
9207 | echo "\$ac_cs_usage"; exit 0 ;; | |
9208 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
cafe096b EC |
9209 | esac |
9210 | done | |
9211 | ||
093e61a6 | 9212 | ac_given_srcdir=$srcdir |
cafe096b | 9213 | |
093e61a6 RS |
9214 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
9215 | EOF | |
9216 | cat >> $CONFIG_STATUS <<EOF | |
cafe096b | 9217 | |
093e61a6 RS |
9218 | # Protect against being on the right side of a sed subst in config.status. |
9219 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
9220 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
9221 | $ac_vpsub | |
9222 | $extrasub | |
9223 | s%@SHELL@%$SHELL%g | |
9224 | s%@CFLAGS@%$CFLAGS%g | |
9225 | s%@CPPFLAGS@%$CPPFLAGS%g | |
9226 | s%@CXXFLAGS@%$CXXFLAGS%g | |
9227 | s%@FFLAGS@%$FFLAGS%g | |
9228 | s%@DEFS@%$DEFS%g | |
9229 | s%@LDFLAGS@%$LDFLAGS%g | |
9230 | s%@LIBS@%$LIBS%g | |
9231 | s%@exec_prefix@%$exec_prefix%g | |
9232 | s%@prefix@%$prefix%g | |
9233 | s%@program_transform_name@%$program_transform_name%g | |
9234 | s%@bindir@%$bindir%g | |
9235 | s%@sbindir@%$sbindir%g | |
9236 | s%@libexecdir@%$libexecdir%g | |
9237 | s%@datadir@%$datadir%g | |
9238 | s%@sysconfdir@%$sysconfdir%g | |
9239 | s%@sharedstatedir@%$sharedstatedir%g | |
9240 | s%@localstatedir@%$localstatedir%g | |
9241 | s%@libdir@%$libdir%g | |
9242 | s%@includedir@%$includedir%g | |
9243 | s%@oldincludedir@%$oldincludedir%g | |
9244 | s%@infodir@%$infodir%g | |
9245 | s%@mandir@%$mandir%g | |
9246 | s%@host@%$host%g | |
9247 | s%@host_alias@%$host_alias%g | |
9248 | s%@host_cpu@%$host_cpu%g | |
9249 | s%@host_vendor@%$host_vendor%g | |
9250 | s%@host_os@%$host_os%g | |
9251 | s%@target@%$target%g | |
9252 | s%@target_alias@%$target_alias%g | |
9253 | s%@target_cpu@%$target_cpu%g | |
9254 | s%@target_vendor@%$target_vendor%g | |
9255 | s%@target_os@%$target_os%g | |
9256 | s%@build@%$build%g | |
9257 | s%@build_alias@%$build_alias%g | |
9258 | s%@build_cpu@%$build_cpu%g | |
9259 | s%@build_vendor@%$build_vendor%g | |
9260 | s%@build_os@%$build_os%g | |
4665e56c NN |
9261 | s%@build_subdir@%$build_subdir%g |
9262 | s%@host_subdir@%$host_subdir%g | |
093e61a6 RS |
9263 | s%@target_subdir@%$target_subdir%g |
9264 | s%@CC@%$CC%g | |
9265 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
9266 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
9267 | s%@CPP@%$CPP%g | |
9268 | s%@GNATBIND@%$GNATBIND%g | |
9269 | s%@ADAC@%$ADAC%g | |
9270 | s%@strict1_warn@%$strict1_warn%g | |
9271 | s%@warn_cflags@%$warn_cflags%g | |
9272 | s%@WERROR@%$WERROR%g | |
9273 | s%@nocommon_flag@%$nocommon_flag%g | |
9274 | s%@valgrind_path@%$valgrind_path%g | |
9275 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
9276 | s%@valgrind_command@%$valgrind_command%g | |
9277 | s%@coverage_flags@%$coverage_flags%g | |
9278 | s%@enable_multilib@%$enable_multilib%g | |
9279 | s%@enable_shared@%$enable_shared%g | |
9280 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
9281 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
9282 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
9283 | s%@SET_MAKE@%$SET_MAKE%g | |
9284 | s%@AWK@%$AWK%g | |
9285 | s%@LN@%$LN%g | |
9286 | s%@LN_S@%$LN_S%g | |
9287 | s%@RANLIB@%$RANLIB%g | |
9288 | s%@INSTALL@%$INSTALL%g | |
9289 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
9290 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
9291 | s%@have_mktemp_command@%$have_mktemp_command%g | |
9292 | s%@MAKEINFO@%$MAKEINFO%g | |
9293 | s%@BUILD_INFO@%$BUILD_INFO%g | |
9294 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
9295 | s%@make_compare_target@%$make_compare_target%g | |
9296 | s%@FLEX@%$FLEX%g | |
9297 | s%@BISON@%$BISON%g | |
9298 | s%@stage1_cflags@%$stage1_cflags%g | |
9299 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
9300 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
9301 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
9302 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
9303 | s%@LIBICONV@%$LIBICONV%g | |
9304 | s%@manext@%$manext%g | |
9305 | s%@objext@%$objext%g | |
9306 | s%@extra_modes_file@%$extra_modes_file%g | |
9307 | s%@FORBUILD@%$FORBUILD%g | |
9308 | s%@PACKAGE@%$PACKAGE%g | |
9309 | s%@VERSION@%$VERSION%g | |
9310 | s%@ALLOCA@%$ALLOCA%g | |
9311 | s%@GLIBC21@%$GLIBC21%g | |
9312 | s%@USE_NLS@%$USE_NLS%g | |
9313 | s%@MSGFMT@%$MSGFMT%g | |
9314 | s%@GMSGFMT@%$GMSGFMT%g | |
9315 | s%@XGETTEXT@%$XGETTEXT%g | |
9316 | s%@INTLBISON@%$INTLBISON%g | |
9317 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
9318 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
9319 | s%@CATALOGS@%$CATALOGS%g | |
9320 | s%@CATOBJEXT@%$CATOBJEXT%g | |
9321 | s%@INTLLIBS@%$INTLLIBS%g | |
9322 | s%@INTLDEPS@%$INTLDEPS%g | |
9323 | s%@INTLOBJS@%$INTLOBJS%g | |
9324 | s%@POSUB@%$POSUB%g | |
9325 | s%@DATADIRNAME@%$DATADIRNAME%g | |
9326 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
9327 | s%@GENCAT@%$GENCAT%g | |
9328 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
9329 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g | |
9330 | s%@CROSS@%$CROSS%g | |
9331 | s%@ALL@%$ALL%g | |
9332 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
9333 | s%@inhibit_libc@%$inhibit_libc%g | |
9334 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
9335 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
9336 | s%@BUILD_CC@%$BUILD_CC%g | |
9337 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g | |
9338 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
9339 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9340 | s%@libgcc_visibility@%$libgcc_visibility%g | |
9341 | s%@gthread_flags@%$gthread_flags%g | |
9342 | s%@GGC@%$GGC%g | |
9343 | s%@zlibdir@%$zlibdir%g | |
9344 | s%@zlibinc@%$zlibinc%g | |
9345 | s%@MAINT@%$MAINT%g | |
9346 | s%@gcc_tooldir@%$gcc_tooldir%g | |
9347 | s%@dollar@%$dollar%g | |
9348 | s%@slibdir@%$slibdir%g | |
9349 | s%@objdir@%$objdir%g | |
9350 | s%@subdirs@%$subdirs%g | |
9351 | s%@srcdir@%$srcdir%g | |
9352 | s%@all_boot_languages@%$all_boot_languages%g | |
9353 | s%@all_compilers@%$all_compilers%g | |
9354 | s%@all_gtfiles@%$all_gtfiles%g | |
9355 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
9356 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
9357 | s%@all_lang_makefiles@%$all_lang_makefiles%g | |
9358 | s%@all_languages@%$all_languages%g | |
9359 | s%@all_stagestuff@%$all_stagestuff%g | |
9360 | s%@build_exeext@%$build_exeext%g | |
9361 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
9362 | s%@build_xm_file_list@%$build_xm_file_list%g | |
9363 | s%@build_xm_file@%$build_xm_file%g | |
9364 | s%@build_xm_defines@%$build_xm_defines%g | |
9365 | s%@check_languages@%$check_languages%g | |
9366 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
9367 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
9368 | s%@cpp_install_dir@%$cpp_install_dir%g | |
9369 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g | |
9370 | s%@dep_tmake_file@%$dep_tmake_file%g | |
9371 | s%@extra_headers_list@%$extra_headers_list%g | |
9372 | s%@extra_objs@%$extra_objs%g | |
9373 | s%@extra_parts@%$extra_parts%g | |
9374 | s%@extra_passes@%$extra_passes%g | |
9375 | s%@extra_programs@%$extra_programs%g | |
9376 | s%@float_h_file@%$float_h_file%g | |
9377 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
9378 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
9379 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
9380 | s%@gcc_version@%$gcc_version%g | |
9381 | s%@gcc_version_full@%$gcc_version_full%g | |
9382 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
9383 | s%@host_exeext@%$host_exeext%g | |
9384 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
9385 | s%@host_xm_file_list@%$host_xm_file_list%g | |
9386 | s%@host_xm_file@%$host_xm_file%g | |
9387 | s%@host_xm_defines@%$host_xm_defines%g | |
9388 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
9389 | s%@install@%$install%g | |
9390 | s%@lang_options_files@%$lang_options_files%g | |
9391 | s%@lang_specs_files@%$lang_specs_files%g | |
9392 | s%@lang_tree_files@%$lang_tree_files%g | |
9393 | s%@local_prefix@%$local_prefix%g | |
9394 | s%@md_file@%$md_file%g | |
9395 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
9396 | s%@out_file@%$out_file%g | |
9397 | s%@out_object_file@%$out_object_file%g | |
9398 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
9399 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
9400 | s%@symbolic_link@%$symbolic_link%g | |
9401 | s%@thread_file@%$thread_file%g | |
9402 | s%@tm_file_list@%$tm_file_list%g | |
9403 | s%@tm_file@%$tm_file%g | |
9404 | s%@tm_defines@%$tm_defines%g | |
9405 | s%@tm_p_file_list@%$tm_p_file_list%g | |
9406 | s%@tm_p_file@%$tm_p_file%g | |
9407 | s%@xm_file@%$xm_file%g | |
9408 | s%@xm_defines@%$xm_defines%g | |
9409 | s%@c_target_objs@%$c_target_objs%g | |
9410 | s%@cxx_target_objs@%$cxx_target_objs%g | |
9411 | s%@target_cpu_default@%$target_cpu_default%g | |
861bb6c1 | 9412 | /@target_overrides@/r $target_overrides |
093e61a6 | 9413 | s%@target_overrides@%%g |
861bb6c1 | 9414 | /@host_overrides@/r $host_overrides |
093e61a6 | 9415 | s%@host_overrides@%%g |
861bb6c1 | 9416 | /@language_fragments@/r $language_fragments |
093e61a6 | 9417 | s%@language_fragments@%%g |
861bb6c1 | 9418 | /@language_hooks@/r $language_hooks |
093e61a6 RS |
9419 | s%@language_hooks@%%g |
9420 | ||
861bb6c1 | 9421 | CEOF |
093e61a6 | 9422 | EOF |
861bb6c1 | 9423 | |
093e61a6 RS |
9424 | cat >> $CONFIG_STATUS <<\EOF |
9425 | ||
9426 | # Split the substitutions into bite-sized pieces for seds with | |
9427 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9428 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
9429 | ac_file=1 # Number of current file. | |
9430 | ac_beg=1 # First line for current file. | |
9431 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9432 | ac_more_lines=: | |
9433 | ac_sed_cmds="" | |
9434 | while $ac_more_lines; do | |
9435 | if test $ac_beg -gt 1; then | |
9436 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9437 | else | |
9438 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9439 | fi | |
9440 | if test ! -s conftest.s$ac_file; then | |
9441 | ac_more_lines=false | |
9442 | rm -f conftest.s$ac_file | |
9443 | else | |
9444 | if test -z "$ac_sed_cmds"; then | |
9445 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
861bb6c1 | 9446 | else |
093e61a6 | 9447 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
861bb6c1 | 9448 | fi |
093e61a6 RS |
9449 | ac_file=`expr $ac_file + 1` |
9450 | ac_beg=$ac_end | |
9451 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
861bb6c1 | 9452 | fi |
093e61a6 RS |
9453 | done |
9454 | if test -z "$ac_sed_cmds"; then | |
9455 | ac_sed_cmds=cat | |
9456 | fi | |
9457 | EOF | |
861bb6c1 | 9458 | |
093e61a6 RS |
9459 | cat >> $CONFIG_STATUS <<EOF |
9460 | ||
9461 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
9462 | EOF | |
9463 | cat >> $CONFIG_STATUS <<\EOF | |
9464 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9465 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9466 | case "$ac_file" in |
9467 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9468 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9469 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9470 | esac |
9471 | ||
093e61a6 | 9472 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
cafe096b | 9473 | |
093e61a6 RS |
9474 | # Remove last slash and all that follows it. Not all systems have dirname. |
9475 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9476 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9477 | # The file is in a subdirectory. | |
9478 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9479 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9480 | # A "../" for each directory in $ac_dir_suffix. | |
9481 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9482 | else | |
9483 | ac_dir_suffix= ac_dots= | |
9484 | fi | |
cafe096b | 9485 | |
093e61a6 RS |
9486 | case "$ac_given_srcdir" in |
9487 | .) srcdir=. | |
9488 | if test -z "$ac_dots"; then top_srcdir=. | |
9489 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9490 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 9491 | *) # Relative path. |
093e61a6 RS |
9492 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
9493 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9494 | esac | |
861bb6c1 | 9495 | |
cafe096b | 9496 | |
093e61a6 RS |
9497 | echo creating "$ac_file" |
9498 | rm -f "$ac_file" | |
9499 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9500 | case "$ac_file" in | |
9501 | *Makefile*) ac_comsub="1i\\ | |
9502 | # $configure_input" ;; | |
9503 | *) ac_comsub= ;; | |
9504 | esac | |
cafe096b | 9505 | |
093e61a6 RS |
9506 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
9507 | sed -e "$ac_comsub | |
9508 | s%@configure_input@%$configure_input%g | |
9509 | s%@srcdir@%$srcdir%g | |
9510 | s%@top_srcdir@%$top_srcdir%g | |
9511 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9512 | fi; done | |
9513 | rm -f conftest.s* | |
861bb6c1 JL |
9514 | |
9515 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9516 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9517 | # | |
9518 | # ac_d sets the value in "#define NAME VALUE" lines. | |
093e61a6 RS |
9519 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9520 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9521 | ac_dC='\3' | |
9522 | ac_dD='%g' | |
9523 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9524 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9525 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 9526 | ac_uC=' ' |
093e61a6 RS |
9527 | ac_uD='\4%g' |
9528 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9529 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9530 | ac_eB='$%\1#\2define\3' | |
9531 | ac_eC=' ' | |
9532 | ac_eD='%g' | |
9533 | ||
9534 | if test "${CONFIG_HEADERS+set}" != set; then | |
9535 | EOF | |
9536 | cat >> $CONFIG_STATUS <<EOF | |
9537 | CONFIG_HEADERS="auto-host.h:config.in" | |
9538 | EOF | |
9539 | cat >> $CONFIG_STATUS <<\EOF | |
9540 | fi | |
9541 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9542 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9543 | case "$ac_file" in |
9544 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9545 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9546 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9547 | esac |
9548 | ||
093e61a6 RS |
9549 | echo creating $ac_file |
9550 | ||
9551 | rm -f conftest.frag conftest.in conftest.out | |
9552 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9553 | cat $ac_file_inputs > conftest.in | |
9554 | ||
9555 | EOF | |
9556 | ||
9557 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9558 | # the proper values into config.h.in to produce config.h. And first: | |
9559 | # Protect against being on the right side of a sed subst in config.status. | |
9560 | # Protect against being in an unquoted here document in config.status. | |
9561 | rm -f conftest.vals | |
9562 | cat > conftest.hdr <<\EOF | |
9563 | s/[\\&%]/\\&/g | |
9564 | s%[\\$`]%\\&%g | |
9565 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9566 | s%ac_d%ac_u%gp | |
9567 | s%ac_u%ac_e%gp | |
9568 | EOF | |
9569 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9570 | rm -f conftest.hdr | |
861bb6c1 JL |
9571 | |
9572 | # This sed command replaces #undef with comments. This is necessary, for | |
9573 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9574 | # on some systems where configure will not decide to define it. | |
093e61a6 RS |
9575 | cat >> conftest.vals <<\EOF |
9576 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9577 | EOF | |
9578 | ||
9579 | # Break up conftest.vals because some shells have a limit on | |
9580 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
9581 | |
9582 | rm -f conftest.tail | |
093e61a6 | 9583 | while : |
861bb6c1 | 9584 | do |
093e61a6 RS |
9585 | ac_lines=`grep -c . conftest.vals` |
9586 | # grep -c gives empty output for an empty file on some AIX systems. | |
9587 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9588 | # Write a limited-size here document to conftest.frag. | |
9589 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9590 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 9591 | echo 'CEOF |
093e61a6 RS |
9592 | sed -f conftest.frag conftest.in > conftest.out |
9593 | rm -f conftest.in | |
9594 | mv conftest.out conftest.in | |
9595 | ' >> $CONFIG_STATUS | |
9596 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9597 | rm -f conftest.vals | |
9598 | mv conftest.tail conftest.vals | |
861bb6c1 | 9599 | done |
093e61a6 RS |
9600 | rm -f conftest.vals |
9601 | ||
9602 | cat >> $CONFIG_STATUS <<\EOF | |
9603 | rm -f conftest.frag conftest.h | |
9604 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9605 | cat conftest.in >> conftest.h | |
9606 | rm -f conftest.in | |
9607 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9608 | echo "$ac_file is unchanged" | |
9609 | rm -f conftest.h | |
cafe096b | 9610 | else |
093e61a6 RS |
9611 | # Remove last slash and all that follows it. Not all systems have dirname. |
9612 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9613 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9614 | # The file is in a subdirectory. | |
9615 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 9616 | fi |
093e61a6 RS |
9617 | rm -f $ac_file |
9618 | mv conftest.h $ac_file | |
cafe096b | 9619 | fi |
093e61a6 | 9620 | fi; done |
861bb6c1 | 9621 | |
093e61a6 RS |
9622 | EOF |
9623 | cat >> $CONFIG_STATUS <<EOF | |
9624 | ||
9625 | subdirs='$subdirs' | |
9626 | symbolic_link='$symbolic_link' | |
9627 | ||
9628 | EOF | |
9629 | cat >> $CONFIG_STATUS <<\EOF | |
9630 | for ac_file in $CONFIG_FILES; do | |
71a94577 ZW |
9631 | # Support "outfile[:infile[:infile...]]" |
9632 | case "$ac_file" in | |
9633 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9634 | esac | |
9635 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
9636 | case "$ac_file" in */Makefile.in) | |
9637 | # Adjust a relative srcdir. | |
9638 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
9639 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
9640 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
9641 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
9642 | # In autoconf-2.50 it is called $srcdir. | |
9643 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
9644 | case "$ac_given_srcdir" in | |
9645 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
9646 | /*) top_srcdir="$ac_given_srcdir" ;; | |
9647 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9648 | esac | |
9649 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
9650 | rm -f "$ac_dir/POTFILES" | |
9651 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
9652 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
9653 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
9654 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
9655 | fi | |
9656 | ;; | |
9657 | esac | |
093e61a6 RS |
9658 | done |
9659 | ||
861bb6c1 | 9660 | case x$CONFIG_HEADERS in |
b7cb92ad | 9661 | xauto-host.h:config.in) |
861bb6c1 JL |
9662 | echo > cstamp-h ;; |
9663 | esac | |
93cf819d BK |
9664 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
9665 | # bootstrapping and the installation procedure can still use | |
9666 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
9667 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
9668 | # This is virtually a duplicate of what happens in configure.lang; we do | |
9669 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 9670 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 9671 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 9672 | if test $d != ..; then |
1e6347d8 | 9673 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 9674 | cd $d |
6a1b7268 | 9675 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
9676 | do |
9677 | rm -f $t | |
9678 | $symbolic_link ../$t $t 2>/dev/null | |
9679 | done | |
9680 | cd $STARTDIR | |
93cf819d BK |
9681 | fi |
9682 | done | |
9683 | else true ; fi | |
ab87f8c8 JL |
9684 | # Avoid having to add intl to our include paths. |
9685 | if test -f intl/libintl.h; then | |
9686 | echo creating libintl.h | |
9687 | echo '#include "intl/libintl.h"' >libintl.h | |
9688 | fi | |
cafe096b | 9689 | |
093e61a6 RS |
9690 | exit 0 |
9691 | EOF | |
861bb6c1 | 9692 | chmod +x $CONFIG_STATUS |
093e61a6 RS |
9693 | rm -fr confdefs* $ac_clean_files |
9694 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 9695 |