]>
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 | 735 | |
6a1b7268 | 736 | target_subdir=${target_alias} |
73458fb7 | 737 | |
093e61a6 RS |
738 | |
739 | # Set program_transform_name | |
740 | if test "$program_transform_name" = s,x,x,; then | |
741 | program_transform_name= | |
13c22933 | 742 | else |
093e61a6 RS |
743 | # Double any \ or $. echo might interpret backslashes. |
744 | cat <<\EOF_SED > conftestsed | |
745 | s,\\,\\\\,g; s,\$,$$,g | |
746 | EOF_SED | |
747 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
748 | rm -f conftestsed | |
cafe096b | 749 | fi |
13c22933 | 750 | test "$program_prefix" != NONE && |
093e61a6 | 751 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
752 | # Use a double $ so make ignores it. |
753 | test "$program_suffix" != NONE && | |
093e61a6 RS |
754 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
755 | ||
756 | # sed with no file args requires a program. | |
757 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
758 | |
759 | ||
34a86c2b NN |
760 | # Check for bogus environment variables. |
761 | # Test if LIBRARY_PATH contains the notation for the current directory | |
762 | # since this would lead to problems installing/building glibc. | |
763 | # LIBRARY_PATH contains the current directory if one of the following | |
764 | # is true: | |
765 | # - one of the terminals (":" and ";") is the first or last sign | |
766 | # - two terminals occur directly after each other | |
767 | # - the path contains an element with a dot in it | |
093e61a6 | 768 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
6a1b7268 | 769 | echo "configure:770: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
770 | case ${LIBRARY_PATH} in |
771 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
772 | library_path_setting="contains current directory" | |
773 | ;; | |
774 | *) | |
775 | library_path_setting="ok" | |
776 | ;; | |
777 | esac | |
093e61a6 | 778 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 779 | if test "$library_path_setting" != "ok"; then |
093e61a6 | 780 | { echo "configure: error: |
34a86c2b NN |
781 | *** LIBRARY_PATH shouldn't contain the current directory when |
782 | *** building gcc. Please change the environment variable | |
093e61a6 | 783 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
784 | fi |
785 | ||
34a86c2b NN |
786 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
787 | # since this would lead to problems installing/building glibc. | |
788 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
789 | # is true: | |
790 | # - one of the terminals (":" and ";") is the first or last sign | |
791 | # - two terminals occur directly after each other | |
792 | # - the path contains an element with a dot in it | |
093e61a6 | 793 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
6a1b7268 | 794 | echo "configure:795: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
795 | case ${GCC_EXEC_PREFIX} in |
796 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
797 | gcc_exec_prefix_setting="contains current directory" | |
798 | ;; | |
799 | *) | |
800 | gcc_exec_prefix_setting="ok" | |
801 | ;; | |
802 | esac | |
093e61a6 | 803 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 804 | if test "$gcc_exec_prefix_setting" != "ok"; then |
093e61a6 | 805 | { echo "configure: error: |
cafe096b EC |
806 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
807 | *** building gcc. Please change the environment variable | |
093e61a6 | 808 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
809 | fi |
810 | ||
811 | # ----------- | |
812 | # Directories | |
813 | # ----------- | |
814 | ||
815 | # Specify the local prefix | |
816 | local_prefix= | |
817 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
818 | if test "${with_local_prefix+set}" = set; then | |
819 | withval="$with_local_prefix" | |
820 | case "${withval}" in | |
093e61a6 | 821 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
822 | no) ;; |
823 | *) local_prefix=$with_local_prefix ;; | |
824 | esac | |
093e61a6 RS |
825 | fi |
826 | ||
34a86c2b NN |
827 | |
828 | # Default local prefix if it is empty | |
829 | if test x$local_prefix = x; then | |
830 | local_prefix=/usr/local | |
831 | fi | |
832 | ||
833 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
834 | # passed in by the toplevel make and thus we'd get different behavior | |
835 | # depending on where we built the sources. | |
836 | gcc_gxx_include_dir= | |
837 | # Specify the g++ header file directory | |
838 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
839 | if test "${with_gxx_include_dir+set}" = set; then | |
840 | withval="$with_gxx_include_dir" | |
841 | case "${withval}" in | |
093e61a6 | 842 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
843 | no) ;; |
844 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
845 | esac | |
093e61a6 RS |
846 | fi |
847 | ||
34a86c2b NN |
848 | |
849 | if test x${gcc_gxx_include_dir} = x; then | |
850 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
851 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
852 | else | |
853 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
854 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
855 | fi | |
856 | fi | |
857 | ||
858 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
859 | if test "${with_cpp_install_dir+set}" = set; then | |
860 | withval="$with_cpp_install_dir" | |
861 | if test x$withval = xyes; then | |
093e61a6 | 862 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
863 | elif test x$withval != xno; then |
864 | cpp_install_dir=$withval | |
865 | fi | |
093e61a6 RS |
866 | fi |
867 | ||
34a86c2b NN |
868 | |
869 | # ------------------- | |
870 | # Find default linker | |
871 | # ------------------- | |
872 | ||
873 | # With GNU ld | |
874 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
875 | if test "${with_gnu_ld+set}" = set; then | |
876 | withval="$with_gnu_ld" | |
877 | gnu_ld_flag="$with_gnu_ld" | |
878 | else | |
879 | gnu_ld_flag=no | |
093e61a6 | 880 | fi |
34a86c2b | 881 | |
cafe096b | 882 | |
093e61a6 | 883 | # With pre-defined ld |
34a86c2b NN |
884 | # Check whether --with-ld or --without-ld was given. |
885 | if test "${with_ld+set}" = set; then | |
886 | withval="$with_ld" | |
887 | DEFAULT_LINKER="$with_ld" | |
093e61a6 RS |
888 | fi |
889 | ||
34a86c2b NN |
890 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
891 | if test ! -x "$DEFAULT_LINKER"; then | |
093e61a6 | 892 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
893 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
894 | gnu_ld_flag=yes | |
895 | fi | |
093e61a6 | 896 | cat >> confdefs.h <<EOF |
34a86c2b | 897 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
093e61a6 | 898 | EOF |
34a86c2b NN |
899 | |
900 | fi | |
901 | ||
093e61a6 | 902 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
6a1b7268 | 903 | echo "configure:904: checking whether a default linker was specified" >&5 |
34a86c2b NN |
904 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
905 | if test x"$gnu_ld_flag" = x"no"; then | |
093e61a6 | 906 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 907 | else |
093e61a6 | 908 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
909 | fi |
910 | else | |
093e61a6 | 911 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
912 | fi |
913 | ||
914 | # ---------------------- | |
915 | # Find default assembler | |
916 | # ---------------------- | |
917 | ||
918 | # With GNU as | |
919 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
920 | if test "${with_gnu_as+set}" = set; then | |
921 | withval="$with_gnu_as" | |
922 | gas_flag="$with_gnu_as" | |
923 | else | |
924 | gas_flag=no | |
093e61a6 | 925 | fi |
34a86c2b NN |
926 | |
927 | ||
928 | # Check whether --with-as or --without-as was given. | |
929 | if test "${with_as+set}" = set; then | |
930 | withval="$with_as" | |
931 | DEFAULT_ASSEMBLER="$with_as" | |
093e61a6 RS |
932 | fi |
933 | ||
34a86c2b NN |
934 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
935 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
093e61a6 | 936 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
937 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
938 | gas_flag=yes | |
939 | fi | |
093e61a6 | 940 | cat >> confdefs.h <<EOF |
34a86c2b | 941 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
093e61a6 | 942 | EOF |
34a86c2b NN |
943 | |
944 | fi | |
945 | ||
093e61a6 | 946 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
6a1b7268 | 947 | echo "configure:948: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
948 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
949 | if test x"$gas_flag" = x"no"; then | |
093e61a6 | 950 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 951 | else |
093e61a6 | 952 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
953 | fi |
954 | else | |
093e61a6 | 955 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
956 | fi |
957 | ||
958 | # --------------- | |
959 | # Find C compiler | |
960 | # --------------- | |
961 | ||
962 | # Find the native compiler | |
093e61a6 | 963 | # Extract the first word of "gcc", so it can be a program name with args. |
34a86c2b | 964 | set dummy gcc; ac_word=$2 |
093e61a6 | 965 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 966 | echo "configure:967: checking for $ac_word" >&5 |
093e61a6 RS |
967 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
968 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
969 | else |
970 | if test -n "$CC"; then | |
971 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
972 | else | |
093e61a6 RS |
973 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
974 | ac_dummy="$PATH" | |
975 | for ac_dir in $ac_dummy; do | |
976 | test -z "$ac_dir" && ac_dir=. | |
977 | if test -f $ac_dir/$ac_word; then | |
978 | ac_cv_prog_CC="gcc" | |
979 | break | |
980 | fi | |
981 | done | |
982 | IFS="$ac_save_ifs" | |
34a86c2b NN |
983 | fi |
984 | fi | |
093e61a6 | 985 | CC="$ac_cv_prog_CC" |
34a86c2b | 986 | if test -n "$CC"; then |
093e61a6 | 987 | echo "$ac_t""$CC" 1>&6 |
cafe096b | 988 | else |
093e61a6 | 989 | echo "$ac_t""no" 1>&6 |
cafe096b | 990 | fi |
cafe096b | 991 | |
34a86c2b NN |
992 | if test -z "$CC"; then |
993 | # Extract the first word of "cc", so it can be a program name with args. | |
994 | set dummy cc; ac_word=$2 | |
093e61a6 | 995 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 996 | echo "configure:997: checking for $ac_word" >&5 |
093e61a6 RS |
997 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
998 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 JL |
999 | else |
1000 | if test -n "$CC"; then | |
1001 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1002 | else | |
093e61a6 | 1003 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1004 | ac_prog_rejected=no |
093e61a6 RS |
1005 | ac_dummy="$PATH" |
1006 | for ac_dir in $ac_dummy; do | |
1007 | test -z "$ac_dir" && ac_dir=. | |
1008 | if test -f $ac_dir/$ac_word; then | |
1009 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1010 | ac_prog_rejected=yes | |
1011 | continue | |
1012 | fi | |
1013 | ac_cv_prog_CC="cc" | |
1014 | break | |
1015 | fi | |
1016 | done | |
1017 | IFS="$ac_save_ifs" | |
e9a25f70 JL |
1018 | if test $ac_prog_rejected = yes; then |
1019 | # We found a bogon in the path, so make sure we never use it. | |
1020 | set dummy $ac_cv_prog_CC | |
1021 | shift | |
093e61a6 | 1022 | if test $# -gt 0; then |
e9a25f70 JL |
1023 | # We chose a different compiler from the bogus one. |
1024 | # However, it has the same basename, so the bogon will be chosen | |
1025 | # first if we set CC to just the basename; use the full file name. | |
1026 | shift | |
093e61a6 RS |
1027 | set dummy "$ac_dir/$ac_word" "$@" |
1028 | shift | |
1029 | ac_cv_prog_CC="$@" | |
e9a25f70 JL |
1030 | fi |
1031 | fi | |
1032 | fi | |
1033 | fi | |
093e61a6 | 1034 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1035 | if test -n "$CC"; then |
093e61a6 | 1036 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1037 | else |
093e61a6 | 1038 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
1039 | fi |
1040 | ||
093e61a6 RS |
1041 | if test -z "$CC"; then |
1042 | case "`uname -s`" in | |
1043 | *win32* | *WIN32*) | |
1044 | # Extract the first word of "cl", so it can be a program name with args. | |
1045 | set dummy cl; ac_word=$2 | |
1046 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6a1b7268 | 1047 | echo "configure:1048: checking for $ac_word" >&5 |
093e61a6 RS |
1048 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1049 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
1050 | else |
1051 | if test -n "$CC"; then | |
1052 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1053 | else | |
093e61a6 RS |
1054 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1055 | ac_dummy="$PATH" | |
1056 | for ac_dir in $ac_dummy; do | |
1057 | test -z "$ac_dir" && ac_dir=. | |
1058 | if test -f $ac_dir/$ac_word; then | |
1059 | ac_cv_prog_CC="cl" | |
1060 | break | |
1061 | fi | |
1062 | done | |
1063 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1064 | fi |
1065 | fi | |
093e61a6 | 1066 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1067 | if test -n "$CC"; then |
093e61a6 | 1068 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1069 | else |
093e61a6 | 1070 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1071 | fi |
093e61a6 RS |
1072 | ;; |
1073 | esac | |
cafe096b | 1074 | fi |
093e61a6 | 1075 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
cafe096b | 1076 | fi |
e9a25f70 | 1077 | |
093e61a6 | 1078 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
6a1b7268 | 1079 | echo "configure:1080: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 | 1080 | |
093e61a6 RS |
1081 | ac_ext=c |
1082 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1083 | ac_cpp='$CPP $CPPFLAGS' | |
1084 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1085 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1086 | cross_compiling=$ac_cv_prog_cc_cross | |
b27d2bd5 | 1087 | |
093e61a6 | 1088 | cat > conftest.$ac_ext << EOF |
b27d2bd5 | 1089 | |
6a1b7268 | 1090 | #line 1091 "configure" |
093e61a6 RS |
1091 | #include "confdefs.h" |
1092 | ||
1093 | main(){return(0);} | |
1094 | EOF | |
6a1b7268 | 1095 | if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
1096 | ac_cv_prog_cc_works=yes |
1097 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1098 | if (./conftest; exit) 2>/dev/null; then | |
1099 | ac_cv_prog_cc_cross=no | |
e9a25f70 | 1100 | else |
093e61a6 | 1101 | ac_cv_prog_cc_cross=yes |
e9a25f70 | 1102 | fi |
e9a25f70 | 1103 | else |
093e61a6 RS |
1104 | echo "configure: failed program was:" >&5 |
1105 | cat conftest.$ac_ext >&5 | |
1106 | ac_cv_prog_cc_works=no | |
e9a25f70 | 1107 | fi |
093e61a6 RS |
1108 | rm -fr conftest* |
1109 | ac_ext=c | |
1110 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1111 | ac_cpp='$CPP $CPPFLAGS' | |
1112 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1113 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1114 | cross_compiling=$ac_cv_prog_cc_cross | |
cafe096b | 1115 | |
093e61a6 RS |
1116 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
1117 | if test $ac_cv_prog_cc_works = no; then | |
1118 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
e9a25f70 | 1119 | fi |
093e61a6 | 1120 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
6a1b7268 | 1121 | echo "configure:1122: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
093e61a6 RS |
1122 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1123 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 | 1124 | |
093e61a6 | 1125 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
6a1b7268 | 1126 | echo "configure:1127: checking whether we are using GNU C" >&5 |
093e61a6 RS |
1127 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1128 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1129 | else | |
1130 | cat > conftest.c <<EOF | |
1131 | #ifdef __GNUC__ | |
1132 | yes; | |
cafe096b | 1133 | #endif |
093e61a6 | 1134 | EOF |
6a1b7268 | 1135 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
093e61a6 RS |
1136 | ac_cv_prog_gcc=yes |
1137 | else | |
1138 | ac_cv_prog_gcc=no | |
1139 | fi | |
1140 | fi | |
e9a25f70 | 1141 | |
093e61a6 | 1142 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
cd9e5e7c | 1143 | |
093e61a6 RS |
1144 | if test $ac_cv_prog_gcc = yes; then |
1145 | GCC=yes | |
1146 | else | |
1147 | GCC= | |
1148 | fi | |
cafe096b | 1149 | |
093e61a6 RS |
1150 | ac_test_CFLAGS="${CFLAGS+set}" |
1151 | ac_save_CFLAGS="$CFLAGS" | |
1152 | CFLAGS= | |
1153 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
6a1b7268 | 1154 | echo "configure:1155: checking whether ${CC-cc} accepts -g" >&5 |
093e61a6 RS |
1155 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1156 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1157 | else | |
1158 | echo 'void f(){}' > conftest.c | |
1159 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
e9a25f70 JL |
1160 | ac_cv_prog_cc_g=yes |
1161 | else | |
093e61a6 | 1162 | ac_cv_prog_cc_g=no |
e9a25f70 | 1163 | fi |
093e61a6 RS |
1164 | rm -f conftest* |
1165 | ||
cafe096b | 1166 | fi |
093e61a6 RS |
1167 | |
1168 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1169 | if test "$ac_test_CFLAGS" = set; then |
093e61a6 | 1170 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1171 | elif test $ac_cv_prog_cc_g = yes; then |
1172 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1173 | CFLAGS="-g -O2" |
1174 | else | |
cd9e5e7c | 1175 | CFLAGS="-g" |
81814e35 | 1176 | fi |
3723cad9 | 1177 | else |
cd9e5e7c MK |
1178 | if test "$GCC" = yes; then |
1179 | CFLAGS="-O2" | |
1180 | else | |
1181 | CFLAGS= | |
1182 | fi | |
e9a25f70 JL |
1183 | fi |
1184 | ||
3ec83fc2 | 1185 | if test "x$CC" != xcc; then |
093e61a6 | 1186 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 |
6a1b7268 | 1187 | echo "configure:1188: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1188 | else |
093e61a6 | 1189 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
6a1b7268 | 1190 | echo "configure:1191: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 | 1191 | fi |
093e61a6 RS |
1192 | set dummy $CC; ac_cc="`echo $2 | |
1193 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1194 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1196 | else |
093e61a6 | 1197 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1198 | # Make sure it works both with $CC and with simple cc. |
1199 | # We do the test twice because some compilers refuse to overwrite an | |
1200 | # existing .o file with -o, though they will create one. | |
093e61a6 | 1201 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
6a1b7268 NN |
1202 | if { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1203 | test -f conftest.o && { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1204 | then |
1205 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1206 | if test "x$CC" != xcc; then | |
1207 | # Test first that cc exists at all. | |
6a1b7268 | 1208 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
093e61a6 | 1209 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
6a1b7268 NN |
1210 | if { (eval echo configure:1211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1211 | test -f conftest.o && { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1212 | then |
1213 | # cc works too. | |
1214 | : | |
1215 | else | |
1216 | # cc exists but doesn't like -o. | |
1217 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1218 | fi | |
1219 | fi | |
1220 | fi | |
1221 | else | |
1222 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1223 | fi | |
1224 | rm -f conftest* | |
1225 | ||
1226 | fi | |
1227 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
093e61a6 | 1228 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1229 | else |
093e61a6 RS |
1230 | echo "$ac_t""no" 1>&6 |
1231 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1232 | #define NO_MINUS_C_MINUS_O 1 |
093e61a6 | 1233 | EOF |
3ec83fc2 RH |
1234 | |
1235 | fi | |
1236 | ||
414d23ae HPN |
1237 | # autoconf is lame and doesn't give us any substitution variable for this. |
1238 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1239 | NO_MINUS_C_MINUS_O=yes | |
1240 | else | |
1241 | OUTPUT_OPTION='-o $@' | |
1242 | fi | |
1243 | ||
1244 | ||
1245 | ||
73458fb7 NN |
1246 | # ------------------------- |
1247 | # Check C compiler features | |
1248 | # ------------------------- | |
1249 | ||
093e61a6 | 1250 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
6a1b7268 | 1251 | echo "configure:1252: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1252 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1253 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1254 | else |
1255 | save_CFLAGS="$CFLAGS" | |
1256 | CFLAGS="-Wno-long-long" | |
093e61a6 | 1257 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1258 | #line 1259 "configure" |
093e61a6 | 1259 | #include "confdefs.h" |
75e93faa | 1260 | |
093e61a6 | 1261 | int main() { |
75e93faa | 1262 | |
093e61a6 RS |
1263 | ; return 0; } |
1264 | EOF | |
6a1b7268 | 1265 | if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1266 | rm -rf conftest* |
34a86c2b | 1267 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1268 | else |
093e61a6 RS |
1269 | echo "configure: failed program was:" >&5 |
1270 | cat conftest.$ac_ext >&5 | |
1271 | rm -rf conftest* | |
1272 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1273 | fi |
093e61a6 | 1274 | rm -f conftest* |
34a86c2b | 1275 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1276 | fi |
1277 | ||
093e61a6 RS |
1278 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1279 | ||
1280 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
6a1b7268 | 1281 | echo "configure:1282: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1282 | # On Suns, sometimes $CPP names a directory. |
1283 | if test -n "$CPP" && test -d "$CPP"; then | |
1284 | CPP= | |
1285 | fi | |
1286 | if test -z "$CPP"; then | |
093e61a6 RS |
1287 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1288 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1289 | else |
093e61a6 RS |
1290 | # This must be in double quotes, not single quotes, because CPP may get |
1291 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1292 | CPP="${CC-cc} -E" | |
84c041a1 | 1293 | # On the NeXT, cc -E runs the code through the compiler's parser, |
093e61a6 RS |
1294 | # not just through cpp. |
1295 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 1296 | #line 1297 "configure" |
093e61a6 RS |
1297 | #include "confdefs.h" |
1298 | #include <assert.h> | |
1299 | Syntax Error | |
1300 | EOF | |
1301 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 1302 | { (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1303 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1304 | if test -z "$ac_err"; then | |
84c041a1 ZW |
1305 | : |
1306 | else | |
093e61a6 RS |
1307 | echo "$ac_err" >&5 |
1308 | echo "configure: failed program was:" >&5 | |
1309 | cat conftest.$ac_ext >&5 | |
1310 | rm -rf conftest* | |
1311 | CPP="${CC-cc} -E -traditional-cpp" | |
1312 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 1313 | #line 1314 "configure" |
093e61a6 RS |
1314 | #include "confdefs.h" |
1315 | #include <assert.h> | |
1316 | Syntax Error | |
1317 | EOF | |
1318 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 1319 | { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1320 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1321 | if test -z "$ac_err"; then | |
1322 | : | |
cafe096b | 1323 | else |
093e61a6 RS |
1324 | echo "$ac_err" >&5 |
1325 | echo "configure: failed program was:" >&5 | |
1326 | cat conftest.$ac_ext >&5 | |
1327 | rm -rf conftest* | |
1328 | CPP="${CC-cc} -nologo -E" | |
1329 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 1330 | #line 1331 "configure" |
093e61a6 RS |
1331 | #include "confdefs.h" |
1332 | #include <assert.h> | |
1333 | Syntax Error | |
1334 | EOF | |
1335 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 1336 | { (eval echo configure:1337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1337 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1338 | if test -z "$ac_err"; then | |
1339 | : | |
cafe096b | 1340 | else |
093e61a6 RS |
1341 | echo "$ac_err" >&5 |
1342 | echo "configure: failed program was:" >&5 | |
1343 | cat conftest.$ac_ext >&5 | |
1344 | rm -rf conftest* | |
1345 | CPP=/lib/cpp | |
cafe096b | 1346 | fi |
093e61a6 | 1347 | rm -f conftest* |
cafe096b | 1348 | fi |
093e61a6 | 1349 | rm -f conftest* |
cafe096b | 1350 | fi |
093e61a6 RS |
1351 | rm -f conftest* |
1352 | ac_cv_prog_CPP="$CPP" | |
414d23ae | 1353 | fi |
093e61a6 | 1354 | CPP="$ac_cv_prog_CPP" |
414d23ae | 1355 | else |
093e61a6 | 1356 | ac_cv_prog_CPP="$CPP" |
414d23ae | 1357 | fi |
093e61a6 | 1358 | echo "$ac_t""$CPP" 1>&6 |
414d23ae | 1359 | |
093e61a6 | 1360 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
6a1b7268 | 1361 | echo "configure:1362: checking for inline" >&5 |
093e61a6 RS |
1362 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1363 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1364 | else |
1365 | ac_cv_c_inline=no | |
1366 | for ac_kw in inline __inline__ __inline; do | |
093e61a6 | 1367 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1368 | #line 1369 "configure" |
093e61a6 | 1369 | #include "confdefs.h" |
414d23ae | 1370 | |
093e61a6 RS |
1371 | int main() { |
1372 | } $ac_kw foo() { | |
1373 | ; return 0; } | |
1374 | EOF | |
6a1b7268 | 1375 | if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1376 | rm -rf conftest* |
414d23ae HPN |
1377 | ac_cv_c_inline=$ac_kw; break |
1378 | else | |
093e61a6 RS |
1379 | echo "configure: failed program was:" >&5 |
1380 | cat conftest.$ac_ext >&5 | |
414d23ae | 1381 | fi |
093e61a6 | 1382 | rm -f conftest* |
414d23ae HPN |
1383 | done |
1384 | ||
1385 | fi | |
093e61a6 RS |
1386 | |
1387 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1388 | case "$ac_cv_c_inline" in | |
414d23ae | 1389 | inline | yes) ;; |
093e61a6 RS |
1390 | no) cat >> confdefs.h <<\EOF |
1391 | #define inline | |
1392 | EOF | |
414d23ae | 1393 | ;; |
093e61a6 | 1394 | *) cat >> confdefs.h <<EOF |
414d23ae | 1395 | #define inline $ac_cv_c_inline |
093e61a6 | 1396 | EOF |
414d23ae HPN |
1397 | ;; |
1398 | esac | |
1399 | ||
093e61a6 | 1400 | echo $ac_n "checking for volatile""... $ac_c" 1>&6 |
6a1b7268 | 1401 | echo "configure:1402: checking for volatile" >&5 |
093e61a6 RS |
1402 | if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then |
1403 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1404 | else |
093e61a6 | 1405 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1406 | #line 1407 "configure" |
093e61a6 | 1407 | #include "confdefs.h" |
414d23ae | 1408 | |
093e61a6 | 1409 | int main() { |
414d23ae | 1410 | volatile int foo; |
093e61a6 RS |
1411 | ; return 0; } |
1412 | EOF | |
6a1b7268 | 1413 | if { (eval echo configure:1414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1414 | rm -rf conftest* |
414d23ae HPN |
1415 | gcc_cv_c_volatile=yes |
1416 | else | |
093e61a6 RS |
1417 | echo "configure: failed program was:" >&5 |
1418 | cat conftest.$ac_ext >&5 | |
1419 | rm -rf conftest* | |
1420 | gcc_cv_c_volatile=no | |
414d23ae | 1421 | fi |
093e61a6 | 1422 | rm -f conftest* |
414d23ae | 1423 | fi |
cafe096b | 1424 | |
093e61a6 RS |
1425 | echo "$ac_t""$gcc_cv_c_volatile" 1>&6 |
1426 | if test $gcc_cv_c_volatile = yes ; then | |
1427 | cat >> confdefs.h <<\EOF | |
414d23ae | 1428 | #define HAVE_VOLATILE 1 |
093e61a6 | 1429 | EOF |
414d23ae HPN |
1430 | |
1431 | fi | |
1432 | ||
1433 | ||
093e61a6 | 1434 | echo $ac_n "checking for long double""... $ac_c" 1>&6 |
6a1b7268 | 1435 | echo "configure:1436: checking for long double" >&5 |
093e61a6 RS |
1436 | if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then |
1437 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1438 | else |
1439 | if test "$GCC" = yes; then | |
1440 | gcc_cv_c_long_double=yes | |
1441 | else | |
093e61a6 | 1442 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1443 | #line 1444 "configure" |
093e61a6 | 1444 | #include "confdefs.h" |
414d23ae | 1445 | |
093e61a6 | 1446 | int main() { |
414d23ae HPN |
1447 | /* The Stardent Vistra knows sizeof(long double), but does not support it. */ |
1448 | long double foo = 0.0; | |
1449 | /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
1450 | switch (0) case 0: case (sizeof(long double) >= sizeof(double)):; | |
093e61a6 RS |
1451 | ; return 0; } |
1452 | EOF | |
6a1b7268 | 1453 | if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1454 | rm -rf conftest* |
414d23ae HPN |
1455 | gcc_cv_c_long_double=yes |
1456 | else | |
093e61a6 RS |
1457 | echo "configure: failed program was:" >&5 |
1458 | cat conftest.$ac_ext >&5 | |
1459 | rm -rf conftest* | |
1460 | gcc_cv_c_long_double=no | |
414d23ae | 1461 | fi |
093e61a6 | 1462 | rm -f conftest* |
414d23ae HPN |
1463 | fi |
1464 | fi | |
cafe096b | 1465 | |
093e61a6 RS |
1466 | echo "$ac_t""$gcc_cv_c_long_double" 1>&6 |
1467 | if test $gcc_cv_c_long_double = yes; then | |
1468 | cat >> confdefs.h <<\EOF | |
414d23ae | 1469 | #define HAVE_LONG_DOUBLE 1 |
093e61a6 | 1470 | EOF |
414d23ae HPN |
1471 | |
1472 | fi | |
1473 | ||
093e61a6 | 1474 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
6a1b7268 | 1475 | echo "configure:1476: checking for long long int" >&5 |
093e61a6 RS |
1476 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1477 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1478 | else |
093e61a6 | 1479 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1480 | #line 1481 "configure" |
093e61a6 | 1481 | #include "confdefs.h" |
414d23ae | 1482 | |
093e61a6 | 1483 | int main() { |
414d23ae | 1484 | long long int i; |
093e61a6 RS |
1485 | ; return 0; } |
1486 | EOF | |
6a1b7268 | 1487 | if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1488 | rm -rf conftest* |
414d23ae HPN |
1489 | ac_cv_c_long_long=yes |
1490 | else | |
093e61a6 RS |
1491 | echo "configure: failed program was:" >&5 |
1492 | cat conftest.$ac_ext >&5 | |
1493 | rm -rf conftest* | |
1494 | ac_cv_c_long_long=no | |
414d23ae | 1495 | fi |
093e61a6 | 1496 | rm -f conftest* |
414d23ae | 1497 | fi |
cafe096b | 1498 | |
093e61a6 RS |
1499 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1500 | if test $ac_cv_c_long_long = yes; then | |
1501 | cat >> confdefs.h <<\EOF | |
414d23ae | 1502 | #define HAVE_LONG_LONG 1 |
093e61a6 | 1503 | EOF |
414d23ae HPN |
1504 | |
1505 | fi | |
093e61a6 | 1506 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
6a1b7268 | 1507 | echo "configure:1508: checking for __int64" >&5 |
093e61a6 RS |
1508 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1509 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1510 | else | |
1511 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 1512 | #line 1513 "configure" |
093e61a6 | 1513 | #include "confdefs.h" |
414d23ae | 1514 | |
093e61a6 | 1515 | int main() { |
414d23ae | 1516 | __int64 i; |
093e61a6 RS |
1517 | ; return 0; } |
1518 | EOF | |
6a1b7268 | 1519 | if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1520 | rm -rf conftest* |
414d23ae HPN |
1521 | ac_cv_c___int64=yes |
1522 | else | |
093e61a6 RS |
1523 | echo "configure: failed program was:" >&5 |
1524 | cat conftest.$ac_ext >&5 | |
1525 | rm -rf conftest* | |
1526 | ac_cv_c___int64=no | |
414d23ae | 1527 | fi |
093e61a6 | 1528 | rm -f conftest* |
414d23ae | 1529 | fi |
cafe096b | 1530 | |
093e61a6 RS |
1531 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1532 | if test $ac_cv_c___int64 = yes; then | |
1533 | cat >> confdefs.h <<\EOF | |
414d23ae | 1534 | #define HAVE___INT64 1 |
093e61a6 | 1535 | EOF |
414d23ae HPN |
1536 | |
1537 | fi | |
1538 | ||
093e61a6 | 1539 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
6a1b7268 | 1540 | echo "configure:1541: checking for built-in _Bool" >&5 |
093e61a6 RS |
1541 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1542 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1543 | else |
093e61a6 | 1544 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1545 | #line 1546 "configure" |
093e61a6 | 1546 | #include "confdefs.h" |
414d23ae | 1547 | |
093e61a6 | 1548 | int main() { |
414d23ae | 1549 | _Bool foo; |
093e61a6 RS |
1550 | ; return 0; } |
1551 | EOF | |
6a1b7268 | 1552 | if { (eval echo configure:1553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1553 | rm -rf conftest* |
414d23ae HPN |
1554 | gcc_cv_c__bool=yes |
1555 | else | |
093e61a6 RS |
1556 | echo "configure: failed program was:" >&5 |
1557 | cat conftest.$ac_ext >&5 | |
1558 | rm -rf conftest* | |
1559 | gcc_cv_c__bool=no | |
414d23ae | 1560 | fi |
093e61a6 | 1561 | rm -f conftest* |
414d23ae | 1562 | |
cafe096b | 1563 | fi |
cafe096b | 1564 | |
093e61a6 RS |
1565 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1566 | if test $gcc_cv_c__bool = yes; then | |
1567 | cat >> confdefs.h <<\EOF | |
414d23ae | 1568 | #define HAVE__BOOL 1 |
093e61a6 | 1569 | EOF |
414d23ae HPN |
1570 | |
1571 | fi | |
1572 | ||
1573 | ||
1574 | # sizeof(char) is 1 by definition. | |
093e61a6 | 1575 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
6a1b7268 | 1576 | echo "configure:1577: checking size of short" >&5 |
093e61a6 RS |
1577 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1578 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1579 | else |
4977bab6 | 1580 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1581 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1582 | #line 1583 "configure" |
093e61a6 | 1583 | #include "confdefs.h" |
414d23ae HPN |
1584 | #include "confdefs.h" |
1585 | #include <sys/types.h> | |
1586 | ||
1587 | ||
093e61a6 | 1588 | int main() { |
414d23ae | 1589 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
093e61a6 RS |
1590 | ; return 0; } |
1591 | EOF | |
6a1b7268 | 1592 | if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1593 | rm -rf conftest* |
414d23ae HPN |
1594 | ac_cv_sizeof_short=$ac_size |
1595 | else | |
093e61a6 RS |
1596 | echo "configure: failed program was:" >&5 |
1597 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1598 | fi |
093e61a6 | 1599 | rm -f conftest* |
414d23ae HPN |
1600 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1601 | done | |
1602 | ||
84c041a1 | 1603 | fi |
414d23ae HPN |
1604 | |
1605 | if test x$ac_cv_sizeof_short = x ; then | |
093e61a6 | 1606 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1607 | fi |
093e61a6 RS |
1608 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1609 | cat >> confdefs.h <<EOF | |
414d23ae | 1610 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
093e61a6 | 1611 | EOF |
84c041a1 | 1612 | |
414d23ae | 1613 | |
093e61a6 | 1614 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
6a1b7268 | 1615 | echo "configure:1616: checking size of int" >&5 |
093e61a6 RS |
1616 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1618 | else |
4977bab6 | 1619 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1620 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1621 | #line 1622 "configure" |
093e61a6 | 1622 | #include "confdefs.h" |
414d23ae HPN |
1623 | #include "confdefs.h" |
1624 | #include <sys/types.h> | |
1625 | ||
75e93faa | 1626 | |
093e61a6 | 1627 | int main() { |
414d23ae | 1628 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
093e61a6 RS |
1629 | ; return 0; } |
1630 | EOF | |
6a1b7268 | 1631 | if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1632 | rm -rf conftest* |
414d23ae | 1633 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1634 | else |
093e61a6 RS |
1635 | echo "configure: failed program was:" >&5 |
1636 | cat conftest.$ac_ext >&5 | |
75e93faa | 1637 | fi |
093e61a6 | 1638 | rm -f conftest* |
414d23ae | 1639 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1640 | done |
1641 | ||
1642 | fi | |
1643 | ||
414d23ae | 1644 | if test x$ac_cv_sizeof_int = x ; then |
093e61a6 | 1645 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1646 | fi |
093e61a6 RS |
1647 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1648 | cat >> confdefs.h <<EOF | |
414d23ae | 1649 | #define SIZEOF_INT $ac_cv_sizeof_int |
093e61a6 | 1650 | EOF |
75e93faa | 1651 | |
414d23ae | 1652 | |
093e61a6 | 1653 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
6a1b7268 | 1654 | echo "configure:1655: checking size of long" >&5 |
093e61a6 RS |
1655 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1657 | else |
4977bab6 | 1658 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1659 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1660 | #line 1661 "configure" |
093e61a6 | 1661 | #include "confdefs.h" |
75e93faa | 1662 | #include "confdefs.h" |
414d23ae HPN |
1663 | #include <sys/types.h> |
1664 | ||
75e93faa | 1665 | |
093e61a6 | 1666 | int main() { |
414d23ae | 1667 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
093e61a6 RS |
1668 | ; return 0; } |
1669 | EOF | |
6a1b7268 | 1670 | if { (eval echo configure:1671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1671 | rm -rf conftest* |
414d23ae | 1672 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1673 | else |
093e61a6 RS |
1674 | echo "configure: failed program was:" >&5 |
1675 | cat conftest.$ac_ext >&5 | |
75e93faa | 1676 | fi |
093e61a6 | 1677 | rm -f conftest* |
414d23ae HPN |
1678 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1679 | done | |
75e93faa | 1680 | |
414d23ae | 1681 | fi |
75e93faa | 1682 | |
414d23ae | 1683 | if test x$ac_cv_sizeof_long = x ; then |
093e61a6 | 1684 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1685 | fi |
093e61a6 RS |
1686 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1687 | cat >> confdefs.h <<EOF | |
414d23ae | 1688 | #define SIZEOF_LONG $ac_cv_sizeof_long |
093e61a6 | 1689 | EOF |
75e93faa ZW |
1690 | |
1691 | ||
414d23ae | 1692 | if test $ac_cv_c_long_long = yes; then |
093e61a6 | 1693 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
6a1b7268 | 1694 | echo "configure:1695: checking size of long long" >&5 |
093e61a6 RS |
1695 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1696 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1697 | else |
4977bab6 | 1698 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1699 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1700 | #line 1701 "configure" |
093e61a6 | 1701 | #include "confdefs.h" |
414d23ae HPN |
1702 | #include "confdefs.h" |
1703 | #include <sys/types.h> | |
1704 | ||
04cabffc | 1705 | |
093e61a6 | 1706 | int main() { |
414d23ae | 1707 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
093e61a6 RS |
1708 | ; return 0; } |
1709 | EOF | |
6a1b7268 | 1710 | if { (eval echo configure:1711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1711 | rm -rf conftest* |
414d23ae | 1712 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1713 | else |
093e61a6 RS |
1714 | echo "configure: failed program was:" >&5 |
1715 | cat conftest.$ac_ext >&5 | |
04cabffc | 1716 | fi |
093e61a6 | 1717 | rm -f conftest* |
414d23ae HPN |
1718 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1719 | done | |
1720 | ||
04cabffc KG |
1721 | fi |
1722 | ||
414d23ae | 1723 | if test x$ac_cv_sizeof_long_long = x ; then |
093e61a6 | 1724 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1725 | fi |
093e61a6 RS |
1726 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1727 | cat >> confdefs.h <<EOF | |
414d23ae | 1728 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
093e61a6 | 1729 | EOF |
04cabffc | 1730 | |
04cabffc | 1731 | |
414d23ae HPN |
1732 | fi |
1733 | if test $ac_cv_c___int64 = yes; then | |
093e61a6 | 1734 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
6a1b7268 | 1735 | echo "configure:1736: checking size of __int64" >&5 |
093e61a6 RS |
1736 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1737 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1738 | else |
4977bab6 | 1739 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1740 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1741 | #line 1742 "configure" |
093e61a6 | 1742 | #include "confdefs.h" |
414d23ae HPN |
1743 | #include "confdefs.h" |
1744 | #include <sys/types.h> | |
1745 | ||
61842080 | 1746 | |
093e61a6 | 1747 | int main() { |
414d23ae | 1748 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
093e61a6 RS |
1749 | ; return 0; } |
1750 | EOF | |
6a1b7268 | 1751 | if { (eval echo configure:1752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1752 | rm -rf conftest* |
414d23ae | 1753 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1754 | else |
093e61a6 RS |
1755 | echo "configure: failed program was:" >&5 |
1756 | cat conftest.$ac_ext >&5 | |
75e93faa | 1757 | fi |
093e61a6 | 1758 | rm -f conftest* |
414d23ae HPN |
1759 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1760 | done | |
1761 | ||
75e93faa ZW |
1762 | fi |
1763 | ||
414d23ae | 1764 | if test x$ac_cv_sizeof___int64 = x ; then |
093e61a6 | 1765 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1766 | fi |
093e61a6 RS |
1767 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1768 | cat >> confdefs.h <<EOF | |
414d23ae | 1769 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
093e61a6 | 1770 | EOF |
414d23ae | 1771 | |
cafe096b | 1772 | |
cafe096b | 1773 | fi |
cafe096b | 1774 | |
093e61a6 | 1775 | echo $ac_n "checking execution character set""... $ac_c" 1>&6 |
6a1b7268 | 1776 | echo "configure:1777: checking execution character set" >&5 |
093e61a6 RS |
1777 | if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then |
1778 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 1779 | else |
093e61a6 | 1780 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1781 | #line 1782 "configure" |
093e61a6 | 1782 | #include "confdefs.h" |
414d23ae HPN |
1783 | #if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \ |
1784 | && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 | |
1785 | ASCII | |
1786 | #endif | |
093e61a6 | 1787 | EOF |
414d23ae | 1788 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1789 | egrep "ASCII" >/dev/null 2>&1; then |
1790 | rm -rf conftest* | |
414d23ae HPN |
1791 | ac_cv_c_charset=ASCII |
1792 | fi | |
1793 | rm -f conftest* | |
5c3bc9fb | 1794 | |
414d23ae | 1795 | if test x${ac_cv_c_charset+set} != xset; then |
093e61a6 | 1796 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 1797 | #line 1798 "configure" |
093e61a6 | 1798 | #include "confdefs.h" |
414d23ae HPN |
1799 | #if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \ |
1800 | && 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A | |
1801 | EBCDIC | |
1802 | #endif | |
093e61a6 | 1803 | EOF |
414d23ae | 1804 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
1805 | egrep "EBCDIC" >/dev/null 2>&1; then |
1806 | rm -rf conftest* | |
414d23ae HPN |
1807 | ac_cv_c_charset=EBCDIC |
1808 | fi | |
1809 | rm -f conftest* | |
1810 | ||
1811 | fi | |
1812 | if test x${ac_cv_c_charset+set} != xset; then | |
1813 | ac_cv_c_charset=unknown | |
1814 | fi | |
1815 | fi | |
093e61a6 RS |
1816 | |
1817 | echo "$ac_t""$ac_cv_c_charset" 1>&6 | |
414d23ae | 1818 | if test $ac_cv_c_charset = unknown; then |
093e61a6 | 1819 | { echo "configure: error: *** Cannot determine host character set." 1>&2; exit 1; } |
414d23ae | 1820 | elif test $ac_cv_c_charset = EBCDIC; then |
093e61a6 | 1821 | cat >> confdefs.h <<\EOF |
414d23ae | 1822 | #define HOST_EBCDIC 1 |
093e61a6 | 1823 | EOF |
414d23ae HPN |
1824 | |
1825 | fi | |
1826 | ||
34a86c2b NN |
1827 | # ----------------- |
1828 | # Find Ada compiler | |
1829 | # ----------------- | |
1830 | ||
1831 | # See if GNAT has been installed | |
093e61a6 RS |
1832 | if test $host != $build; then |
1833 | ac_tool_prefix=${host_alias}- | |
1834 | else | |
1835 | ac_tool_prefix= | |
1836 | fi | |
34a86c2b NN |
1837 | |
1838 | ||
093e61a6 | 1839 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1840 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
093e61a6 | 1841 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 1842 | echo "configure:1843: checking for $ac_word" >&5 |
093e61a6 RS |
1843 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1844 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1845 | else |
1846 | if test -n "$GNATBIND"; then | |
1847 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1848 | else | |
093e61a6 RS |
1849 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1850 | ac_dummy="$PATH" | |
1851 | for ac_dir in $ac_dummy; do | |
1852 | test -z "$ac_dir" && ac_dir=. | |
1853 | if test -f $ac_dir/$ac_word; then | |
1854 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1855 | break | |
1856 | fi | |
1857 | done | |
1858 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1859 | fi |
1860 | fi | |
093e61a6 | 1861 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1862 | if test -n "$GNATBIND"; then |
093e61a6 | 1863 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1864 | else |
093e61a6 | 1865 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1866 | fi |
1867 | ||
093e61a6 | 1868 | |
34a86c2b | 1869 | if test -z "$ac_cv_prog_GNATBIND"; then |
093e61a6 | 1870 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1871 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1872 | set dummy gnatbind; ac_word=$2 | |
093e61a6 | 1873 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 1874 | echo "configure:1875: checking for $ac_word" >&5 |
093e61a6 RS |
1875 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1876 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1877 | else |
093e61a6 RS |
1878 | if test -n "$GNATBIND"; then |
1879 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1880 | else |
093e61a6 RS |
1881 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1882 | ac_dummy="$PATH" | |
1883 | for ac_dir in $ac_dummy; do | |
1884 | test -z "$ac_dir" && ac_dir=. | |
1885 | if test -f $ac_dir/$ac_word; then | |
1886 | ac_cv_prog_GNATBIND="gnatbind" | |
1887 | break | |
1888 | fi | |
1889 | done | |
1890 | IFS="$ac_save_ifs" | |
1891 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1892 | fi |
1893 | fi | |
093e61a6 RS |
1894 | GNATBIND="$ac_cv_prog_GNATBIND" |
1895 | if test -n "$GNATBIND"; then | |
1896 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1897 | else |
093e61a6 | 1898 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1899 | fi |
1900 | ||
1901 | else | |
093e61a6 RS |
1902 | GNATBIND="no" |
1903 | fi | |
34a86c2b NN |
1904 | fi |
1905 | ||
093e61a6 | 1906 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 |
6a1b7268 | 1907 | echo "configure:1908: checking for compiler driver that understands Ada" >&5 |
093e61a6 RS |
1908 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1909 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1910 | else |
1911 | cat >conftest.adb <<EOF | |
1912 | procedure conftest is begin null; end conftest; | |
1913 | EOF | |
1914 | gcc_cv_prog_adac=no | |
1915 | # Have to do ac_tool_prefix and user overrides by hand. | |
1916 | for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ | |
1917 | ${ac_tool_prefix}gcc gcc \ | |
1918 | ${ac_tool_prefix}cc cc \ | |
1919 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1920 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1921 | ${ac_tool_prefix}adagcc adagcc \ | |
1922 | ${ac_tool_prefix}adacc adacc ; do | |
1923 | # There is a bug in all released versions of GCC which causes the | |
1924 | # driver to exit successfully when the appropriate language module | |
1925 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1926 | # Therefore we must check for the error message as well as an | |
1927 | # unsuccessful exit. | |
1928 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1929 | if test x"$errors" = x; then | |
1930 | gcc_cv_prog_adac=$cand | |
1931 | break | |
1932 | fi | |
1933 | done | |
1934 | rm -f conftest.* | |
1935 | fi | |
093e61a6 RS |
1936 | |
1937 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
34a86c2b NN |
1938 | ADAC=$gcc_cv_prog_adac |
1939 | ||
1940 | ||
1941 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1942 | have_gnat=yes | |
1943 | else | |
1944 | have_gnat=no | |
1945 | fi | |
1946 | ||
1947 | ||
093e61a6 RS |
1948 | if test x$have_gnat != xno ; then |
1949 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
6a1b7268 | 1950 | echo "configure:1951: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1951 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1952 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1953 | else |
1954 | cat >conftest.adb <<EOF | |
1955 | procedure conftest is begin null; end conftest; | |
1956 | EOF | |
1957 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1958 | ac_cv_prog_adac_no_long_long=yes | |
1959 | else | |
1960 | ac_cv_prog_adac_no_long_long=no | |
1961 | fi | |
1962 | rm -f conftest* | |
1963 | fi | |
093e61a6 RS |
1964 | |
1965 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
34a86c2b NN |
1966 | else |
1967 | ac_cv_prog_adac_no_long_long=yes | |
1968 | fi | |
1969 | ||
1970 | # --------------------- | |
1971 | # Warnings and checking | |
1972 | # --------------------- | |
1973 | ||
1974 | strict1_warn= | |
1975 | if test $ac_cv_prog_cc_no_long_long = yes && \ | |
1976 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
1977 | strict1_warn="-pedantic -Wno-long-long" | |
1978 | fi | |
1979 | ||
1980 | ||
093e61a6 | 1981 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1982 | # That's useful for people building cross-compilers, or just running a |
1983 | # quick `make'. | |
1984 | warn_cflags= | |
1985 | if test "x$GCC" = "xyes"; then | |
1986 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1987 | fi | |
1988 | ||
1989 | ||
dd859b8a KG |
1990 | # Enable -Werror in bootstrap stage2 and later. |
1991 | # Change the default to "no" on release branches. | |
1992 | # Check whether --enable-werror or --disable-werror was given. | |
1993 | if test "${enable_werror+set}" = set; then | |
1994 | enableval="$enable_werror" | |
093e61a6 | 1995 | : |
dd859b8a KG |
1996 | else |
1997 | enable_werror=yes | |
093e61a6 RS |
1998 | fi |
1999 | ||
dd859b8a KG |
2000 | if test x$enable_werror = xyes ; then |
2001 | WERROR=-Werror | |
2002 | fi | |
2003 | ||
2004 | ||
414d23ae HPN |
2005 | # Enable expensive internal checks |
2006 | # Check whether --enable-checking or --disable-checking was given. | |
2007 | if test "${enable_checking+set}" = set; then | |
2008 | enableval="$enable_checking" | |
2009 | ac_checking= | |
2010 | ac_tree_checking= | |
2011 | ac_rtl_checking= | |
2012 | ac_rtlflag_checking= | |
2013 | ac_gc_checking= | |
2014 | ac_gc_always_collect= | |
2015 | case "${enableval}" in | |
2016 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
2017 | ac_rtlflag_checking=1 ;; | |
2018 | no) ;; | |
2019 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
2020 | set fnord $enableval; shift | |
2021 | IFS="$ac_save_IFS" | |
2022 | for check | |
2023 | do | |
2024 | case $check in | |
2025 | misc) ac_checking=1 ;; | |
2026 | tree) ac_tree_checking=1 ;; | |
2027 | rtlflag) ac_rtlflag_checking=1 ;; | |
2028 | rtl) ac_rtl_checking=1 ;; | |
2029 | gc) ac_gc_checking=1 ;; | |
2030 | gcac) ac_gc_always_collect=1 ;; | |
2031 | valgrind) ac_checking_valgrind=1 ;; | |
093e61a6 | 2032 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
2033 | esac |
2034 | done | |
2035 | ;; | |
2036 | esac | |
2037 | ||
75e93faa | 2038 | else |
414d23ae HPN |
2039 | # Enable some checks by default for development versions of GCC |
2040 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
093e61a6 RS |
2041 | fi |
2042 | ||
414d23ae HPN |
2043 | nocommon_flag="" |
2044 | if test x$ac_checking != x ; then | |
093e61a6 | 2045 | cat >> confdefs.h <<\EOF |
414d23ae | 2046 | #define ENABLE_CHECKING 1 |
093e61a6 | 2047 | EOF |
75e93faa | 2048 | |
414d23ae HPN |
2049 | nocommon_flag=-fno-common |
2050 | fi | |
827ae6cf | 2051 | |
414d23ae | 2052 | if test x$ac_tree_checking != x ; then |
093e61a6 | 2053 | cat >> confdefs.h <<\EOF |
414d23ae | 2054 | #define ENABLE_TREE_CHECKING 1 |
093e61a6 | 2055 | EOF |
827ae6cf RO |
2056 | |
2057 | fi | |
414d23ae | 2058 | if test x$ac_rtl_checking != x ; then |
093e61a6 | 2059 | cat >> confdefs.h <<\EOF |
414d23ae | 2060 | #define ENABLE_RTL_CHECKING 1 |
093e61a6 | 2061 | EOF |
827ae6cf | 2062 | |
414d23ae HPN |
2063 | fi |
2064 | if test x$ac_rtlflag_checking != x ; then | |
093e61a6 | 2065 | cat >> confdefs.h <<\EOF |
414d23ae | 2066 | #define ENABLE_RTL_FLAG_CHECKING 1 |
093e61a6 | 2067 | EOF |
827ae6cf RO |
2068 | |
2069 | fi | |
414d23ae | 2070 | if test x$ac_gc_checking != x ; then |
093e61a6 | 2071 | cat >> confdefs.h <<\EOF |
414d23ae | 2072 | #define ENABLE_GC_CHECKING 1 |
093e61a6 | 2073 | EOF |
827ae6cf | 2074 | |
414d23ae HPN |
2075 | fi |
2076 | if test x$ac_gc_always_collect != x ; then | |
093e61a6 | 2077 | cat >> confdefs.h <<\EOF |
414d23ae | 2078 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
093e61a6 | 2079 | EOF |
75e93faa | 2080 | |
414d23ae HPN |
2081 | fi |
2082 | valgrind_path_defines= | |
2083 | valgrind_command= | |
2084 | if test x$ac_checking_valgrind != x ; then | |
2085 | # It is certainly possible that there's valgrind but no valgrind.h. | |
2086 | # GCC relies on making annotations so we must have both. | |
093e61a6 | 2087 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 |
6a1b7268 | 2088 | echo "configure:2089: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 |
093e61a6 | 2089 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2090 | #line 2091 "configure" |
093e61a6 | 2091 | #include "confdefs.h" |
14011ca4 AJ |
2092 | #include <memcheck.h> |
2093 | #ifndef VALGRIND_DISCARD | |
2094 | #error VALGRIND_DISCARD not defined | |
2095 | #endif | |
093e61a6 RS |
2096 | EOF |
2097 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 2098 | { (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2099 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2100 | if test -z "$ac_err"; then | |
2101 | rm -rf conftest* | |
14011ca4 AJ |
2102 | gcc_cv_header_memcheck_h=yes |
2103 | else | |
093e61a6 RS |
2104 | echo "$ac_err" >&5 |
2105 | echo "configure: failed program was:" >&5 | |
2106 | cat conftest.$ac_ext >&5 | |
2107 | rm -rf conftest* | |
cafe096b EC |
2108 | gcc_cv_header_memcheck_h=no |
2109 | fi | |
cafe096b | 2110 | rm -f conftest* |
093e61a6 RS |
2111 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 |
2112 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2113 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
6a1b7268 | 2114 | echo "configure:2115: checking for valgrind.h" >&5 |
093e61a6 RS |
2115 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2116 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2117 | else | |
2118 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 2119 | #line 2120 "configure" |
093e61a6 RS |
2120 | #include "confdefs.h" |
2121 | #include <valgrind.h> | |
2122 | EOF | |
2123 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 2124 | { (eval echo configure:2125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2125 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2126 | if test -z "$ac_err"; then | |
2127 | rm -rf conftest* | |
2128 | eval "ac_cv_header_$ac_safe=yes" | |
2129 | else | |
2130 | echo "$ac_err" >&5 | |
2131 | echo "configure: failed program was:" >&5 | |
2132 | cat conftest.$ac_ext >&5 | |
2133 | rm -rf conftest* | |
2134 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa | 2135 | fi |
093e61a6 | 2136 | rm -f conftest* |
414d23ae | 2137 | fi |
093e61a6 RS |
2138 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2139 | echo "$ac_t""yes" 1>&6 | |
414d23ae HPN |
2140 | have_valgrind_h=yes |
2141 | else | |
093e61a6 RS |
2142 | echo "$ac_t""no" 1>&6 |
2143 | have_valgrind_h=no | |
75e93faa ZW |
2144 | fi |
2145 | ||
414d23ae HPN |
2146 | # Extract the first word of "valgrind", so it can be a program name with args. |
2147 | set dummy valgrind; ac_word=$2 | |
093e61a6 | 2148 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2149 | echo "configure:2150: checking for $ac_word" >&5 |
093e61a6 RS |
2150 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2151 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2152 | else |
2153 | case "$valgrind_path" in | |
2154 | /*) | |
2155 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2156 | ;; | |
2157 | *) | |
2158 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2159 | for ac_dir in $PATH; do | |
2160 | test -z "$ac_dir" && ac_dir=. | |
2161 | if test -f $ac_dir/$ac_word; then | |
2162 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2163 | ac_cv_path_valgrind_path="$ac_dir/$ac_word" | |
2164 | break | |
2165 | fi | |
2166 | fi | |
2167 | done | |
2168 | IFS="$ac_save_ifs" | |
2169 | ;; | |
2170 | esac | |
75e93faa | 2171 | fi |
414d23ae HPN |
2172 | valgrind_path="$ac_cv_path_valgrind_path" |
2173 | if test -n "$valgrind_path"; then | |
093e61a6 | 2174 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2175 | else |
093e61a6 | 2176 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2177 | fi |
2178 | ||
72bd67f9 | 2179 | if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then |
093e61a6 | 2180 | { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; } |
414d23ae HPN |
2181 | fi |
2182 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2183 | valgrind_command="$valgrind_path -q" | |
093e61a6 | 2184 | cat >> confdefs.h <<\EOF |
414d23ae | 2185 | #define ENABLE_VALGRIND_CHECKING 1 |
093e61a6 | 2186 | EOF |
75e93faa | 2187 | |
14011ca4 | 2188 | if test $gcc_cv_header_memcheck_h = yes; then |
093e61a6 | 2189 | cat >> confdefs.h <<\EOF |
14011ca4 | 2190 | #define HAVE_MEMCHECK_H 1 |
093e61a6 | 2191 | EOF |
14011ca4 AJ |
2192 | |
2193 | fi | |
414d23ae | 2194 | fi |
75e93faa | 2195 | |
75e93faa ZW |
2196 | |
2197 | ||
414d23ae HPN |
2198 | # Enable code coverage collection |
2199 | # Check whether --enable-coverage or --disable-coverage was given. | |
2200 | if test "${enable_coverage+set}" = set; then | |
2201 | enableval="$enable_coverage" | |
2202 | case "${enableval}" in | |
2203 | yes|noopt) | |
eb70d86d | 2204 | coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1" |
414d23ae HPN |
2205 | ;; |
2206 | opt) | |
eb70d86d | 2207 | coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2" |
414d23ae HPN |
2208 | ;; |
2209 | *) | |
093e61a6 | 2210 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2211 | ;; |
2212 | esac | |
75e93faa | 2213 | else |
414d23ae | 2214 | coverage_flags="" |
093e61a6 RS |
2215 | fi |
2216 | ||
5c3bc9fb | 2217 | |
414d23ae | 2218 | |
73458fb7 NN |
2219 | # ------------------------------- |
2220 | # Miscenalleous configure options | |
2221 | # ------------------------------- | |
34a86c2b NN |
2222 | |
2223 | # With stabs | |
2224 | # Check whether --with-stabs or --without-stabs was given. | |
2225 | if test "${with_stabs+set}" = set; then | |
2226 | withval="$with_stabs" | |
2227 | stabs="$with_stabs" | |
2228 | else | |
2229 | stabs=no | |
093e61a6 | 2230 | fi |
34a86c2b | 2231 | |
cafe096b | 2232 | |
093e61a6 | 2233 | # With ELF |
34a86c2b NN |
2234 | # Check whether --with-elf or --without-elf was given. |
2235 | if test "${with_elf+set}" = set; then | |
2236 | withval="$with_elf" | |
2237 | elf="$with_elf" | |
2238 | else | |
2239 | elf=no | |
093e61a6 RS |
2240 | fi |
2241 | ||
34a86c2b NN |
2242 | |
2243 | # Determine whether or not multilibs are enabled. | |
2244 | # Check whether --enable-multilib or --disable-multilib was given. | |
2245 | if test "${enable_multilib+set}" = set; then | |
2246 | enableval="$enable_multilib" | |
093e61a6 | 2247 | : |
34a86c2b NN |
2248 | else |
2249 | enable_multilib=yes | |
093e61a6 RS |
2250 | fi |
2251 | ||
75e93faa | 2252 | |
34a86c2b | 2253 | |
414d23ae HPN |
2254 | # Enable __cxa_atexit for C++. |
2255 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2256 | if test "${enable___cxa_atexit+set}" = set; then | |
2257 | enableval="$enable___cxa_atexit" | |
093e61a6 RS |
2258 | : |
2259 | fi | |
75e93faa ZW |
2260 | |
2261 | ||
414d23ae HPN |
2262 | # Enable Multibyte Characters for C/C++ |
2263 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
2264 | if test "${enable_c_mbchar+set}" = set; then | |
2265 | enableval="$enable_c_mbchar" | |
2266 | if test x$enable_c_mbchar != xno; then | |
093e61a6 | 2267 | cat >> confdefs.h <<\EOF |
414d23ae | 2268 | #define MULTIBYTE_CHARS 1 |
093e61a6 | 2269 | EOF |
414d23ae HPN |
2270 | |
2271 | fi | |
093e61a6 | 2272 | fi |
75e93faa | 2273 | |
093e61a6 | 2274 | |
414d23ae HPN |
2275 | # Enable threads |
2276 | # Pass with no value to take the default | |
2277 | # Pass with a value to specify a thread package | |
2278 | # Check whether --enable-threads or --disable-threads was given. | |
2279 | if test "${enable_threads+set}" = set; then | |
2280 | enableval="$enable_threads" | |
093e61a6 | 2281 | : |
414d23ae HPN |
2282 | else |
2283 | enable_threads='' | |
093e61a6 RS |
2284 | fi |
2285 | ||
414d23ae HPN |
2286 | |
2287 | enable_threads_flag=$enable_threads | |
2288 | # Check if a valid thread package | |
2289 | case x${enable_threads_flag} in | |
2290 | x | xno) | |
2291 | # No threads | |
2292 | target_thread_file='single' | |
2293 | ;; | |
2294 | xyes) | |
2295 | # default | |
2296 | target_thread_file='' | |
2297 | ;; | |
2298 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
6d412a7b | 2299 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat) |
414d23ae HPN |
2300 | target_thread_file=$enable_threads_flag |
2301 | ;; | |
2302 | *) | |
2303 | echo "$enable_threads is an unknown thread package" 1>&2 | |
2304 | exit 1 | |
2305 | ;; | |
2306 | esac | |
2307 | ||
2308 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2309 | if test "${enable_objc_gc+set}" = set; then | |
2310 | enableval="$enable_objc_gc" | |
2311 | if test x$enable_objc_gc = xno; then | |
2312 | objc_boehm_gc='' | |
2313 | else | |
2314 | objc_boehm_gc=1 | |
2315 | fi | |
2316 | else | |
2317 | objc_boehm_gc='' | |
093e61a6 | 2318 | fi |
75e93faa ZW |
2319 | |
2320 | ||
414d23ae HPN |
2321 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2322 | if test "${with_dwarf2+set}" = set; then | |
2323 | withval="$with_dwarf2" | |
2324 | dwarf2="$with_dwarf2" | |
75e93faa | 2325 | else |
414d23ae | 2326 | dwarf2=no |
093e61a6 RS |
2327 | fi |
2328 | ||
75e93faa | 2329 | |
414d23ae HPN |
2330 | # Check whether --enable-shared or --disable-shared was given. |
2331 | if test "${enable_shared+set}" = set; then | |
2332 | enableval="$enable_shared" | |
093e61a6 | 2333 | |
414d23ae HPN |
2334 | case $enable_shared in |
2335 | yes | no) ;; | |
2336 | *) | |
2337 | enable_shared=no | |
2338 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2339 | for pkg in $enableval; do | |
2340 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2341 | enable_shared=yes | |
2342 | fi | |
2343 | done | |
2344 | IFS="$ac_save_ifs" | |
2345 | ;; | |
2346 | esac | |
2347 | ||
75e93faa | 2348 | else |
414d23ae | 2349 | enable_shared=yes |
093e61a6 | 2350 | fi |
75e93faa | 2351 | |
75e93faa | 2352 | |
75e93faa | 2353 | |
4977bab6 ZW |
2354 | # Check whether --with-sysroot or --without-sysroot was given. |
2355 | if test "${with_sysroot+set}" = set; then | |
2356 | withval="$with_sysroot" | |
093e61a6 | 2357 | |
4977bab6 | 2358 | case ${with_sysroot} in |
91710e62 | 2359 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
4977bab6 ZW |
2360 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2361 | esac | |
093e61a6 | 2362 | |
4977bab6 ZW |
2363 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2364 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2365 | ||
047d636f DJ |
2366 | if test "x$exec_prefix" = xNONE; then |
2367 | if test "x$prefix" = xNONE; then | |
2368 | test_prefix=/usr/local | |
2369 | else | |
2370 | test_prefix=$prefix | |
2371 | fi | |
2372 | else | |
2373 | test_prefix=$exec_prefix | |
2374 | fi | |
2375 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2376 | "${test_prefix}"|"${test_prefix}/"*|\ |
2377 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2378 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2379 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2380 | ;; | |
2381 | esac | |
2382 | ||
4977bab6 | 2383 | else |
093e61a6 | 2384 | |
4977bab6 | 2385 | TARGET_SYSTEM_ROOT= |
db720d9a | 2386 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2387 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2388 | ||
093e61a6 RS |
2389 | fi |
2390 | ||
4977bab6 ZW |
2391 | |
2392 | ||
2393 | ||
2394 | ||
73458fb7 NN |
2395 | # ------------------------- |
2396 | # Checks for other programs | |
2397 | # ------------------------- | |
5b67ad6f | 2398 | |
093e61a6 | 2399 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
6a1b7268 | 2400 | echo "configure:2401: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
093e61a6 RS |
2401 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2402 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2403 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2404 | else |
093e61a6 | 2405 | cat > conftestmake <<\EOF |
e9a25f70 | 2406 | all: |
093e61a6 RS |
2407 | @echo 'ac_maketemp="${MAKE}"' |
2408 | EOF | |
e9a25f70 | 2409 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
093e61a6 | 2410 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2411 | if test -n "$ac_maketemp"; then |
2412 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2413 | else | |
2414 | eval ac_cv_prog_make_${ac_make}_set=no | |
2415 | fi | |
093e61a6 | 2416 | rm -f conftestmake |
e9a25f70 JL |
2417 | fi |
2418 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
093e61a6 | 2419 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2420 | SET_MAKE= |
2421 | else | |
093e61a6 | 2422 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2423 | SET_MAKE="MAKE=${MAKE-make}" |
2424 | fi | |
2425 | ||
2426 | ||
861bb6c1 | 2427 | # Find some useful tools |
2121a768 | 2428 | for ac_prog in mawk gawk nawk awk |
861bb6c1 | 2429 | do |
093e61a6 | 2430 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2431 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 2432 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2433 | echo "configure:2434: checking for $ac_word" >&5 |
093e61a6 RS |
2434 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2435 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2436 | else |
2437 | if test -n "$AWK"; then | |
2438 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2439 | else | |
093e61a6 RS |
2440 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2441 | ac_dummy="$PATH" | |
2442 | for ac_dir in $ac_dummy; do | |
2443 | test -z "$ac_dir" && ac_dir=. | |
2444 | if test -f $ac_dir/$ac_word; then | |
2445 | ac_cv_prog_AWK="$ac_prog" | |
2446 | break | |
2447 | fi | |
2448 | done | |
2449 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2450 | fi |
2451 | fi | |
093e61a6 | 2452 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2453 | if test -n "$AWK"; then |
093e61a6 | 2454 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2455 | else |
093e61a6 | 2456 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2457 | fi |
2458 | ||
093e61a6 | 2459 | test -n "$AWK" && break |
861bb6c1 JL |
2460 | done |
2461 | ||
093e61a6 | 2462 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
6a1b7268 | 2463 | echo "configure:2464: checking whether ln works" >&5 |
093e61a6 RS |
2464 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2465 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2466 | else |
2467 | rm -f conftestdata_t | |
2468 | echo >conftestdata_f | |
2469 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2470 | then | |
2471 | gcc_cv_prog_LN="ln" | |
2472 | else | |
2473 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2474 | then | |
2475 | gcc_cv_prog_LN="ln -s" | |
2476 | else | |
2477 | gcc_cv_prog_LN=cp | |
2478 | fi | |
2479 | fi | |
2480 | rm -f conftestdata_f conftestdata_t | |
2481 | ||
2482 | fi | |
2483 | LN="$gcc_cv_prog_LN" | |
2484 | if test "$gcc_cv_prog_LN" = "ln"; then | |
093e61a6 | 2485 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2486 | else |
2487 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
093e61a6 | 2488 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2489 | else |
093e61a6 | 2490 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2491 | fi |
2492 | fi | |
2493 | ||
093e61a6 | 2494 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
6a1b7268 | 2495 | echo "configure:2496: checking whether ln -s works" >&5 |
093e61a6 RS |
2496 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2497 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2498 | else |
2499 | rm -f conftestdata_t | |
2500 | echo >conftestdata_f | |
2501 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2502 | then | |
2503 | gcc_cv_prog_LN_S="ln -s" | |
2504 | else | |
2505 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2506 | then | |
2507 | gcc_cv_prog_LN_S=ln | |
2508 | else | |
2509 | gcc_cv_prog_LN_S=cp | |
2510 | fi | |
2511 | fi | |
2512 | rm -f conftestdata_f conftestdata_t | |
2513 | ||
2514 | fi | |
2515 | LN_S="$gcc_cv_prog_LN_S" | |
2516 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
093e61a6 | 2517 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2518 | else |
2519 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
093e61a6 | 2520 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2521 | else |
093e61a6 | 2522 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2523 | fi |
2524 | fi | |
2525 | ||
093e61a6 RS |
2526 | # Extract the first word of "ranlib", so it can be a program name with args. |
2527 | set dummy ranlib; ac_word=$2 | |
2528 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
6a1b7268 | 2529 | echo "configure:2530: checking for $ac_word" >&5 |
093e61a6 RS |
2530 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2531 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2532 | else |
2533 | if test -n "$RANLIB"; then | |
2534 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2535 | else | |
093e61a6 RS |
2536 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2537 | ac_dummy="$PATH" | |
2538 | for ac_dir in $ac_dummy; do | |
2539 | test -z "$ac_dir" && ac_dir=. | |
2540 | if test -f $ac_dir/$ac_word; then | |
2541 | ac_cv_prog_RANLIB="ranlib" | |
2542 | break | |
2543 | fi | |
2544 | done | |
2545 | IFS="$ac_save_ifs" | |
2546 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
861bb6c1 JL |
2547 | fi |
2548 | fi | |
093e61a6 | 2549 | RANLIB="$ac_cv_prog_RANLIB" |
861bb6c1 | 2550 | if test -n "$RANLIB"; then |
093e61a6 | 2551 | echo "$ac_t""$RANLIB" 1>&6 |
cafe096b | 2552 | else |
093e61a6 | 2553 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2554 | fi |
2555 | ||
0a4b6309 RL |
2556 | # Find a good install program. We prefer a C program (faster), |
2557 | # so one script is as good as another. But avoid the broken or | |
2558 | # incompatible versions: | |
2559 | # SysV /etc/install, /usr/sbin/install | |
2560 | # SunOS /usr/etc/install | |
2561 | # IRIX /sbin/install | |
2562 | # AIX /bin/install | |
2563 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2564 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2565 | # ./install, which can be erroneously created by make from ./install.sh. | |
093e61a6 | 2566 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
6a1b7268 | 2567 | echo "configure:2568: checking for a BSD compatible install" >&5 |
0a4b6309 | 2568 | if test -z "$INSTALL"; then |
093e61a6 RS |
2569 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2570 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2571 | else |
2572 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2573 | for ac_dir in $PATH; do | |
2574 | # Account for people who put trailing slashes in PATH elements. | |
2575 | case "$ac_dir/" in | |
2576 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2577 | *) | |
2578 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2579 | for ac_prog in ginstall scoinst install; do | |
2580 | if test -f $ac_dir/$ac_prog; then | |
2581 | if test $ac_prog = install && | |
2582 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2583 | # AIX install. It has an incompatible calling convention. | |
2584 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2585 | : | |
2586 | else | |
2587 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2588 | break 2 | |
2589 | fi | |
2590 | fi | |
2591 | done | |
2592 | ;; | |
2593 | esac | |
2594 | done | |
2595 | IFS="$ac_save_IFS" | |
2596 | ||
2597 | fi | |
2598 | if test "${ac_cv_path_install+set}" = set; then | |
2599 | INSTALL="$ac_cv_path_install" | |
2600 | else | |
2601 | # As a last resort, use the slow shell script. We don't cache a | |
2602 | # path for INSTALL within a source directory, because that will | |
2603 | # break other packages using the cache if that directory is | |
2604 | # removed, or if the path is relative. | |
2605 | INSTALL="$ac_install_sh" | |
2606 | fi | |
2607 | fi | |
093e61a6 | 2608 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2609 | |
2610 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2611 | # It thinks the first close brace ends the variable substitution. | |
2612 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2613 | ||
2614 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2615 | ||
861bb6c1 | 2616 | |
73458fb7 NN |
2617 | # See if we have the mktemp command. |
2618 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2619 | set dummy mktemp; ac_word=$2 | |
093e61a6 | 2620 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2621 | echo "configure:2622: checking for $ac_word" >&5 |
093e61a6 RS |
2622 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2623 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2624 | else |
2625 | if test -n "$have_mktemp_command"; then | |
2626 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2627 | else | |
093e61a6 RS |
2628 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2629 | ac_dummy="$PATH" | |
2630 | for ac_dir in $ac_dummy; do | |
2631 | test -z "$ac_dir" && ac_dir=. | |
2632 | if test -f $ac_dir/$ac_word; then | |
2633 | ac_cv_prog_have_mktemp_command="yes" | |
2634 | break | |
2635 | fi | |
2636 | done | |
2637 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2638 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2639 | fi | |
2640 | fi | |
093e61a6 | 2641 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2642 | if test -n "$have_mktemp_command"; then |
093e61a6 | 2643 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2644 | else |
093e61a6 | 2645 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2646 | fi |
2647 | ||
2648 | ||
2649 | # Do we have a single-tree copy of texinfo? | |
2650 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2651 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2652 | gcc_cv_prog_makeinfo_modern=yes | |
093e61a6 | 2653 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2654 | else |
2655 | # See if makeinfo has been installed and is modern enough | |
2656 | # that we can use it. | |
2657 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2658 | set dummy makeinfo; ac_word=$2 | |
093e61a6 | 2659 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2660 | echo "configure:2661: checking for $ac_word" >&5 |
093e61a6 RS |
2661 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2662 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2663 | else |
2664 | if test -n "$MAKEINFO"; then | |
2665 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2666 | else | |
093e61a6 RS |
2667 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2668 | ac_dummy="$PATH" | |
2669 | for ac_dir in $ac_dummy; do | |
2670 | test -z "$ac_dir" && ac_dir=. | |
2671 | if test -f $ac_dir/$ac_word; then | |
2672 | ac_cv_prog_MAKEINFO="makeinfo" | |
2673 | break | |
2674 | fi | |
2675 | done | |
2676 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2677 | fi |
2678 | fi | |
093e61a6 | 2679 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2680 | if test -n "$MAKEINFO"; then |
093e61a6 | 2681 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2682 | else |
093e61a6 | 2683 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2684 | fi |
2685 | ||
2686 | if test -n "$MAKEINFO"; then | |
2687 | # Found it, now check the version. | |
093e61a6 | 2688 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
6a1b7268 | 2689 | echo "configure:2690: checking for modern makeinfo" >&5 |
093e61a6 RS |
2690 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2691 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2692 | else |
2693 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2694 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
6a1b7268 | 2695 | echo "configure:2696: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2696 | case $ac_prog_version in |
2697 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2698 | 4.[2-9]*) | |
2699 | gcc_cv_prog_makeinfo_modern=yes;; | |
2700 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2701 | esac | |
2702 | ||
2703 | fi | |
093e61a6 RS |
2704 | |
2705 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2706 | else |
2707 | gcc_cv_prog_makeinfo_modern=no | |
2708 | fi | |
2709 | ||
2710 | fi | |
2711 | ||
2712 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
093e61a6 | 2713 | echo "configure: warning: |
cafe096b | 2714 | *** Makeinfo is missing or too old. |
093e61a6 | 2715 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2716 | BUILD_INFO= |
2717 | else | |
093e61a6 | 2718 | BUILD_INFO=info |
73458fb7 NN |
2719 | fi |
2720 | ||
2721 | # Is pod2man recent enough to regenerate manpages? | |
093e61a6 | 2722 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
6a1b7268 | 2723 | echo "configure:2724: checking for recent Pod::Man" >&5 |
73458fb7 | 2724 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
093e61a6 RS |
2725 | echo "$ac_t""yes" 1>&6 |
2726 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2727 | else |
093e61a6 | 2728 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2729 | GENERATED_MANPAGES= |
2730 | fi | |
2731 | ||
baade80b PE |
2732 | # 'make compare' can be significantly faster, if cmp itself can |
2733 | # skip bytes instead of using tail. The test being performed is | |
2734 | # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" | |
2735 | # but we need to sink errors and handle broken shells. | |
093e61a6 | 2736 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 |
6a1b7268 | 2737 | echo "configure:2738: checking for cmp's capabilities" >&5 |
baade80b PE |
2738 | echo abfoo >t1 |
2739 | echo cdfoo >t2 | |
2740 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
2741 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
2742 | make_compare_target=slowcompare | |
2743 | else | |
2744 | make_compare_target=gnucompare | |
2745 | fi | |
c7a5cf61 PE |
2746 | else |
2747 | make_compare_target=slowcompare | |
2748 | fi | |
baade80b | 2749 | rm t1 t2 |
c7a5cf61 | 2750 | |
093e61a6 | 2751 | echo "$ac_t""$make_compare_target" 1>&6 |
c7a5cf61 | 2752 | |
73458fb7 NN |
2753 | # How about lex? |
2754 | if test -f $srcdir/../flex/skel.c; then | |
2755 | FLEX='$(objdir)/../flex/flex' | |
2756 | else | |
2757 | # Extract the first word of "flex", so it can be a program name with args. | |
2758 | set dummy flex; ac_word=$2 | |
093e61a6 | 2759 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2760 | echo "configure:2761: checking for $ac_word" >&5 |
093e61a6 RS |
2761 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2762 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2763 | else |
2764 | if test -n "$FLEX"; then | |
2765 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2766 | else | |
093e61a6 RS |
2767 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2768 | ac_dummy="$PATH" | |
2769 | for ac_dir in $ac_dummy; do | |
2770 | test -z "$ac_dir" && ac_dir=. | |
2771 | if test -f $ac_dir/$ac_word; then | |
2772 | ac_cv_prog_FLEX="flex" | |
2773 | break | |
2774 | fi | |
2775 | done | |
2776 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2777 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2778 | fi | |
2779 | fi | |
093e61a6 | 2780 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2781 | if test -n "$FLEX"; then |
093e61a6 | 2782 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2783 | else |
093e61a6 | 2784 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2785 | fi |
2786 | ||
2787 | fi | |
2788 | ||
2789 | # Bison? | |
2790 | # The -L switch is so bison can find its skeleton file. | |
2791 | if test -f $srcdir/../bison/bison.simple; then | |
2792 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2793 | else | |
2794 | # Extract the first word of "bison", so it can be a program name with args. | |
2795 | set dummy bison; ac_word=$2 | |
093e61a6 | 2796 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 2797 | echo "configure:2798: checking for $ac_word" >&5 |
093e61a6 RS |
2798 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2800 | else |
2801 | if test -n "$BISON"; then | |
2802 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2803 | else | |
093e61a6 RS |
2804 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2805 | ac_dummy="$PATH" | |
2806 | for ac_dir in $ac_dummy; do | |
2807 | test -z "$ac_dir" && ac_dir=. | |
2808 | if test -f $ac_dir/$ac_word; then | |
2809 | ac_cv_prog_BISON="bison" | |
2810 | break | |
2811 | fi | |
2812 | done | |
2813 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2814 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2815 | fi | |
2816 | fi | |
093e61a6 | 2817 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2818 | if test -n "$BISON"; then |
093e61a6 | 2819 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2820 | else |
093e61a6 | 2821 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2822 | fi |
2823 | ||
2824 | fi | |
2825 | ||
2826 | # -------------------- | |
2827 | # Checks for C headers | |
2828 | # -------------------- | |
2829 | ||
093e61a6 | 2830 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
6a1b7268 | 2831 | echo "configure:2832: checking for GNU C library" >&5 |
093e61a6 RS |
2832 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2833 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2834 | else | |
2835 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 2836 | #line 2837 "configure" |
093e61a6 | 2837 | #include "confdefs.h" |
73458fb7 | 2838 | #include <features.h> |
093e61a6 | 2839 | int main() { |
73458fb7 NN |
2840 | |
2841 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2842 | #error Not a GNU C library system | |
2843 | #endif | |
093e61a6 RS |
2844 | ; return 0; } |
2845 | EOF | |
6a1b7268 | 2846 | if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2847 | rm -rf conftest* |
73458fb7 NN |
2848 | gcc_cv_glibc=yes |
2849 | else | |
093e61a6 RS |
2850 | echo "configure: failed program was:" >&5 |
2851 | cat conftest.$ac_ext >&5 | |
2852 | rm -rf conftest* | |
2853 | gcc_cv_glibc=no | |
73458fb7 | 2854 | fi |
093e61a6 | 2855 | rm -f conftest* |
73458fb7 NN |
2856 | fi |
2857 | ||
093e61a6 | 2858 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2859 | if test $gcc_cv_glibc = yes; then |
093e61a6 | 2860 | cat >> confdefs.h <<\EOF |
73458fb7 | 2861 | #define _GNU_SOURCE 1 |
093e61a6 | 2862 | EOF |
73458fb7 NN |
2863 | |
2864 | fi | |
2865 | ||
093e61a6 | 2866 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
6a1b7268 | 2867 | echo "configure:2868: checking for ANSI C header files" >&5 |
093e61a6 RS |
2868 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2869 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2870 | else |
093e61a6 | 2871 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2872 | #line 2873 "configure" |
093e61a6 | 2873 | #include "confdefs.h" |
956d6950 JL |
2874 | #include <stdlib.h> |
2875 | #include <stdarg.h> | |
2876 | #include <string.h> | |
2877 | #include <float.h> | |
093e61a6 RS |
2878 | EOF |
2879 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 2880 | { (eval echo configure:2881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2881 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2882 | if test -z "$ac_err"; then | |
2883 | rm -rf conftest* | |
956d6950 JL |
2884 | ac_cv_header_stdc=yes |
2885 | else | |
093e61a6 RS |
2886 | echo "$ac_err" >&5 |
2887 | echo "configure: failed program was:" >&5 | |
2888 | cat conftest.$ac_ext >&5 | |
2889 | rm -rf conftest* | |
2890 | ac_cv_header_stdc=no | |
956d6950 | 2891 | fi |
093e61a6 | 2892 | rm -f conftest* |
956d6950 JL |
2893 | |
2894 | if test $ac_cv_header_stdc = yes; then | |
2895 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
093e61a6 | 2896 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2897 | #line 2898 "configure" |
093e61a6 | 2898 | #include "confdefs.h" |
956d6950 | 2899 | #include <string.h> |
093e61a6 | 2900 | EOF |
956d6950 | 2901 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2902 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2903 | : |
2904 | else | |
093e61a6 | 2905 | rm -rf conftest* |
956d6950 JL |
2906 | ac_cv_header_stdc=no |
2907 | fi | |
2908 | rm -f conftest* | |
2909 | ||
2910 | fi | |
2911 | ||
2912 | if test $ac_cv_header_stdc = yes; then | |
2913 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
093e61a6 | 2914 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2915 | #line 2916 "configure" |
093e61a6 | 2916 | #include "confdefs.h" |
956d6950 | 2917 | #include <stdlib.h> |
093e61a6 | 2918 | EOF |
956d6950 | 2919 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2920 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2921 | : |
2922 | else | |
093e61a6 | 2923 | rm -rf conftest* |
956d6950 JL |
2924 | ac_cv_header_stdc=no |
2925 | fi | |
2926 | rm -f conftest* | |
2927 | ||
2928 | fi | |
2929 | ||
2930 | if test $ac_cv_header_stdc = yes; then | |
2931 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
093e61a6 | 2932 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2933 | : |
2934 | else | |
093e61a6 | 2935 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2936 | #line 2937 "configure" |
093e61a6 | 2937 | #include "confdefs.h" |
956d6950 | 2938 | #include <ctype.h> |
093e61a6 RS |
2939 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2940 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
cafe096b | 2941 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
093e61a6 RS |
2942 | int main () { int i; for (i = 0; i < 256; i++) |
2943 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2944 | exit (0); } | |
2945 | ||
2946 | EOF | |
6a1b7268 | 2947 | if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 2948 | then |
956d6950 JL |
2949 | : |
2950 | else | |
093e61a6 RS |
2951 | echo "configure: failed program was:" >&5 |
2952 | cat conftest.$ac_ext >&5 | |
2953 | rm -fr conftest* | |
2954 | ac_cv_header_stdc=no | |
956d6950 | 2955 | fi |
093e61a6 | 2956 | rm -fr conftest* |
956d6950 | 2957 | fi |
093e61a6 | 2958 | |
956d6950 JL |
2959 | fi |
2960 | fi | |
cafe096b | 2961 | |
093e61a6 RS |
2962 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2963 | if test $ac_cv_header_stdc = yes; then | |
2964 | cat >> confdefs.h <<\EOF | |
956d6950 | 2965 | #define STDC_HEADERS 1 |
093e61a6 | 2966 | EOF |
956d6950 JL |
2967 | |
2968 | fi | |
2969 | ||
093e61a6 | 2970 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
6a1b7268 | 2971 | echo "configure:2972: checking whether time.h and sys/time.h may both be included" >&5 |
093e61a6 RS |
2972 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2973 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2974 | else |
093e61a6 | 2975 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 2976 | #line 2977 "configure" |
093e61a6 | 2977 | #include "confdefs.h" |
956d6950 JL |
2978 | #include <sys/types.h> |
2979 | #include <sys/time.h> | |
2980 | #include <time.h> | |
093e61a6 RS |
2981 | int main() { |
2982 | struct tm *tp; | |
2983 | ; return 0; } | |
2984 | EOF | |
6a1b7268 | 2985 | if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2986 | rm -rf conftest* |
956d6950 JL |
2987 | ac_cv_header_time=yes |
2988 | else | |
093e61a6 RS |
2989 | echo "configure: failed program was:" >&5 |
2990 | cat conftest.$ac_ext >&5 | |
2991 | rm -rf conftest* | |
2992 | ac_cv_header_time=no | |
956d6950 | 2993 | fi |
093e61a6 | 2994 | rm -f conftest* |
956d6950 | 2995 | fi |
cafe096b | 2996 | |
093e61a6 RS |
2997 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
2998 | if test $ac_cv_header_time = yes; then | |
2999 | cat >> confdefs.h <<\EOF | |
956d6950 | 3000 | #define TIME_WITH_SYS_TIME 1 |
093e61a6 | 3001 | EOF |
956d6950 JL |
3002 | |
3003 | fi | |
3004 | ||
093e61a6 | 3005 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
6a1b7268 | 3006 | echo "configure:3007: checking for working stdbool.h" >&5 |
093e61a6 RS |
3007 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
3008 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 3009 | else |
093e61a6 | 3010 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3011 | #line 3012 "configure" |
093e61a6 | 3012 | #include "confdefs.h" |
827ae6cf | 3013 | #include <stdbool.h> |
093e61a6 | 3014 | int main() { |
827ae6cf | 3015 | bool foo = false; |
093e61a6 RS |
3016 | ; return 0; } |
3017 | EOF | |
6a1b7268 | 3018 | if { (eval echo configure:3019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3019 | rm -rf conftest* |
827ae6cf RO |
3020 | ac_cv_header_stdbool_h=yes |
3021 | else | |
093e61a6 RS |
3022 | echo "configure: failed program was:" >&5 |
3023 | cat conftest.$ac_ext >&5 | |
3024 | rm -rf conftest* | |
3025 | ac_cv_header_stdbool_h=no | |
827ae6cf | 3026 | fi |
093e61a6 | 3027 | rm -f conftest* |
827ae6cf | 3028 | fi |
cafe096b | 3029 | |
093e61a6 RS |
3030 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
3031 | if test $ac_cv_header_stdbool_h = yes; then | |
3032 | cat >> confdefs.h <<\EOF | |
827ae6cf | 3033 | #define HAVE_STDBOOL_H 1 |
093e61a6 | 3034 | EOF |
827ae6cf RO |
3035 | |
3036 | fi | |
3037 | ||
093e61a6 | 3038 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
6a1b7268 | 3039 | echo "configure:3040: checking whether string.h and strings.h may both be included" >&5 |
093e61a6 RS |
3040 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
3041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 3042 | else |
093e61a6 | 3043 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3044 | #line 3045 "configure" |
093e61a6 | 3045 | #include "confdefs.h" |
0a4b6309 RL |
3046 | #include <string.h> |
3047 | #include <strings.h> | |
093e61a6 | 3048 | int main() { |
0a4b6309 | 3049 | |
093e61a6 RS |
3050 | ; return 0; } |
3051 | EOF | |
6a1b7268 | 3052 | if { (eval echo configure:3053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3053 | rm -rf conftest* |
0a4b6309 RL |
3054 | gcc_cv_header_string=yes |
3055 | else | |
093e61a6 RS |
3056 | echo "configure: failed program was:" >&5 |
3057 | cat conftest.$ac_ext >&5 | |
3058 | rm -rf conftest* | |
3059 | gcc_cv_header_string=no | |
0a4b6309 | 3060 | fi |
093e61a6 | 3061 | rm -f conftest* |
0a4b6309 | 3062 | fi |
cafe096b | 3063 | |
093e61a6 RS |
3064 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
3065 | if test $gcc_cv_header_string = yes; then | |
3066 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3067 | #define STRING_WITH_STRINGS 1 |
093e61a6 | 3068 | EOF |
0a4b6309 RL |
3069 | |
3070 | fi | |
3071 | ||
093e61a6 | 3072 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
6a1b7268 | 3073 | echo "configure:3074: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
093e61a6 RS |
3074 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
3075 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 3076 | else |
093e61a6 | 3077 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3078 | #line 3079 "configure" |
093e61a6 | 3079 | #include "confdefs.h" |
e9831ca0 KG |
3080 | #include <sys/types.h> |
3081 | #include <sys/wait.h> | |
3082 | #ifndef WEXITSTATUS | |
093e61a6 | 3083 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
3084 | #endif |
3085 | #ifndef WIFEXITED | |
093e61a6 | 3086 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 3087 | #endif |
093e61a6 RS |
3088 | int main() { |
3089 | int s; | |
3090 | wait (&s); | |
3091 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
3092 | ; return 0; } | |
3093 | EOF | |
6a1b7268 | 3094 | if { (eval echo configure:3095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3095 | rm -rf conftest* |
e9831ca0 KG |
3096 | ac_cv_header_sys_wait_h=yes |
3097 | else | |
093e61a6 RS |
3098 | echo "configure: failed program was:" >&5 |
3099 | cat conftest.$ac_ext >&5 | |
3100 | rm -rf conftest* | |
3101 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 3102 | fi |
093e61a6 | 3103 | rm -f conftest* |
e9831ca0 | 3104 | fi |
cafe096b | 3105 | |
093e61a6 RS |
3106 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
3107 | if test $ac_cv_header_sys_wait_h = yes; then | |
3108 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 3109 | #define HAVE_SYS_WAIT_H 1 |
093e61a6 | 3110 | EOF |
e9831ca0 KG |
3111 | |
3112 | fi | |
3113 | ||
093e61a6 | 3114 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3115 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3116 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
2bd02043 | 3117 | direct.h malloc.h langinfo.h ldfcn.h wchar.h |
861bb6c1 | 3118 | do |
093e61a6 RS |
3119 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3120 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6a1b7268 | 3121 | echo "configure:3122: checking for $ac_hdr" >&5 |
093e61a6 RS |
3122 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3123 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3124 | else | |
3125 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3126 | #line 3127 "configure" |
093e61a6 RS |
3127 | #include "confdefs.h" |
3128 | #include <$ac_hdr> | |
3129 | EOF | |
3130 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 3131 | { (eval echo configure:3132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3132 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3133 | if test -z "$ac_err"; then | |
3134 | rm -rf conftest* | |
3135 | eval "ac_cv_header_$ac_safe=yes" | |
3136 | else | |
3137 | echo "$ac_err" >&5 | |
3138 | echo "configure: failed program was:" >&5 | |
3139 | cat conftest.$ac_ext >&5 | |
3140 | rm -rf conftest* | |
3141 | eval "ac_cv_header_$ac_safe=no" | |
956d6950 | 3142 | fi |
093e61a6 | 3143 | rm -f conftest* |
956d6950 | 3144 | fi |
093e61a6 RS |
3145 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3146 | echo "$ac_t""yes" 1>&6 | |
3147 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3148 | cat >> confdefs.h <<EOF | |
3149 | #define $ac_tr_hdr 1 | |
3150 | EOF | |
3151 | ||
3152 | else | |
3153 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3154 | fi |
3155 | done | |
3156 | ||
3157 | ||
f24af81b | 3158 | # Check for thread headers. |
093e61a6 RS |
3159 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3160 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
6a1b7268 | 3161 | echo "configure:3162: checking for thread.h" >&5 |
093e61a6 RS |
3162 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3163 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3164 | else | |
3165 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3166 | #line 3167 "configure" |
093e61a6 | 3167 | #include "confdefs.h" |
cafe096b | 3168 | #include <thread.h> |
093e61a6 RS |
3169 | EOF |
3170 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 3171 | { (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3172 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3173 | if test -z "$ac_err"; then | |
3174 | rm -rf conftest* | |
3175 | eval "ac_cv_header_$ac_safe=yes" | |
3176 | else | |
3177 | echo "$ac_err" >&5 | |
3178 | echo "configure: failed program was:" >&5 | |
3179 | cat conftest.$ac_ext >&5 | |
3180 | rm -rf conftest* | |
3181 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3182 | fi |
093e61a6 | 3183 | rm -f conftest* |
f24af81b | 3184 | fi |
093e61a6 RS |
3185 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3186 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3187 | have_thread_h=yes |
3188 | else | |
093e61a6 RS |
3189 | echo "$ac_t""no" 1>&6 |
3190 | have_thread_h= | |
f24af81b TT |
3191 | fi |
3192 | ||
093e61a6 RS |
3193 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3194 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
6a1b7268 | 3195 | echo "configure:3196: checking for pthread.h" >&5 |
093e61a6 RS |
3196 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3197 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3198 | else |
093e61a6 | 3199 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3200 | #line 3201 "configure" |
093e61a6 | 3201 | #include "confdefs.h" |
cafe096b | 3202 | #include <pthread.h> |
093e61a6 RS |
3203 | EOF |
3204 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 3205 | { (eval echo configure:3206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3206 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3207 | if test -z "$ac_err"; then | |
3208 | rm -rf conftest* | |
3209 | eval "ac_cv_header_$ac_safe=yes" | |
3210 | else | |
3211 | echo "$ac_err" >&5 | |
3212 | echo "configure: failed program was:" >&5 | |
3213 | cat conftest.$ac_ext >&5 | |
3214 | rm -rf conftest* | |
3215 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3216 | fi |
093e61a6 | 3217 | rm -f conftest* |
f24af81b | 3218 | fi |
093e61a6 RS |
3219 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3220 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3221 | have_pthread_h=yes |
3222 | else | |
093e61a6 RS |
3223 | echo "$ac_t""no" 1>&6 |
3224 | have_pthread_h= | |
f24af81b TT |
3225 | fi |
3226 | ||
3227 | ||
84c041a1 | 3228 | # These tests can't be done till we know if we have limits.h. |
093e61a6 | 3229 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
6a1b7268 | 3230 | echo "configure:3231: checking for CHAR_BIT" >&5 |
093e61a6 RS |
3231 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3232 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3233 | else | |
3234 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3235 | #line 3236 "configure" |
093e61a6 | 3236 | #include "confdefs.h" |
75e93faa ZW |
3237 | #ifdef HAVE_LIMITS_H |
3238 | #include <limits.h> | |
3239 | #endif | |
3240 | #ifdef CHAR_BIT | |
3241 | found | |
3242 | #endif | |
093e61a6 | 3243 | EOF |
75e93faa | 3244 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3245 | egrep "found" >/dev/null 2>&1; then |
3246 | rm -rf conftest* | |
75e93faa ZW |
3247 | gcc_cv_decl_char_bit=yes |
3248 | else | |
093e61a6 | 3249 | rm -rf conftest* |
75e93faa ZW |
3250 | gcc_cv_decl_char_bit=no |
3251 | fi | |
3252 | rm -f conftest* | |
3253 | ||
3254 | ||
3255 | fi | |
093e61a6 RS |
3256 | |
3257 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3258 | if test $gcc_cv_decl_char_bit = no; then |
093e61a6 | 3259 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
6a1b7268 | 3260 | echo "configure:3261: checking number of bits in a byte" >&5 |
093e61a6 RS |
3261 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3262 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3263 | else |
3264 | i=8 | |
3265 | gcc_cv_c_nbby= | |
3266 | while test $i -lt 65; do | |
093e61a6 | 3267 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3268 | #line 3269 "configure" |
093e61a6 | 3269 | #include "confdefs.h" |
75e93faa | 3270 | |
093e61a6 | 3271 | int main() { |
4e70264f ZW |
3272 | switch(0) { |
3273 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3274 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3275 | ; } | |
093e61a6 RS |
3276 | ; return 0; } |
3277 | EOF | |
6a1b7268 | 3278 | if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3279 | rm -rf conftest* |
4e70264f | 3280 | gcc_cv_c_nbby=$i; break |
75e93faa | 3281 | else |
093e61a6 RS |
3282 | echo "configure: failed program was:" >&5 |
3283 | cat conftest.$ac_ext >&5 | |
75e93faa | 3284 | fi |
093e61a6 | 3285 | rm -f conftest* |
75e93faa ZW |
3286 | i=`expr $i + 1` |
3287 | done | |
3288 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3289 | ||
3290 | fi | |
093e61a6 RS |
3291 | |
3292 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3293 | if test $gcc_cv_c_nbby = failed; then |
093e61a6 | 3294 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3295 | else |
093e61a6 | 3296 | cat >> confdefs.h <<EOF |
75e93faa | 3297 | #define CHAR_BIT $gcc_cv_c_nbby |
093e61a6 | 3298 | EOF |
75e93faa ZW |
3299 | |
3300 | fi | |
3301 | fi | |
093e61a6 | 3302 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
6a1b7268 | 3303 | echo "configure:3304: checking whether byte ordering is bigendian" >&5 |
093e61a6 RS |
3304 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3305 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3306 | else |
4977bab6 ZW |
3307 | ac_cv_c_bigendian=unknown |
3308 | # See if sys/param.h defines the BYTE_ORDER macro. | |
093e61a6 | 3309 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3310 | #line 3311 "configure" |
093e61a6 | 3311 | #include "confdefs.h" |
4977bab6 ZW |
3312 | #include <sys/types.h> |
3313 | #include <sys/param.h> | |
093e61a6 | 3314 | int main() { |
2d6eb5bf | 3315 | |
4977bab6 ZW |
3316 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3317 | bogus endian macros | |
84c041a1 | 3318 | #endif |
093e61a6 RS |
3319 | ; return 0; } |
3320 | EOF | |
6a1b7268 | 3321 | if { (eval echo configure:3322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3322 | rm -rf conftest* |
4977bab6 | 3323 | # It does; now see whether it defined to BIG_ENDIAN or not. |
093e61a6 | 3324 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3325 | #line 3326 "configure" |
093e61a6 | 3326 | #include "confdefs.h" |
4977bab6 ZW |
3327 | #include <sys/types.h> |
3328 | #include <sys/param.h> | |
093e61a6 | 3329 | int main() { |
4977bab6 ZW |
3330 | |
3331 | #if BYTE_ORDER != BIG_ENDIAN | |
3332 | not big endian | |
84c041a1 | 3333 | #endif |
093e61a6 RS |
3334 | ; return 0; } |
3335 | EOF | |
6a1b7268 | 3336 | if { (eval echo configure:3337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3337 | rm -rf conftest* |
4977bab6 ZW |
3338 | ac_cv_c_bigendian=yes |
3339 | else | |
093e61a6 RS |
3340 | echo "configure: failed program was:" >&5 |
3341 | cat conftest.$ac_ext >&5 | |
3342 | rm -rf conftest* | |
3343 | ac_cv_c_bigendian=no | |
4977bab6 | 3344 | fi |
093e61a6 | 3345 | rm -f conftest* |
4977bab6 | 3346 | else |
093e61a6 RS |
3347 | echo "configure: failed program was:" >&5 |
3348 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3349 | fi |
093e61a6 | 3350 | rm -f conftest* |
4977bab6 ZW |
3351 | if test $ac_cv_c_bigendian = unknown; then |
3352 | if test "$cross_compiling" = yes; then | |
093e61a6 RS |
3353 | echo $ac_n "cross-compiling... " 2>&6 |
3354 | else | |
3355 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3356 | #line 3357 "configure" |
093e61a6 | 3357 | #include "confdefs.h" |
4977bab6 ZW |
3358 | main () { |
3359 | /* Are we little or big endian? From Harbison&Steele. */ | |
3360 | union | |
3361 | { | |
3362 | long l; | |
3363 | char c[sizeof (long)]; | |
3364 | } u; | |
3365 | u.l = 1; | |
3366 | exit (u.c[sizeof (long) - 1] == 1); | |
3367 | } | |
093e61a6 | 3368 | EOF |
6a1b7268 | 3369 | if { (eval echo configure:3370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3370 | then |
4977bab6 ZW |
3371 | ac_cv_c_bigendian=no |
3372 | else | |
093e61a6 RS |
3373 | echo "configure: failed program was:" >&5 |
3374 | cat conftest.$ac_ext >&5 | |
3375 | rm -fr conftest* | |
3376 | ac_cv_c_bigendian=yes | |
4977bab6 | 3377 | fi |
093e61a6 | 3378 | rm -fr conftest* |
84c041a1 | 3379 | fi |
093e61a6 | 3380 | |
4977bab6 ZW |
3381 | fi |
3382 | fi | |
093e61a6 RS |
3383 | |
3384 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3385 | if test $ac_cv_c_bigendian = unknown; then |
093e61a6 | 3386 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
6a1b7268 | 3387 | echo "configure:3388: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3388 | |
4977bab6 ZW |
3389 | cat >conftest.c <<EOF |
3390 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3391 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3392 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3393 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3394 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3395 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3396 | int main() { _ascii (); _ebcdic (); return 0; } | |
3397 | EOF | |
3398 | if test -f conftest.c ; then | |
3399 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3400 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3401 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3402 | ac_cv_c_bigendian=yes | |
3403 | fi | |
3404 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3405 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3406 | if test $ac_cv_c_bigendian = yes ; then | |
3407 | ac_cv_c_bigendian=unknown; | |
3408 | else | |
3409 | ac_cv_c_bigendian=no | |
3410 | fi | |
3411 | fi | |
3412 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3413 | fi | |
3414 | fi | |
093e61a6 | 3415 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3416 | fi |
4977bab6 | 3417 | if test $ac_cv_c_bigendian = yes; then |
093e61a6 | 3418 | cat >> confdefs.h <<\EOF |
4977bab6 | 3419 | #define WORDS_BIGENDIAN 1 |
093e61a6 | 3420 | EOF |
cafe096b | 3421 | |
093e61a6 | 3422 | cat >> confdefs.h <<\EOF |
84c041a1 | 3423 | #define HOST_WORDS_BIG_ENDIAN 1 |
093e61a6 | 3424 | EOF |
84c041a1 | 3425 | |
4977bab6 ZW |
3426 | BYTEORDER=4321 |
3427 | else | |
3428 | BYTEORDER=1234 | |
3429 | fi | |
093e61a6 | 3430 | cat >> confdefs.h <<EOF |
4977bab6 | 3431 | #define BYTEORDER $BYTEORDER |
093e61a6 | 3432 | EOF |
4977bab6 ZW |
3433 | |
3434 | if test $ac_cv_c_bigendian = unknown; then | |
093e61a6 | 3435 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3436 | fi |
3437 | ||
75e93faa | 3438 | |
73458fb7 NN |
3439 | # -------- |
3440 | # UNSORTED | |
3441 | # -------- | |
1e608388 | 3442 | |
73458fb7 NN |
3443 | # Stage specific cflags for build. |
3444 | stage1_cflags= | |
3445 | case $build in | |
3446 | vax-*-*) | |
3447 | if test x$GCC = xyes | |
3448 | then | |
3449 | stage1_cflags="-Wa,-J" | |
3450 | else | |
3451 | stage1_cflags="-J" | |
3452 | fi | |
3453 | ;; | |
3454 | powerpc-*-darwin*) | |
3455 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3456 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3457 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3458 | # that too. | |
3459 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3460 | ;; | |
3461 | esac | |
1e608388 | 3462 | |
1e608388 | 3463 | |
4e70264f ZW |
3464 | # These libraries may be used by collect2. |
3465 | # We may need a special search path to get them linked. | |
093e61a6 | 3466 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
6a1b7268 | 3467 | echo "configure:3468: checking for collect2 libraries" >&5 |
093e61a6 RS |
3468 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3469 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3470 | else |
3471 | save_LIBS="$LIBS" | |
7f2749d4 | 3472 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3473 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3474 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3475 | do | |
3476 | LIBS="$libs" | |
093e61a6 | 3477 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3478 | #line 3479 "configure" |
093e61a6 | 3479 | #include "confdefs.h" |
4e70264f ZW |
3480 | /* Override any gcc2 internal prototype to avoid an error. */ |
3481 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3482 | builtin and then its argument prototype would still apply. */ |
3483 | char ldopen(); | |
3484 | ||
3485 | int main() { | |
3486 | ldopen() | |
3487 | ; return 0; } | |
3488 | EOF | |
6a1b7268 | 3489 | if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3490 | rm -rf conftest* |
4e70264f ZW |
3491 | gcc_cv_collect2_libs="$libs"; break |
3492 | else | |
093e61a6 RS |
3493 | echo "configure: failed program was:" >&5 |
3494 | cat conftest.$ac_ext >&5 | |
4e70264f | 3495 | fi |
093e61a6 | 3496 | rm -f conftest* |
4e70264f ZW |
3497 | done |
3498 | LIBS="$save_LIBS" | |
3499 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3500 | fi | |
093e61a6 RS |
3501 | |
3502 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3503 | case $gcc_cv_collect2_libs in |
3504 | "none required") ;; | |
3505 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3506 | esac | |
3507 | ||
3508 | ||
7f2749d4 RK |
3509 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3510 | # -lexc. So test for it. | |
3511 | save_LIBS="$LIBS" | |
3512 | LIBS= | |
3513 | ||
093e61a6 | 3514 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
6a1b7268 | 3515 | echo "configure:3516: checking for library containing exc_resume" >&5 |
093e61a6 RS |
3516 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3517 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3518 | else | |
3519 | ac_func_search_save_LIBS="$LIBS" | |
3520 | ac_cv_search_exc_resume="no" | |
3521 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3522 | #line 3523 "configure" |
093e61a6 | 3523 | #include "confdefs.h" |
7f2749d4 RK |
3524 | /* Override any gcc2 internal prototype to avoid an error. */ |
3525 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3526 | builtin and then its argument prototype would still apply. */ |
3527 | char exc_resume(); | |
3528 | ||
3529 | int main() { | |
3530 | exc_resume() | |
3531 | ; return 0; } | |
3532 | EOF | |
6a1b7268 | 3533 | if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3534 | rm -rf conftest* |
7f2749d4 RK |
3535 | ac_cv_search_exc_resume="none required" |
3536 | else | |
093e61a6 RS |
3537 | echo "configure: failed program was:" >&5 |
3538 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3539 | fi |
093e61a6 RS |
3540 | rm -f conftest* |
3541 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3542 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3543 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3544 | #line 3545 "configure" |
093e61a6 | 3545 | #include "confdefs.h" |
7f2749d4 RK |
3546 | /* Override any gcc2 internal prototype to avoid an error. */ |
3547 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3548 | builtin and then its argument prototype would still apply. */ |
3549 | char exc_resume(); | |
3550 | ||
3551 | int main() { | |
3552 | exc_resume() | |
3553 | ; return 0; } | |
3554 | EOF | |
6a1b7268 | 3555 | if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3556 | rm -rf conftest* |
3557 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3558 | break |
3559 | else | |
093e61a6 RS |
3560 | echo "configure: failed program was:" >&5 |
3561 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3562 | fi |
093e61a6 RS |
3563 | rm -f conftest* |
3564 | done | |
3565 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3566 | fi |
cafe096b | 3567 | |
093e61a6 RS |
3568 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3569 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3570 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3571 | ||
3572 | else : | |
3573 | ||
7f2749d4 RK |
3574 | fi |
3575 | GNAT_LIBEXC="$LIBS" | |
3576 | LIBS="$save_LIBS" | |
3577 | ||
3578 | ||
62c9aa5f ZW |
3579 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3580 | # they're both in the same place. jcf-dump needs them. | |
3581 | save_LIBS="$LIBS" | |
3582 | LIBS= | |
3583 | ||
093e61a6 | 3584 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
6a1b7268 | 3585 | echo "configure:3586: checking for library containing ldexp" >&5 |
093e61a6 RS |
3586 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3587 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3588 | else | |
3589 | ac_func_search_save_LIBS="$LIBS" | |
3590 | ac_cv_search_ldexp="no" | |
3591 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3592 | #line 3593 "configure" |
093e61a6 | 3593 | #include "confdefs.h" |
62c9aa5f ZW |
3594 | /* Override any gcc2 internal prototype to avoid an error. */ |
3595 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3596 | builtin and then its argument prototype would still apply. */ |
3597 | char ldexp(); | |
3598 | ||
3599 | int main() { | |
3600 | ldexp() | |
3601 | ; return 0; } | |
3602 | EOF | |
6a1b7268 | 3603 | if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3604 | rm -rf conftest* |
62c9aa5f ZW |
3605 | ac_cv_search_ldexp="none required" |
3606 | else | |
093e61a6 RS |
3607 | echo "configure: failed program was:" >&5 |
3608 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3609 | fi |
093e61a6 RS |
3610 | rm -f conftest* |
3611 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3612 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3613 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3614 | #line 3615 "configure" |
093e61a6 | 3615 | #include "confdefs.h" |
62c9aa5f ZW |
3616 | /* Override any gcc2 internal prototype to avoid an error. */ |
3617 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3618 | builtin and then its argument prototype would still apply. */ |
3619 | char ldexp(); | |
3620 | ||
3621 | int main() { | |
3622 | ldexp() | |
3623 | ; return 0; } | |
3624 | EOF | |
6a1b7268 | 3625 | if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3626 | rm -rf conftest* |
3627 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3628 | break |
3629 | else | |
093e61a6 RS |
3630 | echo "configure: failed program was:" >&5 |
3631 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3632 | fi |
093e61a6 RS |
3633 | rm -f conftest* |
3634 | done | |
3635 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3636 | fi |
cafe096b | 3637 | |
093e61a6 RS |
3638 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3639 | if test "$ac_cv_search_ldexp" != "no"; then | |
3640 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3641 | ||
3642 | else : | |
3643 | ||
62c9aa5f ZW |
3644 | fi |
3645 | LDEXP_LIB="$LIBS" | |
3646 | LIBS="$save_LIBS" | |
3647 | ||
3648 | ||
890ad3ea | 3649 | # See if the stage1 system preprocessor understands the ANSI C |
4bc5fbd4 | 3650 | # preprocessor stringification operator. (Used by symcat.h.) |
093e61a6 RS |
3651 | |
3652 | ||
3653 | echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 | |
6a1b7268 | 3654 | echo "configure:3655: checking for preprocessor stringizing operator" >&5 |
093e61a6 RS |
3655 | if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then |
3656 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3657 | else | |
3658 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3659 | #line 3660 "configure" |
093e61a6 RS |
3660 | #include "confdefs.h" |
3661 | ||
890ad3ea KG |
3662 | #define x(y) #y |
3663 | ||
3664 | char *s = x(teststring); | |
093e61a6 RS |
3665 | |
3666 | EOF | |
890ad3ea | 3667 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3668 | egrep "#teststring" >/dev/null 2>&1; then |
3669 | rm -rf conftest* | |
890ad3ea | 3670 | ac_cv_c_stringize=no |
76844337 | 3671 | else |
093e61a6 | 3672 | rm -rf conftest* |
890ad3ea | 3673 | ac_cv_c_stringize=yes |
76844337 RH |
3674 | fi |
3675 | rm -f conftest* | |
890ad3ea | 3676 | |
76844337 RH |
3677 | fi |
3678 | ||
093e61a6 RS |
3679 | if test "${ac_cv_c_stringize}" = yes |
3680 | then | |
3681 | cat >> confdefs.h <<\EOF | |
890ad3ea | 3682 | #define HAVE_STRINGIZE 1 |
093e61a6 | 3683 | EOF |
76844337 RH |
3684 | |
3685 | fi | |
093e61a6 | 3686 | echo "$ac_t""${ac_cv_c_stringize}" 1>&6 |
890ad3ea | 3687 | |
76844337 | 3688 | |
956d6950 JL |
3689 | # Use <inttypes.h> only if it exists, |
3690 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
093e61a6 | 3691 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
6a1b7268 | 3692 | echo "configure:3693: checking for inttypes.h" >&5 |
093e61a6 RS |
3693 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3694 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3695 | else | |
3696 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3697 | #line 3698 "configure" |
093e61a6 | 3698 | #include "confdefs.h" |
956d6950 JL |
3699 | #include <sys/types.h> |
3700 | #include <inttypes.h> | |
093e61a6 | 3701 | int main() { |
956d6950 | 3702 | intmax_t i = -1; |
093e61a6 RS |
3703 | ; return 0; } |
3704 | EOF | |
6a1b7268 | 3705 | if { (eval echo configure:3706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3706 | rm -rf conftest* |
0056a9b5 | 3707 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3708 | else |
093e61a6 RS |
3709 | echo "configure: failed program was:" >&5 |
3710 | cat conftest.$ac_ext >&5 | |
3711 | rm -rf conftest* | |
3712 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3713 | fi |
093e61a6 | 3714 | rm -f conftest* |
956d6950 JL |
3715 | fi |
3716 | ||
093e61a6 | 3717 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3718 | if test $gcc_cv_header_inttypes_h = yes; then |
093e61a6 | 3719 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3720 | #define HAVE_INTTYPES_H 1 |
093e61a6 | 3721 | EOF |
0056a9b5 KG |
3722 | |
3723 | fi | |
956d6950 | 3724 | |
c149cc37 | 3725 | |
6af8c740 KG |
3726 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3727 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 | 3728 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
8eb6a092 | 3729 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore |
956d6950 | 3730 | do |
093e61a6 | 3731 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
6a1b7268 | 3732 | echo "configure:3733: checking for $ac_func" >&5 |
093e61a6 RS |
3733 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3735 | else | |
3736 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3737 | #line 3738 "configure" |
093e61a6 | 3738 | #include "confdefs.h" |
956d6950 | 3739 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
3740 | which can conflict with char $ac_func(); below. */ |
3741 | #include <assert.h> | |
956d6950 JL |
3742 | /* Override any gcc2 internal prototype to avoid an error. */ |
3743 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3744 | builtin and then its argument prototype would still apply. */ |
3745 | char $ac_func(); | |
3746 | ||
3747 | int main() { | |
3748 | ||
956d6950 JL |
3749 | /* The GNU C library defines this for functions which it implements |
3750 | to always fail with ENOSYS. Some functions are actually named | |
3751 | something starting with __ and the normal name is an alias. */ | |
3752 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3753 | choke me | |
3754 | #else | |
093e61a6 | 3755 | $ac_func(); |
956d6950 JL |
3756 | #endif |
3757 | ||
093e61a6 RS |
3758 | ; return 0; } |
3759 | EOF | |
6a1b7268 | 3760 | if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3761 | rm -rf conftest* |
3762 | eval "ac_cv_func_$ac_func=yes" | |
3763 | else | |
3764 | echo "configure: failed program was:" >&5 | |
3765 | cat conftest.$ac_ext >&5 | |
3766 | rm -rf conftest* | |
3767 | eval "ac_cv_func_$ac_func=no" | |
3768 | fi | |
3769 | rm -f conftest* | |
3770 | fi | |
956d6950 | 3771 | |
093e61a6 RS |
3772 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3773 | echo "$ac_t""yes" 1>&6 | |
3774 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3775 | cat >> confdefs.h <<EOF | |
3776 | #define $ac_tr_func 1 | |
3777 | EOF | |
3778 | ||
3779 | else | |
3780 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3781 | fi |
3782 | done | |
3783 | ||
6885fc87 | 3784 | |
39f6c4c8 | 3785 | if test x$ac_cv_func_mbstowcs = xyes; then |
093e61a6 | 3786 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
6a1b7268 | 3787 | echo "configure:3788: checking whether mbstowcs works" >&5 |
093e61a6 RS |
3788 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3789 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3790 | else |
3791 | if test "$cross_compiling" = yes; then | |
3792 | gcc_cv_func_mbstowcs_works=yes | |
3793 | else | |
093e61a6 | 3794 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3795 | #line 3796 "configure" |
093e61a6 | 3796 | #include "confdefs.h" |
39f6c4c8 KW |
3797 | #include <stdlib.h> |
3798 | int main() | |
3799 | { | |
3800 | mbstowcs(0, "", 0); | |
3801 | return 0; | |
3802 | } | |
093e61a6 | 3803 | EOF |
6a1b7268 | 3804 | if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3805 | then |
39f6c4c8 KW |
3806 | gcc_cv_func_mbstowcs_works=yes |
3807 | else | |
093e61a6 RS |
3808 | echo "configure: failed program was:" >&5 |
3809 | cat conftest.$ac_ext >&5 | |
3810 | rm -fr conftest* | |
3811 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3812 | fi |
093e61a6 | 3813 | rm -fr conftest* |
39f6c4c8 | 3814 | fi |
093e61a6 | 3815 | |
39f6c4c8 | 3816 | fi |
cafe096b | 3817 | |
093e61a6 RS |
3818 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3819 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3820 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3821 | #define HAVE_WORKING_MBSTOWCS 1 |
093e61a6 | 3822 | EOF |
39f6c4c8 KW |
3823 | |
3824 | fi | |
3825 | fi | |
3826 | ||
093e61a6 | 3827 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
6a1b7268 | 3828 | echo "configure:3829: checking for ssize_t" >&5 |
093e61a6 RS |
3829 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3830 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f12bc141 | 3831 | else |
093e61a6 | 3832 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3833 | #line 3834 "configure" |
093e61a6 RS |
3834 | #include "confdefs.h" |
3835 | #include <sys/types.h> | |
3836 | #if STDC_HEADERS | |
3837 | #include <stdlib.h> | |
3838 | #include <stddef.h> | |
3839 | #endif | |
3840 | EOF | |
3841 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3842 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3843 | rm -rf conftest* | |
cb65112a | 3844 | ac_cv_type_ssize_t=yes |
f12bc141 | 3845 | else |
093e61a6 RS |
3846 | rm -rf conftest* |
3847 | ac_cv_type_ssize_t=no | |
f12bc141 | 3848 | fi |
093e61a6 | 3849 | rm -f conftest* |
cafe096b | 3850 | |
093e61a6 RS |
3851 | fi |
3852 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3853 | if test $ac_cv_type_ssize_t = no; then | |
3854 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3855 | #define ssize_t int |
093e61a6 | 3856 | EOF |
f12bc141 ZW |
3857 | |
3858 | fi | |
3859 | ||
0b9d02c6 | 3860 | |
e256b8b6 DA |
3861 | # Try to determine the array type of the second argument of getgroups |
3862 | # for the target system (int or gid_t). | |
093e61a6 | 3863 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
6a1b7268 | 3864 | echo "configure:3865: checking for uid_t in sys/types.h" >&5 |
093e61a6 RS |
3865 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3866 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3867 | else | |
3868 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 3869 | #line 3870 "configure" |
093e61a6 | 3870 | #include "confdefs.h" |
e256b8b6 | 3871 | #include <sys/types.h> |
093e61a6 | 3872 | EOF |
e256b8b6 | 3873 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3874 | egrep "uid_t" >/dev/null 2>&1; then |
3875 | rm -rf conftest* | |
e256b8b6 DA |
3876 | ac_cv_type_uid_t=yes |
3877 | else | |
093e61a6 | 3878 | rm -rf conftest* |
e256b8b6 DA |
3879 | ac_cv_type_uid_t=no |
3880 | fi | |
3881 | rm -f conftest* | |
3882 | ||
3883 | fi | |
cafe096b | 3884 | |
093e61a6 RS |
3885 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3886 | if test $ac_cv_type_uid_t = no; then | |
3887 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3888 | #define uid_t int |
093e61a6 | 3889 | EOF |
cafe096b | 3890 | |
093e61a6 | 3891 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3892 | #define gid_t int |
093e61a6 | 3893 | EOF |
e256b8b6 DA |
3894 | |
3895 | fi | |
3896 | ||
093e61a6 | 3897 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
6a1b7268 | 3898 | echo "configure:3899: checking type of array argument to getgroups" >&5 |
093e61a6 RS |
3899 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3900 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3901 | else |
3902 | if test "$cross_compiling" = yes; then | |
3903 | ac_cv_type_getgroups=cross | |
3904 | else | |
093e61a6 | 3905 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3906 | #line 3907 "configure" |
093e61a6 RS |
3907 | #include "confdefs.h" |
3908 | ||
e256b8b6 DA |
3909 | /* Thanks to Mike Rendell for this test. */ |
3910 | #include <sys/types.h> | |
3911 | #define NGID 256 | |
3912 | #undef MAX | |
3913 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
093e61a6 | 3914 | main() |
e256b8b6 DA |
3915 | { |
3916 | gid_t gidset[NGID]; | |
3917 | int i, n; | |
3918 | union { gid_t gval; long lval; } val; | |
3919 | ||
3920 | val.lval = -1; | |
3921 | for (i = 0; i < NGID; i++) | |
3922 | gidset[i] = val.gval; | |
3923 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3924 | gidset); | |
3925 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3926 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3927 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3928 | } | |
cafe096b | 3929 | |
093e61a6 | 3930 | EOF |
6a1b7268 | 3931 | if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 RS |
3932 | then |
3933 | ac_cv_type_getgroups=gid_t | |
3934 | else | |
3935 | echo "configure: failed program was:" >&5 | |
3936 | cat conftest.$ac_ext >&5 | |
3937 | rm -fr conftest* | |
3938 | ac_cv_type_getgroups=int | |
e256b8b6 | 3939 | fi |
093e61a6 | 3940 | rm -fr conftest* |
e256b8b6 | 3941 | fi |
093e61a6 | 3942 | |
e256b8b6 | 3943 | if test $ac_cv_type_getgroups = cross; then |
093e61a6 | 3944 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3945 | #line 3946 "configure" |
093e61a6 | 3946 | #include "confdefs.h" |
e256b8b6 | 3947 | #include <unistd.h> |
093e61a6 | 3948 | EOF |
e256b8b6 | 3949 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3950 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3951 | rm -rf conftest* | |
e256b8b6 DA |
3952 | ac_cv_type_getgroups=gid_t |
3953 | else | |
093e61a6 | 3954 | rm -rf conftest* |
e256b8b6 DA |
3955 | ac_cv_type_getgroups=int |
3956 | fi | |
3957 | rm -f conftest* | |
3958 | ||
3959 | fi | |
3960 | fi | |
3961 | ||
093e61a6 RS |
3962 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3963 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3964 | #define GETGROUPS_T $ac_cv_type_getgroups |
093e61a6 | 3965 | EOF |
e256b8b6 DA |
3966 | |
3967 | ||
3968 | if test "${target}" = "${build}"; then | |
3969 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3970 | else | |
3971 | case "${target}" in | |
3972 | # This condition may need some tweaking. It should include all | |
3973 | # targets where the array type of the second argument of getgroups | |
3974 | # is int and the type of gid_t is not equivalent to int. | |
3975 | *-*-sunos* | *-*-ultrix*) | |
3976 | TARGET_GETGROUPS_T=int | |
3977 | ;; | |
3978 | *) | |
3979 | TARGET_GETGROUPS_T=gid_t | |
3980 | ;; | |
3981 | esac | |
3982 | fi | |
3983 | ||
3984 | ||
093e61a6 | 3985 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
6a1b7268 | 3986 | echo "configure:3987: checking whether the printf functions support %p" >&5 |
093e61a6 RS |
3987 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3988 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
3989 | else |
3990 | if test "$cross_compiling" = yes; then | |
3991 | gcc_cv_func_printf_ptr=no | |
3992 | else | |
093e61a6 | 3993 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 3994 | #line 3995 "configure" |
093e61a6 | 3995 | #include "confdefs.h" |
0a4b6309 RL |
3996 | #include <stdio.h> |
3997 | ||
86cf1cbd | 3998 | int main() |
0a4b6309 RL |
3999 | { |
4000 | char buf[64]; | |
4001 | char *p = buf, *q = NULL; | |
4002 | sprintf(buf, "%p", p); | |
4003 | sscanf(buf, "%p", &q); | |
86cf1cbd | 4004 | return (p != q); |
0a4b6309 | 4005 | } |
093e61a6 | 4006 | EOF |
6a1b7268 | 4007 | if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4008 | then |
0a4b6309 RL |
4009 | gcc_cv_func_printf_ptr=yes |
4010 | else | |
093e61a6 RS |
4011 | echo "configure: failed program was:" >&5 |
4012 | cat conftest.$ac_ext >&5 | |
4013 | rm -fr conftest* | |
4014 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 4015 | fi |
093e61a6 | 4016 | rm -fr conftest* |
0a4b6309 | 4017 | fi |
093e61a6 | 4018 | |
0a4b6309 RL |
4019 | rm -f core core.* *.core |
4020 | fi | |
cafe096b | 4021 | |
093e61a6 RS |
4022 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
4023 | if test $gcc_cv_func_printf_ptr = yes ; then | |
4024 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 4025 | #define HAVE_PRINTF_PTR 1 |
093e61a6 | 4026 | EOF |
0a4b6309 RL |
4027 | |
4028 | fi | |
4029 | ||
1072ec3f ZW |
4030 | if test $ac_cv_header_sys_mman_h != yes \ |
4031 | || test $ac_cv_func_mmap != yes; then | |
4032 | gcc_cv_func_mmap_file=no | |
4033 | gcc_cv_func_mmap_dev_zero=no | |
4034 | gcc_cv_func_mmap_anon=no | |
4035 | else | |
4036 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 | |
6a1b7268 | 4037 | echo "configure:4038: checking whether read-only mmap of a plain file works" >&5 |
1072ec3f ZW |
4038 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then |
4039 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4040 | else | |
4041 | # Add a system to this blacklist if | |
4042 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a | |
4043 | # memory area containing the same data that you'd get if you applied | |
4044 | # read() to the same fd. The only system known to have a problem here | |
4045 | # is VMS, where text files have record structure. | |
4046 | case "$host_os" in | |
4047 | vms*) | |
4048 | gcc_cv_func_mmap_file=no ;; | |
4049 | *) | |
4050 | gcc_cv_func_mmap_file=yes;; | |
4051 | esac | |
4052 | fi | |
4053 | ||
4054 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
4055 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
6a1b7268 | 4056 | echo "configure:4057: checking whether mmap from /dev/zero works" >&5 |
1072ec3f ZW |
4057 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
4058 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4059 | else | |
4060 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
4061 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
4062 | # zeroed pages with both the following properties: | |
4063 | # 1. If you map N consecutive pages in with one call, and then | |
4064 | # unmap any subset of those pages, the pages that were not | |
4065 | # explicitly unmapped remain accessible. | |
4066 | # 2. If you map two adjacent blocks of memory and then unmap them | |
4067 | # both at once, they must both go away. | |
4068 | # Systems known to be in this category are Windows (all variants), | |
4069 | # VMS, and Darwin. | |
4070 | case "$host_os" in | |
4071 | vms* | cygwin* | pe | mingw* | darwin*) | |
4072 | gcc_cv_func_mmap_dev_zero=no ;; | |
4073 | *) | |
4074 | gcc_cv_func_mmap_dev_zero=yes;; | |
4075 | esac | |
4076 | fi | |
4077 | ||
4078 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
4079 | ||
4080 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
4081 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
6a1b7268 | 4082 | echo "configure:4083: checking for MAP_ANON(YMOUS)" >&5 |
1072ec3f ZW |
4083 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then |
4084 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4085 | else | |
4086 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4087 | #line 4088 "configure" |
1072ec3f ZW |
4088 | #include "confdefs.h" |
4089 | #include <sys/types.h> | |
4090 | #include <sys/mman.h> | |
4091 | #include <unistd.h> | |
4092 | ||
4093 | #ifndef MAP_ANONYMOUS | |
4094 | #define MAP_ANONYMOUS MAP_ANON | |
4095 | #endif | |
4096 | ||
4097 | int main() { | |
4098 | int n = MAP_ANONYMOUS; | |
4099 | ; return 0; } | |
4100 | EOF | |
6a1b7268 | 4101 | if { (eval echo configure:4102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1072ec3f ZW |
4102 | rm -rf conftest* |
4103 | gcc_cv_decl_map_anon=yes | |
4104 | else | |
4105 | echo "configure: failed program was:" >&5 | |
4106 | cat conftest.$ac_ext >&5 | |
4107 | rm -rf conftest* | |
4108 | gcc_cv_decl_map_anon=no | |
4109 | fi | |
4110 | rm -f conftest* | |
4111 | fi | |
4112 | ||
4113 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
4114 | ||
4115 | if test $gcc_cv_decl_map_anon = no; then | |
4116 | gcc_cv_func_mmap_anon=no | |
4117 | else | |
4118 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 | |
6a1b7268 | 4119 | echo "configure:4120: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
1072ec3f ZW |
4120 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then |
4121 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4122 | else | |
4123 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
4124 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
4125 | # doesn't give anonymous zeroed pages with the same properties listed | |
4126 | # above for use of /dev/zero. | |
4127 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
4128 | case "$host_os" in | |
4129 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
4130 | gcc_cv_func_mmap_anon=no ;; | |
4131 | *) | |
4132 | gcc_cv_func_mmap_anon=yes;; | |
4133 | esac | |
4134 | fi | |
4135 | ||
4136 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
4137 | fi | |
4138 | fi | |
4139 | ||
4140 | if test $gcc_cv_func_mmap_file = yes; then | |
4141 | cat >> confdefs.h <<\EOF | |
4142 | #define HAVE_MMAP_FILE 1 | |
4143 | EOF | |
4144 | ||
4145 | fi | |
4146 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
4147 | cat >> confdefs.h <<\EOF | |
4148 | #define HAVE_MMAP_DEV_ZERO 1 | |
4149 | EOF | |
4150 | ||
4151 | fi | |
4152 | if test $gcc_cv_func_mmap_anon = yes; then | |
4153 | cat >> confdefs.h <<\EOF | |
4154 | #define HAVE_MMAP_ANON 1 | |
4155 | EOF | |
4156 | ||
4157 | fi | |
4158 | ||
b27d2bd5 MK |
4159 | |
4160 | case "${host}" in | |
4161 | *-*-uwin*) | |
093e61a6 | 4162 | { echo "configure: error: |
cafe096b | 4163 | *** UWIN may not be used as a host platform because |
093e61a6 | 4164 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } |
b27d2bd5 | 4165 | ;; |
ee262b6f | 4166 | *-*-*vms*) |
093e61a6 | 4167 | # Under VMS, vfork works very different than on Unix. The standard test |
ee262b6f DR |
4168 | # won't work, and it isn't easily adaptable. It makes more sense to |
4169 | # just force it. | |
4170 | ac_cv_func_vfork_works=yes | |
4171 | ;; | |
b27d2bd5 | 4172 | esac |
093e61a6 | 4173 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
6a1b7268 | 4174 | echo "configure:4175: checking for pid_t" >&5 |
093e61a6 RS |
4175 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4176 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4177 | else | |
4178 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4179 | #line 4180 "configure" |
093e61a6 RS |
4180 | #include "confdefs.h" |
4181 | #include <sys/types.h> | |
4182 | #if STDC_HEADERS | |
4183 | #include <stdlib.h> | |
4184 | #include <stddef.h> | |
4185 | #endif | |
4186 | EOF | |
4187 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4188 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4189 | rm -rf conftest* | |
cb65112a | 4190 | ac_cv_type_pid_t=yes |
c375c43b | 4191 | else |
093e61a6 RS |
4192 | rm -rf conftest* |
4193 | ac_cv_type_pid_t=no | |
c375c43b | 4194 | fi |
093e61a6 | 4195 | rm -f conftest* |
cafe096b | 4196 | |
093e61a6 RS |
4197 | fi |
4198 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4199 | if test $ac_cv_type_pid_t = no; then | |
4200 | cat >> confdefs.h <<\EOF | |
c375c43b | 4201 | #define pid_t int |
093e61a6 | 4202 | EOF |
c375c43b KG |
4203 | |
4204 | fi | |
4205 | ||
093e61a6 RS |
4206 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4207 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
6a1b7268 | 4208 | echo "configure:4209: checking for vfork.h" >&5 |
093e61a6 RS |
4209 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 4211 | else |
093e61a6 | 4212 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4213 | #line 4214 "configure" |
093e61a6 RS |
4214 | #include "confdefs.h" |
4215 | #include <vfork.h> | |
4216 | EOF | |
4217 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 4218 | { (eval echo configure:4219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
4219 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4220 | if test -z "$ac_err"; then | |
4221 | rm -rf conftest* | |
4222 | eval "ac_cv_header_$ac_safe=yes" | |
4223 | else | |
4224 | echo "$ac_err" >&5 | |
4225 | echo "configure: failed program was:" >&5 | |
4226 | cat conftest.$ac_ext >&5 | |
4227 | rm -rf conftest* | |
4228 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4229 | fi |
093e61a6 | 4230 | rm -f conftest* |
c375c43b | 4231 | fi |
093e61a6 RS |
4232 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4233 | echo "$ac_t""yes" 1>&6 | |
4234 | cat >> confdefs.h <<\EOF | |
4235 | #define HAVE_VFORK_H 1 | |
4236 | EOF | |
c375c43b | 4237 | |
093e61a6 RS |
4238 | else |
4239 | echo "$ac_t""no" 1>&6 | |
c375c43b KG |
4240 | fi |
4241 | ||
093e61a6 | 4242 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
6a1b7268 | 4243 | echo "configure:4244: checking for working vfork" >&5 |
093e61a6 RS |
4244 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4245 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4246 | else | |
4247 | if test "$cross_compiling" = yes; then | |
4248 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
6a1b7268 | 4249 | echo "configure:4250: checking for vfork" >&5 |
093e61a6 RS |
4250 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4251 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4252 | else | |
4253 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4254 | #line 4255 "configure" |
093e61a6 | 4255 | #include "confdefs.h" |
c375c43b | 4256 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
4257 | which can conflict with char vfork(); below. */ |
4258 | #include <assert.h> | |
c375c43b KG |
4259 | /* Override any gcc2 internal prototype to avoid an error. */ |
4260 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
4261 | builtin and then its argument prototype would still apply. */ |
4262 | char vfork(); | |
4263 | ||
4264 | int main() { | |
4265 | ||
c375c43b KG |
4266 | /* The GNU C library defines this for functions which it implements |
4267 | to always fail with ENOSYS. Some functions are actually named | |
4268 | something starting with __ and the normal name is an alias. */ | |
093e61a6 | 4269 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4270 | choke me |
4271 | #else | |
093e61a6 | 4272 | vfork(); |
c375c43b KG |
4273 | #endif |
4274 | ||
093e61a6 RS |
4275 | ; return 0; } |
4276 | EOF | |
6a1b7268 | 4277 | if { (eval echo configure:4278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4278 | rm -rf conftest* |
4279 | eval "ac_cv_func_vfork=yes" | |
4280 | else | |
4281 | echo "configure: failed program was:" >&5 | |
4282 | cat conftest.$ac_ext >&5 | |
4283 | rm -rf conftest* | |
4284 | eval "ac_cv_func_vfork=no" | |
4285 | fi | |
4286 | rm -f conftest* | |
c375c43b KG |
4287 | fi |
4288 | ||
093e61a6 RS |
4289 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4290 | echo "$ac_t""yes" 1>&6 | |
4291 | : | |
c375c43b | 4292 | else |
093e61a6 | 4293 | echo "$ac_t""no" 1>&6 |
c375c43b | 4294 | fi |
093e61a6 | 4295 | |
c375c43b KG |
4296 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4297 | else | |
093e61a6 | 4298 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4299 | #line 4300 "configure" |
093e61a6 | 4300 | #include "confdefs.h" |
c375c43b KG |
4301 | /* Thanks to Paul Eggert for this test. */ |
4302 | #include <stdio.h> | |
4303 | #include <sys/types.h> | |
4304 | #include <sys/stat.h> | |
093e61a6 RS |
4305 | #ifdef HAVE_UNISTD_H |
4306 | #include <unistd.h> | |
c375c43b | 4307 | #endif |
093e61a6 RS |
4308 | #ifdef HAVE_VFORK_H |
4309 | #include <vfork.h> | |
c375c43b KG |
4310 | #endif |
4311 | /* On some sparc systems, changes by the child to local and incoming | |
093e61a6 RS |
4312 | argument registers are propagated back to the parent. |
4313 | The compiler is told about this with #include <vfork.h>, | |
4314 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4315 | Test for this by using a static variable whose address | |
4316 | is put into a register that is clobbered by the vfork. */ | |
4317 | static | |
c375c43b KG |
4318 | #ifdef __cplusplus |
4319 | sparc_address_test (int arg) | |
093e61a6 | 4320 | #else |
c375c43b KG |
4321 | sparc_address_test (arg) int arg; |
4322 | #endif | |
4323 | { | |
4324 | static pid_t child; | |
4325 | if (!child) { | |
4326 | child = vfork (); | |
4327 | if (child < 0) { | |
4328 | perror ("vfork"); | |
4329 | _exit(2); | |
4330 | } | |
4331 | if (!child) { | |
4332 | arg = getpid(); | |
4333 | write(-1, "", 0); | |
4334 | _exit (arg); | |
4335 | } | |
4336 | } | |
4337 | } | |
093e61a6 | 4338 | main() { |
c375c43b KG |
4339 | pid_t parent = getpid (); |
4340 | pid_t child; | |
4341 | ||
093e61a6 | 4342 | sparc_address_test (); |
c375c43b KG |
4343 | |
4344 | child = vfork (); | |
4345 | ||
4346 | if (child == 0) { | |
093e61a6 RS |
4347 | /* Here is another test for sparc vfork register problems. |
4348 | This test uses lots of local variables, at least | |
4349 | as many local variables as main has allocated so far | |
4350 | including compiler temporaries. 4 locals are enough for | |
4351 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4352 | A buggy compiler should reuse the register of parent | |
4353 | for one of the local variables, since it will think that | |
4354 | parent can't possibly be used any more in this routine. | |
4355 | Assigning to the local variable will thus munge parent | |
4356 | in the parent process. */ | |
c375c43b KG |
4357 | pid_t |
4358 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4359 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4360 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4361 | use the same hardware register for all 8 local variables. */ | |
4362 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4363 | || p != p5 || p != p6 || p != p7) | |
4364 | _exit(1); | |
4365 | ||
093e61a6 RS |
4366 | /* On some systems (e.g. IRIX 3.3), |
4367 | vfork doesn't separate parent from child file descriptors. | |
4368 | If the child closes a descriptor before it execs or exits, | |
4369 | this munges the parent's descriptor as well. | |
4370 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4371 | _exit(close(fileno(stdout)) != 0); |
4372 | } else { | |
4373 | int status; | |
4374 | struct stat st; | |
4375 | ||
4376 | while (wait(&status) != child) | |
4377 | ; | |
4378 | exit( | |
4379 | /* Was there some problem with vforking? */ | |
4380 | child < 0 | |
4381 | ||
4382 | /* Did the child fail? (This shouldn't happen.) */ | |
4383 | || status | |
4384 | ||
4385 | /* Did the vfork/compiler bug occur? */ | |
4386 | || parent != getpid() | |
4387 | ||
4388 | /* Did the file descriptor bug occur? */ | |
4389 | || fstat(fileno(stdout), &st) != 0 | |
4390 | ); | |
4391 | } | |
4392 | } | |
093e61a6 | 4393 | EOF |
6a1b7268 | 4394 | if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4395 | then |
c375c43b KG |
4396 | ac_cv_func_vfork_works=yes |
4397 | else | |
093e61a6 RS |
4398 | echo "configure: failed program was:" >&5 |
4399 | cat conftest.$ac_ext >&5 | |
4400 | rm -fr conftest* | |
4401 | ac_cv_func_vfork_works=no | |
c375c43b | 4402 | fi |
093e61a6 | 4403 | rm -fr conftest* |
cafe096b | 4404 | fi |
c375c43b KG |
4405 | |
4406 | fi | |
4407 | ||
093e61a6 RS |
4408 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4409 | if test $ac_cv_func_vfork_works = no; then | |
4410 | cat >> confdefs.h <<\EOF | |
c375c43b | 4411 | #define vfork fork |
093e61a6 | 4412 | EOF |
c375c43b KG |
4413 | |
4414 | fi | |
4415 | ||
81bf3d9e | 4416 | |
f91abfce | 4417 | |
093e61a6 | 4418 | |
b7f2fb96 | 4419 | am_cv_lib_iconv_ldpath= |
093e61a6 | 4420 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4421 | if test "${with_libiconv_prefix+set}" = set; then |
4422 | withval="$with_libiconv_prefix" | |
093e61a6 | 4423 | |
f91abfce TT |
4424 | for dir in `echo "$withval" | tr : ' '`; do |
4425 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4426 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4427 | done |
093e61a6 RS |
4428 | |
4429 | fi | |
f91abfce TT |
4430 | |
4431 | ||
093e61a6 | 4432 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
6a1b7268 | 4433 | echo "configure:4434: checking for iconv" >&5 |
093e61a6 RS |
4434 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4435 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4436 | else |
093e61a6 | 4437 | |
f91abfce TT |
4438 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4439 | am_cv_lib_iconv=no | |
093e61a6 | 4440 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4441 | #line 4442 "configure" |
093e61a6 | 4442 | #include "confdefs.h" |
f91abfce TT |
4443 | #include <stdlib.h> |
4444 | #include <iconv.h> | |
093e61a6 | 4445 | int main() { |
f91abfce TT |
4446 | iconv_t cd = iconv_open("",""); |
4447 | iconv(cd,NULL,NULL,NULL,NULL); | |
4448 | iconv_close(cd); | |
093e61a6 RS |
4449 | ; return 0; } |
4450 | EOF | |
6a1b7268 | 4451 | if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4452 | rm -rf conftest* |
f91abfce TT |
4453 | am_cv_func_iconv=yes |
4454 | else | |
093e61a6 RS |
4455 | echo "configure: failed program was:" >&5 |
4456 | cat conftest.$ac_ext >&5 | |
f91abfce | 4457 | fi |
093e61a6 | 4458 | rm -f conftest* |
f91abfce TT |
4459 | if test "$am_cv_func_iconv" != yes; then |
4460 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4461 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 4462 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4463 | #line 4464 "configure" |
093e61a6 | 4464 | #include "confdefs.h" |
f91abfce TT |
4465 | #include <stdlib.h> |
4466 | #include <iconv.h> | |
093e61a6 | 4467 | int main() { |
f91abfce TT |
4468 | iconv_t cd = iconv_open("",""); |
4469 | iconv(cd,NULL,NULL,NULL,NULL); | |
4470 | iconv_close(cd); | |
093e61a6 RS |
4471 | ; return 0; } |
4472 | EOF | |
6a1b7268 | 4473 | if { (eval echo configure:4474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4474 | rm -rf conftest* |
f91abfce TT |
4475 | am_cv_lib_iconv=yes |
4476 | am_cv_func_iconv=yes | |
4477 | else | |
093e61a6 RS |
4478 | echo "configure: failed program was:" >&5 |
4479 | cat conftest.$ac_ext >&5 | |
f91abfce | 4480 | fi |
093e61a6 | 4481 | rm -f conftest* |
f91abfce TT |
4482 | LIBS="$am_save_LIBS" |
4483 | fi | |
093e61a6 | 4484 | |
cafe096b | 4485 | fi |
cafe096b | 4486 | |
093e61a6 RS |
4487 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4488 | if test "$am_cv_func_iconv" = yes; then | |
4489 | cat >> confdefs.h <<\EOF | |
f91abfce | 4490 | #define HAVE_ICONV 1 |
093e61a6 | 4491 | EOF |
f91abfce | 4492 | |
093e61a6 | 4493 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
6a1b7268 | 4494 | echo "configure:4495: checking for iconv declaration" >&5 |
093e61a6 RS |
4495 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4496 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4497 | else |
093e61a6 RS |
4498 | |
4499 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4500 | #line 4501 "configure" |
093e61a6 | 4501 | #include "confdefs.h" |
f91abfce TT |
4502 | |
4503 | #include <stdlib.h> | |
4504 | #include <iconv.h> | |
4505 | extern | |
4506 | #ifdef __cplusplus | |
4507 | "C" | |
4508 | #endif | |
4509 | #if defined(__STDC__) || defined(__cplusplus) | |
4510 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4511 | #else | |
4512 | size_t iconv(); | |
4513 | #endif | |
4514 | ||
093e61a6 | 4515 | int main() { |
f91abfce | 4516 | |
093e61a6 RS |
4517 | ; return 0; } |
4518 | EOF | |
6a1b7268 | 4519 | if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4520 | rm -rf conftest* |
f91abfce TT |
4521 | am_cv_proto_iconv_arg1="" |
4522 | else | |
093e61a6 RS |
4523 | echo "configure: failed program was:" >&5 |
4524 | cat conftest.$ac_ext >&5 | |
4525 | rm -rf conftest* | |
4526 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4527 | fi |
093e61a6 | 4528 | rm -f conftest* |
f91abfce TT |
4529 | 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);" |
4530 | fi | |
4531 | ||
4532 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
4533 | echo "$ac_t""${ac_t:- |
4534 | }$am_cv_proto_iconv" 1>&6 | |
4535 | cat >> confdefs.h <<EOF | |
f91abfce | 4536 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 4537 | EOF |
f91abfce TT |
4538 | |
4539 | fi | |
4540 | LIBICONV= | |
4541 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4542 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4543 | fi |
093e61a6 | 4544 | |
f91abfce TT |
4545 | |
4546 | ||
86cf1cbd KG |
4547 | # We will need to find libiberty.h and ansidecl.h |
4548 | saved_CFLAGS="$CFLAGS" | |
4549 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4550 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4551 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
a7475ab1 | 4552 | fprintf_unlocked strstr errno vasprintf \ |
c1800ec8 | 4553 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4554 | do |
f31e826b | 4555 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4556 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
6a1b7268 | 4557 | echo "configure:4558: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4558 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4560 | else | |
4561 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4562 | #line 4563 "configure" |
093e61a6 | 4563 | #include "confdefs.h" |
7afe8c41 KG |
4564 | #undef $ac_tr_decl |
4565 | #define $ac_tr_decl 1 | |
093e61a6 | 4566 | |
d02af173 | 4567 | #include "ansidecl.h" |
86cf1cbd | 4568 | #include "system.h" |
f31e826b | 4569 | |
093e61a6 | 4570 | int main() { |
86cf1cbd KG |
4571 | #ifndef $ac_func |
4572 | char *(*pfn) = (char *(*)) $ac_func ; | |
4573 | #endif | |
093e61a6 RS |
4574 | ; return 0; } |
4575 | EOF | |
6a1b7268 | 4576 | if { (eval echo configure:4577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4577 | rm -rf conftest* |
f31e826b | 4578 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4579 | else |
093e61a6 RS |
4580 | echo "configure: failed program was:" >&5 |
4581 | cat conftest.$ac_ext >&5 | |
4582 | rm -rf conftest* | |
4583 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4584 | fi |
093e61a6 | 4585 | rm -f conftest* |
81bf3d9e RH |
4586 | fi |
4587 | ||
f31e826b | 4588 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4589 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4590 | #define $ac_tr_decl 1 |
093e61a6 RS |
4591 | EOF |
4592 | ||
81bf3d9e | 4593 | else |
093e61a6 | 4594 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4595 | #define $ac_tr_decl 0 |
093e61a6 RS |
4596 | EOF |
4597 | ||
81bf3d9e RH |
4598 | fi |
4599 | ||
4600 | done | |
86cf1cbd | 4601 | if test x = y ; then |
093e61a6 | 4602 | cat >> confdefs.h <<\EOF |
f31e826b | 4603 | #define HAVE_DECL_GETENV 1 |
093e61a6 RS |
4604 | EOF |
4605 | cat >> confdefs.h <<\EOF | |
f31e826b | 4606 | #define HAVE_DECL_ATOL 1 |
093e61a6 RS |
4607 | EOF |
4608 | cat >> confdefs.h <<\EOF | |
f31e826b | 4609 | #define HAVE_DECL_SBRK 1 |
093e61a6 RS |
4610 | EOF |
4611 | cat >> confdefs.h <<\EOF | |
f31e826b | 4612 | #define HAVE_DECL_ABORT 1 |
093e61a6 RS |
4613 | EOF |
4614 | cat >> confdefs.h <<\EOF | |
f31e826b | 4615 | #define HAVE_DECL_ATOF 1 |
093e61a6 RS |
4616 | EOF |
4617 | cat >> confdefs.h <<\EOF | |
f31e826b | 4618 | #define HAVE_DECL_GETCWD 1 |
093e61a6 RS |
4619 | EOF |
4620 | cat >> confdefs.h <<\EOF | |
f31e826b | 4621 | #define HAVE_DECL_GETWD 1 |
093e61a6 | 4622 | EOF |
86cf1cbd | 4623 | \ |
093e61a6 | 4624 | cat >> confdefs.h <<\EOF |
f31e826b | 4625 | #define HAVE_DECL_STRSIGNAL 1 |
093e61a6 RS |
4626 | EOF |
4627 | cat >> confdefs.h <<\EOF | |
f31e826b | 4628 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
093e61a6 RS |
4629 | EOF |
4630 | cat >> confdefs.h <<\EOF | |
f31e826b | 4631 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
093e61a6 RS |
4632 | EOF |
4633 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4634 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
093e61a6 | 4635 | EOF |
3b681e9d | 4636 | \ |
093e61a6 | 4637 | cat >> confdefs.h <<\EOF |
3b681e9d | 4638 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
093e61a6 RS |
4639 | EOF |
4640 | cat >> confdefs.h <<\EOF | |
f31e826b | 4641 | #define HAVE_DECL_STRSTR 1 |
093e61a6 RS |
4642 | EOF |
4643 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4644 | #define HAVE_DECL_ERRNO 1 |
093e61a6 RS |
4645 | EOF |
4646 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4647 | #define HAVE_DECL_VASPRINTF 1 |
093e61a6 | 4648 | EOF |
86cf1cbd | 4649 | \ |
093e61a6 | 4650 | cat >> confdefs.h <<\EOF |
f31e826b | 4651 | #define HAVE_DECL_MALLOC 1 |
093e61a6 RS |
4652 | EOF |
4653 | cat >> confdefs.h <<\EOF | |
f31e826b | 4654 | #define HAVE_DECL_REALLOC 1 |
093e61a6 RS |
4655 | EOF |
4656 | cat >> confdefs.h <<\EOF | |
f31e826b | 4657 | #define HAVE_DECL_CALLOC 1 |
093e61a6 RS |
4658 | EOF |
4659 | cat >> confdefs.h <<\EOF | |
f31e826b | 4660 | #define HAVE_DECL_FREE 1 |
093e61a6 RS |
4661 | EOF |
4662 | cat >> confdefs.h <<\EOF | |
f31e826b | 4663 | #define HAVE_DECL_BASENAME 1 |
093e61a6 RS |
4664 | EOF |
4665 | cat >> confdefs.h <<\EOF | |
f31e826b | 4666 | #define HAVE_DECL_GETOPT 1 |
093e61a6 RS |
4667 | EOF |
4668 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4669 | #define HAVE_DECL_CLOCK 1 |
093e61a6 | 4670 | EOF |
81bf3d9e RH |
4671 | fi |
4672 | ||
81bf3d9e RH |
4673 | |
4674 | for ac_func in getrlimit setrlimit getrusage | |
4675 | do | |
f31e826b | 4676 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4677 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
6a1b7268 | 4678 | echo "configure:4679: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4679 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4681 | else | |
4682 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4683 | #line 4684 "configure" |
093e61a6 | 4684 | #include "confdefs.h" |
7afe8c41 KG |
4685 | #undef $ac_tr_decl |
4686 | #define $ac_tr_decl 1 | |
093e61a6 | 4687 | |
d02af173 | 4688 | #include "ansidecl.h" |
86cf1cbd | 4689 | #include "system.h" |
81bf3d9e RH |
4690 | #ifdef HAVE_SYS_RESOURCE_H |
4691 | #include <sys/resource.h> | |
4692 | #endif | |
4693 | ||
f31e826b | 4694 | |
093e61a6 | 4695 | int main() { |
86cf1cbd KG |
4696 | #ifndef $ac_func |
4697 | char *(*pfn) = (char *(*)) $ac_func ; | |
4698 | #endif | |
093e61a6 RS |
4699 | ; return 0; } |
4700 | EOF | |
6a1b7268 | 4701 | if { (eval echo configure:4702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4702 | rm -rf conftest* |
f31e826b | 4703 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4704 | else |
093e61a6 RS |
4705 | echo "configure: failed program was:" >&5 |
4706 | cat conftest.$ac_ext >&5 | |
4707 | rm -rf conftest* | |
4708 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4709 | fi |
093e61a6 | 4710 | rm -f conftest* |
81bf3d9e RH |
4711 | fi |
4712 | ||
f31e826b | 4713 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4714 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4715 | #define $ac_tr_decl 1 |
093e61a6 RS |
4716 | EOF |
4717 | ||
81bf3d9e | 4718 | else |
093e61a6 | 4719 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4720 | #define $ac_tr_decl 0 |
093e61a6 RS |
4721 | EOF |
4722 | ||
81bf3d9e RH |
4723 | fi |
4724 | ||
4725 | done | |
86cf1cbd | 4726 | if test x = y ; then |
093e61a6 | 4727 | cat >> confdefs.h <<\EOF |
f31e826b | 4728 | #define HAVE_DECL_GETRLIMIT 1 |
093e61a6 RS |
4729 | EOF |
4730 | cat >> confdefs.h <<\EOF | |
f31e826b | 4731 | #define HAVE_DECL_SETRLIMIT 1 |
093e61a6 RS |
4732 | EOF |
4733 | cat >> confdefs.h <<\EOF | |
f31e826b | 4734 | #define HAVE_DECL_GETRUSAGE 1 |
093e61a6 | 4735 | EOF |
86cf1cbd KG |
4736 | fi |
4737 | ||
81bf3d9e | 4738 | |
093e61a6 | 4739 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4740 | #line 4741 "configure" |
093e61a6 | 4741 | #include "confdefs.h" |
b2522d2b HPN |
4742 | |
4743 | #include "ansidecl.h" | |
4744 | #include "system.h" | |
4745 | #ifdef HAVE_SYS_RESOURCE_H | |
4746 | #include <sys/resource.h> | |
4747 | #endif | |
4748 | ||
093e61a6 | 4749 | int main() { |
b2522d2b | 4750 | rlim_t l = 0; |
093e61a6 RS |
4751 | ; return 0; } |
4752 | EOF | |
6a1b7268 | 4753 | if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4754 | : |
4755 | else | |
093e61a6 RS |
4756 | echo "configure: failed program was:" >&5 |
4757 | cat conftest.$ac_ext >&5 | |
4758 | rm -rf conftest* | |
4759 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4760 | #define rlim_t long |
093e61a6 | 4761 | EOF |
b2522d2b HPN |
4762 | |
4763 | fi | |
093e61a6 | 4764 | rm -f conftest* |
b2522d2b | 4765 | |
351df804 | 4766 | for ac_func in ldgetname |
c1800ec8 ZW |
4767 | do |
4768 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4769 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
6a1b7268 | 4770 | echo "configure:4771: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4771 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4772 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4773 | else | |
4774 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4775 | #line 4776 "configure" |
093e61a6 | 4776 | #include "confdefs.h" |
c1800ec8 ZW |
4777 | #undef $ac_tr_decl |
4778 | #define $ac_tr_decl 1 | |
093e61a6 | 4779 | |
351df804 KG |
4780 | #include "ansidecl.h" |
4781 | #include "system.h" | |
4782 | #ifdef HAVE_LDFCN_H | |
4783 | #include <ldfcn.h> | |
4784 | #endif | |
4785 | ||
4786 | ||
093e61a6 | 4787 | int main() { |
351df804 KG |
4788 | #ifndef $ac_func |
4789 | char *(*pfn) = (char *(*)) $ac_func ; | |
4790 | #endif | |
093e61a6 RS |
4791 | ; return 0; } |
4792 | EOF | |
6a1b7268 | 4793 | if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4794 | rm -rf conftest* |
351df804 KG |
4795 | eval "gcc_cv_have_decl_$ac_func=yes" |
4796 | else | |
093e61a6 RS |
4797 | echo "configure: failed program was:" >&5 |
4798 | cat conftest.$ac_ext >&5 | |
4799 | rm -rf conftest* | |
4800 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4801 | fi |
093e61a6 | 4802 | rm -f conftest* |
351df804 KG |
4803 | fi |
4804 | ||
4805 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4806 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4807 | #define $ac_tr_decl 1 |
093e61a6 RS |
4808 | EOF |
4809 | ||
351df804 | 4810 | else |
093e61a6 | 4811 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4812 | #define $ac_tr_decl 0 |
093e61a6 RS |
4813 | EOF |
4814 | ||
351df804 KG |
4815 | fi |
4816 | ||
4817 | done | |
4818 | if test x = y ; then | |
093e61a6 | 4819 | cat >> confdefs.h <<\EOF |
351df804 | 4820 | #define HAVE_DECL_LDGETNAME 1 |
093e61a6 | 4821 | EOF |
351df804 KG |
4822 | fi |
4823 | ||
4824 | ||
4825 | for ac_func in times | |
4826 | do | |
4827 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4828 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
6a1b7268 | 4829 | echo "configure:4830: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4830 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4831 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4832 | else | |
4833 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4834 | #line 4835 "configure" |
093e61a6 | 4835 | #include "confdefs.h" |
351df804 KG |
4836 | #undef $ac_tr_decl |
4837 | #define $ac_tr_decl 1 | |
093e61a6 | 4838 | |
c1800ec8 ZW |
4839 | #include "ansidecl.h" |
4840 | #include "system.h" | |
4841 | #ifdef HAVE_SYS_TIMES_H | |
4842 | #include <sys/times.h> | |
4843 | #endif | |
4844 | ||
4845 | ||
093e61a6 | 4846 | int main() { |
c1800ec8 ZW |
4847 | #ifndef $ac_func |
4848 | char *(*pfn) = (char *(*)) $ac_func ; | |
4849 | #endif | |
093e61a6 RS |
4850 | ; return 0; } |
4851 | EOF | |
6a1b7268 | 4852 | if { (eval echo configure:4853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4853 | rm -rf conftest* |
c1800ec8 ZW |
4854 | eval "gcc_cv_have_decl_$ac_func=yes" |
4855 | else | |
093e61a6 RS |
4856 | echo "configure: failed program was:" >&5 |
4857 | cat conftest.$ac_ext >&5 | |
4858 | rm -rf conftest* | |
4859 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4860 | fi |
093e61a6 | 4861 | rm -f conftest* |
c1800ec8 ZW |
4862 | fi |
4863 | ||
4864 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4865 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4866 | #define $ac_tr_decl 1 |
093e61a6 RS |
4867 | EOF |
4868 | ||
c1800ec8 | 4869 | else |
093e61a6 | 4870 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4871 | #define $ac_tr_decl 0 |
093e61a6 RS |
4872 | EOF |
4873 | ||
c1800ec8 ZW |
4874 | fi |
4875 | ||
4876 | done | |
4877 | if test x = y ; then | |
093e61a6 | 4878 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4879 | #define HAVE_DECL_TIMES 1 |
093e61a6 | 4880 | EOF |
c1800ec8 ZW |
4881 | fi |
4882 | ||
4883 | ||
4884 | # More time-related stuff. | |
093e61a6 | 4885 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
6a1b7268 | 4886 | echo "configure:4887: checking for struct tms" >&5 |
093e61a6 RS |
4887 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4888 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4889 | else | |
4890 | ||
4891 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4892 | #line 4893 "configure" |
093e61a6 | 4893 | #include "confdefs.h" |
c1800ec8 ZW |
4894 | |
4895 | #include "ansidecl.h" | |
4896 | #include "system.h" | |
4897 | #ifdef HAVE_SYS_TIMES_H | |
4898 | #include <sys/times.h> | |
4899 | #endif | |
4900 | ||
093e61a6 | 4901 | int main() { |
c1800ec8 | 4902 | struct tms tms; |
093e61a6 RS |
4903 | ; return 0; } |
4904 | EOF | |
6a1b7268 | 4905 | if { (eval echo configure:4906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4906 | rm -rf conftest* |
c1800ec8 ZW |
4907 | ac_cv_struct_tms=yes |
4908 | else | |
093e61a6 RS |
4909 | echo "configure: failed program was:" >&5 |
4910 | cat conftest.$ac_ext >&5 | |
4911 | rm -rf conftest* | |
4912 | ac_cv_struct_tms=no | |
c1800ec8 | 4913 | fi |
093e61a6 | 4914 | rm -f conftest* |
c1800ec8 | 4915 | fi |
cafe096b | 4916 | |
093e61a6 RS |
4917 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4918 | if test $ac_cv_struct_tms = yes; then | |
4919 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4920 | #define HAVE_STRUCT_TMS 1 |
093e61a6 | 4921 | EOF |
c1800ec8 ZW |
4922 | |
4923 | fi | |
4924 | ||
4925 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4926 | # revisit after autoconf 2.50. | |
093e61a6 | 4927 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
6a1b7268 | 4928 | echo "configure:4929: checking for clock_t" >&5 |
093e61a6 RS |
4929 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4930 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4931 | else | |
4932 | ||
4933 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 4934 | #line 4935 "configure" |
093e61a6 | 4935 | #include "confdefs.h" |
c1800ec8 ZW |
4936 | |
4937 | #include "ansidecl.h" | |
4938 | #include "system.h" | |
4939 | ||
093e61a6 | 4940 | int main() { |
c1800ec8 | 4941 | clock_t x; |
093e61a6 RS |
4942 | ; return 0; } |
4943 | EOF | |
6a1b7268 | 4944 | if { (eval echo configure:4945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4945 | rm -rf conftest* |
c1800ec8 ZW |
4946 | gcc_cv_type_clock_t=yes |
4947 | else | |
093e61a6 RS |
4948 | echo "configure: failed program was:" >&5 |
4949 | cat conftest.$ac_ext >&5 | |
4950 | rm -rf conftest* | |
4951 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4952 | fi |
093e61a6 | 4953 | rm -f conftest* |
c1800ec8 | 4954 | fi |
cafe096b | 4955 | |
093e61a6 RS |
4956 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4957 | if test $gcc_cv_type_clock_t = yes; then | |
4958 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4959 | #define HAVE_CLOCK_T 1 |
093e61a6 | 4960 | EOF |
c1800ec8 ZW |
4961 | |
4962 | fi | |
4963 | ||
093e61a6 | 4964 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
6a1b7268 | 4965 | echo "configure:4966: checking for uchar" >&5 |
093e61a6 RS |
4966 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4967 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4968 | else |
093e61a6 | 4969 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 4970 | #line 4971 "configure" |
093e61a6 | 4971 | #include "confdefs.h" |
a12b5bd9 ZW |
4972 | |
4973 | #include "ansidecl.h" | |
4974 | #include "system.h" | |
4975 | ||
093e61a6 | 4976 | int main() { |
a12b5bd9 ZW |
4977 | if ((uchar *)0) return 0; |
4978 | if (sizeof(uchar)) return 0; | |
093e61a6 RS |
4979 | ; return 0; } |
4980 | EOF | |
6a1b7268 | 4981 | if { (eval echo configure:4982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4982 | rm -rf conftest* |
a12b5bd9 ZW |
4983 | ac_cv_type_uchar=yes |
4984 | else | |
093e61a6 RS |
4985 | echo "configure: failed program was:" >&5 |
4986 | cat conftest.$ac_ext >&5 | |
4987 | rm -rf conftest* | |
4988 | ac_cv_type_uchar=no | |
a12b5bd9 | 4989 | fi |
093e61a6 | 4990 | rm -f conftest* |
a12b5bd9 | 4991 | fi |
cafe096b | 4992 | |
093e61a6 RS |
4993 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
4994 | if test $ac_cv_type_uchar = yes; then | |
4995 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 4996 | #define HAVE_UCHAR 1 |
093e61a6 | 4997 | EOF |
a12b5bd9 ZW |
4998 | |
4999 | fi | |
5000 | ||
eb70d86d AS |
5001 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
5002 | CFLAGS="$saved_CFLAGS" | |
5003 | ||
07cf4226 DM |
5004 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
5005 | if test "${enable_initfini_array+set}" = set; then | |
5006 | enableval="$enable_initfini_array" | |
093e61a6 | 5007 | : |
07cf4226 | 5008 | else |
093e61a6 RS |
5009 | |
5010 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
6a1b7268 | 5011 | echo "configure:5012: checking for .preinit_array/.init_array/.fini_array support" >&5 |
093e61a6 RS |
5012 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
5013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 5014 | else |
eb70d86d | 5015 | if test "$cross_compiling" = yes; then |
918c4fe4 | 5016 | gcc_cv_initfini_array=no |
eb70d86d | 5017 | else |
093e61a6 | 5018 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5019 | #line 5020 "configure" |
093e61a6 | 5020 | #include "confdefs.h" |
eb70d86d | 5021 | |
07cf4226 DM |
5022 | static int x = -1; |
5023 | int main (void) { return x; } | |
5024 | int foo (void) { x = 0; } | |
5025 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
093e61a6 | 5026 | EOF |
6a1b7268 | 5027 | if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5028 | then |
918c4fe4 | 5029 | gcc_cv_initfini_array=yes |
eb70d86d | 5030 | else |
093e61a6 RS |
5031 | echo "configure: failed program was:" >&5 |
5032 | cat conftest.$ac_ext >&5 | |
5033 | rm -fr conftest* | |
5034 | gcc_cv_initfini_array=no | |
eb70d86d | 5035 | fi |
093e61a6 | 5036 | rm -fr conftest* |
eb70d86d | 5037 | fi |
093e61a6 | 5038 | |
07cf4226 | 5039 | fi |
093e61a6 RS |
5040 | |
5041 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 5042 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 5043 | |
093e61a6 | 5044 | fi |
cafe096b | 5045 | |
093e61a6 RS |
5046 | if test $enable_initfini_array = yes; then |
5047 | cat >> confdefs.h <<\EOF | |
eb70d86d | 5048 | #define HAVE_INITFINI_ARRAY 1 |
093e61a6 | 5049 | EOF |
07cf4226 | 5050 | |
eb70d86d | 5051 | fi |
81bf3d9e | 5052 | |
093e61a6 RS |
5053 | # mkdir takes a single argument on some systems. |
5054 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
6a1b7268 | 5055 | echo "configure:5056: checking if mkdir takes one argument" >&5 |
093e61a6 RS |
5056 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
5057 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 5058 | else |
093e61a6 | 5059 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5060 | #line 5061 "configure" |
093e61a6 | 5061 | #include "confdefs.h" |
75923b2f MK |
5062 | |
5063 | #include <sys/types.h> | |
5064 | #ifdef HAVE_SYS_STAT_H | |
5065 | # include <sys/stat.h> | |
5066 | #endif | |
5067 | #ifdef HAVE_UNISTD_H | |
5068 | # include <unistd.h> | |
5069 | #endif | |
5070 | #ifdef HAVE_DIRECT_H | |
5071 | # include <direct.h> | |
5072 | #endif | |
093e61a6 | 5073 | int main() { |
75923b2f | 5074 | mkdir ("foo", 0); |
093e61a6 RS |
5075 | ; return 0; } |
5076 | EOF | |
6a1b7268 | 5077 | if { (eval echo configure:5078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5078 | rm -rf conftest* |
75923b2f MK |
5079 | gcc_cv_mkdir_takes_one_arg=no |
5080 | else | |
093e61a6 RS |
5081 | echo "configure: failed program was:" >&5 |
5082 | cat conftest.$ac_ext >&5 | |
5083 | rm -rf conftest* | |
5084 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 5085 | fi |
093e61a6 | 5086 | rm -f conftest* |
75923b2f | 5087 | fi |
cafe096b | 5088 | |
093e61a6 RS |
5089 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
5090 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
5091 | cat >> confdefs.h <<\EOF | |
75923b2f | 5092 | #define MKDIR_TAKES_ONE_ARG 1 |
093e61a6 | 5093 | EOF |
75923b2f MK |
5094 | |
5095 | fi | |
5096 | ||
5097 | ||
861bb6c1 JL |
5098 | # File extensions |
5099 | manext='.1' | |
5100 | objext='.o' | |
5101 | ||
5102 | ||
5103 | ||
4977bab6 ZW |
5104 | # With Setjmp/Longjmp based exception handling. |
5105 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
5106 | if test "${enable_sjlj_exceptions+set}" = set; then | |
5107 | enableval="$enable_sjlj_exceptions" | |
5108 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 5109 | cat >> confdefs.h <<EOF |
cafe096b | 5110 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
093e61a6 RS |
5111 | EOF |
5112 | ||
5113 | fi | |
4977bab6 ZW |
5114 | |
5115 | ||
093e61a6 | 5116 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 |
6a1b7268 | 5117 | echo "configure:5118: checking for main in -lunwind" >&5 |
093e61a6 RS |
5118 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
5119 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5120 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 5121 | else |
093e61a6 | 5122 | ac_save_LIBS="$LIBS" |
4977bab6 | 5123 | LIBS="-lunwind $LIBS" |
093e61a6 | 5124 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5125 | #line 5126 "configure" |
093e61a6 | 5126 | #include "confdefs.h" |
4977bab6 | 5127 | |
093e61a6 RS |
5128 | int main() { |
5129 | main() | |
5130 | ; return 0; } | |
5131 | EOF | |
6a1b7268 | 5132 | if { (eval echo configure:5133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5133 | rm -rf conftest* |
5134 | eval "ac_cv_lib_$ac_lib_var=yes" | |
5135 | else | |
5136 | echo "configure: failed program was:" >&5 | |
5137 | cat conftest.$ac_ext >&5 | |
5138 | rm -rf conftest* | |
5139 | eval "ac_cv_lib_$ac_lib_var=no" | |
5140 | fi | |
5141 | rm -f conftest* | |
5142 | LIBS="$ac_save_LIBS" | |
4977bab6 | 5143 | |
093e61a6 RS |
5144 | fi |
5145 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5146 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
5147 | use_libunwind_default=yes |
5148 | else | |
093e61a6 RS |
5149 | echo "$ac_t""no" 1>&6 |
5150 | use_libunwind_default=no | |
4977bab6 ZW |
5151 | fi |
5152 | ||
5153 | # Use libunwind based exception handling. | |
5154 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5155 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5156 | enableval="$enable_libunwind_exceptions" | |
5157 | use_libunwind_exceptions=$enableval | |
5158 | else | |
5159 | use_libunwind_exceptions=$use_libunwind_default | |
093e61a6 | 5160 | fi |
cafe096b | 5161 | |
093e61a6 RS |
5162 | if test x"$use_libunwind_exceptions" = xyes; then |
5163 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5164 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
093e61a6 | 5165 | EOF |
4977bab6 ZW |
5166 | |
5167 | fi | |
5168 | ||
34a86c2b NN |
5169 | # -------------------------------------------------------- |
5170 | # Build, host, and target specific configuration fragments | |
5171 | # -------------------------------------------------------- | |
5172 | ||
ef69da62 | 5173 | target_gtfiles= |
861bb6c1 | 5174 | build_xm_file= |
f6cb0e63 | 5175 | build_xm_defines= |
861bb6c1 JL |
5176 | build_install_headers_dir=install-headers-tar |
5177 | build_exeext= | |
5178 | host_xm_file= | |
f6cb0e63 | 5179 | host_xm_defines= |
861bb6c1 JL |
5180 | host_xmake_file= |
5181 | host_truncate_target= | |
6e26218f | 5182 | host_exeext= |
861bb6c1 JL |
5183 | |
5184 | # Decode the host machine, then the target machine. | |
5185 | # For the host machine, we save the xm_file variable as host_xm_file; | |
5186 | # then we decode the target machine and forget everything else | |
5187 | # that came from the host machine. | |
5188 | for machine in $build $host $target; do | |
61ed06c3 | 5189 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5190 | done |
5191 | ||
5192 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5193 | ||
5194 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5195 | if test x"$tm_file" = x |
861bb6c1 JL |
5196 | then tm_file=$cpu_type/$cpu_type.h; fi |
5197 | ||
6b2adea9 | 5198 | if test x"$extra_headers" = x |
861bb6c1 JL |
5199 | then extra_headers=; fi |
5200 | ||
75bffa71 | 5201 | if test x$md_file = x |
e98e406f | 5202 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5203 | |
75bffa71 | 5204 | if test x$out_file = x |
861bb6c1 JL |
5205 | then out_file=$cpu_type/$cpu_type.c; fi |
5206 | ||
75bffa71 | 5207 | if test x"$tmake_file" = x |
861bb6c1 JL |
5208 | then tmake_file=$cpu_type/t-$cpu_type |
5209 | fi | |
5210 | ||
90e6a802 | 5211 | if test x"$dwarf2" = xyes |
756ee602 | 5212 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5213 | fi |
5214 | ||
861bb6c1 | 5215 | # Say what files are being used for the output code and MD file. |
11642c3a | 5216 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5217 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5218 | ||
11642c3a | 5219 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5220 | # about them and drop them. |
5221 | ||
11642c3a ZW |
5222 | bx= |
5223 | for x in $build_xm_file; do | |
5224 | if test -f $srcdir/config/$x | |
5225 | then bx="$bx $x" | |
093e61a6 | 5226 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5227 | fi |
5228 | done | |
5229 | build_xm_file="$bx" | |
5230 | ||
5231 | hx= | |
5232 | for x in $host_xm_file; do | |
5233 | if test -f $srcdir/config/$x | |
5234 | then hx="$hx $x" | |
093e61a6 | 5235 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5236 | fi |
5237 | done | |
5238 | host_xm_file="$hx" | |
5239 | ||
5240 | tx= | |
5241 | for x in $xm_file; do | |
5242 | if test -f $srcdir/config/$x | |
5243 | then tx="$tx $x" | |
093e61a6 | 5244 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5245 | fi |
5246 | done | |
5247 | xm_file="$tx" | |
5248 | ||
861bb6c1 JL |
5249 | count=a |
5250 | for f in $tm_file; do | |
5251 | count=${count}x | |
5252 | done | |
75bffa71 | 5253 | if test $count = ax; then |
861bb6c1 JL |
5254 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5255 | else | |
5256 | echo "Using the following target machine macro files:" | |
5257 | for f in $tm_file; do | |
5258 | echo " $srcdir/config/$f" | |
5259 | done | |
5260 | fi | |
5261 | ||
4977bab6 | 5262 | if test x$need_64bit_hwint = xyes; then |
093e61a6 | 5263 | cat >> confdefs.h <<\EOF |
4977bab6 | 5264 | #define NEED_64BIT_HOST_WIDE_INT 1 |
093e61a6 | 5265 | EOF |
4977bab6 ZW |
5266 | |
5267 | fi | |
5268 | ||
861bb6c1 JL |
5269 | count=a |
5270 | for f in $host_xm_file; do | |
5271 | count=${count}x | |
5272 | done | |
11642c3a ZW |
5273 | if test $count = a; then |
5274 | : | |
5275 | elif test $count = ax; then | |
861bb6c1 JL |
5276 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5277 | else | |
5278 | echo "Using the following host machine macro files:" | |
5279 | for f in $host_xm_file; do | |
5280 | echo " $srcdir/config/$f" | |
5281 | done | |
5282 | fi | |
476d9098 | 5283 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5284 | |
75bffa71 | 5285 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5286 | count=a |
5287 | for f in $build_xm_file; do | |
5288 | count=${count}x | |
5289 | done | |
11642c3a ZW |
5290 | if test $count = a; then |
5291 | : | |
5292 | elif test $count = ax; then | |
861bb6c1 JL |
5293 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5294 | else | |
5295 | echo "Using the following build machine macro files:" | |
5296 | for f in $build_xm_file; do | |
5297 | echo " $srcdir/config/$f" | |
5298 | done | |
5299 | fi | |
5300 | fi | |
5301 | ||
75bffa71 ILT |
5302 | if test x$thread_file = x; then |
5303 | if test x$target_thread_file != x; then | |
a851212a JW |
5304 | thread_file=$target_thread_file |
5305 | else | |
5306 | thread_file='single' | |
5307 | fi | |
861bb6c1 JL |
5308 | fi |
5309 | ||
2121a768 JT |
5310 | if test x$enable___cxa_atexit = xyes || \ |
5311 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
5312 | cat >> confdefs.h <<\EOF | |
5313 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
5314 | EOF | |
5315 | ||
5316 | fi | |
5317 | ||
a5381466 | 5318 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5319 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5320 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
093e61a6 RS |
5321 | |
5322 | cat >> confdefs.h <<EOF | |
1c0ca89d | 5323 | #define EXTRA_MODES_FILE "$extra_modes" |
093e61a6 | 5324 | EOF |
cafe096b | 5325 | |
093e61a6 | 5326 | cat >> confdefs.h <<\EOF |
a5381466 | 5327 | #define EXTRA_CC_MODES 1 |
093e61a6 | 5328 | EOF |
a5381466 ZW |
5329 | |
5330 | fi | |
5331 | ||
b7cb92ad | 5332 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5333 | # the first file included by config.h. |
4977bab6 | 5334 | # If host=build, it is correct to have bconfig include auto-host.h |
093e61a6 | 5335 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5336 | # work to find out the build config parameters. |
75bffa71 | 5337 | if test x$host = x$build |
db81d74a | 5338 | then |
eaf4e618 | 5339 | build_auto=auto-host.h |
06f0b04c | 5340 | FORBUILD=.. |
b7cb92ad JL |
5341 | else |
5342 | # We create a subdir, then run autoconf in the subdir. | |
5343 | # To prevent recursion we set host and build for the new | |
5344 | # invocation of configure to the build for this invocation | |
093e61a6 | 5345 | # of configure. |
b7cb92ad JL |
5346 | tempdir=build.$$ |
5347 | rm -rf $tempdir | |
5348 | mkdir $tempdir | |
5349 | cd $tempdir | |
5350 | case ${srcdir} in | |
255b8a49 | 5351 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5352 | *) realsrcdir=../${srcdir};; |
5353 | esac | |
d920e825 L |
5354 | saved_CFLAGS="${CFLAGS}" |
5355 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5356 | ${realsrcdir}/configure \ | |
534d0cc0 | 5357 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5358 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5359 | |
5360 | # We just finished tests for the build machine, so rename | |
5361 | # the file auto-build.h in the gcc directory. | |
5362 | mv auto-host.h ../auto-build.h | |
5363 | cd .. | |
5364 | rm -rf $tempdir | |
eaf4e618 | 5365 | build_auto=auto-build.h |
61138bb6 | 5366 | FORBUILD=../build-$build_alias |
db81d74a RH |
5367 | fi |
5368 | ||
06f0b04c | 5369 | |
eaf4e618 | 5370 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5371 | tm_p_file="${tm_p_file} tm-preds.h" |
5372 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5373 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5374 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5375 | # put this back in temporarily. |
5376 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5377 | |
34a86c2b NN |
5378 | # -------- |
5379 | # UNSORTED | |
5380 | # -------- | |
5381 | ||
861bb6c1 | 5382 | # Truncate the target if necessary |
75bffa71 | 5383 | if test x$host_truncate_target != x; then |
861bb6c1 JL |
5384 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
5385 | fi | |
5386 | ||
f1943b77 | 5387 | # Get the version trigger filename from the toplevel |
75bffa71 | 5388 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5389 | gcc_version_trigger=$with_gcc_version_trigger |
5390 | else | |
5391 | gcc_version_trigger=${srcdir}/version.c | |
5392 | fi | |
022dae81 | 5393 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5394 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5395 | |
cc1e60ea | 5396 | # Compile in configure arguments. |
8105825d | 5397 | if test -f configargs.h ; then |
cc1e60ea | 5398 | # Being re-configured. |
022dae81 | 5399 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5400 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5401 | else | |
5402 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5403 | fi | |
5404 | cat > configargs.h <<EOF | |
5405 | /* Generated automatically. */ | |
5406 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5407 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5408 | |
5409 | static const struct { | |
5410 | const char *name, *value; | |
5411 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5412 | EOF |
5413 | ||
ab87f8c8 JL |
5414 | # Internationalization |
5415 | PACKAGE=gcc | |
5416 | VERSION="$gcc_version" | |
861bb6c1 | 5417 | |
ab87f8c8 JL |
5418 | |
5419 | ||
dc6746e7 | 5420 | # Enable NLS support by default |
ab87f8c8 JL |
5421 | # Check whether --enable-nls or --disable-nls was given. |
5422 | if test "${enable_nls+set}" = set; then | |
5423 | enableval="$enable_nls" | |
093e61a6 | 5424 | : |
861bb6c1 | 5425 | else |
dc6746e7 | 5426 | enable_nls=yes |
093e61a6 RS |
5427 | fi |
5428 | ||
861bb6c1 | 5429 | |
dc6746e7 PT |
5430 | # if cross compiling, disable NLS support. |
5431 | # It's not worth the trouble, at least for now. | |
5432 | ||
063a4b85 | 5433 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
093e61a6 | 5434 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
dc6746e7 PT |
5435 | enable_nls=no |
5436 | fi | |
5437 | ||
861bb6c1 | 5438 | |
093e61a6 RS |
5439 | |
5440 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
6a1b7268 | 5441 | echo "configure:5442: checking for library containing strerror" >&5 |
093e61a6 RS |
5442 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
5443 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5444 | else |
093e61a6 RS |
5445 | ac_func_search_save_LIBS="$LIBS" |
5446 | ac_cv_search_strerror="no" | |
5447 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5448 | #line 5449 "configure" |
093e61a6 | 5449 | #include "confdefs.h" |
ab87f8c8 JL |
5450 | /* Override any gcc2 internal prototype to avoid an error. */ |
5451 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5452 | builtin and then its argument prototype would still apply. */ |
5453 | char strerror(); | |
5454 | ||
5455 | int main() { | |
5456 | strerror() | |
5457 | ; return 0; } | |
5458 | EOF | |
6a1b7268 | 5459 | if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5460 | rm -rf conftest* |
71a94577 | 5461 | ac_cv_search_strerror="none required" |
ab87f8c8 | 5462 | else |
093e61a6 RS |
5463 | echo "configure: failed program was:" >&5 |
5464 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5465 | fi |
093e61a6 RS |
5466 | rm -f conftest* |
5467 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do | |
5468 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5469 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5470 | #line 5471 "configure" |
093e61a6 | 5471 | #include "confdefs.h" |
71a94577 ZW |
5472 | /* Override any gcc2 internal prototype to avoid an error. */ |
5473 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5474 | builtin and then its argument prototype would still apply. */ |
5475 | char strerror(); | |
5476 | ||
5477 | int main() { | |
5478 | strerror() | |
5479 | ; return 0; } | |
5480 | EOF | |
6a1b7268 | 5481 | if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5482 | rm -rf conftest* |
5483 | ac_cv_search_strerror="-l$i" | |
71a94577 | 5484 | break |
861bb6c1 | 5485 | else |
093e61a6 RS |
5486 | echo "configure: failed program was:" >&5 |
5487 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5488 | fi |
093e61a6 RS |
5489 | rm -f conftest* |
5490 | done | |
5491 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 5492 | fi |
cafe096b | 5493 | |
093e61a6 RS |
5494 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5495 | if test "$ac_cv_search_strerror" != "no"; then | |
5496 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5497 | ||
5498 | else : | |
5499 | ||
71a94577 | 5500 | fi |
093e61a6 | 5501 | |
2ce3c6c6 | 5502 | |
093e61a6 | 5503 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
6a1b7268 | 5504 | echo "configure:5505: checking for working const" >&5 |
093e61a6 RS |
5505 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5506 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5507 | else |
093e61a6 | 5508 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5509 | #line 5510 "configure" |
093e61a6 | 5510 | #include "confdefs.h" |
ab87f8c8 | 5511 | |
093e61a6 RS |
5512 | int main() { |
5513 | ||
5514 | /* Ultrix mips cc rejects this. */ | |
5515 | typedef int charset[2]; const charset x; | |
5516 | /* SunOS 4.1.1 cc rejects this. */ | |
5517 | char const *const *ccp; | |
5518 | char **p; | |
5519 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5520 | struct point {int x, y;}; | |
5521 | static struct point const zero = {0,0}; | |
5522 | /* AIX XL C 1.02.0.0 rejects this. | |
5523 | It does not let you subtract one const X* pointer from another in an arm | |
5524 | of an if-expression whose if-part is not a constant expression */ | |
5525 | const char *g = "string"; | |
5526 | ccp = &g + (g ? g-g : 0); | |
5527 | /* HPUX 7.0 cc rejects these. */ | |
5528 | ++ccp; | |
5529 | p = (char**) ccp; | |
5530 | ccp = (char const *const *) p; | |
5531 | { /* SCO 3.2v4 cc rejects this. */ | |
5532 | char *t; | |
5533 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5534 | ||
5535 | *t++ = 0; | |
5536 | } | |
5537 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5538 | int x[] = {25, 17}; | |
5539 | const int *foo = &x[0]; | |
5540 | ++foo; | |
5541 | } | |
5542 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5543 | typedef const int *iptr; | |
5544 | iptr p = 0; | |
5545 | ++p; | |
cafe096b | 5546 | } |
093e61a6 RS |
5547 | { /* AIX XL C 1.02.0.0 rejects this saying |
5548 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5549 | struct s { int j; const int *ap[3]; }; | |
5550 | struct s *b; b->j = 5; | |
5551 | } | |
5552 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5553 | const int foo = 10; | |
5554 | } | |
5555 | ||
5556 | ; return 0; } | |
5557 | EOF | |
6a1b7268 | 5558 | if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5559 | rm -rf conftest* |
ab87f8c8 | 5560 | ac_cv_c_const=yes |
861bb6c1 | 5561 | else |
093e61a6 RS |
5562 | echo "configure: failed program was:" >&5 |
5563 | cat conftest.$ac_ext >&5 | |
5564 | rm -rf conftest* | |
5565 | ac_cv_c_const=no | |
861bb6c1 | 5566 | fi |
093e61a6 | 5567 | rm -f conftest* |
861bb6c1 JL |
5568 | fi |
5569 | ||
093e61a6 RS |
5570 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5571 | if test $ac_cv_c_const = no; then | |
5572 | cat >> confdefs.h <<\EOF | |
5573 | #define const | |
5574 | EOF | |
ab87f8c8 JL |
5575 | |
5576 | fi | |
093e61a6 RS |
5577 | |
5578 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
6a1b7268 | 5579 | echo "configure:5580: checking for off_t" >&5 |
093e61a6 RS |
5580 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5582 | else | |
5583 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5584 | #line 5585 "configure" |
093e61a6 RS |
5585 | #include "confdefs.h" |
5586 | #include <sys/types.h> | |
5587 | #if STDC_HEADERS | |
5588 | #include <stdlib.h> | |
5589 | #include <stddef.h> | |
5590 | #endif | |
5591 | EOF | |
5592 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5593 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5594 | rm -rf conftest* | |
5595 | ac_cv_type_off_t=yes | |
cafe096b | 5596 | else |
093e61a6 RS |
5597 | rm -rf conftest* |
5598 | ac_cv_type_off_t=no | |
5599 | fi | |
5600 | rm -f conftest* | |
cafe096b | 5601 | |
093e61a6 RS |
5602 | fi |
5603 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
5604 | if test $ac_cv_type_off_t = no; then | |
5605 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5606 | #define off_t long |
093e61a6 | 5607 | EOF |
ab87f8c8 JL |
5608 | |
5609 | fi | |
5610 | ||
093e61a6 | 5611 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
6a1b7268 | 5612 | echo "configure:5613: checking for size_t" >&5 |
093e61a6 RS |
5613 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5614 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5615 | else |
093e61a6 | 5616 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5617 | #line 5618 "configure" |
093e61a6 RS |
5618 | #include "confdefs.h" |
5619 | #include <sys/types.h> | |
5620 | #if STDC_HEADERS | |
5621 | #include <stdlib.h> | |
5622 | #include <stddef.h> | |
5623 | #endif | |
5624 | EOF | |
5625 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5626 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5627 | rm -rf conftest* | |
cb65112a | 5628 | ac_cv_type_size_t=yes |
ab87f8c8 | 5629 | else |
093e61a6 RS |
5630 | rm -rf conftest* |
5631 | ac_cv_type_size_t=no | |
ab87f8c8 | 5632 | fi |
093e61a6 | 5633 | rm -f conftest* |
cafe096b | 5634 | |
093e61a6 RS |
5635 | fi |
5636 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
5637 | if test $ac_cv_type_size_t = no; then | |
5638 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5639 | #define size_t unsigned |
093e61a6 | 5640 | EOF |
ab87f8c8 JL |
5641 | |
5642 | fi | |
5643 | ||
71a94577 ZW |
5644 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5645 | # for constant arguments. Useless! | |
093e61a6 | 5646 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
6a1b7268 | 5647 | echo "configure:5648: checking for working alloca.h" >&5 |
093e61a6 RS |
5648 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5649 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5650 | else | |
5651 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5652 | #line 5653 "configure" |
093e61a6 | 5653 | #include "confdefs.h" |
71a94577 | 5654 | #include <alloca.h> |
093e61a6 RS |
5655 | int main() { |
5656 | char *p = alloca(2 * sizeof(int)); | |
5657 | ; return 0; } | |
5658 | EOF | |
6a1b7268 | 5659 | if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5660 | rm -rf conftest* |
5661 | ac_cv_header_alloca_h=yes | |
5662 | else | |
5663 | echo "configure: failed program was:" >&5 | |
5664 | cat conftest.$ac_ext >&5 | |
5665 | rm -rf conftest* | |
5666 | ac_cv_header_alloca_h=no | |
5667 | fi | |
5668 | rm -f conftest* | |
5669 | fi | |
5670 | ||
5671 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5672 | if test $ac_cv_header_alloca_h = yes; then | |
5673 | cat >> confdefs.h <<\EOF | |
71a94577 | 5674 | #define HAVE_ALLOCA_H 1 |
093e61a6 | 5675 | EOF |
71a94577 | 5676 | |
ab87f8c8 | 5677 | fi |
ab87f8c8 | 5678 | |
093e61a6 | 5679 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
6a1b7268 | 5680 | echo "configure:5681: checking for alloca" >&5 |
093e61a6 RS |
5681 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5682 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5683 | else |
093e61a6 | 5684 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5685 | #line 5686 "configure" |
093e61a6 RS |
5686 | #include "confdefs.h" |
5687 | ||
71a94577 ZW |
5688 | #ifdef __GNUC__ |
5689 | # define alloca __builtin_alloca | |
ab87f8c8 | 5690 | #else |
71a94577 ZW |
5691 | # ifdef _MSC_VER |
5692 | # include <malloc.h> | |
5693 | # define alloca _alloca | |
5694 | # else | |
5695 | # if HAVE_ALLOCA_H | |
5696 | # include <alloca.h> | |
5697 | # else | |
5698 | # ifdef _AIX | |
5699 | #pragma alloca | |
5700 | # else | |
5701 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5702 | char *alloca (); | |
5703 | # endif | |
5704 | # endif | |
5705 | # endif | |
5706 | # endif | |
ab87f8c8 JL |
5707 | #endif |
5708 | ||
093e61a6 RS |
5709 | int main() { |
5710 | char *p = (char *) alloca(1); | |
5711 | ; return 0; } | |
5712 | EOF | |
6a1b7268 | 5713 | if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5714 | rm -rf conftest* |
71a94577 | 5715 | ac_cv_func_alloca_works=yes |
ab87f8c8 | 5716 | else |
093e61a6 RS |
5717 | echo "configure: failed program was:" >&5 |
5718 | cat conftest.$ac_ext >&5 | |
5719 | rm -rf conftest* | |
5720 | ac_cv_func_alloca_works=no | |
ab87f8c8 | 5721 | fi |
093e61a6 | 5722 | rm -f conftest* |
ab87f8c8 JL |
5723 | fi |
5724 | ||
093e61a6 | 5725 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
71a94577 | 5726 | if test $ac_cv_func_alloca_works = yes; then |
093e61a6 | 5727 | cat >> confdefs.h <<\EOF |
cafe096b | 5728 | #define HAVE_ALLOCA 1 |
093e61a6 | 5729 | EOF |
cafe096b | 5730 | |
093e61a6 | 5731 | fi |
cafe096b | 5732 | |
093e61a6 RS |
5733 | if test $ac_cv_func_alloca_works = no; then |
5734 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5735 | # that cause trouble. Some versions do not even contain alloca or | |
5736 | # contain a buggy version. If you still want to use their alloca, | |
5737 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5738 | ALLOCA=alloca.${ac_objext} | |
5739 | cat >> confdefs.h <<\EOF | |
71a94577 | 5740 | #define C_ALLOCA 1 |
093e61a6 | 5741 | EOF |
71a94577 ZW |
5742 | |
5743 | ||
093e61a6 | 5744 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
6a1b7268 | 5745 | echo "configure:5746: checking whether alloca needs Cray hooks" >&5 |
093e61a6 RS |
5746 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5747 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5748 | else |
093e61a6 | 5749 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5750 | #line 5751 "configure" |
093e61a6 | 5751 | #include "confdefs.h" |
71a94577 ZW |
5752 | #if defined(CRAY) && ! defined(CRAY2) |
5753 | webecray | |
5754 | #else | |
5755 | wenotbecray | |
5756 | #endif | |
5757 | ||
093e61a6 | 5758 | EOF |
71a94577 | 5759 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5760 | egrep "webecray" >/dev/null 2>&1; then |
5761 | rm -rf conftest* | |
71a94577 ZW |
5762 | ac_cv_os_cray=yes |
5763 | else | |
093e61a6 | 5764 | rm -rf conftest* |
71a94577 | 5765 | ac_cv_os_cray=no |
ab87f8c8 | 5766 | fi |
71a94577 | 5767 | rm -f conftest* |
ab87f8c8 | 5768 | |
71a94577 | 5769 | fi |
093e61a6 RS |
5770 | |
5771 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
71a94577 | 5772 | if test $ac_cv_os_cray = yes; then |
093e61a6 RS |
5773 | for ac_func in _getb67 GETB67 getb67; do |
5774 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6a1b7268 | 5775 | echo "configure:5776: checking for $ac_func" >&5 |
093e61a6 RS |
5776 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5777 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5778 | else | |
5779 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5780 | #line 5781 "configure" |
093e61a6 | 5781 | #include "confdefs.h" |
ab87f8c8 | 5782 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5783 | which can conflict with char $ac_func(); below. */ |
5784 | #include <assert.h> | |
ab87f8c8 JL |
5785 | /* Override any gcc2 internal prototype to avoid an error. */ |
5786 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5787 | builtin and then its argument prototype would still apply. */ |
5788 | char $ac_func(); | |
5789 | ||
5790 | int main() { | |
5791 | ||
ab87f8c8 JL |
5792 | /* The GNU C library defines this for functions which it implements |
5793 | to always fail with ENOSYS. Some functions are actually named | |
5794 | something starting with __ and the normal name is an alias. */ | |
5795 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5796 | choke me | |
5797 | #else | |
093e61a6 | 5798 | $ac_func(); |
ab87f8c8 JL |
5799 | #endif |
5800 | ||
093e61a6 RS |
5801 | ; return 0; } |
5802 | EOF | |
6a1b7268 | 5803 | if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5804 | rm -rf conftest* |
5805 | eval "ac_cv_func_$ac_func=yes" | |
5806 | else | |
5807 | echo "configure: failed program was:" >&5 | |
5808 | cat conftest.$ac_ext >&5 | |
5809 | rm -rf conftest* | |
5810 | eval "ac_cv_func_$ac_func=no" | |
5811 | fi | |
5812 | rm -f conftest* | |
5813 | fi | |
5814 | ||
5815 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5816 | echo "$ac_t""yes" 1>&6 | |
5817 | cat >> confdefs.h <<EOF | |
71a94577 | 5818 | #define CRAY_STACKSEG_END $ac_func |
093e61a6 | 5819 | EOF |
71a94577 | 5820 | |
093e61a6 RS |
5821 | break |
5822 | else | |
5823 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5824 | fi |
ab87f8c8 | 5825 | |
093e61a6 | 5826 | done |
71a94577 | 5827 | fi |
ab87f8c8 | 5828 | |
093e61a6 | 5829 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
6a1b7268 | 5830 | echo "configure:5831: checking stack direction for C alloca" >&5 |
093e61a6 RS |
5831 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5832 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
5833 | else |
5834 | if test "$cross_compiling" = yes; then | |
5835 | ac_cv_c_stack_direction=0 | |
ab87f8c8 | 5836 | else |
093e61a6 | 5837 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5838 | #line 5839 "configure" |
093e61a6 | 5839 | #include "confdefs.h" |
71a94577 ZW |
5840 | find_stack_direction () |
5841 | { | |
5842 | static char *addr = 0; | |
5843 | auto char dummy; | |
5844 | if (addr == 0) | |
5845 | { | |
5846 | addr = &dummy; | |
5847 | return find_stack_direction (); | |
5848 | } | |
5849 | else | |
5850 | return (&dummy > addr) ? 1 : -1; | |
5851 | } | |
5852 | main () | |
5853 | { | |
093e61a6 | 5854 | exit (find_stack_direction() < 0); |
71a94577 | 5855 | } |
093e61a6 | 5856 | EOF |
6a1b7268 | 5857 | if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5858 | then |
71a94577 | 5859 | ac_cv_c_stack_direction=1 |
ab87f8c8 | 5860 | else |
093e61a6 RS |
5861 | echo "configure: failed program was:" >&5 |
5862 | cat conftest.$ac_ext >&5 | |
5863 | rm -fr conftest* | |
5864 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5865 | fi |
093e61a6 | 5866 | rm -fr conftest* |
ab87f8c8 | 5867 | fi |
093e61a6 | 5868 | |
71a94577 ZW |
5869 | fi |
5870 | ||
093e61a6 RS |
5871 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
5872 | cat >> confdefs.h <<EOF | |
71a94577 | 5873 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
093e61a6 | 5874 | EOF |
ab87f8c8 | 5875 | |
ab87f8c8 JL |
5876 | fi |
5877 | ||
ab87f8c8 | 5878 | |
093e61a6 | 5879 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
6a1b7268 | 5880 | echo "configure:5881: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
093e61a6 RS |
5881 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5882 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 5883 | else |
093e61a6 | 5884 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 5885 | #line 5886 "configure" |
093e61a6 | 5886 | #include "confdefs.h" |
ab87f8c8 | 5887 | |
71a94577 ZW |
5888 | #include <features.h> |
5889 | #ifdef __GNU_LIBRARY__ | |
5890 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5891 | Lucky GNU user | |
5892 | #endif | |
5893 | #endif | |
093e61a6 RS |
5894 | |
5895 | EOF | |
71a94577 | 5896 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5897 | egrep "Lucky GNU user" >/dev/null 2>&1; then |
5898 | rm -rf conftest* | |
71a94577 | 5899 | ac_cv_gnu_library_2_1=yes |
ab87f8c8 | 5900 | else |
093e61a6 | 5901 | rm -rf conftest* |
71a94577 | 5902 | ac_cv_gnu_library_2_1=no |
ab87f8c8 | 5903 | fi |
71a94577 | 5904 | rm -f conftest* |
ab87f8c8 | 5905 | |
093e61a6 RS |
5906 | |
5907 | ||
71a94577 | 5908 | fi |
ab87f8c8 | 5909 | |
093e61a6 RS |
5910 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5911 | ||
71a94577 | 5912 | GLIBC21="$ac_cv_gnu_library_2_1" |
093e61a6 | 5913 | |
ab87f8c8 | 5914 | |
093e61a6 RS |
5915 | |
5916 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
71a94577 ZW |
5917 | stdlib.h string.h unistd.h sys/param.h |
5918 | do | |
093e61a6 RS |
5919 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5920 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
6a1b7268 | 5921 | echo "configure:5922: checking for $ac_hdr" >&5 |
093e61a6 RS |
5922 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5923 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5924 | else | |
5925 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5926 | #line 5927 "configure" |
093e61a6 RS |
5927 | #include "confdefs.h" |
5928 | #include <$ac_hdr> | |
5929 | EOF | |
5930 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 5931 | { (eval echo configure:5932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
5932 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5933 | if test -z "$ac_err"; then | |
5934 | rm -rf conftest* | |
5935 | eval "ac_cv_header_$ac_safe=yes" | |
5936 | else | |
5937 | echo "$ac_err" >&5 | |
5938 | echo "configure: failed program was:" >&5 | |
5939 | cat conftest.$ac_ext >&5 | |
5940 | rm -rf conftest* | |
5941 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 5942 | fi |
093e61a6 | 5943 | rm -f conftest* |
ab87f8c8 | 5944 | fi |
093e61a6 RS |
5945 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5946 | echo "$ac_t""yes" 1>&6 | |
5947 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5948 | cat >> confdefs.h <<EOF | |
5949 | #define $ac_tr_hdr 1 | |
5950 | EOF | |
5951 | ||
5952 | else | |
5953 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5954 | fi |
71a94577 | 5955 | done |
ab87f8c8 | 5956 | |
093e61a6 | 5957 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
71a94577 ZW |
5958 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ |
5959 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5960 | do | |
093e61a6 | 5961 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
6a1b7268 | 5962 | echo "configure:5963: checking for $ac_func" >&5 |
093e61a6 RS |
5963 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5964 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5965 | else | |
5966 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 5967 | #line 5968 "configure" |
093e61a6 | 5968 | #include "confdefs.h" |
71a94577 | 5969 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5970 | which can conflict with char $ac_func(); below. */ |
5971 | #include <assert.h> | |
ab87f8c8 JL |
5972 | /* Override any gcc2 internal prototype to avoid an error. */ |
5973 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5974 | builtin and then its argument prototype would still apply. */ |
5975 | char $ac_func(); | |
5976 | ||
5977 | int main() { | |
5978 | ||
71a94577 ZW |
5979 | /* The GNU C library defines this for functions which it implements |
5980 | to always fail with ENOSYS. Some functions are actually named | |
5981 | something starting with __ and the normal name is an alias. */ | |
5982 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5983 | choke me | |
5984 | #else | |
093e61a6 | 5985 | $ac_func(); |
71a94577 ZW |
5986 | #endif |
5987 | ||
093e61a6 RS |
5988 | ; return 0; } |
5989 | EOF | |
6a1b7268 | 5990 | if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5991 | rm -rf conftest* |
5992 | eval "ac_cv_func_$ac_func=yes" | |
5993 | else | |
5994 | echo "configure: failed program was:" >&5 | |
5995 | cat conftest.$ac_ext >&5 | |
5996 | rm -rf conftest* | |
5997 | eval "ac_cv_func_$ac_func=no" | |
5998 | fi | |
5999 | rm -f conftest* | |
6000 | fi | |
71a94577 | 6001 | |
093e61a6 RS |
6002 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6003 | echo "$ac_t""yes" 1>&6 | |
6004 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6005 | cat >> confdefs.h <<EOF | |
6006 | #define $ac_tr_func 1 | |
6007 | EOF | |
6008 | ||
6009 | else | |
6010 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6011 | fi |
6012 | done | |
6013 | ||
6014 | ||
093e61a6 RS |
6015 | |
6016 | ||
b7f2fb96 | 6017 | am_cv_lib_iconv_ldpath= |
093e61a6 | 6018 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
71a94577 ZW |
6019 | if test "${with_libiconv_prefix+set}" = set; then |
6020 | withval="$with_libiconv_prefix" | |
093e61a6 | 6021 | |
71a94577 ZW |
6022 | for dir in `echo "$withval" | tr : ' '`; do |
6023 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 6024 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 | 6025 | done |
093e61a6 RS |
6026 | |
6027 | fi | |
ab87f8c8 | 6028 | |
71a94577 | 6029 | |
093e61a6 | 6030 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
6a1b7268 | 6031 | echo "configure:6032: checking for iconv" >&5 |
093e61a6 RS |
6032 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
6033 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 6034 | else |
093e61a6 | 6035 | |
71a94577 ZW |
6036 | am_cv_func_iconv="no, consider installing GNU libiconv" |
6037 | am_cv_lib_iconv=no | |
093e61a6 | 6038 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 6039 | #line 6040 "configure" |
093e61a6 | 6040 | #include "confdefs.h" |
71a94577 ZW |
6041 | #include <stdlib.h> |
6042 | #include <iconv.h> | |
093e61a6 | 6043 | int main() { |
71a94577 ZW |
6044 | iconv_t cd = iconv_open("",""); |
6045 | iconv(cd,NULL,NULL,NULL,NULL); | |
6046 | iconv_close(cd); | |
093e61a6 RS |
6047 | ; return 0; } |
6048 | EOF | |
6a1b7268 | 6049 | if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6050 | rm -rf conftest* |
71a94577 | 6051 | am_cv_func_iconv=yes |
ab87f8c8 | 6052 | else |
093e61a6 RS |
6053 | echo "configure: failed program was:" >&5 |
6054 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6055 | fi |
093e61a6 | 6056 | rm -f conftest* |
71a94577 ZW |
6057 | if test "$am_cv_func_iconv" != yes; then |
6058 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 6059 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 6060 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 6061 | #line 6062 "configure" |
093e61a6 | 6062 | #include "confdefs.h" |
71a94577 ZW |
6063 | #include <stdlib.h> |
6064 | #include <iconv.h> | |
093e61a6 | 6065 | int main() { |
71a94577 ZW |
6066 | iconv_t cd = iconv_open("",""); |
6067 | iconv(cd,NULL,NULL,NULL,NULL); | |
6068 | iconv_close(cd); | |
093e61a6 RS |
6069 | ; return 0; } |
6070 | EOF | |
6a1b7268 | 6071 | if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6072 | rm -rf conftest* |
71a94577 ZW |
6073 | am_cv_lib_iconv=yes |
6074 | am_cv_func_iconv=yes | |
ab87f8c8 | 6075 | else |
093e61a6 RS |
6076 | echo "configure: failed program was:" >&5 |
6077 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 6078 | fi |
093e61a6 | 6079 | rm -f conftest* |
71a94577 ZW |
6080 | LIBS="$am_save_LIBS" |
6081 | fi | |
093e61a6 | 6082 | |
cafe096b | 6083 | fi |
cafe096b | 6084 | |
093e61a6 RS |
6085 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
6086 | if test "$am_cv_func_iconv" = yes; then | |
6087 | cat >> confdefs.h <<\EOF | |
71a94577 | 6088 | #define HAVE_ICONV 1 |
093e61a6 | 6089 | EOF |
71a94577 | 6090 | |
093e61a6 | 6091 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
6a1b7268 | 6092 | echo "configure:6093: checking for iconv declaration" >&5 |
093e61a6 RS |
6093 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
6094 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6095 | else |
093e61a6 RS |
6096 | |
6097 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6098 | #line 6099 "configure" |
093e61a6 | 6099 | #include "confdefs.h" |
ab87f8c8 | 6100 | |
71a94577 ZW |
6101 | #include <stdlib.h> |
6102 | #include <iconv.h> | |
6103 | extern | |
6104 | #ifdef __cplusplus | |
6105 | "C" | |
6106 | #endif | |
6107 | #if defined(__STDC__) || defined(__cplusplus) | |
6108 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
6109 | #else | |
6110 | size_t iconv(); | |
6111 | #endif | |
ab87f8c8 | 6112 | |
093e61a6 | 6113 | int main() { |
380a627a | 6114 | |
093e61a6 RS |
6115 | ; return 0; } |
6116 | EOF | |
6a1b7268 | 6117 | if { (eval echo configure:6118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 6118 | rm -rf conftest* |
71a94577 | 6119 | am_cv_proto_iconv_arg1="" |
ab87f8c8 | 6120 | else |
093e61a6 RS |
6121 | echo "configure: failed program was:" >&5 |
6122 | cat conftest.$ac_ext >&5 | |
6123 | rm -rf conftest* | |
6124 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 6125 | fi |
093e61a6 | 6126 | rm -f conftest* |
71a94577 | 6127 | 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 | 6128 | fi |
71a94577 ZW |
6129 | |
6130 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
6131 | echo "$ac_t""${ac_t:- |
6132 | }$am_cv_proto_iconv" 1>&6 | |
6133 | cat >> confdefs.h <<EOF | |
71a94577 | 6134 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 6135 | EOF |
71a94577 ZW |
6136 | |
6137 | fi | |
6138 | LIBICONV= | |
6139 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 6140 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 | 6141 | fi |
093e61a6 | 6142 | |
71a94577 | 6143 | |
093e61a6 RS |
6144 | |
6145 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
6a1b7268 | 6146 | echo "configure:6147: checking for nl_langinfo and CODESET" >&5 |
093e61a6 RS |
6147 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
6148 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6149 | else |
093e61a6 | 6150 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 6151 | #line 6152 "configure" |
093e61a6 | 6152 | #include "confdefs.h" |
71a94577 | 6153 | #include <langinfo.h> |
093e61a6 | 6154 | int main() { |
71a94577 | 6155 | char* cs = nl_langinfo(CODESET); |
093e61a6 RS |
6156 | ; return 0; } |
6157 | EOF | |
6a1b7268 | 6158 | if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6159 | rm -rf conftest* |
71a94577 | 6160 | am_cv_langinfo_codeset=yes |
ab87f8c8 | 6161 | else |
093e61a6 RS |
6162 | echo "configure: failed program was:" >&5 |
6163 | cat conftest.$ac_ext >&5 | |
6164 | rm -rf conftest* | |
6165 | am_cv_langinfo_codeset=no | |
ab87f8c8 | 6166 | fi |
093e61a6 RS |
6167 | rm -f conftest* |
6168 | ||
cafe096b | 6169 | fi |
cafe096b | 6170 | |
093e61a6 RS |
6171 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
6172 | if test $am_cv_langinfo_codeset = yes; then | |
6173 | cat >> confdefs.h <<\EOF | |
71a94577 | 6174 | #define HAVE_LANGINFO_CODESET 1 |
093e61a6 | 6175 | EOF |
ab87f8c8 | 6176 | |
71a94577 ZW |
6177 | fi |
6178 | ||
6179 | if test $ac_cv_header_locale_h = yes; then | |
093e61a6 | 6180 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
6a1b7268 | 6181 | echo "configure:6182: checking for LC_MESSAGES" >&5 |
093e61a6 RS |
6182 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
6183 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6184 | else | |
6185 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6186 | #line 6187 "configure" |
093e61a6 | 6187 | #include "confdefs.h" |
71a94577 | 6188 | #include <locale.h> |
093e61a6 | 6189 | int main() { |
71a94577 | 6190 | return LC_MESSAGES |
093e61a6 RS |
6191 | ; return 0; } |
6192 | EOF | |
6a1b7268 | 6193 | if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6194 | rm -rf conftest* |
71a94577 ZW |
6195 | am_cv_val_LC_MESSAGES=yes |
6196 | else | |
093e61a6 RS |
6197 | echo "configure: failed program was:" >&5 |
6198 | cat conftest.$ac_ext >&5 | |
6199 | rm -rf conftest* | |
6200 | am_cv_val_LC_MESSAGES=no | |
71a94577 | 6201 | fi |
093e61a6 | 6202 | rm -f conftest* |
71a94577 | 6203 | fi |
cafe096b | 6204 | |
093e61a6 RS |
6205 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
6206 | if test $am_cv_val_LC_MESSAGES = yes; then | |
6207 | cat >> confdefs.h <<\EOF | |
71a94577 | 6208 | #define HAVE_LC_MESSAGES 1 |
093e61a6 | 6209 | EOF |
71a94577 | 6210 | |
ab87f8c8 | 6211 | fi |
71a94577 | 6212 | fi |
093e61a6 | 6213 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
6a1b7268 | 6214 | echo "configure:6215: checking whether NLS is requested" >&5 |
71a94577 ZW |
6215 | # Check whether --enable-nls or --disable-nls was given. |
6216 | if test "${enable_nls+set}" = set; then | |
6217 | enableval="$enable_nls" | |
6218 | USE_NLS=$enableval | |
6219 | else | |
6220 | USE_NLS=yes | |
093e61a6 | 6221 | fi |
71a94577 | 6222 | |
093e61a6 RS |
6223 | echo "$ac_t""$USE_NLS" 1>&6 |
6224 | ||
71a94577 ZW |
6225 | |
6226 | BUILD_INCLUDED_LIBINTL=no | |
6227 | USE_INCLUDED_LIBINTL=no | |
6228 | INTLLIBS= | |
77c06844 | 6229 | INTLDEPS= |
71a94577 ZW |
6230 | |
6231 | if test "$USE_NLS" = "yes"; then | |
093e61a6 | 6232 | cat >> confdefs.h <<\EOF |
71a94577 | 6233 | #define ENABLE_NLS 1 |
093e61a6 | 6234 | EOF |
71a94577 | 6235 | |
093e61a6 | 6236 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 |
6a1b7268 | 6237 | echo "configure:6238: checking whether included gettext is requested" >&5 |
093e61a6 | 6238 | # Check whether --with-included-gettext or --without-included-gettext was given. |
71a94577 ZW |
6239 | if test "${with_included_gettext+set}" = set; then |
6240 | withval="$with_included_gettext" | |
6241 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 6242 | else |
71a94577 | 6243 | nls_cv_force_use_gnu_gettext=no |
093e61a6 RS |
6244 | fi |
6245 | ||
6246 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
71a94577 ZW |
6247 | |
6248 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
6249 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
6250 | CATOBJEXT=NONE | |
6251 | ||
093e61a6 RS |
6252 | |
6253 | ||
71a94577 | 6254 | |
093e61a6 RS |
6255 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` |
6256 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
6a1b7268 | 6257 | echo "configure:6258: checking for libintl.h" >&5 |
093e61a6 RS |
6258 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6259 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6260 | else |
093e61a6 | 6261 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 6262 | #line 6263 "configure" |
093e61a6 | 6263 | #include "confdefs.h" |
cafe096b | 6264 | #include <libintl.h> |
093e61a6 RS |
6265 | EOF |
6266 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
6a1b7268 | 6267 | { (eval echo configure:6268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
6268 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6269 | if test -z "$ac_err"; then | |
6270 | rm -rf conftest* | |
6271 | eval "ac_cv_header_$ac_safe=yes" | |
6272 | else | |
6273 | echo "$ac_err" >&5 | |
6274 | echo "configure: failed program was:" >&5 | |
6275 | cat conftest.$ac_ext >&5 | |
6276 | rm -rf conftest* | |
6277 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6278 | fi |
093e61a6 | 6279 | rm -f conftest* |
71a94577 | 6280 | fi |
093e61a6 RS |
6281 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6282 | echo "$ac_t""yes" 1>&6 | |
6283 | cat >> confdefs.h <<\EOF | |
cafe096b | 6284 | #define HAVE_LIBINTL_H 1 |
093e61a6 RS |
6285 | EOF |
6286 | ||
6287 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
6a1b7268 | 6288 | echo "configure:6289: checking for GNU gettext in libc" >&5 |
093e61a6 RS |
6289 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6290 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6291 | else | |
6292 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6293 | #line 6294 "configure" |
093e61a6 | 6294 | #include "confdefs.h" |
71a94577 | 6295 | #include <libintl.h> |
ab87f8c8 | 6296 | extern int _nl_msg_cat_cntr; |
093e61a6 | 6297 | int main() { |
71a94577 ZW |
6298 | bindtextdomain ("", ""); |
6299 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6300 | ; return 0; } |
6301 | EOF | |
6a1b7268 | 6302 | if { (eval echo configure:6303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6303 | rm -rf conftest* |
71a94577 | 6304 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 | 6305 | else |
093e61a6 RS |
6306 | echo "configure: failed program was:" >&5 |
6307 | cat conftest.$ac_ext >&5 | |
6308 | rm -rf conftest* | |
6309 | gt_cv_func_gnugettext1_libc=no | |
ab87f8c8 | 6310 | fi |
093e61a6 | 6311 | rm -f conftest* |
ab87f8c8 | 6312 | fi |
093e61a6 RS |
6313 | |
6314 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 | |
ab87f8c8 | 6315 | |
71a94577 | 6316 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
093e61a6 | 6317 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 |
6a1b7268 | 6318 | echo "configure:6319: checking for GNU gettext in libintl" >&5 |
093e61a6 RS |
6319 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
6320 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6321 | else |
71a94577 ZW |
6322 | gt_save_LIBS="$LIBS" |
6323 | LIBS="$LIBS -lintl $LIBICONV" | |
093e61a6 | 6324 | cat > conftest.$ac_ext <<EOF |
6a1b7268 | 6325 | #line 6326 "configure" |
093e61a6 | 6326 | #include "confdefs.h" |
71a94577 ZW |
6327 | #include <libintl.h> |
6328 | extern int _nl_msg_cat_cntr; | |
093e61a6 | 6329 | int main() { |
71a94577 ZW |
6330 | bindtextdomain ("", ""); |
6331 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6332 | ; return 0; } |
6333 | EOF | |
6a1b7268 | 6334 | if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6335 | rm -rf conftest* |
71a94577 | 6336 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 | 6337 | else |
093e61a6 RS |
6338 | echo "configure: failed program was:" >&5 |
6339 | cat conftest.$ac_ext >&5 | |
6340 | rm -rf conftest* | |
6341 | gt_cv_func_gnugettext1_libintl=no | |
ab87f8c8 | 6342 | fi |
093e61a6 | 6343 | rm -f conftest* |
71a94577 | 6344 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6345 | fi |
093e61a6 RS |
6346 | |
6347 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
71a94577 ZW |
6348 | fi |
6349 | ||
6350 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6351 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6352 | && test "$PACKAGE" != gettext; }; then | |
093e61a6 | 6353 | cat >> confdefs.h <<\EOF |
71a94577 | 6354 | #define HAVE_GETTEXT 1 |
093e61a6 | 6355 | EOF |
ab87f8c8 | 6356 | |
ab87f8c8 | 6357 | |
71a94577 ZW |
6358 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6359 | INTLLIBS="-lintl $LIBICONV" | |
6360 | fi | |
ab87f8c8 | 6361 | |
71a94577 ZW |
6362 | gt_save_LIBS="$LIBS" |
6363 | LIBS="$LIBS $INTLLIBS" | |
093e61a6 | 6364 | for ac_func in dcgettext |
71a94577 | 6365 | do |
093e61a6 | 6366 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
6a1b7268 | 6367 | echo "configure:6368: checking for $ac_func" >&5 |
093e61a6 RS |
6368 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6369 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6370 | else | |
6371 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6372 | #line 6373 "configure" |
093e61a6 | 6373 | #include "confdefs.h" |
ab87f8c8 | 6374 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
6375 | which can conflict with char $ac_func(); below. */ |
6376 | #include <assert.h> | |
ab87f8c8 JL |
6377 | /* Override any gcc2 internal prototype to avoid an error. */ |
6378 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6379 | builtin and then its argument prototype would still apply. */ |
6380 | char $ac_func(); | |
6381 | ||
6382 | int main() { | |
6383 | ||
ab87f8c8 JL |
6384 | /* The GNU C library defines this for functions which it implements |
6385 | to always fail with ENOSYS. Some functions are actually named | |
6386 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6387 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6388 | choke me |
6389 | #else | |
093e61a6 | 6390 | $ac_func(); |
ab87f8c8 JL |
6391 | #endif |
6392 | ||
093e61a6 RS |
6393 | ; return 0; } |
6394 | EOF | |
6a1b7268 | 6395 | if { (eval echo configure:6396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6396 | rm -rf conftest* |
6397 | eval "ac_cv_func_$ac_func=yes" | |
6398 | else | |
6399 | echo "configure: failed program was:" >&5 | |
6400 | cat conftest.$ac_ext >&5 | |
6401 | rm -rf conftest* | |
6402 | eval "ac_cv_func_$ac_func=no" | |
6403 | fi | |
6404 | rm -f conftest* | |
6405 | fi | |
ab87f8c8 | 6406 | |
093e61a6 RS |
6407 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6408 | echo "$ac_t""yes" 1>&6 | |
6409 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6410 | cat >> confdefs.h <<EOF | |
6411 | #define $ac_tr_func 1 | |
6412 | EOF | |
6413 | ||
6414 | else | |
6415 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6416 | fi |
6417 | done | |
ab87f8c8 | 6418 | |
71a94577 ZW |
6419 | LIBS="$gt_save_LIBS" |
6420 | ||
6421 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6422 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6423 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6424 | echo "configure:6425: checking for $ac_word" >&5 |
093e61a6 RS |
6425 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6426 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6427 | else |
71a94577 | 6428 | case "$MSGFMT" in |
ab87f8c8 | 6429 | /*) |
71a94577 | 6430 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6431 | ;; |
6432 | *) | |
71a94577 ZW |
6433 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6434 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6435 | test -z "$ac_dir" && ac_dir=. |
6436 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6437 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6438 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6439 | break | |
6440 | fi | |
ab87f8c8 JL |
6441 | fi |
6442 | done | |
6443 | IFS="$ac_save_ifs" | |
71a94577 | 6444 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6445 | ;; |
6446 | esac | |
6447 | fi | |
71a94577 ZW |
6448 | MSGFMT="$ac_cv_path_MSGFMT" |
6449 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6450 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6451 | else |
093e61a6 | 6452 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 6453 | fi |
71a94577 ZW |
6454 | |
6455 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 | 6456 | set dummy gmsgfmt; ac_word=$2 |
093e61a6 | 6457 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6458 | echo "configure:6459: checking for $ac_word" >&5 |
093e61a6 RS |
6459 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6460 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6461 | else |
093e61a6 RS |
6462 | case "$GMSGFMT" in |
6463 | /*) | |
71a94577 | 6464 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6465 | ;; |
093e61a6 RS |
6466 | ?:/*) |
6467 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6468 | ;; | |
ab87f8c8 | 6469 | *) |
093e61a6 RS |
6470 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6471 | ac_dummy="$PATH" | |
6472 | for ac_dir in $ac_dummy; do | |
6473 | test -z "$ac_dir" && ac_dir=. | |
6474 | if test -f $ac_dir/$ac_word; then | |
6475 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6476 | break | |
6477 | fi | |
6478 | done | |
6479 | IFS="$ac_save_ifs" | |
71a94577 | 6480 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6481 | ;; |
6482 | esac | |
6483 | fi | |
093e61a6 | 6484 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6485 | if test -n "$GMSGFMT"; then |
093e61a6 | 6486 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6487 | else |
093e61a6 | 6488 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6489 | fi |
6490 | ||
ab87f8c8 | 6491 | |
71a94577 | 6492 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 | 6493 | set dummy xgettext; ac_word=$2 |
093e61a6 | 6494 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6495 | echo "configure:6496: checking for $ac_word" >&5 |
093e61a6 RS |
6496 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6497 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6498 | else |
6499 | case "$XGETTEXT" in | |
6500 | /*) | |
71a94577 | 6501 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6502 | ;; |
6503 | *) | |
6504 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6505 | for ac_dir in $PATH; do | |
6506 | test -z "$ac_dir" && ac_dir=. | |
6507 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6508 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6509 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6510 | break |
6511 | fi | |
6512 | fi | |
6513 | done | |
6514 | IFS="$ac_save_ifs" | |
71a94577 | 6515 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6516 | ;; |
6517 | esac | |
6518 | fi | |
71a94577 ZW |
6519 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6520 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6521 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6522 | else |
093e61a6 | 6523 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6524 | fi |
6525 | ||
71a94577 ZW |
6526 | |
6527 | CATOBJEXT=.gmo | |
6528 | fi | |
093e61a6 RS |
6529 | |
6530 | else | |
6531 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 JL |
6532 | fi |
6533 | ||
ab87f8c8 JL |
6534 | |
6535 | if test "$CATOBJEXT" = "NONE"; then | |
6536 | nls_cv_use_gnu_gettext=yes | |
6537 | fi | |
6538 | fi | |
6539 | ||
6540 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6541 | INTLOBJS="\$(GETTOBJS)" | |
6542 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6543 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6544 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6545 | echo "configure:6546: checking for $ac_word" >&5 |
093e61a6 RS |
6546 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6547 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6548 | else |
6549 | case "$MSGFMT" in | |
6550 | /*) | |
71a94577 | 6551 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6552 | ;; |
6553 | *) | |
6554 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6555 | for ac_dir in $PATH; do | |
6556 | test -z "$ac_dir" && ac_dir=. | |
6557 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6558 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6559 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6560 | break |
6561 | fi | |
6562 | fi | |
6563 | done | |
6564 | IFS="$ac_save_ifs" | |
71a94577 | 6565 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6566 | ;; |
6567 | esac | |
6568 | fi | |
71a94577 ZW |
6569 | MSGFMT="$ac_cv_path_MSGFMT" |
6570 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6571 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6572 | else |
093e61a6 | 6573 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6574 | fi |
6575 | ||
6576 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6577 | set dummy gmsgfmt; ac_word=$2 | |
093e61a6 | 6578 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6579 | echo "configure:6580: checking for $ac_word" >&5 |
093e61a6 RS |
6580 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6582 | else |
093e61a6 RS |
6583 | case "$GMSGFMT" in |
6584 | /*) | |
71a94577 | 6585 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6586 | ;; |
093e61a6 RS |
6587 | ?:/*) |
6588 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6589 | ;; | |
ab87f8c8 | 6590 | *) |
093e61a6 RS |
6591 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6592 | ac_dummy="$PATH" | |
6593 | for ac_dir in $ac_dummy; do | |
6594 | test -z "$ac_dir" && ac_dir=. | |
6595 | if test -f $ac_dir/$ac_word; then | |
6596 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6597 | break | |
6598 | fi | |
6599 | done | |
6600 | IFS="$ac_save_ifs" | |
71a94577 | 6601 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6602 | ;; |
6603 | esac | |
6604 | fi | |
093e61a6 | 6605 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6606 | if test -n "$GMSGFMT"; then |
093e61a6 | 6607 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6608 | else |
093e61a6 | 6609 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6610 | fi |
6611 | ||
6612 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6613 | set dummy xgettext; ac_word=$2 | |
093e61a6 | 6614 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6615 | echo "configure:6616: checking for $ac_word" >&5 |
093e61a6 RS |
6616 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6617 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6618 | else |
6619 | case "$XGETTEXT" in | |
6620 | /*) | |
71a94577 | 6621 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6622 | ;; |
6623 | *) | |
6624 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6625 | for ac_dir in $PATH; do | |
6626 | test -z "$ac_dir" && ac_dir=. | |
6627 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6628 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6629 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6630 | break |
6631 | fi | |
6632 | fi | |
6633 | done | |
6634 | IFS="$ac_save_ifs" | |
71a94577 | 6635 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6636 | ;; |
6637 | esac | |
6638 | fi | |
71a94577 ZW |
6639 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6640 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6641 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6642 | else |
093e61a6 | 6643 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6644 | fi |
6645 | ||
093e61a6 | 6646 | |
71a94577 | 6647 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6648 | USE_INCLUDED_LIBINTL=yes |
6649 | CATOBJEXT=.gmo | |
71a94577 | 6650 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6651 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6652 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6653 | fi | |
6654 | ||
6655 | if test "$GMSGFMT" != ":"; then | |
6656 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6657 | : ; | |
6658 | else | |
093e61a6 | 6659 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 |
71a94577 ZW |
6660 | GMSGFMT=":" |
6661 | fi | |
ab87f8c8 JL |
6662 | fi |
6663 | ||
71a94577 ZW |
6664 | if test "$XGETTEXT" != ":"; then |
6665 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6666 | : ; |
6667 | else | |
093e61a6 | 6668 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 |
ab87f8c8 JL |
6669 | XGETTEXT=":" |
6670 | fi | |
6671 | fi | |
6672 | ||
71a94577 ZW |
6673 | POSUB=po |
6674 | fi | |
093e61a6 | 6675 | |
17297c41 PT |
6676 | |
6677 | ||
71a94577 ZW |
6678 | if test "$PACKAGE" = gettext; then |
6679 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6680 | fi |
ab87f8c8 | 6681 | |
71a94577 ZW |
6682 | for ac_prog in bison |
6683 | do | |
093e61a6 | 6684 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
71a94577 | 6685 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 6686 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
6a1b7268 | 6687 | echo "configure:6688: checking for $ac_word" >&5 |
093e61a6 RS |
6688 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
6690 | else |
6691 | if test -n "$INTLBISON"; then | |
6692 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6693 | else | |
093e61a6 RS |
6694 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6695 | ac_dummy="$PATH" | |
6696 | for ac_dir in $ac_dummy; do | |
6697 | test -z "$ac_dir" && ac_dir=. | |
6698 | if test -f $ac_dir/$ac_word; then | |
6699 | ac_cv_prog_INTLBISON="$ac_prog" | |
6700 | break | |
6701 | fi | |
6702 | done | |
6703 | IFS="$ac_save_ifs" | |
71a94577 ZW |
6704 | fi |
6705 | fi | |
093e61a6 | 6706 | INTLBISON="$ac_cv_prog_INTLBISON" |
71a94577 | 6707 | if test -n "$INTLBISON"; then |
093e61a6 | 6708 | echo "$ac_t""$INTLBISON" 1>&6 |
71a94577 | 6709 | else |
093e61a6 | 6710 | echo "$ac_t""no" 1>&6 |
71a94577 ZW |
6711 | fi |
6712 | ||
093e61a6 | 6713 | test -n "$INTLBISON" && break |
71a94577 | 6714 | done |
ab87f8c8 | 6715 | |
71a94577 ZW |
6716 | if test -z "$INTLBISON"; then |
6717 | ac_verc_fail=yes | |
6718 | else | |
093e61a6 | 6719 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 |
6a1b7268 | 6720 | echo "configure:6721: checking version of bison" >&5 |
71a94577 ZW |
6721 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6722 | case $ac_prog_version in | |
6723 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6724 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6725 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6726 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6727 | esac | |
093e61a6 | 6728 | echo "$ac_t""$ac_prog_version" 1>&6 |
71a94577 ZW |
6729 | fi |
6730 | if test $ac_verc_fail = yes; then | |
6731 | INTLBISON=: | |
ab87f8c8 JL |
6732 | fi |
6733 | ||
093e61a6 RS |
6734 | |
6735 | ||
6736 | ||
6737 | ||
6738 | ||
6739 | ||
6740 | ||
6741 | ||
6742 | ||
191bf464 | 6743 | if test $USE_INCLUDED_LIBINTL = yes; then |
093e61a6 | 6744 | cat >> confdefs.h <<\EOF |
191bf464 | 6745 | #define USE_INCLUDED_LIBINTL 1 |
093e61a6 | 6746 | EOF |
191bf464 ZW |
6747 | |
6748 | fi | |
71a94577 ZW |
6749 | |
6750 | nls_cv_header_intl= | |
6751 | nls_cv_header_libgt= | |
6752 | ||
6753 | DATADIRNAME=share | |
093e61a6 | 6754 | |
71a94577 ZW |
6755 | |
6756 | INSTOBJEXT=.mo | |
093e61a6 | 6757 | |
ab87f8c8 | 6758 | |
71a94577 | 6759 | GENCAT=gencat |
093e61a6 RS |
6760 | |
6761 | ||
9fdf713f | 6762 | |
9f6682b7 | 6763 | if test "x$CATOBJEXT" != x; then |
093e61a6 | 6764 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
6a1b7268 | 6765 | echo "configure:6766: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6766 | # Look for .po and .gmo files in the source directory. |
6767 | CATALOGS= | |
6768 | XLINGUAS= | |
6769 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6770 | # If there aren't any .gmo files the shell will give us the | |
6771 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6772 | # weeded out. | |
6773 | case "$cat" in *\**) | |
6774 | continue;; | |
6775 | esac | |
6776 | # The quadruple backslash is collapsed to a double backslash | |
6777 | # by the backticks, then collapsed again by the double quotes, | |
6778 | # leaving us with one backslash in the sed expression (right | |
6779 | # before the dot that mustn't act as a wildcard). The dot to | |
6780 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6781 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6782 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6783 | # The user is allowed to set LINGUAS to a list of languages to | |
6784 | # install catalogs for. If it's empty that means "all of them." | |
6785 | if test "x$LINGUAS" = x; then | |
6786 | CATALOGS="$CATALOGS $cat" | |
6787 | XLINGUAS="$XLINGUAS $lang" | |
6788 | else | |
6789 | case "$LINGUAS" in *$lang*) | |
6790 | CATALOGS="$CATALOGS $cat" | |
6791 | XLINGUAS="$XLINGUAS $lang" | |
6792 | ;; | |
6793 | esac | |
6794 | fi | |
6795 | done | |
6796 | LINGUAS="$XLINGUAS" | |
093e61a6 | 6797 | echo "$ac_t""$LINGUAS" 1>&6 |
ab87f8c8 JL |
6798 | fi |
6799 | ||
ab87f8c8 JL |
6800 | MKINSTALLDIRS= |
6801 | if test -n "$ac_aux_dir"; then | |
6802 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6803 | fi | |
6804 | if test -z "$MKINSTALLDIRS"; then | |
6805 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6806 | fi | |
093e61a6 | 6807 | |
ab87f8c8 | 6808 | |
71a94577 | 6809 | INTL_LIBTOOL_SUFFIX_PREFIX= |
093e61a6 RS |
6810 | |
6811 | ||
ab87f8c8 | 6812 | |
f4ab28e3 MK |
6813 | # Windows32 Registry support for specifying GCC installation paths. |
6814 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6815 | if test "${enable_win32_registry+set}" = set; then | |
6816 | enableval="$enable_win32_registry" | |
093e61a6 RS |
6817 | : |
6818 | fi | |
f4ab28e3 | 6819 | |
4e70264f ZW |
6820 | case $host_os in |
6821 | win32 | pe | cygwin* | mingw32* | uwin*) | |
093e61a6 | 6822 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
6a1b7268 | 6823 | echo "configure:6824: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6824 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6825 | cat >> confdefs.h <<\EOF |
f4ab28e3 | 6826 | #define ENABLE_WIN32_REGISTRY 1 |
093e61a6 | 6827 | EOF |
f4ab28e3 | 6828 | |
093e61a6 RS |
6829 | echo "$ac_t""yes" 1>&6 |
6830 | ||
6831 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
6a1b7268 | 6832 | echo "configure:6833: checking for library containing RegOpenKeyExA" >&5 |
093e61a6 RS |
6833 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6834 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6835 | else | |
6836 | ac_func_search_save_LIBS="$LIBS" | |
6837 | ac_cv_search_RegOpenKeyExA="no" | |
6838 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6839 | #line 6840 "configure" |
093e61a6 | 6840 | #include "confdefs.h" |
4e70264f ZW |
6841 | /* Override any gcc2 internal prototype to avoid an error. */ |
6842 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6843 | builtin and then its argument prototype would still apply. */ |
6844 | char RegOpenKeyExA(); | |
6845 | ||
6846 | int main() { | |
6847 | RegOpenKeyExA() | |
6848 | ; return 0; } | |
6849 | EOF | |
6a1b7268 | 6850 | if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6851 | rm -rf conftest* |
4e70264f ZW |
6852 | ac_cv_search_RegOpenKeyExA="none required" |
6853 | else | |
093e61a6 RS |
6854 | echo "configure: failed program was:" >&5 |
6855 | cat conftest.$ac_ext >&5 | |
4e70264f | 6856 | fi |
093e61a6 RS |
6857 | rm -f conftest* |
6858 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6859 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6860 | cat > conftest.$ac_ext <<EOF | |
6a1b7268 | 6861 | #line 6862 "configure" |
093e61a6 | 6862 | #include "confdefs.h" |
4e70264f ZW |
6863 | /* Override any gcc2 internal prototype to avoid an error. */ |
6864 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6865 | builtin and then its argument prototype would still apply. */ |
6866 | char RegOpenKeyExA(); | |
6867 | ||
6868 | int main() { | |
6869 | RegOpenKeyExA() | |
6870 | ; return 0; } | |
6871 | EOF | |
6a1b7268 | 6872 | if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6873 | rm -rf conftest* |
6874 | ac_cv_search_RegOpenKeyExA="-l$i" | |
4e70264f ZW |
6875 | break |
6876 | else | |
093e61a6 RS |
6877 | echo "configure: failed program was:" >&5 |
6878 | cat conftest.$ac_ext >&5 | |
4e70264f | 6879 | fi |
093e61a6 RS |
6880 | rm -f conftest* |
6881 | done | |
6882 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 6883 | fi |
cafe096b | 6884 | |
093e61a6 RS |
6885 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
6886 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6887 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6888 | ||
6889 | else : | |
6890 | ||
4e70264f | 6891 | fi |
f4ab28e3 | 6892 | else |
093e61a6 | 6893 | echo "$ac_t""no" 1>&6 |
f4ab28e3 MK |
6894 | fi |
6895 | ||
6896 | # Check if user specified a different registry key. | |
9dd53f2c | 6897 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6898 | x | xyes) |
6899 | # default. | |
6900 | gcc_cv_win32_registry_key="$VERSION" | |
6901 | ;; | |
6902 | xno) | |
6903 | # no registry lookup. | |
6904 | gcc_cv_win32_registry_key='' | |
6905 | ;; | |
6906 | *) | |
6907 | # user-specified key. | |
6908 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6909 | ;; | |
6910 | esac | |
6911 | ||
9dd53f2c | 6912 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6913 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
6a1b7268 | 6914 | echo "configure:6915: checking registry key on windows hosts" >&5 |
093e61a6 | 6915 | cat >> confdefs.h <<EOF |
f4ab28e3 | 6916 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
093e61a6 | 6917 | EOF |
f4ab28e3 | 6918 | |
093e61a6 | 6919 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
f4ab28e3 | 6920 | fi |
4e70264f ZW |
6921 | ;; |
6922 | esac | |
f4ab28e3 | 6923 | |
ab87f8c8 | 6924 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6925 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6926 | cd $srcdir |
1e6347d8 | 6927 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6928 | cd $holddir |
6929 | ||
6930 | # Conditionalize the makefile for this host machine. | |
6931 | # Make-host contains the concatenation of all host makefile fragments | |
6932 | # [there can be more than one]. This file is built by configure.frag. | |
6933 | host_overrides=Make-host | |
6934 | dep_host_xmake_file= | |
6935 | for f in .. ${host_xmake_file} | |
6936 | do | |
6937 | if test -f ${srcdir}/config/$f | |
6938 | then | |
6939 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6940 | fi | |
6941 | done | |
6942 | ||
6943 | # Conditionalize the makefile for this target machine. | |
6944 | # Make-target contains the concatenation of all host makefile fragments | |
6945 | # [there can be more than one]. This file is built by configure.frag. | |
6946 | target_overrides=Make-target | |
6947 | dep_tmake_file= | |
6948 | for f in .. ${tmake_file} | |
6949 | do | |
6950 | if test -f ${srcdir}/config/$f | |
6951 | then | |
6952 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6953 | fi | |
6954 | done | |
6955 | ||
34a86c2b NN |
6956 | symbolic_link='ln -s' |
6957 | ||
ab87f8c8 JL |
6958 | # If the host doesn't support symlinks, modify CC in |
6959 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6960 | # Otherwise, we can use "CC=$(CC)". | |
6961 | rm -f symtest.tem | |
6962 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6963 | then | |
6964 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6965 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6966 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6967 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6968 | else |
6969 | rm -f symtest.tem | |
6970 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6971 | then | |
6972 | symbolic_link="cp -p" | |
6973 | else | |
6974 | symbolic_link="cp" | |
6975 | fi | |
6976 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6977 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6978 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6979 | 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 |
6980 | fi |
6981 | rm -f symtest.tem | |
6982 | ||
6983 | out_object_file=`basename $out_file .c`.o | |
6984 | ||
6985 | tm_file_list= | |
6986 | for f in $tm_file; do | |
64ccbc99 | 6987 | case $f in |
d02af173 ZW |
6988 | ansidecl.h ) |
6989 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6990 | defaults.h ) | |
e2500fed | 6991 | tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; |
64ccbc99 KG |
6992 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; |
6993 | esac | |
ab87f8c8 JL |
6994 | done |
6995 | ||
11642c3a ZW |
6996 | tm_p_file_list= |
6997 | for f in $tm_p_file; do | |
4977bab6 ZW |
6998 | case $f in |
6999 | tm-preds.h ) | |
7000 | tm_p_file_list="${tm_p_file_list} $f" ;; | |
7001 | *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;; | |
7002 | esac | |
11642c3a ZW |
7003 | done |
7004 | ||
ab87f8c8 JL |
7005 | host_xm_file_list= |
7006 | for f in $host_xm_file; do | |
64ccbc99 | 7007 | case $f in |
d02af173 ZW |
7008 | ansidecl.h ) |
7009 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7010 | auto-host.h ) |
64ccbc99 | 7011 | host_xm_file_list="${host_xm_file_list} $f" ;; |
e2500fed GK |
7012 | defaults.h ) |
7013 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7014 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; |
7015 | esac | |
ab87f8c8 JL |
7016 | done |
7017 | ||
7018 | build_xm_file_list= | |
7019 | for f in $build_xm_file; do | |
64ccbc99 | 7020 | case $f in |
d02af173 ZW |
7021 | ansidecl.h ) |
7022 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 7023 | auto-build.h | auto-host.h ) |
64ccbc99 | 7024 | build_xm_file_list="${build_xm_file_list} $f" ;; |
e2500fed GK |
7025 | defaults.h ) |
7026 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
7027 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; |
7028 | esac | |
ab87f8c8 JL |
7029 | done |
7030 | ||
a078a589 ZW |
7031 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
7032 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
093e61a6 RS |
7033 | CROSS= |
7034 | ALL=all.internal | |
7035 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7036 | if test x$host != x$target |
7037 | then | |
a078a589 ZW |
7038 | CROSS="-DCROSS_COMPILE" |
7039 | ALL=all.cross | |
7040 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
7041 | case "$host","$target" in |
7042 | i?86-*-*,x86_64-*-* \ | |
7043 | | powerpc*-*-*,powerpc64*-*-*) | |
7044 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
7045 | esac | |
7a615b25 AO |
7046 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
7047 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
7048 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
7049 | fi |
7050 | ||
b39d221a EC |
7051 | # If this is a cross-compiler that does not |
7052 | # have its own set of headers then define | |
7053 | # inhibit_libc | |
7054 | ||
dc06db20 R |
7055 | # If this is using newlib, without having the headers available now, |
7056 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
7057 | # This prevents libgcc2 from containing any code which requires libc |
7058 | # support. | |
b39d221a | 7059 | inhibit_libc= |
dc06db20 R |
7060 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
7061 | test x$with_newlib = xyes ; } && | |
7062 | test "x$with_headers" = x ; then | |
b39d221a | 7063 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
7064 | fi |
7065 | ||
7066 | ||
a078a589 ZW |
7067 | # When building gcc with a cross-compiler, we need to adjust things so |
7068 | # that the generator programs are still built with the native compiler. | |
7069 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
7070 | |
7071 | # These are the normal (build=host) settings: | |
093e61a6 RS |
7072 | BUILD_PREFIX= |
7073 | BUILD_PREFIX_1=ignore- | |
7074 | BUILD_CC='$(CC)' | |
7075 | BUILD_CFLAGS='$(ALL_CFLAGS)' | |
a078a589 | 7076 | |
093e61a6 RS |
7077 | STMP_FIXINC=stmp-fixinc |
7078 | STMP_FIXPROTO=stmp-fixproto | |
a078a589 ZW |
7079 | |
7080 | # And these apply if build != host. | |
ab87f8c8 JL |
7081 | if test x$build != x$host |
7082 | then | |
5c35940c NN |
7083 | BUILD_PREFIX=build- |
7084 | BUILD_PREFIX_1=build- | |
4977bab6 ZW |
7085 | BUILD_CC='$(CC_FOR_BUILD)' |
7086 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' | |
a078a589 | 7087 | |
7a615b25 AO |
7088 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
7089 | STMP_FIXINC= | |
7090 | STMP_FIXPROTO= | |
7091 | fi | |
ab87f8c8 JL |
7092 | fi |
7093 | ||
7094 | # Expand extra_headers to include complete path. | |
7095 | # This substitutes for lots of t-* files. | |
7096 | extra_headers_list= | |
7097 | if test "x$extra_headers" = x | |
7098 | then true | |
7099 | else | |
29f7a208 | 7100 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
7101 | for file in $extra_headers; |
7102 | do | |
29f7a208 | 7103 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
7104 | done |
7105 | fi | |
7106 | ||
ab87f8c8 | 7107 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
7108 | case $use_collect2 in |
7109 | no) use_collect2= ;; | |
7110 | "") ;; | |
093e61a6 | 7111 | *) |
34a86c2b NN |
7112 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
7113 | xm_defines="${xm_defines} USE_COLLECT2" | |
7114 | ;; | |
7115 | esac | |
ab87f8c8 | 7116 | |
d869a8c4 NN |
7117 | # Identify the assembler which will work hand-in-glove with the newly |
7118 | # built GCC, so that we can examine its features. This is the assembler | |
7119 | # which will be driven by the driver program. | |
7120 | # | |
7121 | # If build != host, and we aren't building gas in-tree, we identify a | |
7122 | # build->target assembler and hope that it will have the same features | |
7123 | # as the host->target assembler we'll be using. | |
093e61a6 | 7124 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
6a1b7268 | 7125 | echo "configure:7126: checking what assembler to use" >&5 |
34a86c2b | 7126 | in_tree_gas=no |
ab87f8c8 | 7127 | gcc_cv_as= |
981d4858 JM |
7128 | gcc_cv_gas_major_version= |
7129 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
7130 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
7131 | if test -x "$DEFAULT_ASSEMBLER"; then | |
7132 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
7133 | elif test -x "$AS"; then | |
7134 | gcc_cv_as="$AS" | |
7135 | elif test -x as$host_exeext; then | |
7136 | # Build using assembler in the current directory. | |
7137 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
7138 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
7139 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
7140 | # Single tree build which includes gas. |
7141 | in_tree_gas=yes | |
7142 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7143 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
7144 | $gcc_cv_as_gas_srcdir/configure \ | |
7145 | $gcc_cv_as_gas_srcdir/configure.in \ | |
7146 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
7147 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7148 | if test x$gcc_cv_gas_version != x; then | |
7149 | break | |
7150 | fi | |
7151 | done | |
7152 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
7153 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
7154 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
7155 | ||
f9c1196a ZW |
7156 | rm -f as$host_exeext |
7157 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
981d4858 | 7158 | fi |
9e423e6d | 7159 | |
534d0cc0 | 7160 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
7161 | # Search the same directories that the installed compiler will |
7162 | # search. Else we may find the wrong assembler and lose. If we | |
7163 | # do not find a suitable assembler binary, then try the user's | |
7164 | # path. | |
7165 | # | |
7166 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7167 | # user's path. Unfortunately, there is no good way to get at the | |
7168 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7169 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7170 | # to be fixed as part of the make/configure rewrite too. | |
7171 | ||
7172 | if test "x$exec_prefix" = xNONE; then | |
7173 | if test "x$prefix" = xNONE; then | |
7174 | test_prefix=/usr/local | |
7175 | else | |
7176 | test_prefix=$prefix | |
7177 | fi | |
7178 | else | |
7179 | test_prefix=$exec_prefix | |
7180 | fi | |
7181 | ||
7182 | # If the loop below does not find an assembler, then use whatever | |
7183 | # one we can find in the users's path. | |
7184 | # user's path. | |
55a2ea2a AM |
7185 | if test "x$program_prefix" != xNONE; then |
7186 | gcc_cv_as=${program_prefix}as$host_exeext | |
7187 | else | |
7188 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
7189 | fi | |
7190 | ||
7191 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7192 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7193 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7194 | /usr/lib/gcc/$target_alias \ | |
7195 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7196 | $test_prefix/$target_alias/bin" | |
7197 | ||
7198 | if test x$host = x$target; then | |
7199 | test_dirs="$test_dirs \ | |
779243f7 JL |
7200 | /usr/libexec \ |
7201 | /usr/ccs/gcc \ | |
7202 | /usr/ccs/bin \ | |
7203 | /udk/usr/ccs/bin \ | |
7204 | /bsd43/usr/lib/cmplrs/cc \ | |
7205 | /usr/cross64/usr/bin \ | |
7206 | /usr/lib/cmplrs/cc \ | |
7207 | /sysv/usr/lib/cmplrs/cc \ | |
7208 | /svr4/usr/lib/cmplrs/cc \ | |
7209 | /usr/bin" | |
55a2ea2a | 7210 | fi |
779243f7 JL |
7211 | |
7212 | for dir in $test_dirs; do | |
55a2ea2a | 7213 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
7214 | gcc_cv_as=$dir/as$host_exeext |
7215 | break; | |
7216 | fi | |
7217 | done | |
9e423e6d | 7218 | fi |
34a86c2b NN |
7219 | case $in_tree_gas in |
7220 | yes) | |
093e61a6 | 7221 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
7222 | ;; |
7223 | no) | |
093e61a6 | 7224 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
7225 | ;; |
7226 | esac | |
981d4858 | 7227 | |
d869a8c4 NN |
7228 | # Identify the linker which will work hand-in-glove with the newly |
7229 | # built GCC, so that we can examine its features. This is the linker | |
7230 | # which will be driven by the driver program. | |
7231 | # | |
7232 | # If build != host, and we aren't building gas in-tree, we identify a | |
7233 | # build->target linker and hope that it will have the same features | |
7234 | # as the host->target linker we'll be using. | |
093e61a6 | 7235 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
6a1b7268 | 7236 | echo "configure:7237: checking what linker to use" >&5 |
34a86c2b | 7237 | in_tree_ld=no |
275b60d6 JJ |
7238 | gcc_cv_ld= |
7239 | gcc_cv_gld_major_version= | |
7240 | gcc_cv_gld_minor_version= | |
7241 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
7242 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7243 | if test -x "$DEFAULT_LINKER"; then | |
7244 | gcc_cv_ld="$DEFAULT_LINKER" | |
7245 | elif test -x "$LD"; then | |
7246 | gcc_cv_ld="$LD" | |
f9c1196a | 7247 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 7248 | # Build using linker in the current directory. |
f9c1196a | 7249 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
7250 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
7251 | && test -f ../ld/Makefile; then | |
275b60d6 | 7252 | # Single tree build which includes ld. |
34a86c2b | 7253 | in_tree_ld=yes |
275b60d6 JJ |
7254 | 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 |
7255 | do | |
7256 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7257 | if test x$gcc_cv_gld_version != x; then | |
7258 | break | |
7259 | fi | |
7260 | done | |
7261 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
7262 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
7263 | rm -f collect-ld$host_exeext |
7264 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
7265 | 2>/dev/null | |
275b60d6 JJ |
7266 | fi |
7267 | ||
534d0cc0 | 7268 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
7269 | # Search the same directories that the installed compiler will |
7270 | # search. Else we may find the wrong linker and lose. If we | |
7271 | # do not find a suitable linker binary, then try the user's | |
7272 | # path. | |
7273 | # | |
7274 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7275 | # user's path. Unfortunately, there is no good way to get at the | |
7276 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7277 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7278 | # to be fixed as part of the make/configure rewrite too. | |
7279 | ||
7280 | if test "x$exec_prefix" = xNONE; then | |
7281 | if test "x$prefix" = xNONE; then | |
7282 | test_prefix=/usr/local | |
7283 | else | |
7284 | test_prefix=$prefix | |
7285 | fi | |
7286 | else | |
7287 | test_prefix=$exec_prefix | |
7288 | fi | |
7289 | ||
7290 | # If the loop below does not find an linker, then use whatever | |
7291 | # one we can find in the users's path. | |
7292 | # user's path. | |
55a2ea2a AM |
7293 | if test "x$program_prefix" != xNONE; then |
7294 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7295 | else | |
7296 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7297 | fi | |
7298 | ||
7299 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7300 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7301 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7302 | /usr/lib/gcc/$target_alias \ | |
7303 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7304 | $test_prefix/$target_alias/bin" | |
7305 | ||
7306 | if test x$host = x$target; then | |
7307 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7308 | /usr/libexec \ |
7309 | /usr/ccs/gcc \ | |
7310 | /usr/ccs/bin \ | |
7311 | /udk/usr/ccs/bin \ | |
7312 | /bsd43/usr/lib/cmplrs/cc \ | |
7313 | /usr/cross64/usr/bin \ | |
7314 | /usr/lib/cmplrs/cc \ | |
7315 | /sysv/usr/lib/cmplrs/cc \ | |
7316 | /svr4/usr/lib/cmplrs/cc \ | |
7317 | /usr/bin" | |
55a2ea2a | 7318 | fi |
275b60d6 JJ |
7319 | |
7320 | for dir in $test_dirs; do | |
55a2ea2a | 7321 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7322 | gcc_cv_ld=$dir/ld$host_exeext |
7323 | break; | |
7324 | fi | |
7325 | done | |
7326 | fi | |
34a86c2b NN |
7327 | case $in_tree_ld in |
7328 | yes) | |
093e61a6 | 7329 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
7330 | ;; |
7331 | no) | |
093e61a6 | 7332 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
7333 | ;; |
7334 | esac | |
275b60d6 | 7335 | |
981d4858 | 7336 | # Figure out what nm we will be using. |
f9c1196a | 7337 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
093e61a6 | 7338 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
6a1b7268 | 7339 | echo "configure:7340: checking what nm to use" >&5 |
f9c1196a | 7340 | in_tree_nm=no |
981d4858 JM |
7341 | if test -x nm$host_exeext; then |
7342 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
7343 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7344 | && test -f ../binutils/Makefile; then | |
7345 | # Single tree build which includes binutils. | |
7346 | in_tree_nm=yes | |
7347 | gcc_cv_nm=./nm$host_exeext | |
7348 | rm -f nm$host_exeext | |
7349 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
7350 | elif test "x$program_prefix" != xNONE; then |
7351 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7352 | else | |
7353 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 7354 | fi |
f9c1196a | 7355 | case $in_tree_nm in |
093e61a6 RS |
7356 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
7357 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 7358 | esac |
981d4858 | 7359 | |
3cae5780 | 7360 | # Figure out what objdump we will be using. |
093e61a6 | 7361 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
6a1b7268 | 7362 | echo "configure:7363: checking what objdump to use" >&5 |
f9c1196a | 7363 | in_tree_objdump=no |
3cae5780 AS |
7364 | if test -x objdump$host_exeext; then |
7365 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
7366 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7367 | && test -f ../binutils/Makefile; then | |
7368 | # Single tree build which includes binutils. | |
7369 | in_tree_objdump=yes | |
7370 | gcc_cv_objdump=./objdump$host_exeext | |
7371 | rm -f objdump$host_exeext | |
7372 | $symbolic_link ../binutils/objdump$host_exeext \ | |
7373 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
7374 | elif test "x$program_prefix" != xNONE; then |
7375 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7376 | else | |
f9c1196a ZW |
7377 | gcc_cv_objdump=`echo objdump | \ |
7378 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 7379 | fi |
f9c1196a | 7380 | case $in_tree_objdump in |
093e61a6 RS |
7381 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
7382 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 7383 | esac |
3cae5780 | 7384 | |
981d4858 | 7385 | # Figure out what assembler alignment features are present. |
093e61a6 | 7386 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 |
6a1b7268 | 7387 | echo "configure:7388: checking assembler alignment features" >&5 |
9d147085 | 7388 | gcc_cv_as_alignment_features=none |
34a86c2b | 7389 | if test $in_tree_gas = yes; then |
ad9c4d9f NN |
7390 | # Gas version 2.6 and later support for .balign and .p2align. |
7391 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7392 | && test $gcc_cv_gas_minor_version -ge 6 \ | |
7393 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7394 | ||
7395 | ||
7396 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7397 | cat >> confdefs.h <<\EOF |
981d4858 | 7398 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7399 | EOF |
981d4858 | 7400 | |
093e61a6 | 7401 | |
ad9c4d9f NN |
7402 | |
7403 | fi | |
7404 | ||
7405 | # Gas version 2.8 and later support specifying the maximum | |
7406 | # bytes to skip when using .p2align. | |
7407 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7408 | && test $gcc_cv_gas_minor_version -ge 8 \ | |
7409 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7410 | ||
7411 | ||
7412 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7413 | cat >> confdefs.h <<\EOF |
981d4858 | 7414 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7415 | EOF |
981d4858 | 7416 | |
093e61a6 | 7417 | |
ad9c4d9f NN |
7418 | |
7419 | fi | |
7420 | ||
981d4858 | 7421 | elif test x$gcc_cv_as != x; then |
00ccc16d JL |
7422 | # Check if we have .balign and .p2align |
7423 | echo ".balign 4" > conftest.s | |
7424 | echo ".p2align 2" >> conftest.s | |
7425 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7426 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7427 | cat >> confdefs.h <<\EOF |
00ccc16d | 7428 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7429 | EOF |
00ccc16d JL |
7430 | |
7431 | fi | |
7432 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7433 | # Check if specifying the maximum bytes to skip when |
7434 | # using .p2align is supported. | |
7435 | echo ".p2align 4,,7" > conftest.s | |
7436 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7437 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7438 | cat >> confdefs.h <<\EOF |
9e423e6d | 7439 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7440 | EOF |
9e423e6d JW |
7441 | |
7442 | fi | |
7443 | rm -f conftest.s conftest.o | |
7444 | fi | |
093e61a6 | 7445 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 |
9e423e6d | 7446 | |
093e61a6 | 7447 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
6a1b7268 | 7448 | echo "configure:7449: checking assembler subsection support" >&5 |
9d147085 | 7449 | gcc_cv_as_subsections=no |
34a86c2b | 7450 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7451 | if test $gcc_cv_gas_major_version -eq 2 \ |
7452 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
7453 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7454 | ||
7455 | ||
7456 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7457 | gcc_cv_as_subsections="working .subsection -1" | |
7458 | fi | |
093e61a6 | 7459 | |
ad9c4d9f NN |
7460 | |
7461 | fi | |
7462 | ||
981d4858 | 7463 | elif test x$gcc_cv_as != x; then |
d1accaa3 JJ |
7464 | # Check if we have .subsection |
7465 | echo ".subsection 1" > conftest.s | |
7466 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7467 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7468 | if test x$gcc_cv_nm != x; then |
7469 | cat > conftest.s <<EOF | |
7470 | conftest_label1: .word 0 | |
7471 | .subsection -1 | |
7472 | conftest_label2: .word 0 | |
7473 | .previous | |
7474 | EOF | |
7475 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7476 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7477 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7478 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7479 | : | |
7480 | else | |
d1accaa3 | 7481 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7482 | fi |
7483 | fi | |
7484 | fi | |
7485 | fi | |
7486 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7487 | fi |
7488 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
093e61a6 | 7489 | cat >> confdefs.h <<\EOF |
981d4858 | 7490 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
093e61a6 | 7491 | EOF |
981d4858 | 7492 | |
d1accaa3 | 7493 | fi |
093e61a6 | 7494 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 |
d1accaa3 | 7495 | |
093e61a6 | 7496 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
6a1b7268 | 7497 | echo "configure:7498: checking assembler weak support" >&5 |
9d147085 | 7498 | gcc_cv_as_weak=no |
34a86c2b | 7499 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7500 | if test $gcc_cv_gas_major_version -eq 2 \ |
7501 | && test $gcc_cv_gas_minor_version -ge 2 \ | |
7502 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7503 | ||
7504 | ||
981d4858 | 7505 | gcc_cv_as_weak="yes" |
093e61a6 | 7506 | |
ad9c4d9f NN |
7507 | |
7508 | fi | |
7509 | ||
981d4858 | 7510 | elif test x$gcc_cv_as != x; then |
12822146 JL |
7511 | # Check if we have .weak |
7512 | echo " .weak foobar" > conftest.s | |
7513 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7514 | gcc_cv_as_weak="yes" |
7515 | fi | |
7516 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7517 | fi |
7518 | if test x"$gcc_cv_as_weak" = xyes; then | |
093e61a6 | 7519 | cat >> confdefs.h <<\EOF |
981d4858 | 7520 | #define HAVE_GAS_WEAK 1 |
093e61a6 | 7521 | EOF |
981d4858 | 7522 | |
12822146 | 7523 | fi |
093e61a6 | 7524 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 |
12822146 | 7525 | |
093e61a6 | 7526 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
6a1b7268 | 7527 | echo "configure:7528: checking assembler hidden support" >&5 |
9d147085 | 7528 | gcc_cv_as_hidden=no |
34a86c2b | 7529 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7530 | if test $gcc_cv_gas_major_version -eq 2 \ |
7531 | && (test $gcc_cv_gas_minor_version -gt 12 \ | |
7532 | || (test $gcc_cv_gas_minor_version -eq 12 \ | |
7533 | && test $gcc_cv_gas_patch_version -ge 1 )) \ | |
7534 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7535 | ||
7536 | ||
7537 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7538 | gcc_cv_as_hidden="yes" | |
7539 | fi | |
093e61a6 | 7540 | |
ad9c4d9f NN |
7541 | |
7542 | fi | |
7543 | ||
981d4858 | 7544 | elif test x$gcc_cv_as != x; then |
6a9c5260 UD |
7545 | # Check if we have .hidden |
7546 | echo " .hidden foobar" > conftest.s | |
7547 | echo "foobar:" >> conftest.s | |
7548 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7549 | gcc_cv_as_hidden="yes" |
7550 | fi | |
7551 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7552 | |
7553 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
093e61a6 | 7554 | # This is irritatingly difficult to feature test for. Look for |
c72931a6 RH |
7555 | # the date string after the version number. |
7556 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7557 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
96ef4bdc MM |
7558 | 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'` |
7559 | 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 | 7560 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7561 | if test -n "$ld_date"; then |
7562 | # If there was date string, but was earlier than 2002-04-04, fail | |
7563 | gcc_cv_as_hidden="no" | |
7564 | elif test -z "$ld_vers"; then | |
7565 | # If there was no date string nor ld version number, something is wrong | |
7566 | gcc_cv_as_hidden="no" | |
7567 | else | |
7568 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7569 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7570 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7571 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7572 | if test "$ld_vers_major" -lt 2; then | |
7573 | gcc_cv_as_hidden="no" | |
7574 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7575 | gcc_cv_as_hidden="no" | |
7576 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7577 | -a "$ld_vers_patch" -eq 0; then | |
7578 | gcc_cv_as_hidden="no" | |
7579 | fi | |
7580 | fi | |
c72931a6 RH |
7581 | fi |
7582 | fi | |
981d4858 | 7583 | fi |
789b7de5 | 7584 | case "$target" in |
027faee7 | 7585 | mips-sgi-irix6*) |
789b7de5 RO |
7586 | if test x"$gnu_ld_flag" = x"no"; then |
7587 | # Even if using gas with .hidden support, the resulting object files | |
027faee7 AO |
7588 | # cannot be linked with the IRIX 6 O32 linker. With the N32 and |
7589 | # N64 linkers, the problem is that the linker refuses to accept | |
7590 | # -call_shared (passed by default to the linker) and -r (used to | |
7591 | # link the object file generated without .hidden directives with | |
7592 | # one that hides symbols), so we also lose. | |
6d07784a | 7593 | gcc_cv_as_hidden=no |
789b7de5 RO |
7594 | fi |
7595 | ;; | |
7596 | esac | |
6d07784a RO |
7597 | if test x"$gcc_cv_as_hidden" = xyes; then |
7598 | cat >> confdefs.h <<\EOF | |
7599 | #define HAVE_GAS_HIDDEN 1 | |
7600 | EOF | |
7601 | ||
7602 | fi | |
7603 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7604 | libgcc_visibility=$gcc_cv_as_hidden | |
9e944a16 | 7605 | |
6a9c5260 | 7606 | |
093e61a6 | 7607 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
6a1b7268 | 7608 | echo "configure:7609: checking assembler leb128 support" >&5 |
fbe42b1b | 7609 | gcc_cv_as_leb128=no |
34a86c2b | 7610 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7611 | if test $gcc_cv_gas_major_version -eq 2 \ |
7612 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
7613 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7614 | ||
7615 | ||
7616 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7617 | gcc_cv_as_leb128="yes" | |
7618 | fi | |
093e61a6 | 7619 | |
ad9c4d9f NN |
7620 | |
7621 | fi | |
7622 | ||
b7460f24 RH |
7623 | elif test x$gcc_cv_as != x; then |
7624 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7625 | cat > conftest.s <<EOF | |
7626 | .data | |
7627 | .uleb128 L2 - L1 | |
7628 | L1: | |
7629 | .uleb128 1280 | |
7630 | .sleb128 -1010 | |
7631 | L2: | |
7632 | EOF | |
7633 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7634 | gcc_cv_as_leb128="yes" |
7635 | ||
7636 | # GAS versions before 2.11 do not support uleb128, | |
7637 | # despite appearing to. | |
7638 | # ??? There exists an elf-specific test that will crash | |
7639 | # the assembler. Perhaps it's better to figure out whether | |
7640 | # arbitrary sections are supported and try the test. | |
7641 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7642 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7643 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7644 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7645 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7646 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7647 | gcc_cv_as_leb128="no" | |
7648 | fi | |
fbe42b1b | 7649 | fi |
b7460f24 RH |
7650 | fi |
7651 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7652 | fi | |
7653 | if test x"$gcc_cv_as_leb128" = xyes; then | |
093e61a6 | 7654 | cat >> confdefs.h <<\EOF |
b7460f24 | 7655 | #define HAVE_AS_LEB128 1 |
093e61a6 | 7656 | EOF |
b7460f24 RH |
7657 | |
7658 | fi | |
093e61a6 | 7659 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 |
b7460f24 | 7660 | |
093e61a6 | 7661 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
6a1b7268 | 7662 | echo "configure:7663: checking assembler eh_frame optimization" >&5 |
c64688ae | 7663 | gcc_cv_as_eh_frame=no |
34a86c2b | 7664 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7665 | if test $gcc_cv_gas_major_version -eq 2 \ |
7666 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7667 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7668 | ||
7669 | ||
7670 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7671 | gcc_cv_as_eh_frame="yes" | |
7672 | fi | |
093e61a6 | 7673 | |
ad9c4d9f NN |
7674 | |
7675 | fi | |
7676 | ||
c64688ae RH |
7677 | elif test x$gcc_cv_as != x; then |
7678 | # Check if this is GAS. | |
41948db5 SS |
7679 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7680 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7681 | if echo "$as_ver" | grep GNU > /dev/null; then |
7682 | # Versions up to and including 2.11.0 may mis-optimize | |
7683 | # .eh_frame data. Try something. | |
7684 | cat > conftest.s <<EOF | |
7685 | .text | |
7686 | .LFB1: | |
7687 | .4byte 0 | |
7688 | .L1: | |
7689 | .4byte 0 | |
7690 | .LFE1: | |
7691 | .section .eh_frame,"aw",@progbits | |
7692 | __FRAME_BEGIN__: | |
7693 | .4byte .LECIE1-.LSCIE1 | |
7694 | .LSCIE1: | |
7695 | .4byte 0x0 | |
7696 | .byte 0x1 | |
7697 | .ascii "z\0" | |
7698 | .byte 0x1 | |
7699 | .byte 0x78 | |
7700 | .byte 0x1a | |
7701 | .byte 0x0 | |
7702 | .byte 0x4 | |
7703 | .4byte 1 | |
7704 | .p2align 1 | |
7705 | .LECIE1: | |
7706 | .LSFDE1: | |
7707 | .4byte .LEFDE1-.LASFDE1 | |
7708 | .LASFDE1: | |
7709 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7710 | .4byte .LFB1 | |
7711 | .4byte .LFE1-.LFB1 | |
7712 | .byte 0x4 | |
7713 | .4byte .LFE1-.LFB1 | |
7714 | .byte 0x4 | |
7715 | .4byte .L1-.LFB1 | |
7716 | .LEFDE1: | |
7717 | EOF | |
01efb963 | 7718 | cat > conftest.lit <<EOF |
c64688ae RH |
7719 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7720 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 7721 | 0020 08000000 04080000 0044 .........D |
01efb963 AS |
7722 | EOF |
7723 | cat > conftest.big <<EOF | |
7724 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7725 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 7726 | 0020 00000008 04000000 0844 .........D |
c64688ae RH |
7727 | EOF |
7728 | # If the assembler didn't choke, and we can objdump, | |
7729 | # and we got the correct data, then succeed. | |
7730 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7731 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7732 | | tail -3 > conftest.got \ |
01efb963 AS |
7733 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7734 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7735 | then |
7736 | gcc_cv_as_eh_frame="yes" | |
7737 | else | |
7738 | gcc_cv_as_eh_frame="bad" | |
7739 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
093e61a6 | 7740 | cat >> confdefs.h <<\EOF |
c64688ae | 7741 | #define USE_AS_TRADITIONAL_FORMAT 1 |
093e61a6 | 7742 | EOF |
c64688ae RH |
7743 | |
7744 | fi | |
7745 | fi | |
7746 | fi | |
7747 | rm -f conftest.* | |
7748 | fi | |
093e61a6 | 7749 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
c64688ae | 7750 | |
093e61a6 | 7751 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
6a1b7268 | 7752 | echo "configure:7753: checking assembler section merging support" >&5 |
201556f0 | 7753 | gcc_cv_as_shf_merge=no |
34a86c2b | 7754 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7755 | if test $gcc_cv_gas_major_version -eq 2 \ |
7756 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7757 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7758 | ||
7759 | ||
7760 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7761 | gcc_cv_as_shf_merge=yes | |
7762 | fi | |
093e61a6 | 7763 | |
ad9c4d9f NN |
7764 | |
7765 | fi | |
7766 | ||
201556f0 JJ |
7767 | elif test x$gcc_cv_as != x; then |
7768 | # Check if we support SHF_MERGE sections | |
7769 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7770 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7771 | gcc_cv_as_shf_merge=yes |
7772 | fi | |
7773 | rm -f conftest.s conftest.o | |
7774 | fi | |
7775 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
093e61a6 | 7776 | cat >> confdefs.h <<\EOF |
201556f0 | 7777 | #define HAVE_GAS_SHF_MERGE 1 |
093e61a6 | 7778 | EOF |
201556f0 JJ |
7779 | |
7780 | fi | |
093e61a6 | 7781 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 |
201556f0 | 7782 | |
093e61a6 | 7783 | echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 |
6a1b7268 | 7784 | echo "configure:7785: checking assembler thread-local storage support" >&5 |
f996902d RH |
7785 | gcc_cv_as_tls=no |
7786 | conftest_s= | |
7787 | tls_first_major= | |
7788 | tls_first_minor= | |
9739c90c | 7789 | tls_as_opt= |
f996902d | 7790 | case "$target" in |
6f9b006d RH |
7791 | alpha*-*-*) |
7792 | conftest_s=' | |
7793 | .section ".tdata","awT",@progbits | |
7794 | foo: .long 25 | |
7795 | .text | |
7796 | ldq $27,__tls_get_addr($29) !literal!1 | |
7797 | lda $16,foo($29) !tlsgd!1 | |
7798 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
7799 | ldq $27,__tls_get_addr($29) !literal!2 | |
7800 | lda $16,foo($29) !tlsldm!2 | |
7801 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
7802 | ldq $1,foo($29) !gotdtprel | |
7803 | ldah $2,foo($29) !dtprelhi | |
7804 | lda $3,foo($2) !dtprello | |
7805 | lda $4,foo($29) !dtprel | |
7806 | ldq $1,foo($29) !gottprel | |
7807 | ldah $2,foo($29) !tprelhi | |
7808 | lda $3,foo($2) !tprello | |
7809 | lda $4,foo($29) !tprel' | |
7810 | tls_first_major=2 | |
7811 | tls_first_minor=13 | |
7812 | ;; | |
f996902d RH |
7813 | i[34567]86-*-*) |
7814 | conftest_s=' | |
7815 | .section ".tdata","awT",@progbits | |
7816 | foo: .long 25 | |
7817 | .text | |
7818 | movl %gs:0, %eax | |
7819 | leal foo@TLSGD(,%ebx,1), %eax | |
7820 | leal foo@TLSLDM(%ebx), %eax | |
7821 | leal foo@DTPOFF(%eax), %edx | |
7822 | movl foo@GOTTPOFF(%ebx), %eax | |
7823 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
7824 | addl foo@GOTNTPOFF(%ebx), %eax |
7825 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
7826 | movl $foo@TPOFF, %eax |
7827 | subl $foo@TPOFF, %eax | |
7828 | leal foo@NTPOFF(%ecx), %eax' | |
7829 | tls_first_major=2 | |
75d38379 JJ |
7830 | tls_first_minor=14 |
7831 | ;; | |
7832 | x86_64-*-*) | |
7833 | conftest_s=' | |
7834 | .section ".tdata","awT",@progbits | |
7835 | foo: .long 25 | |
7836 | .text | |
7837 | movq %fs:0, %rax | |
7838 | leaq foo@TLSGD(%rip), %rdi | |
7839 | leaq foo@TLSLD(%rip), %rdi | |
7840 | leaq foo@DTPOFF(%rax), %rdx | |
7841 | movq foo@GOTTPOFF(%rip), %rax | |
7842 | movq $foo@TPOFF, %rax' | |
7843 | tls_first_major=2 | |
7844 | tls_first_minor=14 | |
f996902d | 7845 | ;; |
7b6e506e RH |
7846 | ia64-*-*) |
7847 | conftest_s=' | |
7848 | .section ".tdata","awT",@progbits | |
7849 | foo: data8 25 | |
7850 | .text | |
7851 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
7852 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
7853 | addl r18 = @ltoff(@tprel(foo#)), gp | |
7854 | addl r19 = @dtprel(foo#), gp | |
7855 | adds r21 = @dtprel(foo#), r13 | |
7856 | movl r23 = @dtprel(foo#) | |
7857 | addl r20 = @tprel(foo#), gp | |
7858 | adds r22 = @tprel(foo#), r13 | |
7859 | movl r24 = @tprel(foo#)' | |
7860 | tls_first_major=2 | |
7861 | tls_first_minor=13 | |
7862 | ;; | |
c4501e62 JJ |
7863 | powerpc-*-*) |
7864 | conftest_s=' | |
7865 | .section ".tdata","awT",@progbits | |
7866 | .align 2 | |
7867 | ld0: .space 4 | |
7868 | ld1: .space 4 | |
7869 | x1: .space 4 | |
7870 | x2: .space 4 | |
7871 | x3: .space 4 | |
7872 | .text | |
7873 | addi 3,31,ld0@got@tlsgd | |
7874 | bl __tls_get_addr | |
7875 | addi 3,31,x1@got@tlsld | |
7876 | bl __tls_get_addr | |
7877 | addi 9,3,x1@dtprel | |
7878 | addis 9,3,x2@dtprel@ha | |
7879 | addi 9,9,x2@dtprel@l | |
7880 | lwz 9,x3@got@tprel(31) | |
7881 | add 9,9,x@tls | |
7882 | addi 9,2,x1@tprel | |
7883 | addis 9,2,x2@tprel@ha | |
7884 | addi 9,9,x2@tprel@l' | |
7885 | tls_first_major=2 | |
7886 | tls_first_minor=14 | |
9739c90c | 7887 | tls_as_opt=-a32 |
c4501e62 JJ |
7888 | ;; |
7889 | powerpc64-*-*) | |
7890 | conftest_s=' | |
7891 | .section ".tdata","awT",@progbits | |
7892 | .align 3 | |
7893 | ld0: .space 8 | |
7894 | ld1: .space 8 | |
7895 | x1: .space 8 | |
7896 | x2: .space 8 | |
7897 | x3: .space 8 | |
7898 | .text | |
7899 | addi 3,2,ld0@got@tlsgd | |
7900 | bl .__tls_get_addr | |
7901 | nop | |
7902 | addi 3,2,ld1@toc | |
7903 | bl .__tls_get_addr | |
7904 | nop | |
7905 | addi 3,2,x1@got@tlsld | |
7906 | bl .__tls_get_addr | |
7907 | nop | |
7908 | addi 9,3,x1@dtprel | |
7909 | bl .__tls_get_addr | |
7910 | nop | |
7911 | addis 9,3,x2@dtprel@ha | |
7912 | addi 9,9,x2@dtprel@l | |
7913 | bl .__tls_get_addr | |
7914 | nop | |
7915 | ld 9,x3@got@dtprel(2) | |
7916 | add 9,9,3 | |
7917 | bl .__tls_get_addr | |
7918 | nop' | |
7919 | tls_first_major=2 | |
7920 | tls_first_minor=14 | |
9739c90c | 7921 | tls_as_opt=-a64 |
c4501e62 | 7922 | ;; |
fd3cd001 UW |
7923 | s390-*-*) |
7924 | conftest_s=' | |
7925 | .section ".tdata","awT",@progbits | |
7926 | foo: .long 25 | |
7927 | .text | |
7928 | .long foo@TLSGD | |
7929 | .long foo@TLSLDM | |
7930 | .long foo@DTPOFF | |
7931 | .long foo@NTPOFF | |
7932 | .long foo@GOTNTPOFF | |
7933 | .long foo@INDNTPOFF | |
7934 | l %r1,foo@GOTNTPOFF(%r12) | |
7935 | l %r1,0(%r1):tls_load:foo | |
7936 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
7937 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
7938 | tls_first_major=2 | |
7939 | tls_first_minor=14 | |
9739c90c | 7940 | tls_as_opt=-m31 |
fd3cd001 UW |
7941 | ;; |
7942 | s390x-*-*) | |
7943 | conftest_s=' | |
7944 | .section ".tdata","awT",@progbits | |
7945 | foo: .long 25 | |
7946 | .text | |
7947 | .quad foo@TLSGD | |
7948 | .quad foo@TLSLDM | |
7949 | .quad foo@DTPOFF | |
7950 | .quad foo@NTPOFF | |
7951 | .quad foo@GOTNTPOFF | |
7952 | lg %r1,foo@GOTNTPOFF(%r12) | |
7953 | larl %r1,foo@INDNTPOFF | |
7954 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
7955 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
7956 | tls_first_major=2 | |
7957 | tls_first_minor=14 | |
9739c90c | 7958 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 7959 | ;; |
f996902d RH |
7960 | esac |
7961 | if test -z "$tls_first_major"; then | |
7962 | : | |
34a86c2b | 7963 | elif test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7964 | if test $gcc_cv_gas_major_version -eq $tls_first_major \ |
7965 | && test $gcc_cv_gas_minor_version -ge $tls_first_minor \ | |
7966 | || test $gcc_cv_gas_major_version -gt $tls_first_major ; then | |
7967 | ||
7968 | ||
f996902d | 7969 | gcc_cv_as_tls=yes |
093e61a6 | 7970 | |
ad9c4d9f NN |
7971 | |
7972 | fi | |
7973 | ||
f996902d RH |
7974 | elif test x$gcc_cv_as != x; then |
7975 | echo "$conftest_s" > conftest.s | |
9739c90c | 7976 | if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 |
f996902d RH |
7977 | then |
7978 | gcc_cv_as_tls=yes | |
7979 | fi | |
7980 | rm -f conftest.s conftest.o | |
7981 | fi | |
7982 | if test "$gcc_cv_as_tls" = yes; then | |
093e61a6 | 7983 | cat >> confdefs.h <<\EOF |
f996902d | 7984 | #define HAVE_AS_TLS 1 |
093e61a6 | 7985 | EOF |
f996902d RH |
7986 | |
7987 | fi | |
093e61a6 | 7988 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 |
f996902d | 7989 | |
3a37b08e RH |
7990 | case "$target" in |
7991 | # All TARGET_ABI_OSF targets. | |
7992 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
093e61a6 | 7993 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 |
6a1b7268 | 7994 | echo "configure:7995: checking assembler supports explicit relocations" >&5 |
093e61a6 RS |
7995 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
7996 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a37b08e | 7997 | else |
093e61a6 | 7998 | |
3a37b08e | 7999 | gcc_cv_as_explicit_relocs=unknown |
34a86c2b | 8000 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8001 | if test $gcc_cv_gas_major_version -eq 2 \ |
8002 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
8003 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8004 | ||
8005 | ||
3a37b08e | 8006 | gcc_cv_as_explicit_relocs=yes |
093e61a6 | 8007 | |
ad9c4d9f NN |
8008 | |
8009 | fi | |
8010 | ||
3a37b08e RH |
8011 | elif test x$gcc_cv_as != x; then |
8012 | cat > conftest.s << 'EOF' | |
8013 | .set nomacro | |
8014 | .text | |
8015 | extbl $3, $2, $3 !lituse_bytoff!1 | |
8016 | ldq $2, a($29) !literal!1 | |
8017 | ldq $4, b($29) !literal!2 | |
8018 | ldq_u $3, 0($2) !lituse_base!1 | |
8019 | ldq $27, f($29) !literal!5 | |
8020 | jsr $26, ($27), f !lituse_jsr!5 | |
8021 | ldah $29, 0($26) !gpdisp!3 | |
8022 | lda $0, c($29) !gprel | |
8023 | ldah $1, d($29) !gprelhigh | |
8024 | lda $1, d($1) !gprellow | |
8025 | lda $29, 0($29) !gpdisp!3 | |
8026 | EOF | |
8027 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8028 | gcc_cv_as_explicit_relocs=yes | |
8029 | else | |
8030 | gcc_cv_as_explicit_relocs=no | |
8031 | fi | |
8032 | rm -f conftest.s conftest.o | |
8033 | fi | |
093e61a6 | 8034 | |
cafe096b | 8035 | fi |
cafe096b | 8036 | |
093e61a6 RS |
8037 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 |
8038 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
8039 | cat >> confdefs.h <<\EOF | |
3a37b08e | 8040 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
093e61a6 | 8041 | EOF |
3a37b08e RH |
8042 | |
8043 | fi | |
8044 | ;; | |
1cb36a98 | 8045 | sparc*-*-*) |
093e61a6 | 8046 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 |
6a1b7268 | 8047 | echo "configure:8048: checking assembler .register pseudo-op support" >&5 |
093e61a6 RS |
8048 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
8049 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8050 | else |
093e61a6 | 8051 | |
5b68c389 AO |
8052 | gcc_cv_as_register_pseudo_op=unknown |
8053 | if test x$gcc_cv_as != x; then | |
8054 | # Check if we have .register | |
8055 | echo ".register %g2, #scratch" > conftest.s | |
8056 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 8057 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
8058 | else |
8059 | gcc_cv_as_register_pseudo_op=no | |
8060 | fi | |
8061 | rm -f conftest.s conftest.o | |
8062 | fi | |
093e61a6 | 8063 | |
cafe096b | 8064 | fi |
cafe096b | 8065 | |
093e61a6 RS |
8066 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 |
8067 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
8068 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8069 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
093e61a6 | 8070 | EOF |
1cb36a98 | 8071 | |
1cb36a98 | 8072 | fi |
1cb36a98 | 8073 | |
093e61a6 | 8074 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
6a1b7268 | 8075 | echo "configure:8076: checking assembler supports -relax" >&5 |
093e61a6 RS |
8076 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
8077 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e95b1e6a | 8078 | else |
093e61a6 | 8079 | |
e95b1e6a JJ |
8080 | gcc_cv_as_relax_opt=unknown |
8081 | if test x$gcc_cv_as != x; then | |
8082 | # Check if gas supports -relax | |
8083 | echo ".text" > conftest.s | |
8084 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
8085 | gcc_cv_as_relax_opt=yes | |
8086 | else | |
8087 | gcc_cv_as_relax_opt=no | |
8088 | fi | |
8089 | rm -f conftest.s conftest.o | |
8090 | fi | |
093e61a6 | 8091 | |
cafe096b | 8092 | fi |
cafe096b | 8093 | |
093e61a6 RS |
8094 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 |
8095 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
8096 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 8097 | #define HAVE_AS_RELAX_OPTION 1 |
093e61a6 | 8098 | EOF |
e95b1e6a JJ |
8099 | |
8100 | fi | |
8101 | ||
093e61a6 | 8102 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
6a1b7268 | 8103 | echo "configure:8104: checking assembler and linker support unaligned pc related relocs" >&5 |
093e61a6 RS |
8104 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
8105 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 8106 | else |
093e61a6 | 8107 | |
17e9e88c JJ |
8108 | gcc_cv_as_sparc_ua_pcrel=unknown |
8109 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
8110 | gcc_cv_as_sparc_ua_pcrel=no | |
8111 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
8112 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
8113 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
8114 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
8115 | fi |
8116 | rm -f conftest.s conftest.o conftest | |
8117 | fi | |
093e61a6 | 8118 | |
cafe096b | 8119 | fi |
cafe096b | 8120 | |
093e61a6 RS |
8121 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
8122 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
8123 | cat >> confdefs.h <<\EOF | |
17e9e88c | 8124 | #define HAVE_AS_SPARC_UA_PCREL 1 |
093e61a6 | 8125 | EOF |
17e9e88c JJ |
8126 | |
8127 | fi | |
8128 | ||
093e61a6 | 8129 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
6a1b7268 | 8130 | echo "configure:8131: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
093e61a6 RS |
8131 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
8132 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 8133 | else |
093e61a6 | 8134 | |
cf7b8b0d JJ |
8135 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then |
8136 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
8137 | if test x$gcc_cv_objdump != x; then | |
8138 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
8139 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
8140 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
8141 | echo "foo: .skip 4" >> conftest.s | |
8142 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
8143 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
8144 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
8145 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
8146 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
8147 | | grep 'DISP32' > /dev/null 2>&1; then | |
8148 | : | |
8149 | else | |
8150 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
8151 | fi | |
8152 | fi | |
8153 | fi | |
8154 | rm -f conftest.s conftest.o conftest | |
8155 | else | |
8156 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
8157 | fi | |
093e61a6 | 8158 | |
cafe096b | 8159 | fi |
cafe096b | 8160 | |
093e61a6 RS |
8161 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
8162 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
8163 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 8164 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
093e61a6 | 8165 | EOF |
cf7b8b0d JJ |
8166 | |
8167 | fi | |
8168 | ||
093e61a6 | 8169 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 |
6a1b7268 | 8170 | echo "configure:8171: checking for assembler offsetable %lo() support" >&5 |
093e61a6 RS |
8171 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
8172 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8173 | else |
093e61a6 | 8174 | |
22252625 JJ |
8175 | gcc_cv_as_offsetable_lo10=unknown |
8176 | if test "x$gcc_cv_as" != x; then | |
8177 | # Check if assembler has offsetable %lo() | |
8178 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
8179 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
8180 | if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ | |
8181 | > /dev/null 2>&1 && | |
8182 | $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ | |
8183 | > /dev/null 2>&1; then | |
8184 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
5b68c389 | 8185 | gcc_cv_as_offsetable_lo10=no |
22252625 JJ |
8186 | else |
8187 | gcc_cv_as_offsetable_lo10=yes | |
5b68c389 | 8188 | fi |
22252625 JJ |
8189 | else |
8190 | gcc_cv_as_offsetable_lo10=no | |
5b68c389 | 8191 | fi |
22252625 JJ |
8192 | rm -f conftest.s conftest.o conftest1.s conftest1.o |
8193 | fi | |
093e61a6 | 8194 | |
cafe096b | 8195 | fi |
cafe096b | 8196 | |
093e61a6 RS |
8197 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 |
8198 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
8199 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8200 | #define HAVE_AS_OFFSETABLE_LO10 1 |
093e61a6 | 8201 | EOF |
1cb36a98 | 8202 | |
1cb36a98 | 8203 | fi |
43160d01 | 8204 | |
1cb36a98 RH |
8205 | ;; |
8206 | ||
c307e6dd | 8207 | i[34567]86-*-* | x86_64-*-*) |
093e61a6 | 8208 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
6a1b7268 | 8209 | echo "configure:8210: checking assembler instructions" >&5 |
1cb36a98 | 8210 | gcc_cv_as_instructions= |
093e61a6 | 8211 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8212 | if test $gcc_cv_gas_major_version -eq 2 \ |
8213 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
8214 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8215 | ||
8216 | ||
981d4858 | 8217 | gcc_cv_as_instructions="filds fists" |
093e61a6 | 8218 | |
ad9c4d9f NN |
8219 | |
8220 | fi | |
8221 | ||
981d4858 | 8222 | elif test x$gcc_cv_as != x; then |
53b5ce19 JW |
8223 | set "filds fists" "filds mem; fists mem" |
8224 | while test $# -gt 0 | |
8225 | do | |
8226 | echo "$2" > conftest.s | |
8227 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8228 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
8229 | fi |
8230 | shift 2 | |
8231 | done | |
8232 | rm -f conftest.s conftest.o | |
1cb36a98 | 8233 | fi |
981d4858 | 8234 | if test x"$gcc_cv_as_instructions" != x; then |
093e61a6 | 8235 | cat >> confdefs.h <<EOF |
ee7692d2 | 8236 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
093e61a6 | 8237 | EOF |
981d4858 JM |
8238 | |
8239 | fi | |
093e61a6 | 8240 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 | 8241 | |
093e61a6 | 8242 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 |
6a1b7268 | 8243 | echo "configure:8244: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 | 8244 | gcc_cv_as_gotoff_in_data=no |
34a86c2b | 8245 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8246 | if test $gcc_cv_gas_major_version -eq 2 \ |
8247 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8248 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8249 | ||
8250 | ||
f88c65f7 | 8251 | gcc_cv_as_gotoff_in_data=yes |
093e61a6 | 8252 | |
ad9c4d9f NN |
8253 | |
8254 | fi | |
8255 | ||
f88c65f7 RH |
8256 | elif test x$gcc_cv_as != x; then |
8257 | cat > conftest.s <<EOF | |
8258 | .text | |
8259 | .L0: | |
8260 | nop | |
8261 | .data | |
8262 | .long .L0@GOTOFF | |
8263 | EOF | |
8264 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8265 | gcc_cv_as_gotoff_in_data=yes | |
8266 | fi | |
8267 | fi | |
093e61a6 | 8268 | cat >> confdefs.h <<EOF |
f88c65f7 | 8269 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
093e61a6 | 8270 | EOF |
f88c65f7 | 8271 | |
093e61a6 | 8272 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 |
1cb36a98 | 8273 | ;; |
ef1ecf87 RH |
8274 | |
8275 | ia64*-*-*) | |
093e61a6 | 8276 | echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 |
6a1b7268 | 8277 | echo "configure:8278: checking assembler supports ltoffx and ldxmov" >&5 |
093e61a6 RS |
8278 | if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
8279 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ef1ecf87 | 8280 | else |
093e61a6 | 8281 | |
ef1ecf87 | 8282 | gcc_cv_as_ltoffx_ldxmov_relocs=unknown |
ad9c4d9f NN |
8283 | if test $in_tree_gas = yes ; then |
8284 | if test $gcc_cv_gas_major_version -eq 2 \ | |
8285 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8286 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8287 | ||
8288 | ||
8289 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
093e61a6 | 8290 | |
ad9c4d9f NN |
8291 | |
8292 | fi | |
8293 | ||
ef1ecf87 RH |
8294 | elif test x$gcc_cv_as != x; then |
8295 | cat > conftest.s << 'EOF' | |
8296 | .text | |
8297 | addl r15 = @ltoffx(x#), gp | |
8298 | ;; | |
8299 | ld8.mov r16 = [r15], x# | |
8300 | EOF | |
8301 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8302 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
8303 | else | |
8304 | gcc_cv_as_ltoffx_ldxmov_relocs=no | |
8305 | fi | |
8306 | rm -f conftest.s conftest.o | |
8307 | fi | |
093e61a6 | 8308 | |
cafe096b | 8309 | fi |
cafe096b | 8310 | |
093e61a6 RS |
8311 | echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6 |
8312 | if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then | |
8313 | cat >> confdefs.h <<\EOF | |
ef1ecf87 | 8314 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
093e61a6 | 8315 | EOF |
ef1ecf87 RH |
8316 | |
8317 | fi | |
8318 | ;; | |
1cb36a98 | 8319 | esac |
53b5ce19 | 8320 | |
093e61a6 | 8321 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
6a1b7268 | 8322 | echo "configure:8323: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
8323 | gcc_cv_as_dwarf2_debug_line=no |
8324 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
8325 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
8326 | # info to the output file. So, as supported targets are added to gas 2.11, | |
8327 | # add some instruction here to (also) show we expect this might work. | |
8328 | # ??? Once 2.11 is released, probably need to add first known working | |
8329 | # version to the per-target configury. | |
8330 | case "$target" in | |
80486e06 | 8331 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
f8000836 | 8332 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* | xstormy16*-*-*) |
9d147085 RH |
8333 | insn="nop" |
8334 | ;; | |
8335 | ia64*-*-*) | |
8336 | insn="nop 0" | |
8337 | ;; | |
8338 | esac | |
34a86c2b | 8339 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8340 | if test $gcc_cv_gas_major_version -eq 2 \ |
8341 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8342 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8343 | ||
8344 | ||
8345 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8346 | && test x"$insn" != x ; then | |
8347 | gcc_cv_as_dwarf2_debug_line="yes" | |
8348 | fi | |
093e61a6 | 8349 | |
ad9c4d9f NN |
8350 | |
8351 | fi | |
8352 | ||
9d147085 | 8353 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
acc187f5 RH |
8354 | echo ' .file 1 "conftest.s"' > conftest.s |
8355 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 8356 | echo " $insn" >> conftest.s |
981975b6 | 8357 | # ??? This fails with non-gnu grep. |
9d147085 RH |
8358 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
8359 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 8360 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 8361 | # we specified the files, since these indices are also used |
981975b6 RH |
8362 | # by DW_AT_decl_file. Approximate this test by testing if |
8363 | # the assembler bitches if the same index is assigned twice. | |
8364 | echo ' .file 1 "foo.s"' > conftest.s | |
8365 | echo ' .file 1 "bar.s"' >> conftest.s | |
8366 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
8367 | then | |
8368 | gcc_cv_as_dwarf2_debug_line="no" | |
8369 | else | |
8370 | gcc_cv_as_dwarf2_debug_line="yes" | |
8371 | fi | |
9d147085 RH |
8372 | fi |
8373 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
8374 | fi | |
8375 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
093e61a6 | 8376 | cat >> confdefs.h <<\EOF |
9d147085 | 8377 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
093e61a6 | 8378 | EOF |
9d147085 RH |
8379 | |
8380 | fi | |
093e61a6 | 8381 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 |
9d147085 | 8382 | |
093e61a6 | 8383 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
6a1b7268 | 8384 | echo "configure:8385: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 | 8385 | gcc_cv_as_gdwarf2_flag=no |
34a86c2b | 8386 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8387 | if test $gcc_cv_gas_major_version -eq 2 \ |
8388 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8389 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8390 | ||
8391 | ||
8392 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8393 | && test x"$insn" != x ; then | |
8394 | gcc_cv_as_gdwarf2_flag="yes" | |
8395 | fi | |
093e61a6 | 8396 | |
ad9c4d9f NN |
8397 | |
8398 | fi | |
8399 | ||
5f0e9ea2 GK |
8400 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8401 | echo '' > conftest.s | |
8402 | # ??? This fails with non-gnu grep. | |
8403 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
8404 | then | |
8405 | gcc_cv_as_gdwarf2_flag="yes" | |
8406 | fi | |
8407 | rm -f conftest.s conftest.o | |
8408 | fi | |
8409 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
093e61a6 | 8410 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8411 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
093e61a6 | 8412 | EOF |
5f0e9ea2 GK |
8413 | |
8414 | fi | |
093e61a6 | 8415 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
5f0e9ea2 | 8416 | |
093e61a6 | 8417 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 |
6a1b7268 | 8418 | echo "configure:8419: checking assembler --gstabs support" >&5 |
5f0e9ea2 | 8419 | gcc_cv_as_gstabs_flag=no |
34a86c2b | 8420 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8421 | if test $gcc_cv_gas_major_version -eq 2 \ |
8422 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8423 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8424 | ||
8425 | ||
8426 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8427 | && test x"$insn" != x ; then | |
8428 | gcc_cv_as_gstabs_flag="yes" | |
8429 | fi | |
093e61a6 | 8430 | |
ad9c4d9f NN |
8431 | |
8432 | fi | |
8433 | ||
5f0e9ea2 GK |
8434 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8435 | echo '' > conftest.s | |
8436 | # ??? This fails with non-gnu grep. | |
8437 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
8438 | gcc_cv_as_gstabs_flag="yes" | |
8439 | fi | |
8440 | rm -f conftest.s conftest.o | |
8441 | fi | |
8442 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
093e61a6 | 8443 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8444 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
093e61a6 | 8445 | EOF |
5f0e9ea2 GK |
8446 | |
8447 | fi | |
093e61a6 | 8448 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
5f0e9ea2 | 8449 | |
093e61a6 | 8450 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
6a1b7268 | 8451 | echo "configure:8452: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 8452 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 8453 | if test $in_tree_ld = yes ; then |
96d0f4dc JJ |
8454 | 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 |
8455 | gcc_cv_ld_ro_rw_mix=read-write | |
8456 | fi | |
8457 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
8458 | echo '.section myfoosect, "a"' > conftest1.s |
8459 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 8460 | echo '.byte 1' >> conftest2.s |
90e145da | 8461 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 8462 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
8463 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
8464 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
8465 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 8466 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 8467 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 8468 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 8469 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
8470 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
8471 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
8472 | gcc_cv_ld_ro_rw_mix=read-only | |
8473 | else | |
8474 | gcc_cv_ld_ro_rw_mix=read-write | |
8475 | fi | |
8476 | fi | |
8477 | fi | |
8478 | rm -f conftest.* conftest[123].* | |
8479 | fi | |
8480 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
093e61a6 | 8481 | cat >> confdefs.h <<\EOF |
96d0f4dc | 8482 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
093e61a6 | 8483 | EOF |
96d0f4dc JJ |
8484 | |
8485 | fi | |
093e61a6 | 8486 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 8487 | |
093e61a6 | 8488 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
6a1b7268 | 8489 | echo "configure:8490: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 8490 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 8491 | if test $in_tree_ld = yes ; then |
275b60d6 JJ |
8492 | 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 |
8493 | gcc_cv_ld_eh_frame_hdr=yes | |
8494 | fi | |
8495 | elif test x$gcc_cv_ld != x; then | |
8496 | # Check if linker supports --eh-frame-hdr option | |
8497 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
8498 | gcc_cv_ld_eh_frame_hdr=yes | |
8499 | fi | |
8500 | fi | |
8501 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
093e61a6 | 8502 | cat >> confdefs.h <<\EOF |
275b60d6 | 8503 | #define HAVE_LD_EH_FRAME_HDR 1 |
093e61a6 | 8504 | EOF |
275b60d6 JJ |
8505 | |
8506 | fi | |
093e61a6 | 8507 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 8508 | |
24a4dd31 | 8509 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
6a1b7268 | 8510 | echo "configure:8511: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
8511 | gcc_cv_ld_pie=no |
8512 | if test $in_tree_ld = yes ; then | |
8513 | 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 | |
8514 | gcc_cv_ld_pie=yes | |
8515 | fi | |
8516 | elif test x$gcc_cv_ld != x; then | |
8517 | # Check if linker supports -pie option | |
8518 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
8519 | gcc_cv_ld_pie=yes | |
8520 | fi | |
8521 | fi | |
8522 | if test x"$gcc_cv_ld_pie" = xyes; then | |
8523 | cat >> confdefs.h <<\EOF | |
8524 | #define HAVE_LD_PIE 1 | |
8525 | EOF | |
8526 | ||
8527 | fi | |
8528 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 | |
8529 | ||
4357a6c3 CD |
8530 | # Miscellaneous target-specific checks. |
8531 | case "$target" in | |
8532 | mips*-*-*) | |
093e61a6 | 8533 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 |
6a1b7268 | 8534 | echo "configure:8535: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
8535 | gcc_cv_mips_libgloss_startup=no |
8536 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
8537 | if test "x$exec_prefix" = xNONE; then | |
8538 | if test "x$prefix" = xNONE; then | |
8539 | test_prefix=/usr/local | |
8540 | else | |
8541 | test_prefix=$prefix | |
8542 | fi | |
8543 | else | |
8544 | test_prefix=$exec_prefix | |
8545 | fi | |
8546 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld | |
8547 | do | |
8548 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
8549 | gcc_cv_mips_libgloss_startup=yes | |
8550 | break | |
8551 | fi | |
8552 | done | |
8553 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
093e61a6 | 8554 | cat >> confdefs.h <<\EOF |
4357a6c3 | 8555 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 |
093e61a6 | 8556 | EOF |
4357a6c3 CD |
8557 | |
8558 | fi | |
093e61a6 | 8559 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 |
cafe096b | 8560 | |
093e61a6 | 8561 | echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6 |
6a1b7268 | 8562 | echo "configure:8563: checking whether the assembler has explicit relocation support" >&5 |
cafe096b EC |
8563 | if test x$gcc_cv_mips_explicit_relocs = x; then |
8564 | gcc_cv_mips_explicit_relocs=no | |
8565 | if test x$gcc_cv_as != x; then | |
8566 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s | |
8567 | if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then | |
8568 | gcc_cv_mips_explicit_relocs=yes | |
8569 | fi | |
8570 | rm -f conftest.s conftest.o | |
8571 | fi | |
8572 | fi | |
8573 | if test $gcc_cv_mips_explicit_relocs = yes; then | |
8574 | test x$target_cpu_default != x || target_cpu_default=0 | |
8575 | target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)" | |
8576 | fi | |
093e61a6 | 8577 | echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6 |
4357a6c3 CD |
8578 | ;; |
8579 | esac | |
8580 | ||
9fb28a67 | 8581 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 8582 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
093e61a6 | 8583 | cat >> confdefs.h <<EOF |
793e9558 | 8584 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
093e61a6 | 8585 | EOF |
793e9558 PB |
8586 | |
8587 | fi | |
8588 | ||
861bb6c1 | 8589 | # Figure out what language subdirectories are present. |
71205e0b MH |
8590 | # Look if the user specified --enable-languages="..."; if not, use |
8591 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
8592 | # go away some day. | |
cc9a08e0 | 8593 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
8594 | if test x"${enable_languages+set}" != xset; then |
8595 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 8596 | enable_languages="${LANGUAGES}" |
093e61a6 | 8597 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 |
cc9a08e0 | 8598 | |
71205e0b MH |
8599 | else |
8600 | enable_languages=all | |
8601 | fi | |
d6c6b553 | 8602 | else |
015089dd TJ |
8603 | if test x"${enable_languages}" = x \ |
8604 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 8605 | then |
093e61a6 | 8606 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } |
d6c6b553 | 8607 | fi |
71205e0b | 8608 | fi |
cc9a08e0 | 8609 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
8610 | |
8611 | # First scan to see if an enabled language requires some other language. | |
8612 | # We assume that a given config-lang.in will list all the language | |
8613 | # front ends it requires, even if some are required indirectly. | |
8614 | for lang in ${srcdir}/*/config-lang.in .. | |
8615 | do | |
8616 | case $lang in | |
8617 | ..) | |
8618 | ;; | |
8619 | # The odd quoting in the next line works around | |
8620 | # an apparent bug in bash 1.12 on linux. | |
8621 | ${srcdir}/[*]/config-lang.in) | |
8622 | ;; | |
8623 | *) | |
8624 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
8625 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
8626 | for other in $this_lang_requires | |
8627 | do | |
8628 | case ,${enable_languages}, in | |
8629 | *,$other,*) | |
8630 | ;; | |
8631 | *,all,*) | |
8632 | ;; | |
1bf17cc4 | 8633 | *,$lang_alias,*) |
75382c6d TT |
8634 | enable_languages="$enable_languages,$other" |
8635 | ;; | |
8636 | esac | |
8637 | done | |
8638 | ;; | |
8639 | esac | |
8640 | done | |
8641 | ||
015089dd TJ |
8642 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
8643 | found_languages= | |
861bb6c1 JL |
8644 | subdirs= |
8645 | for lang in ${srcdir}/*/config-lang.in .. | |
8646 | do | |
8647 | case $lang in | |
8648 | ..) ;; | |
8649 | # The odd quoting in the next line works around | |
8650 | # an apparent bug in bash 1.12 on linux. | |
8651 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
8652 | *) |
8653 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
8654 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
8655 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
8656 | if test "x$lang_alias" = x |
8657 | then | |
8658 | echo "$lang doesn't set \$language." 1>&2 | |
8659 | exit 1 | |
8660 | fi | |
2b60b2cb AO |
8661 | case ${build_by_default},${enable_languages}, in |
8662 | *,$lang_alias,*) add_this_lang=yes ;; | |
8663 | no,*) add_this_lang=no ;; | |
8664 | *,all,*) add_this_lang=yes ;; | |
8665 | *) add_this_lang=no ;; | |
8666 | esac | |
015089dd | 8667 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
8668 | if test x"${add_this_lang}" = xyes; then |
8669 | case $lang in | |
8670 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 8671 | if test x$have_gnat = xyes ; then |
71205e0b MH |
8672 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
8673 | fi | |
8674 | ;; | |
8675 | *) | |
8676 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
8677 | ;; | |
8678 | esac | |
8679 | fi | |
8680 | ;; | |
861bb6c1 JL |
8681 | esac |
8682 | done | |
8683 | ||
015089dd TJ |
8684 | missing_languages= |
8685 | for expected_language in ${expected_languages} .. | |
093e61a6 | 8686 | do |
015089dd TJ |
8687 | if test "${expected_language}" != ..; then |
8688 | missing_language="${expected_language}" | |
8689 | if test "${expected_language}" = "c" \ | |
8690 | || test "${expected_language}" = "all"; then | |
8691 | missing_language= | |
8692 | fi | |
8693 | for found_language in ${found_languages} .. | |
093e61a6 | 8694 | do |
015089dd TJ |
8695 | if test "${found_language}" != ..; then |
8696 | if test "${expected_language}" = "${found_language}"; then | |
8697 | missing_language= | |
8698 | fi | |
8699 | fi | |
8700 | done | |
8701 | if test "x${missing_language}" != x; then | |
8702 | missing_languages="${missing_languages} ${missing_language}" | |
8703 | fi | |
8704 | fi | |
8705 | done | |
8706 | ||
8707 | if test "x$missing_languages" != x; then | |
093e61a6 | 8708 | { echo "configure: error: |
015089dd | 8709 | The following requested languages were not found:${missing_languages} |
093e61a6 | 8710 | The following languages were available: c${found_languages}" 1>&2; exit 1; } |
02ef40d9 TJ |
8711 | fi |
8712 | ||
f24af81b TT |
8713 | # Make gthr-default.h if we have a thread file. |
8714 | gthread_flags= | |
75bffa71 | 8715 | if test $thread_file != single; then |
f24af81b | 8716 | rm -f gthr-default.h |
db0d1ed9 | 8717 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
8718 | gthread_flags=-DHAVE_GTHR_DEFAULT |
8719 | fi | |
8720 | ||
8721 | ||
81bf3d9e RH |
8722 | # Find out what GC implementation we want, or may, use. |
8723 | # Check whether --with-gc or --without-gc was given. | |
8724 | if test "${with_gc+set}" = set; then | |
8725 | withval="$with_gc" | |
8726 | case "$withval" in | |
8727 | simple | page) | |
8728 | GGC=ggc-$withval | |
8729 | ;; | |
8730 | *) | |
093e61a6 | 8731 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } |
81bf3d9e RH |
8732 | ;; |
8733 | esac | |
8734 | else | |
005537df | 8735 | GGC=ggc-page |
093e61a6 RS |
8736 | fi |
8737 | ||
81bf3d9e RH |
8738 | |
8739 | echo "Using $GGC for garbage collection." | |
8740 | ||
3c809ba4 | 8741 | # Use the system's zlib library. |
b8dad04b ZW |
8742 | zlibdir=-L../zlib |
8743 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
8744 | # Check whether --with-system-zlib or --without-system-zlib was given. |
8745 | if test "${with_system_zlib+set}" = set; then | |
8746 | withval="$with_system_zlib" | |
8747 | zlibdir= | |
8748 | zlibinc= | |
8749 | ||
093e61a6 RS |
8750 | fi |
8751 | ||
3c809ba4 AG |
8752 | |
8753 | ||
8754 | ||
dc6746e7 | 8755 | |
093e61a6 | 8756 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
6a1b7268 | 8757 | echo "configure:8758: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
8758 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
8759 | if test "${enable_maintainer_mode+set}" = set; then | |
8760 | enableval="$enable_maintainer_mode" | |
8761 | maintainer_mode=$enableval | |
8762 | else | |
8763 | maintainer_mode=no | |
093e61a6 RS |
8764 | fi |
8765 | ||
dc6746e7 | 8766 | |
093e61a6 | 8767 | echo "$ac_t""$maintainer_mode" 1>&6 |
dc6746e7 PT |
8768 | |
8769 | if test "$maintainer_mode" = "yes"; then | |
8770 | MAINT='' | |
8771 | else | |
8772 | MAINT='#' | |
8773 | fi | |
8774 | ||
861bb6c1 JL |
8775 | # Make empty files to contain the specs and options for each language. |
8776 | # Then add #include lines to for a compiler that has specs and/or options. | |
8777 | ||
8778 | lang_specs_files= | |
8779 | lang_options_files= | |
3103b7db | 8780 | lang_tree_files= |
861bb6c1 JL |
8781 | for subdir in . $subdirs |
8782 | do | |
75bffa71 | 8783 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 8784 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 8785 | fi |
75bffa71 | 8786 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 8787 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 8788 | fi |
3103b7db | 8789 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 8790 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 8791 | fi |
861bb6c1 JL |
8792 | done |
8793 | ||
8794 | # These (without "all_") are set in each config-lang.in. | |
8795 | # `language' must be a single word so is spelled singularly. | |
8796 | all_languages= | |
8797 | all_boot_languages= | |
8798 | all_compilers= | |
8799 | all_stagestuff= | |
e34a3d31 | 8800 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 JL |
8801 | # List of language makefile fragments. |
8802 | all_lang_makefiles= | |
e2500fed | 8803 | # Files for gengtype |
ef69da62 | 8804 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
8805 | # Files for gengtype with language |
8806 | all_gtfiles_files_langs= | |
8807 | all_gtfiles_files_files= | |
861bb6c1 JL |
8808 | |
8809 | # Add the language fragments. | |
8810 | # Languages are added via two mechanisms. Some information must be | |
8811 | # recorded in makefile variables, these are defined in config-lang.in. | |
8812 | # We accumulate them and plug them into the main Makefile. | |
8813 | # The other mechanism is a set of hooks for each of the main targets | |
8814 | # like `clean', `install', etc. | |
8815 | ||
8816 | language_fragments="Make-lang" | |
8817 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8818 | |
8819 | for s in .. $subdirs | |
8820 | do | |
75bffa71 | 8821 | if test $s != ".." |
861bb6c1 JL |
8822 | then |
8823 | language= | |
8824 | boot_language= | |
8825 | compilers= | |
8826 | stagestuff= | |
861bb6c1 | 8827 | outputs= |
e2500fed | 8828 | gtfiles= |
861bb6c1 | 8829 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8830 | if test "x$language" = x |
861bb6c1 JL |
8831 | then |
8832 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8833 | exit 1 | |
8834 | fi | |
72aaffbd ZW |
8835 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8836 | if test -f ${srcdir}/$s/Makefile.in | |
8837 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8838 | fi | |
861bb6c1 | 8839 | all_languages="$all_languages $language" |
75bffa71 | 8840 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8841 | then |
8842 | all_boot_languages="$all_boot_languages $language" | |
8843 | fi | |
8844 | all_compilers="$all_compilers $compilers" | |
8845 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8846 | all_outputs="$all_outputs $outputs" |
e2500fed | 8847 | all_gtfiles="$all_gtfiles $gtfiles" |
8ac9d31f TJ |
8848 | for f in .. $gtfiles |
8849 | do | |
8850 | if test $f != ".." | |
8851 | then | |
8852 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8853 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8854 | fi | |
8855 | done | |
861bb6c1 JL |
8856 | fi |
8857 | done | |
8858 | ||
8ac9d31f TJ |
8859 | # Pick up gtfiles for c |
8860 | gtfiles= | |
8861 | s="c" | |
8862 | . ${srcdir}/c-config-lang.in | |
8863 | all_gtfiles="$all_gtfiles $gtfiles" | |
8864 | for f in .. $gtfiles | |
8865 | do | |
8866 | if test $f != ".." | |
8867 | then | |
8868 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8869 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8870 | fi | |
8871 | done | |
8872 | ||
cbc59f01 DD |
8873 | check_languages= |
8874 | for language in .. $all_languages | |
8875 | do | |
8876 | if test $language != ".." | |
8877 | then | |
8878 | check_languages="$check_languages check-$language" | |
8879 | fi | |
8880 | done | |
8881 | ||
861bb6c1 JL |
8882 | # Since we can't use `::' targets, we link each language in |
8883 | # with a set of hooks, reached indirectly via lang.${target}. | |
8884 | ||
8885 | rm -f Make-hooks | |
8886 | touch Make-hooks | |
65ebbf81 | 8887 | target_list="all.build all.cross start.encap rest.encap tags \ |
d3945f0a | 8888 | info dvi generated-manpages \ |
861bb6c1 | 8889 | install-normal install-common install-info install-man \ |
436a88a6 | 8890 | uninstall \ |
861bb6c1 | 8891 | mostlyclean clean distclean extraclean maintainer-clean \ |
8f231b5d | 8892 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
8893 | for t in $target_list |
8894 | do | |
8895 | x= | |
ab87f8c8 | 8896 | for lang in .. $all_languages |
861bb6c1 | 8897 | do |
ab87f8c8 JL |
8898 | if test $lang != ".."; then |
8899 | x="$x $lang.$t" | |
861bb6c1 JL |
8900 | fi |
8901 | done | |
8902 | echo "lang.$t: $x" >> Make-hooks | |
8903 | done | |
8904 | ||
cc06d68c | 8905 | # Create .gdbinit. |
861bb6c1 | 8906 | |
cc06d68c GP |
8907 | echo "dir ." > .gdbinit |
8908 | echo "dir ${srcdir}" >> .gdbinit | |
8909 | if test x$gdb_needs_out_file_path = xyes | |
8910 | then | |
8911 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8912 | fi | |
8913 | if test "x$subdirs" != x; then | |
8914 | for s in $subdirs | |
8915 | do | |
8916 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8917 | done | |
861bb6c1 | 8918 | fi |
cc06d68c | 8919 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8920 | |
8f8d3278 NC |
8921 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8922 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8923 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8924 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8925 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8926 | # make and thus we'd get different behavior depending on where we built the | |
8927 | # sources. | |
5949a9fc | 8928 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8929 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8930 | else | |
8f8d3278 NC |
8931 | # An explanation of the sed strings: |
8932 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8933 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8934 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8935 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8936 | # |
8937 | # (*) Note this pattern overwrites the first character of the string | |
8938 | # with a forward slash if one is not already present. This is not a | |
8939 | # problem because the exact names of the sub-directories concerned is | |
8940 | # unimportant, just the number of them matters. | |
8941 | # | |
8942 | # The practical upshot of these patterns is like this: | |
8943 | # | |
8944 | # prefix exec_prefix result | |
8945 | # ------ ----------- ------ | |
8946 | # /foo /foo/bar ../ | |
8947 | # /foo/ /foo/bar ../ | |
8948 | # /foo /foo/bar/ ../ | |
8949 | # /foo/ /foo/bar/ ../ | |
8950 | # /foo /foo/bar/ugg ../../ | |
8951 | # | |
4c112cda NC |
8952 | dollar='$$' |
8953 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8954 | fi |
8955 | ||
8956 | ||
2ce3c6c6 | 8957 | |
2bbea3a6 RH |
8958 | # Find a directory in which to install a shared libgcc. |
8959 | ||
8960 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8961 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8962 | enableval="$enable_version_specific_runtime_libs" | |
093e61a6 RS |
8963 | : |
8964 | fi | |
2bbea3a6 RH |
8965 | |
8966 | ||
5b15f277 RH |
8967 | # Check whether --with-slibdir or --without-slibdir was given. |
8968 | if test "${with_slibdir+set}" = set; then | |
8969 | withval="$with_slibdir" | |
8970 | slibdir="$with_slibdir" | |
8971 | else | |
8972 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8973 | slibdir='$(libsubdir)' |
5b15f277 | 8974 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8975 | slibdir='$(build_tooldir)/lib' |
8976 | else | |
5b15f277 | 8977 | slibdir='$(libdir)' |
2bbea3a6 | 8978 | fi |
093e61a6 RS |
8979 | fi |
8980 | ||
2bbea3a6 RH |
8981 | |
8982 | ||
1e6347d8 | 8983 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
8984 | |
8985 | ||
861bb6c1 JL |
8986 | # Process the language and host/target makefile fragments. |
8987 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
8988 | ||
8989 | # Substitute configuration variables | |
8990 | ||
8991 | ||
8992 | ||
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 | ||
9b16d2c4 | 9036 | |
e9a25f70 | 9037 | |
6e26218f | 9038 | |
c8724862 | 9039 | |
e061d1ce | 9040 | |
d8bb17c8 | 9041 | |
11642c3a ZW |
9042 | |
9043 | ||
9044 | ||
9045 | ||
9046 | ||
9047 | ||
9048 | ||
3d9d2476 | 9049 | |
596151e1 | 9050 | |
8ac9d31f TJ |
9051 | |
9052 | ||
9053 | ||
e2500fed | 9054 | |
d5355cb2 | 9055 | |
476d9098 | 9056 | |
861bb6c1 JL |
9057 | |
9058 | ||
9059 | # Echo that links are built | |
75bffa71 | 9060 | if test x$host = x$target |
861bb6c1 JL |
9061 | then |
9062 | str1="native " | |
9063 | else | |
9064 | str1="cross-" | |
9065 | str2=" from $host" | |
9066 | fi | |
9067 | ||
75bffa71 | 9068 | if test x$host != x$build |
861bb6c1 JL |
9069 | then |
9070 | str3=" on a $build system" | |
9071 | fi | |
9072 | ||
75bffa71 | 9073 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9074 | then |
9075 | str4= | |
9076 | fi | |
9077 | ||
9078 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
9079 | ||
75bffa71 | 9080 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
9081 | then |
9082 | echo " ${str2}${str3}." 1>&2 | |
9083 | fi | |
9084 | ||
f6cb0e63 | 9085 | # Truncate the target if necessary |
75bffa71 | 9086 | if test x$host_truncate_target != x; then |
f6cb0e63 JL |
9087 | target=`echo $target | sed -e 's/\(..............\).*/\1/'` |
9088 | fi | |
9089 | ||
861bb6c1 JL |
9090 | # Configure the subdirectories |
9091 | # AC_CONFIG_SUBDIRS($subdirs) | |
9092 | ||
9093 | # Create the Makefile | |
9094 | # and configure language subdirectories | |
093e61a6 RS |
9095 | trap '' 1 2 15 |
9096 | cat > confcache <<\EOF | |
861bb6c1 JL |
9097 | # This file is a shell script that caches the results of configure |
9098 | # tests run on this system so they can be shared between configure | |
093e61a6 RS |
9099 | # scripts and configure runs. It is not useful on other systems. |
9100 | # If it contains results you don't want to keep, you may remove or edit it. | |
861bb6c1 | 9101 | # |
093e61a6 RS |
9102 | # By default, configure uses ./config.cache as the cache file, |
9103 | # creating it if it does not exist already. You can give configure | |
9104 | # the --cache-file=FILE option to use a different cache file; that is | |
9105 | # what configure does when it calls configure scripts in | |
9106 | # subdirectories, so they share the cache. | |
9107 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
9108 | # config.status only pays attention to the cache file if you give it the | |
9109 | # --recheck option to rerun configure. | |
861bb6c1 | 9110 | # |
093e61a6 | 9111 | EOF |
861bb6c1 JL |
9112 | # The following way of writing the cache mishandles newlines in values, |
9113 | # but we know of no workaround that is simple, portable, and efficient. | |
9114 | # So, don't put newlines in cache variables' values. | |
9115 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
9116 | # and sets the high bit in the cache file unless we assign to the vars. | |
093e61a6 RS |
9117 | (set) 2>&1 | |
9118 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
9119 | *ac_space=\ *) | |
9120 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
9121 | # turns \\\\ into \\, and sed turns \\ into \). | |
9122 | sed -n \ | |
9123 | -e "s/'/'\\\\''/g" \ | |
9124 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
9125 | ;; | |
9126 | *) | |
9127 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
9128 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
9129 | ;; | |
9130 | esac >> confcache | |
9131 | if cmp -s $cache_file confcache; then | |
9132 | : | |
9133 | else | |
861bb6c1 | 9134 | if test -w $cache_file; then |
093e61a6 RS |
9135 | echo "updating cache $cache_file" |
9136 | cat confcache > $cache_file | |
861bb6c1 JL |
9137 | else |
9138 | echo "not updating unwritable cache $cache_file" | |
9139 | fi | |
9140 | fi | |
9141 | rm -f confcache | |
9142 | ||
093e61a6 RS |
9143 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
9144 | ||
861bb6c1 JL |
9145 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
9146 | # Let make expand exec_prefix. | |
9147 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9148 | ||
093e61a6 RS |
9149 | # Any assignment to VPATH causes Sun make to only execute |
9150 | # the first set of double-colon rules, so remove it if not needed. | |
9151 | # If there is a colon in the path, we need to keep it. | |
861bb6c1 | 9152 | if test "x$srcdir" = x.; then |
093e61a6 | 9153 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
861bb6c1 JL |
9154 | fi |
9155 | ||
093e61a6 | 9156 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
cafe096b | 9157 | |
093e61a6 | 9158 | DEFS=-DHAVE_CONFIG_H |
cafe096b | 9159 | |
093e61a6 | 9160 | # Without the "./", some shells look in PATH for config.status. |
cafe096b | 9161 | : ${CONFIG_STATUS=./config.status} |
cafe096b | 9162 | |
093e61a6 RS |
9163 | echo creating $CONFIG_STATUS |
9164 | rm -f $CONFIG_STATUS | |
9165 | cat > $CONFIG_STATUS <<EOF | |
9166 | #! /bin/sh | |
9167 | # Generated automatically by configure. | |
9168 | # Run this file to recreate the current configuration. | |
9169 | # This directory was configured as follows, | |
9170 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
cafe096b | 9171 | # |
093e61a6 | 9172 | # $0 $ac_configure_args |
cafe096b | 9173 | # |
093e61a6 RS |
9174 | # Compiler output produced by configure, useful for debugging |
9175 | # configure, is in ./config.log if it exists. | |
cafe096b | 9176 | |
093e61a6 RS |
9177 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
9178 | for ac_option | |
cafe096b | 9179 | do |
093e61a6 RS |
9180 | case "\$ac_option" in |
9181 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9182 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
9183 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
9184 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
9185 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
9186 | exit 0 ;; | |
9187 | -help | --help | --hel | --he | --h) | |
9188 | echo "\$ac_cs_usage"; exit 0 ;; | |
9189 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
cafe096b EC |
9190 | esac |
9191 | done | |
9192 | ||
093e61a6 | 9193 | ac_given_srcdir=$srcdir |
cafe096b | 9194 | |
093e61a6 RS |
9195 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
9196 | EOF | |
9197 | cat >> $CONFIG_STATUS <<EOF | |
cafe096b | 9198 | |
093e61a6 RS |
9199 | # Protect against being on the right side of a sed subst in config.status. |
9200 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
9201 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
9202 | $ac_vpsub | |
9203 | $extrasub | |
9204 | s%@SHELL@%$SHELL%g | |
9205 | s%@CFLAGS@%$CFLAGS%g | |
9206 | s%@CPPFLAGS@%$CPPFLAGS%g | |
9207 | s%@CXXFLAGS@%$CXXFLAGS%g | |
9208 | s%@FFLAGS@%$FFLAGS%g | |
9209 | s%@DEFS@%$DEFS%g | |
9210 | s%@LDFLAGS@%$LDFLAGS%g | |
9211 | s%@LIBS@%$LIBS%g | |
9212 | s%@exec_prefix@%$exec_prefix%g | |
9213 | s%@prefix@%$prefix%g | |
9214 | s%@program_transform_name@%$program_transform_name%g | |
9215 | s%@bindir@%$bindir%g | |
9216 | s%@sbindir@%$sbindir%g | |
9217 | s%@libexecdir@%$libexecdir%g | |
9218 | s%@datadir@%$datadir%g | |
9219 | s%@sysconfdir@%$sysconfdir%g | |
9220 | s%@sharedstatedir@%$sharedstatedir%g | |
9221 | s%@localstatedir@%$localstatedir%g | |
9222 | s%@libdir@%$libdir%g | |
9223 | s%@includedir@%$includedir%g | |
9224 | s%@oldincludedir@%$oldincludedir%g | |
9225 | s%@infodir@%$infodir%g | |
9226 | s%@mandir@%$mandir%g | |
9227 | s%@host@%$host%g | |
9228 | s%@host_alias@%$host_alias%g | |
9229 | s%@host_cpu@%$host_cpu%g | |
9230 | s%@host_vendor@%$host_vendor%g | |
9231 | s%@host_os@%$host_os%g | |
9232 | s%@target@%$target%g | |
9233 | s%@target_alias@%$target_alias%g | |
9234 | s%@target_cpu@%$target_cpu%g | |
9235 | s%@target_vendor@%$target_vendor%g | |
9236 | s%@target_os@%$target_os%g | |
9237 | s%@build@%$build%g | |
9238 | s%@build_alias@%$build_alias%g | |
9239 | s%@build_cpu@%$build_cpu%g | |
9240 | s%@build_vendor@%$build_vendor%g | |
9241 | s%@build_os@%$build_os%g | |
9242 | s%@build_canonical@%$build_canonical%g | |
9243 | s%@host_canonical@%$host_canonical%g | |
9244 | s%@target_subdir@%$target_subdir%g | |
9245 | s%@CC@%$CC%g | |
9246 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
9247 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
9248 | s%@CPP@%$CPP%g | |
9249 | s%@GNATBIND@%$GNATBIND%g | |
9250 | s%@ADAC@%$ADAC%g | |
9251 | s%@strict1_warn@%$strict1_warn%g | |
9252 | s%@warn_cflags@%$warn_cflags%g | |
9253 | s%@WERROR@%$WERROR%g | |
9254 | s%@nocommon_flag@%$nocommon_flag%g | |
9255 | s%@valgrind_path@%$valgrind_path%g | |
9256 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
9257 | s%@valgrind_command@%$valgrind_command%g | |
9258 | s%@coverage_flags@%$coverage_flags%g | |
9259 | s%@enable_multilib@%$enable_multilib%g | |
9260 | s%@enable_shared@%$enable_shared%g | |
9261 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
9262 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
9263 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
9264 | s%@SET_MAKE@%$SET_MAKE%g | |
9265 | s%@AWK@%$AWK%g | |
9266 | s%@LN@%$LN%g | |
9267 | s%@LN_S@%$LN_S%g | |
9268 | s%@RANLIB@%$RANLIB%g | |
9269 | s%@INSTALL@%$INSTALL%g | |
9270 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
9271 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
9272 | s%@have_mktemp_command@%$have_mktemp_command%g | |
9273 | s%@MAKEINFO@%$MAKEINFO%g | |
9274 | s%@BUILD_INFO@%$BUILD_INFO%g | |
9275 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
9276 | s%@make_compare_target@%$make_compare_target%g | |
9277 | s%@FLEX@%$FLEX%g | |
9278 | s%@BISON@%$BISON%g | |
9279 | s%@stage1_cflags@%$stage1_cflags%g | |
9280 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
9281 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
9282 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
9283 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
9284 | s%@LIBICONV@%$LIBICONV%g | |
9285 | s%@manext@%$manext%g | |
9286 | s%@objext@%$objext%g | |
9287 | s%@extra_modes_file@%$extra_modes_file%g | |
9288 | s%@FORBUILD@%$FORBUILD%g | |
9289 | s%@PACKAGE@%$PACKAGE%g | |
9290 | s%@VERSION@%$VERSION%g | |
9291 | s%@ALLOCA@%$ALLOCA%g | |
9292 | s%@GLIBC21@%$GLIBC21%g | |
9293 | s%@USE_NLS@%$USE_NLS%g | |
9294 | s%@MSGFMT@%$MSGFMT%g | |
9295 | s%@GMSGFMT@%$GMSGFMT%g | |
9296 | s%@XGETTEXT@%$XGETTEXT%g | |
9297 | s%@INTLBISON@%$INTLBISON%g | |
9298 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
9299 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
9300 | s%@CATALOGS@%$CATALOGS%g | |
9301 | s%@CATOBJEXT@%$CATOBJEXT%g | |
9302 | s%@INTLLIBS@%$INTLLIBS%g | |
9303 | s%@INTLDEPS@%$INTLDEPS%g | |
9304 | s%@INTLOBJS@%$INTLOBJS%g | |
9305 | s%@POSUB@%$POSUB%g | |
9306 | s%@DATADIRNAME@%$DATADIRNAME%g | |
9307 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
9308 | s%@GENCAT@%$GENCAT%g | |
9309 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
9310 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g | |
9311 | s%@CROSS@%$CROSS%g | |
9312 | s%@ALL@%$ALL%g | |
9313 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
9314 | s%@inhibit_libc@%$inhibit_libc%g | |
9315 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
9316 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
9317 | s%@BUILD_CC@%$BUILD_CC%g | |
9318 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g | |
9319 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
9320 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9321 | s%@libgcc_visibility@%$libgcc_visibility%g | |
9322 | s%@gthread_flags@%$gthread_flags%g | |
9323 | s%@GGC@%$GGC%g | |
9324 | s%@zlibdir@%$zlibdir%g | |
9325 | s%@zlibinc@%$zlibinc%g | |
9326 | s%@MAINT@%$MAINT%g | |
9327 | s%@gcc_tooldir@%$gcc_tooldir%g | |
9328 | s%@dollar@%$dollar%g | |
9329 | s%@slibdir@%$slibdir%g | |
9330 | s%@objdir@%$objdir%g | |
9331 | s%@subdirs@%$subdirs%g | |
9332 | s%@srcdir@%$srcdir%g | |
9333 | s%@all_boot_languages@%$all_boot_languages%g | |
9334 | s%@all_compilers@%$all_compilers%g | |
9335 | s%@all_gtfiles@%$all_gtfiles%g | |
9336 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
9337 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
9338 | s%@all_lang_makefiles@%$all_lang_makefiles%g | |
9339 | s%@all_languages@%$all_languages%g | |
9340 | s%@all_stagestuff@%$all_stagestuff%g | |
9341 | s%@build_exeext@%$build_exeext%g | |
9342 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
9343 | s%@build_xm_file_list@%$build_xm_file_list%g | |
9344 | s%@build_xm_file@%$build_xm_file%g | |
9345 | s%@build_xm_defines@%$build_xm_defines%g | |
9346 | s%@check_languages@%$check_languages%g | |
9347 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
9348 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
9349 | s%@cpp_install_dir@%$cpp_install_dir%g | |
9350 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g | |
9351 | s%@dep_tmake_file@%$dep_tmake_file%g | |
9352 | s%@extra_headers_list@%$extra_headers_list%g | |
9353 | s%@extra_objs@%$extra_objs%g | |
9354 | s%@extra_parts@%$extra_parts%g | |
9355 | s%@extra_passes@%$extra_passes%g | |
9356 | s%@extra_programs@%$extra_programs%g | |
9357 | s%@float_h_file@%$float_h_file%g | |
9358 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
9359 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
9360 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
9361 | s%@gcc_version@%$gcc_version%g | |
9362 | s%@gcc_version_full@%$gcc_version_full%g | |
9363 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
9364 | s%@host_exeext@%$host_exeext%g | |
9365 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
9366 | s%@host_xm_file_list@%$host_xm_file_list%g | |
9367 | s%@host_xm_file@%$host_xm_file%g | |
9368 | s%@host_xm_defines@%$host_xm_defines%g | |
9369 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
9370 | s%@install@%$install%g | |
9371 | s%@lang_options_files@%$lang_options_files%g | |
9372 | s%@lang_specs_files@%$lang_specs_files%g | |
9373 | s%@lang_tree_files@%$lang_tree_files%g | |
9374 | s%@local_prefix@%$local_prefix%g | |
9375 | s%@md_file@%$md_file%g | |
9376 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
9377 | s%@out_file@%$out_file%g | |
9378 | s%@out_object_file@%$out_object_file%g | |
9379 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
9380 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
9381 | s%@symbolic_link@%$symbolic_link%g | |
9382 | s%@thread_file@%$thread_file%g | |
9383 | s%@tm_file_list@%$tm_file_list%g | |
9384 | s%@tm_file@%$tm_file%g | |
9385 | s%@tm_defines@%$tm_defines%g | |
9386 | s%@tm_p_file_list@%$tm_p_file_list%g | |
9387 | s%@tm_p_file@%$tm_p_file%g | |
9388 | s%@xm_file@%$xm_file%g | |
9389 | s%@xm_defines@%$xm_defines%g | |
9390 | s%@c_target_objs@%$c_target_objs%g | |
9391 | s%@cxx_target_objs@%$cxx_target_objs%g | |
9392 | s%@target_cpu_default@%$target_cpu_default%g | |
861bb6c1 | 9393 | /@target_overrides@/r $target_overrides |
093e61a6 | 9394 | s%@target_overrides@%%g |
861bb6c1 | 9395 | /@host_overrides@/r $host_overrides |
093e61a6 | 9396 | s%@host_overrides@%%g |
861bb6c1 | 9397 | /@language_fragments@/r $language_fragments |
093e61a6 | 9398 | s%@language_fragments@%%g |
861bb6c1 | 9399 | /@language_hooks@/r $language_hooks |
093e61a6 RS |
9400 | s%@language_hooks@%%g |
9401 | ||
861bb6c1 | 9402 | CEOF |
093e61a6 | 9403 | EOF |
861bb6c1 | 9404 | |
093e61a6 RS |
9405 | cat >> $CONFIG_STATUS <<\EOF |
9406 | ||
9407 | # Split the substitutions into bite-sized pieces for seds with | |
9408 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9409 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
9410 | ac_file=1 # Number of current file. | |
9411 | ac_beg=1 # First line for current file. | |
9412 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9413 | ac_more_lines=: | |
9414 | ac_sed_cmds="" | |
9415 | while $ac_more_lines; do | |
9416 | if test $ac_beg -gt 1; then | |
9417 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9418 | else | |
9419 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9420 | fi | |
9421 | if test ! -s conftest.s$ac_file; then | |
9422 | ac_more_lines=false | |
9423 | rm -f conftest.s$ac_file | |
9424 | else | |
9425 | if test -z "$ac_sed_cmds"; then | |
9426 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
861bb6c1 | 9427 | else |
093e61a6 | 9428 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
861bb6c1 | 9429 | fi |
093e61a6 RS |
9430 | ac_file=`expr $ac_file + 1` |
9431 | ac_beg=$ac_end | |
9432 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
861bb6c1 | 9433 | fi |
093e61a6 RS |
9434 | done |
9435 | if test -z "$ac_sed_cmds"; then | |
9436 | ac_sed_cmds=cat | |
9437 | fi | |
9438 | EOF | |
861bb6c1 | 9439 | |
093e61a6 RS |
9440 | cat >> $CONFIG_STATUS <<EOF |
9441 | ||
9442 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
9443 | EOF | |
9444 | cat >> $CONFIG_STATUS <<\EOF | |
9445 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9446 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9447 | case "$ac_file" in |
9448 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9449 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9450 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9451 | esac |
9452 | ||
093e61a6 | 9453 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
cafe096b | 9454 | |
093e61a6 RS |
9455 | # Remove last slash and all that follows it. Not all systems have dirname. |
9456 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9457 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9458 | # The file is in a subdirectory. | |
9459 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9460 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9461 | # A "../" for each directory in $ac_dir_suffix. | |
9462 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9463 | else | |
9464 | ac_dir_suffix= ac_dots= | |
9465 | fi | |
cafe096b | 9466 | |
093e61a6 RS |
9467 | case "$ac_given_srcdir" in |
9468 | .) srcdir=. | |
9469 | if test -z "$ac_dots"; then top_srcdir=. | |
9470 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9471 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 9472 | *) # Relative path. |
093e61a6 RS |
9473 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
9474 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9475 | esac | |
861bb6c1 | 9476 | |
cafe096b | 9477 | |
093e61a6 RS |
9478 | echo creating "$ac_file" |
9479 | rm -f "$ac_file" | |
9480 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9481 | case "$ac_file" in | |
9482 | *Makefile*) ac_comsub="1i\\ | |
9483 | # $configure_input" ;; | |
9484 | *) ac_comsub= ;; | |
9485 | esac | |
cafe096b | 9486 | |
093e61a6 RS |
9487 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
9488 | sed -e "$ac_comsub | |
9489 | s%@configure_input@%$configure_input%g | |
9490 | s%@srcdir@%$srcdir%g | |
9491 | s%@top_srcdir@%$top_srcdir%g | |
9492 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9493 | fi; done | |
9494 | rm -f conftest.s* | |
861bb6c1 JL |
9495 | |
9496 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9497 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9498 | # | |
9499 | # ac_d sets the value in "#define NAME VALUE" lines. | |
093e61a6 RS |
9500 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9501 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9502 | ac_dC='\3' | |
9503 | ac_dD='%g' | |
9504 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9505 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9506 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 9507 | ac_uC=' ' |
093e61a6 RS |
9508 | ac_uD='\4%g' |
9509 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9510 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9511 | ac_eB='$%\1#\2define\3' | |
9512 | ac_eC=' ' | |
9513 | ac_eD='%g' | |
9514 | ||
9515 | if test "${CONFIG_HEADERS+set}" != set; then | |
9516 | EOF | |
9517 | cat >> $CONFIG_STATUS <<EOF | |
9518 | CONFIG_HEADERS="auto-host.h:config.in" | |
9519 | EOF | |
9520 | cat >> $CONFIG_STATUS <<\EOF | |
9521 | fi | |
9522 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9523 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9524 | case "$ac_file" in |
9525 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9526 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9527 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9528 | esac |
9529 | ||
093e61a6 RS |
9530 | echo creating $ac_file |
9531 | ||
9532 | rm -f conftest.frag conftest.in conftest.out | |
9533 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9534 | cat $ac_file_inputs > conftest.in | |
9535 | ||
9536 | EOF | |
9537 | ||
9538 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9539 | # the proper values into config.h.in to produce config.h. And first: | |
9540 | # Protect against being on the right side of a sed subst in config.status. | |
9541 | # Protect against being in an unquoted here document in config.status. | |
9542 | rm -f conftest.vals | |
9543 | cat > conftest.hdr <<\EOF | |
9544 | s/[\\&%]/\\&/g | |
9545 | s%[\\$`]%\\&%g | |
9546 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9547 | s%ac_d%ac_u%gp | |
9548 | s%ac_u%ac_e%gp | |
9549 | EOF | |
9550 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9551 | rm -f conftest.hdr | |
861bb6c1 JL |
9552 | |
9553 | # This sed command replaces #undef with comments. This is necessary, for | |
9554 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9555 | # on some systems where configure will not decide to define it. | |
093e61a6 RS |
9556 | cat >> conftest.vals <<\EOF |
9557 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9558 | EOF | |
9559 | ||
9560 | # Break up conftest.vals because some shells have a limit on | |
9561 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
9562 | |
9563 | rm -f conftest.tail | |
093e61a6 | 9564 | while : |
861bb6c1 | 9565 | do |
093e61a6 RS |
9566 | ac_lines=`grep -c . conftest.vals` |
9567 | # grep -c gives empty output for an empty file on some AIX systems. | |
9568 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9569 | # Write a limited-size here document to conftest.frag. | |
9570 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9571 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 9572 | echo 'CEOF |
093e61a6 RS |
9573 | sed -f conftest.frag conftest.in > conftest.out |
9574 | rm -f conftest.in | |
9575 | mv conftest.out conftest.in | |
9576 | ' >> $CONFIG_STATUS | |
9577 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9578 | rm -f conftest.vals | |
9579 | mv conftest.tail conftest.vals | |
861bb6c1 | 9580 | done |
093e61a6 RS |
9581 | rm -f conftest.vals |
9582 | ||
9583 | cat >> $CONFIG_STATUS <<\EOF | |
9584 | rm -f conftest.frag conftest.h | |
9585 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9586 | cat conftest.in >> conftest.h | |
9587 | rm -f conftest.in | |
9588 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9589 | echo "$ac_file is unchanged" | |
9590 | rm -f conftest.h | |
cafe096b | 9591 | else |
093e61a6 RS |
9592 | # Remove last slash and all that follows it. Not all systems have dirname. |
9593 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9594 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9595 | # The file is in a subdirectory. | |
9596 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 9597 | fi |
093e61a6 RS |
9598 | rm -f $ac_file |
9599 | mv conftest.h $ac_file | |
cafe096b | 9600 | fi |
093e61a6 | 9601 | fi; done |
861bb6c1 | 9602 | |
093e61a6 RS |
9603 | EOF |
9604 | cat >> $CONFIG_STATUS <<EOF | |
9605 | ||
9606 | subdirs='$subdirs' | |
9607 | symbolic_link='$symbolic_link' | |
9608 | ||
9609 | EOF | |
9610 | cat >> $CONFIG_STATUS <<\EOF | |
9611 | for ac_file in $CONFIG_FILES; do | |
71a94577 ZW |
9612 | # Support "outfile[:infile[:infile...]]" |
9613 | case "$ac_file" in | |
9614 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9615 | esac | |
9616 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
9617 | case "$ac_file" in */Makefile.in) | |
9618 | # Adjust a relative srcdir. | |
9619 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
9620 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
9621 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
9622 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
9623 | # In autoconf-2.50 it is called $srcdir. | |
9624 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
9625 | case "$ac_given_srcdir" in | |
9626 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
9627 | /*) top_srcdir="$ac_given_srcdir" ;; | |
9628 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9629 | esac | |
9630 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
9631 | rm -f "$ac_dir/POTFILES" | |
9632 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
9633 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
9634 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
9635 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
9636 | fi | |
9637 | ;; | |
9638 | esac | |
093e61a6 RS |
9639 | done |
9640 | ||
861bb6c1 | 9641 | case x$CONFIG_HEADERS in |
b7cb92ad | 9642 | xauto-host.h:config.in) |
861bb6c1 JL |
9643 | echo > cstamp-h ;; |
9644 | esac | |
93cf819d BK |
9645 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
9646 | # bootstrapping and the installation procedure can still use | |
9647 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
9648 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
9649 | # This is virtually a duplicate of what happens in configure.lang; we do | |
9650 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 9651 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 9652 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 9653 | if test $d != ..; then |
1e6347d8 | 9654 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 9655 | cd $d |
6a1b7268 | 9656 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
9657 | do |
9658 | rm -f $t | |
9659 | $symbolic_link ../$t $t 2>/dev/null | |
9660 | done | |
9661 | cd $STARTDIR | |
93cf819d BK |
9662 | fi |
9663 | done | |
9664 | else true ; fi | |
ab87f8c8 JL |
9665 | # Avoid having to add intl to our include paths. |
9666 | if test -f intl/libintl.h; then | |
9667 | echo creating libintl.h | |
9668 | echo '#include "intl/libintl.h"' >libintl.h | |
9669 | fi | |
cafe096b | 9670 | |
093e61a6 RS |
9671 | exit 0 |
9672 | EOF | |
861bb6c1 | 9673 | chmod +x $CONFIG_STATUS |
093e61a6 RS |
9674 | rm -fr confdefs* $ac_clean_files |
9675 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 9676 |