]>
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 | |
093e61a6 RS |
730 | # Define variables host_canonical and build_canonical |
731 | build_canonical=${build} | |
732 | host_canonical=${host} | |
73458fb7 NN |
733 | |
734 | ||
093e61a6 RS |
735 | |
736 | target_subdir= | |
737 | if test "${host}" != "${target}" ; then | |
738 | target_subdir=${target_alias}/ | |
73458fb7 NN |
739 | fi |
740 | ||
093e61a6 RS |
741 | |
742 | # Set program_transform_name | |
743 | if test "$program_transform_name" = s,x,x,; then | |
744 | program_transform_name= | |
13c22933 | 745 | else |
093e61a6 RS |
746 | # Double any \ or $. echo might interpret backslashes. |
747 | cat <<\EOF_SED > conftestsed | |
748 | s,\\,\\\\,g; s,\$,$$,g | |
749 | EOF_SED | |
750 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
751 | rm -f conftestsed | |
cafe096b | 752 | fi |
13c22933 | 753 | test "$program_prefix" != NONE && |
093e61a6 | 754 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
755 | # Use a double $ so make ignores it. |
756 | test "$program_suffix" != NONE && | |
093e61a6 RS |
757 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
758 | ||
759 | # sed with no file args requires a program. | |
760 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
761 | |
762 | ||
34a86c2b NN |
763 | # Check for bogus environment variables. |
764 | # Test if LIBRARY_PATH contains the notation for the current directory | |
765 | # since this would lead to problems installing/building glibc. | |
766 | # LIBRARY_PATH contains the current directory if one of the following | |
767 | # is true: | |
768 | # - one of the terminals (":" and ";") is the first or last sign | |
769 | # - two terminals occur directly after each other | |
770 | # - the path contains an element with a dot in it | |
093e61a6 | 771 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
96ef4bdc | 772 | echo "configure:773: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
773 | case ${LIBRARY_PATH} in |
774 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
775 | library_path_setting="contains current directory" | |
776 | ;; | |
777 | *) | |
778 | library_path_setting="ok" | |
779 | ;; | |
780 | esac | |
093e61a6 | 781 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 782 | if test "$library_path_setting" != "ok"; then |
093e61a6 | 783 | { echo "configure: error: |
34a86c2b NN |
784 | *** LIBRARY_PATH shouldn't contain the current directory when |
785 | *** building gcc. Please change the environment variable | |
093e61a6 | 786 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
787 | fi |
788 | ||
34a86c2b NN |
789 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
790 | # since this would lead to problems installing/building glibc. | |
791 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
792 | # is true: | |
793 | # - one of the terminals (":" and ";") is the first or last sign | |
794 | # - two terminals occur directly after each other | |
795 | # - the path contains an element with a dot in it | |
093e61a6 | 796 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
96ef4bdc | 797 | echo "configure:798: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
798 | case ${GCC_EXEC_PREFIX} in |
799 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
800 | gcc_exec_prefix_setting="contains current directory" | |
801 | ;; | |
802 | *) | |
803 | gcc_exec_prefix_setting="ok" | |
804 | ;; | |
805 | esac | |
093e61a6 | 806 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 807 | if test "$gcc_exec_prefix_setting" != "ok"; then |
093e61a6 | 808 | { echo "configure: error: |
cafe096b EC |
809 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
810 | *** building gcc. Please change the environment variable | |
093e61a6 | 811 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
812 | fi |
813 | ||
814 | # ----------- | |
815 | # Directories | |
816 | # ----------- | |
817 | ||
818 | # Specify the local prefix | |
819 | local_prefix= | |
820 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
821 | if test "${with_local_prefix+set}" = set; then | |
822 | withval="$with_local_prefix" | |
823 | case "${withval}" in | |
093e61a6 | 824 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
825 | no) ;; |
826 | *) local_prefix=$with_local_prefix ;; | |
827 | esac | |
093e61a6 RS |
828 | fi |
829 | ||
34a86c2b NN |
830 | |
831 | # Default local prefix if it is empty | |
832 | if test x$local_prefix = x; then | |
833 | local_prefix=/usr/local | |
834 | fi | |
835 | ||
836 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
837 | # passed in by the toplevel make and thus we'd get different behavior | |
838 | # depending on where we built the sources. | |
839 | gcc_gxx_include_dir= | |
840 | # Specify the g++ header file directory | |
841 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
842 | if test "${with_gxx_include_dir+set}" = set; then | |
843 | withval="$with_gxx_include_dir" | |
844 | case "${withval}" in | |
093e61a6 | 845 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
846 | no) ;; |
847 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
848 | esac | |
093e61a6 RS |
849 | fi |
850 | ||
34a86c2b NN |
851 | |
852 | if test x${gcc_gxx_include_dir} = x; then | |
853 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
854 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
855 | else | |
856 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
857 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
858 | fi | |
859 | fi | |
860 | ||
861 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
862 | if test "${with_cpp_install_dir+set}" = set; then | |
863 | withval="$with_cpp_install_dir" | |
864 | if test x$withval = xyes; then | |
093e61a6 | 865 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
866 | elif test x$withval != xno; then |
867 | cpp_install_dir=$withval | |
868 | fi | |
093e61a6 RS |
869 | fi |
870 | ||
34a86c2b NN |
871 | |
872 | # ------------------- | |
873 | # Find default linker | |
874 | # ------------------- | |
875 | ||
876 | # With GNU ld | |
877 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
878 | if test "${with_gnu_ld+set}" = set; then | |
879 | withval="$with_gnu_ld" | |
880 | gnu_ld_flag="$with_gnu_ld" | |
881 | else | |
882 | gnu_ld_flag=no | |
093e61a6 | 883 | fi |
34a86c2b | 884 | |
cafe096b | 885 | |
093e61a6 | 886 | # With pre-defined ld |
34a86c2b NN |
887 | # Check whether --with-ld or --without-ld was given. |
888 | if test "${with_ld+set}" = set; then | |
889 | withval="$with_ld" | |
890 | DEFAULT_LINKER="$with_ld" | |
093e61a6 RS |
891 | fi |
892 | ||
34a86c2b NN |
893 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
894 | if test ! -x "$DEFAULT_LINKER"; then | |
093e61a6 | 895 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
896 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
897 | gnu_ld_flag=yes | |
898 | fi | |
093e61a6 | 899 | cat >> confdefs.h <<EOF |
34a86c2b | 900 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
093e61a6 | 901 | EOF |
34a86c2b NN |
902 | |
903 | fi | |
904 | ||
093e61a6 | 905 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
96ef4bdc | 906 | echo "configure:907: checking whether a default linker was specified" >&5 |
34a86c2b NN |
907 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
908 | if test x"$gnu_ld_flag" = x"no"; then | |
093e61a6 | 909 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 910 | else |
093e61a6 | 911 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
912 | fi |
913 | else | |
093e61a6 | 914 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
915 | fi |
916 | ||
917 | # ---------------------- | |
918 | # Find default assembler | |
919 | # ---------------------- | |
920 | ||
921 | # With GNU as | |
922 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
923 | if test "${with_gnu_as+set}" = set; then | |
924 | withval="$with_gnu_as" | |
925 | gas_flag="$with_gnu_as" | |
926 | else | |
927 | gas_flag=no | |
093e61a6 | 928 | fi |
34a86c2b NN |
929 | |
930 | ||
931 | # Check whether --with-as or --without-as was given. | |
932 | if test "${with_as+set}" = set; then | |
933 | withval="$with_as" | |
934 | DEFAULT_ASSEMBLER="$with_as" | |
093e61a6 RS |
935 | fi |
936 | ||
34a86c2b NN |
937 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
938 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
093e61a6 | 939 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
940 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
941 | gas_flag=yes | |
942 | fi | |
093e61a6 | 943 | cat >> confdefs.h <<EOF |
34a86c2b | 944 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
093e61a6 | 945 | EOF |
34a86c2b NN |
946 | |
947 | fi | |
948 | ||
093e61a6 | 949 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
96ef4bdc | 950 | echo "configure:951: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
951 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
952 | if test x"$gas_flag" = x"no"; then | |
093e61a6 | 953 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 954 | else |
093e61a6 | 955 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
956 | fi |
957 | else | |
093e61a6 | 958 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
959 | fi |
960 | ||
961 | # --------------- | |
962 | # Find C compiler | |
963 | # --------------- | |
964 | ||
965 | # Find the native compiler | |
093e61a6 | 966 | # Extract the first word of "gcc", so it can be a program name with args. |
34a86c2b | 967 | set dummy gcc; ac_word=$2 |
093e61a6 | 968 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
96ef4bdc | 969 | echo "configure:970: checking for $ac_word" >&5 |
093e61a6 RS |
970 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
971 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
972 | else |
973 | if test -n "$CC"; then | |
974 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
975 | else | |
093e61a6 RS |
976 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
977 | ac_dummy="$PATH" | |
978 | for ac_dir in $ac_dummy; do | |
979 | test -z "$ac_dir" && ac_dir=. | |
980 | if test -f $ac_dir/$ac_word; then | |
981 | ac_cv_prog_CC="gcc" | |
982 | break | |
983 | fi | |
984 | done | |
985 | IFS="$ac_save_ifs" | |
34a86c2b NN |
986 | fi |
987 | fi | |
093e61a6 | 988 | CC="$ac_cv_prog_CC" |
34a86c2b | 989 | if test -n "$CC"; then |
093e61a6 | 990 | echo "$ac_t""$CC" 1>&6 |
cafe096b | 991 | else |
093e61a6 | 992 | echo "$ac_t""no" 1>&6 |
cafe096b | 993 | fi |
cafe096b | 994 | |
34a86c2b NN |
995 | if test -z "$CC"; then |
996 | # Extract the first word of "cc", so it can be a program name with args. | |
997 | set dummy cc; ac_word=$2 | |
093e61a6 | 998 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
96ef4bdc | 999 | echo "configure:1000: checking for $ac_word" >&5 |
093e61a6 RS |
1000 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1001 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 JL |
1002 | else |
1003 | if test -n "$CC"; then | |
1004 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1005 | else | |
093e61a6 | 1006 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1007 | ac_prog_rejected=no |
093e61a6 RS |
1008 | ac_dummy="$PATH" |
1009 | for ac_dir in $ac_dummy; do | |
1010 | test -z "$ac_dir" && ac_dir=. | |
1011 | if test -f $ac_dir/$ac_word; then | |
1012 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1013 | ac_prog_rejected=yes | |
1014 | continue | |
1015 | fi | |
1016 | ac_cv_prog_CC="cc" | |
1017 | break | |
1018 | fi | |
1019 | done | |
1020 | IFS="$ac_save_ifs" | |
e9a25f70 JL |
1021 | if test $ac_prog_rejected = yes; then |
1022 | # We found a bogon in the path, so make sure we never use it. | |
1023 | set dummy $ac_cv_prog_CC | |
1024 | shift | |
093e61a6 | 1025 | if test $# -gt 0; then |
e9a25f70 JL |
1026 | # We chose a different compiler from the bogus one. |
1027 | # However, it has the same basename, so the bogon will be chosen | |
1028 | # first if we set CC to just the basename; use the full file name. | |
1029 | shift | |
093e61a6 RS |
1030 | set dummy "$ac_dir/$ac_word" "$@" |
1031 | shift | |
1032 | ac_cv_prog_CC="$@" | |
e9a25f70 JL |
1033 | fi |
1034 | fi | |
1035 | fi | |
1036 | fi | |
093e61a6 | 1037 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1038 | if test -n "$CC"; then |
093e61a6 | 1039 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1040 | else |
093e61a6 | 1041 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
1042 | fi |
1043 | ||
093e61a6 RS |
1044 | if test -z "$CC"; then |
1045 | case "`uname -s`" in | |
1046 | *win32* | *WIN32*) | |
1047 | # Extract the first word of "cl", so it can be a program name with args. | |
1048 | set dummy cl; ac_word=$2 | |
1049 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
96ef4bdc | 1050 | echo "configure:1051: checking for $ac_word" >&5 |
093e61a6 RS |
1051 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1052 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
1053 | else |
1054 | if test -n "$CC"; then | |
1055 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1056 | else | |
093e61a6 RS |
1057 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1058 | ac_dummy="$PATH" | |
1059 | for ac_dir in $ac_dummy; do | |
1060 | test -z "$ac_dir" && ac_dir=. | |
1061 | if test -f $ac_dir/$ac_word; then | |
1062 | ac_cv_prog_CC="cl" | |
1063 | break | |
1064 | fi | |
1065 | done | |
1066 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1067 | fi |
1068 | fi | |
093e61a6 | 1069 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1070 | if test -n "$CC"; then |
093e61a6 | 1071 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1072 | else |
093e61a6 | 1073 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1074 | fi |
093e61a6 RS |
1075 | ;; |
1076 | esac | |
cafe096b | 1077 | fi |
093e61a6 | 1078 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
cafe096b | 1079 | fi |
e9a25f70 | 1080 | |
093e61a6 | 1081 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
96ef4bdc | 1082 | echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 | 1083 | |
093e61a6 RS |
1084 | ac_ext=c |
1085 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1086 | ac_cpp='$CPP $CPPFLAGS' | |
1087 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1088 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1089 | cross_compiling=$ac_cv_prog_cc_cross | |
b27d2bd5 | 1090 | |
093e61a6 | 1091 | cat > conftest.$ac_ext << EOF |
b27d2bd5 | 1092 | |
96ef4bdc | 1093 | #line 1094 "configure" |
093e61a6 RS |
1094 | #include "confdefs.h" |
1095 | ||
1096 | main(){return(0);} | |
1097 | EOF | |
96ef4bdc | 1098 | if { (eval echo configure:1099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
1099 | ac_cv_prog_cc_works=yes |
1100 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1101 | if (./conftest; exit) 2>/dev/null; then | |
1102 | ac_cv_prog_cc_cross=no | |
e9a25f70 | 1103 | else |
093e61a6 | 1104 | ac_cv_prog_cc_cross=yes |
e9a25f70 | 1105 | fi |
e9a25f70 | 1106 | else |
093e61a6 RS |
1107 | echo "configure: failed program was:" >&5 |
1108 | cat conftest.$ac_ext >&5 | |
1109 | ac_cv_prog_cc_works=no | |
e9a25f70 | 1110 | fi |
093e61a6 RS |
1111 | rm -fr conftest* |
1112 | ac_ext=c | |
1113 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1114 | ac_cpp='$CPP $CPPFLAGS' | |
1115 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1116 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1117 | cross_compiling=$ac_cv_prog_cc_cross | |
cafe096b | 1118 | |
093e61a6 RS |
1119 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
1120 | if test $ac_cv_prog_cc_works = no; then | |
1121 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
e9a25f70 | 1122 | fi |
093e61a6 | 1123 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
96ef4bdc | 1124 | echo "configure:1125: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
093e61a6 RS |
1125 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1126 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 | 1127 | |
093e61a6 | 1128 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
96ef4bdc | 1129 | echo "configure:1130: checking whether we are using GNU C" >&5 |
093e61a6 RS |
1130 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1131 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1132 | else | |
1133 | cat > conftest.c <<EOF | |
1134 | #ifdef __GNUC__ | |
1135 | yes; | |
cafe096b | 1136 | #endif |
093e61a6 | 1137 | EOF |
96ef4bdc | 1138 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
093e61a6 RS |
1139 | ac_cv_prog_gcc=yes |
1140 | else | |
1141 | ac_cv_prog_gcc=no | |
1142 | fi | |
1143 | fi | |
e9a25f70 | 1144 | |
093e61a6 | 1145 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
cd9e5e7c | 1146 | |
093e61a6 RS |
1147 | if test $ac_cv_prog_gcc = yes; then |
1148 | GCC=yes | |
1149 | else | |
1150 | GCC= | |
1151 | fi | |
cafe096b | 1152 | |
093e61a6 RS |
1153 | ac_test_CFLAGS="${CFLAGS+set}" |
1154 | ac_save_CFLAGS="$CFLAGS" | |
1155 | CFLAGS= | |
1156 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
96ef4bdc | 1157 | echo "configure:1158: checking whether ${CC-cc} accepts -g" >&5 |
093e61a6 RS |
1158 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1159 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1160 | else | |
1161 | echo 'void f(){}' > conftest.c | |
1162 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
e9a25f70 JL |
1163 | ac_cv_prog_cc_g=yes |
1164 | else | |
093e61a6 | 1165 | ac_cv_prog_cc_g=no |
e9a25f70 | 1166 | fi |
093e61a6 RS |
1167 | rm -f conftest* |
1168 | ||
cafe096b | 1169 | fi |
093e61a6 RS |
1170 | |
1171 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1172 | if test "$ac_test_CFLAGS" = set; then |
093e61a6 | 1173 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1174 | elif test $ac_cv_prog_cc_g = yes; then |
1175 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1176 | CFLAGS="-g -O2" |
1177 | else | |
cd9e5e7c | 1178 | CFLAGS="-g" |
81814e35 | 1179 | fi |
3723cad9 | 1180 | else |
cd9e5e7c MK |
1181 | if test "$GCC" = yes; then |
1182 | CFLAGS="-O2" | |
1183 | else | |
1184 | CFLAGS= | |
1185 | fi | |
e9a25f70 JL |
1186 | fi |
1187 | ||
3ec83fc2 | 1188 | if test "x$CC" != xcc; then |
093e61a6 | 1189 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 |
96ef4bdc | 1190 | echo "configure:1191: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1191 | else |
093e61a6 | 1192 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
96ef4bdc | 1193 | echo "configure:1194: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 | 1194 | fi |
093e61a6 RS |
1195 | set dummy $CC; ac_cc="`echo $2 | |
1196 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1197 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1198 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1199 | else |
093e61a6 | 1200 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1201 | # Make sure it works both with $CC and with simple cc. |
1202 | # We do the test twice because some compilers refuse to overwrite an | |
1203 | # existing .o file with -o, though they will create one. | |
093e61a6 | 1204 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
96ef4bdc MM |
1205 | if { (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1206 | test -f conftest.o && { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1207 | then |
1208 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1209 | if test "x$CC" != xcc; then | |
1210 | # Test first that cc exists at all. | |
96ef4bdc | 1211 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
093e61a6 | 1212 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
96ef4bdc MM |
1213 | if { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1214 | test -f conftest.o && { (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1215 | then |
1216 | # cc works too. | |
1217 | : | |
1218 | else | |
1219 | # cc exists but doesn't like -o. | |
1220 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1221 | fi | |
1222 | fi | |
1223 | fi | |
1224 | else | |
1225 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1226 | fi | |
1227 | rm -f conftest* | |
1228 | ||
1229 | fi | |
1230 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
093e61a6 | 1231 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1232 | else |
093e61a6 RS |
1233 | echo "$ac_t""no" 1>&6 |
1234 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1235 | #define NO_MINUS_C_MINUS_O 1 |
093e61a6 | 1236 | EOF |
3ec83fc2 RH |
1237 | |
1238 | fi | |
1239 | ||
414d23ae HPN |
1240 | # autoconf is lame and doesn't give us any substitution variable for this. |
1241 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1242 | NO_MINUS_C_MINUS_O=yes | |
1243 | else | |
1244 | OUTPUT_OPTION='-o $@' | |
1245 | fi | |
1246 | ||
1247 | ||
1248 | ||
73458fb7 NN |
1249 | # ------------------------- |
1250 | # Check C compiler features | |
1251 | # ------------------------- | |
1252 | ||
093e61a6 | 1253 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
96ef4bdc | 1254 | echo "configure:1255: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1255 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1256 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1257 | else |
1258 | save_CFLAGS="$CFLAGS" | |
1259 | CFLAGS="-Wno-long-long" | |
093e61a6 | 1260 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1261 | #line 1262 "configure" |
093e61a6 | 1262 | #include "confdefs.h" |
75e93faa | 1263 | |
093e61a6 | 1264 | int main() { |
75e93faa | 1265 | |
093e61a6 RS |
1266 | ; return 0; } |
1267 | EOF | |
96ef4bdc | 1268 | if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1269 | rm -rf conftest* |
34a86c2b | 1270 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1271 | else |
093e61a6 RS |
1272 | echo "configure: failed program was:" >&5 |
1273 | cat conftest.$ac_ext >&5 | |
1274 | rm -rf conftest* | |
1275 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1276 | fi |
093e61a6 | 1277 | rm -f conftest* |
34a86c2b | 1278 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1279 | fi |
1280 | ||
093e61a6 RS |
1281 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1282 | ||
1283 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
96ef4bdc | 1284 | echo "configure:1285: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1285 | # On Suns, sometimes $CPP names a directory. |
1286 | if test -n "$CPP" && test -d "$CPP"; then | |
1287 | CPP= | |
1288 | fi | |
1289 | if test -z "$CPP"; then | |
093e61a6 RS |
1290 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1291 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1292 | else |
093e61a6 RS |
1293 | # This must be in double quotes, not single quotes, because CPP may get |
1294 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1295 | CPP="${CC-cc} -E" | |
84c041a1 | 1296 | # On the NeXT, cc -E runs the code through the compiler's parser, |
093e61a6 RS |
1297 | # not just through cpp. |
1298 | cat > conftest.$ac_ext <<EOF | |
96ef4bdc | 1299 | #line 1300 "configure" |
093e61a6 RS |
1300 | #include "confdefs.h" |
1301 | #include <assert.h> | |
1302 | Syntax Error | |
1303 | EOF | |
1304 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
96ef4bdc | 1305 | { (eval echo configure:1306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1306 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1307 | if test -z "$ac_err"; then | |
84c041a1 ZW |
1308 | : |
1309 | else | |
093e61a6 RS |
1310 | echo "$ac_err" >&5 |
1311 | echo "configure: failed program was:" >&5 | |
1312 | cat conftest.$ac_ext >&5 | |
1313 | rm -rf conftest* | |
1314 | CPP="${CC-cc} -E -traditional-cpp" | |
1315 | cat > conftest.$ac_ext <<EOF | |
96ef4bdc | 1316 | #line 1317 "configure" |
093e61a6 RS |
1317 | #include "confdefs.h" |
1318 | #include <assert.h> | |
1319 | Syntax Error | |
1320 | EOF | |
1321 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
96ef4bdc | 1322 | { (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1323 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1324 | if test -z "$ac_err"; then | |
1325 | : | |
cafe096b | 1326 | else |
093e61a6 RS |
1327 | echo "$ac_err" >&5 |
1328 | echo "configure: failed program was:" >&5 | |
1329 | cat conftest.$ac_ext >&5 | |
1330 | rm -rf conftest* | |
1331 | CPP="${CC-cc} -nologo -E" | |
1332 | cat > conftest.$ac_ext <<EOF | |
96ef4bdc | 1333 | #line 1334 "configure" |
093e61a6 RS |
1334 | #include "confdefs.h" |
1335 | #include <assert.h> | |
1336 | Syntax Error | |
1337 | EOF | |
1338 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
96ef4bdc | 1339 | { (eval echo configure:1340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1340 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1341 | if test -z "$ac_err"; then | |
1342 | : | |
cafe096b | 1343 | else |
093e61a6 RS |
1344 | echo "$ac_err" >&5 |
1345 | echo "configure: failed program was:" >&5 | |
1346 | cat conftest.$ac_ext >&5 | |
1347 | rm -rf conftest* | |
1348 | CPP=/lib/cpp | |
cafe096b | 1349 | fi |
093e61a6 | 1350 | rm -f conftest* |
cafe096b | 1351 | fi |
093e61a6 | 1352 | rm -f conftest* |
cafe096b | 1353 | fi |
093e61a6 RS |
1354 | rm -f conftest* |
1355 | ac_cv_prog_CPP="$CPP" | |
414d23ae | 1356 | fi |
093e61a6 | 1357 | CPP="$ac_cv_prog_CPP" |
414d23ae | 1358 | else |
093e61a6 | 1359 | ac_cv_prog_CPP="$CPP" |
414d23ae | 1360 | fi |
093e61a6 | 1361 | echo "$ac_t""$CPP" 1>&6 |
414d23ae | 1362 | |
093e61a6 | 1363 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
96ef4bdc | 1364 | echo "configure:1365: checking for inline" >&5 |
093e61a6 RS |
1365 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1366 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1367 | else |
1368 | ac_cv_c_inline=no | |
1369 | for ac_kw in inline __inline__ __inline; do | |
093e61a6 | 1370 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1371 | #line 1372 "configure" |
093e61a6 | 1372 | #include "confdefs.h" |
414d23ae | 1373 | |
093e61a6 RS |
1374 | int main() { |
1375 | } $ac_kw foo() { | |
1376 | ; return 0; } | |
1377 | EOF | |
96ef4bdc | 1378 | if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1379 | rm -rf conftest* |
414d23ae HPN |
1380 | ac_cv_c_inline=$ac_kw; break |
1381 | else | |
093e61a6 RS |
1382 | echo "configure: failed program was:" >&5 |
1383 | cat conftest.$ac_ext >&5 | |
414d23ae | 1384 | fi |
093e61a6 | 1385 | rm -f conftest* |
414d23ae HPN |
1386 | done |
1387 | ||
1388 | fi | |
093e61a6 RS |
1389 | |
1390 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1391 | case "$ac_cv_c_inline" in | |
414d23ae | 1392 | inline | yes) ;; |
093e61a6 RS |
1393 | no) cat >> confdefs.h <<\EOF |
1394 | #define inline | |
1395 | EOF | |
414d23ae | 1396 | ;; |
093e61a6 | 1397 | *) cat >> confdefs.h <<EOF |
414d23ae | 1398 | #define inline $ac_cv_c_inline |
093e61a6 | 1399 | EOF |
414d23ae HPN |
1400 | ;; |
1401 | esac | |
1402 | ||
093e61a6 | 1403 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 |
96ef4bdc | 1404 | echo "configure:1405: checking for volatile" >&5 |
093e61a6 RS |
1405 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1407 | else |
093e61a6 | 1408 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1409 | #line 1410 "configure" |
093e61a6 | 1410 | #include "confdefs.h" |
414d23ae | 1411 | |
093e61a6 | 1412 | int main() { |
414d23ae | 1413 | volatile int foo; |
093e61a6 RS |
1414 | ; return 0; } |
1415 | EOF | |
96ef4bdc | 1416 | if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1417 | rm -rf conftest* |
414d23ae HPN |
1418 | gcc_cv_c_volatile=yes |
1419 | else | |
093e61a6 RS |
1420 | echo "configure: failed program was:" >&5 |
1421 | cat conftest.$ac_ext >&5 | |
1422 | rm -rf conftest* | |
1423 | gcc_cv_c_volatile=no | |
414d23ae | 1424 | fi |
093e61a6 | 1425 | rm -f conftest* |
414d23ae | 1426 | fi |
cafe096b | 1427 | |
093e61a6 RS |
1428 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 |
1429 | if test $gcc_cv_c_volatile = yes ; then | |
1430 | cat >> confdefs.h <<\EOF | |
414d23ae | 1431 | #define HAVE_VOLATILE 1 |
093e61a6 | 1432 | EOF |
414d23ae HPN |
1433 | |
1434 | fi | |
1435 | ||
1436 | ||
093e61a6 | 1437 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
96ef4bdc | 1438 | echo "configure:1439: checking for long double" >&5 |
093e61a6 RS |
1439 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1440 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1441 | else |
1442 | if test "$GCC" = yes; then | |
1443 | gcc_cv_c_long_double=yes | |
1444 | else | |
093e61a6 | 1445 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1446 | #line 1447 "configure" |
093e61a6 | 1447 | #include "confdefs.h" |
414d23ae | 1448 | |
093e61a6 | 1449 | int main() { |
414d23ae HPN |
1450 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ |
1451 | long double foo = 0.0; | |
1452 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1453 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
093e61a6 RS |
1454 | ; return 0; } |
1455 | EOF | |
96ef4bdc | 1456 | if { (eval echo configure:1457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1457 | rm -rf conftest* |
414d23ae HPN |
1458 | gcc_cv_c_long_double=yes |
1459 | else | |
093e61a6 RS |
1460 | echo "configure: failed program was:" >&5 |
1461 | cat conftest.$ac_ext >&5 | |
1462 | rm -rf conftest* | |
1463 | gcc_cv_c_long_double=no | |
414d23ae | 1464 | fi |
093e61a6 | 1465 | rm -f conftest* |
414d23ae HPN |
1466 | fi |
1467 | fi | |
cafe096b | 1468 | |
093e61a6 RS |
1469 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 |
1470 | if test $gcc_cv_c_long_double = yes; then | |
1471 | cat >> confdefs.h <<\EOF | |
414d23ae | 1472 | #define HAVE_LONG_DOUBLE 1 |
093e61a6 | 1473 | EOF |
414d23ae HPN |
1474 | |
1475 | fi | |
1476 | ||
093e61a6 | 1477 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
96ef4bdc | 1478 | echo "configure:1479: checking for long long int" >&5 |
093e61a6 RS |
1479 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1480 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1481 | else |
093e61a6 | 1482 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1483 | #line 1484 "configure" |
093e61a6 | 1484 | #include "confdefs.h" |
414d23ae | 1485 | |
093e61a6 | 1486 | int main() { |
414d23ae | 1487 | long long int i; |
093e61a6 RS |
1488 | ; return 0; } |
1489 | EOF | |
96ef4bdc | 1490 | if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1491 | rm -rf conftest* |
414d23ae HPN |
1492 | ac_cv_c_long_long=yes |
1493 | else | |
093e61a6 RS |
1494 | echo "configure: failed program was:" >&5 |
1495 | cat conftest.$ac_ext >&5 | |
1496 | rm -rf conftest* | |
1497 | ac_cv_c_long_long=no | |
414d23ae | 1498 | fi |
093e61a6 | 1499 | rm -f conftest* |
414d23ae | 1500 | fi |
cafe096b | 1501 | |
093e61a6 RS |
1502 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1503 | if test $ac_cv_c_long_long = yes; then | |
1504 | cat >> confdefs.h <<\EOF | |
414d23ae | 1505 | #define HAVE_LONG_LONG 1 |
093e61a6 | 1506 | EOF |
414d23ae HPN |
1507 | |
1508 | fi | |
093e61a6 | 1509 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
96ef4bdc | 1510 | echo "configure:1511: checking for __int64" >&5 |
093e61a6 RS |
1511 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1512 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1513 | else | |
1514 | cat > conftest.$ac_ext <<EOF | |
96ef4bdc | 1515 | #line 1516 "configure" |
093e61a6 | 1516 | #include "confdefs.h" |
414d23ae | 1517 | |
093e61a6 | 1518 | int main() { |
414d23ae | 1519 | __int64 i; |
093e61a6 RS |
1520 | ; return 0; } |
1521 | EOF | |
96ef4bdc | 1522 | if { (eval echo configure:1523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1523 | rm -rf conftest* |
414d23ae HPN |
1524 | ac_cv_c___int64=yes |
1525 | else | |
093e61a6 RS |
1526 | echo "configure: failed program was:" >&5 |
1527 | cat conftest.$ac_ext >&5 | |
1528 | rm -rf conftest* | |
1529 | ac_cv_c___int64=no | |
414d23ae | 1530 | fi |
093e61a6 | 1531 | rm -f conftest* |
414d23ae | 1532 | fi |
cafe096b | 1533 | |
093e61a6 RS |
1534 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1535 | if test $ac_cv_c___int64 = yes; then | |
1536 | cat >> confdefs.h <<\EOF | |
414d23ae | 1537 | #define HAVE___INT64 1 |
093e61a6 | 1538 | EOF |
414d23ae HPN |
1539 | |
1540 | fi | |
1541 | ||
093e61a6 | 1542 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
96ef4bdc | 1543 | echo "configure:1544: checking for built-in _Bool" >&5 |
093e61a6 RS |
1544 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1545 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1546 | else |
093e61a6 | 1547 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1548 | #line 1549 "configure" |
093e61a6 | 1549 | #include "confdefs.h" |
414d23ae | 1550 | |
093e61a6 | 1551 | int main() { |
414d23ae | 1552 | _Bool foo; |
093e61a6 RS |
1553 | ; return 0; } |
1554 | EOF | |
96ef4bdc | 1555 | if { (eval echo configure:1556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1556 | rm -rf conftest* |
414d23ae HPN |
1557 | gcc_cv_c__bool=yes |
1558 | else | |
093e61a6 RS |
1559 | echo "configure: failed program was:" >&5 |
1560 | cat conftest.$ac_ext >&5 | |
1561 | rm -rf conftest* | |
1562 | gcc_cv_c__bool=no | |
414d23ae | 1563 | fi |
093e61a6 | 1564 | rm -f conftest* |
414d23ae | 1565 | |
cafe096b | 1566 | fi |
cafe096b | 1567 | |
093e61a6 RS |
1568 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1569 | if test $gcc_cv_c__bool = yes; then | |
1570 | cat >> confdefs.h <<\EOF | |
414d23ae | 1571 | #define HAVE__BOOL 1 |
093e61a6 | 1572 | EOF |
414d23ae HPN |
1573 | |
1574 | fi | |
1575 | ||
1576 | ||
1577 | # sizeof(char) is 1 by definition. | |
093e61a6 | 1578 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
96ef4bdc | 1579 | echo "configure:1580: checking size of short" >&5 |
093e61a6 RS |
1580 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1582 | else |
4977bab6 | 1583 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1584 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1585 | #line 1586 "configure" |
093e61a6 | 1586 | #include "confdefs.h" |
414d23ae HPN |
1587 | #include "confdefs.h" |
1588 | #include <sys/types.h> | |
1589 | ||
1590 | ||
093e61a6 | 1591 | int main() { |
414d23ae | 1592 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
093e61a6 RS |
1593 | ; return 0; } |
1594 | EOF | |
96ef4bdc | 1595 | if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1596 | rm -rf conftest* |
414d23ae HPN |
1597 | ac_cv_sizeof_short=$ac_size |
1598 | else | |
093e61a6 RS |
1599 | echo "configure: failed program was:" >&5 |
1600 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1601 | fi |
093e61a6 | 1602 | rm -f conftest* |
414d23ae HPN |
1603 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1604 | done | |
1605 | ||
84c041a1 | 1606 | fi |
414d23ae HPN |
1607 | |
1608 | if test x$ac_cv_sizeof_short = x ; then | |
093e61a6 | 1609 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1610 | fi |
093e61a6 RS |
1611 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1612 | cat >> confdefs.h <<EOF | |
414d23ae | 1613 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
093e61a6 | 1614 | EOF |
84c041a1 | 1615 | |
414d23ae | 1616 | |
093e61a6 | 1617 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
96ef4bdc | 1618 | echo "configure:1619: checking size of int" >&5 |
093e61a6 RS |
1619 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1621 | else |
4977bab6 | 1622 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1623 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1624 | #line 1625 "configure" |
093e61a6 | 1625 | #include "confdefs.h" |
414d23ae HPN |
1626 | #include "confdefs.h" |
1627 | #include <sys/types.h> | |
1628 | ||
75e93faa | 1629 | |
093e61a6 | 1630 | int main() { |
414d23ae | 1631 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
093e61a6 RS |
1632 | ; return 0; } |
1633 | EOF | |
96ef4bdc | 1634 | if { (eval echo configure:1635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1635 | rm -rf conftest* |
414d23ae | 1636 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1637 | else |
093e61a6 RS |
1638 | echo "configure: failed program was:" >&5 |
1639 | cat conftest.$ac_ext >&5 | |
75e93faa | 1640 | fi |
093e61a6 | 1641 | rm -f conftest* |
414d23ae | 1642 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1643 | done |
1644 | ||
1645 | fi | |
1646 | ||
414d23ae | 1647 | if test x$ac_cv_sizeof_int = x ; then |
093e61a6 | 1648 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1649 | fi |
093e61a6 RS |
1650 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1651 | cat >> confdefs.h <<EOF | |
414d23ae | 1652 | #define SIZEOF_INT $ac_cv_sizeof_int |
093e61a6 | 1653 | EOF |
75e93faa | 1654 | |
414d23ae | 1655 | |
093e61a6 | 1656 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
96ef4bdc | 1657 | echo "configure:1658: checking size of long" >&5 |
093e61a6 RS |
1658 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1659 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1660 | else |
4977bab6 | 1661 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1662 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1663 | #line 1664 "configure" |
093e61a6 | 1664 | #include "confdefs.h" |
75e93faa | 1665 | #include "confdefs.h" |
414d23ae HPN |
1666 | #include <sys/types.h> |
1667 | ||
75e93faa | 1668 | |
093e61a6 | 1669 | int main() { |
414d23ae | 1670 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
093e61a6 RS |
1671 | ; return 0; } |
1672 | EOF | |
96ef4bdc | 1673 | if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1674 | rm -rf conftest* |
414d23ae | 1675 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1676 | else |
093e61a6 RS |
1677 | echo "configure: failed program was:" >&5 |
1678 | cat conftest.$ac_ext >&5 | |
75e93faa | 1679 | fi |
093e61a6 | 1680 | rm -f conftest* |
414d23ae HPN |
1681 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1682 | done | |
75e93faa | 1683 | |
414d23ae | 1684 | fi |
75e93faa | 1685 | |
414d23ae | 1686 | if test x$ac_cv_sizeof_long = x ; then |
093e61a6 | 1687 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1688 | fi |
093e61a6 RS |
1689 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1690 | cat >> confdefs.h <<EOF | |
414d23ae | 1691 | #define SIZEOF_LONG $ac_cv_sizeof_long |
093e61a6 | 1692 | EOF |
75e93faa ZW |
1693 | |
1694 | ||
414d23ae | 1695 | if test $ac_cv_c_long_long = yes; then |
093e61a6 | 1696 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
96ef4bdc | 1697 | echo "configure:1698: checking size of long long" >&5 |
093e61a6 RS |
1698 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1699 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1700 | else |
4977bab6 | 1701 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1702 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1703 | #line 1704 "configure" |
093e61a6 | 1704 | #include "confdefs.h" |
414d23ae HPN |
1705 | #include "confdefs.h" |
1706 | #include <sys/types.h> | |
1707 | ||
04cabffc | 1708 | |
093e61a6 | 1709 | int main() { |
414d23ae | 1710 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
093e61a6 RS |
1711 | ; return 0; } |
1712 | EOF | |
96ef4bdc | 1713 | if { (eval echo configure:1714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1714 | rm -rf conftest* |
414d23ae | 1715 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1716 | else |
093e61a6 RS |
1717 | echo "configure: failed program was:" >&5 |
1718 | cat conftest.$ac_ext >&5 | |
04cabffc | 1719 | fi |
093e61a6 | 1720 | rm -f conftest* |
414d23ae HPN |
1721 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1722 | done | |
1723 | ||
04cabffc KG |
1724 | fi |
1725 | ||
414d23ae | 1726 | if test x$ac_cv_sizeof_long_long = x ; then |
093e61a6 | 1727 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1728 | fi |
093e61a6 RS |
1729 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1730 | cat >> confdefs.h <<EOF | |
414d23ae | 1731 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
093e61a6 | 1732 | EOF |
04cabffc | 1733 | |
04cabffc | 1734 | |
414d23ae HPN |
1735 | fi |
1736 | if test $ac_cv_c___int64 = yes; then | |
093e61a6 | 1737 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
96ef4bdc | 1738 | echo "configure:1739: checking size of __int64" >&5 |
093e61a6 RS |
1739 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1740 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1741 | else |
4977bab6 | 1742 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1743 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1744 | #line 1745 "configure" |
093e61a6 | 1745 | #include "confdefs.h" |
414d23ae HPN |
1746 | #include "confdefs.h" |
1747 | #include <sys/types.h> | |
1748 | ||
61842080 | 1749 | |
093e61a6 | 1750 | int main() { |
414d23ae | 1751 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
093e61a6 RS |
1752 | ; return 0; } |
1753 | EOF | |
96ef4bdc | 1754 | if { (eval echo configure:1755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1755 | rm -rf conftest* |
414d23ae | 1756 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1757 | else |
093e61a6 RS |
1758 | echo "configure: failed program was:" >&5 |
1759 | cat conftest.$ac_ext >&5 | |
75e93faa | 1760 | fi |
093e61a6 | 1761 | rm -f conftest* |
414d23ae HPN |
1762 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1763 | done | |
1764 | ||
75e93faa ZW |
1765 | fi |
1766 | ||
414d23ae | 1767 | if test x$ac_cv_sizeof___int64 = x ; then |
093e61a6 | 1768 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1769 | fi |
093e61a6 RS |
1770 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1771 | cat >> confdefs.h <<EOF | |
414d23ae | 1772 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
093e61a6 | 1773 | EOF |
414d23ae | 1774 | |
cafe096b | 1775 | |
cafe096b | 1776 | fi |
cafe096b | 1777 | |
093e61a6 | 1778 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
96ef4bdc | 1779 | echo "configure:1780: checking execution character set" >&5 |
093e61a6 RS |
1780 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1781 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 1782 | else |
093e61a6 | 1783 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1784 | #line 1785 "configure" |
093e61a6 | 1785 | #include "confdefs.h" |
414d23ae HPN |
1786 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ |
1787 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1788 | ASCII | |
1789 | #endif | |
093e61a6 | 1790 | EOF |
414d23ae | 1791 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1792 | egrep "ASCII" >/dev/null 2>&1; then |
1793 | rm -rf conftest* | |
414d23ae HPN |
1794 | ac_cv_c_charset=ASCII |
1795 | fi | |
1796 | rm -f conftest* | |
5c3bc9fb | 1797 | |
414d23ae | 1798 | if test x${ac_cv_c_charset+set} != xset; then |
093e61a6 | 1799 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 1800 | #line 1801 "configure" |
093e61a6 | 1801 | #include "confdefs.h" |
414d23ae HPN |
1802 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ |
1803 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1804 | EBCDIC | |
1805 | #endif | |
093e61a6 | 1806 | EOF |
414d23ae | 1807 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1808 | egrep "EBCDIC" >/dev/null 2>&1; then |
1809 | rm -rf conftest* | |
414d23ae HPN |
1810 | ac_cv_c_charset=EBCDIC |
1811 | fi | |
1812 | rm -f conftest* | |
1813 | ||
1814 | fi | |
1815 | if test x${ac_cv_c_charset+set} != xset; then | |
1816 | ac_cv_c_charset=unknown | |
1817 | fi | |
1818 | fi | |
093e61a6 RS |
1819 | |
1820 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
414d23ae | 1821 | if test $ac_cv_c_charset = unknown; then |
093e61a6 | 1822 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } |
414d23ae | 1823 | elif test $ac_cv_c_charset = EBCDIC; then |
093e61a6 | 1824 | cat >> confdefs.h <<\EOF |
414d23ae | 1825 | #define HOST_EBCDIC 1 |
093e61a6 | 1826 | EOF |
414d23ae HPN |
1827 | |
1828 | fi | |
1829 | ||
34a86c2b NN |
1830 | # ----------------- |
1831 | # Find Ada compiler | |
1832 | # ----------------- | |
1833 | ||
1834 | # See if GNAT has been installed | |
093e61a6 RS |
1835 | if test $host != $build; then |
1836 | ac_tool_prefix=${host_alias}- | |
1837 | else | |
1838 | ac_tool_prefix= | |
1839 | fi | |
34a86c2b NN |
1840 | |
1841 | ||
093e61a6 | 1842 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1843 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
093e61a6 | 1844 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
96ef4bdc | 1845 | echo "configure:1846: checking for $ac_word" >&5 |
093e61a6 RS |
1846 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1847 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1848 | else |
1849 | if test -n "$GNATBIND"; then | |
1850 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1851 | else | |
093e61a6 RS |
1852 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1853 | ac_dummy="$PATH" | |
1854 | for ac_dir in $ac_dummy; do | |
1855 | test -z "$ac_dir" && ac_dir=. | |
1856 | if test -f $ac_dir/$ac_word; then | |
1857 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1858 | break | |
1859 | fi | |
1860 | done | |
1861 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1862 | fi |
1863 | fi | |
093e61a6 | 1864 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1865 | if test -n "$GNATBIND"; then |
093e61a6 | 1866 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1867 | else |
093e61a6 | 1868 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1869 | fi |
1870 | ||
093e61a6 | 1871 | |
34a86c2b | 1872 | if test -z "$ac_cv_prog_GNATBIND"; then |
093e61a6 | 1873 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1874 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1875 | set dummy gnatbind; ac_word=$2 | |
093e61a6 | 1876 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
96ef4bdc | 1877 | echo "configure:1878: checking for $ac_word" >&5 |
093e61a6 RS |
1878 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1879 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1880 | else |
093e61a6 RS |
1881 | if test -n "$GNATBIND"; then |
1882 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1883 | else |
093e61a6 RS |
1884 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1885 | ac_dummy="$PATH" | |
1886 | for ac_dir in $ac_dummy; do | |
1887 | test -z "$ac_dir" && ac_dir=. | |
1888 | if test -f $ac_dir/$ac_word; then | |
1889 | ac_cv_prog_GNATBIND="gnatbind" | |
1890 | break | |
1891 | fi | |
1892 | done | |
1893 | IFS="$ac_save_ifs" | |
1894 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1895 | fi |
1896 | fi | |
093e61a6 RS |
1897 | GNATBIND="$ac_cv_prog_GNATBIND" |
1898 | if test -n "$GNATBIND"; then | |
1899 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1900 | else |
093e61a6 | 1901 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1902 | fi |
1903 | ||
1904 | else | |
093e61a6 RS |
1905 | GNATBIND="no" |
1906 | fi | |
34a86c2b NN |
1907 | fi |
1908 | ||
093e61a6 | 1909 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 |
96ef4bdc | 1910 | echo "configure:1911: checking for compiler driver that understands Ada" >&5 |
093e61a6 RS |
1911 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1912 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1913 | else |
1914 | cat >conftest.adb <<EOF | |
1915 | procedure conftest is begin null; end conftest; | |
1916 | EOF | |
1917 | gcc_cv_prog_adac=no | |
1918 | # Have to do ac_tool_prefix and user overrides by hand. | |
1919 | for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ | |
1920 | ${ac_tool_prefix}gcc gcc \ | |
1921 | ${ac_tool_prefix}cc cc \ | |
1922 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1923 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1924 | ${ac_tool_prefix}adagcc adagcc \ | |
1925 | ${ac_tool_prefix}adacc adacc ; do | |
1926 | # There is a bug in all released versions of GCC which causes the | |
1927 | # driver to exit successfully when the appropriate language module | |
1928 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1929 | # Therefore we must check for the error message as well as an | |
1930 | # unsuccessful exit. | |
1931 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1932 | if test x"$errors" = x; then | |
1933 | gcc_cv_prog_adac=$cand | |
1934 | break | |
1935 | fi | |
1936 | done | |
1937 | rm -f conftest.* | |
1938 | fi | |
093e61a6 RS |
1939 | |
1940 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
34a86c2b NN |
1941 | ADAC=$gcc_cv_prog_adac |
1942 | ||
1943 | ||
1944 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1945 | have_gnat=yes | |
1946 | else | |
1947 | have_gnat=no | |
1948 | fi | |
1949 | ||
1950 | ||
093e61a6 RS |
1951 | if test x$have_gnat != xno ; then |
1952 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
96ef4bdc | 1953 | echo "configure:1954: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1954 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1955 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1956 | else |
1957 | cat >conftest.adb <<EOF | |
1958 | procedure conftest is begin null; end conftest; | |
1959 | EOF | |
1960 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1961 | ac_cv_prog_adac_no_long_long=yes | |
1962 | else | |
1963 | ac_cv_prog_adac_no_long_long=no | |
1964 | fi | |
1965 | rm -f conftest* | |
1966 | fi | |
093e61a6 RS |
1967 | |
1968 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
34a86c2b NN |
1969 | else |
1970 | ac_cv_prog_adac_no_long_long=yes | |
1971 | fi | |
1972 | ||
1973 | # --------------------- | |
1974 | # Warnings and checking | |
1975 | # --------------------- | |
1976 | ||
1977 | strict1_warn= | |
1978 | if test $ac_cv_prog_cc_no_long_long = yes && \ | |
1979 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
1980 | strict1_warn="-pedantic -Wno-long-long" | |
1981 | fi | |
1982 | ||
1983 | ||
093e61a6 | 1984 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1985 | # That's useful for people building cross-compilers, or just running a |
1986 | # quick `make'. | |
1987 | warn_cflags= | |
1988 | if test "x$GCC" = "xyes"; then | |
1989 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1990 | fi | |
1991 | ||
1992 | ||
dd859b8a KG |
1993 | # Enable -Werror in bootstrap stage2 and later. |
1994 | # Change the default to "no" on release branches. | |
1995 | # Check whether --enable-werror or --disable-werror was given. | |
1996 | if test "${enable_werror+set}" = set; then | |
1997 | enableval="$enable_werror" | |
093e61a6 | 1998 | : |
dd859b8a KG |
1999 | else |
2000 | enable_werror=yes | |
093e61a6 RS |
2001 | fi |
2002 | ||
dd859b8a KG |
2003 | if test x$enable_werror = xyes ; then |
2004 | WERROR=-Werror | |
2005 | fi | |
2006 | ||
2007 | ||
414d23ae HPN |
2008 | # Enable expensive internal checks |
2009 | # Check whether --enable-checking or --disable-checking was given. | |
2010 | if test "${enable_checking+set}" = set; then | |
2011 | enableval="$enable_checking" | |
2012 | ac_checking= | |
2013 | ac_tree_checking= | |
2014 | ac_rtl_checking= | |
2015 | ac_rtlflag_checking= | |
2016 | ac_gc_checking= | |
2017 | ac_gc_always_collect= | |
2018 | case "${enableval}" in | |
2019 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
2020 | ac_rtlflag_checking=1 ;; | |
2021 | no) ;; | |
2022 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
2023 | set fnord $enableval; shift | |
2024 | IFS="$ac_save_IFS" | |
2025 | for check | |
2026 | do | |
2027 | case $check in | |
2028 | misc) ac_checking=1 ;; | |
2029 | tree) ac_tree_checking=1 ;; | |
2030 | rtlflag) ac_rtlflag_checking=1 ;; | |
2031 | rtl) ac_rtl_checking=1 ;; | |
2032 | gc) ac_gc_checking=1 ;; | |
2033 | gcac) ac_gc_always_collect=1 ;; | |
2034 | valgrind) ac_checking_valgrind=1 ;; | |
093e61a6 | 2035 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
2036 | esac |
2037 | done | |
2038 | ;; | |
2039 | esac | |
2040 | ||
75e93faa | 2041 | else |
414d23ae HPN |
2042 | # Enable some checks by default for development versions of GCC |
2043 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
093e61a6 RS |
2044 | fi |
2045 | ||
414d23ae HPN |
2046 | nocommon_flag="" |
2047 | if test x$ac_checking != x ; then | |
093e61a6 | 2048 | cat >> confdefs.h <<\EOF |
414d23ae | 2049 | #define ENABLE_CHECKING 1 |
093e61a6 | 2050 | EOF |
75e93faa | 2051 | |
414d23ae HPN |
2052 | nocommon_flag=-fno-common |
2053 | fi | |
827ae6cf | 2054 | |
414d23ae | 2055 | if test x$ac_tree_checking != x ; then |
093e61a6 | 2056 | cat >> confdefs.h <<\EOF |
414d23ae | 2057 | #define ENABLE_TREE_CHECKING 1 |
093e61a6 | 2058 | EOF |
827ae6cf RO |
2059 | |
2060 | fi | |
414d23ae | 2061 | if test x$ac_rtl_checking != x ; then |
093e61a6 | 2062 | cat >> confdefs.h <<\EOF |
414d23ae | 2063 | #define ENABLE_RTL_CHECKING 1 |
093e61a6 | 2064 | EOF |
827ae6cf | 2065 | |
414d23ae HPN |
2066 | fi |
2067 | if test x$ac_rtlflag_checking != x ; then | |
093e61a6 | 2068 | cat >> confdefs.h <<\EOF |
414d23ae | 2069 | #define ENABLE_RTL_FLAG_CHECKING 1 |
093e61a6 | 2070 | EOF |
827ae6cf RO |
2071 | |
2072 | fi | |
414d23ae | 2073 | if test x$ac_gc_checking != x ; then |
093e61a6 | 2074 | cat >> confdefs.h <<\EOF |
414d23ae | 2075 | #define ENABLE_GC_CHECKING 1 |
093e61a6 | 2076 | EOF |
827ae6cf | 2077 | |
414d23ae HPN |
2078 | fi |
2079 | if test x$ac_gc_always_collect != x ; then | |
093e61a6 | 2080 | cat >> confdefs.h <<\EOF |
414d23ae | 2081 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
093e61a6 | 2082 | EOF |
75e93faa | 2083 | |
414d23ae HPN |
2084 | fi |
2085 | valgrind_path_defines= | |
2086 | valgrind_command= | |
2087 | if test x$ac_checking_valgrind != x ; then | |
2088 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2089 | # GCC relies on making annotations so we must have both. | |
093e61a6 | 2090 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 |
96ef4bdc | 2091 | echo "configure:2092: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 |
093e61a6 | 2092 | cat > conftest.$ac_ext <<EOF |
96ef4bdc | 2093 | #line 2094 "configure" |
093e61a6 | 2094 | #include "confdefs.h" |
14011ca4 AJ |
2095 | #include <memcheck.h> |
2096 | #ifndef VALGRIND_DISCARD | |
2097 | #error VALGRIND_DISCARD not defined | |
2098 | #endif | |
093e61a6 RS |
2099 | EOF |
2100 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
96ef4bdc | 2101 | { (eval echo configure:2102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2102 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2103 | if test -z "$ac_err"; then | |
2104 | rm -rf conftest* | |
14011ca4 AJ |
2105 | gcc_cv_header_memcheck_h=yes |
2106 | else | |
093e61a6 RS |
2107 | echo "$ac_err" >&5 |
2108 | echo "configure: failed program was:" >&5 | |
2109 | cat conftest.$ac_ext >&5 | |
2110 | rm -rf conftest* | |
cafe096b EC |
2111 | gcc_cv_header_memcheck_h=no |
2112 | fi | |
cafe096b | 2113 | rm -f conftest* |
093e61a6 RS |
2114 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 |
2115 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2116 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
96ef4bdc | 2117 | echo "configure:2118: checking for valgrind.h" >&5 |
093e61a6 RS |
2118 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2119 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2120 | else | |
2121 | cat > conftest.$ac_ext <<EOF | |
96ef4bdc | 2122 | #line 2123 "configure" |
093e61a6 RS |
2123 | #include "confdefs.h" |
2124 | #include <valgrind.h> | |
2125 | EOF | |
2126 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
96ef4bdc | 2127 | { (eval echo configure:2128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2128 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2129 | if test -z "$ac_err"; then | |
2130 | rm -rf conftest* | |
2131 | eval "ac_cv_header_$ac_safe=yes" | |
2132 | else | |
2133 | echo "$ac_err" >&5 | |
2134 | echo "configure: failed program was:" >&5 | |
2135 | cat conftest.$ac_ext >&5 | |
2136 | rm -rf conftest* | |
2137 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa | 2138 | fi |
093e61a6 | 2139 | rm -f conftest* |
414d23ae | 2140 | fi |
093e61a6 RS |
2141 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2142 | echo "$ac_t""yes" 1>&6 | |
414d23ae HPN |
2143 | have_valgrind_h=yes |
2144 | else | |
093e61a6 RS |
2145 | echo "$ac_t""no" 1>&6 |
2146 | have_valgrind_h=no | |
75e93faa ZW |
2147 | fi |
2148 | ||
414d23ae HPN |
2149 | # Extract the first word of "valgrind", so it can be a program name with args. |
2150 | set dummy valgrind; ac_word=$2 | |
093e61a6 | 2151 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
96ef4bdc | 2152 | echo "configure:2153: checking for $ac_word" >&5 |
093e61a6 RS |
2153 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2154 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2155 | else |
2156 | case "$valgrind_path" in | |
2157 | /*) | |
2158 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2159 | ;; | |
2160 | *) | |
2161 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2162 | for ac_dir in $PATH; do | |
2163 | test -z "$ac_dir" && ac_dir=. | |
2164 | if test -f $ac_dir/$ac_word; then | |
2165 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2166 | ac_cv_path_valgrind_path="$ac_dir/$ac_word" | |
2167 | break | |
2168 | fi | |
2169 | fi | |
2170 | done | |
2171 | IFS="$ac_save_ifs" | |
2172 | ;; | |
2173 | esac | |
75e93faa | 2174 | fi |
414d23ae HPN |
2175 | valgrind_path="$ac_cv_path_valgrind_path" |
2176 | if test -n "$valgrind_path"; then | |
093e61a6 | 2177 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2178 | else |
093e61a6 | 2179 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2180 | fi |
2181 | ||
72bd67f9 | 2182 | if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then |
093e61a6 | 2183 | { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; } |
414d23ae HPN |
2184 | fi |
2185 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2186 | valgrind_command="$valgrind_path -q" | |
093e61a6 | 2187 | cat >> confdefs.h <<\EOF |
414d23ae | 2188 | #define ENABLE_VALGRIND_CHECKING 1 |
093e61a6 | 2189 | EOF |
75e93faa | 2190 | |
14011ca4 | 2191 | if test $gcc_cv_header_memcheck_h = yes; then |
093e61a6 | 2192 | cat >> confdefs.h <<\EOF |
14011ca4 | 2193 | #define HAVE_MEMCHECK_H 1 |
093e61a6 | 2194 | EOF |
14011ca4 AJ |
2195 | |
2196 | fi | |
414d23ae | 2197 | fi |
75e93faa | 2198 | |
75e93faa ZW |
2199 | |
2200 | ||
414d23ae HPN |
2201 | # Enable code coverage collection |
2202 | # Check whether --enable-coverage or --disable-coverage was given. | |
2203 | if test "${enable_coverage+set}" = set; then | |
2204 | enableval="$enable_coverage" | |
2205 | case "${enableval}" in | |
2206 | yes|noopt) | |
eb70d86d | 2207 | coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1" |
414d23ae HPN |
2208 | ;; |
2209 | opt) | |
eb70d86d | 2210 | coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2" |
414d23ae HPN |
2211 | ;; |
2212 | *) | |
093e61a6 | 2213 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2214 | ;; |
2215 | esac | |
75e93faa | 2216 | else |
414d23ae | 2217 | coverage_flags="" |
093e61a6 RS |
2218 | fi |
2219 | ||
5c3bc9fb | 2220 | |
414d23ae | 2221 | |
73458fb7 NN |
2222 | # ------------------------------- |
2223 | # Miscenalleous configure options | |
2224 | # ------------------------------- | |
34a86c2b NN |
2225 | |
2226 | # With stabs | |
2227 | # Check whether --with-stabs or --without-stabs was given. | |
2228 | if test "${with_stabs+set}" = set; then | |
2229 | withval="$with_stabs" | |
2230 | stabs="$with_stabs" | |
2231 | else | |
2232 | stabs=no | |
093e61a6 | 2233 | fi |
34a86c2b | 2234 | |
cafe096b | 2235 | |
093e61a6 | 2236 | # With ELF |
34a86c2b NN |
2237 | # Check whether --with-elf or --without-elf was given. |
2238 | if test "${with_elf+set}" = set; then | |
2239 | withval="$with_elf" | |
2240 | elf="$with_elf" | |
2241 | else | |
2242 | elf=no | |
093e61a6 RS |
2243 | fi |
2244 | ||
34a86c2b NN |
2245 | |
2246 | # Determine whether or not multilibs are enabled. | |
2247 | # Check whether --enable-multilib or --disable-multilib was given. | |
2248 | if test "${enable_multilib+set}" = set; then | |
2249 | enableval="$enable_multilib" | |
093e61a6 | 2250 | : |
34a86c2b NN |
2251 | else |
2252 | enable_multilib=yes | |
093e61a6 RS |
2253 | fi |
2254 | ||
75e93faa | 2255 | |
34a86c2b | 2256 | |
414d23ae HPN |
2257 | # Enable __cxa_atexit for C++. |
2258 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2259 | if test "${enable___cxa_atexit+set}" = set; then | |
2260 | enableval="$enable___cxa_atexit" | |
093e61a6 RS |
2261 | : |
2262 | fi | |
75e93faa ZW |
2263 | |
2264 | ||
414d23ae HPN |
2265 | # Enable Multibyte Characters for C/C++ |
2266 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
2267 | if test "${enable_c_mbchar+set}" = set; then | |
2268 | enableval="$enable_c_mbchar" | |
2269 | if test x$enable_c_mbchar != xno; then | |
093e61a6 | 2270 | cat >> confdefs.h <<\EOF |
414d23ae | 2271 | #define MULTIBYTE_CHARS 1 |
093e61a6 | 2272 | EOF |
414d23ae HPN |
2273 | |
2274 | fi | |
093e61a6 | 2275 | fi |
75e93faa | 2276 | |
093e61a6 | 2277 | |
414d23ae HPN |
2278 | # Enable threads |
2279 | # Pass with no value to take the default | |
2280 | # Pass with a value to specify a thread package | |
2281 | # Check whether --enable-threads or --disable-threads was given. | |
2282 | if test "${enable_threads+set}" = set; then | |
2283 | enableval="$enable_threads" | |
093e61a6 | 2284 | : |
414d23ae HPN |
2285 | else |
2286 | enable_threads='' | |
093e61a6 RS |
2287 | fi |
2288 | ||
414d23ae HPN |
2289 | |
2290 | enable_threads_flag=$enable_threads | |
2291 | # Check if a valid thread package | |
2292 | case x${enable_threads_flag} in | |
2293 | x | xno) | |
2294 | # No threads | |
2295 | target_thread_file='single' | |
2296 | ;; | |
2297 | xyes) | |
2298 | # default | |
2299 | target_thread_file='' | |
2300 | ;; | |
2301 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
6d412a7b | 2302 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat) |
414d23ae HPN |
2303 | target_thread_file=$enable_threads_flag |
2304 | ;; | |
2305 | *) | |
2306 | echo "$enable_threads is an unknown thread package" 1>&2 | |
2307 | exit 1 | |
2308 | ;; | |
2309 | esac | |
2310 | ||
2311 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2312 | if test "${enable_objc_gc+set}" = set; then | |
2313 | enableval="$enable_objc_gc" | |
2314 | if test x$enable_objc_gc = xno; then | |
2315 | objc_boehm_gc='' | |
2316 | else | |
2317 | objc_boehm_gc=1 | |
2318 | fi | |
2319 | else | |
2320 | objc_boehm_gc='' | |
093e61a6 | 2321 | fi |
75e93faa ZW |
2322 | |
2323 | ||
414d23ae HPN |
2324 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2325 | if test "${with_dwarf2+set}" = set; then | |
2326 | withval="$with_dwarf2" | |
2327 | dwarf2="$with_dwarf2" | |
75e93faa | 2328 | else |
414d23ae | 2329 | dwarf2=no |
093e61a6 RS |
2330 | fi |
2331 | ||
75e93faa | 2332 | |
414d23ae HPN |
2333 | # Check whether --enable-shared or --disable-shared was given. |
2334 | if test "${enable_shared+set}" = set; then | |
2335 | enableval="$enable_shared" | |
093e61a6 | 2336 | |
414d23ae HPN |
2337 | case $enable_shared in |
2338 | yes | no) ;; | |
2339 | *) | |
2340 | enable_shared=no | |
2341 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2342 | for pkg in $enableval; do | |
2343 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2344 | enable_shared=yes | |
2345 | fi | |
2346 | done | |
2347 | IFS="$ac_save_ifs" | |
2348 | ;; | |
2349 | esac | |
2350 | ||
75e93faa | 2351 | else |
414d23ae | 2352 | enable_shared=yes |
093e61a6 | 2353 | fi |
75e93faa | 2354 | |
75e93faa | 2355 | |
75e93faa | 2356 | |
4977bab6 ZW |
2357 | # Check whether --with-sysroot or --without-sysroot was given. |
2358 | if test "${with_sysroot+set}" = set; then | |
2359 | withval="$with_sysroot" | |
093e61a6 | 2360 | |
4977bab6 | 2361 | case ${with_sysroot} in |
91710e62 | 2362 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
4977bab6 ZW |
2363 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2364 | esac | |
093e61a6 | 2365 | |
4977bab6 ZW |
2366 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2367 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2368 | ||
047d636f DJ |
2369 | if test "x$exec_prefix" = xNONE; then |
2370 | if test "x$prefix" = xNONE; then | |
2371 | test_prefix=/usr/local | |
2372 | else | |
2373 | test_prefix=$prefix | |
2374 | fi | |
2375 | else | |
2376 | test_prefix=$exec_prefix | |
2377 | fi | |
2378 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2379 | "${test_prefix}"|"${test_prefix}/"*|\ |
2380 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2381 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2382 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2383 | ;; | |
2384 | esac | |
2385 | ||
4977bab6 | 2386 | else |
093e61a6 | 2387 | |
4977bab6 | 2388 | TARGET_SYSTEM_ROOT= |
db720d9a | 2389 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2390 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2391 | ||
093e61a6 RS |
2392 | fi |
2393 | ||
4977bab6 ZW |
2394 | |
2395 | ||
2396 | ||
2397 | ||
73458fb7 NN |
2398 | # ------------------------- |
2399 | # Checks for other programs | |
2400 | # ------------------------- | |
5b67ad6f | 2401 | |
093e61a6 | 2402 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
2121a768 | 2403 | echo "configure:2404: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
093e61a6 RS |
2404 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2405 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2406 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2407 | else |
093e61a6 | 2408 | cat > conftestmake <<\EOF |
e9a25f70 | 2409 | all: |
093e61a6 RS |
2410 | @echo 'ac_maketemp="${MAKE}"' |
2411 | EOF | |
e9a25f70 | 2412 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
093e61a6 | 2413 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2414 | if test -n "$ac_maketemp"; then |
2415 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2416 | else | |
2417 | eval ac_cv_prog_make_${ac_make}_set=no | |
2418 | fi | |
093e61a6 | 2419 | rm -f conftestmake |
e9a25f70 JL |
2420 | fi |
2421 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
093e61a6 | 2422 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2423 | SET_MAKE= |
2424 | else | |
093e61a6 | 2425 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2426 | SET_MAKE="MAKE=${MAKE-make}" |
2427 | fi | |
2428 | ||
2429 | ||
861bb6c1 | 2430 | # Find some useful tools |
2121a768 | 2431 | for ac_prog in mawk gawk nawk awk |
861bb6c1 | 2432 | do |
093e61a6 | 2433 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2434 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 2435 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2121a768 | 2436 | echo "configure:2437: checking for $ac_word" >&5 |
093e61a6 RS |
2437 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2438 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2439 | else |
2440 | if test -n "$AWK"; then | |
2441 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2442 | else | |
093e61a6 RS |
2443 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2444 | ac_dummy="$PATH" | |
2445 | for ac_dir in $ac_dummy; do | |
2446 | test -z "$ac_dir" && ac_dir=. | |
2447 | if test -f $ac_dir/$ac_word; then | |
2448 | ac_cv_prog_AWK="$ac_prog" | |
2449 | break | |
2450 | fi | |
2451 | done | |
2452 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2453 | fi |
2454 | fi | |
093e61a6 | 2455 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2456 | if test -n "$AWK"; then |
093e61a6 | 2457 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2458 | else |
093e61a6 | 2459 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2460 | fi |
2461 | ||
093e61a6 | 2462 | test -n "$AWK" && break |
861bb6c1 JL |
2463 | done |
2464 | ||
093e61a6 | 2465 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
2121a768 | 2466 | echo "configure:2467: checking whether ln works" >&5 |
093e61a6 RS |
2467 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2468 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2469 | else |
2470 | rm -f conftestdata_t | |
2471 | echo >conftestdata_f | |
2472 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2473 | then | |
2474 | gcc_cv_prog_LN="ln" | |
2475 | else | |
2476 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2477 | then | |
2478 | gcc_cv_prog_LN="ln -s" | |
2479 | else | |
2480 | gcc_cv_prog_LN=cp | |
2481 | fi | |
2482 | fi | |
2483 | rm -f conftestdata_f conftestdata_t | |
2484 | ||
2485 | fi | |
2486 | LN="$gcc_cv_prog_LN" | |
2487 | if test "$gcc_cv_prog_LN" = "ln"; then | |
093e61a6 | 2488 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2489 | else |
2490 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
093e61a6 | 2491 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2492 | else |
093e61a6 | 2493 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2494 | fi |
2495 | fi | |
2496 | ||
093e61a6 | 2497 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
2121a768 | 2498 | echo "configure:2499: checking whether ln -s works" >&5 |
093e61a6 RS |
2499 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2500 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2501 | else |
2502 | rm -f conftestdata_t | |
2503 | echo >conftestdata_f | |
2504 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2505 | then | |
2506 | gcc_cv_prog_LN_S="ln -s" | |
2507 | else | |
2508 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2509 | then | |
2510 | gcc_cv_prog_LN_S=ln | |
2511 | else | |
2512 | gcc_cv_prog_LN_S=cp | |
2513 | fi | |
2514 | fi | |
2515 | rm -f conftestdata_f conftestdata_t | |
2516 | ||
2517 | fi | |
2518 | LN_S="$gcc_cv_prog_LN_S" | |
2519 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
093e61a6 | 2520 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2521 | else |
2522 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
093e61a6 | 2523 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2524 | else |
093e61a6 | 2525 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2526 | fi |
2527 | fi | |
2528 | ||
093e61a6 RS |
2529 | # Extract the first word of "ranlib", so it can be a program name with args. |
2530 | set dummy ranlib; ac_word=$2 | |
2531 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2121a768 | 2532 | echo "configure:2533: checking for $ac_word" >&5 |
093e61a6 RS |
2533 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2534 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2535 | else |
2536 | if test -n "$RANLIB"; then | |
2537 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2538 | else | |
093e61a6 RS |
2539 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2540 | ac_dummy="$PATH" | |
2541 | for ac_dir in $ac_dummy; do | |
2542 | test -z "$ac_dir" && ac_dir=. | |
2543 | if test -f $ac_dir/$ac_word; then | |
2544 | ac_cv_prog_RANLIB="ranlib" | |
2545 | break | |
2546 | fi | |
2547 | done | |
2548 | IFS="$ac_save_ifs" | |
2549 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
861bb6c1 JL |
2550 | fi |
2551 | fi | |
093e61a6 | 2552 | RANLIB="$ac_cv_prog_RANLIB" |
861bb6c1 | 2553 | if test -n "$RANLIB"; then |
093e61a6 | 2554 | echo "$ac_t""$RANLIB" 1>&6 |
cafe096b | 2555 | else |
093e61a6 | 2556 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2557 | fi |
2558 | ||
0a4b6309 RL |
2559 | # Find a good install program. We prefer a C program (faster), |
2560 | # so one script is as good as another. But avoid the broken or | |
2561 | # incompatible versions: | |
2562 | # SysV /etc/install, /usr/sbin/install | |
2563 | # SunOS /usr/etc/install | |
2564 | # IRIX /sbin/install | |
2565 | # AIX /bin/install | |
2566 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2567 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2568 | # ./install, which can be erroneously created by make from ./install.sh. | |
093e61a6 | 2569 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
2121a768 | 2570 | echo "configure:2571: checking for a BSD compatible install" >&5 |
0a4b6309 | 2571 | if test -z "$INSTALL"; then |
093e61a6 RS |
2572 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2573 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2574 | else |
2575 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2576 | for ac_dir in $PATH; do | |
2577 | # Account for people who put trailing slashes in PATH elements. | |
2578 | case "$ac_dir/" in | |
2579 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2580 | *) | |
2581 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2582 | for ac_prog in ginstall scoinst install; do | |
2583 | if test -f $ac_dir/$ac_prog; then | |
2584 | if test $ac_prog = install && | |
2585 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2586 | # AIX install. It has an incompatible calling convention. | |
2587 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2588 | : | |
2589 | else | |
2590 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2591 | break 2 | |
2592 | fi | |
2593 | fi | |
2594 | done | |
2595 | ;; | |
2596 | esac | |
2597 | done | |
2598 | IFS="$ac_save_IFS" | |
2599 | ||
2600 | fi | |
2601 | if test "${ac_cv_path_install+set}" = set; then | |
2602 | INSTALL="$ac_cv_path_install" | |
2603 | else | |
2604 | # As a last resort, use the slow shell script. We don't cache a | |
2605 | # path for INSTALL within a source directory, because that will | |
2606 | # break other packages using the cache if that directory is | |
2607 | # removed, or if the path is relative. | |
2608 | INSTALL="$ac_install_sh" | |
2609 | fi | |
2610 | fi | |
093e61a6 | 2611 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2612 | |
2613 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2614 | # It thinks the first close brace ends the variable substitution. | |
2615 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2616 | ||
2617 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2618 | ||
861bb6c1 | 2619 | |
73458fb7 NN |
2620 | # See if we have the mktemp command. |
2621 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2622 | set dummy mktemp; ac_word=$2 | |
093e61a6 | 2623 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2121a768 | 2624 | echo "configure:2625: checking for $ac_word" >&5 |
093e61a6 RS |
2625 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2626 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2627 | else |
2628 | if test -n "$have_mktemp_command"; then | |
2629 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2630 | else | |
093e61a6 RS |
2631 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2632 | ac_dummy="$PATH" | |
2633 | for ac_dir in $ac_dummy; do | |
2634 | test -z "$ac_dir" && ac_dir=. | |
2635 | if test -f $ac_dir/$ac_word; then | |
2636 | ac_cv_prog_have_mktemp_command="yes" | |
2637 | break | |
2638 | fi | |
2639 | done | |
2640 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2641 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2642 | fi | |
2643 | fi | |
093e61a6 | 2644 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2645 | if test -n "$have_mktemp_command"; then |
093e61a6 | 2646 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2647 | else |
093e61a6 | 2648 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2649 | fi |
2650 | ||
2651 | ||
2652 | # Do we have a single-tree copy of texinfo? | |
2653 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2654 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2655 | gcc_cv_prog_makeinfo_modern=yes | |
093e61a6 | 2656 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2657 | else |
2658 | # See if makeinfo has been installed and is modern enough | |
2659 | # that we can use it. | |
2660 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2661 | set dummy makeinfo; ac_word=$2 | |
093e61a6 | 2662 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2121a768 | 2663 | echo "configure:2664: checking for $ac_word" >&5 |
093e61a6 RS |
2664 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2665 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2666 | else |
2667 | if test -n "$MAKEINFO"; then | |
2668 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2669 | else | |
093e61a6 RS |
2670 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2671 | ac_dummy="$PATH" | |
2672 | for ac_dir in $ac_dummy; do | |
2673 | test -z "$ac_dir" && ac_dir=. | |
2674 | if test -f $ac_dir/$ac_word; then | |
2675 | ac_cv_prog_MAKEINFO="makeinfo" | |
2676 | break | |
2677 | fi | |
2678 | done | |
2679 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2680 | fi |
2681 | fi | |
093e61a6 | 2682 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2683 | if test -n "$MAKEINFO"; then |
093e61a6 | 2684 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2685 | else |
093e61a6 | 2686 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2687 | fi |
2688 | ||
2689 | if test -n "$MAKEINFO"; then | |
2690 | # Found it, now check the version. | |
093e61a6 | 2691 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
2121a768 | 2692 | echo "configure:2693: checking for modern makeinfo" >&5 |
093e61a6 RS |
2693 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2694 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2695 | else |
2696 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2697 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
2121a768 | 2698 | echo "configure:2699: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2699 | case $ac_prog_version in |
2700 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2701 | 4.[2-9]*) | |
2702 | gcc_cv_prog_makeinfo_modern=yes;; | |
2703 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2704 | esac | |
2705 | ||
2706 | fi | |
093e61a6 RS |
2707 | |
2708 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2709 | else |
2710 | gcc_cv_prog_makeinfo_modern=no | |
2711 | fi | |
2712 | ||
2713 | fi | |
2714 | ||
2715 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
093e61a6 | 2716 | echo "configure: warning: |
cafe096b | 2717 | *** Makeinfo is missing or too old. |
093e61a6 | 2718 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2719 | BUILD_INFO= |
2720 | else | |
093e61a6 | 2721 | BUILD_INFO=info |
73458fb7 NN |
2722 | fi |
2723 | ||
2724 | # Is pod2man recent enough to regenerate manpages? | |
093e61a6 | 2725 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
2121a768 | 2726 | echo "configure:2727: checking for recent Pod::Man" >&5 |
73458fb7 | 2727 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
093e61a6 RS |
2728 | echo "$ac_t""yes" 1>&6 |
2729 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2730 | else |
093e61a6 | 2731 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2732 | GENERATED_MANPAGES= |
2733 | fi | |
2734 | ||
baade80b PE |
2735 | # 'make compare' can be significantly faster, if cmp itself can |
2736 | # skip bytes instead of using tail. The test being performed is | |
2737 | # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" | |
2738 | # but we need to sink errors and handle broken shells. | |
093e61a6 | 2739 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 |
2121a768 | 2740 | echo "configure:2741: checking for cmp's capabilities" >&5 |
baade80b PE |
2741 | echo abfoo >t1 |
2742 | echo cdfoo >t2 | |
2743 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
2744 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
2745 | make_compare_target=slowcompare | |
2746 | else | |
2747 | make_compare_target=gnucompare | |
2748 | fi | |
c7a5cf61 PE |
2749 | else |
2750 | make_compare_target=slowcompare | |
2751 | fi | |
baade80b | 2752 | rm t1 t2 |
c7a5cf61 | 2753 | |
093e61a6 | 2754 | echo "$ac_t""$make_compare_target" 1>&6 |
c7a5cf61 | 2755 | |
73458fb7 NN |
2756 | # How about lex? |
2757 | if test -f $srcdir/../flex/skel.c; then | |
2758 | FLEX='$(objdir)/../flex/flex' | |
2759 | else | |
2760 | # Extract the first word of "flex", so it can be a program name with args. | |
2761 | set dummy flex; ac_word=$2 | |
093e61a6 | 2762 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2121a768 | 2763 | echo "configure:2764: checking for $ac_word" >&5 |
093e61a6 RS |
2764 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2765 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2766 | else |
2767 | if test -n "$FLEX"; then | |
2768 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2769 | else | |
093e61a6 RS |
2770 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2771 | ac_dummy="$PATH" | |
2772 | for ac_dir in $ac_dummy; do | |
2773 | test -z "$ac_dir" && ac_dir=. | |
2774 | if test -f $ac_dir/$ac_word; then | |
2775 | ac_cv_prog_FLEX="flex" | |
2776 | break | |
2777 | fi | |
2778 | done | |
2779 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2780 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2781 | fi | |
2782 | fi | |
093e61a6 | 2783 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2784 | if test -n "$FLEX"; then |
093e61a6 | 2785 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2786 | else |
093e61a6 | 2787 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2788 | fi |
2789 | ||
2790 | fi | |
2791 | ||
2792 | # Bison? | |
2793 | # The -L switch is so bison can find its skeleton file. | |
2794 | if test -f $srcdir/../bison/bison.simple; then | |
2795 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2796 | else | |
2797 | # Extract the first word of "bison", so it can be a program name with args. | |
2798 | set dummy bison; ac_word=$2 | |
093e61a6 | 2799 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
2121a768 | 2800 | echo "configure:2801: checking for $ac_word" >&5 |
093e61a6 RS |
2801 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2802 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2803 | else |
2804 | if test -n "$BISON"; then | |
2805 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2806 | else | |
093e61a6 RS |
2807 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2808 | ac_dummy="$PATH" | |
2809 | for ac_dir in $ac_dummy; do | |
2810 | test -z "$ac_dir" && ac_dir=. | |
2811 | if test -f $ac_dir/$ac_word; then | |
2812 | ac_cv_prog_BISON="bison" | |
2813 | break | |
2814 | fi | |
2815 | done | |
2816 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2817 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2818 | fi | |
2819 | fi | |
093e61a6 | 2820 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2821 | if test -n "$BISON"; then |
093e61a6 | 2822 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2823 | else |
093e61a6 | 2824 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2825 | fi |
2826 | ||
2827 | fi | |
2828 | ||
2829 | # -------------------- | |
2830 | # Checks for C headers | |
2831 | # -------------------- | |
2832 | ||
093e61a6 | 2833 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
2121a768 | 2834 | echo "configure:2835: checking for GNU C library" >&5 |
093e61a6 RS |
2835 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2836 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2837 | else | |
2838 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 2839 | #line 2840 "configure" |
093e61a6 | 2840 | #include "confdefs.h" |
73458fb7 | 2841 | #include <features.h> |
093e61a6 | 2842 | int main() { |
73458fb7 NN |
2843 | |
2844 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2845 | #error Not a GNU C library system | |
2846 | #endif | |
093e61a6 RS |
2847 | ; return 0; } |
2848 | EOF | |
2121a768 | 2849 | if { (eval echo configure:2850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2850 | rm -rf conftest* |
73458fb7 NN |
2851 | gcc_cv_glibc=yes |
2852 | else | |
093e61a6 RS |
2853 | echo "configure: failed program was:" >&5 |
2854 | cat conftest.$ac_ext >&5 | |
2855 | rm -rf conftest* | |
2856 | gcc_cv_glibc=no | |
73458fb7 | 2857 | fi |
093e61a6 | 2858 | rm -f conftest* |
73458fb7 NN |
2859 | fi |
2860 | ||
093e61a6 | 2861 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2862 | if test $gcc_cv_glibc = yes; then |
093e61a6 | 2863 | cat >> confdefs.h <<\EOF |
73458fb7 | 2864 | #define _GNU_SOURCE 1 |
093e61a6 | 2865 | EOF |
73458fb7 NN |
2866 | |
2867 | fi | |
2868 | ||
093e61a6 | 2869 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
2121a768 | 2870 | echo "configure:2871: checking for ANSI C header files" >&5 |
093e61a6 RS |
2871 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2872 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2873 | else |
093e61a6 | 2874 | cat > conftest.$ac_ext <<EOF |
2121a768 | 2875 | #line 2876 "configure" |
093e61a6 | 2876 | #include "confdefs.h" |
956d6950 JL |
2877 | #include <stdlib.h> |
2878 | #include <stdarg.h> | |
2879 | #include <string.h> | |
2880 | #include <float.h> | |
093e61a6 RS |
2881 | EOF |
2882 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2121a768 | 2883 | { (eval echo configure:2884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2884 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2885 | if test -z "$ac_err"; then | |
2886 | rm -rf conftest* | |
956d6950 JL |
2887 | ac_cv_header_stdc=yes |
2888 | else | |
093e61a6 RS |
2889 | echo "$ac_err" >&5 |
2890 | echo "configure: failed program was:" >&5 | |
2891 | cat conftest.$ac_ext >&5 | |
2892 | rm -rf conftest* | |
2893 | ac_cv_header_stdc=no | |
956d6950 | 2894 | fi |
093e61a6 | 2895 | rm -f conftest* |
956d6950 JL |
2896 | |
2897 | if test $ac_cv_header_stdc = yes; then | |
2898 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
093e61a6 | 2899 | cat > conftest.$ac_ext <<EOF |
2121a768 | 2900 | #line 2901 "configure" |
093e61a6 | 2901 | #include "confdefs.h" |
956d6950 | 2902 | #include <string.h> |
093e61a6 | 2903 | EOF |
956d6950 | 2904 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2905 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2906 | : |
2907 | else | |
093e61a6 | 2908 | rm -rf conftest* |
956d6950 JL |
2909 | ac_cv_header_stdc=no |
2910 | fi | |
2911 | rm -f conftest* | |
2912 | ||
2913 | fi | |
2914 | ||
2915 | if test $ac_cv_header_stdc = yes; then | |
2916 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
093e61a6 | 2917 | cat > conftest.$ac_ext <<EOF |
2121a768 | 2918 | #line 2919 "configure" |
093e61a6 | 2919 | #include "confdefs.h" |
956d6950 | 2920 | #include <stdlib.h> |
093e61a6 | 2921 | EOF |
956d6950 | 2922 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2923 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2924 | : |
2925 | else | |
093e61a6 | 2926 | rm -rf conftest* |
956d6950 JL |
2927 | ac_cv_header_stdc=no |
2928 | fi | |
2929 | rm -f conftest* | |
2930 | ||
2931 | fi | |
2932 | ||
2933 | if test $ac_cv_header_stdc = yes; then | |
2934 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
093e61a6 | 2935 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2936 | : |
2937 | else | |
093e61a6 | 2938 | cat > conftest.$ac_ext <<EOF |
2121a768 | 2939 | #line 2940 "configure" |
093e61a6 | 2940 | #include "confdefs.h" |
956d6950 | 2941 | #include <ctype.h> |
093e61a6 RS |
2942 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2943 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
cafe096b | 2944 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
093e61a6 RS |
2945 | int main () { int i; for (i = 0; i < 256; i++) |
2946 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2947 | exit (0); } | |
2948 | ||
2949 | EOF | |
2121a768 | 2950 | if { (eval echo configure:2951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 2951 | then |
956d6950 JL |
2952 | : |
2953 | else | |
093e61a6 RS |
2954 | echo "configure: failed program was:" >&5 |
2955 | cat conftest.$ac_ext >&5 | |
2956 | rm -fr conftest* | |
2957 | ac_cv_header_stdc=no | |
956d6950 | 2958 | fi |
093e61a6 | 2959 | rm -fr conftest* |
956d6950 | 2960 | fi |
093e61a6 | 2961 | |
956d6950 JL |
2962 | fi |
2963 | fi | |
cafe096b | 2964 | |
093e61a6 RS |
2965 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2966 | if test $ac_cv_header_stdc = yes; then | |
2967 | cat >> confdefs.h <<\EOF | |
956d6950 | 2968 | #define STDC_HEADERS 1 |
093e61a6 | 2969 | EOF |
956d6950 JL |
2970 | |
2971 | fi | |
2972 | ||
093e61a6 | 2973 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
2121a768 | 2974 | echo "configure:2975: checking whether time.h and sys/time.h may both be included" >&5 |
093e61a6 RS |
2975 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2976 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2977 | else |
093e61a6 | 2978 | cat > conftest.$ac_ext <<EOF |
2121a768 | 2979 | #line 2980 "configure" |
093e61a6 | 2980 | #include "confdefs.h" |
956d6950 JL |
2981 | #include <sys/types.h> |
2982 | #include <sys/time.h> | |
2983 | #include <time.h> | |
093e61a6 RS |
2984 | int main() { |
2985 | struct tm *tp; | |
2986 | ; return 0; } | |
2987 | EOF | |
2121a768 | 2988 | if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2989 | rm -rf conftest* |
956d6950 JL |
2990 | ac_cv_header_time=yes |
2991 | else | |
093e61a6 RS |
2992 | echo "configure: failed program was:" >&5 |
2993 | cat conftest.$ac_ext >&5 | |
2994 | rm -rf conftest* | |
2995 | ac_cv_header_time=no | |
956d6950 | 2996 | fi |
093e61a6 | 2997 | rm -f conftest* |
956d6950 | 2998 | fi |
cafe096b | 2999 | |
093e61a6 RS |
3000 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
3001 | if test $ac_cv_header_time = yes; then | |
3002 | cat >> confdefs.h <<\EOF | |
956d6950 | 3003 | #define TIME_WITH_SYS_TIME 1 |
093e61a6 | 3004 | EOF |
956d6950 JL |
3005 | |
3006 | fi | |
3007 | ||
093e61a6 | 3008 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
2121a768 | 3009 | echo "configure:3010: checking for working stdbool.h" >&5 |
093e61a6 RS |
3010 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
3011 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 3012 | else |
093e61a6 | 3013 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3014 | #line 3015 "configure" |
093e61a6 | 3015 | #include "confdefs.h" |
827ae6cf | 3016 | #include <stdbool.h> |
093e61a6 | 3017 | int main() { |
827ae6cf | 3018 | bool foo = false; |
093e61a6 RS |
3019 | ; return 0; } |
3020 | EOF | |
2121a768 | 3021 | if { (eval echo configure:3022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3022 | rm -rf conftest* |
827ae6cf RO |
3023 | ac_cv_header_stdbool_h=yes |
3024 | else | |
093e61a6 RS |
3025 | echo "configure: failed program was:" >&5 |
3026 | cat conftest.$ac_ext >&5 | |
3027 | rm -rf conftest* | |
3028 | ac_cv_header_stdbool_h=no | |
827ae6cf | 3029 | fi |
093e61a6 | 3030 | rm -f conftest* |
827ae6cf | 3031 | fi |
cafe096b | 3032 | |
093e61a6 RS |
3033 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
3034 | if test $ac_cv_header_stdbool_h = yes; then | |
3035 | cat >> confdefs.h <<\EOF | |
827ae6cf | 3036 | #define HAVE_STDBOOL_H 1 |
093e61a6 | 3037 | EOF |
827ae6cf RO |
3038 | |
3039 | fi | |
3040 | ||
093e61a6 | 3041 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
2121a768 | 3042 | echo "configure:3043: checking whether string.h and strings.h may both be included" >&5 |
093e61a6 RS |
3043 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
3044 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 3045 | else |
093e61a6 | 3046 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3047 | #line 3048 "configure" |
093e61a6 | 3048 | #include "confdefs.h" |
0a4b6309 RL |
3049 | #include <string.h> |
3050 | #include <strings.h> | |
093e61a6 | 3051 | int main() { |
0a4b6309 | 3052 | |
093e61a6 RS |
3053 | ; return 0; } |
3054 | EOF | |
2121a768 | 3055 | if { (eval echo configure:3056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3056 | rm -rf conftest* |
0a4b6309 RL |
3057 | gcc_cv_header_string=yes |
3058 | else | |
093e61a6 RS |
3059 | echo "configure: failed program was:" >&5 |
3060 | cat conftest.$ac_ext >&5 | |
3061 | rm -rf conftest* | |
3062 | gcc_cv_header_string=no | |
0a4b6309 | 3063 | fi |
093e61a6 | 3064 | rm -f conftest* |
0a4b6309 | 3065 | fi |
cafe096b | 3066 | |
093e61a6 RS |
3067 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
3068 | if test $gcc_cv_header_string = yes; then | |
3069 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3070 | #define STRING_WITH_STRINGS 1 |
093e61a6 | 3071 | EOF |
0a4b6309 RL |
3072 | |
3073 | fi | |
3074 | ||
093e61a6 | 3075 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
2121a768 | 3076 | echo "configure:3077: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
093e61a6 RS |
3077 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
3078 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 3079 | else |
093e61a6 | 3080 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3081 | #line 3082 "configure" |
093e61a6 | 3082 | #include "confdefs.h" |
e9831ca0 KG |
3083 | #include <sys/types.h> |
3084 | #include <sys/wait.h> | |
3085 | #ifndef WEXITSTATUS | |
093e61a6 | 3086 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
3087 | #endif |
3088 | #ifndef WIFEXITED | |
093e61a6 | 3089 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 3090 | #endif |
093e61a6 RS |
3091 | int main() { |
3092 | int s; | |
3093 | wait (&s); | |
3094 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3095 | ; return 0; } | |
3096 | EOF | |
2121a768 | 3097 | if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3098 | rm -rf conftest* |
e9831ca0 KG |
3099 | ac_cv_header_sys_wait_h=yes |
3100 | else | |
093e61a6 RS |
3101 | echo "configure: failed program was:" >&5 |
3102 | cat conftest.$ac_ext >&5 | |
3103 | rm -rf conftest* | |
3104 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 3105 | fi |
093e61a6 | 3106 | rm -f conftest* |
e9831ca0 | 3107 | fi |
cafe096b | 3108 | |
093e61a6 RS |
3109 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
3110 | if test $ac_cv_header_sys_wait_h = yes; then | |
3111 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 3112 | #define HAVE_SYS_WAIT_H 1 |
093e61a6 | 3113 | EOF |
e9831ca0 KG |
3114 | |
3115 | fi | |
3116 | ||
093e61a6 | 3117 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3118 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3119 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
2bd02043 | 3120 | direct.h malloc.h langinfo.h ldfcn.h wchar.h |
861bb6c1 | 3121 | do |
093e61a6 RS |
3122 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3123 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
2121a768 | 3124 | echo "configure:3125: checking for $ac_hdr" >&5 |
093e61a6 RS |
3125 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3126 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3127 | else | |
3128 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3129 | #line 3130 "configure" |
093e61a6 RS |
3130 | #include "confdefs.h" |
3131 | #include <$ac_hdr> | |
3132 | EOF | |
3133 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2121a768 | 3134 | { (eval echo configure:3135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3135 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3136 | if test -z "$ac_err"; then | |
3137 | rm -rf conftest* | |
3138 | eval "ac_cv_header_$ac_safe=yes" | |
3139 | else | |
3140 | echo "$ac_err" >&5 | |
3141 | echo "configure: failed program was:" >&5 | |
3142 | cat conftest.$ac_ext >&5 | |
3143 | rm -rf conftest* | |
3144 | eval "ac_cv_header_$ac_safe=no" | |
956d6950 | 3145 | fi |
093e61a6 | 3146 | rm -f conftest* |
956d6950 | 3147 | fi |
093e61a6 RS |
3148 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3149 | echo "$ac_t""yes" 1>&6 | |
3150 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3151 | cat >> confdefs.h <<EOF | |
3152 | #define $ac_tr_hdr 1 | |
3153 | EOF | |
3154 | ||
3155 | else | |
3156 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3157 | fi |
3158 | done | |
3159 | ||
3160 | ||
f24af81b | 3161 | # Check for thread headers. |
093e61a6 RS |
3162 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3163 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
2121a768 | 3164 | echo "configure:3165: checking for thread.h" >&5 |
093e61a6 RS |
3165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3166 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3167 | else | |
3168 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3169 | #line 3170 "configure" |
093e61a6 | 3170 | #include "confdefs.h" |
cafe096b | 3171 | #include <thread.h> |
093e61a6 RS |
3172 | EOF |
3173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2121a768 | 3174 | { (eval echo configure:3175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3176 | if test -z "$ac_err"; then | |
3177 | rm -rf conftest* | |
3178 | eval "ac_cv_header_$ac_safe=yes" | |
3179 | else | |
3180 | echo "$ac_err" >&5 | |
3181 | echo "configure: failed program was:" >&5 | |
3182 | cat conftest.$ac_ext >&5 | |
3183 | rm -rf conftest* | |
3184 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3185 | fi |
093e61a6 | 3186 | rm -f conftest* |
f24af81b | 3187 | fi |
093e61a6 RS |
3188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3189 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3190 | have_thread_h=yes |
3191 | else | |
093e61a6 RS |
3192 | echo "$ac_t""no" 1>&6 |
3193 | have_thread_h= | |
f24af81b TT |
3194 | fi |
3195 | ||
093e61a6 RS |
3196 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3197 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
2121a768 | 3198 | echo "configure:3199: checking for pthread.h" >&5 |
093e61a6 RS |
3199 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3200 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3201 | else |
093e61a6 | 3202 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3203 | #line 3204 "configure" |
093e61a6 | 3204 | #include "confdefs.h" |
cafe096b | 3205 | #include <pthread.h> |
093e61a6 RS |
3206 | EOF |
3207 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2121a768 | 3208 | { (eval echo configure:3209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3209 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3210 | if test -z "$ac_err"; then | |
3211 | rm -rf conftest* | |
3212 | eval "ac_cv_header_$ac_safe=yes" | |
3213 | else | |
3214 | echo "$ac_err" >&5 | |
3215 | echo "configure: failed program was:" >&5 | |
3216 | cat conftest.$ac_ext >&5 | |
3217 | rm -rf conftest* | |
3218 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3219 | fi |
093e61a6 | 3220 | rm -f conftest* |
f24af81b | 3221 | fi |
093e61a6 RS |
3222 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3223 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3224 | have_pthread_h=yes |
3225 | else | |
093e61a6 RS |
3226 | echo "$ac_t""no" 1>&6 |
3227 | have_pthread_h= | |
f24af81b TT |
3228 | fi |
3229 | ||
3230 | ||
84c041a1 | 3231 | # These tests can't be done till we know if we have limits.h. |
093e61a6 | 3232 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
2121a768 | 3233 | echo "configure:3234: checking for CHAR_BIT" >&5 |
093e61a6 RS |
3234 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3235 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3236 | else | |
3237 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3238 | #line 3239 "configure" |
093e61a6 | 3239 | #include "confdefs.h" |
75e93faa ZW |
3240 | #ifdef HAVE_LIMITS_H |
3241 | #include <limits.h> | |
3242 | #endif | |
3243 | #ifdef CHAR_BIT | |
3244 | found | |
3245 | #endif | |
093e61a6 | 3246 | EOF |
75e93faa | 3247 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3248 | egrep "found" >/dev/null 2>&1; then |
3249 | rm -rf conftest* | |
75e93faa ZW |
3250 | gcc_cv_decl_char_bit=yes |
3251 | else | |
093e61a6 | 3252 | rm -rf conftest* |
75e93faa ZW |
3253 | gcc_cv_decl_char_bit=no |
3254 | fi | |
3255 | rm -f conftest* | |
3256 | ||
3257 | ||
3258 | fi | |
093e61a6 RS |
3259 | |
3260 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3261 | if test $gcc_cv_decl_char_bit = no; then |
093e61a6 | 3262 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
2121a768 | 3263 | echo "configure:3264: checking number of bits in a byte" >&5 |
093e61a6 RS |
3264 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3265 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3266 | else |
3267 | i=8 | |
3268 | gcc_cv_c_nbby= | |
3269 | while test $i -lt 65; do | |
093e61a6 | 3270 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3271 | #line 3272 "configure" |
093e61a6 | 3272 | #include "confdefs.h" |
75e93faa | 3273 | |
093e61a6 | 3274 | int main() { |
4e70264f ZW |
3275 | switch(0) { |
3276 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3277 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3278 | ; } | |
093e61a6 RS |
3279 | ; return 0; } |
3280 | EOF | |
2121a768 | 3281 | if { (eval echo configure:3282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3282 | rm -rf conftest* |
4e70264f | 3283 | gcc_cv_c_nbby=$i; break |
75e93faa | 3284 | else |
093e61a6 RS |
3285 | echo "configure: failed program was:" >&5 |
3286 | cat conftest.$ac_ext >&5 | |
75e93faa | 3287 | fi |
093e61a6 | 3288 | rm -f conftest* |
75e93faa ZW |
3289 | i=`expr $i + 1` |
3290 | done | |
3291 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3292 | ||
3293 | fi | |
093e61a6 RS |
3294 | |
3295 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3296 | if test $gcc_cv_c_nbby = failed; then |
093e61a6 | 3297 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3298 | else |
093e61a6 | 3299 | cat >> confdefs.h <<EOF |
75e93faa | 3300 | #define CHAR_BIT $gcc_cv_c_nbby |
093e61a6 | 3301 | EOF |
75e93faa ZW |
3302 | |
3303 | fi | |
3304 | fi | |
093e61a6 | 3305 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
2121a768 | 3306 | echo "configure:3307: checking whether byte ordering is bigendian" >&5 |
093e61a6 RS |
3307 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3308 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3309 | else |
4977bab6 ZW |
3310 | ac_cv_c_bigendian=unknown |
3311 | # See if sys/param.h defines the BYTE_ORDER macro. | |
093e61a6 | 3312 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3313 | #line 3314 "configure" |
093e61a6 | 3314 | #include "confdefs.h" |
4977bab6 ZW |
3315 | #include <sys/types.h> |
3316 | #include <sys/param.h> | |
093e61a6 | 3317 | int main() { |
2d6eb5bf | 3318 | |
4977bab6 ZW |
3319 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3320 | bogus endian macros | |
84c041a1 | 3321 | #endif |
093e61a6 RS |
3322 | ; return 0; } |
3323 | EOF | |
2121a768 | 3324 | if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3325 | rm -rf conftest* |
4977bab6 | 3326 | # It does; now see whether it defined to BIG_ENDIAN or not. |
093e61a6 | 3327 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3328 | #line 3329 "configure" |
093e61a6 | 3329 | #include "confdefs.h" |
4977bab6 ZW |
3330 | #include <sys/types.h> |
3331 | #include <sys/param.h> | |
093e61a6 | 3332 | int main() { |
4977bab6 ZW |
3333 | |
3334 | #if BYTE_ORDER != BIG_ENDIAN | |
3335 | not big endian | |
84c041a1 | 3336 | #endif |
093e61a6 RS |
3337 | ; return 0; } |
3338 | EOF | |
2121a768 | 3339 | if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3340 | rm -rf conftest* |
4977bab6 ZW |
3341 | ac_cv_c_bigendian=yes |
3342 | else | |
093e61a6 RS |
3343 | echo "configure: failed program was:" >&5 |
3344 | cat conftest.$ac_ext >&5 | |
3345 | rm -rf conftest* | |
3346 | ac_cv_c_bigendian=no | |
4977bab6 | 3347 | fi |
093e61a6 | 3348 | rm -f conftest* |
4977bab6 | 3349 | else |
093e61a6 RS |
3350 | echo "configure: failed program was:" >&5 |
3351 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3352 | fi |
093e61a6 | 3353 | rm -f conftest* |
4977bab6 ZW |
3354 | if test $ac_cv_c_bigendian = unknown; then |
3355 | if test "$cross_compiling" = yes; then | |
093e61a6 RS |
3356 | echo $ac_n "cross-compiling... " 2>&6 |
3357 | else | |
3358 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3359 | #line 3360 "configure" |
093e61a6 | 3360 | #include "confdefs.h" |
4977bab6 ZW |
3361 | main () { |
3362 | /* Are we little or big endian? From Harbison&Steele. */ | |
3363 | union | |
3364 | { | |
3365 | long l; | |
3366 | char c[sizeof (long)]; | |
3367 | } u; | |
3368 | u.l = 1; | |
3369 | exit (u.c[sizeof (long) - 1] == 1); | |
3370 | } | |
093e61a6 | 3371 | EOF |
2121a768 | 3372 | if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3373 | then |
4977bab6 ZW |
3374 | ac_cv_c_bigendian=no |
3375 | else | |
093e61a6 RS |
3376 | echo "configure: failed program was:" >&5 |
3377 | cat conftest.$ac_ext >&5 | |
3378 | rm -fr conftest* | |
3379 | ac_cv_c_bigendian=yes | |
4977bab6 | 3380 | fi |
093e61a6 | 3381 | rm -fr conftest* |
84c041a1 | 3382 | fi |
093e61a6 | 3383 | |
4977bab6 ZW |
3384 | fi |
3385 | fi | |
093e61a6 RS |
3386 | |
3387 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3388 | if test $ac_cv_c_bigendian = unknown; then |
093e61a6 | 3389 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
2121a768 | 3390 | echo "configure:3391: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3391 | |
4977bab6 ZW |
3392 | cat >conftest.c <<EOF |
3393 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3394 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3395 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3396 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3397 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3398 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3399 | int main() { _ascii (); _ebcdic (); return 0; } | |
3400 | EOF | |
3401 | if test -f conftest.c ; then | |
3402 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3403 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3404 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3405 | ac_cv_c_bigendian=yes | |
3406 | fi | |
3407 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3408 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3409 | if test $ac_cv_c_bigendian = yes ; then | |
3410 | ac_cv_c_bigendian=unknown; | |
3411 | else | |
3412 | ac_cv_c_bigendian=no | |
3413 | fi | |
3414 | fi | |
3415 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3416 | fi | |
3417 | fi | |
093e61a6 | 3418 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3419 | fi |
4977bab6 | 3420 | if test $ac_cv_c_bigendian = yes; then |
093e61a6 | 3421 | cat >> confdefs.h <<\EOF |
4977bab6 | 3422 | #define WORDS_BIGENDIAN 1 |
093e61a6 | 3423 | EOF |
cafe096b | 3424 | |
093e61a6 | 3425 | cat >> confdefs.h <<\EOF |
84c041a1 | 3426 | #define HOST_WORDS_BIG_ENDIAN 1 |
093e61a6 | 3427 | EOF |
84c041a1 | 3428 | |
4977bab6 ZW |
3429 | BYTEORDER=4321 |
3430 | else | |
3431 | BYTEORDER=1234 | |
3432 | fi | |
093e61a6 | 3433 | cat >> confdefs.h <<EOF |
4977bab6 | 3434 | #define BYTEORDER $BYTEORDER |
093e61a6 | 3435 | EOF |
4977bab6 ZW |
3436 | |
3437 | if test $ac_cv_c_bigendian = unknown; then | |
093e61a6 | 3438 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3439 | fi |
3440 | ||
75e93faa | 3441 | |
73458fb7 NN |
3442 | # -------- |
3443 | # UNSORTED | |
3444 | # -------- | |
1e608388 | 3445 | |
73458fb7 NN |
3446 | # Stage specific cflags for build. |
3447 | stage1_cflags= | |
3448 | case $build in | |
3449 | vax-*-*) | |
3450 | if test x$GCC = xyes | |
3451 | then | |
3452 | stage1_cflags="-Wa,-J" | |
3453 | else | |
3454 | stage1_cflags="-J" | |
3455 | fi | |
3456 | ;; | |
3457 | powerpc-*-darwin*) | |
3458 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3459 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3460 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3461 | # that too. | |
3462 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3463 | ;; | |
3464 | esac | |
1e608388 | 3465 | |
1e608388 | 3466 | |
4e70264f ZW |
3467 | # These libraries may be used by collect2. |
3468 | # We may need a special search path to get them linked. | |
093e61a6 | 3469 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
2121a768 | 3470 | echo "configure:3471: checking for collect2 libraries" >&5 |
093e61a6 RS |
3471 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3472 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3473 | else |
3474 | save_LIBS="$LIBS" | |
7f2749d4 | 3475 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3476 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3477 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3478 | do | |
3479 | LIBS="$libs" | |
093e61a6 | 3480 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3481 | #line 3482 "configure" |
093e61a6 | 3482 | #include "confdefs.h" |
4e70264f ZW |
3483 | /* Override any gcc2 internal prototype to avoid an error. */ |
3484 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3485 | builtin and then its argument prototype would still apply. */ |
3486 | char ldopen(); | |
3487 | ||
3488 | int main() { | |
3489 | ldopen() | |
3490 | ; return 0; } | |
3491 | EOF | |
2121a768 | 3492 | if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3493 | rm -rf conftest* |
4e70264f ZW |
3494 | gcc_cv_collect2_libs="$libs"; break |
3495 | else | |
093e61a6 RS |
3496 | echo "configure: failed program was:" >&5 |
3497 | cat conftest.$ac_ext >&5 | |
4e70264f | 3498 | fi |
093e61a6 | 3499 | rm -f conftest* |
4e70264f ZW |
3500 | done |
3501 | LIBS="$save_LIBS" | |
3502 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3503 | fi | |
093e61a6 RS |
3504 | |
3505 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3506 | case $gcc_cv_collect2_libs in |
3507 | "none required") ;; | |
3508 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3509 | esac | |
3510 | ||
3511 | ||
7f2749d4 RK |
3512 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3513 | # -lexc. So test for it. | |
3514 | save_LIBS="$LIBS" | |
3515 | LIBS= | |
3516 | ||
093e61a6 | 3517 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
2121a768 | 3518 | echo "configure:3519: checking for library containing exc_resume" >&5 |
093e61a6 RS |
3519 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3520 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3521 | else | |
3522 | ac_func_search_save_LIBS="$LIBS" | |
3523 | ac_cv_search_exc_resume="no" | |
3524 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3525 | #line 3526 "configure" |
093e61a6 | 3526 | #include "confdefs.h" |
7f2749d4 RK |
3527 | /* Override any gcc2 internal prototype to avoid an error. */ |
3528 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3529 | builtin and then its argument prototype would still apply. */ |
3530 | char exc_resume(); | |
3531 | ||
3532 | int main() { | |
3533 | exc_resume() | |
3534 | ; return 0; } | |
3535 | EOF | |
2121a768 | 3536 | if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3537 | rm -rf conftest* |
7f2749d4 RK |
3538 | ac_cv_search_exc_resume="none required" |
3539 | else | |
093e61a6 RS |
3540 | echo "configure: failed program was:" >&5 |
3541 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3542 | fi |
093e61a6 RS |
3543 | rm -f conftest* |
3544 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3545 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3546 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3547 | #line 3548 "configure" |
093e61a6 | 3548 | #include "confdefs.h" |
7f2749d4 RK |
3549 | /* Override any gcc2 internal prototype to avoid an error. */ |
3550 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3551 | builtin and then its argument prototype would still apply. */ |
3552 | char exc_resume(); | |
3553 | ||
3554 | int main() { | |
3555 | exc_resume() | |
3556 | ; return 0; } | |
3557 | EOF | |
2121a768 | 3558 | if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3559 | rm -rf conftest* |
3560 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3561 | break |
3562 | else | |
093e61a6 RS |
3563 | echo "configure: failed program was:" >&5 |
3564 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3565 | fi |
093e61a6 RS |
3566 | rm -f conftest* |
3567 | done | |
3568 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3569 | fi |
cafe096b | 3570 | |
093e61a6 RS |
3571 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3572 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3573 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3574 | ||
3575 | else : | |
3576 | ||
7f2749d4 RK |
3577 | fi |
3578 | GNAT_LIBEXC="$LIBS" | |
3579 | LIBS="$save_LIBS" | |
3580 | ||
3581 | ||
62c9aa5f ZW |
3582 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3583 | # they're both in the same place. jcf-dump needs them. | |
3584 | save_LIBS="$LIBS" | |
3585 | LIBS= | |
3586 | ||
093e61a6 | 3587 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
2121a768 | 3588 | echo "configure:3589: checking for library containing ldexp" >&5 |
093e61a6 RS |
3589 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3590 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3591 | else | |
3592 | ac_func_search_save_LIBS="$LIBS" | |
3593 | ac_cv_search_ldexp="no" | |
3594 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3595 | #line 3596 "configure" |
093e61a6 | 3596 | #include "confdefs.h" |
62c9aa5f ZW |
3597 | /* Override any gcc2 internal prototype to avoid an error. */ |
3598 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3599 | builtin and then its argument prototype would still apply. */ |
3600 | char ldexp(); | |
3601 | ||
3602 | int main() { | |
3603 | ldexp() | |
3604 | ; return 0; } | |
3605 | EOF | |
2121a768 | 3606 | if { (eval echo configure:3607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3607 | rm -rf conftest* |
62c9aa5f ZW |
3608 | ac_cv_search_ldexp="none required" |
3609 | else | |
093e61a6 RS |
3610 | echo "configure: failed program was:" >&5 |
3611 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3612 | fi |
093e61a6 RS |
3613 | rm -f conftest* |
3614 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3615 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3616 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3617 | #line 3618 "configure" |
093e61a6 | 3618 | #include "confdefs.h" |
62c9aa5f ZW |
3619 | /* Override any gcc2 internal prototype to avoid an error. */ |
3620 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3621 | builtin and then its argument prototype would still apply. */ |
3622 | char ldexp(); | |
3623 | ||
3624 | int main() { | |
3625 | ldexp() | |
3626 | ; return 0; } | |
3627 | EOF | |
2121a768 | 3628 | if { (eval echo configure:3629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3629 | rm -rf conftest* |
3630 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3631 | break |
3632 | else | |
093e61a6 RS |
3633 | echo "configure: failed program was:" >&5 |
3634 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3635 | fi |
093e61a6 RS |
3636 | rm -f conftest* |
3637 | done | |
3638 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3639 | fi |
cafe096b | 3640 | |
093e61a6 RS |
3641 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3642 | if test "$ac_cv_search_ldexp" != "no"; then | |
3643 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3644 | ||
3645 | else : | |
3646 | ||
62c9aa5f ZW |
3647 | fi |
3648 | LDEXP_LIB="$LIBS" | |
3649 | LIBS="$save_LIBS" | |
3650 | ||
3651 | ||
890ad3ea | 3652 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3653 | # preprocessor stringification operator. (Used by symcat.h.) |
093e61a6 RS |
3654 | |
3655 | ||
3656 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
2121a768 | 3657 | echo "configure:3658: checking for preprocessor stringizing operator" >&5 |
093e61a6 RS |
3658 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
3659 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3660 | else | |
3661 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3662 | #line 3663 "configure" |
093e61a6 RS |
3663 | #include "confdefs.h" |
3664 | ||
890ad3ea KG |
3665 | #define x(y) #y |
3666 | ||
3667 | char *s = x(teststring); | |
093e61a6 RS |
3668 | |
3669 | EOF | |
890ad3ea | 3670 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3671 | egrep "#teststring" >/dev/null 2>&1; then |
3672 | rm -rf conftest* | |
890ad3ea | 3673 | ac_cv_c_stringize=no |
76844337 | 3674 | else |
093e61a6 | 3675 | rm -rf conftest* |
890ad3ea | 3676 | ac_cv_c_stringize=yes |
76844337 RH |
3677 | fi |
3678 | rm -f conftest* | |
890ad3ea | 3679 | |
76844337 RH |
3680 | fi |
3681 | ||
093e61a6 RS |
3682 | if test "${ac_cv_c_stringize}" = yes |
3683 | then | |
3684 | cat >> confdefs.h <<\EOF | |
890ad3ea | 3685 | #define HAVE_STRINGIZE 1 |
093e61a6 | 3686 | EOF |
76844337 RH |
3687 | |
3688 | fi | |
093e61a6 | 3689 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
890ad3ea | 3690 | |
76844337 | 3691 | |
956d6950 JL |
3692 | # Use <inttypes.h> only if it exists, |
3693 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
093e61a6 | 3694 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
2121a768 | 3695 | echo "configure:3696: checking for inttypes.h" >&5 |
093e61a6 RS |
3696 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3697 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3698 | else | |
3699 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3700 | #line 3701 "configure" |
093e61a6 | 3701 | #include "confdefs.h" |
956d6950 JL |
3702 | #include <sys/types.h> |
3703 | #include <inttypes.h> | |
093e61a6 | 3704 | int main() { |
956d6950 | 3705 | intmax_t i = -1; |
093e61a6 RS |
3706 | ; return 0; } |
3707 | EOF | |
2121a768 | 3708 | if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3709 | rm -rf conftest* |
0056a9b5 | 3710 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3711 | else |
093e61a6 RS |
3712 | echo "configure: failed program was:" >&5 |
3713 | cat conftest.$ac_ext >&5 | |
3714 | rm -rf conftest* | |
3715 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3716 | fi |
093e61a6 | 3717 | rm -f conftest* |
956d6950 JL |
3718 | fi |
3719 | ||
093e61a6 | 3720 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3721 | if test $gcc_cv_header_inttypes_h = yes; then |
093e61a6 | 3722 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3723 | #define HAVE_INTTYPES_H 1 |
093e61a6 | 3724 | EOF |
0056a9b5 KG |
3725 | |
3726 | fi | |
956d6950 | 3727 | |
c149cc37 | 3728 | |
6af8c740 KG |
3729 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3730 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 | 3731 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
1072ec3f | 3732 | scandir alphasort gettimeofday mbstowcs wcswidth mmap |
956d6950 | 3733 | do |
093e61a6 | 3734 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
2121a768 | 3735 | echo "configure:3736: checking for $ac_func" >&5 |
093e61a6 RS |
3736 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3737 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3738 | else | |
3739 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3740 | #line 3741 "configure" |
093e61a6 | 3741 | #include "confdefs.h" |
956d6950 | 3742 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
3743 | which can conflict with char $ac_func(); below. */ |
3744 | #include <assert.h> | |
956d6950 JL |
3745 | /* Override any gcc2 internal prototype to avoid an error. */ |
3746 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3747 | builtin and then its argument prototype would still apply. */ |
3748 | char $ac_func(); | |
3749 | ||
3750 | int main() { | |
3751 | ||
956d6950 JL |
3752 | /* The GNU C library defines this for functions which it implements |
3753 | to always fail with ENOSYS. Some functions are actually named | |
3754 | something starting with __ and the normal name is an alias. */ | |
3755 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3756 | choke me | |
3757 | #else | |
093e61a6 | 3758 | $ac_func(); |
956d6950 JL |
3759 | #endif |
3760 | ||
093e61a6 RS |
3761 | ; return 0; } |
3762 | EOF | |
2121a768 | 3763 | if { (eval echo configure:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3764 | rm -rf conftest* |
3765 | eval "ac_cv_func_$ac_func=yes" | |
3766 | else | |
3767 | echo "configure: failed program was:" >&5 | |
3768 | cat conftest.$ac_ext >&5 | |
3769 | rm -rf conftest* | |
3770 | eval "ac_cv_func_$ac_func=no" | |
3771 | fi | |
3772 | rm -f conftest* | |
3773 | fi | |
956d6950 | 3774 | |
093e61a6 RS |
3775 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3776 | echo "$ac_t""yes" 1>&6 | |
3777 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3778 | cat >> confdefs.h <<EOF | |
3779 | #define $ac_tr_func 1 | |
3780 | EOF | |
3781 | ||
3782 | else | |
3783 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3784 | fi |
3785 | done | |
3786 | ||
6885fc87 | 3787 | |
39f6c4c8 | 3788 | if test x$ac_cv_func_mbstowcs = xyes; then |
093e61a6 | 3789 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
2121a768 | 3790 | echo "configure:3791: checking whether mbstowcs works" >&5 |
093e61a6 RS |
3791 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3792 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3793 | else |
3794 | if test "$cross_compiling" = yes; then | |
3795 | gcc_cv_func_mbstowcs_works=yes | |
3796 | else | |
093e61a6 | 3797 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3798 | #line 3799 "configure" |
093e61a6 | 3799 | #include "confdefs.h" |
39f6c4c8 KW |
3800 | #include <stdlib.h> |
3801 | int main() | |
3802 | { | |
3803 | mbstowcs(0, "", 0); | |
3804 | return 0; | |
3805 | } | |
093e61a6 | 3806 | EOF |
2121a768 | 3807 | if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3808 | then |
39f6c4c8 KW |
3809 | gcc_cv_func_mbstowcs_works=yes |
3810 | else | |
093e61a6 RS |
3811 | echo "configure: failed program was:" >&5 |
3812 | cat conftest.$ac_ext >&5 | |
3813 | rm -fr conftest* | |
3814 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3815 | fi |
093e61a6 | 3816 | rm -fr conftest* |
39f6c4c8 | 3817 | fi |
093e61a6 | 3818 | |
39f6c4c8 | 3819 | fi |
cafe096b | 3820 | |
093e61a6 RS |
3821 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3822 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3823 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3824 | #define HAVE_WORKING_MBSTOWCS 1 |
093e61a6 | 3825 | EOF |
39f6c4c8 KW |
3826 | |
3827 | fi | |
3828 | fi | |
3829 | ||
093e61a6 | 3830 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
2121a768 | 3831 | echo "configure:3832: checking for ssize_t" >&5 |
093e61a6 RS |
3832 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f12bc141 | 3834 | else |
093e61a6 | 3835 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3836 | #line 3837 "configure" |
093e61a6 RS |
3837 | #include "confdefs.h" |
3838 | #include <sys/types.h> | |
3839 | #if STDC_HEADERS | |
3840 | #include <stdlib.h> | |
3841 | #include <stddef.h> | |
3842 | #endif | |
3843 | EOF | |
3844 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3845 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3846 | rm -rf conftest* | |
cb65112a | 3847 | ac_cv_type_ssize_t=yes |
f12bc141 | 3848 | else |
093e61a6 RS |
3849 | rm -rf conftest* |
3850 | ac_cv_type_ssize_t=no | |
f12bc141 | 3851 | fi |
093e61a6 | 3852 | rm -f conftest* |
cafe096b | 3853 | |
093e61a6 RS |
3854 | fi |
3855 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3856 | if test $ac_cv_type_ssize_t = no; then | |
3857 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3858 | #define ssize_t int |
093e61a6 | 3859 | EOF |
f12bc141 ZW |
3860 | |
3861 | fi | |
3862 | ||
0b9d02c6 | 3863 | |
e256b8b6 DA |
3864 | # Try to determine the array type of the second argument of getgroups |
3865 | # for the target system (int or gid_t). | |
093e61a6 | 3866 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
2121a768 | 3867 | echo "configure:3868: checking for uid_t in sys/types.h" >&5 |
093e61a6 RS |
3868 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3870 | else | |
3871 | cat > conftest.$ac_ext <<EOF | |
2121a768 | 3872 | #line 3873 "configure" |
093e61a6 | 3873 | #include "confdefs.h" |
e256b8b6 | 3874 | #include <sys/types.h> |
093e61a6 | 3875 | EOF |
e256b8b6 | 3876 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3877 | egrep "uid_t" >/dev/null 2>&1; then |
3878 | rm -rf conftest* | |
e256b8b6 DA |
3879 | ac_cv_type_uid_t=yes |
3880 | else | |
093e61a6 | 3881 | rm -rf conftest* |
e256b8b6 DA |
3882 | ac_cv_type_uid_t=no |
3883 | fi | |
3884 | rm -f conftest* | |
3885 | ||
3886 | fi | |
cafe096b | 3887 | |
093e61a6 RS |
3888 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3889 | if test $ac_cv_type_uid_t = no; then | |
3890 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3891 | #define uid_t int |
093e61a6 | 3892 | EOF |
cafe096b | 3893 | |
093e61a6 | 3894 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3895 | #define gid_t int |
093e61a6 | 3896 | EOF |
e256b8b6 DA |
3897 | |
3898 | fi | |
3899 | ||
093e61a6 | 3900 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
2121a768 | 3901 | echo "configure:3902: checking type of array argument to getgroups" >&5 |
093e61a6 RS |
3902 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3903 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3904 | else |
3905 | if test "$cross_compiling" = yes; then | |
3906 | ac_cv_type_getgroups=cross | |
3907 | else | |
093e61a6 | 3908 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3909 | #line 3910 "configure" |
093e61a6 RS |
3910 | #include "confdefs.h" |
3911 | ||
e256b8b6 DA |
3912 | /* Thanks to Mike Rendell for this test. */ |
3913 | #include <sys/types.h> | |
3914 | #define NGID 256 | |
3915 | #undef MAX | |
3916 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
093e61a6 | 3917 | main() |
e256b8b6 DA |
3918 | { |
3919 | gid_t gidset[NGID]; | |
3920 | int i, n; | |
3921 | union { gid_t gval; long lval; } val; | |
3922 | ||
3923 | val.lval = -1; | |
3924 | for (i = 0; i < NGID; i++) | |
3925 | gidset[i] = val.gval; | |
3926 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3927 | gidset); | |
3928 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3929 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3930 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3931 | } | |
cafe096b | 3932 | |
093e61a6 | 3933 | EOF |
2121a768 | 3934 | if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 RS |
3935 | then |
3936 | ac_cv_type_getgroups=gid_t | |
3937 | else | |
3938 | echo "configure: failed program was:" >&5 | |
3939 | cat conftest.$ac_ext >&5 | |
3940 | rm -fr conftest* | |
3941 | ac_cv_type_getgroups=int | |
e256b8b6 | 3942 | fi |
093e61a6 | 3943 | rm -fr conftest* |
e256b8b6 | 3944 | fi |
093e61a6 | 3945 | |
e256b8b6 | 3946 | if test $ac_cv_type_getgroups = cross; then |
093e61a6 | 3947 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3948 | #line 3949 "configure" |
093e61a6 | 3949 | #include "confdefs.h" |
e256b8b6 | 3950 | #include <unistd.h> |
093e61a6 | 3951 | EOF |
e256b8b6 | 3952 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3953 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3954 | rm -rf conftest* | |
e256b8b6 DA |
3955 | ac_cv_type_getgroups=gid_t |
3956 | else | |
093e61a6 | 3957 | rm -rf conftest* |
e256b8b6 DA |
3958 | ac_cv_type_getgroups=int |
3959 | fi | |
3960 | rm -f conftest* | |
3961 | ||
3962 | fi | |
3963 | fi | |
3964 | ||
093e61a6 RS |
3965 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3966 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3967 | #define GETGROUPS_T $ac_cv_type_getgroups |
093e61a6 | 3968 | EOF |
e256b8b6 DA |
3969 | |
3970 | ||
3971 | if test "${target}" = "${build}"; then | |
3972 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3973 | else | |
3974 | case "${target}" in | |
3975 | # This condition may need some tweaking. It should include all | |
3976 | # targets where the array type of the second argument of getgroups | |
3977 | # is int and the type of gid_t is not equivalent to int. | |
3978 | *-*-sunos* | *-*-ultrix*) | |
3979 | TARGET_GETGROUPS_T=int | |
3980 | ;; | |
3981 | *) | |
3982 | TARGET_GETGROUPS_T=gid_t | |
3983 | ;; | |
3984 | esac | |
3985 | fi | |
3986 | ||
3987 | ||
093e61a6 | 3988 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
2121a768 | 3989 | echo "configure:3990: checking whether the printf functions support %p" >&5 |
093e61a6 RS |
3990 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3991 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
3992 | else |
3993 | if test "$cross_compiling" = yes; then | |
3994 | gcc_cv_func_printf_ptr=no | |
3995 | else | |
093e61a6 | 3996 | cat > conftest.$ac_ext <<EOF |
2121a768 | 3997 | #line 3998 "configure" |
093e61a6 | 3998 | #include "confdefs.h" |
0a4b6309 RL |
3999 | #include <stdio.h> |
4000 | ||
86cf1cbd | 4001 | int main() |
0a4b6309 RL |
4002 | { |
4003 | char buf[64]; | |
4004 | char *p = buf, *q = NULL; | |
4005 | sprintf(buf, "%p", p); | |
4006 | sscanf(buf, "%p", &q); | |
86cf1cbd | 4007 | return (p != q); |
0a4b6309 | 4008 | } |
093e61a6 | 4009 | EOF |
2121a768 | 4010 | if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4011 | then |
0a4b6309 RL |
4012 | gcc_cv_func_printf_ptr=yes |
4013 | else | |
093e61a6 RS |
4014 | echo "configure: failed program was:" >&5 |
4015 | cat conftest.$ac_ext >&5 | |
4016 | rm -fr conftest* | |
4017 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 4018 | fi |
093e61a6 | 4019 | rm -fr conftest* |
0a4b6309 | 4020 | fi |
093e61a6 | 4021 | |
0a4b6309 RL |
4022 | rm -f core core.* *.core |
4023 | fi | |
cafe096b | 4024 | |
093e61a6 RS |
4025 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
4026 | if test $gcc_cv_func_printf_ptr = yes ; then | |
4027 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 4028 | #define HAVE_PRINTF_PTR 1 |
093e61a6 | 4029 | EOF |
0a4b6309 RL |
4030 | |
4031 | fi | |
4032 | ||
1072ec3f ZW |
4033 | if test $ac_cv_header_sys_mman_h != yes \ |
4034 | || test $ac_cv_func_mmap != yes; then | |
4035 | gcc_cv_func_mmap_file=no | |
4036 | gcc_cv_func_mmap_dev_zero=no | |
4037 | gcc_cv_func_mmap_anon=no | |
4038 | else | |
4039 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 | |
4040 | echo "configure:4041: checking whether read-only mmap of a plain file works" >&5 | |
4041 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then | |
4042 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4043 | else | |
4044 | # Add a system to this blacklist if | |
4045 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a | |
4046 | # memory area containing the same data that you'd get if you applied | |
4047 | # read() to the same fd. The only system known to have a problem here | |
4048 | # is VMS, where text files have record structure. | |
4049 | case "$host_os" in | |
4050 | vms*) | |
4051 | gcc_cv_func_mmap_file=no ;; | |
4052 | *) | |
4053 | gcc_cv_func_mmap_file=yes;; | |
4054 | esac | |
4055 | fi | |
4056 | ||
4057 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
4058 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
4059 | echo "configure:4060: checking whether mmap from /dev/zero works" >&5 | |
4060 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then | |
4061 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4062 | else | |
4063 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
4064 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
4065 | # zeroed pages with both the following properties: | |
4066 | # 1. If you map N consecutive pages in with one call, and then | |
4067 | # unmap any subset of those pages, the pages that were not | |
4068 | # explicitly unmapped remain accessible. | |
4069 | # 2. If you map two adjacent blocks of memory and then unmap them | |
4070 | # both at once, they must both go away. | |
4071 | # Systems known to be in this category are Windows (all variants), | |
4072 | # VMS, and Darwin. | |
4073 | case "$host_os" in | |
4074 | vms* | cygwin* | pe | mingw* | darwin*) | |
4075 | gcc_cv_func_mmap_dev_zero=no ;; | |
4076 | *) | |
4077 | gcc_cv_func_mmap_dev_zero=yes;; | |
4078 | esac | |
4079 | fi | |
4080 | ||
4081 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
4082 | ||
4083 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
4084 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
4085 | echo "configure:4086: checking for MAP_ANON(YMOUS)" >&5 | |
4086 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then | |
4087 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4088 | else | |
4089 | cat > conftest.$ac_ext <<EOF | |
4090 | #line 4091 "configure" | |
4091 | #include "confdefs.h" | |
4092 | #include <sys/types.h> | |
4093 | #include <sys/mman.h> | |
4094 | #include <unistd.h> | |
4095 | ||
4096 | #ifndef MAP_ANONYMOUS | |
4097 | #define MAP_ANONYMOUS MAP_ANON | |
4098 | #endif | |
4099 | ||
4100 | int main() { | |
4101 | int n = MAP_ANONYMOUS; | |
4102 | ; return 0; } | |
4103 | EOF | |
4104 | if { (eval echo configure:4105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
4105 | rm -rf conftest* | |
4106 | gcc_cv_decl_map_anon=yes | |
4107 | else | |
4108 | echo "configure: failed program was:" >&5 | |
4109 | cat conftest.$ac_ext >&5 | |
4110 | rm -rf conftest* | |
4111 | gcc_cv_decl_map_anon=no | |
4112 | fi | |
4113 | rm -f conftest* | |
4114 | fi | |
4115 | ||
4116 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
4117 | ||
4118 | if test $gcc_cv_decl_map_anon = no; then | |
4119 | gcc_cv_func_mmap_anon=no | |
4120 | else | |
4121 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 | |
4122 | echo "configure:4123: checking whether mmap with MAP_ANON(YMOUS) works" >&5 | |
4123 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then | |
4124 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4125 | else | |
4126 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
4127 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
4128 | # doesn't give anonymous zeroed pages with the same properties listed | |
4129 | # above for use of /dev/zero. | |
4130 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
4131 | case "$host_os" in | |
4132 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
4133 | gcc_cv_func_mmap_anon=no ;; | |
4134 | *) | |
4135 | gcc_cv_func_mmap_anon=yes;; | |
4136 | esac | |
4137 | fi | |
4138 | ||
4139 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
4140 | fi | |
4141 | fi | |
4142 | ||
4143 | if test $gcc_cv_func_mmap_file = yes; then | |
4144 | cat >> confdefs.h <<\EOF | |
4145 | #define HAVE_MMAP_FILE 1 | |
4146 | EOF | |
4147 | ||
4148 | fi | |
4149 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
4150 | cat >> confdefs.h <<\EOF | |
4151 | #define HAVE_MMAP_DEV_ZERO 1 | |
4152 | EOF | |
4153 | ||
4154 | fi | |
4155 | if test $gcc_cv_func_mmap_anon = yes; then | |
4156 | cat >> confdefs.h <<\EOF | |
4157 | #define HAVE_MMAP_ANON 1 | |
4158 | EOF | |
4159 | ||
4160 | fi | |
4161 | ||
b27d2bd5 MK |
4162 | |
4163 | case "${host}" in | |
4164 | *-*-uwin*) | |
093e61a6 | 4165 | { echo "configure: error: |
cafe096b | 4166 | *** UWIN may not be used as a host platform because |
093e61a6 | 4167 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } |
b27d2bd5 | 4168 | ;; |
ee262b6f | 4169 | *-*-*vms*) |
093e61a6 | 4170 | # Under VMS, vfork works very different than on Unix. The standard test |
ee262b6f DR |
4171 | # won't work, and it isn't easily adaptable. It makes more sense to |
4172 | # just force it. | |
4173 | ac_cv_func_vfork_works=yes | |
4174 | ;; | |
b27d2bd5 | 4175 | esac |
093e61a6 | 4176 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
1072ec3f | 4177 | echo "configure:4178: checking for pid_t" >&5 |
093e61a6 RS |
4178 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4179 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4180 | else | |
4181 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4182 | #line 4183 "configure" |
093e61a6 RS |
4183 | #include "confdefs.h" |
4184 | #include <sys/types.h> | |
4185 | #if STDC_HEADERS | |
4186 | #include <stdlib.h> | |
4187 | #include <stddef.h> | |
4188 | #endif | |
4189 | EOF | |
4190 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4191 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4192 | rm -rf conftest* | |
cb65112a | 4193 | ac_cv_type_pid_t=yes |
c375c43b | 4194 | else |
093e61a6 RS |
4195 | rm -rf conftest* |
4196 | ac_cv_type_pid_t=no | |
c375c43b | 4197 | fi |
093e61a6 | 4198 | rm -f conftest* |
cafe096b | 4199 | |
093e61a6 RS |
4200 | fi |
4201 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4202 | if test $ac_cv_type_pid_t = no; then | |
4203 | cat >> confdefs.h <<\EOF | |
c375c43b | 4204 | #define pid_t int |
093e61a6 | 4205 | EOF |
c375c43b KG |
4206 | |
4207 | fi | |
4208 | ||
093e61a6 RS |
4209 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4210 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
1072ec3f | 4211 | echo "configure:4212: checking for vfork.h" >&5 |
093e61a6 RS |
4212 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 4214 | else |
093e61a6 | 4215 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4216 | #line 4217 "configure" |
093e61a6 RS |
4217 | #include "confdefs.h" |
4218 | #include <vfork.h> | |
4219 | EOF | |
4220 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1072ec3f | 4221 | { (eval echo configure:4222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
4222 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4223 | if test -z "$ac_err"; then | |
4224 | rm -rf conftest* | |
4225 | eval "ac_cv_header_$ac_safe=yes" | |
4226 | else | |
4227 | echo "$ac_err" >&5 | |
4228 | echo "configure: failed program was:" >&5 | |
4229 | cat conftest.$ac_ext >&5 | |
4230 | rm -rf conftest* | |
4231 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4232 | fi |
093e61a6 | 4233 | rm -f conftest* |
c375c43b | 4234 | fi |
093e61a6 RS |
4235 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4236 | echo "$ac_t""yes" 1>&6 | |
4237 | cat >> confdefs.h <<\EOF | |
4238 | #define HAVE_VFORK_H 1 | |
4239 | EOF | |
c375c43b | 4240 | |
093e61a6 RS |
4241 | else |
4242 | echo "$ac_t""no" 1>&6 | |
c375c43b KG |
4243 | fi |
4244 | ||
093e61a6 | 4245 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
1072ec3f | 4246 | echo "configure:4247: checking for working vfork" >&5 |
093e61a6 RS |
4247 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4248 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4249 | else | |
4250 | if test "$cross_compiling" = yes; then | |
4251 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
1072ec3f | 4252 | echo "configure:4253: checking for vfork" >&5 |
093e61a6 RS |
4253 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4254 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4255 | else | |
4256 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4257 | #line 4258 "configure" |
093e61a6 | 4258 | #include "confdefs.h" |
c375c43b | 4259 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
4260 | which can conflict with char vfork(); below. */ |
4261 | #include <assert.h> | |
c375c43b KG |
4262 | /* Override any gcc2 internal prototype to avoid an error. */ |
4263 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
4264 | builtin and then its argument prototype would still apply. */ |
4265 | char vfork(); | |
4266 | ||
4267 | int main() { | |
4268 | ||
c375c43b KG |
4269 | /* The GNU C library defines this for functions which it implements |
4270 | to always fail with ENOSYS. Some functions are actually named | |
4271 | something starting with __ and the normal name is an alias. */ | |
093e61a6 | 4272 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4273 | choke me |
4274 | #else | |
093e61a6 | 4275 | vfork(); |
c375c43b KG |
4276 | #endif |
4277 | ||
093e61a6 RS |
4278 | ; return 0; } |
4279 | EOF | |
1072ec3f | 4280 | if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4281 | rm -rf conftest* |
4282 | eval "ac_cv_func_vfork=yes" | |
4283 | else | |
4284 | echo "configure: failed program was:" >&5 | |
4285 | cat conftest.$ac_ext >&5 | |
4286 | rm -rf conftest* | |
4287 | eval "ac_cv_func_vfork=no" | |
4288 | fi | |
4289 | rm -f conftest* | |
c375c43b KG |
4290 | fi |
4291 | ||
093e61a6 RS |
4292 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4293 | echo "$ac_t""yes" 1>&6 | |
4294 | : | |
c375c43b | 4295 | else |
093e61a6 | 4296 | echo "$ac_t""no" 1>&6 |
c375c43b | 4297 | fi |
093e61a6 | 4298 | |
c375c43b KG |
4299 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4300 | else | |
093e61a6 | 4301 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4302 | #line 4303 "configure" |
093e61a6 | 4303 | #include "confdefs.h" |
c375c43b KG |
4304 | /* Thanks to Paul Eggert for this test. */ |
4305 | #include <stdio.h> | |
4306 | #include <sys/types.h> | |
4307 | #include <sys/stat.h> | |
093e61a6 RS |
4308 | #ifdef HAVE_UNISTD_H |
4309 | #include <unistd.h> | |
c375c43b | 4310 | #endif |
093e61a6 RS |
4311 | #ifdef HAVE_VFORK_H |
4312 | #include <vfork.h> | |
c375c43b KG |
4313 | #endif |
4314 | /* On some sparc systems, changes by the child to local and incoming | |
093e61a6 RS |
4315 | argument registers are propagated back to the parent. |
4316 | The compiler is told about this with #include <vfork.h>, | |
4317 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4318 | Test for this by using a static variable whose address | |
4319 | is put into a register that is clobbered by the vfork. */ | |
4320 | static | |
c375c43b KG |
4321 | #ifdef __cplusplus |
4322 | sparc_address_test (int arg) | |
093e61a6 | 4323 | #else |
c375c43b KG |
4324 | sparc_address_test (arg) int arg; |
4325 | #endif | |
4326 | { | |
4327 | static pid_t child; | |
4328 | if (!child) { | |
4329 | child = vfork (); | |
4330 | if (child < 0) { | |
4331 | perror ("vfork"); | |
4332 | _exit(2); | |
4333 | } | |
4334 | if (!child) { | |
4335 | arg = getpid(); | |
4336 | write(-1, "", 0); | |
4337 | _exit (arg); | |
4338 | } | |
4339 | } | |
4340 | } | |
093e61a6 | 4341 | main() { |
c375c43b KG |
4342 | pid_t parent = getpid (); |
4343 | pid_t child; | |
4344 | ||
093e61a6 | 4345 | sparc_address_test (); |
c375c43b KG |
4346 | |
4347 | child = vfork (); | |
4348 | ||
4349 | if (child == 0) { | |
093e61a6 RS |
4350 | /* Here is another test for sparc vfork register problems. |
4351 | This test uses lots of local variables, at least | |
4352 | as many local variables as main has allocated so far | |
4353 | including compiler temporaries. 4 locals are enough for | |
4354 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4355 | A buggy compiler should reuse the register of parent | |
4356 | for one of the local variables, since it will think that | |
4357 | parent can't possibly be used any more in this routine. | |
4358 | Assigning to the local variable will thus munge parent | |
4359 | in the parent process. */ | |
c375c43b KG |
4360 | pid_t |
4361 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4362 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4363 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4364 | use the same hardware register for all 8 local variables. */ | |
4365 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4366 | || p != p5 || p != p6 || p != p7) | |
4367 | _exit(1); | |
4368 | ||
093e61a6 RS |
4369 | /* On some systems (e.g. IRIX 3.3), |
4370 | vfork doesn't separate parent from child file descriptors. | |
4371 | If the child closes a descriptor before it execs or exits, | |
4372 | this munges the parent's descriptor as well. | |
4373 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4374 | _exit(close(fileno(stdout)) != 0); |
4375 | } else { | |
4376 | int status; | |
4377 | struct stat st; | |
4378 | ||
4379 | while (wait(&status) != child) | |
4380 | ; | |
4381 | exit( | |
4382 | /* Was there some problem with vforking? */ | |
4383 | child < 0 | |
4384 | ||
4385 | /* Did the child fail? (This shouldn't happen.) */ | |
4386 | || status | |
4387 | ||
4388 | /* Did the vfork/compiler bug occur? */ | |
4389 | || parent != getpid() | |
4390 | ||
4391 | /* Did the file descriptor bug occur? */ | |
4392 | || fstat(fileno(stdout), &st) != 0 | |
4393 | ); | |
4394 | } | |
4395 | } | |
093e61a6 | 4396 | EOF |
1072ec3f | 4397 | if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4398 | then |
c375c43b KG |
4399 | ac_cv_func_vfork_works=yes |
4400 | else | |
093e61a6 RS |
4401 | echo "configure: failed program was:" >&5 |
4402 | cat conftest.$ac_ext >&5 | |
4403 | rm -fr conftest* | |
4404 | ac_cv_func_vfork_works=no | |
c375c43b | 4405 | fi |
093e61a6 | 4406 | rm -fr conftest* |
cafe096b | 4407 | fi |
c375c43b KG |
4408 | |
4409 | fi | |
4410 | ||
093e61a6 RS |
4411 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4412 | if test $ac_cv_func_vfork_works = no; then | |
4413 | cat >> confdefs.h <<\EOF | |
c375c43b | 4414 | #define vfork fork |
093e61a6 | 4415 | EOF |
c375c43b KG |
4416 | |
4417 | fi | |
4418 | ||
81bf3d9e | 4419 | |
f91abfce | 4420 | |
093e61a6 | 4421 | |
b7f2fb96 | 4422 | am_cv_lib_iconv_ldpath= |
093e61a6 | 4423 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4424 | if test "${with_libiconv_prefix+set}" = set; then |
4425 | withval="$with_libiconv_prefix" | |
093e61a6 | 4426 | |
f91abfce TT |
4427 | for dir in `echo "$withval" | tr : ' '`; do |
4428 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4429 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4430 | done |
093e61a6 RS |
4431 | |
4432 | fi | |
f91abfce TT |
4433 | |
4434 | ||
093e61a6 | 4435 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
1072ec3f | 4436 | echo "configure:4437: checking for iconv" >&5 |
093e61a6 RS |
4437 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4438 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4439 | else |
093e61a6 | 4440 | |
f91abfce TT |
4441 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4442 | am_cv_lib_iconv=no | |
093e61a6 | 4443 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4444 | #line 4445 "configure" |
093e61a6 | 4445 | #include "confdefs.h" |
f91abfce TT |
4446 | #include <stdlib.h> |
4447 | #include <iconv.h> | |
093e61a6 | 4448 | int main() { |
f91abfce TT |
4449 | iconv_t cd = iconv_open("",""); |
4450 | iconv(cd,NULL,NULL,NULL,NULL); | |
4451 | iconv_close(cd); | |
093e61a6 RS |
4452 | ; return 0; } |
4453 | EOF | |
1072ec3f | 4454 | if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4455 | rm -rf conftest* |
f91abfce TT |
4456 | am_cv_func_iconv=yes |
4457 | else | |
093e61a6 RS |
4458 | echo "configure: failed program was:" >&5 |
4459 | cat conftest.$ac_ext >&5 | |
f91abfce | 4460 | fi |
093e61a6 | 4461 | rm -f conftest* |
f91abfce TT |
4462 | if test "$am_cv_func_iconv" != yes; then |
4463 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4464 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 4465 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4466 | #line 4467 "configure" |
093e61a6 | 4467 | #include "confdefs.h" |
f91abfce TT |
4468 | #include <stdlib.h> |
4469 | #include <iconv.h> | |
093e61a6 | 4470 | int main() { |
f91abfce TT |
4471 | iconv_t cd = iconv_open("",""); |
4472 | iconv(cd,NULL,NULL,NULL,NULL); | |
4473 | iconv_close(cd); | |
093e61a6 RS |
4474 | ; return 0; } |
4475 | EOF | |
1072ec3f | 4476 | if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4477 | rm -rf conftest* |
f91abfce TT |
4478 | am_cv_lib_iconv=yes |
4479 | am_cv_func_iconv=yes | |
4480 | else | |
093e61a6 RS |
4481 | echo "configure: failed program was:" >&5 |
4482 | cat conftest.$ac_ext >&5 | |
f91abfce | 4483 | fi |
093e61a6 | 4484 | rm -f conftest* |
f91abfce TT |
4485 | LIBS="$am_save_LIBS" |
4486 | fi | |
093e61a6 | 4487 | |
cafe096b | 4488 | fi |
cafe096b | 4489 | |
093e61a6 RS |
4490 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4491 | if test "$am_cv_func_iconv" = yes; then | |
4492 | cat >> confdefs.h <<\EOF | |
f91abfce | 4493 | #define HAVE_ICONV 1 |
093e61a6 | 4494 | EOF |
f91abfce | 4495 | |
093e61a6 | 4496 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
1072ec3f | 4497 | echo "configure:4498: checking for iconv declaration" >&5 |
093e61a6 RS |
4498 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4499 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4500 | else |
093e61a6 RS |
4501 | |
4502 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4503 | #line 4504 "configure" |
093e61a6 | 4504 | #include "confdefs.h" |
f91abfce TT |
4505 | |
4506 | #include <stdlib.h> | |
4507 | #include <iconv.h> | |
4508 | extern | |
4509 | #ifdef __cplusplus | |
4510 | "C" | |
4511 | #endif | |
4512 | #if defined(__STDC__) || defined(__cplusplus) | |
4513 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4514 | #else | |
4515 | size_t iconv(); | |
4516 | #endif | |
4517 | ||
093e61a6 | 4518 | int main() { |
f91abfce | 4519 | |
093e61a6 RS |
4520 | ; return 0; } |
4521 | EOF | |
1072ec3f | 4522 | if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4523 | rm -rf conftest* |
f91abfce TT |
4524 | am_cv_proto_iconv_arg1="" |
4525 | else | |
093e61a6 RS |
4526 | echo "configure: failed program was:" >&5 |
4527 | cat conftest.$ac_ext >&5 | |
4528 | rm -rf conftest* | |
4529 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4530 | fi |
093e61a6 | 4531 | rm -f conftest* |
f91abfce TT |
4532 | 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);" |
4533 | fi | |
4534 | ||
4535 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
4536 | echo "$ac_t""${ac_t:- |
4537 | }$am_cv_proto_iconv" 1>&6 | |
4538 | cat >> confdefs.h <<EOF | |
f91abfce | 4539 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 4540 | EOF |
f91abfce TT |
4541 | |
4542 | fi | |
4543 | LIBICONV= | |
4544 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4545 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4546 | fi |
093e61a6 | 4547 | |
f91abfce TT |
4548 | |
4549 | ||
86cf1cbd KG |
4550 | # We will need to find libiberty.h and ansidecl.h |
4551 | saved_CFLAGS="$CFLAGS" | |
4552 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4553 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4554 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
a7475ab1 | 4555 | fprintf_unlocked strstr errno vasprintf \ |
c1800ec8 | 4556 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4557 | do |
f31e826b | 4558 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4559 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
1072ec3f | 4560 | echo "configure:4561: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4561 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4562 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4563 | else | |
4564 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4565 | #line 4566 "configure" |
093e61a6 | 4566 | #include "confdefs.h" |
7afe8c41 KG |
4567 | #undef $ac_tr_decl |
4568 | #define $ac_tr_decl 1 | |
093e61a6 | 4569 | |
d02af173 | 4570 | #include "ansidecl.h" |
86cf1cbd | 4571 | #include "system.h" |
f31e826b | 4572 | |
093e61a6 | 4573 | int main() { |
86cf1cbd KG |
4574 | #ifndef $ac_func |
4575 | char *(*pfn) = (char *(*)) $ac_func ; | |
4576 | #endif | |
093e61a6 RS |
4577 | ; return 0; } |
4578 | EOF | |
1072ec3f | 4579 | if { (eval echo configure:4580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4580 | rm -rf conftest* |
f31e826b | 4581 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4582 | else |
093e61a6 RS |
4583 | echo "configure: failed program was:" >&5 |
4584 | cat conftest.$ac_ext >&5 | |
4585 | rm -rf conftest* | |
4586 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4587 | fi |
093e61a6 | 4588 | rm -f conftest* |
81bf3d9e RH |
4589 | fi |
4590 | ||
f31e826b | 4591 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4592 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4593 | #define $ac_tr_decl 1 |
093e61a6 RS |
4594 | EOF |
4595 | ||
81bf3d9e | 4596 | else |
093e61a6 | 4597 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4598 | #define $ac_tr_decl 0 |
093e61a6 RS |
4599 | EOF |
4600 | ||
81bf3d9e RH |
4601 | fi |
4602 | ||
4603 | done | |
86cf1cbd | 4604 | if test x = y ; then |
093e61a6 | 4605 | cat >> confdefs.h <<\EOF |
f31e826b | 4606 | #define HAVE_DECL_GETENV 1 |
093e61a6 RS |
4607 | EOF |
4608 | cat >> confdefs.h <<\EOF | |
f31e826b | 4609 | #define HAVE_DECL_ATOL 1 |
093e61a6 RS |
4610 | EOF |
4611 | cat >> confdefs.h <<\EOF | |
f31e826b | 4612 | #define HAVE_DECL_SBRK 1 |
093e61a6 RS |
4613 | EOF |
4614 | cat >> confdefs.h <<\EOF | |
f31e826b | 4615 | #define HAVE_DECL_ABORT 1 |
093e61a6 RS |
4616 | EOF |
4617 | cat >> confdefs.h <<\EOF | |
f31e826b | 4618 | #define HAVE_DECL_ATOF 1 |
093e61a6 RS |
4619 | EOF |
4620 | cat >> confdefs.h <<\EOF | |
f31e826b | 4621 | #define HAVE_DECL_GETCWD 1 |
093e61a6 RS |
4622 | EOF |
4623 | cat >> confdefs.h <<\EOF | |
f31e826b | 4624 | #define HAVE_DECL_GETWD 1 |
093e61a6 | 4625 | EOF |
86cf1cbd | 4626 | \ |
093e61a6 | 4627 | cat >> confdefs.h <<\EOF |
f31e826b | 4628 | #define HAVE_DECL_STRSIGNAL 1 |
093e61a6 RS |
4629 | EOF |
4630 | cat >> confdefs.h <<\EOF | |
f31e826b | 4631 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
093e61a6 RS |
4632 | EOF |
4633 | cat >> confdefs.h <<\EOF | |
f31e826b | 4634 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
093e61a6 RS |
4635 | EOF |
4636 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4637 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
093e61a6 | 4638 | EOF |
3b681e9d | 4639 | \ |
093e61a6 | 4640 | cat >> confdefs.h <<\EOF |
3b681e9d | 4641 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
093e61a6 RS |
4642 | EOF |
4643 | cat >> confdefs.h <<\EOF | |
f31e826b | 4644 | #define HAVE_DECL_STRSTR 1 |
093e61a6 RS |
4645 | EOF |
4646 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4647 | #define HAVE_DECL_ERRNO 1 |
093e61a6 RS |
4648 | EOF |
4649 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4650 | #define HAVE_DECL_VASPRINTF 1 |
093e61a6 | 4651 | EOF |
86cf1cbd | 4652 | \ |
093e61a6 | 4653 | cat >> confdefs.h <<\EOF |
f31e826b | 4654 | #define HAVE_DECL_MALLOC 1 |
093e61a6 RS |
4655 | EOF |
4656 | cat >> confdefs.h <<\EOF | |
f31e826b | 4657 | #define HAVE_DECL_REALLOC 1 |
093e61a6 RS |
4658 | EOF |
4659 | cat >> confdefs.h <<\EOF | |
f31e826b | 4660 | #define HAVE_DECL_CALLOC 1 |
093e61a6 RS |
4661 | EOF |
4662 | cat >> confdefs.h <<\EOF | |
f31e826b | 4663 | #define HAVE_DECL_FREE 1 |
093e61a6 RS |
4664 | EOF |
4665 | cat >> confdefs.h <<\EOF | |
f31e826b | 4666 | #define HAVE_DECL_BASENAME 1 |
093e61a6 RS |
4667 | EOF |
4668 | cat >> confdefs.h <<\EOF | |
f31e826b | 4669 | #define HAVE_DECL_GETOPT 1 |
093e61a6 RS |
4670 | EOF |
4671 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4672 | #define HAVE_DECL_CLOCK 1 |
093e61a6 | 4673 | EOF |
81bf3d9e RH |
4674 | fi |
4675 | ||
81bf3d9e RH |
4676 | |
4677 | for ac_func in getrlimit setrlimit getrusage | |
4678 | do | |
f31e826b | 4679 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4680 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
1072ec3f | 4681 | echo "configure:4682: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4682 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4683 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4684 | else | |
4685 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4686 | #line 4687 "configure" |
093e61a6 | 4687 | #include "confdefs.h" |
7afe8c41 KG |
4688 | #undef $ac_tr_decl |
4689 | #define $ac_tr_decl 1 | |
093e61a6 | 4690 | |
d02af173 | 4691 | #include "ansidecl.h" |
86cf1cbd | 4692 | #include "system.h" |
81bf3d9e RH |
4693 | #ifdef HAVE_SYS_RESOURCE_H |
4694 | #include <sys/resource.h> | |
4695 | #endif | |
4696 | ||
f31e826b | 4697 | |
093e61a6 | 4698 | int main() { |
86cf1cbd KG |
4699 | #ifndef $ac_func |
4700 | char *(*pfn) = (char *(*)) $ac_func ; | |
4701 | #endif | |
093e61a6 RS |
4702 | ; return 0; } |
4703 | EOF | |
1072ec3f | 4704 | if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4705 | rm -rf conftest* |
f31e826b | 4706 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4707 | else |
093e61a6 RS |
4708 | echo "configure: failed program was:" >&5 |
4709 | cat conftest.$ac_ext >&5 | |
4710 | rm -rf conftest* | |
4711 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4712 | fi |
093e61a6 | 4713 | rm -f conftest* |
81bf3d9e RH |
4714 | fi |
4715 | ||
f31e826b | 4716 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4717 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4718 | #define $ac_tr_decl 1 |
093e61a6 RS |
4719 | EOF |
4720 | ||
81bf3d9e | 4721 | else |
093e61a6 | 4722 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4723 | #define $ac_tr_decl 0 |
093e61a6 RS |
4724 | EOF |
4725 | ||
81bf3d9e RH |
4726 | fi |
4727 | ||
4728 | done | |
86cf1cbd | 4729 | if test x = y ; then |
093e61a6 | 4730 | cat >> confdefs.h <<\EOF |
f31e826b | 4731 | #define HAVE_DECL_GETRLIMIT 1 |
093e61a6 RS |
4732 | EOF |
4733 | cat >> confdefs.h <<\EOF | |
f31e826b | 4734 | #define HAVE_DECL_SETRLIMIT 1 |
093e61a6 RS |
4735 | EOF |
4736 | cat >> confdefs.h <<\EOF | |
f31e826b | 4737 | #define HAVE_DECL_GETRUSAGE 1 |
093e61a6 | 4738 | EOF |
86cf1cbd KG |
4739 | fi |
4740 | ||
81bf3d9e | 4741 | |
093e61a6 | 4742 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4743 | #line 4744 "configure" |
093e61a6 | 4744 | #include "confdefs.h" |
b2522d2b HPN |
4745 | |
4746 | #include "ansidecl.h" | |
4747 | #include "system.h" | |
4748 | #ifdef HAVE_SYS_RESOURCE_H | |
4749 | #include <sys/resource.h> | |
4750 | #endif | |
4751 | ||
093e61a6 | 4752 | int main() { |
b2522d2b | 4753 | rlim_t l = 0; |
093e61a6 RS |
4754 | ; return 0; } |
4755 | EOF | |
1072ec3f | 4756 | if { (eval echo configure:4757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4757 | : |
4758 | else | |
093e61a6 RS |
4759 | echo "configure: failed program was:" >&5 |
4760 | cat conftest.$ac_ext >&5 | |
4761 | rm -rf conftest* | |
4762 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4763 | #define rlim_t long |
093e61a6 | 4764 | EOF |
b2522d2b HPN |
4765 | |
4766 | fi | |
093e61a6 | 4767 | rm -f conftest* |
b2522d2b | 4768 | |
351df804 | 4769 | for ac_func in ldgetname |
c1800ec8 ZW |
4770 | do |
4771 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4772 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
1072ec3f | 4773 | echo "configure:4774: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4774 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4775 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4776 | else | |
4777 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4778 | #line 4779 "configure" |
093e61a6 | 4779 | #include "confdefs.h" |
c1800ec8 ZW |
4780 | #undef $ac_tr_decl |
4781 | #define $ac_tr_decl 1 | |
093e61a6 | 4782 | |
351df804 KG |
4783 | #include "ansidecl.h" |
4784 | #include "system.h" | |
4785 | #ifdef HAVE_LDFCN_H | |
4786 | #include <ldfcn.h> | |
4787 | #endif | |
4788 | ||
4789 | ||
093e61a6 | 4790 | int main() { |
351df804 KG |
4791 | #ifndef $ac_func |
4792 | char *(*pfn) = (char *(*)) $ac_func ; | |
4793 | #endif | |
093e61a6 RS |
4794 | ; return 0; } |
4795 | EOF | |
1072ec3f | 4796 | if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4797 | rm -rf conftest* |
351df804 KG |
4798 | eval "gcc_cv_have_decl_$ac_func=yes" |
4799 | else | |
093e61a6 RS |
4800 | echo "configure: failed program was:" >&5 |
4801 | cat conftest.$ac_ext >&5 | |
4802 | rm -rf conftest* | |
4803 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4804 | fi |
093e61a6 | 4805 | rm -f conftest* |
351df804 KG |
4806 | fi |
4807 | ||
4808 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4809 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4810 | #define $ac_tr_decl 1 |
093e61a6 RS |
4811 | EOF |
4812 | ||
351df804 | 4813 | else |
093e61a6 | 4814 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4815 | #define $ac_tr_decl 0 |
093e61a6 RS |
4816 | EOF |
4817 | ||
351df804 KG |
4818 | fi |
4819 | ||
4820 | done | |
4821 | if test x = y ; then | |
093e61a6 | 4822 | cat >> confdefs.h <<\EOF |
351df804 | 4823 | #define HAVE_DECL_LDGETNAME 1 |
093e61a6 | 4824 | EOF |
351df804 KG |
4825 | fi |
4826 | ||
4827 | ||
4828 | for ac_func in times | |
4829 | do | |
4830 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4831 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
1072ec3f | 4832 | echo "configure:4833: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4833 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4835 | else | |
4836 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4837 | #line 4838 "configure" |
093e61a6 | 4838 | #include "confdefs.h" |
351df804 KG |
4839 | #undef $ac_tr_decl |
4840 | #define $ac_tr_decl 1 | |
093e61a6 | 4841 | |
c1800ec8 ZW |
4842 | #include "ansidecl.h" |
4843 | #include "system.h" | |
4844 | #ifdef HAVE_SYS_TIMES_H | |
4845 | #include <sys/times.h> | |
4846 | #endif | |
4847 | ||
4848 | ||
093e61a6 | 4849 | int main() { |
c1800ec8 ZW |
4850 | #ifndef $ac_func |
4851 | char *(*pfn) = (char *(*)) $ac_func ; | |
4852 | #endif | |
093e61a6 RS |
4853 | ; return 0; } |
4854 | EOF | |
1072ec3f | 4855 | if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4856 | rm -rf conftest* |
c1800ec8 ZW |
4857 | eval "gcc_cv_have_decl_$ac_func=yes" |
4858 | else | |
093e61a6 RS |
4859 | echo "configure: failed program was:" >&5 |
4860 | cat conftest.$ac_ext >&5 | |
4861 | rm -rf conftest* | |
4862 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4863 | fi |
093e61a6 | 4864 | rm -f conftest* |
c1800ec8 ZW |
4865 | fi |
4866 | ||
4867 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4868 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4869 | #define $ac_tr_decl 1 |
093e61a6 RS |
4870 | EOF |
4871 | ||
c1800ec8 | 4872 | else |
093e61a6 | 4873 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4874 | #define $ac_tr_decl 0 |
093e61a6 RS |
4875 | EOF |
4876 | ||
c1800ec8 ZW |
4877 | fi |
4878 | ||
4879 | done | |
4880 | if test x = y ; then | |
093e61a6 | 4881 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4882 | #define HAVE_DECL_TIMES 1 |
093e61a6 | 4883 | EOF |
c1800ec8 ZW |
4884 | fi |
4885 | ||
4886 | ||
4887 | # More time-related stuff. | |
093e61a6 | 4888 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
1072ec3f | 4889 | echo "configure:4890: checking for struct tms" >&5 |
093e61a6 RS |
4890 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4891 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4892 | else | |
4893 | ||
4894 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4895 | #line 4896 "configure" |
093e61a6 | 4896 | #include "confdefs.h" |
c1800ec8 ZW |
4897 | |
4898 | #include "ansidecl.h" | |
4899 | #include "system.h" | |
4900 | #ifdef HAVE_SYS_TIMES_H | |
4901 | #include <sys/times.h> | |
4902 | #endif | |
4903 | ||
093e61a6 | 4904 | int main() { |
c1800ec8 | 4905 | struct tms tms; |
093e61a6 RS |
4906 | ; return 0; } |
4907 | EOF | |
1072ec3f | 4908 | if { (eval echo configure:4909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4909 | rm -rf conftest* |
c1800ec8 ZW |
4910 | ac_cv_struct_tms=yes |
4911 | else | |
093e61a6 RS |
4912 | echo "configure: failed program was:" >&5 |
4913 | cat conftest.$ac_ext >&5 | |
4914 | rm -rf conftest* | |
4915 | ac_cv_struct_tms=no | |
c1800ec8 | 4916 | fi |
093e61a6 | 4917 | rm -f conftest* |
c1800ec8 | 4918 | fi |
cafe096b | 4919 | |
093e61a6 RS |
4920 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4921 | if test $ac_cv_struct_tms = yes; then | |
4922 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4923 | #define HAVE_STRUCT_TMS 1 |
093e61a6 | 4924 | EOF |
c1800ec8 ZW |
4925 | |
4926 | fi | |
4927 | ||
4928 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4929 | # revisit after autoconf 2.50. | |
093e61a6 | 4930 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
1072ec3f | 4931 | echo "configure:4932: checking for clock_t" >&5 |
093e61a6 RS |
4932 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4933 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4934 | else | |
4935 | ||
4936 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 4937 | #line 4938 "configure" |
093e61a6 | 4938 | #include "confdefs.h" |
c1800ec8 ZW |
4939 | |
4940 | #include "ansidecl.h" | |
4941 | #include "system.h" | |
4942 | ||
093e61a6 | 4943 | int main() { |
c1800ec8 | 4944 | clock_t x; |
093e61a6 RS |
4945 | ; return 0; } |
4946 | EOF | |
1072ec3f | 4947 | if { (eval echo configure:4948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4948 | rm -rf conftest* |
c1800ec8 ZW |
4949 | gcc_cv_type_clock_t=yes |
4950 | else | |
093e61a6 RS |
4951 | echo "configure: failed program was:" >&5 |
4952 | cat conftest.$ac_ext >&5 | |
4953 | rm -rf conftest* | |
4954 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4955 | fi |
093e61a6 | 4956 | rm -f conftest* |
c1800ec8 | 4957 | fi |
cafe096b | 4958 | |
093e61a6 RS |
4959 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4960 | if test $gcc_cv_type_clock_t = yes; then | |
4961 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4962 | #define HAVE_CLOCK_T 1 |
093e61a6 | 4963 | EOF |
c1800ec8 ZW |
4964 | |
4965 | fi | |
4966 | ||
093e61a6 | 4967 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
1072ec3f | 4968 | echo "configure:4969: checking for uchar" >&5 |
093e61a6 RS |
4969 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4971 | else |
093e61a6 | 4972 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 4973 | #line 4974 "configure" |
093e61a6 | 4974 | #include "confdefs.h" |
a12b5bd9 ZW |
4975 | |
4976 | #include "ansidecl.h" | |
4977 | #include "system.h" | |
4978 | ||
093e61a6 | 4979 | int main() { |
a12b5bd9 ZW |
4980 | if ((uchar *)0) return 0; |
4981 | if (sizeof(uchar)) return 0; | |
093e61a6 RS |
4982 | ; return 0; } |
4983 | EOF | |
1072ec3f | 4984 | if { (eval echo configure:4985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4985 | rm -rf conftest* |
a12b5bd9 ZW |
4986 | ac_cv_type_uchar=yes |
4987 | else | |
093e61a6 RS |
4988 | echo "configure: failed program was:" >&5 |
4989 | cat conftest.$ac_ext >&5 | |
4990 | rm -rf conftest* | |
4991 | ac_cv_type_uchar=no | |
a12b5bd9 | 4992 | fi |
093e61a6 | 4993 | rm -f conftest* |
a12b5bd9 | 4994 | fi |
cafe096b | 4995 | |
093e61a6 RS |
4996 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
4997 | if test $ac_cv_type_uchar = yes; then | |
4998 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 4999 | #define HAVE_UCHAR 1 |
093e61a6 | 5000 | EOF |
a12b5bd9 ZW |
5001 | |
5002 | fi | |
5003 | ||
eb70d86d AS |
5004 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5005 | CFLAGS="$saved_CFLAGS" | |
5006 | ||
07cf4226 DM |
5007 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5008 | if test "${enable_initfini_array+set}" = set; then | |
5009 | enableval="$enable_initfini_array" | |
093e61a6 | 5010 | : |
07cf4226 | 5011 | else |
093e61a6 RS |
5012 | |
5013 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
1072ec3f | 5014 | echo "configure:5015: checking for .preinit_array/.init_array/.fini_array support" >&5 |
093e61a6 RS |
5015 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
5016 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 5017 | else |
eb70d86d | 5018 | if test "$cross_compiling" = yes; then |
918c4fe4 | 5019 | gcc_cv_initfini_array=no |
eb70d86d | 5020 | else |
093e61a6 | 5021 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5022 | #line 5023 "configure" |
093e61a6 | 5023 | #include "confdefs.h" |
eb70d86d | 5024 | |
07cf4226 DM |
5025 | static int x = -1; |
5026 | int main (void) { return x; } | |
5027 | int foo (void) { x = 0; } | |
5028 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
093e61a6 | 5029 | EOF |
1072ec3f | 5030 | if { (eval echo configure:5031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5031 | then |
918c4fe4 | 5032 | gcc_cv_initfini_array=yes |
eb70d86d | 5033 | else |
093e61a6 RS |
5034 | echo "configure: failed program was:" >&5 |
5035 | cat conftest.$ac_ext >&5 | |
5036 | rm -fr conftest* | |
5037 | gcc_cv_initfini_array=no | |
eb70d86d | 5038 | fi |
093e61a6 | 5039 | rm -fr conftest* |
eb70d86d | 5040 | fi |
093e61a6 | 5041 | |
07cf4226 | 5042 | fi |
093e61a6 RS |
5043 | |
5044 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 5045 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 5046 | |
093e61a6 | 5047 | fi |
cafe096b | 5048 | |
093e61a6 RS |
5049 | if test $enable_initfini_array = yes; then |
5050 | cat >> confdefs.h <<\EOF | |
eb70d86d | 5051 | #define HAVE_INITFINI_ARRAY 1 |
093e61a6 | 5052 | EOF |
07cf4226 | 5053 | |
eb70d86d | 5054 | fi |
81bf3d9e | 5055 | |
093e61a6 RS |
5056 | # mkdir takes a single argument on some systems. |
5057 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
1072ec3f | 5058 | echo "configure:5059: checking if mkdir takes one argument" >&5 |
093e61a6 RS |
5059 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 5061 | else |
093e61a6 | 5062 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5063 | #line 5064 "configure" |
093e61a6 | 5064 | #include "confdefs.h" |
75923b2f MK |
5065 | |
5066 | #include <sys/types.h> | |
5067 | #ifdef HAVE_SYS_STAT_H | |
5068 | # include <sys/stat.h> | |
5069 | #endif | |
5070 | #ifdef HAVE_UNISTD_H | |
5071 | # include <unistd.h> | |
5072 | #endif | |
5073 | #ifdef HAVE_DIRECT_H | |
5074 | # include <direct.h> | |
5075 | #endif | |
093e61a6 | 5076 | int main() { |
75923b2f | 5077 | mkdir ("foo", 0); |
093e61a6 RS |
5078 | ; return 0; } |
5079 | EOF | |
1072ec3f | 5080 | if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5081 | rm -rf conftest* |
75923b2f MK |
5082 | gcc_cv_mkdir_takes_one_arg=no |
5083 | else | |
093e61a6 RS |
5084 | echo "configure: failed program was:" >&5 |
5085 | cat conftest.$ac_ext >&5 | |
5086 | rm -rf conftest* | |
5087 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 5088 | fi |
093e61a6 | 5089 | rm -f conftest* |
75923b2f | 5090 | fi |
cafe096b | 5091 | |
093e61a6 RS |
5092 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
5093 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5094 | cat >> confdefs.h <<\EOF | |
75923b2f | 5095 | #define MKDIR_TAKES_ONE_ARG 1 |
093e61a6 | 5096 | EOF |
75923b2f MK |
5097 | |
5098 | fi | |
5099 | ||
5100 | ||
861bb6c1 JL |
5101 | # File extensions |
5102 | manext='.1' | |
5103 | objext='.o' | |
5104 | ||
5105 | ||
5106 | ||
4977bab6 ZW |
5107 | # With Setjmp/Longjmp based exception handling. |
5108 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
5109 | if test "${enable_sjlj_exceptions+set}" = set; then | |
5110 | enableval="$enable_sjlj_exceptions" | |
5111 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 5112 | cat >> confdefs.h <<EOF |
cafe096b | 5113 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
093e61a6 RS |
5114 | EOF |
5115 | ||
5116 | fi | |
4977bab6 ZW |
5117 | |
5118 | ||
093e61a6 | 5119 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 |
1072ec3f | 5120 | echo "configure:5121: checking for main in -lunwind" >&5 |
093e61a6 RS |
5121 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
5122 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 5124 | else |
093e61a6 | 5125 | ac_save_LIBS="$LIBS" |
4977bab6 | 5126 | LIBS="-lunwind $LIBS" |
093e61a6 | 5127 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5128 | #line 5129 "configure" |
093e61a6 | 5129 | #include "confdefs.h" |
4977bab6 | 5130 | |
093e61a6 RS |
5131 | int main() { |
5132 | main() | |
5133 | ; return 0; } | |
5134 | EOF | |
1072ec3f | 5135 | if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5136 | rm -rf conftest* |
5137 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5138 | else | |
5139 | echo "configure: failed program was:" >&5 | |
5140 | cat conftest.$ac_ext >&5 | |
5141 | rm -rf conftest* | |
5142 | eval "ac_cv_lib_$ac_lib_var=no" | |
5143 | fi | |
5144 | rm -f conftest* | |
5145 | LIBS="$ac_save_LIBS" | |
4977bab6 | 5146 | |
093e61a6 RS |
5147 | fi |
5148 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5149 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
5150 | use_libunwind_default=yes |
5151 | else | |
093e61a6 RS |
5152 | echo "$ac_t""no" 1>&6 |
5153 | use_libunwind_default=no | |
4977bab6 ZW |
5154 | fi |
5155 | ||
5156 | # Use libunwind based exception handling. | |
5157 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5158 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5159 | enableval="$enable_libunwind_exceptions" | |
5160 | use_libunwind_exceptions=$enableval | |
5161 | else | |
5162 | use_libunwind_exceptions=$use_libunwind_default | |
093e61a6 | 5163 | fi |
cafe096b | 5164 | |
093e61a6 RS |
5165 | if test x"$use_libunwind_exceptions" = xyes; then |
5166 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5167 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
093e61a6 | 5168 | EOF |
4977bab6 ZW |
5169 | |
5170 | fi | |
5171 | ||
34a86c2b NN |
5172 | # -------------------------------------------------------- |
5173 | # Build, host, and target specific configuration fragments | |
5174 | # -------------------------------------------------------- | |
5175 | ||
ef69da62 | 5176 | target_gtfiles= |
861bb6c1 | 5177 | build_xm_file= |
f6cb0e63 | 5178 | build_xm_defines= |
861bb6c1 JL |
5179 | build_install_headers_dir=install-headers-tar |
5180 | build_exeext= | |
5181 | host_xm_file= | |
f6cb0e63 | 5182 | host_xm_defines= |
861bb6c1 JL |
5183 | host_xmake_file= |
5184 | host_truncate_target= | |
6e26218f | 5185 | host_exeext= |
861bb6c1 JL |
5186 | |
5187 | # Decode the host machine, then the target machine. | |
5188 | # For the host machine, we save the xm_file variable as host_xm_file; | |
5189 | # then we decode the target machine and forget everything else | |
5190 | # that came from the host machine. | |
5191 | for machine in $build $host $target; do | |
61ed06c3 | 5192 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5193 | done |
5194 | ||
5195 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5196 | ||
5197 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5198 | if test x"$tm_file" = x |
861bb6c1 JL |
5199 | then tm_file=$cpu_type/$cpu_type.h; fi |
5200 | ||
6b2adea9 | 5201 | if test x"$extra_headers" = x |
861bb6c1 JL |
5202 | then extra_headers=; fi |
5203 | ||
75bffa71 | 5204 | if test x$md_file = x |
e98e406f | 5205 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5206 | |
75bffa71 | 5207 | if test x$out_file = x |
861bb6c1 JL |
5208 | then out_file=$cpu_type/$cpu_type.c; fi |
5209 | ||
75bffa71 | 5210 | if test x"$tmake_file" = x |
861bb6c1 JL |
5211 | then tmake_file=$cpu_type/t-$cpu_type |
5212 | fi | |
5213 | ||
90e6a802 | 5214 | if test x"$dwarf2" = xyes |
756ee602 | 5215 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5216 | fi |
5217 | ||
861bb6c1 | 5218 | # Say what files are being used for the output code and MD file. |
11642c3a | 5219 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5220 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5221 | ||
11642c3a | 5222 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5223 | # about them and drop them. |
5224 | ||
11642c3a ZW |
5225 | bx= |
5226 | for x in $build_xm_file; do | |
5227 | if test -f $srcdir/config/$x | |
5228 | then bx="$bx $x" | |
093e61a6 | 5229 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5230 | fi |
5231 | done | |
5232 | build_xm_file="$bx" | |
5233 | ||
5234 | hx= | |
5235 | for x in $host_xm_file; do | |
5236 | if test -f $srcdir/config/$x | |
5237 | then hx="$hx $x" | |
093e61a6 | 5238 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5239 | fi |
5240 | done | |
5241 | host_xm_file="$hx" | |
5242 | ||
5243 | tx= | |
5244 | for x in $xm_file; do | |
5245 | if test -f $srcdir/config/$x | |
5246 | then tx="$tx $x" | |
093e61a6 | 5247 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5248 | fi |
5249 | done | |
5250 | xm_file="$tx" | |
5251 | ||
861bb6c1 JL |
5252 | count=a |
5253 | for f in $tm_file; do | |
5254 | count=${count}x | |
5255 | done | |
75bffa71 | 5256 | if test $count = ax; then |
861bb6c1 JL |
5257 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5258 | else | |
5259 | echo "Using the following target machine macro files:" | |
5260 | for f in $tm_file; do | |
5261 | echo " $srcdir/config/$f" | |
5262 | done | |
5263 | fi | |
5264 | ||
4977bab6 | 5265 | if test x$need_64bit_hwint = xyes; then |
093e61a6 | 5266 | cat >> confdefs.h <<\EOF |
4977bab6 | 5267 | #define NEED_64BIT_HOST_WIDE_INT 1 |
093e61a6 | 5268 | EOF |
4977bab6 ZW |
5269 | |
5270 | fi | |
5271 | ||
861bb6c1 JL |
5272 | count=a |
5273 | for f in $host_xm_file; do | |
5274 | count=${count}x | |
5275 | done | |
11642c3a ZW |
5276 | if test $count = a; then |
5277 | : | |
5278 | elif test $count = ax; then | |
861bb6c1 JL |
5279 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5280 | else | |
5281 | echo "Using the following host machine macro files:" | |
5282 | for f in $host_xm_file; do | |
5283 | echo " $srcdir/config/$f" | |
5284 | done | |
5285 | fi | |
476d9098 | 5286 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5287 | |
75bffa71 | 5288 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5289 | count=a |
5290 | for f in $build_xm_file; do | |
5291 | count=${count}x | |
5292 | done | |
11642c3a ZW |
5293 | if test $count = a; then |
5294 | : | |
5295 | elif test $count = ax; then | |
861bb6c1 JL |
5296 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5297 | else | |
5298 | echo "Using the following build machine macro files:" | |
5299 | for f in $build_xm_file; do | |
5300 | echo " $srcdir/config/$f" | |
5301 | done | |
5302 | fi | |
5303 | fi | |
5304 | ||
75bffa71 ILT |
5305 | if test x$thread_file = x; then |
5306 | if test x$target_thread_file != x; then | |
a851212a JW |
5307 | thread_file=$target_thread_file |
5308 | else | |
5309 | thread_file='single' | |
5310 | fi | |
861bb6c1 JL |
5311 | fi |
5312 | ||
2121a768 JT |
5313 | if test x$enable___cxa_atexit = xyes || \ |
5314 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
5315 | cat >> confdefs.h <<\EOF | |
5316 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
5317 | EOF | |
5318 | ||
5319 | fi | |
5320 | ||
a5381466 | 5321 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5322 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5323 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
093e61a6 RS |
5324 | |
5325 | cat >> confdefs.h <<EOF | |
1c0ca89d | 5326 | #define EXTRA_MODES_FILE "$extra_modes" |
093e61a6 | 5327 | EOF |
cafe096b | 5328 | |
093e61a6 | 5329 | cat >> confdefs.h <<\EOF |
a5381466 | 5330 | #define EXTRA_CC_MODES 1 |
093e61a6 | 5331 | EOF |
a5381466 ZW |
5332 | |
5333 | fi | |
5334 | ||
b7cb92ad | 5335 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5336 | # the first file included by config.h. |
4977bab6 | 5337 | # If host=build, it is correct to have bconfig include auto-host.h |
093e61a6 | 5338 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5339 | # work to find out the build config parameters. |
75bffa71 | 5340 | if test x$host = x$build |
db81d74a | 5341 | then |
eaf4e618 | 5342 | build_auto=auto-host.h |
06f0b04c | 5343 | FORBUILD=.. |
b7cb92ad JL |
5344 | else |
5345 | # We create a subdir, then run autoconf in the subdir. | |
5346 | # To prevent recursion we set host and build for the new | |
5347 | # invocation of configure to the build for this invocation | |
093e61a6 | 5348 | # of configure. |
b7cb92ad JL |
5349 | tempdir=build.$$ |
5350 | rm -rf $tempdir | |
5351 | mkdir $tempdir | |
5352 | cd $tempdir | |
5353 | case ${srcdir} in | |
255b8a49 | 5354 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5355 | *) realsrcdir=../${srcdir};; |
5356 | esac | |
d920e825 L |
5357 | saved_CFLAGS="${CFLAGS}" |
5358 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5359 | ${realsrcdir}/configure \ | |
534d0cc0 | 5360 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5361 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5362 | |
5363 | # We just finished tests for the build machine, so rename | |
5364 | # the file auto-build.h in the gcc directory. | |
5365 | mv auto-host.h ../auto-build.h | |
5366 | cd .. | |
5367 | rm -rf $tempdir | |
eaf4e618 | 5368 | build_auto=auto-build.h |
61138bb6 | 5369 | FORBUILD=../build-$build_alias |
db81d74a RH |
5370 | fi |
5371 | ||
06f0b04c | 5372 | |
eaf4e618 | 5373 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5374 | tm_p_file="${tm_p_file} tm-preds.h" |
5375 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5376 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5377 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5378 | # put this back in temporarily. |
5379 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5380 | |
34a86c2b NN |
5381 | # -------- |
5382 | # UNSORTED | |
5383 | # -------- | |
5384 | ||
861bb6c1 | 5385 | # Truncate the target if necessary |
75bffa71 | 5386 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5387 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5388 | fi | |
5389 | ||
f1943b77 | 5390 | # Get the version trigger filename from the toplevel |
75bffa71 | 5391 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5392 | gcc_version_trigger=$with_gcc_version_trigger |
5393 | else | |
5394 | gcc_version_trigger=${srcdir}/version.c | |
5395 | fi | |
022dae81 | 5396 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5397 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5398 | |
cc1e60ea | 5399 | # Compile in configure arguments. |
8105825d | 5400 | if test -f configargs.h ; then |
cc1e60ea | 5401 | # Being re-configured. |
022dae81 | 5402 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5403 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5404 | else | |
5405 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5406 | fi | |
5407 | cat > configargs.h <<EOF | |
5408 | /* Generated automatically. */ | |
5409 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5410 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5411 | |
5412 | static const struct { | |
5413 | const char *name, *value; | |
5414 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5415 | EOF |
5416 | ||
ab87f8c8 JL |
5417 | # Internationalization |
5418 | PACKAGE=gcc | |
5419 | VERSION="$gcc_version" | |
861bb6c1 | 5420 | |
ab87f8c8 JL |
5421 | |
5422 | ||
dc6746e7 | 5423 | # Enable NLS support by default |
ab87f8c8 JL |
5424 | # Check whether --enable-nls or --disable-nls was given. |
5425 | if test "${enable_nls+set}" = set; then | |
5426 | enableval="$enable_nls" | |
093e61a6 | 5427 | : |
861bb6c1 | 5428 | else |
dc6746e7 | 5429 | enable_nls=yes |
093e61a6 RS |
5430 | fi |
5431 | ||
861bb6c1 | 5432 | |
dc6746e7 PT |
5433 | # if cross compiling, disable NLS support. |
5434 | # It's not worth the trouble, at least for now. | |
5435 | ||
063a4b85 | 5436 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
093e61a6 | 5437 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
dc6746e7 PT |
5438 | enable_nls=no |
5439 | fi | |
5440 | ||
861bb6c1 | 5441 | |
093e61a6 RS |
5442 | |
5443 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
1072ec3f | 5444 | echo "configure:5445: checking for library containing strerror" >&5 |
093e61a6 RS |
5445 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
5446 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5447 | else |
093e61a6 RS |
5448 | ac_func_search_save_LIBS="$LIBS" |
5449 | ac_cv_search_strerror="no" | |
5450 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5451 | #line 5452 "configure" |
093e61a6 | 5452 | #include "confdefs.h" |
ab87f8c8 JL |
5453 | /* Override any gcc2 internal prototype to avoid an error. */ |
5454 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5455 | builtin and then its argument prototype would still apply. */ |
5456 | char strerror(); | |
5457 | ||
5458 | int main() { | |
5459 | strerror() | |
5460 | ; return 0; } | |
5461 | EOF | |
1072ec3f | 5462 | if { (eval echo configure:5463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5463 | rm -rf conftest* |
71a94577 | 5464 | ac_cv_search_strerror="none required" |
ab87f8c8 | 5465 | else |
093e61a6 RS |
5466 | echo "configure: failed program was:" >&5 |
5467 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5468 | fi |
093e61a6 RS |
5469 | rm -f conftest* |
5470 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do | |
5471 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5472 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5473 | #line 5474 "configure" |
093e61a6 | 5474 | #include "confdefs.h" |
71a94577 ZW |
5475 | /* Override any gcc2 internal prototype to avoid an error. */ |
5476 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5477 | builtin and then its argument prototype would still apply. */ |
5478 | char strerror(); | |
5479 | ||
5480 | int main() { | |
5481 | strerror() | |
5482 | ; return 0; } | |
5483 | EOF | |
1072ec3f | 5484 | if { (eval echo configure:5485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5485 | rm -rf conftest* |
5486 | ac_cv_search_strerror="-l$i" | |
71a94577 | 5487 | break |
861bb6c1 | 5488 | else |
093e61a6 RS |
5489 | echo "configure: failed program was:" >&5 |
5490 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5491 | fi |
093e61a6 RS |
5492 | rm -f conftest* |
5493 | done | |
5494 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 5495 | fi |
cafe096b | 5496 | |
093e61a6 RS |
5497 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5498 | if test "$ac_cv_search_strerror" != "no"; then | |
5499 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5500 | ||
5501 | else : | |
5502 | ||
71a94577 | 5503 | fi |
093e61a6 | 5504 | |
2ce3c6c6 | 5505 | |
093e61a6 | 5506 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
1072ec3f | 5507 | echo "configure:5508: checking for working const" >&5 |
093e61a6 RS |
5508 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5510 | else |
093e61a6 | 5511 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5512 | #line 5513 "configure" |
093e61a6 | 5513 | #include "confdefs.h" |
ab87f8c8 | 5514 | |
093e61a6 RS |
5515 | int main() { |
5516 | ||
5517 | /* Ultrix mips cc rejects this. */ | |
5518 | typedef int charset[2]; const charset x; | |
5519 | /* SunOS 4.1.1 cc rejects this. */ | |
5520 | char const *const *ccp; | |
5521 | char **p; | |
5522 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5523 | struct point {int x, y;}; | |
5524 | static struct point const zero = {0,0}; | |
5525 | /* AIX XL C 1.02.0.0 rejects this. | |
5526 | It does not let you subtract one const X* pointer from another in an arm | |
5527 | of an if-expression whose if-part is not a constant expression */ | |
5528 | const char *g = "string"; | |
5529 | ccp = &g + (g ? g-g : 0); | |
5530 | /* HPUX 7.0 cc rejects these. */ | |
5531 | ++ccp; | |
5532 | p = (char**) ccp; | |
5533 | ccp = (char const *const *) p; | |
5534 | { /* SCO 3.2v4 cc rejects this. */ | |
5535 | char *t; | |
5536 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5537 | ||
5538 | *t++ = 0; | |
5539 | } | |
5540 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5541 | int x[] = {25, 17}; | |
5542 | const int *foo = &x[0]; | |
5543 | ++foo; | |
5544 | } | |
5545 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5546 | typedef const int *iptr; | |
5547 | iptr p = 0; | |
5548 | ++p; | |
cafe096b | 5549 | } |
093e61a6 RS |
5550 | { /* AIX XL C 1.02.0.0 rejects this saying |
5551 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5552 | struct s { int j; const int *ap[3]; }; | |
5553 | struct s *b; b->j = 5; | |
5554 | } | |
5555 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5556 | const int foo = 10; | |
5557 | } | |
5558 | ||
5559 | ; return 0; } | |
5560 | EOF | |
1072ec3f | 5561 | if { (eval echo configure:5562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5562 | rm -rf conftest* |
ab87f8c8 | 5563 | ac_cv_c_const=yes |
861bb6c1 | 5564 | else |
093e61a6 RS |
5565 | echo "configure: failed program was:" >&5 |
5566 | cat conftest.$ac_ext >&5 | |
5567 | rm -rf conftest* | |
5568 | ac_cv_c_const=no | |
861bb6c1 | 5569 | fi |
093e61a6 | 5570 | rm -f conftest* |
861bb6c1 JL |
5571 | fi |
5572 | ||
093e61a6 RS |
5573 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5574 | if test $ac_cv_c_const = no; then | |
5575 | cat >> confdefs.h <<\EOF | |
5576 | #define const | |
5577 | EOF | |
ab87f8c8 JL |
5578 | |
5579 | fi | |
093e61a6 RS |
5580 | |
5581 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
1072ec3f | 5582 | echo "configure:5583: checking for off_t" >&5 |
093e61a6 RS |
5583 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5585 | else | |
5586 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5587 | #line 5588 "configure" |
093e61a6 RS |
5588 | #include "confdefs.h" |
5589 | #include <sys/types.h> | |
5590 | #if STDC_HEADERS | |
5591 | #include <stdlib.h> | |
5592 | #include <stddef.h> | |
5593 | #endif | |
5594 | EOF | |
5595 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5596 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5597 | rm -rf conftest* | |
5598 | ac_cv_type_off_t=yes | |
cafe096b | 5599 | else |
093e61a6 RS |
5600 | rm -rf conftest* |
5601 | ac_cv_type_off_t=no | |
5602 | fi | |
5603 | rm -f conftest* | |
cafe096b | 5604 | |
093e61a6 RS |
5605 | fi |
5606 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
5607 | if test $ac_cv_type_off_t = no; then | |
5608 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5609 | #define off_t long |
093e61a6 | 5610 | EOF |
ab87f8c8 JL |
5611 | |
5612 | fi | |
5613 | ||
093e61a6 | 5614 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
1072ec3f | 5615 | echo "configure:5616: checking for size_t" >&5 |
093e61a6 RS |
5616 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5618 | else |
093e61a6 | 5619 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5620 | #line 5621 "configure" |
093e61a6 RS |
5621 | #include "confdefs.h" |
5622 | #include <sys/types.h> | |
5623 | #if STDC_HEADERS | |
5624 | #include <stdlib.h> | |
5625 | #include <stddef.h> | |
5626 | #endif | |
5627 | EOF | |
5628 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5629 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5630 | rm -rf conftest* | |
cb65112a | 5631 | ac_cv_type_size_t=yes |
ab87f8c8 | 5632 | else |
093e61a6 RS |
5633 | rm -rf conftest* |
5634 | ac_cv_type_size_t=no | |
ab87f8c8 | 5635 | fi |
093e61a6 | 5636 | rm -f conftest* |
cafe096b | 5637 | |
093e61a6 RS |
5638 | fi |
5639 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
5640 | if test $ac_cv_type_size_t = no; then | |
5641 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5642 | #define size_t unsigned |
093e61a6 | 5643 | EOF |
ab87f8c8 JL |
5644 | |
5645 | fi | |
5646 | ||
71a94577 ZW |
5647 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5648 | # for constant arguments. Useless! | |
093e61a6 | 5649 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
1072ec3f | 5650 | echo "configure:5651: checking for working alloca.h" >&5 |
093e61a6 RS |
5651 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5652 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5653 | else | |
5654 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5655 | #line 5656 "configure" |
093e61a6 | 5656 | #include "confdefs.h" |
71a94577 | 5657 | #include <alloca.h> |
093e61a6 RS |
5658 | int main() { |
5659 | char *p = alloca(2 * sizeof(int)); | |
5660 | ; return 0; } | |
5661 | EOF | |
1072ec3f | 5662 | if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5663 | rm -rf conftest* |
5664 | ac_cv_header_alloca_h=yes | |
5665 | else | |
5666 | echo "configure: failed program was:" >&5 | |
5667 | cat conftest.$ac_ext >&5 | |
5668 | rm -rf conftest* | |
5669 | ac_cv_header_alloca_h=no | |
5670 | fi | |
5671 | rm -f conftest* | |
5672 | fi | |
5673 | ||
5674 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5675 | if test $ac_cv_header_alloca_h = yes; then | |
5676 | cat >> confdefs.h <<\EOF | |
71a94577 | 5677 | #define HAVE_ALLOCA_H 1 |
093e61a6 | 5678 | EOF |
71a94577 | 5679 | |
ab87f8c8 | 5680 | fi |
ab87f8c8 | 5681 | |
093e61a6 | 5682 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
1072ec3f | 5683 | echo "configure:5684: checking for alloca" >&5 |
093e61a6 RS |
5684 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5685 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5686 | else |
093e61a6 | 5687 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5688 | #line 5689 "configure" |
093e61a6 RS |
5689 | #include "confdefs.h" |
5690 | ||
71a94577 ZW |
5691 | #ifdef __GNUC__ |
5692 | # define alloca __builtin_alloca | |
ab87f8c8 | 5693 | #else |
71a94577 ZW |
5694 | # ifdef _MSC_VER |
5695 | # include <malloc.h> | |
5696 | # define alloca _alloca | |
5697 | # else | |
5698 | # if HAVE_ALLOCA_H | |
5699 | # include <alloca.h> | |
5700 | # else | |
5701 | # ifdef _AIX | |
5702 | #pragma alloca | |
5703 | # else | |
5704 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5705 | char *alloca (); | |
5706 | # endif | |
5707 | # endif | |
5708 | # endif | |
5709 | # endif | |
ab87f8c8 JL |
5710 | #endif |
5711 | ||
093e61a6 RS |
5712 | int main() { |
5713 | char *p = (char *) alloca(1); | |
5714 | ; return 0; } | |
5715 | EOF | |
1072ec3f | 5716 | if { (eval echo configure:5717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5717 | rm -rf conftest* |
71a94577 | 5718 | ac_cv_func_alloca_works=yes |
ab87f8c8 | 5719 | else |
093e61a6 RS |
5720 | echo "configure: failed program was:" >&5 |
5721 | cat conftest.$ac_ext >&5 | |
5722 | rm -rf conftest* | |
5723 | ac_cv_func_alloca_works=no | |
ab87f8c8 | 5724 | fi |
093e61a6 | 5725 | rm -f conftest* |
ab87f8c8 JL |
5726 | fi |
5727 | ||
093e61a6 | 5728 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
71a94577 | 5729 | if test $ac_cv_func_alloca_works = yes; then |
093e61a6 | 5730 | cat >> confdefs.h <<\EOF |
cafe096b | 5731 | #define HAVE_ALLOCA 1 |
093e61a6 | 5732 | EOF |
cafe096b | 5733 | |
093e61a6 | 5734 | fi |
cafe096b | 5735 | |
093e61a6 RS |
5736 | if test $ac_cv_func_alloca_works = no; then |
5737 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5738 | # that cause trouble. Some versions do not even contain alloca or | |
5739 | # contain a buggy version. If you still want to use their alloca, | |
5740 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5741 | ALLOCA=alloca.${ac_objext} | |
5742 | cat >> confdefs.h <<\EOF | |
71a94577 | 5743 | #define C_ALLOCA 1 |
093e61a6 | 5744 | EOF |
71a94577 ZW |
5745 | |
5746 | ||
093e61a6 | 5747 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
1072ec3f | 5748 | echo "configure:5749: checking whether alloca needs Cray hooks" >&5 |
093e61a6 RS |
5749 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5751 | else |
093e61a6 | 5752 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5753 | #line 5754 "configure" |
093e61a6 | 5754 | #include "confdefs.h" |
71a94577 ZW |
5755 | #if defined(CRAY) && ! defined(CRAY2) |
5756 | webecray | |
5757 | #else | |
5758 | wenotbecray | |
5759 | #endif | |
5760 | ||
093e61a6 | 5761 | EOF |
71a94577 | 5762 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5763 | egrep "webecray" >/dev/null 2>&1; then |
5764 | rm -rf conftest* | |
71a94577 ZW |
5765 | ac_cv_os_cray=yes |
5766 | else | |
093e61a6 | 5767 | rm -rf conftest* |
71a94577 | 5768 | ac_cv_os_cray=no |
ab87f8c8 | 5769 | fi |
71a94577 | 5770 | rm -f conftest* |
ab87f8c8 | 5771 | |
71a94577 | 5772 | fi |
093e61a6 RS |
5773 | |
5774 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
71a94577 | 5775 | if test $ac_cv_os_cray = yes; then |
093e61a6 RS |
5776 | for ac_func in _getb67 GETB67 getb67; do |
5777 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
1072ec3f | 5778 | echo "configure:5779: checking for $ac_func" >&5 |
093e61a6 RS |
5779 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5781 | else | |
5782 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5783 | #line 5784 "configure" |
093e61a6 | 5784 | #include "confdefs.h" |
ab87f8c8 | 5785 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5786 | which can conflict with char $ac_func(); below. */ |
5787 | #include <assert.h> | |
ab87f8c8 JL |
5788 | /* Override any gcc2 internal prototype to avoid an error. */ |
5789 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5790 | builtin and then its argument prototype would still apply. */ |
5791 | char $ac_func(); | |
5792 | ||
5793 | int main() { | |
5794 | ||
ab87f8c8 JL |
5795 | /* The GNU C library defines this for functions which it implements |
5796 | to always fail with ENOSYS. Some functions are actually named | |
5797 | something starting with __ and the normal name is an alias. */ | |
5798 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5799 | choke me | |
5800 | #else | |
093e61a6 | 5801 | $ac_func(); |
ab87f8c8 JL |
5802 | #endif |
5803 | ||
093e61a6 RS |
5804 | ; return 0; } |
5805 | EOF | |
1072ec3f | 5806 | if { (eval echo configure:5807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5807 | rm -rf conftest* |
5808 | eval "ac_cv_func_$ac_func=yes" | |
5809 | else | |
5810 | echo "configure: failed program was:" >&5 | |
5811 | cat conftest.$ac_ext >&5 | |
5812 | rm -rf conftest* | |
5813 | eval "ac_cv_func_$ac_func=no" | |
5814 | fi | |
5815 | rm -f conftest* | |
5816 | fi | |
5817 | ||
5818 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5819 | echo "$ac_t""yes" 1>&6 | |
5820 | cat >> confdefs.h <<EOF | |
71a94577 | 5821 | #define CRAY_STACKSEG_END $ac_func |
093e61a6 | 5822 | EOF |
71a94577 | 5823 | |
093e61a6 RS |
5824 | break |
5825 | else | |
5826 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5827 | fi |
ab87f8c8 | 5828 | |
093e61a6 | 5829 | done |
71a94577 | 5830 | fi |
ab87f8c8 | 5831 | |
093e61a6 | 5832 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
1072ec3f | 5833 | echo "configure:5834: checking stack direction for C alloca" >&5 |
093e61a6 RS |
5834 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5835 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
5836 | else |
5837 | if test "$cross_compiling" = yes; then | |
5838 | ac_cv_c_stack_direction=0 | |
ab87f8c8 | 5839 | else |
093e61a6 | 5840 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5841 | #line 5842 "configure" |
093e61a6 | 5842 | #include "confdefs.h" |
71a94577 ZW |
5843 | find_stack_direction () |
5844 | { | |
5845 | static char *addr = 0; | |
5846 | auto char dummy; | |
5847 | if (addr == 0) | |
5848 | { | |
5849 | addr = &dummy; | |
5850 | return find_stack_direction (); | |
5851 | } | |
5852 | else | |
5853 | return (&dummy > addr) ? 1 : -1; | |
5854 | } | |
5855 | main () | |
5856 | { | |
093e61a6 | 5857 | exit (find_stack_direction() < 0); |
71a94577 | 5858 | } |
093e61a6 | 5859 | EOF |
1072ec3f | 5860 | if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5861 | then |
71a94577 | 5862 | ac_cv_c_stack_direction=1 |
ab87f8c8 | 5863 | else |
093e61a6 RS |
5864 | echo "configure: failed program was:" >&5 |
5865 | cat conftest.$ac_ext >&5 | |
5866 | rm -fr conftest* | |
5867 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5868 | fi |
093e61a6 | 5869 | rm -fr conftest* |
ab87f8c8 | 5870 | fi |
093e61a6 | 5871 | |
71a94577 ZW |
5872 | fi |
5873 | ||
093e61a6 RS |
5874 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
5875 | cat >> confdefs.h <<EOF | |
71a94577 | 5876 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
093e61a6 | 5877 | EOF |
ab87f8c8 | 5878 | |
ab87f8c8 JL |
5879 | fi |
5880 | ||
ab87f8c8 | 5881 | |
093e61a6 | 5882 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
1072ec3f | 5883 | echo "configure:5884: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
093e61a6 RS |
5884 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5885 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 5886 | else |
093e61a6 | 5887 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 5888 | #line 5889 "configure" |
093e61a6 | 5889 | #include "confdefs.h" |
ab87f8c8 | 5890 | |
71a94577 ZW |
5891 | #include <features.h> |
5892 | #ifdef __GNU_LIBRARY__ | |
5893 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5894 | Lucky GNU user | |
5895 | #endif | |
5896 | #endif | |
093e61a6 RS |
5897 | |
5898 | EOF | |
71a94577 | 5899 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5900 | egrep "Lucky GNU user" >/dev/null 2>&1; then |
5901 | rm -rf conftest* | |
71a94577 | 5902 | ac_cv_gnu_library_2_1=yes |
ab87f8c8 | 5903 | else |
093e61a6 | 5904 | rm -rf conftest* |
71a94577 | 5905 | ac_cv_gnu_library_2_1=no |
ab87f8c8 | 5906 | fi |
71a94577 | 5907 | rm -f conftest* |
ab87f8c8 | 5908 | |
093e61a6 RS |
5909 | |
5910 | ||
71a94577 | 5911 | fi |
ab87f8c8 | 5912 | |
093e61a6 RS |
5913 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5914 | ||
71a94577 | 5915 | GLIBC21="$ac_cv_gnu_library_2_1" |
093e61a6 | 5916 | |
ab87f8c8 | 5917 | |
093e61a6 RS |
5918 | |
5919 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
71a94577 ZW |
5920 | stdlib.h string.h unistd.h sys/param.h |
5921 | do | |
093e61a6 RS |
5922 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5923 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
1072ec3f | 5924 | echo "configure:5925: checking for $ac_hdr" >&5 |
093e61a6 RS |
5925 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5926 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5927 | else | |
5928 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5929 | #line 5930 "configure" |
093e61a6 RS |
5930 | #include "confdefs.h" |
5931 | #include <$ac_hdr> | |
5932 | EOF | |
5933 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1072ec3f | 5934 | { (eval echo configure:5935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
5935 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5936 | if test -z "$ac_err"; then | |
5937 | rm -rf conftest* | |
5938 | eval "ac_cv_header_$ac_safe=yes" | |
5939 | else | |
5940 | echo "$ac_err" >&5 | |
5941 | echo "configure: failed program was:" >&5 | |
5942 | cat conftest.$ac_ext >&5 | |
5943 | rm -rf conftest* | |
5944 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 5945 | fi |
093e61a6 | 5946 | rm -f conftest* |
ab87f8c8 | 5947 | fi |
093e61a6 RS |
5948 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5949 | echo "$ac_t""yes" 1>&6 | |
5950 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5951 | cat >> confdefs.h <<EOF | |
5952 | #define $ac_tr_hdr 1 | |
5953 | EOF | |
5954 | ||
5955 | else | |
5956 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5957 | fi |
71a94577 | 5958 | done |
ab87f8c8 | 5959 | |
093e61a6 | 5960 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
71a94577 ZW |
5961 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ |
5962 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5963 | do | |
093e61a6 | 5964 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1072ec3f | 5965 | echo "configure:5966: checking for $ac_func" >&5 |
093e61a6 RS |
5966 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5968 | else | |
5969 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 5970 | #line 5971 "configure" |
093e61a6 | 5971 | #include "confdefs.h" |
71a94577 | 5972 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5973 | which can conflict with char $ac_func(); below. */ |
5974 | #include <assert.h> | |
ab87f8c8 JL |
5975 | /* Override any gcc2 internal prototype to avoid an error. */ |
5976 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5977 | builtin and then its argument prototype would still apply. */ |
5978 | char $ac_func(); | |
5979 | ||
5980 | int main() { | |
5981 | ||
71a94577 ZW |
5982 | /* The GNU C library defines this for functions which it implements |
5983 | to always fail with ENOSYS. Some functions are actually named | |
5984 | something starting with __ and the normal name is an alias. */ | |
5985 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5986 | choke me | |
5987 | #else | |
093e61a6 | 5988 | $ac_func(); |
71a94577 ZW |
5989 | #endif |
5990 | ||
093e61a6 RS |
5991 | ; return 0; } |
5992 | EOF | |
1072ec3f | 5993 | if { (eval echo configure:5994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5994 | rm -rf conftest* |
5995 | eval "ac_cv_func_$ac_func=yes" | |
5996 | else | |
5997 | echo "configure: failed program was:" >&5 | |
5998 | cat conftest.$ac_ext >&5 | |
5999 | rm -rf conftest* | |
6000 | eval "ac_cv_func_$ac_func=no" | |
6001 | fi | |
6002 | rm -f conftest* | |
6003 | fi | |
71a94577 | 6004 | |
093e61a6 RS |
6005 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6006 | echo "$ac_t""yes" 1>&6 | |
6007 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6008 | cat >> confdefs.h <<EOF | |
6009 | #define $ac_tr_func 1 | |
6010 | EOF | |
6011 | ||
6012 | else | |
6013 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6014 | fi |
6015 | done | |
6016 | ||
6017 | ||
093e61a6 RS |
6018 | |
6019 | ||
b7f2fb96 | 6020 | am_cv_lib_iconv_ldpath= |
093e61a6 | 6021 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
71a94577 ZW |
6022 | if test "${with_libiconv_prefix+set}" = set; then |
6023 | withval="$with_libiconv_prefix" | |
093e61a6 | 6024 | |
71a94577 ZW |
6025 | for dir in `echo "$withval" | tr : ' '`; do |
6026 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 6027 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 | 6028 | done |
093e61a6 RS |
6029 | |
6030 | fi | |
ab87f8c8 | 6031 | |
71a94577 | 6032 | |
093e61a6 | 6033 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
1072ec3f | 6034 | echo "configure:6035: checking for iconv" >&5 |
093e61a6 RS |
6035 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
6036 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 6037 | else |
093e61a6 | 6038 | |
71a94577 ZW |
6039 | am_cv_func_iconv="no, consider installing GNU libiconv" |
6040 | am_cv_lib_iconv=no | |
093e61a6 | 6041 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 6042 | #line 6043 "configure" |
093e61a6 | 6043 | #include "confdefs.h" |
71a94577 ZW |
6044 | #include <stdlib.h> |
6045 | #include <iconv.h> | |
093e61a6 | 6046 | int main() { |
71a94577 ZW |
6047 | iconv_t cd = iconv_open("",""); |
6048 | iconv(cd,NULL,NULL,NULL,NULL); | |
6049 | iconv_close(cd); | |
093e61a6 RS |
6050 | ; return 0; } |
6051 | EOF | |
1072ec3f | 6052 | if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6053 | rm -rf conftest* |
71a94577 | 6054 | am_cv_func_iconv=yes |
ab87f8c8 | 6055 | else |
093e61a6 RS |
6056 | echo "configure: failed program was:" >&5 |
6057 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6058 | fi |
093e61a6 | 6059 | rm -f conftest* |
71a94577 ZW |
6060 | if test "$am_cv_func_iconv" != yes; then |
6061 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 6062 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 6063 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 6064 | #line 6065 "configure" |
093e61a6 | 6065 | #include "confdefs.h" |
71a94577 ZW |
6066 | #include <stdlib.h> |
6067 | #include <iconv.h> | |
093e61a6 | 6068 | int main() { |
71a94577 ZW |
6069 | iconv_t cd = iconv_open("",""); |
6070 | iconv(cd,NULL,NULL,NULL,NULL); | |
6071 | iconv_close(cd); | |
093e61a6 RS |
6072 | ; return 0; } |
6073 | EOF | |
1072ec3f | 6074 | if { (eval echo configure:6075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6075 | rm -rf conftest* |
71a94577 ZW |
6076 | am_cv_lib_iconv=yes |
6077 | am_cv_func_iconv=yes | |
ab87f8c8 | 6078 | else |
093e61a6 RS |
6079 | echo "configure: failed program was:" >&5 |
6080 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6081 | fi |
093e61a6 | 6082 | rm -f conftest* |
71a94577 ZW |
6083 | LIBS="$am_save_LIBS" |
6084 | fi | |
093e61a6 | 6085 | |
cafe096b | 6086 | fi |
cafe096b | 6087 | |
093e61a6 RS |
6088 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
6089 | if test "$am_cv_func_iconv" = yes; then | |
6090 | cat >> confdefs.h <<\EOF | |
71a94577 | 6091 | #define HAVE_ICONV 1 |
093e61a6 | 6092 | EOF |
71a94577 | 6093 | |
093e61a6 | 6094 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
1072ec3f | 6095 | echo "configure:6096: checking for iconv declaration" >&5 |
093e61a6 RS |
6096 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
6097 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6098 | else |
093e61a6 RS |
6099 | |
6100 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6101 | #line 6102 "configure" |
093e61a6 | 6102 | #include "confdefs.h" |
ab87f8c8 | 6103 | |
71a94577 ZW |
6104 | #include <stdlib.h> |
6105 | #include <iconv.h> | |
6106 | extern | |
6107 | #ifdef __cplusplus | |
6108 | "C" | |
6109 | #endif | |
6110 | #if defined(__STDC__) || defined(__cplusplus) | |
6111 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6112 | #else | |
6113 | size_t iconv(); | |
6114 | #endif | |
ab87f8c8 | 6115 | |
093e61a6 | 6116 | int main() { |
380a627a | 6117 | |
093e61a6 RS |
6118 | ; return 0; } |
6119 | EOF | |
1072ec3f | 6120 | if { (eval echo configure:6121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 6121 | rm -rf conftest* |
71a94577 | 6122 | am_cv_proto_iconv_arg1="" |
ab87f8c8 | 6123 | else |
093e61a6 RS |
6124 | echo "configure: failed program was:" >&5 |
6125 | cat conftest.$ac_ext >&5 | |
6126 | rm -rf conftest* | |
6127 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 6128 | fi |
093e61a6 | 6129 | rm -f conftest* |
71a94577 | 6130 | 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 | 6131 | fi |
71a94577 ZW |
6132 | |
6133 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
6134 | echo "$ac_t""${ac_t:- |
6135 | }$am_cv_proto_iconv" 1>&6 | |
6136 | cat >> confdefs.h <<EOF | |
71a94577 | 6137 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 6138 | EOF |
71a94577 ZW |
6139 | |
6140 | fi | |
6141 | LIBICONV= | |
6142 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 6143 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 | 6144 | fi |
093e61a6 | 6145 | |
71a94577 | 6146 | |
093e61a6 RS |
6147 | |
6148 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
1072ec3f | 6149 | echo "configure:6150: checking for nl_langinfo and CODESET" >&5 |
093e61a6 RS |
6150 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
6151 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6152 | else |
093e61a6 | 6153 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 6154 | #line 6155 "configure" |
093e61a6 | 6155 | #include "confdefs.h" |
71a94577 | 6156 | #include <langinfo.h> |
093e61a6 | 6157 | int main() { |
71a94577 | 6158 | char* cs = nl_langinfo(CODESET); |
093e61a6 RS |
6159 | ; return 0; } |
6160 | EOF | |
1072ec3f | 6161 | if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6162 | rm -rf conftest* |
71a94577 | 6163 | am_cv_langinfo_codeset=yes |
ab87f8c8 | 6164 | else |
093e61a6 RS |
6165 | echo "configure: failed program was:" >&5 |
6166 | cat conftest.$ac_ext >&5 | |
6167 | rm -rf conftest* | |
6168 | am_cv_langinfo_codeset=no | |
ab87f8c8 | 6169 | fi |
093e61a6 RS |
6170 | rm -f conftest* |
6171 | ||
cafe096b | 6172 | fi |
cafe096b | 6173 | |
093e61a6 RS |
6174 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
6175 | if test $am_cv_langinfo_codeset = yes; then | |
6176 | cat >> confdefs.h <<\EOF | |
71a94577 | 6177 | #define HAVE_LANGINFO_CODESET 1 |
093e61a6 | 6178 | EOF |
ab87f8c8 | 6179 | |
71a94577 ZW |
6180 | fi |
6181 | ||
6182 | if test $ac_cv_header_locale_h = yes; then | |
093e61a6 | 6183 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
1072ec3f | 6184 | echo "configure:6185: checking for LC_MESSAGES" >&5 |
093e61a6 RS |
6185 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
6186 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6187 | else | |
6188 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6189 | #line 6190 "configure" |
093e61a6 | 6190 | #include "confdefs.h" |
71a94577 | 6191 | #include <locale.h> |
093e61a6 | 6192 | int main() { |
71a94577 | 6193 | return LC_MESSAGES |
093e61a6 RS |
6194 | ; return 0; } |
6195 | EOF | |
1072ec3f | 6196 | if { (eval echo configure:6197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6197 | rm -rf conftest* |
71a94577 ZW |
6198 | am_cv_val_LC_MESSAGES=yes |
6199 | else | |
093e61a6 RS |
6200 | echo "configure: failed program was:" >&5 |
6201 | cat conftest.$ac_ext >&5 | |
6202 | rm -rf conftest* | |
6203 | am_cv_val_LC_MESSAGES=no | |
71a94577 | 6204 | fi |
093e61a6 | 6205 | rm -f conftest* |
71a94577 | 6206 | fi |
cafe096b | 6207 | |
093e61a6 RS |
6208 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
6209 | if test $am_cv_val_LC_MESSAGES = yes; then | |
6210 | cat >> confdefs.h <<\EOF | |
71a94577 | 6211 | #define HAVE_LC_MESSAGES 1 |
093e61a6 | 6212 | EOF |
71a94577 | 6213 | |
ab87f8c8 | 6214 | fi |
71a94577 | 6215 | fi |
093e61a6 | 6216 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
1072ec3f | 6217 | echo "configure:6218: checking whether NLS is requested" >&5 |
71a94577 ZW |
6218 | # Check whether --enable-nls or --disable-nls was given. |
6219 | if test "${enable_nls+set}" = set; then | |
6220 | enableval="$enable_nls" | |
6221 | USE_NLS=$enableval | |
6222 | else | |
6223 | USE_NLS=yes | |
093e61a6 | 6224 | fi |
71a94577 | 6225 | |
093e61a6 RS |
6226 | echo "$ac_t""$USE_NLS" 1>&6 |
6227 | ||
71a94577 ZW |
6228 | |
6229 | BUILD_INCLUDED_LIBINTL=no | |
6230 | USE_INCLUDED_LIBINTL=no | |
6231 | INTLLIBS= | |
77c06844 | 6232 | INTLDEPS= |
71a94577 ZW |
6233 | |
6234 | if test "$USE_NLS" = "yes"; then | |
093e61a6 | 6235 | cat >> confdefs.h <<\EOF |
71a94577 | 6236 | #define ENABLE_NLS 1 |
093e61a6 | 6237 | EOF |
71a94577 | 6238 | |
093e61a6 | 6239 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 |
1072ec3f | 6240 | echo "configure:6241: checking whether included gettext is requested" >&5 |
093e61a6 | 6241 | # Check whether --with-included-gettext or --without-included-gettext was given. |
71a94577 ZW |
6242 | if test "${with_included_gettext+set}" = set; then |
6243 | withval="$with_included_gettext" | |
6244 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 6245 | else |
71a94577 | 6246 | nls_cv_force_use_gnu_gettext=no |
093e61a6 RS |
6247 | fi |
6248 | ||
6249 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
71a94577 ZW |
6250 | |
6251 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
6252 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
6253 | CATOBJEXT=NONE | |
6254 | ||
093e61a6 RS |
6255 | |
6256 | ||
71a94577 | 6257 | |
093e61a6 RS |
6258 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` |
6259 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
1072ec3f | 6260 | echo "configure:6261: checking for libintl.h" >&5 |
093e61a6 RS |
6261 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6262 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6263 | else |
093e61a6 | 6264 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 6265 | #line 6266 "configure" |
093e61a6 | 6266 | #include "confdefs.h" |
cafe096b | 6267 | #include <libintl.h> |
093e61a6 RS |
6268 | EOF |
6269 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
1072ec3f | 6270 | { (eval echo configure:6271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
6271 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6272 | if test -z "$ac_err"; then | |
6273 | rm -rf conftest* | |
6274 | eval "ac_cv_header_$ac_safe=yes" | |
6275 | else | |
6276 | echo "$ac_err" >&5 | |
6277 | echo "configure: failed program was:" >&5 | |
6278 | cat conftest.$ac_ext >&5 | |
6279 | rm -rf conftest* | |
6280 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6281 | fi |
093e61a6 | 6282 | rm -f conftest* |
71a94577 | 6283 | fi |
093e61a6 RS |
6284 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6285 | echo "$ac_t""yes" 1>&6 | |
6286 | cat >> confdefs.h <<\EOF | |
cafe096b | 6287 | #define HAVE_LIBINTL_H 1 |
093e61a6 RS |
6288 | EOF |
6289 | ||
6290 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
1072ec3f | 6291 | echo "configure:6292: checking for GNU gettext in libc" >&5 |
093e61a6 RS |
6292 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6294 | else | |
6295 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6296 | #line 6297 "configure" |
093e61a6 | 6297 | #include "confdefs.h" |
71a94577 | 6298 | #include <libintl.h> |
ab87f8c8 | 6299 | extern int _nl_msg_cat_cntr; |
093e61a6 | 6300 | int main() { |
71a94577 ZW |
6301 | bindtextdomain ("", ""); |
6302 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6303 | ; return 0; } |
6304 | EOF | |
1072ec3f | 6305 | if { (eval echo configure:6306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6306 | rm -rf conftest* |
71a94577 | 6307 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 | 6308 | else |
093e61a6 RS |
6309 | echo "configure: failed program was:" >&5 |
6310 | cat conftest.$ac_ext >&5 | |
6311 | rm -rf conftest* | |
6312 | gt_cv_func_gnugettext1_libc=no | |
ab87f8c8 | 6313 | fi |
093e61a6 | 6314 | rm -f conftest* |
ab87f8c8 | 6315 | fi |
093e61a6 RS |
6316 | |
6317 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 | |
ab87f8c8 | 6318 | |
71a94577 | 6319 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
093e61a6 | 6320 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 |
1072ec3f | 6321 | echo "configure:6322: checking for GNU gettext in libintl" >&5 |
093e61a6 RS |
6322 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
6323 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6324 | else |
71a94577 ZW |
6325 | gt_save_LIBS="$LIBS" |
6326 | LIBS="$LIBS -lintl $LIBICONV" | |
093e61a6 | 6327 | cat > conftest.$ac_ext <<EOF |
1072ec3f | 6328 | #line 6329 "configure" |
093e61a6 | 6329 | #include "confdefs.h" |
71a94577 ZW |
6330 | #include <libintl.h> |
6331 | extern int _nl_msg_cat_cntr; | |
093e61a6 | 6332 | int main() { |
71a94577 ZW |
6333 | bindtextdomain ("", ""); |
6334 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6335 | ; return 0; } |
6336 | EOF | |
1072ec3f | 6337 | if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6338 | rm -rf conftest* |
71a94577 | 6339 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 | 6340 | else |
093e61a6 RS |
6341 | echo "configure: failed program was:" >&5 |
6342 | cat conftest.$ac_ext >&5 | |
6343 | rm -rf conftest* | |
6344 | gt_cv_func_gnugettext1_libintl=no | |
ab87f8c8 | 6345 | fi |
093e61a6 | 6346 | rm -f conftest* |
71a94577 | 6347 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6348 | fi |
093e61a6 RS |
6349 | |
6350 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
71a94577 ZW |
6351 | fi |
6352 | ||
6353 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6354 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6355 | && test "$PACKAGE" != gettext; }; then | |
093e61a6 | 6356 | cat >> confdefs.h <<\EOF |
71a94577 | 6357 | #define HAVE_GETTEXT 1 |
093e61a6 | 6358 | EOF |
ab87f8c8 | 6359 | |
ab87f8c8 | 6360 | |
71a94577 ZW |
6361 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6362 | INTLLIBS="-lintl $LIBICONV" | |
6363 | fi | |
ab87f8c8 | 6364 | |
71a94577 ZW |
6365 | gt_save_LIBS="$LIBS" |
6366 | LIBS="$LIBS $INTLLIBS" | |
093e61a6 | 6367 | for ac_func in dcgettext |
71a94577 | 6368 | do |
093e61a6 | 6369 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1072ec3f | 6370 | echo "configure:6371: checking for $ac_func" >&5 |
093e61a6 RS |
6371 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6372 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6373 | else | |
6374 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6375 | #line 6376 "configure" |
093e61a6 | 6376 | #include "confdefs.h" |
ab87f8c8 | 6377 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
6378 | which can conflict with char $ac_func(); below. */ |
6379 | #include <assert.h> | |
ab87f8c8 JL |
6380 | /* Override any gcc2 internal prototype to avoid an error. */ |
6381 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6382 | builtin and then its argument prototype would still apply. */ |
6383 | char $ac_func(); | |
6384 | ||
6385 | int main() { | |
6386 | ||
ab87f8c8 JL |
6387 | /* The GNU C library defines this for functions which it implements |
6388 | to always fail with ENOSYS. Some functions are actually named | |
6389 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6390 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6391 | choke me |
6392 | #else | |
093e61a6 | 6393 | $ac_func(); |
ab87f8c8 JL |
6394 | #endif |
6395 | ||
093e61a6 RS |
6396 | ; return 0; } |
6397 | EOF | |
1072ec3f | 6398 | if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6399 | rm -rf conftest* |
6400 | eval "ac_cv_func_$ac_func=yes" | |
6401 | else | |
6402 | echo "configure: failed program was:" >&5 | |
6403 | cat conftest.$ac_ext >&5 | |
6404 | rm -rf conftest* | |
6405 | eval "ac_cv_func_$ac_func=no" | |
6406 | fi | |
6407 | rm -f conftest* | |
6408 | fi | |
ab87f8c8 | 6409 | |
093e61a6 RS |
6410 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6411 | echo "$ac_t""yes" 1>&6 | |
6412 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6413 | cat >> confdefs.h <<EOF | |
6414 | #define $ac_tr_func 1 | |
6415 | EOF | |
6416 | ||
6417 | else | |
6418 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6419 | fi |
6420 | done | |
ab87f8c8 | 6421 | |
71a94577 ZW |
6422 | LIBS="$gt_save_LIBS" |
6423 | ||
6424 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6425 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6426 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6427 | echo "configure:6428: checking for $ac_word" >&5 |
093e61a6 RS |
6428 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6429 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6430 | else |
71a94577 | 6431 | case "$MSGFMT" in |
ab87f8c8 | 6432 | /*) |
71a94577 | 6433 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6434 | ;; |
6435 | *) | |
71a94577 ZW |
6436 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6437 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6438 | test -z "$ac_dir" && ac_dir=. |
6439 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6440 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6441 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6442 | break | |
6443 | fi | |
ab87f8c8 JL |
6444 | fi |
6445 | done | |
6446 | IFS="$ac_save_ifs" | |
71a94577 | 6447 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6448 | ;; |
6449 | esac | |
6450 | fi | |
71a94577 ZW |
6451 | MSGFMT="$ac_cv_path_MSGFMT" |
6452 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6453 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6454 | else |
093e61a6 | 6455 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 6456 | fi |
71a94577 ZW |
6457 | |
6458 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 | 6459 | set dummy gmsgfmt; ac_word=$2 |
093e61a6 | 6460 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6461 | echo "configure:6462: checking for $ac_word" >&5 |
093e61a6 RS |
6462 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6463 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6464 | else |
093e61a6 RS |
6465 | case "$GMSGFMT" in |
6466 | /*) | |
71a94577 | 6467 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6468 | ;; |
093e61a6 RS |
6469 | ?:/*) |
6470 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6471 | ;; | |
ab87f8c8 | 6472 | *) |
093e61a6 RS |
6473 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6474 | ac_dummy="$PATH" | |
6475 | for ac_dir in $ac_dummy; do | |
6476 | test -z "$ac_dir" && ac_dir=. | |
6477 | if test -f $ac_dir/$ac_word; then | |
6478 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6479 | break | |
6480 | fi | |
6481 | done | |
6482 | IFS="$ac_save_ifs" | |
71a94577 | 6483 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6484 | ;; |
6485 | esac | |
6486 | fi | |
093e61a6 | 6487 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6488 | if test -n "$GMSGFMT"; then |
093e61a6 | 6489 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6490 | else |
093e61a6 | 6491 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6492 | fi |
6493 | ||
ab87f8c8 | 6494 | |
71a94577 | 6495 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 | 6496 | set dummy xgettext; ac_word=$2 |
093e61a6 | 6497 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6498 | echo "configure:6499: checking for $ac_word" >&5 |
093e61a6 RS |
6499 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6500 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6501 | else |
6502 | case "$XGETTEXT" in | |
6503 | /*) | |
71a94577 | 6504 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6505 | ;; |
6506 | *) | |
6507 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6508 | for ac_dir in $PATH; do | |
6509 | test -z "$ac_dir" && ac_dir=. | |
6510 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6511 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6512 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6513 | break |
6514 | fi | |
6515 | fi | |
6516 | done | |
6517 | IFS="$ac_save_ifs" | |
71a94577 | 6518 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6519 | ;; |
6520 | esac | |
6521 | fi | |
71a94577 ZW |
6522 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6523 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6524 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6525 | else |
093e61a6 | 6526 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6527 | fi |
6528 | ||
71a94577 ZW |
6529 | |
6530 | CATOBJEXT=.gmo | |
6531 | fi | |
093e61a6 RS |
6532 | |
6533 | else | |
6534 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 JL |
6535 | fi |
6536 | ||
ab87f8c8 JL |
6537 | |
6538 | if test "$CATOBJEXT" = "NONE"; then | |
6539 | nls_cv_use_gnu_gettext=yes | |
6540 | fi | |
6541 | fi | |
6542 | ||
6543 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6544 | INTLOBJS="\$(GETTOBJS)" | |
6545 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6546 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6547 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6548 | echo "configure:6549: checking for $ac_word" >&5 |
093e61a6 RS |
6549 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6550 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6551 | else |
6552 | case "$MSGFMT" in | |
6553 | /*) | |
71a94577 | 6554 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6555 | ;; |
6556 | *) | |
6557 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6558 | for ac_dir in $PATH; do | |
6559 | test -z "$ac_dir" && ac_dir=. | |
6560 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6561 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6562 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6563 | break |
6564 | fi | |
6565 | fi | |
6566 | done | |
6567 | IFS="$ac_save_ifs" | |
71a94577 | 6568 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6569 | ;; |
6570 | esac | |
6571 | fi | |
71a94577 ZW |
6572 | MSGFMT="$ac_cv_path_MSGFMT" |
6573 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6574 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6575 | else |
093e61a6 | 6576 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6577 | fi |
6578 | ||
6579 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6580 | set dummy gmsgfmt; ac_word=$2 | |
093e61a6 | 6581 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6582 | echo "configure:6583: checking for $ac_word" >&5 |
093e61a6 RS |
6583 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6585 | else |
093e61a6 RS |
6586 | case "$GMSGFMT" in |
6587 | /*) | |
71a94577 | 6588 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6589 | ;; |
093e61a6 RS |
6590 | ?:/*) |
6591 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6592 | ;; | |
ab87f8c8 | 6593 | *) |
093e61a6 RS |
6594 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6595 | ac_dummy="$PATH" | |
6596 | for ac_dir in $ac_dummy; do | |
6597 | test -z "$ac_dir" && ac_dir=. | |
6598 | if test -f $ac_dir/$ac_word; then | |
6599 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6600 | break | |
6601 | fi | |
6602 | done | |
6603 | IFS="$ac_save_ifs" | |
71a94577 | 6604 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6605 | ;; |
6606 | esac | |
6607 | fi | |
093e61a6 | 6608 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6609 | if test -n "$GMSGFMT"; then |
093e61a6 | 6610 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6611 | else |
093e61a6 | 6612 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6613 | fi |
6614 | ||
6615 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6616 | set dummy xgettext; ac_word=$2 | |
093e61a6 | 6617 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6618 | echo "configure:6619: checking for $ac_word" >&5 |
093e61a6 RS |
6619 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6620 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6621 | else |
6622 | case "$XGETTEXT" in | |
6623 | /*) | |
71a94577 | 6624 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6625 | ;; |
6626 | *) | |
6627 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6628 | for ac_dir in $PATH; do | |
6629 | test -z "$ac_dir" && ac_dir=. | |
6630 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6631 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6632 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6633 | break |
6634 | fi | |
6635 | fi | |
6636 | done | |
6637 | IFS="$ac_save_ifs" | |
71a94577 | 6638 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6639 | ;; |
6640 | esac | |
6641 | fi | |
71a94577 ZW |
6642 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6643 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6644 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6645 | else |
093e61a6 | 6646 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6647 | fi |
6648 | ||
093e61a6 | 6649 | |
71a94577 | 6650 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6651 | USE_INCLUDED_LIBINTL=yes |
6652 | CATOBJEXT=.gmo | |
71a94577 | 6653 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6654 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6655 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6656 | fi | |
6657 | ||
6658 | if test "$GMSGFMT" != ":"; then | |
6659 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6660 | : ; | |
6661 | else | |
093e61a6 | 6662 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 |
71a94577 ZW |
6663 | GMSGFMT=":" |
6664 | fi | |
ab87f8c8 JL |
6665 | fi |
6666 | ||
71a94577 ZW |
6667 | if test "$XGETTEXT" != ":"; then |
6668 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6669 | : ; |
6670 | else | |
093e61a6 | 6671 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 |
ab87f8c8 JL |
6672 | XGETTEXT=":" |
6673 | fi | |
6674 | fi | |
6675 | ||
71a94577 ZW |
6676 | POSUB=po |
6677 | fi | |
093e61a6 | 6678 | |
17297c41 PT |
6679 | |
6680 | ||
71a94577 ZW |
6681 | if test "$PACKAGE" = gettext; then |
6682 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6683 | fi |
ab87f8c8 | 6684 | |
71a94577 ZW |
6685 | for ac_prog in bison |
6686 | do | |
093e61a6 | 6687 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
71a94577 | 6688 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 6689 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
1072ec3f | 6690 | echo "configure:6691: checking for $ac_word" >&5 |
093e61a6 RS |
6691 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6692 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
6693 | else |
6694 | if test -n "$INTLBISON"; then | |
6695 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6696 | else | |
093e61a6 RS |
6697 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6698 | ac_dummy="$PATH" | |
6699 | for ac_dir in $ac_dummy; do | |
6700 | test -z "$ac_dir" && ac_dir=. | |
6701 | if test -f $ac_dir/$ac_word; then | |
6702 | ac_cv_prog_INTLBISON="$ac_prog" | |
6703 | break | |
6704 | fi | |
6705 | done | |
6706 | IFS="$ac_save_ifs" | |
71a94577 ZW |
6707 | fi |
6708 | fi | |
093e61a6 | 6709 | INTLBISON="$ac_cv_prog_INTLBISON" |
71a94577 | 6710 | if test -n "$INTLBISON"; then |
093e61a6 | 6711 | echo "$ac_t""$INTLBISON" 1>&6 |
71a94577 | 6712 | else |
093e61a6 | 6713 | echo "$ac_t""no" 1>&6 |
71a94577 ZW |
6714 | fi |
6715 | ||
093e61a6 | 6716 | test -n "$INTLBISON" && break |
71a94577 | 6717 | done |
ab87f8c8 | 6718 | |
71a94577 ZW |
6719 | if test -z "$INTLBISON"; then |
6720 | ac_verc_fail=yes | |
6721 | else | |
093e61a6 | 6722 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 |
1072ec3f | 6723 | echo "configure:6724: checking version of bison" >&5 |
71a94577 ZW |
6724 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6725 | case $ac_prog_version in | |
6726 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6727 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6728 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6729 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6730 | esac | |
093e61a6 | 6731 | echo "$ac_t""$ac_prog_version" 1>&6 |
71a94577 ZW |
6732 | fi |
6733 | if test $ac_verc_fail = yes; then | |
6734 | INTLBISON=: | |
ab87f8c8 JL |
6735 | fi |
6736 | ||
093e61a6 RS |
6737 | |
6738 | ||
6739 | ||
6740 | ||
6741 | ||
6742 | ||
6743 | ||
6744 | ||
6745 | ||
191bf464 | 6746 | if test $USE_INCLUDED_LIBINTL = yes; then |
093e61a6 | 6747 | cat >> confdefs.h <<\EOF |
191bf464 | 6748 | #define USE_INCLUDED_LIBINTL 1 |
093e61a6 | 6749 | EOF |
191bf464 ZW |
6750 | |
6751 | fi | |
71a94577 ZW |
6752 | |
6753 | nls_cv_header_intl= | |
6754 | nls_cv_header_libgt= | |
6755 | ||
6756 | DATADIRNAME=share | |
093e61a6 | 6757 | |
71a94577 ZW |
6758 | |
6759 | INSTOBJEXT=.mo | |
093e61a6 | 6760 | |
ab87f8c8 | 6761 | |
71a94577 | 6762 | GENCAT=gencat |
093e61a6 RS |
6763 | |
6764 | ||
9fdf713f | 6765 | |
9f6682b7 | 6766 | if test "x$CATOBJEXT" != x; then |
093e61a6 | 6767 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
1072ec3f | 6768 | echo "configure:6769: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6769 | # Look for .po and .gmo files in the source directory. |
6770 | CATALOGS= | |
6771 | XLINGUAS= | |
6772 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6773 | # If there aren't any .gmo files the shell will give us the | |
6774 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6775 | # weeded out. | |
6776 | case "$cat" in *\**) | |
6777 | continue;; | |
6778 | esac | |
6779 | # The quadruple backslash is collapsed to a double backslash | |
6780 | # by the backticks, then collapsed again by the double quotes, | |
6781 | # leaving us with one backslash in the sed expression (right | |
6782 | # before the dot that mustn't act as a wildcard). The dot to | |
6783 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6784 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6785 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6786 | # The user is allowed to set LINGUAS to a list of languages to | |
6787 | # install catalogs for. If it's empty that means "all of them." | |
6788 | if test "x$LINGUAS" = x; then | |
6789 | CATALOGS="$CATALOGS $cat" | |
6790 | XLINGUAS="$XLINGUAS $lang" | |
6791 | else | |
6792 | case "$LINGUAS" in *$lang*) | |
6793 | CATALOGS="$CATALOGS $cat" | |
6794 | XLINGUAS="$XLINGUAS $lang" | |
6795 | ;; | |
6796 | esac | |
6797 | fi | |
6798 | done | |
6799 | LINGUAS="$XLINGUAS" | |
093e61a6 | 6800 | echo "$ac_t""$LINGUAS" 1>&6 |
ab87f8c8 JL |
6801 | fi |
6802 | ||
ab87f8c8 JL |
6803 | MKINSTALLDIRS= |
6804 | if test -n "$ac_aux_dir"; then | |
6805 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6806 | fi | |
6807 | if test -z "$MKINSTALLDIRS"; then | |
6808 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6809 | fi | |
093e61a6 | 6810 | |
ab87f8c8 | 6811 | |
71a94577 | 6812 | INTL_LIBTOOL_SUFFIX_PREFIX= |
093e61a6 RS |
6813 | |
6814 | ||
ab87f8c8 | 6815 | |
f4ab28e3 MK |
6816 | # Windows32 Registry support for specifying GCC installation paths. |
6817 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6818 | if test "${enable_win32_registry+set}" = set; then | |
6819 | enableval="$enable_win32_registry" | |
093e61a6 RS |
6820 | : |
6821 | fi | |
f4ab28e3 | 6822 | |
4e70264f ZW |
6823 | case $host_os in |
6824 | win32 | pe | cygwin* | mingw32* | uwin*) | |
093e61a6 | 6825 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
1072ec3f | 6826 | echo "configure:6827: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6827 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6828 | cat >> confdefs.h <<\EOF |
f4ab28e3 | 6829 | #define ENABLE_WIN32_REGISTRY 1 |
093e61a6 | 6830 | EOF |
f4ab28e3 | 6831 | |
093e61a6 RS |
6832 | echo "$ac_t""yes" 1>&6 |
6833 | ||
6834 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
1072ec3f | 6835 | echo "configure:6836: checking for library containing RegOpenKeyExA" >&5 |
093e61a6 RS |
6836 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6837 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6838 | else | |
6839 | ac_func_search_save_LIBS="$LIBS" | |
6840 | ac_cv_search_RegOpenKeyExA="no" | |
6841 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6842 | #line 6843 "configure" |
093e61a6 | 6843 | #include "confdefs.h" |
4e70264f ZW |
6844 | /* Override any gcc2 internal prototype to avoid an error. */ |
6845 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6846 | builtin and then its argument prototype would still apply. */ |
6847 | char RegOpenKeyExA(); | |
6848 | ||
6849 | int main() { | |
6850 | RegOpenKeyExA() | |
6851 | ; return 0; } | |
6852 | EOF | |
1072ec3f | 6853 | if { (eval echo configure:6854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6854 | rm -rf conftest* |
4e70264f ZW |
6855 | ac_cv_search_RegOpenKeyExA="none required" |
6856 | else | |
093e61a6 RS |
6857 | echo "configure: failed program was:" >&5 |
6858 | cat conftest.$ac_ext >&5 | |
4e70264f | 6859 | fi |
093e61a6 RS |
6860 | rm -f conftest* |
6861 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6862 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6863 | cat > conftest.$ac_ext <<EOF | |
1072ec3f | 6864 | #line 6865 "configure" |
093e61a6 | 6865 | #include "confdefs.h" |
4e70264f ZW |
6866 | /* Override any gcc2 internal prototype to avoid an error. */ |
6867 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6868 | builtin and then its argument prototype would still apply. */ |
6869 | char RegOpenKeyExA(); | |
6870 | ||
6871 | int main() { | |
6872 | RegOpenKeyExA() | |
6873 | ; return 0; } | |
6874 | EOF | |
1072ec3f | 6875 | if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6876 | rm -rf conftest* |
6877 | ac_cv_search_RegOpenKeyExA="-l$i" | |
4e70264f ZW |
6878 | break |
6879 | else | |
093e61a6 RS |
6880 | echo "configure: failed program was:" >&5 |
6881 | cat conftest.$ac_ext >&5 | |
4e70264f | 6882 | fi |
093e61a6 RS |
6883 | rm -f conftest* |
6884 | done | |
6885 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 6886 | fi |
cafe096b | 6887 | |
093e61a6 RS |
6888 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
6889 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6890 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6891 | ||
6892 | else : | |
6893 | ||
4e70264f | 6894 | fi |
f4ab28e3 | 6895 | else |
093e61a6 | 6896 | echo "$ac_t""no" 1>&6 |
f4ab28e3 MK |
6897 | fi |
6898 | ||
6899 | # Check if user specified a different registry key. | |
9dd53f2c | 6900 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6901 | x | xyes) |
6902 | # default. | |
6903 | gcc_cv_win32_registry_key="$VERSION" | |
6904 | ;; | |
6905 | xno) | |
6906 | # no registry lookup. | |
6907 | gcc_cv_win32_registry_key='' | |
6908 | ;; | |
6909 | *) | |
6910 | # user-specified key. | |
6911 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6912 | ;; | |
6913 | esac | |
6914 | ||
9dd53f2c | 6915 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6916 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
1072ec3f | 6917 | echo "configure:6918: checking registry key on windows hosts" >&5 |
093e61a6 | 6918 | cat >> confdefs.h <<EOF |
f4ab28e3 | 6919 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
093e61a6 | 6920 | EOF |
f4ab28e3 | 6921 | |
093e61a6 | 6922 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
f4ab28e3 | 6923 | fi |
4e70264f ZW |
6924 | ;; |
6925 | esac | |
f4ab28e3 | 6926 | |
ab87f8c8 | 6927 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6928 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6929 | cd $srcdir |
1e6347d8 | 6930 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6931 | cd $holddir |
6932 | ||
6933 | # Conditionalize the makefile for this host machine. | |
6934 | # Make-host contains the concatenation of all host makefile fragments | |
6935 | # [there can be more than one]. This file is built by configure.frag. | |
6936 | host_overrides=Make-host | |
6937 | dep_host_xmake_file= | |
6938 | for f in .. ${host_xmake_file} | |
6939 | do | |
6940 | if test -f ${srcdir}/config/$f | |
6941 | then | |
6942 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6943 | fi | |
6944 | done | |
6945 | ||
6946 | # Conditionalize the makefile for this target machine. | |
6947 | # Make-target contains the concatenation of all host makefile fragments | |
6948 | # [there can be more than one]. This file is built by configure.frag. | |
6949 | target_overrides=Make-target | |
6950 | dep_tmake_file= | |
6951 | for f in .. ${tmake_file} | |
6952 | do | |
6953 | if test -f ${srcdir}/config/$f | |
6954 | then | |
6955 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6956 | fi | |
6957 | done | |
6958 | ||
34a86c2b NN |
6959 | symbolic_link='ln -s' |
6960 | ||
ab87f8c8 JL |
6961 | # If the host doesn't support symlinks, modify CC in |
6962 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6963 | # Otherwise, we can use "CC=$(CC)". | |
6964 | rm -f symtest.tem | |
6965 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6966 | then | |
6967 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6968 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6969 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6970 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6971 | else |
6972 | rm -f symtest.tem | |
6973 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6974 | then | |
6975 | symbolic_link="cp -p" | |
6976 | else | |
6977 | symbolic_link="cp" | |
6978 | fi | |
6979 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6980 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6981 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6982 | 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 |
6983 | fi |
6984 | rm -f symtest.tem | |
6985 | ||
6986 | out_object_file=`basename $out_file .c`.o | |
6987 | ||
6988 | tm_file_list= | |
6989 | for f in $tm_file; do | |
64ccbc99 | 6990 | case $f in |
d02af173 ZW |
6991 | ansidecl.h ) |
6992 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6993 | defaults.h ) | |
e2500fed | 6994 | tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; |
64ccbc99 KG |
6995 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; |
6996 | esac | |
ab87f8c8 JL |
6997 | done |
6998 | ||
11642c3a ZW |
6999 | tm_p_file_list= |
7000 | for f in $tm_p_file; do | |
4977bab6 ZW |
7001 | case $f in |
7002 | tm-preds.h ) | |
7003 | tm_p_file_list="${tm_p_file_list} $f" ;; | |
7004 | *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;; | |
7005 | esac | |
11642c3a ZW |
7006 | done |
7007 | ||
ab87f8c8 JL |
7008 | host_xm_file_list= |
7009 | for f in $host_xm_file; do | |
64ccbc99 | 7010 | case $f in |
d02af173 ZW |
7011 | ansidecl.h ) |
7012 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7013 | auto-host.h ) |
64ccbc99 | 7014 | host_xm_file_list="${host_xm_file_list} $f" ;; |
e2500fed GK |
7015 | defaults.h ) |
7016 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7017 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; |
7018 | esac | |
ab87f8c8 JL |
7019 | done |
7020 | ||
7021 | build_xm_file_list= | |
7022 | for f in $build_xm_file; do | |
64ccbc99 | 7023 | case $f in |
d02af173 ZW |
7024 | ansidecl.h ) |
7025 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7026 | auto-build.h | auto-host.h ) |
64ccbc99 | 7027 | build_xm_file_list="${build_xm_file_list} $f" ;; |
e2500fed GK |
7028 | defaults.h ) |
7029 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7030 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; |
7031 | esac | |
ab87f8c8 JL |
7032 | done |
7033 | ||
a078a589 ZW |
7034 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
7035 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
093e61a6 RS |
7036 | CROSS= |
7037 | ALL=all.internal | |
7038 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7039 | if test x$host != x$target |
7040 | then | |
a078a589 ZW |
7041 | CROSS="-DCROSS_COMPILE" |
7042 | ALL=all.cross | |
7043 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
7044 | case "$host","$target" in |
7045 | i?86-*-*,x86_64-*-* \ | |
7046 | | powerpc*-*-*,powerpc64*-*-*) | |
7047 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
7048 | esac | |
7a615b25 AO |
7049 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
7050 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
7051 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7052 | fi |
7053 | ||
b39d221a EC |
7054 | # If this is a cross-compiler that does not |
7055 | # have its own set of headers then define | |
7056 | # inhibit_libc | |
7057 | ||
dc06db20 R |
7058 | # If this is using newlib, without having the headers available now, |
7059 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
7060 | # This prevents libgcc2 from containing any code which requires libc |
7061 | # support. | |
b39d221a | 7062 | inhibit_libc= |
dc06db20 R |
7063 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
7064 | test x$with_newlib = xyes ; } && | |
7065 | test "x$with_headers" = x ; then | |
b39d221a | 7066 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
7067 | fi |
7068 | ||
7069 | ||
a078a589 ZW |
7070 | # When building gcc with a cross-compiler, we need to adjust things so |
7071 | # that the generator programs are still built with the native compiler. | |
7072 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
7073 | |
7074 | # These are the normal (build=host) settings: | |
093e61a6 RS |
7075 | BUILD_PREFIX= |
7076 | BUILD_PREFIX_1=ignore- | |
7077 | BUILD_CC='$(CC)' | |
7078 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 7079 | |
093e61a6 RS |
7080 | STMP_FIXINC=stmp-fixinc |
7081 | STMP_FIXPROTO=stmp-fixproto | |
a078a589 ZW |
7082 | |
7083 | # And these apply if build != host. | |
ab87f8c8 JL |
7084 | if test x$build != x$host |
7085 | then | |
5c35940c NN |
7086 | BUILD_PREFIX=build- |
7087 | BUILD_PREFIX_1=build- | |
4977bab6 ZW |
7088 | BUILD_CC='$(CC_FOR_BUILD)' |
7089 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' | |
a078a589 | 7090 | |
7a615b25 AO |
7091 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
7092 | STMP_FIXINC= | |
7093 | STMP_FIXPROTO= | |
7094 | fi | |
ab87f8c8 JL |
7095 | fi |
7096 | ||
7097 | # Expand extra_headers to include complete path. | |
7098 | # This substitutes for lots of t-* files. | |
7099 | extra_headers_list= | |
7100 | if test "x$extra_headers" = x | |
7101 | then true | |
7102 | else | |
29f7a208 | 7103 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
7104 | for file in $extra_headers; |
7105 | do | |
29f7a208 | 7106 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
7107 | done |
7108 | fi | |
7109 | ||
ab87f8c8 | 7110 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
7111 | case $use_collect2 in |
7112 | no) use_collect2= ;; | |
7113 | "") ;; | |
093e61a6 | 7114 | *) |
34a86c2b NN |
7115 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
7116 | xm_defines="${xm_defines} USE_COLLECT2" | |
7117 | ;; | |
7118 | esac | |
ab87f8c8 | 7119 | |
d869a8c4 NN |
7120 | # Identify the assembler which will work hand-in-glove with the newly |
7121 | # built GCC, so that we can examine its features. This is the assembler | |
7122 | # which will be driven by the driver program. | |
7123 | # | |
7124 | # If build != host, and we aren't building gas in-tree, we identify a | |
7125 | # build->target assembler and hope that it will have the same features | |
7126 | # as the host->target assembler we'll be using. | |
093e61a6 | 7127 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
1072ec3f | 7128 | echo "configure:7129: checking what assembler to use" >&5 |
34a86c2b | 7129 | in_tree_gas=no |
ab87f8c8 | 7130 | gcc_cv_as= |
981d4858 JM |
7131 | gcc_cv_gas_major_version= |
7132 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
7133 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
7134 | if test -x "$DEFAULT_ASSEMBLER"; then | |
7135 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
7136 | elif test -x "$AS"; then | |
7137 | gcc_cv_as="$AS" | |
7138 | elif test -x as$host_exeext; then | |
7139 | # Build using assembler in the current directory. | |
7140 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
7141 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
7142 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
7143 | # Single tree build which includes gas. |
7144 | in_tree_gas=yes | |
7145 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7146 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
7147 | $gcc_cv_as_gas_srcdir/configure \ | |
7148 | $gcc_cv_as_gas_srcdir/configure.in \ | |
7149 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
7150 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7151 | if test x$gcc_cv_gas_version != x; then | |
7152 | break | |
7153 | fi | |
7154 | done | |
7155 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
7156 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
7157 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
7158 | ||
f9c1196a ZW |
7159 | rm -f as$host_exeext |
7160 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
981d4858 | 7161 | fi |
9e423e6d | 7162 | |
534d0cc0 | 7163 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
7164 | # Search the same directories that the installed compiler will |
7165 | # search. Else we may find the wrong assembler and lose. If we | |
7166 | # do not find a suitable assembler binary, then try the user's | |
7167 | # path. | |
7168 | # | |
7169 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7170 | # user's path. Unfortunately, there is no good way to get at the | |
7171 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7172 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7173 | # to be fixed as part of the make/configure rewrite too. | |
7174 | ||
7175 | if test "x$exec_prefix" = xNONE; then | |
7176 | if test "x$prefix" = xNONE; then | |
7177 | test_prefix=/usr/local | |
7178 | else | |
7179 | test_prefix=$prefix | |
7180 | fi | |
7181 | else | |
7182 | test_prefix=$exec_prefix | |
7183 | fi | |
7184 | ||
7185 | # If the loop below does not find an assembler, then use whatever | |
7186 | # one we can find in the users's path. | |
7187 | # user's path. | |
55a2ea2a AM |
7188 | if test "x$program_prefix" != xNONE; then |
7189 | gcc_cv_as=${program_prefix}as$host_exeext | |
7190 | else | |
7191 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
7192 | fi | |
7193 | ||
7194 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7195 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7196 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7197 | /usr/lib/gcc/$target_alias \ | |
7198 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7199 | $test_prefix/$target_alias/bin" | |
7200 | ||
7201 | if test x$host = x$target; then | |
7202 | test_dirs="$test_dirs \ | |
779243f7 JL |
7203 | /usr/libexec \ |
7204 | /usr/ccs/gcc \ | |
7205 | /usr/ccs/bin \ | |
7206 | /udk/usr/ccs/bin \ | |
7207 | /bsd43/usr/lib/cmplrs/cc \ | |
7208 | /usr/cross64/usr/bin \ | |
7209 | /usr/lib/cmplrs/cc \ | |
7210 | /sysv/usr/lib/cmplrs/cc \ | |
7211 | /svr4/usr/lib/cmplrs/cc \ | |
7212 | /usr/bin" | |
55a2ea2a | 7213 | fi |
779243f7 JL |
7214 | |
7215 | for dir in $test_dirs; do | |
55a2ea2a | 7216 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
7217 | gcc_cv_as=$dir/as$host_exeext |
7218 | break; | |
7219 | fi | |
7220 | done | |
9e423e6d | 7221 | fi |
34a86c2b NN |
7222 | case $in_tree_gas in |
7223 | yes) | |
093e61a6 | 7224 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
7225 | ;; |
7226 | no) | |
093e61a6 | 7227 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
7228 | ;; |
7229 | esac | |
981d4858 | 7230 | |
d869a8c4 NN |
7231 | # Identify the linker which will work hand-in-glove with the newly |
7232 | # built GCC, so that we can examine its features. This is the linker | |
7233 | # which will be driven by the driver program. | |
7234 | # | |
7235 | # If build != host, and we aren't building gas in-tree, we identify a | |
7236 | # build->target linker and hope that it will have the same features | |
7237 | # as the host->target linker we'll be using. | |
093e61a6 | 7238 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
1072ec3f | 7239 | echo "configure:7240: checking what linker to use" >&5 |
34a86c2b | 7240 | in_tree_ld=no |
275b60d6 JJ |
7241 | gcc_cv_ld= |
7242 | gcc_cv_gld_major_version= | |
7243 | gcc_cv_gld_minor_version= | |
7244 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
7245 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7246 | if test -x "$DEFAULT_LINKER"; then | |
7247 | gcc_cv_ld="$DEFAULT_LINKER" | |
7248 | elif test -x "$LD"; then | |
7249 | gcc_cv_ld="$LD" | |
f9c1196a | 7250 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 7251 | # Build using linker in the current directory. |
f9c1196a | 7252 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
7253 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
7254 | && test -f ../ld/Makefile; then | |
275b60d6 | 7255 | # Single tree build which includes ld. |
34a86c2b | 7256 | in_tree_ld=yes |
275b60d6 JJ |
7257 | 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 |
7258 | do | |
7259 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7260 | if test x$gcc_cv_gld_version != x; then | |
7261 | break | |
7262 | fi | |
7263 | done | |
7264 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
7265 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
7266 | rm -f collect-ld$host_exeext |
7267 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
7268 | 2>/dev/null | |
275b60d6 JJ |
7269 | fi |
7270 | ||
534d0cc0 | 7271 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
7272 | # Search the same directories that the installed compiler will |
7273 | # search. Else we may find the wrong linker and lose. If we | |
7274 | # do not find a suitable linker binary, then try the user's | |
7275 | # path. | |
7276 | # | |
7277 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7278 | # user's path. Unfortunately, there is no good way to get at the | |
7279 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7280 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7281 | # to be fixed as part of the make/configure rewrite too. | |
7282 | ||
7283 | if test "x$exec_prefix" = xNONE; then | |
7284 | if test "x$prefix" = xNONE; then | |
7285 | test_prefix=/usr/local | |
7286 | else | |
7287 | test_prefix=$prefix | |
7288 | fi | |
7289 | else | |
7290 | test_prefix=$exec_prefix | |
7291 | fi | |
7292 | ||
7293 | # If the loop below does not find an linker, then use whatever | |
7294 | # one we can find in the users's path. | |
7295 | # user's path. | |
55a2ea2a AM |
7296 | if test "x$program_prefix" != xNONE; then |
7297 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7298 | else | |
7299 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7300 | fi | |
7301 | ||
7302 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7303 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7304 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7305 | /usr/lib/gcc/$target_alias \ | |
7306 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7307 | $test_prefix/$target_alias/bin" | |
7308 | ||
7309 | if test x$host = x$target; then | |
7310 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7311 | /usr/libexec \ |
7312 | /usr/ccs/gcc \ | |
7313 | /usr/ccs/bin \ | |
7314 | /udk/usr/ccs/bin \ | |
7315 | /bsd43/usr/lib/cmplrs/cc \ | |
7316 | /usr/cross64/usr/bin \ | |
7317 | /usr/lib/cmplrs/cc \ | |
7318 | /sysv/usr/lib/cmplrs/cc \ | |
7319 | /svr4/usr/lib/cmplrs/cc \ | |
7320 | /usr/bin" | |
55a2ea2a | 7321 | fi |
275b60d6 JJ |
7322 | |
7323 | for dir in $test_dirs; do | |
55a2ea2a | 7324 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7325 | gcc_cv_ld=$dir/ld$host_exeext |
7326 | break; | |
7327 | fi | |
7328 | done | |
7329 | fi | |
34a86c2b NN |
7330 | case $in_tree_ld in |
7331 | yes) | |
093e61a6 | 7332 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
7333 | ;; |
7334 | no) | |
093e61a6 | 7335 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
7336 | ;; |
7337 | esac | |
275b60d6 | 7338 | |
981d4858 | 7339 | # Figure out what nm we will be using. |
f9c1196a | 7340 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
093e61a6 | 7341 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
1072ec3f | 7342 | echo "configure:7343: checking what nm to use" >&5 |
f9c1196a | 7343 | in_tree_nm=no |
981d4858 JM |
7344 | if test -x nm$host_exeext; then |
7345 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
7346 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7347 | && test -f ../binutils/Makefile; then | |
7348 | # Single tree build which includes binutils. | |
7349 | in_tree_nm=yes | |
7350 | gcc_cv_nm=./nm$host_exeext | |
7351 | rm -f nm$host_exeext | |
7352 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
7353 | elif test "x$program_prefix" != xNONE; then |
7354 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7355 | else | |
7356 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 7357 | fi |
f9c1196a | 7358 | case $in_tree_nm in |
093e61a6 RS |
7359 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
7360 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 7361 | esac |
981d4858 | 7362 | |
3cae5780 | 7363 | # Figure out what objdump we will be using. |
093e61a6 | 7364 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
1072ec3f | 7365 | echo "configure:7366: checking what objdump to use" >&5 |
f9c1196a | 7366 | in_tree_objdump=no |
3cae5780 AS |
7367 | if test -x objdump$host_exeext; then |
7368 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
7369 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7370 | && test -f ../binutils/Makefile; then | |
7371 | # Single tree build which includes binutils. | |
7372 | in_tree_objdump=yes | |
7373 | gcc_cv_objdump=./objdump$host_exeext | |
7374 | rm -f objdump$host_exeext | |
7375 | $symbolic_link ../binutils/objdump$host_exeext \ | |
7376 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
7377 | elif test "x$program_prefix" != xNONE; then |
7378 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7379 | else | |
f9c1196a ZW |
7380 | gcc_cv_objdump=`echo objdump | \ |
7381 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 7382 | fi |
f9c1196a | 7383 | case $in_tree_objdump in |
093e61a6 RS |
7384 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
7385 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 7386 | esac |
3cae5780 | 7387 | |
981d4858 | 7388 | # Figure out what assembler alignment features are present. |
093e61a6 | 7389 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 |
1072ec3f | 7390 | echo "configure:7391: checking assembler alignment features" >&5 |
9d147085 | 7391 | gcc_cv_as_alignment_features=none |
34a86c2b | 7392 | if test $in_tree_gas = yes; then |
ad9c4d9f NN |
7393 | # Gas version 2.6 and later support for .balign and .p2align. |
7394 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7395 | && test $gcc_cv_gas_minor_version -ge 6 \ | |
7396 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7397 | ||
7398 | ||
7399 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7400 | cat >> confdefs.h <<\EOF |
981d4858 | 7401 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7402 | EOF |
981d4858 | 7403 | |
093e61a6 | 7404 | |
ad9c4d9f NN |
7405 | |
7406 | fi | |
7407 | ||
7408 | # Gas version 2.8 and later support specifying the maximum | |
7409 | # bytes to skip when using .p2align. | |
7410 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7411 | && test $gcc_cv_gas_minor_version -ge 8 \ | |
7412 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7413 | ||
7414 | ||
7415 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7416 | cat >> confdefs.h <<\EOF |
981d4858 | 7417 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7418 | EOF |
981d4858 | 7419 | |
093e61a6 | 7420 | |
ad9c4d9f NN |
7421 | |
7422 | fi | |
7423 | ||
981d4858 | 7424 | elif test x$gcc_cv_as != x; then |
00ccc16d JL |
7425 | # Check if we have .balign and .p2align |
7426 | echo ".balign 4" > conftest.s | |
7427 | echo ".p2align 2" >> conftest.s | |
7428 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7429 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7430 | cat >> confdefs.h <<\EOF |
00ccc16d | 7431 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7432 | EOF |
00ccc16d JL |
7433 | |
7434 | fi | |
7435 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7436 | # Check if specifying the maximum bytes to skip when |
7437 | # using .p2align is supported. | |
7438 | echo ".p2align 4,,7" > conftest.s | |
7439 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7440 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7441 | cat >> confdefs.h <<\EOF |
9e423e6d | 7442 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7443 | EOF |
9e423e6d JW |
7444 | |
7445 | fi | |
7446 | rm -f conftest.s conftest.o | |
7447 | fi | |
093e61a6 | 7448 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 |
9e423e6d | 7449 | |
093e61a6 | 7450 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
1072ec3f | 7451 | echo "configure:7452: checking assembler subsection support" >&5 |
9d147085 | 7452 | gcc_cv_as_subsections=no |
34a86c2b | 7453 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7454 | if test $gcc_cv_gas_major_version -eq 2 \ |
7455 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
7456 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7457 | ||
7458 | ||
7459 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7460 | gcc_cv_as_subsections="working .subsection -1" | |
7461 | fi | |
093e61a6 | 7462 | |
ad9c4d9f NN |
7463 | |
7464 | fi | |
7465 | ||
981d4858 | 7466 | elif test x$gcc_cv_as != x; then |
d1accaa3 JJ |
7467 | # Check if we have .subsection |
7468 | echo ".subsection 1" > conftest.s | |
7469 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7470 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7471 | if test x$gcc_cv_nm != x; then |
7472 | cat > conftest.s <<EOF | |
7473 | conftest_label1: .word 0 | |
7474 | .subsection -1 | |
7475 | conftest_label2: .word 0 | |
7476 | .previous | |
7477 | EOF | |
7478 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7479 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7480 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7481 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7482 | : | |
7483 | else | |
d1accaa3 | 7484 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7485 | fi |
7486 | fi | |
7487 | fi | |
7488 | fi | |
7489 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7490 | fi |
7491 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
093e61a6 | 7492 | cat >> confdefs.h <<\EOF |
981d4858 | 7493 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
093e61a6 | 7494 | EOF |
981d4858 | 7495 | |
d1accaa3 | 7496 | fi |
093e61a6 | 7497 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 |
d1accaa3 | 7498 | |
093e61a6 | 7499 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
1072ec3f | 7500 | echo "configure:7501: checking assembler weak support" >&5 |
9d147085 | 7501 | gcc_cv_as_weak=no |
34a86c2b | 7502 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7503 | if test $gcc_cv_gas_major_version -eq 2 \ |
7504 | && test $gcc_cv_gas_minor_version -ge 2 \ | |
7505 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7506 | ||
7507 | ||
981d4858 | 7508 | gcc_cv_as_weak="yes" |
093e61a6 | 7509 | |
ad9c4d9f NN |
7510 | |
7511 | fi | |
7512 | ||
981d4858 | 7513 | elif test x$gcc_cv_as != x; then |
12822146 JL |
7514 | # Check if we have .weak |
7515 | echo " .weak foobar" > conftest.s | |
7516 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7517 | gcc_cv_as_weak="yes" |
7518 | fi | |
7519 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7520 | fi |
7521 | if test x"$gcc_cv_as_weak" = xyes; then | |
093e61a6 | 7522 | cat >> confdefs.h <<\EOF |
981d4858 | 7523 | #define HAVE_GAS_WEAK 1 |
093e61a6 | 7524 | EOF |
981d4858 | 7525 | |
12822146 | 7526 | fi |
093e61a6 | 7527 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 |
12822146 | 7528 | |
093e61a6 | 7529 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
1072ec3f | 7530 | echo "configure:7531: checking assembler hidden support" >&5 |
9d147085 | 7531 | gcc_cv_as_hidden=no |
34a86c2b | 7532 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7533 | if test $gcc_cv_gas_major_version -eq 2 \ |
7534 | && (test $gcc_cv_gas_minor_version -gt 12 \ | |
7535 | || (test $gcc_cv_gas_minor_version -eq 12 \ | |
7536 | && test $gcc_cv_gas_patch_version -ge 1 )) \ | |
7537 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7538 | ||
7539 | ||
7540 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7541 | gcc_cv_as_hidden="yes" | |
7542 | fi | |
093e61a6 | 7543 | |
ad9c4d9f NN |
7544 | |
7545 | fi | |
7546 | ||
981d4858 | 7547 | elif test x$gcc_cv_as != x; then |
6a9c5260 UD |
7548 | # Check if we have .hidden |
7549 | echo " .hidden foobar" > conftest.s | |
7550 | echo "foobar:" >> conftest.s | |
7551 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7552 | gcc_cv_as_hidden="yes" |
7553 | fi | |
7554 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7555 | |
7556 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
093e61a6 | 7557 | # This is irritatingly difficult to feature test for. Look for |
c72931a6 RH |
7558 | # the date string after the version number. |
7559 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7560 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
96ef4bdc MM |
7561 | 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'` |
7562 | 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 | 7563 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7564 | if test -n "$ld_date"; then |
7565 | # If there was date string, but was earlier than 2002-04-04, fail | |
7566 | gcc_cv_as_hidden="no" | |
7567 | elif test -z "$ld_vers"; then | |
7568 | # If there was no date string nor ld version number, something is wrong | |
7569 | gcc_cv_as_hidden="no" | |
7570 | else | |
7571 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7572 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7573 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7574 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7575 | if test "$ld_vers_major" -lt 2; then | |
7576 | gcc_cv_as_hidden="no" | |
7577 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7578 | gcc_cv_as_hidden="no" | |
7579 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7580 | -a "$ld_vers_patch" -eq 0; then | |
7581 | gcc_cv_as_hidden="no" | |
7582 | fi | |
7583 | fi | |
c72931a6 RH |
7584 | fi |
7585 | fi | |
981d4858 | 7586 | fi |
789b7de5 | 7587 | case "$target" in |
027faee7 | 7588 | mips-sgi-irix6*) |
789b7de5 RO |
7589 | if test x"$gnu_ld_flag" = x"no"; then |
7590 | # Even if using gas with .hidden support, the resulting object files | |
027faee7 AO |
7591 | # cannot be linked with the IRIX 6 O32 linker. With the N32 and |
7592 | # N64 linkers, the problem is that the linker refuses to accept | |
7593 | # -call_shared (passed by default to the linker) and -r (used to | |
7594 | # link the object file generated without .hidden directives with | |
7595 | # one that hides symbols), so we also lose. | |
6d07784a | 7596 | gcc_cv_as_hidden=no |
789b7de5 RO |
7597 | fi |
7598 | ;; | |
7599 | esac | |
6d07784a RO |
7600 | if test x"$gcc_cv_as_hidden" = xyes; then |
7601 | cat >> confdefs.h <<\EOF | |
7602 | #define HAVE_GAS_HIDDEN 1 | |
7603 | EOF | |
7604 | ||
7605 | fi | |
7606 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7607 | libgcc_visibility=$gcc_cv_as_hidden | |
9e944a16 | 7608 | |
6a9c5260 | 7609 | |
093e61a6 | 7610 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
1072ec3f | 7611 | echo "configure:7612: checking assembler leb128 support" >&5 |
fbe42b1b | 7612 | gcc_cv_as_leb128=no |
34a86c2b | 7613 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7614 | if test $gcc_cv_gas_major_version -eq 2 \ |
7615 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
7616 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7617 | ||
7618 | ||
7619 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7620 | gcc_cv_as_leb128="yes" | |
7621 | fi | |
093e61a6 | 7622 | |
ad9c4d9f NN |
7623 | |
7624 | fi | |
7625 | ||
b7460f24 RH |
7626 | elif test x$gcc_cv_as != x; then |
7627 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7628 | cat > conftest.s <<EOF | |
7629 | .data | |
7630 | .uleb128 L2 - L1 | |
7631 | L1: | |
7632 | .uleb128 1280 | |
7633 | .sleb128 -1010 | |
7634 | L2: | |
7635 | EOF | |
7636 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7637 | gcc_cv_as_leb128="yes" |
7638 | ||
7639 | # GAS versions before 2.11 do not support uleb128, | |
7640 | # despite appearing to. | |
7641 | # ??? There exists an elf-specific test that will crash | |
7642 | # the assembler. Perhaps it's better to figure out whether | |
7643 | # arbitrary sections are supported and try the test. | |
7644 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7645 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7646 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7647 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7648 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7649 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7650 | gcc_cv_as_leb128="no" | |
7651 | fi | |
fbe42b1b | 7652 | fi |
b7460f24 RH |
7653 | fi |
7654 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7655 | fi | |
7656 | if test x"$gcc_cv_as_leb128" = xyes; then | |
093e61a6 | 7657 | cat >> confdefs.h <<\EOF |
b7460f24 | 7658 | #define HAVE_AS_LEB128 1 |
093e61a6 | 7659 | EOF |
b7460f24 RH |
7660 | |
7661 | fi | |
093e61a6 | 7662 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 |
b7460f24 | 7663 | |
093e61a6 | 7664 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
1072ec3f | 7665 | echo "configure:7666: checking assembler eh_frame optimization" >&5 |
c64688ae | 7666 | gcc_cv_as_eh_frame=no |
34a86c2b | 7667 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7668 | if test $gcc_cv_gas_major_version -eq 2 \ |
7669 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7670 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7671 | ||
7672 | ||
7673 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7674 | gcc_cv_as_eh_frame="yes" | |
7675 | fi | |
093e61a6 | 7676 | |
ad9c4d9f NN |
7677 | |
7678 | fi | |
7679 | ||
c64688ae RH |
7680 | elif test x$gcc_cv_as != x; then |
7681 | # Check if this is GAS. | |
41948db5 SS |
7682 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7683 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7684 | if echo "$as_ver" | grep GNU > /dev/null; then |
7685 | # Versions up to and including 2.11.0 may mis-optimize | |
7686 | # .eh_frame data. Try something. | |
7687 | cat > conftest.s <<EOF | |
7688 | .text | |
7689 | .LFB1: | |
7690 | .4byte 0 | |
7691 | .L1: | |
7692 | .4byte 0 | |
7693 | .LFE1: | |
7694 | .section .eh_frame,"aw",@progbits | |
7695 | __FRAME_BEGIN__: | |
7696 | .4byte .LECIE1-.LSCIE1 | |
7697 | .LSCIE1: | |
7698 | .4byte 0x0 | |
7699 | .byte 0x1 | |
7700 | .ascii "z\0" | |
7701 | .byte 0x1 | |
7702 | .byte 0x78 | |
7703 | .byte 0x1a | |
7704 | .byte 0x0 | |
7705 | .byte 0x4 | |
7706 | .4byte 1 | |
7707 | .p2align 1 | |
7708 | .LECIE1: | |
7709 | .LSFDE1: | |
7710 | .4byte .LEFDE1-.LASFDE1 | |
7711 | .LASFDE1: | |
7712 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7713 | .4byte .LFB1 | |
7714 | .4byte .LFE1-.LFB1 | |
7715 | .byte 0x4 | |
7716 | .4byte .LFE1-.LFB1 | |
7717 | .byte 0x4 | |
7718 | .4byte .L1-.LFB1 | |
7719 | .LEFDE1: | |
7720 | EOF | |
01efb963 | 7721 | cat > conftest.lit <<EOF |
c64688ae RH |
7722 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7723 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 7724 | 0020 08000000 04080000 0044 .........D |
01efb963 AS |
7725 | EOF |
7726 | cat > conftest.big <<EOF | |
7727 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7728 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 7729 | 0020 00000008 04000000 0844 .........D |
c64688ae RH |
7730 | EOF |
7731 | # If the assembler didn't choke, and we can objdump, | |
7732 | # and we got the correct data, then succeed. | |
7733 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7734 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7735 | | tail -3 > conftest.got \ |
01efb963 AS |
7736 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7737 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7738 | then |
7739 | gcc_cv_as_eh_frame="yes" | |
7740 | else | |
7741 | gcc_cv_as_eh_frame="bad" | |
7742 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
093e61a6 | 7743 | cat >> confdefs.h <<\EOF |
c64688ae | 7744 | #define USE_AS_TRADITIONAL_FORMAT 1 |
093e61a6 | 7745 | EOF |
c64688ae RH |
7746 | |
7747 | fi | |
7748 | fi | |
7749 | fi | |
7750 | rm -f conftest.* | |
7751 | fi | |
093e61a6 | 7752 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
c64688ae | 7753 | |
093e61a6 | 7754 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
1072ec3f | 7755 | echo "configure:7756: checking assembler section merging support" >&5 |
201556f0 | 7756 | gcc_cv_as_shf_merge=no |
34a86c2b | 7757 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7758 | if test $gcc_cv_gas_major_version -eq 2 \ |
7759 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7760 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7761 | ||
7762 | ||
7763 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7764 | gcc_cv_as_shf_merge=yes | |
7765 | fi | |
093e61a6 | 7766 | |
ad9c4d9f NN |
7767 | |
7768 | fi | |
7769 | ||
201556f0 JJ |
7770 | elif test x$gcc_cv_as != x; then |
7771 | # Check if we support SHF_MERGE sections | |
7772 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7773 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7774 | gcc_cv_as_shf_merge=yes |
7775 | fi | |
7776 | rm -f conftest.s conftest.o | |
7777 | fi | |
7778 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
093e61a6 | 7779 | cat >> confdefs.h <<\EOF |
201556f0 | 7780 | #define HAVE_GAS_SHF_MERGE 1 |
093e61a6 | 7781 | EOF |
201556f0 JJ |
7782 | |
7783 | fi | |
093e61a6 | 7784 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 |
201556f0 | 7785 | |
093e61a6 | 7786 | echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 |
1072ec3f | 7787 | echo "configure:7788: checking assembler thread-local storage support" >&5 |
f996902d RH |
7788 | gcc_cv_as_tls=no |
7789 | conftest_s= | |
7790 | tls_first_major= | |
7791 | tls_first_minor= | |
9739c90c | 7792 | tls_as_opt= |
f996902d | 7793 | case "$target" in |
6f9b006d RH |
7794 | alpha*-*-*) |
7795 | conftest_s=' | |
7796 | .section ".tdata","awT",@progbits | |
7797 | foo: .long 25 | |
7798 | .text | |
7799 | ldq $27,__tls_get_addr($29) !literal!1 | |
7800 | lda $16,foo($29) !tlsgd!1 | |
7801 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
7802 | ldq $27,__tls_get_addr($29) !literal!2 | |
7803 | lda $16,foo($29) !tlsldm!2 | |
7804 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
7805 | ldq $1,foo($29) !gotdtprel | |
7806 | ldah $2,foo($29) !dtprelhi | |
7807 | lda $3,foo($2) !dtprello | |
7808 | lda $4,foo($29) !dtprel | |
7809 | ldq $1,foo($29) !gottprel | |
7810 | ldah $2,foo($29) !tprelhi | |
7811 | lda $3,foo($2) !tprello | |
7812 | lda $4,foo($29) !tprel' | |
7813 | tls_first_major=2 | |
7814 | tls_first_minor=13 | |
7815 | ;; | |
f996902d RH |
7816 | i[34567]86-*-*) |
7817 | conftest_s=' | |
7818 | .section ".tdata","awT",@progbits | |
7819 | foo: .long 25 | |
7820 | .text | |
7821 | movl %gs:0, %eax | |
7822 | leal foo@TLSGD(,%ebx,1), %eax | |
7823 | leal foo@TLSLDM(%ebx), %eax | |
7824 | leal foo@DTPOFF(%eax), %edx | |
7825 | movl foo@GOTTPOFF(%ebx), %eax | |
7826 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
7827 | addl foo@GOTNTPOFF(%ebx), %eax |
7828 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
7829 | movl $foo@TPOFF, %eax |
7830 | subl $foo@TPOFF, %eax | |
7831 | leal foo@NTPOFF(%ecx), %eax' | |
7832 | tls_first_major=2 | |
75d38379 JJ |
7833 | tls_first_minor=14 |
7834 | ;; | |
7835 | x86_64-*-*) | |
7836 | conftest_s=' | |
7837 | .section ".tdata","awT",@progbits | |
7838 | foo: .long 25 | |
7839 | .text | |
7840 | movq %fs:0, %rax | |
7841 | leaq foo@TLSGD(%rip), %rdi | |
7842 | leaq foo@TLSLD(%rip), %rdi | |
7843 | leaq foo@DTPOFF(%rax), %rdx | |
7844 | movq foo@GOTTPOFF(%rip), %rax | |
7845 | movq $foo@TPOFF, %rax' | |
7846 | tls_first_major=2 | |
7847 | tls_first_minor=14 | |
f996902d | 7848 | ;; |
7b6e506e RH |
7849 | ia64-*-*) |
7850 | conftest_s=' | |
7851 | .section ".tdata","awT",@progbits | |
7852 | foo: data8 25 | |
7853 | .text | |
7854 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
7855 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
7856 | addl r18 = @ltoff(@tprel(foo#)), gp | |
7857 | addl r19 = @dtprel(foo#), gp | |
7858 | adds r21 = @dtprel(foo#), r13 | |
7859 | movl r23 = @dtprel(foo#) | |
7860 | addl r20 = @tprel(foo#), gp | |
7861 | adds r22 = @tprel(foo#), r13 | |
7862 | movl r24 = @tprel(foo#)' | |
7863 | tls_first_major=2 | |
7864 | tls_first_minor=13 | |
7865 | ;; | |
c4501e62 JJ |
7866 | powerpc-*-*) |
7867 | conftest_s=' | |
7868 | .section ".tdata","awT",@progbits | |
7869 | .align 2 | |
7870 | ld0: .space 4 | |
7871 | ld1: .space 4 | |
7872 | x1: .space 4 | |
7873 | x2: .space 4 | |
7874 | x3: .space 4 | |
7875 | .text | |
7876 | addi 3,31,ld0@got@tlsgd | |
7877 | bl __tls_get_addr | |
7878 | addi 3,31,x1@got@tlsld | |
7879 | bl __tls_get_addr | |
7880 | addi 9,3,x1@dtprel | |
7881 | addis 9,3,x2@dtprel@ha | |
7882 | addi 9,9,x2@dtprel@l | |
7883 | lwz 9,x3@got@tprel(31) | |
7884 | add 9,9,x@tls | |
7885 | addi 9,2,x1@tprel | |
7886 | addis 9,2,x2@tprel@ha | |
7887 | addi 9,9,x2@tprel@l' | |
7888 | tls_first_major=2 | |
7889 | tls_first_minor=14 | |
9739c90c | 7890 | tls_as_opt=-a32 |
c4501e62 JJ |
7891 | ;; |
7892 | powerpc64-*-*) | |
7893 | conftest_s=' | |
7894 | .section ".tdata","awT",@progbits | |
7895 | .align 3 | |
7896 | ld0: .space 8 | |
7897 | ld1: .space 8 | |
7898 | x1: .space 8 | |
7899 | x2: .space 8 | |
7900 | x3: .space 8 | |
7901 | .text | |
7902 | addi 3,2,ld0@got@tlsgd | |
7903 | bl .__tls_get_addr | |
7904 | nop | |
7905 | addi 3,2,ld1@toc | |
7906 | bl .__tls_get_addr | |
7907 | nop | |
7908 | addi 3,2,x1@got@tlsld | |
7909 | bl .__tls_get_addr | |
7910 | nop | |
7911 | addi 9,3,x1@dtprel | |
7912 | bl .__tls_get_addr | |
7913 | nop | |
7914 | addis 9,3,x2@dtprel@ha | |
7915 | addi 9,9,x2@dtprel@l | |
7916 | bl .__tls_get_addr | |
7917 | nop | |
7918 | ld 9,x3@got@dtprel(2) | |
7919 | add 9,9,3 | |
7920 | bl .__tls_get_addr | |
7921 | nop' | |
7922 | tls_first_major=2 | |
7923 | tls_first_minor=14 | |
9739c90c | 7924 | tls_as_opt=-a64 |
c4501e62 | 7925 | ;; |
fd3cd001 UW |
7926 | s390-*-*) |
7927 | conftest_s=' | |
7928 | .section ".tdata","awT",@progbits | |
7929 | foo: .long 25 | |
7930 | .text | |
7931 | .long foo@TLSGD | |
7932 | .long foo@TLSLDM | |
7933 | .long foo@DTPOFF | |
7934 | .long foo@NTPOFF | |
7935 | .long foo@GOTNTPOFF | |
7936 | .long foo@INDNTPOFF | |
7937 | l %r1,foo@GOTNTPOFF(%r12) | |
7938 | l %r1,0(%r1):tls_load:foo | |
7939 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
7940 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
7941 | tls_first_major=2 | |
7942 | tls_first_minor=14 | |
9739c90c | 7943 | tls_as_opt=-m31 |
fd3cd001 UW |
7944 | ;; |
7945 | s390x-*-*) | |
7946 | conftest_s=' | |
7947 | .section ".tdata","awT",@progbits | |
7948 | foo: .long 25 | |
7949 | .text | |
7950 | .quad foo@TLSGD | |
7951 | .quad foo@TLSLDM | |
7952 | .quad foo@DTPOFF | |
7953 | .quad foo@NTPOFF | |
7954 | .quad foo@GOTNTPOFF | |
7955 | lg %r1,foo@GOTNTPOFF(%r12) | |
7956 | larl %r1,foo@INDNTPOFF | |
7957 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
7958 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
7959 | tls_first_major=2 | |
7960 | tls_first_minor=14 | |
9739c90c | 7961 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 7962 | ;; |
f996902d RH |
7963 | esac |
7964 | if test -z "$tls_first_major"; then | |
7965 | : | |
34a86c2b | 7966 | elif test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7967 | if test $gcc_cv_gas_major_version -eq $tls_first_major \ |
7968 | && test $gcc_cv_gas_minor_version -ge $tls_first_minor \ | |
7969 | || test $gcc_cv_gas_major_version -gt $tls_first_major ; then | |
7970 | ||
7971 | ||
f996902d | 7972 | gcc_cv_as_tls=yes |
093e61a6 | 7973 | |
ad9c4d9f NN |
7974 | |
7975 | fi | |
7976 | ||
f996902d RH |
7977 | elif test x$gcc_cv_as != x; then |
7978 | echo "$conftest_s" > conftest.s | |
9739c90c | 7979 | if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 |
f996902d RH |
7980 | then |
7981 | gcc_cv_as_tls=yes | |
7982 | fi | |
7983 | rm -f conftest.s conftest.o | |
7984 | fi | |
7985 | if test "$gcc_cv_as_tls" = yes; then | |
093e61a6 | 7986 | cat >> confdefs.h <<\EOF |
f996902d | 7987 | #define HAVE_AS_TLS 1 |
093e61a6 | 7988 | EOF |
f996902d RH |
7989 | |
7990 | fi | |
093e61a6 | 7991 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 |
f996902d | 7992 | |
3a37b08e RH |
7993 | case "$target" in |
7994 | # All TARGET_ABI_OSF targets. | |
7995 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
093e61a6 | 7996 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 |
1072ec3f | 7997 | echo "configure:7998: checking assembler supports explicit relocations" >&5 |
093e61a6 RS |
7998 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
7999 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a37b08e | 8000 | else |
093e61a6 | 8001 | |
3a37b08e | 8002 | gcc_cv_as_explicit_relocs=unknown |
34a86c2b | 8003 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8004 | if test $gcc_cv_gas_major_version -eq 2 \ |
8005 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
8006 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8007 | ||
8008 | ||
3a37b08e | 8009 | gcc_cv_as_explicit_relocs=yes |
093e61a6 | 8010 | |
ad9c4d9f NN |
8011 | |
8012 | fi | |
8013 | ||
3a37b08e RH |
8014 | elif test x$gcc_cv_as != x; then |
8015 | cat > conftest.s << 'EOF' | |
8016 | .set nomacro | |
8017 | .text | |
8018 | extbl $3, $2, $3 !lituse_bytoff!1 | |
8019 | ldq $2, a($29) !literal!1 | |
8020 | ldq $4, b($29) !literal!2 | |
8021 | ldq_u $3, 0($2) !lituse_base!1 | |
8022 | ldq $27, f($29) !literal!5 | |
8023 | jsr $26, ($27), f !lituse_jsr!5 | |
8024 | ldah $29, 0($26) !gpdisp!3 | |
8025 | lda $0, c($29) !gprel | |
8026 | ldah $1, d($29) !gprelhigh | |
8027 | lda $1, d($1) !gprellow | |
8028 | lda $29, 0($29) !gpdisp!3 | |
8029 | EOF | |
8030 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8031 | gcc_cv_as_explicit_relocs=yes | |
8032 | else | |
8033 | gcc_cv_as_explicit_relocs=no | |
8034 | fi | |
8035 | rm -f conftest.s conftest.o | |
8036 | fi | |
093e61a6 | 8037 | |
cafe096b | 8038 | fi |
cafe096b | 8039 | |
093e61a6 RS |
8040 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 |
8041 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
8042 | cat >> confdefs.h <<\EOF | |
3a37b08e | 8043 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
093e61a6 | 8044 | EOF |
3a37b08e RH |
8045 | |
8046 | fi | |
8047 | ;; | |
1cb36a98 | 8048 | sparc*-*-*) |
093e61a6 | 8049 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 |
1072ec3f | 8050 | echo "configure:8051: checking assembler .register pseudo-op support" >&5 |
093e61a6 RS |
8051 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
8052 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8053 | else |
093e61a6 | 8054 | |
5b68c389 AO |
8055 | gcc_cv_as_register_pseudo_op=unknown |
8056 | if test x$gcc_cv_as != x; then | |
8057 | # Check if we have .register | |
8058 | echo ".register %g2, #scratch" > conftest.s | |
8059 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 8060 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
8061 | else |
8062 | gcc_cv_as_register_pseudo_op=no | |
8063 | fi | |
8064 | rm -f conftest.s conftest.o | |
8065 | fi | |
093e61a6 | 8066 | |
cafe096b | 8067 | fi |
cafe096b | 8068 | |
093e61a6 RS |
8069 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 |
8070 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
8071 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8072 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
093e61a6 | 8073 | EOF |
1cb36a98 | 8074 | |
1cb36a98 | 8075 | fi |
1cb36a98 | 8076 | |
093e61a6 | 8077 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
1072ec3f | 8078 | echo "configure:8079: checking assembler supports -relax" >&5 |
093e61a6 RS |
8079 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
8080 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e95b1e6a | 8081 | else |
093e61a6 | 8082 | |
e95b1e6a JJ |
8083 | gcc_cv_as_relax_opt=unknown |
8084 | if test x$gcc_cv_as != x; then | |
8085 | # Check if gas supports -relax | |
8086 | echo ".text" > conftest.s | |
8087 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
8088 | gcc_cv_as_relax_opt=yes | |
8089 | else | |
8090 | gcc_cv_as_relax_opt=no | |
8091 | fi | |
8092 | rm -f conftest.s conftest.o | |
8093 | fi | |
093e61a6 | 8094 | |
cafe096b | 8095 | fi |
cafe096b | 8096 | |
093e61a6 RS |
8097 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 |
8098 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
8099 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 8100 | #define HAVE_AS_RELAX_OPTION 1 |
093e61a6 | 8101 | EOF |
e95b1e6a JJ |
8102 | |
8103 | fi | |
8104 | ||
093e61a6 | 8105 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
1072ec3f | 8106 | echo "configure:8107: checking assembler and linker support unaligned pc related relocs" >&5 |
093e61a6 RS |
8107 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
8108 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 8109 | else |
093e61a6 | 8110 | |
17e9e88c JJ |
8111 | gcc_cv_as_sparc_ua_pcrel=unknown |
8112 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
8113 | gcc_cv_as_sparc_ua_pcrel=no | |
8114 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
8115 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
8116 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
8117 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
8118 | fi |
8119 | rm -f conftest.s conftest.o conftest | |
8120 | fi | |
093e61a6 | 8121 | |
cafe096b | 8122 | fi |
cafe096b | 8123 | |
093e61a6 RS |
8124 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
8125 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
8126 | cat >> confdefs.h <<\EOF | |
17e9e88c | 8127 | #define HAVE_AS_SPARC_UA_PCREL 1 |
093e61a6 | 8128 | EOF |
17e9e88c JJ |
8129 | |
8130 | fi | |
8131 | ||
093e61a6 | 8132 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
1072ec3f | 8133 | echo "configure:8134: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
093e61a6 RS |
8134 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
8135 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 8136 | else |
093e61a6 | 8137 | |
cf7b8b0d JJ |
8138 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then |
8139 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
8140 | if test x$gcc_cv_objdump != x; then | |
8141 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
8142 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
8143 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
8144 | echo "foo: .skip 4" >> conftest.s | |
8145 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
8146 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
8147 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
8148 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
8149 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
8150 | | grep 'DISP32' > /dev/null 2>&1; then | |
8151 | : | |
8152 | else | |
8153 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
8154 | fi | |
8155 | fi | |
8156 | fi | |
8157 | rm -f conftest.s conftest.o conftest | |
8158 | else | |
8159 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
8160 | fi | |
093e61a6 | 8161 | |
cafe096b | 8162 | fi |
cafe096b | 8163 | |
093e61a6 RS |
8164 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
8165 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
8166 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 8167 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
093e61a6 | 8168 | EOF |
cf7b8b0d JJ |
8169 | |
8170 | fi | |
8171 | ||
093e61a6 | 8172 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 |
1072ec3f | 8173 | echo "configure:8174: checking for assembler offsetable %lo() support" >&5 |
093e61a6 RS |
8174 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
8175 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8176 | else |
093e61a6 | 8177 | |
22252625 JJ |
8178 | gcc_cv_as_offsetable_lo10=unknown |
8179 | if test "x$gcc_cv_as" != x; then | |
8180 | # Check if assembler has offsetable %lo() | |
8181 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
8182 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
8183 | if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ | |
8184 | > /dev/null 2>&1 && | |
8185 | $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ | |
8186 | > /dev/null 2>&1; then | |
8187 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
5b68c389 | 8188 | gcc_cv_as_offsetable_lo10=no |
22252625 JJ |
8189 | else |
8190 | gcc_cv_as_offsetable_lo10=yes | |
5b68c389 | 8191 | fi |
22252625 JJ |
8192 | else |
8193 | gcc_cv_as_offsetable_lo10=no | |
5b68c389 | 8194 | fi |
22252625 JJ |
8195 | rm -f conftest.s conftest.o conftest1.s conftest1.o |
8196 | fi | |
093e61a6 | 8197 | |
cafe096b | 8198 | fi |
cafe096b | 8199 | |
093e61a6 RS |
8200 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 |
8201 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
8202 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8203 | #define HAVE_AS_OFFSETABLE_LO10 1 |
093e61a6 | 8204 | EOF |
1cb36a98 | 8205 | |
1cb36a98 | 8206 | fi |
43160d01 | 8207 | |
1cb36a98 RH |
8208 | ;; |
8209 | ||
c307e6dd | 8210 | i[34567]86-*-* | x86_64-*-*) |
093e61a6 | 8211 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
1072ec3f | 8212 | echo "configure:8213: checking assembler instructions" >&5 |
1cb36a98 | 8213 | gcc_cv_as_instructions= |
093e61a6 | 8214 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8215 | if test $gcc_cv_gas_major_version -eq 2 \ |
8216 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
8217 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8218 | ||
8219 | ||
981d4858 | 8220 | gcc_cv_as_instructions="filds fists" |
093e61a6 | 8221 | |
ad9c4d9f NN |
8222 | |
8223 | fi | |
8224 | ||
981d4858 | 8225 | elif test x$gcc_cv_as != x; then |
53b5ce19 JW |
8226 | set "filds fists" "filds mem; fists mem" |
8227 | while test $# -gt 0 | |
8228 | do | |
8229 | echo "$2" > conftest.s | |
8230 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8231 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
8232 | fi |
8233 | shift 2 | |
8234 | done | |
8235 | rm -f conftest.s conftest.o | |
1cb36a98 | 8236 | fi |
981d4858 | 8237 | if test x"$gcc_cv_as_instructions" != x; then |
093e61a6 | 8238 | cat >> confdefs.h <<EOF |
ee7692d2 | 8239 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
093e61a6 | 8240 | EOF |
981d4858 JM |
8241 | |
8242 | fi | |
093e61a6 | 8243 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 | 8244 | |
093e61a6 | 8245 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 |
1072ec3f | 8246 | echo "configure:8247: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 | 8247 | gcc_cv_as_gotoff_in_data=no |
34a86c2b | 8248 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8249 | if test $gcc_cv_gas_major_version -eq 2 \ |
8250 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8251 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8252 | ||
8253 | ||
f88c65f7 | 8254 | gcc_cv_as_gotoff_in_data=yes |
093e61a6 | 8255 | |
ad9c4d9f NN |
8256 | |
8257 | fi | |
8258 | ||
f88c65f7 RH |
8259 | elif test x$gcc_cv_as != x; then |
8260 | cat > conftest.s <<EOF | |
8261 | .text | |
8262 | .L0: | |
8263 | nop | |
8264 | .data | |
8265 | .long .L0@GOTOFF | |
8266 | EOF | |
8267 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8268 | gcc_cv_as_gotoff_in_data=yes | |
8269 | fi | |
8270 | fi | |
093e61a6 | 8271 | cat >> confdefs.h <<EOF |
f88c65f7 | 8272 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
093e61a6 | 8273 | EOF |
f88c65f7 | 8274 | |
093e61a6 | 8275 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 |
1cb36a98 | 8276 | ;; |
ef1ecf87 RH |
8277 | |
8278 | ia64*-*-*) | |
093e61a6 | 8279 | echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 |
1072ec3f | 8280 | echo "configure:8281: checking assembler supports ltoffx and ldxmov" >&5 |
093e61a6 RS |
8281 | if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
8282 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ef1ecf87 | 8283 | else |
093e61a6 | 8284 | |
ef1ecf87 | 8285 | gcc_cv_as_ltoffx_ldxmov_relocs=unknown |
ad9c4d9f NN |
8286 | if test $in_tree_gas = yes ; then |
8287 | if test $gcc_cv_gas_major_version -eq 2 \ | |
8288 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8289 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8290 | ||
8291 | ||
8292 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
093e61a6 | 8293 | |
ad9c4d9f NN |
8294 | |
8295 | fi | |
8296 | ||
ef1ecf87 RH |
8297 | elif test x$gcc_cv_as != x; then |
8298 | cat > conftest.s << 'EOF' | |
8299 | .text | |
8300 | addl r15 = @ltoffx(x#), gp | |
8301 | ;; | |
8302 | ld8.mov r16 = [r15], x# | |
8303 | EOF | |
8304 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8305 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
8306 | else | |
8307 | gcc_cv_as_ltoffx_ldxmov_relocs=no | |
8308 | fi | |
8309 | rm -f conftest.s conftest.o | |
8310 | fi | |
093e61a6 | 8311 | |
cafe096b | 8312 | fi |
cafe096b | 8313 | |
093e61a6 RS |
8314 | echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6 |
8315 | if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then | |
8316 | cat >> confdefs.h <<\EOF | |
ef1ecf87 | 8317 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
093e61a6 | 8318 | EOF |
ef1ecf87 RH |
8319 | |
8320 | fi | |
8321 | ;; | |
1cb36a98 | 8322 | esac |
53b5ce19 | 8323 | |
093e61a6 | 8324 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
1072ec3f | 8325 | echo "configure:8326: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
8326 | gcc_cv_as_dwarf2_debug_line=no |
8327 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
8328 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
8329 | # info to the output file. So, as supported targets are added to gas 2.11, | |
8330 | # add some instruction here to (also) show we expect this might work. | |
8331 | # ??? Once 2.11 is released, probably need to add first known working | |
8332 | # version to the per-target configury. | |
8333 | case "$target" in | |
80486e06 | 8334 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
f8000836 | 8335 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* | xstormy16*-*-*) |
9d147085 RH |
8336 | insn="nop" |
8337 | ;; | |
8338 | ia64*-*-*) | |
8339 | insn="nop 0" | |
8340 | ;; | |
8341 | esac | |
34a86c2b | 8342 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8343 | if test $gcc_cv_gas_major_version -eq 2 \ |
8344 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8345 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8346 | ||
8347 | ||
8348 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8349 | && test x"$insn" != x ; then | |
8350 | gcc_cv_as_dwarf2_debug_line="yes" | |
8351 | fi | |
093e61a6 | 8352 | |
ad9c4d9f NN |
8353 | |
8354 | fi | |
8355 | ||
9d147085 | 8356 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
acc187f5 RH |
8357 | echo ' .file 1 "conftest.s"' > conftest.s |
8358 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 8359 | echo " $insn" >> conftest.s |
981975b6 | 8360 | # ??? This fails with non-gnu grep. |
9d147085 RH |
8361 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
8362 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 8363 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 8364 | # we specified the files, since these indices are also used |
981975b6 RH |
8365 | # by DW_AT_decl_file. Approximate this test by testing if |
8366 | # the assembler bitches if the same index is assigned twice. | |
8367 | echo ' .file 1 "foo.s"' > conftest.s | |
8368 | echo ' .file 1 "bar.s"' >> conftest.s | |
8369 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
8370 | then | |
8371 | gcc_cv_as_dwarf2_debug_line="no" | |
8372 | else | |
8373 | gcc_cv_as_dwarf2_debug_line="yes" | |
8374 | fi | |
9d147085 RH |
8375 | fi |
8376 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
8377 | fi | |
8378 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
093e61a6 | 8379 | cat >> confdefs.h <<\EOF |
9d147085 | 8380 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
093e61a6 | 8381 | EOF |
9d147085 RH |
8382 | |
8383 | fi | |
093e61a6 | 8384 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 |
9d147085 | 8385 | |
093e61a6 | 8386 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
1072ec3f | 8387 | echo "configure:8388: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 | 8388 | gcc_cv_as_gdwarf2_flag=no |
34a86c2b | 8389 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8390 | if test $gcc_cv_gas_major_version -eq 2 \ |
8391 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8392 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8393 | ||
8394 | ||
8395 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8396 | && test x"$insn" != x ; then | |
8397 | gcc_cv_as_gdwarf2_flag="yes" | |
8398 | fi | |
093e61a6 | 8399 | |
ad9c4d9f NN |
8400 | |
8401 | fi | |
8402 | ||
5f0e9ea2 GK |
8403 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8404 | echo '' > conftest.s | |
8405 | # ??? This fails with non-gnu grep. | |
8406 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
8407 | then | |
8408 | gcc_cv_as_gdwarf2_flag="yes" | |
8409 | fi | |
8410 | rm -f conftest.s conftest.o | |
8411 | fi | |
8412 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
093e61a6 | 8413 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8414 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
093e61a6 | 8415 | EOF |
5f0e9ea2 GK |
8416 | |
8417 | fi | |
093e61a6 | 8418 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
5f0e9ea2 | 8419 | |
093e61a6 | 8420 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 |
1072ec3f | 8421 | echo "configure:8422: checking assembler --gstabs support" >&5 |
5f0e9ea2 | 8422 | gcc_cv_as_gstabs_flag=no |
34a86c2b | 8423 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8424 | if test $gcc_cv_gas_major_version -eq 2 \ |
8425 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8426 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8427 | ||
8428 | ||
8429 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8430 | && test x"$insn" != x ; then | |
8431 | gcc_cv_as_gstabs_flag="yes" | |
8432 | fi | |
093e61a6 | 8433 | |
ad9c4d9f NN |
8434 | |
8435 | fi | |
8436 | ||
5f0e9ea2 GK |
8437 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8438 | echo '' > conftest.s | |
8439 | # ??? This fails with non-gnu grep. | |
8440 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
8441 | gcc_cv_as_gstabs_flag="yes" | |
8442 | fi | |
8443 | rm -f conftest.s conftest.o | |
8444 | fi | |
8445 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
093e61a6 | 8446 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8447 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
093e61a6 | 8448 | EOF |
5f0e9ea2 GK |
8449 | |
8450 | fi | |
093e61a6 | 8451 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
5f0e9ea2 | 8452 | |
093e61a6 | 8453 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
1072ec3f | 8454 | echo "configure:8455: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 8455 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 8456 | if test $in_tree_ld = yes ; then |
96d0f4dc JJ |
8457 | 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 |
8458 | gcc_cv_ld_ro_rw_mix=read-write | |
8459 | fi | |
8460 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
8461 | echo '.section "myfoosect", "a"' > conftest1.s | |
8462 | echo '.section "myfoosect", "aw"' > conftest2.s | |
8463 | echo '.byte 1' >> conftest2.s | |
8464 | echo '.section "myfoosect", "a"' > conftest3.s | |
8465 | echo '.byte 0' >> conftest3.s | |
6cd656d0 KC |
8466 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
8467 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
8468 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 8469 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 8470 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 8471 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 8472 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
8473 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
8474 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
8475 | gcc_cv_ld_ro_rw_mix=read-only | |
8476 | else | |
8477 | gcc_cv_ld_ro_rw_mix=read-write | |
8478 | fi | |
8479 | fi | |
8480 | fi | |
8481 | rm -f conftest.* conftest[123].* | |
8482 | fi | |
8483 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
093e61a6 | 8484 | cat >> confdefs.h <<\EOF |
96d0f4dc | 8485 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
093e61a6 | 8486 | EOF |
96d0f4dc JJ |
8487 | |
8488 | fi | |
093e61a6 | 8489 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 8490 | |
093e61a6 | 8491 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
1072ec3f | 8492 | echo "configure:8493: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 8493 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 8494 | if test $in_tree_ld = yes ; then |
275b60d6 JJ |
8495 | 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 |
8496 | gcc_cv_ld_eh_frame_hdr=yes | |
8497 | fi | |
8498 | elif test x$gcc_cv_ld != x; then | |
8499 | # Check if linker supports --eh-frame-hdr option | |
8500 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
8501 | gcc_cv_ld_eh_frame_hdr=yes | |
8502 | fi | |
8503 | fi | |
8504 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
093e61a6 | 8505 | cat >> confdefs.h <<\EOF |
275b60d6 | 8506 | #define HAVE_LD_EH_FRAME_HDR 1 |
093e61a6 | 8507 | EOF |
275b60d6 JJ |
8508 | |
8509 | fi | |
093e61a6 | 8510 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 8511 | |
24a4dd31 | 8512 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
1072ec3f | 8513 | echo "configure:8514: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
8514 | gcc_cv_ld_pie=no |
8515 | if test $in_tree_ld = yes ; then | |
8516 | 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 | |
8517 | gcc_cv_ld_pie=yes | |
8518 | fi | |
8519 | elif test x$gcc_cv_ld != x; then | |
8520 | # Check if linker supports -pie option | |
8521 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
8522 | gcc_cv_ld_pie=yes | |
8523 | fi | |
8524 | fi | |
8525 | if test x"$gcc_cv_ld_pie" = xyes; then | |
8526 | cat >> confdefs.h <<\EOF | |
8527 | #define HAVE_LD_PIE 1 | |
8528 | EOF | |
8529 | ||
8530 | fi | |
8531 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 | |
8532 | ||
4357a6c3 CD |
8533 | # Miscellaneous target-specific checks. |
8534 | case "$target" in | |
8535 | mips*-*-*) | |
093e61a6 | 8536 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 |
1072ec3f | 8537 | echo "configure:8538: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
8538 | gcc_cv_mips_libgloss_startup=no |
8539 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
8540 | if test "x$exec_prefix" = xNONE; then | |
8541 | if test "x$prefix" = xNONE; then | |
8542 | test_prefix=/usr/local | |
8543 | else | |
8544 | test_prefix=$prefix | |
8545 | fi | |
8546 | else | |
8547 | test_prefix=$exec_prefix | |
8548 | fi | |
8549 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld | |
8550 | do | |
8551 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
8552 | gcc_cv_mips_libgloss_startup=yes | |
8553 | break | |
8554 | fi | |
8555 | done | |
8556 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
093e61a6 | 8557 | cat >> confdefs.h <<\EOF |
4357a6c3 | 8558 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 |
093e61a6 | 8559 | EOF |
4357a6c3 CD |
8560 | |
8561 | fi | |
093e61a6 | 8562 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 |
cafe096b | 8563 | |
093e61a6 | 8564 | echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6 |
1072ec3f | 8565 | echo "configure:8566: checking whether the assembler has explicit relocation support" >&5 |
cafe096b EC |
8566 | if test x$gcc_cv_mips_explicit_relocs = x; then |
8567 | gcc_cv_mips_explicit_relocs=no | |
8568 | if test x$gcc_cv_as != x; then | |
8569 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s | |
8570 | if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then | |
8571 | gcc_cv_mips_explicit_relocs=yes | |
8572 | fi | |
8573 | rm -f conftest.s conftest.o | |
8574 | fi | |
8575 | fi | |
8576 | if test $gcc_cv_mips_explicit_relocs = yes; then | |
8577 | test x$target_cpu_default != x || target_cpu_default=0 | |
8578 | target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)" | |
8579 | fi | |
093e61a6 | 8580 | echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6 |
4357a6c3 CD |
8581 | ;; |
8582 | esac | |
8583 | ||
9fb28a67 | 8584 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 8585 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
093e61a6 | 8586 | cat >> confdefs.h <<EOF |
793e9558 | 8587 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
093e61a6 | 8588 | EOF |
793e9558 PB |
8589 | |
8590 | fi | |
8591 | ||
861bb6c1 | 8592 | # Figure out what language subdirectories are present. |
71205e0b MH |
8593 | # Look if the user specified --enable-languages="..."; if not, use |
8594 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
8595 | # go away some day. | |
cc9a08e0 | 8596 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
8597 | if test x"${enable_languages+set}" != xset; then |
8598 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 8599 | enable_languages="${LANGUAGES}" |
093e61a6 | 8600 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 |
cc9a08e0 | 8601 | |
71205e0b MH |
8602 | else |
8603 | enable_languages=all | |
8604 | fi | |
d6c6b553 | 8605 | else |
015089dd TJ |
8606 | if test x"${enable_languages}" = x \ |
8607 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 8608 | then |
093e61a6 | 8609 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } |
d6c6b553 | 8610 | fi |
71205e0b | 8611 | fi |
cc9a08e0 | 8612 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
8613 | |
8614 | # First scan to see if an enabled language requires some other language. | |
8615 | # We assume that a given config-lang.in will list all the language | |
8616 | # front ends it requires, even if some are required indirectly. | |
8617 | for lang in ${srcdir}/*/config-lang.in .. | |
8618 | do | |
8619 | case $lang in | |
8620 | ..) | |
8621 | ;; | |
8622 | # The odd quoting in the next line works around | |
8623 | # an apparent bug in bash 1.12 on linux. | |
8624 | ${srcdir}/[*]/config-lang.in) | |
8625 | ;; | |
8626 | *) | |
8627 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
8628 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
8629 | for other in $this_lang_requires | |
8630 | do | |
8631 | case ,${enable_languages}, in | |
8632 | *,$other,*) | |
8633 | ;; | |
8634 | *,all,*) | |
8635 | ;; | |
1bf17cc4 | 8636 | *,$lang_alias,*) |
75382c6d TT |
8637 | enable_languages="$enable_languages,$other" |
8638 | ;; | |
8639 | esac | |
8640 | done | |
8641 | ;; | |
8642 | esac | |
8643 | done | |
8644 | ||
015089dd TJ |
8645 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
8646 | found_languages= | |
861bb6c1 JL |
8647 | subdirs= |
8648 | for lang in ${srcdir}/*/config-lang.in .. | |
8649 | do | |
8650 | case $lang in | |
8651 | ..) ;; | |
8652 | # The odd quoting in the next line works around | |
8653 | # an apparent bug in bash 1.12 on linux. | |
8654 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
8655 | *) |
8656 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
8657 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
8658 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
8659 | if test "x$lang_alias" = x |
8660 | then | |
8661 | echo "$lang doesn't set \$language." 1>&2 | |
8662 | exit 1 | |
8663 | fi | |
2b60b2cb AO |
8664 | case ${build_by_default},${enable_languages}, in |
8665 | *,$lang_alias,*) add_this_lang=yes ;; | |
8666 | no,*) add_this_lang=no ;; | |
8667 | *,all,*) add_this_lang=yes ;; | |
8668 | *) add_this_lang=no ;; | |
8669 | esac | |
015089dd | 8670 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
8671 | if test x"${add_this_lang}" = xyes; then |
8672 | case $lang in | |
8673 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 8674 | if test x$have_gnat = xyes ; then |
71205e0b MH |
8675 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
8676 | fi | |
8677 | ;; | |
8678 | *) | |
8679 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
8680 | ;; | |
8681 | esac | |
8682 | fi | |
8683 | ;; | |
861bb6c1 JL |
8684 | esac |
8685 | done | |
8686 | ||
015089dd TJ |
8687 | missing_languages= |
8688 | for expected_language in ${expected_languages} .. | |
093e61a6 | 8689 | do |
015089dd TJ |
8690 | if test "${expected_language}" != ..; then |
8691 | missing_language="${expected_language}" | |
8692 | if test "${expected_language}" = "c" \ | |
8693 | || test "${expected_language}" = "all"; then | |
8694 | missing_language= | |
8695 | fi | |
8696 | for found_language in ${found_languages} .. | |
093e61a6 | 8697 | do |
015089dd TJ |
8698 | if test "${found_language}" != ..; then |
8699 | if test "${expected_language}" = "${found_language}"; then | |
8700 | missing_language= | |
8701 | fi | |
8702 | fi | |
8703 | done | |
8704 | if test "x${missing_language}" != x; then | |
8705 | missing_languages="${missing_languages} ${missing_language}" | |
8706 | fi | |
8707 | fi | |
8708 | done | |
8709 | ||
8710 | if test "x$missing_languages" != x; then | |
093e61a6 | 8711 | { echo "configure: error: |
015089dd | 8712 | The following requested languages were not found:${missing_languages} |
093e61a6 | 8713 | The following languages were available: c${found_languages}" 1>&2; exit 1; } |
02ef40d9 TJ |
8714 | fi |
8715 | ||
f24af81b TT |
8716 | # Make gthr-default.h if we have a thread file. |
8717 | gthread_flags= | |
75bffa71 | 8718 | if test $thread_file != single; then |
f24af81b | 8719 | rm -f gthr-default.h |
db0d1ed9 | 8720 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
8721 | gthread_flags=-DHAVE_GTHR_DEFAULT |
8722 | fi | |
8723 | ||
8724 | ||
81bf3d9e RH |
8725 | # Find out what GC implementation we want, or may, use. |
8726 | # Check whether --with-gc or --without-gc was given. | |
8727 | if test "${with_gc+set}" = set; then | |
8728 | withval="$with_gc" | |
8729 | case "$withval" in | |
8730 | simple | page) | |
8731 | GGC=ggc-$withval | |
8732 | ;; | |
8733 | *) | |
093e61a6 | 8734 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } |
81bf3d9e RH |
8735 | ;; |
8736 | esac | |
8737 | else | |
005537df | 8738 | GGC=ggc-page |
093e61a6 RS |
8739 | fi |
8740 | ||
81bf3d9e RH |
8741 | |
8742 | echo "Using $GGC for garbage collection." | |
8743 | ||
3c809ba4 | 8744 | # Use the system's zlib library. |
b8dad04b ZW |
8745 | zlibdir=-L../zlib |
8746 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
8747 | # Check whether --with-system-zlib or --without-system-zlib was given. |
8748 | if test "${with_system_zlib+set}" = set; then | |
8749 | withval="$with_system_zlib" | |
8750 | zlibdir= | |
8751 | zlibinc= | |
8752 | ||
093e61a6 RS |
8753 | fi |
8754 | ||
3c809ba4 AG |
8755 | |
8756 | ||
8757 | ||
dc6746e7 | 8758 | |
093e61a6 | 8759 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
1072ec3f | 8760 | echo "configure:8761: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
8761 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
8762 | if test "${enable_maintainer_mode+set}" = set; then | |
8763 | enableval="$enable_maintainer_mode" | |
8764 | maintainer_mode=$enableval | |
8765 | else | |
8766 | maintainer_mode=no | |
093e61a6 RS |
8767 | fi |
8768 | ||
dc6746e7 | 8769 | |
093e61a6 | 8770 | echo "$ac_t""$maintainer_mode" 1>&6 |
dc6746e7 PT |
8771 | |
8772 | if test "$maintainer_mode" = "yes"; then | |
8773 | MAINT='' | |
8774 | else | |
8775 | MAINT='#' | |
8776 | fi | |
8777 | ||
861bb6c1 JL |
8778 | # Make empty files to contain the specs and options for each language. |
8779 | # Then add #include lines to for a compiler that has specs and/or options. | |
8780 | ||
8781 | lang_specs_files= | |
8782 | lang_options_files= | |
3103b7db | 8783 | lang_tree_files= |
861bb6c1 JL |
8784 | for subdir in . $subdirs |
8785 | do | |
75bffa71 | 8786 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 8787 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 8788 | fi |
75bffa71 | 8789 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 8790 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 8791 | fi |
3103b7db | 8792 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 8793 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 8794 | fi |
861bb6c1 JL |
8795 | done |
8796 | ||
8797 | # These (without "all_") are set in each config-lang.in. | |
8798 | # `language' must be a single word so is spelled singularly. | |
8799 | all_languages= | |
8800 | all_boot_languages= | |
8801 | all_compilers= | |
8802 | all_stagestuff= | |
e34a3d31 | 8803 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 JL |
8804 | # List of language makefile fragments. |
8805 | all_lang_makefiles= | |
e2500fed | 8806 | # Files for gengtype |
ef69da62 | 8807 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
8808 | # Files for gengtype with language |
8809 | all_gtfiles_files_langs= | |
8810 | all_gtfiles_files_files= | |
861bb6c1 JL |
8811 | |
8812 | # Add the language fragments. | |
8813 | # Languages are added via two mechanisms. Some information must be | |
8814 | # recorded in makefile variables, these are defined in config-lang.in. | |
8815 | # We accumulate them and plug them into the main Makefile. | |
8816 | # The other mechanism is a set of hooks for each of the main targets | |
8817 | # like `clean', `install', etc. | |
8818 | ||
8819 | language_fragments="Make-lang" | |
8820 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8821 | |
8822 | for s in .. $subdirs | |
8823 | do | |
75bffa71 | 8824 | if test $s != ".." |
861bb6c1 JL |
8825 | then |
8826 | language= | |
8827 | boot_language= | |
8828 | compilers= | |
8829 | stagestuff= | |
861bb6c1 | 8830 | outputs= |
e2500fed | 8831 | gtfiles= |
861bb6c1 | 8832 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8833 | if test "x$language" = x |
861bb6c1 JL |
8834 | then |
8835 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8836 | exit 1 | |
8837 | fi | |
72aaffbd ZW |
8838 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8839 | if test -f ${srcdir}/$s/Makefile.in | |
8840 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8841 | fi | |
861bb6c1 | 8842 | all_languages="$all_languages $language" |
75bffa71 | 8843 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8844 | then |
8845 | all_boot_languages="$all_boot_languages $language" | |
8846 | fi | |
8847 | all_compilers="$all_compilers $compilers" | |
8848 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8849 | all_outputs="$all_outputs $outputs" |
e2500fed | 8850 | all_gtfiles="$all_gtfiles $gtfiles" |
8ac9d31f TJ |
8851 | for f in .. $gtfiles |
8852 | do | |
8853 | if test $f != ".." | |
8854 | then | |
8855 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8856 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8857 | fi | |
8858 | done | |
861bb6c1 JL |
8859 | fi |
8860 | done | |
8861 | ||
8ac9d31f TJ |
8862 | # Pick up gtfiles for c |
8863 | gtfiles= | |
8864 | s="c" | |
8865 | . ${srcdir}/c-config-lang.in | |
8866 | all_gtfiles="$all_gtfiles $gtfiles" | |
8867 | for f in .. $gtfiles | |
8868 | do | |
8869 | if test $f != ".." | |
8870 | then | |
8871 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8872 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8873 | fi | |
8874 | done | |
8875 | ||
cbc59f01 DD |
8876 | check_languages= |
8877 | for language in .. $all_languages | |
8878 | do | |
8879 | if test $language != ".." | |
8880 | then | |
8881 | check_languages="$check_languages check-$language" | |
8882 | fi | |
8883 | done | |
8884 | ||
861bb6c1 JL |
8885 | # Since we can't use `::' targets, we link each language in |
8886 | # with a set of hooks, reached indirectly via lang.${target}. | |
8887 | ||
8888 | rm -f Make-hooks | |
8889 | touch Make-hooks | |
65ebbf81 | 8890 | target_list="all.build all.cross start.encap rest.encap tags \ |
d3945f0a | 8891 | info dvi generated-manpages \ |
861bb6c1 | 8892 | install-normal install-common install-info install-man \ |
436a88a6 | 8893 | uninstall \ |
861bb6c1 | 8894 | mostlyclean clean distclean extraclean maintainer-clean \ |
8f231b5d | 8895 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
8896 | for t in $target_list |
8897 | do | |
8898 | x= | |
ab87f8c8 | 8899 | for lang in .. $all_languages |
861bb6c1 | 8900 | do |
ab87f8c8 JL |
8901 | if test $lang != ".."; then |
8902 | x="$x $lang.$t" | |
861bb6c1 JL |
8903 | fi |
8904 | done | |
8905 | echo "lang.$t: $x" >> Make-hooks | |
8906 | done | |
8907 | ||
cc06d68c | 8908 | # Create .gdbinit. |
861bb6c1 | 8909 | |
cc06d68c GP |
8910 | echo "dir ." > .gdbinit |
8911 | echo "dir ${srcdir}" >> .gdbinit | |
8912 | if test x$gdb_needs_out_file_path = xyes | |
8913 | then | |
8914 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8915 | fi | |
8916 | if test "x$subdirs" != x; then | |
8917 | for s in $subdirs | |
8918 | do | |
8919 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8920 | done | |
861bb6c1 | 8921 | fi |
cc06d68c | 8922 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8923 | |
8f8d3278 NC |
8924 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8925 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8926 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8927 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8928 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8929 | # make and thus we'd get different behavior depending on where we built the | |
8930 | # sources. | |
5949a9fc | 8931 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8932 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8933 | else | |
8f8d3278 NC |
8934 | # An explanation of the sed strings: |
8935 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8936 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8937 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8938 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8939 | # |
8940 | # (*) Note this pattern overwrites the first character of the string | |
8941 | # with a forward slash if one is not already present. This is not a | |
8942 | # problem because the exact names of the sub-directories concerned is | |
8943 | # unimportant, just the number of them matters. | |
8944 | # | |
8945 | # The practical upshot of these patterns is like this: | |
8946 | # | |
8947 | # prefix exec_prefix result | |
8948 | # ------ ----------- ------ | |
8949 | # /foo /foo/bar ../ | |
8950 | # /foo/ /foo/bar ../ | |
8951 | # /foo /foo/bar/ ../ | |
8952 | # /foo/ /foo/bar/ ../ | |
8953 | # /foo /foo/bar/ugg ../../ | |
8954 | # | |
4c112cda NC |
8955 | dollar='$$' |
8956 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8957 | fi |
8958 | ||
8959 | ||
2ce3c6c6 | 8960 | |
2bbea3a6 RH |
8961 | # Find a directory in which to install a shared libgcc. |
8962 | ||
8963 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8964 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8965 | enableval="$enable_version_specific_runtime_libs" | |
093e61a6 RS |
8966 | : |
8967 | fi | |
2bbea3a6 RH |
8968 | |
8969 | ||
5b15f277 RH |
8970 | # Check whether --with-slibdir or --without-slibdir was given. |
8971 | if test "${with_slibdir+set}" = set; then | |
8972 | withval="$with_slibdir" | |
8973 | slibdir="$with_slibdir" | |
8974 | else | |
8975 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8976 | slibdir='$(libsubdir)' |
5b15f277 | 8977 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8978 | slibdir='$(build_tooldir)/lib' |
8979 | else | |
5b15f277 | 8980 | slibdir='$(libdir)' |
2bbea3a6 | 8981 | fi |
093e61a6 RS |
8982 | fi |
8983 | ||
2bbea3a6 RH |
8984 | |
8985 | ||
1e6347d8 | 8986 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
8987 | |
8988 | ||
861bb6c1 JL |
8989 | # Process the language and host/target makefile fragments. |
8990 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
8991 | ||
8992 | # Substitute configuration variables | |
8993 | ||
8994 | ||
8995 | ||
8996 | ||
8997 | ||
8998 | ||
8999 | ||
9000 | ||
9001 | ||
9002 | ||
9003 | ||
9004 | ||
9005 | ||
9006 | ||
9007 | ||
9008 | ||
9009 | ||
9010 | ||
9011 | ||
9012 | ||
9013 | ||
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 | ||
9b16d2c4 | 9039 | |
e9a25f70 | 9040 | |
6e26218f | 9041 | |
c8724862 | 9042 | |
e061d1ce | 9043 | |
d8bb17c8 | 9044 | |
11642c3a ZW |
9045 | |
9046 | ||
9047 | ||
9048 | ||
9049 | ||
9050 | ||
9051 | ||
3d9d2476 | 9052 | |
596151e1 | 9053 | |
8ac9d31f TJ |
9054 | |
9055 | ||
9056 | ||
e2500fed | 9057 | |
d5355cb2 | 9058 | |
476d9098 | 9059 | |
861bb6c1 JL |
9060 | |
9061 | ||
9062 | # Echo that links are built | |
75bffa71 | 9063 | if test x$host = x$target |
861bb6c1 JL |
9064 | then |
9065 | str1="native " | |
9066 | else | |
9067 | str1="cross-" | |
9068 | str2=" from $host" | |
9069 | fi | |
9070 | ||
75bffa71 | 9071 | if test x$host != x$build |
861bb6c1 JL |
9072 | then |
9073 | str3=" on a $build system" | |
9074 | fi | |
9075 | ||
75bffa71 | 9076 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9077 | then |
9078 | str4= | |
9079 | fi | |
9080 | ||
9081 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
9082 | ||
75bffa71 | 9083 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9084 | then |
9085 | echo " ${str2}${str3}." 1>&2 | |
9086 | fi | |
9087 | ||
f6cb0e63 | 9088 | # Truncate the target if necessary |
75bffa71 | 9089 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
9090 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
9091 | fi | |
9092 | ||
861bb6c1 JL |
9093 | # Configure the subdirectories |
9094 | # AC_CONFIG_SUBDIRS($subdirs) | |
9095 | ||
9096 | # Create the Makefile | |
9097 | # and configure language subdirectories | |
093e61a6 RS |
9098 | trap '' 1 2 15 |
9099 | cat > confcache <<\EOF | |
861bb6c1 JL |
9100 | # This file is a shell script that caches the results of configure |
9101 | # tests run on this system so they can be shared between configure | |
093e61a6 RS |
9102 | # scripts and configure runs. It is not useful on other systems. |
9103 | # If it contains results you don't want to keep, you may remove or edit it. | |
861bb6c1 | 9104 | # |
093e61a6 RS |
9105 | # By default, configure uses ./config.cache as the cache file, |
9106 | # creating it if it does not exist already. You can give configure | |
9107 | # the --cache-file=FILE option to use a different cache file; that is | |
9108 | # what configure does when it calls configure scripts in | |
9109 | # subdirectories, so they share the cache. | |
9110 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
9111 | # config.status only pays attention to the cache file if you give it the | |
9112 | # --recheck option to rerun configure. | |
861bb6c1 | 9113 | # |
093e61a6 | 9114 | EOF |
861bb6c1 JL |
9115 | # The following way of writing the cache mishandles newlines in values, |
9116 | # but we know of no workaround that is simple, portable, and efficient. | |
9117 | # So, don't put newlines in cache variables' values. | |
9118 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
9119 | # and sets the high bit in the cache file unless we assign to the vars. | |
093e61a6 RS |
9120 | (set) 2>&1 | |
9121 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
9122 | *ac_space=\ *) | |
9123 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
9124 | # turns \\\\ into \\, and sed turns \\ into \). | |
9125 | sed -n \ | |
9126 | -e "s/'/'\\\\''/g" \ | |
9127 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
9128 | ;; | |
9129 | *) | |
9130 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
9131 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
9132 | ;; | |
9133 | esac >> confcache | |
9134 | if cmp -s $cache_file confcache; then | |
9135 | : | |
9136 | else | |
861bb6c1 | 9137 | if test -w $cache_file; then |
093e61a6 RS |
9138 | echo "updating cache $cache_file" |
9139 | cat confcache > $cache_file | |
861bb6c1 JL |
9140 | else |
9141 | echo "not updating unwritable cache $cache_file" | |
9142 | fi | |
9143 | fi | |
9144 | rm -f confcache | |
9145 | ||
093e61a6 RS |
9146 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
9147 | ||
861bb6c1 JL |
9148 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
9149 | # Let make expand exec_prefix. | |
9150 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9151 | ||
093e61a6 RS |
9152 | # Any assignment to VPATH causes Sun make to only execute |
9153 | # the first set of double-colon rules, so remove it if not needed. | |
9154 | # If there is a colon in the path, we need to keep it. | |
861bb6c1 | 9155 | if test "x$srcdir" = x.; then |
093e61a6 | 9156 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
861bb6c1 JL |
9157 | fi |
9158 | ||
093e61a6 | 9159 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
cafe096b | 9160 | |
093e61a6 | 9161 | DEFS=-DHAVE_CONFIG_H |
cafe096b | 9162 | |
093e61a6 | 9163 | # Without the "./", some shells look in PATH for config.status. |
cafe096b | 9164 | : ${CONFIG_STATUS=./config.status} |
cafe096b | 9165 | |
093e61a6 RS |
9166 | echo creating $CONFIG_STATUS |
9167 | rm -f $CONFIG_STATUS | |
9168 | cat > $CONFIG_STATUS <<EOF | |
9169 | #! /bin/sh | |
9170 | # Generated automatically by configure. | |
9171 | # Run this file to recreate the current configuration. | |
9172 | # This directory was configured as follows, | |
9173 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
cafe096b | 9174 | # |
093e61a6 | 9175 | # $0 $ac_configure_args |
cafe096b | 9176 | # |
093e61a6 RS |
9177 | # Compiler output produced by configure, useful for debugging |
9178 | # configure, is in ./config.log if it exists. | |
cafe096b | 9179 | |
093e61a6 RS |
9180 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
9181 | for ac_option | |
cafe096b | 9182 | do |
093e61a6 RS |
9183 | case "\$ac_option" in |
9184 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9185 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
9186 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
9187 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
9188 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
9189 | exit 0 ;; | |
9190 | -help | --help | --hel | --he | --h) | |
9191 | echo "\$ac_cs_usage"; exit 0 ;; | |
9192 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
cafe096b EC |
9193 | esac |
9194 | done | |
9195 | ||
093e61a6 | 9196 | ac_given_srcdir=$srcdir |
cafe096b | 9197 | |
093e61a6 RS |
9198 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
9199 | EOF | |
9200 | cat >> $CONFIG_STATUS <<EOF | |
cafe096b | 9201 | |
093e61a6 RS |
9202 | # Protect against being on the right side of a sed subst in config.status. |
9203 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
9204 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
9205 | $ac_vpsub | |
9206 | $extrasub | |
9207 | s%@SHELL@%$SHELL%g | |
9208 | s%@CFLAGS@%$CFLAGS%g | |
9209 | s%@CPPFLAGS@%$CPPFLAGS%g | |
9210 | s%@CXXFLAGS@%$CXXFLAGS%g | |
9211 | s%@FFLAGS@%$FFLAGS%g | |
9212 | s%@DEFS@%$DEFS%g | |
9213 | s%@LDFLAGS@%$LDFLAGS%g | |
9214 | s%@LIBS@%$LIBS%g | |
9215 | s%@exec_prefix@%$exec_prefix%g | |
9216 | s%@prefix@%$prefix%g | |
9217 | s%@program_transform_name@%$program_transform_name%g | |
9218 | s%@bindir@%$bindir%g | |
9219 | s%@sbindir@%$sbindir%g | |
9220 | s%@libexecdir@%$libexecdir%g | |
9221 | s%@datadir@%$datadir%g | |
9222 | s%@sysconfdir@%$sysconfdir%g | |
9223 | s%@sharedstatedir@%$sharedstatedir%g | |
9224 | s%@localstatedir@%$localstatedir%g | |
9225 | s%@libdir@%$libdir%g | |
9226 | s%@includedir@%$includedir%g | |
9227 | s%@oldincludedir@%$oldincludedir%g | |
9228 | s%@infodir@%$infodir%g | |
9229 | s%@mandir@%$mandir%g | |
9230 | s%@host@%$host%g | |
9231 | s%@host_alias@%$host_alias%g | |
9232 | s%@host_cpu@%$host_cpu%g | |
9233 | s%@host_vendor@%$host_vendor%g | |
9234 | s%@host_os@%$host_os%g | |
9235 | s%@target@%$target%g | |
9236 | s%@target_alias@%$target_alias%g | |
9237 | s%@target_cpu@%$target_cpu%g | |
9238 | s%@target_vendor@%$target_vendor%g | |
9239 | s%@target_os@%$target_os%g | |
9240 | s%@build@%$build%g | |
9241 | s%@build_alias@%$build_alias%g | |
9242 | s%@build_cpu@%$build_cpu%g | |
9243 | s%@build_vendor@%$build_vendor%g | |
9244 | s%@build_os@%$build_os%g | |
9245 | s%@build_canonical@%$build_canonical%g | |
9246 | s%@host_canonical@%$host_canonical%g | |
9247 | s%@target_subdir@%$target_subdir%g | |
9248 | s%@CC@%$CC%g | |
9249 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
9250 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
9251 | s%@CPP@%$CPP%g | |
9252 | s%@GNATBIND@%$GNATBIND%g | |
9253 | s%@ADAC@%$ADAC%g | |
9254 | s%@strict1_warn@%$strict1_warn%g | |
9255 | s%@warn_cflags@%$warn_cflags%g | |
9256 | s%@WERROR@%$WERROR%g | |
9257 | s%@nocommon_flag@%$nocommon_flag%g | |
9258 | s%@valgrind_path@%$valgrind_path%g | |
9259 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
9260 | s%@valgrind_command@%$valgrind_command%g | |
9261 | s%@coverage_flags@%$coverage_flags%g | |
9262 | s%@enable_multilib@%$enable_multilib%g | |
9263 | s%@enable_shared@%$enable_shared%g | |
9264 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
9265 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
9266 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
9267 | s%@SET_MAKE@%$SET_MAKE%g | |
9268 | s%@AWK@%$AWK%g | |
9269 | s%@LN@%$LN%g | |
9270 | s%@LN_S@%$LN_S%g | |
9271 | s%@RANLIB@%$RANLIB%g | |
9272 | s%@INSTALL@%$INSTALL%g | |
9273 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
9274 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
9275 | s%@have_mktemp_command@%$have_mktemp_command%g | |
9276 | s%@MAKEINFO@%$MAKEINFO%g | |
9277 | s%@BUILD_INFO@%$BUILD_INFO%g | |
9278 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
9279 | s%@make_compare_target@%$make_compare_target%g | |
9280 | s%@FLEX@%$FLEX%g | |
9281 | s%@BISON@%$BISON%g | |
9282 | s%@stage1_cflags@%$stage1_cflags%g | |
9283 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
9284 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
9285 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
9286 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
9287 | s%@LIBICONV@%$LIBICONV%g | |
9288 | s%@manext@%$manext%g | |
9289 | s%@objext@%$objext%g | |
9290 | s%@extra_modes_file@%$extra_modes_file%g | |
9291 | s%@FORBUILD@%$FORBUILD%g | |
9292 | s%@PACKAGE@%$PACKAGE%g | |
9293 | s%@VERSION@%$VERSION%g | |
9294 | s%@ALLOCA@%$ALLOCA%g | |
9295 | s%@GLIBC21@%$GLIBC21%g | |
9296 | s%@USE_NLS@%$USE_NLS%g | |
9297 | s%@MSGFMT@%$MSGFMT%g | |
9298 | s%@GMSGFMT@%$GMSGFMT%g | |
9299 | s%@XGETTEXT@%$XGETTEXT%g | |
9300 | s%@INTLBISON@%$INTLBISON%g | |
9301 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
9302 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
9303 | s%@CATALOGS@%$CATALOGS%g | |
9304 | s%@CATOBJEXT@%$CATOBJEXT%g | |
9305 | s%@INTLLIBS@%$INTLLIBS%g | |
9306 | s%@INTLDEPS@%$INTLDEPS%g | |
9307 | s%@INTLOBJS@%$INTLOBJS%g | |
9308 | s%@POSUB@%$POSUB%g | |
9309 | s%@DATADIRNAME@%$DATADIRNAME%g | |
9310 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
9311 | s%@GENCAT@%$GENCAT%g | |
9312 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
9313 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g | |
9314 | s%@CROSS@%$CROSS%g | |
9315 | s%@ALL@%$ALL%g | |
9316 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
9317 | s%@inhibit_libc@%$inhibit_libc%g | |
9318 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
9319 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
9320 | s%@BUILD_CC@%$BUILD_CC%g | |
9321 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g | |
9322 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
9323 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9324 | s%@libgcc_visibility@%$libgcc_visibility%g | |
9325 | s%@gthread_flags@%$gthread_flags%g | |
9326 | s%@GGC@%$GGC%g | |
9327 | s%@zlibdir@%$zlibdir%g | |
9328 | s%@zlibinc@%$zlibinc%g | |
9329 | s%@MAINT@%$MAINT%g | |
9330 | s%@gcc_tooldir@%$gcc_tooldir%g | |
9331 | s%@dollar@%$dollar%g | |
9332 | s%@slibdir@%$slibdir%g | |
9333 | s%@objdir@%$objdir%g | |
9334 | s%@subdirs@%$subdirs%g | |
9335 | s%@srcdir@%$srcdir%g | |
9336 | s%@all_boot_languages@%$all_boot_languages%g | |
9337 | s%@all_compilers@%$all_compilers%g | |
9338 | s%@all_gtfiles@%$all_gtfiles%g | |
9339 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
9340 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
9341 | s%@all_lang_makefiles@%$all_lang_makefiles%g | |
9342 | s%@all_languages@%$all_languages%g | |
9343 | s%@all_stagestuff@%$all_stagestuff%g | |
9344 | s%@build_exeext@%$build_exeext%g | |
9345 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
9346 | s%@build_xm_file_list@%$build_xm_file_list%g | |
9347 | s%@build_xm_file@%$build_xm_file%g | |
9348 | s%@build_xm_defines@%$build_xm_defines%g | |
9349 | s%@check_languages@%$check_languages%g | |
9350 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
9351 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
9352 | s%@cpp_install_dir@%$cpp_install_dir%g | |
9353 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g | |
9354 | s%@dep_tmake_file@%$dep_tmake_file%g | |
9355 | s%@extra_headers_list@%$extra_headers_list%g | |
9356 | s%@extra_objs@%$extra_objs%g | |
9357 | s%@extra_parts@%$extra_parts%g | |
9358 | s%@extra_passes@%$extra_passes%g | |
9359 | s%@extra_programs@%$extra_programs%g | |
9360 | s%@float_h_file@%$float_h_file%g | |
9361 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
9362 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
9363 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
9364 | s%@gcc_version@%$gcc_version%g | |
9365 | s%@gcc_version_full@%$gcc_version_full%g | |
9366 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
9367 | s%@host_exeext@%$host_exeext%g | |
9368 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
9369 | s%@host_xm_file_list@%$host_xm_file_list%g | |
9370 | s%@host_xm_file@%$host_xm_file%g | |
9371 | s%@host_xm_defines@%$host_xm_defines%g | |
9372 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
9373 | s%@install@%$install%g | |
9374 | s%@lang_options_files@%$lang_options_files%g | |
9375 | s%@lang_specs_files@%$lang_specs_files%g | |
9376 | s%@lang_tree_files@%$lang_tree_files%g | |
9377 | s%@local_prefix@%$local_prefix%g | |
9378 | s%@md_file@%$md_file%g | |
9379 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
9380 | s%@out_file@%$out_file%g | |
9381 | s%@out_object_file@%$out_object_file%g | |
9382 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
9383 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
9384 | s%@symbolic_link@%$symbolic_link%g | |
9385 | s%@thread_file@%$thread_file%g | |
9386 | s%@tm_file_list@%$tm_file_list%g | |
9387 | s%@tm_file@%$tm_file%g | |
9388 | s%@tm_defines@%$tm_defines%g | |
9389 | s%@tm_p_file_list@%$tm_p_file_list%g | |
9390 | s%@tm_p_file@%$tm_p_file%g | |
9391 | s%@xm_file@%$xm_file%g | |
9392 | s%@xm_defines@%$xm_defines%g | |
9393 | s%@c_target_objs@%$c_target_objs%g | |
9394 | s%@cxx_target_objs@%$cxx_target_objs%g | |
9395 | s%@target_cpu_default@%$target_cpu_default%g | |
861bb6c1 | 9396 | /@target_overrides@/r $target_overrides |
093e61a6 | 9397 | s%@target_overrides@%%g |
861bb6c1 | 9398 | /@host_overrides@/r $host_overrides |
093e61a6 | 9399 | s%@host_overrides@%%g |
861bb6c1 | 9400 | /@language_fragments@/r $language_fragments |
093e61a6 | 9401 | s%@language_fragments@%%g |
861bb6c1 | 9402 | /@language_hooks@/r $language_hooks |
093e61a6 RS |
9403 | s%@language_hooks@%%g |
9404 | ||
861bb6c1 | 9405 | CEOF |
093e61a6 | 9406 | EOF |
861bb6c1 | 9407 | |
093e61a6 RS |
9408 | cat >> $CONFIG_STATUS <<\EOF |
9409 | ||
9410 | # Split the substitutions into bite-sized pieces for seds with | |
9411 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9412 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
9413 | ac_file=1 # Number of current file. | |
9414 | ac_beg=1 # First line for current file. | |
9415 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9416 | ac_more_lines=: | |
9417 | ac_sed_cmds="" | |
9418 | while $ac_more_lines; do | |
9419 | if test $ac_beg -gt 1; then | |
9420 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9421 | else | |
9422 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9423 | fi | |
9424 | if test ! -s conftest.s$ac_file; then | |
9425 | ac_more_lines=false | |
9426 | rm -f conftest.s$ac_file | |
9427 | else | |
9428 | if test -z "$ac_sed_cmds"; then | |
9429 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
861bb6c1 | 9430 | else |
093e61a6 | 9431 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
861bb6c1 | 9432 | fi |
093e61a6 RS |
9433 | ac_file=`expr $ac_file + 1` |
9434 | ac_beg=$ac_end | |
9435 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
861bb6c1 | 9436 | fi |
093e61a6 RS |
9437 | done |
9438 | if test -z "$ac_sed_cmds"; then | |
9439 | ac_sed_cmds=cat | |
9440 | fi | |
9441 | EOF | |
861bb6c1 | 9442 | |
093e61a6 RS |
9443 | cat >> $CONFIG_STATUS <<EOF |
9444 | ||
9445 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
9446 | EOF | |
9447 | cat >> $CONFIG_STATUS <<\EOF | |
9448 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9449 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9450 | case "$ac_file" in |
9451 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9452 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9453 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9454 | esac |
9455 | ||
093e61a6 | 9456 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
cafe096b | 9457 | |
093e61a6 RS |
9458 | # Remove last slash and all that follows it. Not all systems have dirname. |
9459 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9460 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9461 | # The file is in a subdirectory. | |
9462 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9463 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9464 | # A "../" for each directory in $ac_dir_suffix. | |
9465 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9466 | else | |
9467 | ac_dir_suffix= ac_dots= | |
9468 | fi | |
cafe096b | 9469 | |
093e61a6 RS |
9470 | case "$ac_given_srcdir" in |
9471 | .) srcdir=. | |
9472 | if test -z "$ac_dots"; then top_srcdir=. | |
9473 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9474 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 9475 | *) # Relative path. |
093e61a6 RS |
9476 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
9477 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9478 | esac | |
861bb6c1 | 9479 | |
cafe096b | 9480 | |
093e61a6 RS |
9481 | echo creating "$ac_file" |
9482 | rm -f "$ac_file" | |
9483 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9484 | case "$ac_file" in | |
9485 | *Makefile*) ac_comsub="1i\\ | |
9486 | # $configure_input" ;; | |
9487 | *) ac_comsub= ;; | |
9488 | esac | |
cafe096b | 9489 | |
093e61a6 RS |
9490 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
9491 | sed -e "$ac_comsub | |
9492 | s%@configure_input@%$configure_input%g | |
9493 | s%@srcdir@%$srcdir%g | |
9494 | s%@top_srcdir@%$top_srcdir%g | |
9495 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9496 | fi; done | |
9497 | rm -f conftest.s* | |
861bb6c1 JL |
9498 | |
9499 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9500 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9501 | # | |
9502 | # ac_d sets the value in "#define NAME VALUE" lines. | |
093e61a6 RS |
9503 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9504 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9505 | ac_dC='\3' | |
9506 | ac_dD='%g' | |
9507 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9508 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9509 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 9510 | ac_uC=' ' |
093e61a6 RS |
9511 | ac_uD='\4%g' |
9512 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9513 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9514 | ac_eB='$%\1#\2define\3' | |
9515 | ac_eC=' ' | |
9516 | ac_eD='%g' | |
9517 | ||
9518 | if test "${CONFIG_HEADERS+set}" != set; then | |
9519 | EOF | |
9520 | cat >> $CONFIG_STATUS <<EOF | |
9521 | CONFIG_HEADERS="auto-host.h:config.in" | |
9522 | EOF | |
9523 | cat >> $CONFIG_STATUS <<\EOF | |
9524 | fi | |
9525 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9526 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9527 | case "$ac_file" in |
9528 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9529 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9530 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9531 | esac |
9532 | ||
093e61a6 RS |
9533 | echo creating $ac_file |
9534 | ||
9535 | rm -f conftest.frag conftest.in conftest.out | |
9536 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9537 | cat $ac_file_inputs > conftest.in | |
9538 | ||
9539 | EOF | |
9540 | ||
9541 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9542 | # the proper values into config.h.in to produce config.h. And first: | |
9543 | # Protect against being on the right side of a sed subst in config.status. | |
9544 | # Protect against being in an unquoted here document in config.status. | |
9545 | rm -f conftest.vals | |
9546 | cat > conftest.hdr <<\EOF | |
9547 | s/[\\&%]/\\&/g | |
9548 | s%[\\$`]%\\&%g | |
9549 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9550 | s%ac_d%ac_u%gp | |
9551 | s%ac_u%ac_e%gp | |
9552 | EOF | |
9553 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9554 | rm -f conftest.hdr | |
861bb6c1 JL |
9555 | |
9556 | # This sed command replaces #undef with comments. This is necessary, for | |
9557 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9558 | # on some systems where configure will not decide to define it. | |
093e61a6 RS |
9559 | cat >> conftest.vals <<\EOF |
9560 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9561 | EOF | |
9562 | ||
9563 | # Break up conftest.vals because some shells have a limit on | |
9564 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
9565 | |
9566 | rm -f conftest.tail | |
093e61a6 | 9567 | while : |
861bb6c1 | 9568 | do |
093e61a6 RS |
9569 | ac_lines=`grep -c . conftest.vals` |
9570 | # grep -c gives empty output for an empty file on some AIX systems. | |
9571 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9572 | # Write a limited-size here document to conftest.frag. | |
9573 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9574 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 9575 | echo 'CEOF |
093e61a6 RS |
9576 | sed -f conftest.frag conftest.in > conftest.out |
9577 | rm -f conftest.in | |
9578 | mv conftest.out conftest.in | |
9579 | ' >> $CONFIG_STATUS | |
9580 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9581 | rm -f conftest.vals | |
9582 | mv conftest.tail conftest.vals | |
861bb6c1 | 9583 | done |
093e61a6 RS |
9584 | rm -f conftest.vals |
9585 | ||
9586 | cat >> $CONFIG_STATUS <<\EOF | |
9587 | rm -f conftest.frag conftest.h | |
9588 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9589 | cat conftest.in >> conftest.h | |
9590 | rm -f conftest.in | |
9591 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9592 | echo "$ac_file is unchanged" | |
9593 | rm -f conftest.h | |
cafe096b | 9594 | else |
093e61a6 RS |
9595 | # Remove last slash and all that follows it. Not all systems have dirname. |
9596 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9597 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9598 | # The file is in a subdirectory. | |
9599 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 9600 | fi |
093e61a6 RS |
9601 | rm -f $ac_file |
9602 | mv conftest.h $ac_file | |
cafe096b | 9603 | fi |
093e61a6 | 9604 | fi; done |
861bb6c1 | 9605 | |
093e61a6 RS |
9606 | EOF |
9607 | cat >> $CONFIG_STATUS <<EOF | |
9608 | ||
9609 | subdirs='$subdirs' | |
9610 | symbolic_link='$symbolic_link' | |
9611 | ||
9612 | EOF | |
9613 | cat >> $CONFIG_STATUS <<\EOF | |
9614 | for ac_file in $CONFIG_FILES; do | |
71a94577 ZW |
9615 | # Support "outfile[:infile[:infile...]]" |
9616 | case "$ac_file" in | |
9617 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9618 | esac | |
9619 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
9620 | case "$ac_file" in */Makefile.in) | |
9621 | # Adjust a relative srcdir. | |
9622 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
9623 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
9624 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
9625 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
9626 | # In autoconf-2.50 it is called $srcdir. | |
9627 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
9628 | case "$ac_given_srcdir" in | |
9629 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
9630 | /*) top_srcdir="$ac_given_srcdir" ;; | |
9631 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9632 | esac | |
9633 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
9634 | rm -f "$ac_dir/POTFILES" | |
9635 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
9636 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
9637 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
9638 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
9639 | fi | |
9640 | ;; | |
9641 | esac | |
093e61a6 RS |
9642 | done |
9643 | ||
861bb6c1 | 9644 | case x$CONFIG_HEADERS in |
b7cb92ad | 9645 | xauto-host.h:config.in) |
861bb6c1 JL |
9646 | echo > cstamp-h ;; |
9647 | esac | |
93cf819d BK |
9648 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
9649 | # bootstrapping and the installation procedure can still use | |
9650 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
9651 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
9652 | # This is virtually a duplicate of what happens in configure.lang; we do | |
9653 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 9654 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 9655 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 9656 | if test $d != ..; then |
1e6347d8 | 9657 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 9658 | cd $d |
8f231b5d | 9659 | for t in stage1 stage2 stage3 stage4 include stageprofile stagefeedback |
4e8a434e BK |
9660 | do |
9661 | rm -f $t | |
9662 | $symbolic_link ../$t $t 2>/dev/null | |
9663 | done | |
9664 | cd $STARTDIR | |
93cf819d BK |
9665 | fi |
9666 | done | |
9667 | else true ; fi | |
ab87f8c8 JL |
9668 | # Avoid having to add intl to our include paths. |
9669 | if test -f intl/libintl.h; then | |
9670 | echo creating libintl.h | |
9671 | echo '#include "intl/libintl.h"' >libintl.h | |
9672 | fi | |
cafe096b | 9673 | |
093e61a6 RS |
9674 | exit 0 |
9675 | EOF | |
861bb6c1 | 9676 | chmod +x $CONFIG_STATUS |
093e61a6 RS |
9677 | rm -fr confdefs* $ac_clean_files |
9678 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 9679 |