]>
Commit | Line | Data |
---|---|---|
005537df | 1 | #! /bin/sh |
093e61a6 | 2 | |
861bb6c1 | 3 | # Guess values for system-dependent variables and create Makefiles. |
093e61a6 RS |
4 | # Generated automatically using autoconf version 2.13 |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
861bb6c1 JL |
6 | # |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
093e61a6 RS |
10 | # Defaults: |
11 | ac_help= | |
861bb6c1 | 12 | ac_default_prefix=/usr/local |
093e61a6 RS |
13 | # Any additions from configure.in: |
14 | ac_help="$ac_help | |
15 | --with-local-prefix=DIR specifies directory to put local include" | |
16 | ac_help="$ac_help | |
17 | --with-gxx-include-dir=DIR | |
18 | specifies directory to put g++ header files" | |
19 | ac_help="$ac_help | |
20 | --with-cpp-install-dir=DIR | |
21 | install the user visible C preprocessor in DIR | |
22 | (relative to PREFIX) as well as PREFIX/bin" | |
23 | ac_help="$ac_help | |
24 | --with-gnu-ld arrange to work with GNU ld." | |
25 | ac_help="$ac_help | |
26 | --with-ld arrange to use the specified ld (full pathname)" | |
27 | ac_help="$ac_help | |
28 | --with-gnu-as arrange to work with GNU as" | |
29 | ac_help="$ac_help | |
30 | --with-as arrange to use the specified as (full pathname)" | |
31 | ac_help="$ac_help | |
32 | --enable-werror enable -Werror in bootstrap stage2 and later" | |
33 | ac_help="$ac_help | |
34 | --enable-checking[=LIST] | |
35 | enable expensive run-time checks. With LIST, | |
36 | enable only specific categories of checks. | |
37 | Categories are: misc,tree,rtl,rtlflag,gc,gcac; | |
38 | default is misc,tree,gc,rtlflag" | |
39 | ac_help="$ac_help | |
40 | --enable-coverage[=LEVEL] | |
41 | enable compiler\'s code coverage collection. | |
42 | Use to measure compiler performance and locate | |
43 | unused parts of the compiler. With LEVEL, specify | |
44 | optimization. Values are opt, noopt, | |
45 | default is noopt" | |
46 | ac_help="$ac_help | |
47 | --with-stabs arrange to use stabs instead of host debug format" | |
48 | ac_help="$ac_help | |
49 | --with-elf arrange to use ELF instead of host debug format" | |
50 | ac_help="$ac_help | |
51 | --enable-multilib enable library support for multiple ABIs" | |
52 | ac_help="$ac_help | |
53 | --enable-__cxa_atexit enable __cxa_atexit for C++" | |
54 | ac_help="$ac_help | |
55 | --enable-c-mbchar enable multibyte characters for C and C++" | |
56 | ac_help="$ac_help | |
57 | --enable-threads enable thread usage for target GCC | |
58 | --enable-threads=LIB use LIB thread package for target GCC" | |
59 | ac_help="$ac_help | |
60 | --enable-objc-gc enable the use of Boehm's garbage collector with | |
61 | the GNU Objective-C runtime" | |
62 | ac_help="$ac_help | |
63 | --with-dwarf2 force the default debug format to be DWARF 2" | |
64 | ac_help="$ac_help | |
65 | --disable-shared don't provide a shared libgcc" | |
66 | ac_help="$ac_help | |
67 | --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR." | |
68 | ac_help="$ac_help | |
69 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
70 | ac_help="$ac_help | |
71 | --enable-initfini-array use .init_array/.fini_array sections" | |
72 | ac_help="$ac_help | |
73 | --enable-sjlj-exceptions | |
74 | arrange to use setjmp/longjmp exception handling" | |
75 | ac_help="$ac_help | |
76 | --enable-libunwind-exceptions force use libunwind for exceptions" | |
77 | ac_help="$ac_help | |
78 | --enable-nls use Native Language Support (default)" | |
79 | ac_help="$ac_help | |
80 | --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" | |
81 | ac_help="$ac_help | |
82 | --disable-nls do not use Native Language Support" | |
83 | ac_help="$ac_help | |
84 | --with-included-gettext use the GNU gettext library included here" | |
85 | ac_help="$ac_help | |
86 | --disable-win32-registry | |
87 | disable lookup of installation paths in the | |
88 | Registry on Windows hosts | |
89 | --enable-win32-registry enable registry lookup (default) | |
90 | --enable-win32-registry=KEY | |
91 | use KEY instead of GCC version as the last portion | |
92 | of the registry key" | |
93 | ac_help="$ac_help | |
94 | --with-gc={simple,page} choose the garbage collection mechanism to use | |
95 | with the compiler" | |
96 | ac_help="$ac_help | |
97 | --with-system-zlib use installed libz" | |
98 | ac_help="$ac_help | |
99 | --enable-maintainer-mode | |
100 | enable make rules and dependencies not useful | |
101 | (and sometimes confusing) to the casual installer" | |
102 | ac_help="$ac_help | |
103 | --enable-version-specific-runtime-libs | |
104 | specify that runtime libraries should be | |
105 | installed in a compiler-specific directory" | |
106 | ac_help="$ac_help | |
107 | --with-slibdir=DIR shared libraries in DIR [LIBDIR]" | |
861bb6c1 JL |
108 | |
109 | # Initialize some variables set by options. | |
110 | # The variables have the same names as the options, with | |
111 | # dashes changed to underlines. | |
093e61a6 RS |
112 | build=NONE |
113 | cache_file=./config.cache | |
861bb6c1 | 114 | exec_prefix=NONE |
093e61a6 | 115 | host=NONE |
861bb6c1 | 116 | no_create= |
093e61a6 | 117 | nonopt=NONE |
861bb6c1 JL |
118 | no_recursion= |
119 | prefix=NONE | |
120 | program_prefix=NONE | |
121 | program_suffix=NONE | |
122 | program_transform_name=s,x,x, | |
123 | silent= | |
124 | site= | |
125 | srcdir= | |
093e61a6 | 126 | target=NONE |
861bb6c1 JL |
127 | verbose= |
128 | x_includes=NONE | |
129 | x_libraries=NONE | |
130 | bindir='${exec_prefix}/bin' | |
131 | sbindir='${exec_prefix}/sbin' | |
132 | libexecdir='${exec_prefix}/libexec' | |
133 | datadir='${prefix}/share' | |
134 | sysconfdir='${prefix}/etc' | |
135 | sharedstatedir='${prefix}/com' | |
136 | localstatedir='${prefix}/var' | |
137 | libdir='${exec_prefix}/lib' | |
138 | includedir='${prefix}/include' | |
139 | oldincludedir='/usr/include' | |
140 | infodir='${prefix}/info' | |
141 | mandir='${prefix}/man' | |
142 | ||
093e61a6 RS |
143 | # Initialize some other variables. |
144 | subdirs= | |
145 | MFLAGS= MAKEFLAGS= | |
146 | SHELL=${CONFIG_SHELL-/bin/sh} | |
147 | # Maximum number of lines to put in a shell here document. | |
148 | ac_max_here_lines=12 | |
149 | ||
861bb6c1 JL |
150 | ac_prev= |
151 | for ac_option | |
152 | do | |
093e61a6 | 153 | |
861bb6c1 JL |
154 | # If the previous option needs an argument, assign it. |
155 | if test -n "$ac_prev"; then | |
156 | eval "$ac_prev=\$ac_option" | |
157 | ac_prev= | |
158 | continue | |
159 | fi | |
160 | ||
093e61a6 RS |
161 | case "$ac_option" in |
162 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
163 | *) ac_optarg= ;; | |
164 | esac | |
861bb6c1 JL |
165 | |
166 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
167 | ||
093e61a6 | 168 | case "$ac_option" in |
861bb6c1 JL |
169 | |
170 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
171 | ac_prev=bindir ;; | |
172 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
093e61a6 | 173 | bindir="$ac_optarg" ;; |
861bb6c1 JL |
174 | |
175 | -build | --build | --buil | --bui | --bu) | |
093e61a6 | 176 | ac_prev=build ;; |
861bb6c1 | 177 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
093e61a6 | 178 | build="$ac_optarg" ;; |
861bb6c1 JL |
179 | |
180 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
181 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
182 | ac_prev=cache_file ;; | |
183 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
184 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
093e61a6 | 185 | cache_file="$ac_optarg" ;; |
861bb6c1 JL |
186 | |
187 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
188 | ac_prev=datadir ;; | |
189 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
190 | | --da=*) | |
093e61a6 | 191 | datadir="$ac_optarg" ;; |
861bb6c1 JL |
192 | |
193 | -disable-* | --disable-*) | |
093e61a6 | 194 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
861bb6c1 | 195 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
196 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
197 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
198 | fi | |
199 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
200 | eval "enable_${ac_feature}=no" ;; | |
861bb6c1 JL |
201 | |
202 | -enable-* | --enable-*) | |
093e61a6 | 203 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
861bb6c1 | 204 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
205 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
206 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
207 | fi | |
208 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
209 | case "$ac_option" in | |
210 | *=*) ;; | |
861bb6c1 JL |
211 | *) ac_optarg=yes ;; |
212 | esac | |
093e61a6 | 213 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
861bb6c1 JL |
214 | |
215 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
216 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
217 | | --exec | --exe | --ex) | |
218 | ac_prev=exec_prefix ;; | |
219 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
220 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
221 | | --exec=* | --exe=* | --ex=*) | |
093e61a6 | 222 | exec_prefix="$ac_optarg" ;; |
861bb6c1 JL |
223 | |
224 | -gas | --gas | --ga | --g) | |
225 | # Obsolete; use --with-gas. | |
226 | with_gas=yes ;; | |
227 | ||
093e61a6 RS |
228 | -help | --help | --hel | --he) |
229 | # Omit some internal or obsolete options to make the list less imposing. | |
230 | # This message is too long to be a string in the A/UX 3.1 sh. | |
231 | cat << EOF | |
232 | Usage: configure [options] [host] | |
233 | Options: [defaults in brackets after descriptions] | |
234 | Configuration: | |
235 | --cache-file=FILE cache test results in FILE | |
236 | --help print this message | |
237 | --no-create do not create output files | |
238 | --quiet, --silent do not print \`checking...' messages | |
239 | --version print the version of autoconf that created configure | |
240 | Directory and file names: | |
241 | --prefix=PREFIX install architecture-independent files in PREFIX | |
242 | [$ac_default_prefix] | |
243 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
244 | [same as prefix] | |
245 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
246 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
247 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
248 | --datadir=DIR read-only architecture-independent data in DIR | |
249 | [PREFIX/share] | |
250 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
251 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
252 | [PREFIX/com] | |
253 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
254 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
255 | --includedir=DIR C header files in DIR [PREFIX/include] | |
256 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
257 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
258 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
259 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
260 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
261 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
262 | --program-transform-name=PROGRAM | |
263 | run sed PROGRAM on installed program names | |
264 | EOF | |
265 | cat << EOF | |
266 | Host type: | |
267 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
268 | --host=HOST configure for HOST [guessed] | |
269 | --target=TARGET configure for TARGET [TARGET=HOST] | |
270 | Features and packages: | |
271 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
272 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
273 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
274 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
275 | --x-includes=DIR X include files are in DIR | |
276 | --x-libraries=DIR X library files are in DIR | |
277 | EOF | |
278 | if test -n "$ac_help"; then | |
279 | echo "--enable and --with options recognized:$ac_help" | |
280 | fi | |
281 | exit 0 ;; | |
861bb6c1 JL |
282 | |
283 | -host | --host | --hos | --ho) | |
093e61a6 | 284 | ac_prev=host ;; |
861bb6c1 | 285 | -host=* | --host=* | --hos=* | --ho=*) |
093e61a6 | 286 | host="$ac_optarg" ;; |
861bb6c1 JL |
287 | |
288 | -includedir | --includedir | --includedi | --included | --include \ | |
289 | | --includ | --inclu | --incl | --inc) | |
290 | ac_prev=includedir ;; | |
291 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
292 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
093e61a6 | 293 | includedir="$ac_optarg" ;; |
861bb6c1 JL |
294 | |
295 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
296 | ac_prev=infodir ;; | |
297 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
093e61a6 | 298 | infodir="$ac_optarg" ;; |
861bb6c1 JL |
299 | |
300 | -libdir | --libdir | --libdi | --libd) | |
301 | ac_prev=libdir ;; | |
302 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
093e61a6 | 303 | libdir="$ac_optarg" ;; |
861bb6c1 JL |
304 | |
305 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
306 | | --libexe | --libex | --libe) | |
307 | ac_prev=libexecdir ;; | |
308 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
309 | | --libexe=* | --libex=* | --libe=*) | |
093e61a6 | 310 | libexecdir="$ac_optarg" ;; |
861bb6c1 JL |
311 | |
312 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
313 | | --localstate | --localstat | --localsta | --localst \ | |
314 | | --locals | --local | --loca | --loc | --lo) | |
315 | ac_prev=localstatedir ;; | |
316 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
317 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
318 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
093e61a6 | 319 | localstatedir="$ac_optarg" ;; |
861bb6c1 JL |
320 | |
321 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
322 | ac_prev=mandir ;; | |
323 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
093e61a6 | 324 | mandir="$ac_optarg" ;; |
861bb6c1 JL |
325 | |
326 | -nfp | --nfp | --nf) | |
327 | # Obsolete; use --without-fp. | |
328 | with_fp=no ;; | |
329 | ||
330 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
093e61a6 | 331 | | --no-cr | --no-c) |
861bb6c1 JL |
332 | no_create=yes ;; |
333 | ||
334 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
335 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
336 | no_recursion=yes ;; | |
337 | ||
338 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
339 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
340 | | --oldin | --oldi | --old | --ol | --o) | |
341 | ac_prev=oldincludedir ;; | |
342 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
343 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
344 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
093e61a6 | 345 | oldincludedir="$ac_optarg" ;; |
861bb6c1 JL |
346 | |
347 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
348 | ac_prev=prefix ;; | |
349 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
093e61a6 | 350 | prefix="$ac_optarg" ;; |
861bb6c1 JL |
351 | |
352 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
353 | | --program-pre | --program-pr | --program-p) | |
354 | ac_prev=program_prefix ;; | |
355 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
356 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
093e61a6 | 357 | program_prefix="$ac_optarg" ;; |
861bb6c1 JL |
358 | |
359 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
360 | | --program-suf | --program-su | --program-s) | |
361 | ac_prev=program_suffix ;; | |
362 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
363 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
093e61a6 | 364 | program_suffix="$ac_optarg" ;; |
861bb6c1 JL |
365 | |
366 | -program-transform-name | --program-transform-name \ | |
367 | | --program-transform-nam | --program-transform-na \ | |
368 | | --program-transform-n | --program-transform- \ | |
369 | | --program-transform | --program-transfor \ | |
370 | | --program-transfo | --program-transf \ | |
371 | | --program-trans | --program-tran \ | |
372 | | --progr-tra | --program-tr | --program-t) | |
373 | ac_prev=program_transform_name ;; | |
374 | -program-transform-name=* | --program-transform-name=* \ | |
375 | | --program-transform-nam=* | --program-transform-na=* \ | |
376 | | --program-transform-n=* | --program-transform-=* \ | |
377 | | --program-transform=* | --program-transfor=* \ | |
378 | | --program-transfo=* | --program-transf=* \ | |
379 | | --program-trans=* | --program-tran=* \ | |
380 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
093e61a6 | 381 | program_transform_name="$ac_optarg" ;; |
861bb6c1 JL |
382 | |
383 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
384 | | -silent | --silent | --silen | --sile | --sil) | |
385 | silent=yes ;; | |
386 | ||
387 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
388 | ac_prev=sbindir ;; | |
389 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
390 | | --sbi=* | --sb=*) | |
093e61a6 | 391 | sbindir="$ac_optarg" ;; |
861bb6c1 JL |
392 | |
393 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
394 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
395 | | --sharedst | --shareds | --shared | --share | --shar \ | |
396 | | --sha | --sh) | |
397 | ac_prev=sharedstatedir ;; | |
398 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
399 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
400 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
401 | | --sha=* | --sh=*) | |
093e61a6 | 402 | sharedstatedir="$ac_optarg" ;; |
861bb6c1 JL |
403 | |
404 | -site | --site | --sit) | |
405 | ac_prev=site ;; | |
406 | -site=* | --site=* | --sit=*) | |
093e61a6 | 407 | site="$ac_optarg" ;; |
861bb6c1 JL |
408 | |
409 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
410 | ac_prev=srcdir ;; | |
411 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
093e61a6 | 412 | srcdir="$ac_optarg" ;; |
861bb6c1 JL |
413 | |
414 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
415 | | --syscon | --sysco | --sysc | --sys | --sy) | |
416 | ac_prev=sysconfdir ;; | |
417 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
418 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
093e61a6 | 419 | sysconfdir="$ac_optarg" ;; |
861bb6c1 JL |
420 | |
421 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
093e61a6 | 422 | ac_prev=target ;; |
861bb6c1 | 423 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
093e61a6 | 424 | target="$ac_optarg" ;; |
861bb6c1 JL |
425 | |
426 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
427 | verbose=yes ;; | |
428 | ||
093e61a6 RS |
429 | -version | --version | --versio | --versi | --vers) |
430 | echo "configure generated by autoconf version 2.13" | |
431 | exit 0 ;; | |
861bb6c1 JL |
432 | |
433 | -with-* | --with-*) | |
093e61a6 | 434 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
861bb6c1 | 435 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
436 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
437 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
438 | fi | |
861bb6c1 | 439 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
093e61a6 RS |
440 | case "$ac_option" in |
441 | *=*) ;; | |
861bb6c1 JL |
442 | *) ac_optarg=yes ;; |
443 | esac | |
093e61a6 | 444 | eval "with_${ac_package}='$ac_optarg'" ;; |
861bb6c1 JL |
445 | |
446 | -without-* | --without-*) | |
093e61a6 | 447 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
861bb6c1 | 448 | # Reject names that are not valid shell variable names. |
093e61a6 RS |
449 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
450 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
451 | fi | |
452 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
453 | eval "with_${ac_package}=no" ;; | |
861bb6c1 JL |
454 | |
455 | --x) | |
456 | # Obsolete; use --with-x. | |
457 | with_x=yes ;; | |
458 | ||
459 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
460 | | --x-incl | --x-inc | --x-in | --x-i) | |
461 | ac_prev=x_includes ;; | |
462 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
463 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
093e61a6 | 464 | x_includes="$ac_optarg" ;; |
861bb6c1 JL |
465 | |
466 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
467 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
468 | ac_prev=x_libraries ;; | |
469 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
470 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
093e61a6 | 471 | x_libraries="$ac_optarg" ;; |
861bb6c1 | 472 | |
093e61a6 | 473 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
861bb6c1 JL |
474 | ;; |
475 | ||
476 | *) | |
093e61a6 RS |
477 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
478 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
479 | fi | |
480 | if test "x$nonopt" != xNONE; then | |
481 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
482 | fi | |
483 | nonopt="$ac_option" | |
861bb6c1 JL |
484 | ;; |
485 | ||
486 | esac | |
487 | done | |
488 | ||
489 | if test -n "$ac_prev"; then | |
093e61a6 | 490 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
861bb6c1 | 491 | fi |
861bb6c1 | 492 | |
093e61a6 | 493 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
861bb6c1 | 494 | |
093e61a6 RS |
495 | # File descriptor usage: |
496 | # 0 standard input | |
497 | # 1 file creation | |
498 | # 2 errors and warnings | |
499 | # 3 some systems may open it to /dev/tty | |
500 | # 4 used on the Kubota Titan | |
501 | # 6 checking for... messages and results | |
502 | # 5 compiler messages saved in config.log | |
503 | if test "$silent" = yes; then | |
504 | exec 6>/dev/null | |
505 | else | |
506 | exec 6>&1 | |
507 | fi | |
508 | exec 5>./config.log | |
509 | ||
510 | echo "\ | |
511 | This file contains any messages produced by compilers while | |
512 | running configure, to aid debugging if configure makes a mistake. | |
513 | " 1>&5 | |
514 | ||
515 | # Strip out --no-create and --no-recursion so they do not pile up. | |
516 | # Also quote any args containing shell metacharacters. | |
517 | ac_configure_args= | |
518 | for ac_arg | |
861bb6c1 | 519 | do |
093e61a6 RS |
520 | case "$ac_arg" in |
521 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
522 | | --no-cr | --no-c) ;; | |
523 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
524 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
525 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
526 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
527 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
861bb6c1 JL |
528 | esac |
529 | done | |
530 | ||
093e61a6 RS |
531 | # NLS nuisances. |
532 | # Only set these to C if already set. These must not be set unconditionally | |
533 | # because not all systems understand e.g. LANG=C (notably SCO). | |
534 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
535 | # Non-C LC_CTYPE values break the ctype check. | |
536 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
537 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
538 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
539 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
cafe096b | 540 | |
093e61a6 RS |
541 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
542 | rm -rf conftest* confdefs.h | |
543 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
544 | echo > confdefs.h | |
861bb6c1 | 545 | |
093e61a6 RS |
546 | # A filename unique to this package, relative to the directory that |
547 | # configure is in, which we can look for to find out if srcdir is correct. | |
548 | ac_unique_file=tree.c | |
861bb6c1 JL |
549 | |
550 | # Find the source files, if location was not specified. | |
551 | if test -z "$srcdir"; then | |
552 | ac_srcdir_defaulted=yes | |
553 | # Try the directory containing this script, then its parent. | |
093e61a6 RS |
554 | ac_prog=$0 |
555 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
556 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
861bb6c1 JL |
557 | srcdir=$ac_confdir |
558 | if test ! -r $srcdir/$ac_unique_file; then | |
559 | srcdir=.. | |
560 | fi | |
561 | else | |
562 | ac_srcdir_defaulted=no | |
563 | fi | |
564 | if test ! -r $srcdir/$ac_unique_file; then | |
565 | if test "$ac_srcdir_defaulted" = yes; then | |
093e61a6 | 566 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
789b7de5 | 567 | else |
093e61a6 | 568 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
861bb6c1 JL |
569 | fi |
570 | fi | |
093e61a6 | 571 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
861bb6c1 | 572 | |
093e61a6 | 573 | # Prefer explicitly selected file to automatically selected ones. |
96ef4bdc MM |
574 | if test -z "$CONFIG_SITE"; then |
575 | if test "x$prefix" != xNONE; then | |
576 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
577 | else | |
578 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
093e61a6 RS |
579 | fi |
580 | fi | |
581 | for ac_site_file in $CONFIG_SITE; do | |
582 | if test -r "$ac_site_file"; then | |
583 | echo "loading site script $ac_site_file" | |
584 | . "$ac_site_file" | |
585 | fi | |
586 | done | |
587 | ||
588 | if test -r "$cache_file"; then | |
589 | echo "loading cache $cache_file" | |
590 | . $cache_file | |
591 | else | |
592 | echo "creating cache $cache_file" | |
593 | > $cache_file | |
594 | fi | |
861bb6c1 | 595 | |
093e61a6 RS |
596 | ac_ext=c |
597 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
598 | ac_cpp='$CPP $CPPFLAGS' | |
599 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
600 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
601 | cross_compiling=$ac_cv_prog_cc_cross | |
602 | ||
603 | ac_exeext= | |
604 | ac_objext=o | |
605 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
606 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
607 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
608 | ac_n= ac_c=' | |
609 | ' ac_t=' ' | |
610 | else | |
611 | ac_n=-n ac_c= ac_t= | |
612 | fi | |
613 | else | |
614 | ac_n= ac_c='\c' ac_t= | |
615 | fi | |
861bb6c1 JL |
616 | |
617 | ||
618 | ||
619 | ||
093e61a6 RS |
620 | # Determine the host, build, and target systems |
621 | ac_aux_dir= | |
622 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
623 | if test -f $ac_dir/install-sh; then | |
624 | ac_aux_dir=$ac_dir | |
625 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
626 | break | |
627 | elif test -f $ac_dir/install.sh; then | |
628 | ac_aux_dir=$ac_dir | |
629 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
630 | break | |
631 | fi | |
632 | done | |
633 | if test -z "$ac_aux_dir"; then | |
634 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
635 | fi | |
636 | ac_config_guess=$ac_aux_dir/config.guess | |
637 | ac_config_sub=$ac_aux_dir/config.sub | |
638 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
13c22933 JJ |
639 | |
640 | ||
093e61a6 RS |
641 | # Do some error checking and defaulting for the host and target type. |
642 | # The inputs are: | |
643 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
644 | # | |
645 | # The rules are: | |
646 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
647 | # same time. | |
648 | # 2. Host defaults to nonopt. | |
649 | # 3. If nonopt is not specified, then host defaults to the current host, | |
650 | # as determined by config.guess. | |
651 | # 4. Target and build default to nonopt. | |
652 | # 5. If nonopt is not specified, then target and build default to host. | |
13c22933 | 653 | |
093e61a6 RS |
654 | # The aliases save the names the user supplied, while $host etc. |
655 | # will get canonicalized. | |
656 | case $host---$target---$nonopt in | |
657 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
658 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
659 | esac | |
13c22933 JJ |
660 | |
661 | ||
093e61a6 RS |
662 | # Make sure we can run config.sub. |
663 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
664 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
13c22933 JJ |
665 | fi |
666 | ||
093e61a6 | 667 | echo $ac_n "checking host system type""... $ac_c" 1>&6 |
96ef4bdc | 668 | echo "configure:669: checking host system type" >&5 |
13c22933 | 669 | |
093e61a6 RS |
670 | host_alias=$host |
671 | case "$host_alias" in | |
672 | NONE) | |
673 | case $nonopt in | |
674 | NONE) | |
675 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
676 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
677 | fi ;; | |
678 | *) host_alias=$nonopt ;; | |
679 | esac ;; | |
680 | esac | |
13c22933 | 681 | |
093e61a6 RS |
682 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` |
683 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
684 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
685 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
686 | echo "$ac_t""$host" 1>&6 | |
687 | ||
688 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
96ef4bdc | 689 | echo "configure:690: checking target system type" >&5 |
093e61a6 RS |
690 | |
691 | target_alias=$target | |
692 | case "$target_alias" in | |
693 | NONE) | |
694 | case $nonopt in | |
695 | NONE) target_alias=$host_alias ;; | |
696 | *) target_alias=$nonopt ;; | |
697 | esac ;; | |
698 | esac | |
13c22933 | 699 | |
093e61a6 RS |
700 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` |
701 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
702 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
703 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
704 | echo "$ac_t""$target" 1>&6 | |
705 | ||
706 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
96ef4bdc | 707 | echo "configure:708: checking build system type" >&5 |
093e61a6 RS |
708 | |
709 | build_alias=$build | |
710 | case "$build_alias" in | |
711 | NONE) | |
712 | case $nonopt in | |
713 | NONE) build_alias=$host_alias ;; | |
714 | *) build_alias=$nonopt ;; | |
715 | esac ;; | |
716 | esac | |
717 | ||
718 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
719 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
720 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
721 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
722 | echo "$ac_t""$build" 1>&6 | |
13c22933 | 723 | |
093e61a6 RS |
724 | test "$host_alias" != "$target_alias" && |
725 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
726 | NONENONEs,x,x, && | |
727 | program_prefix=${target_alias}- | |
13c22933 | 728 | |
73458fb7 | 729 | |
4665e56c NN |
730 | # Determine the target- and build-specific subdirectories |
731 | case ${build_alias} in | |
732 | "") build_noncanonical=${build} ;; | |
733 | *) build_noncanonical=${build_alias} ;; | |
734 | esac | |
73458fb7 | 735 | |
4665e56c NN |
736 | case ${host_alias} in |
737 | "") host_noncanonical=${build_noncanonical} ;; | |
738 | *) host_noncanonical=${host_alias} ;; | |
739 | esac | |
73458fb7 | 740 | |
4665e56c NN |
741 | case ${target_alias} in |
742 | "") target_noncanonical=${host_noncanonical} ;; | |
743 | *) target_noncanonical=${target_alias} ;; | |
744 | esac | |
093e61a6 | 745 | |
4665e56c NN |
746 | # Prefix 'build-' so this never conflicts with target_subdir. |
747 | build_subdir="build-${build_noncanonical}" | |
748 | # Not really a subdirectory, but here for completeness. | |
749 | host_subdir=. | |
750 | # No prefix. | |
751 | target_subdir=${target_noncanonical} | |
752 | ||
73458fb7 | 753 | |
093e61a6 RS |
754 | # Set program_transform_name |
755 | if test "$program_transform_name" = s,x,x,; then | |
756 | program_transform_name= | |
13c22933 | 757 | else |
093e61a6 RS |
758 | # Double any \ or $. echo might interpret backslashes. |
759 | cat <<\EOF_SED > conftestsed | |
760 | s,\\,\\\\,g; s,\$,$$,g | |
761 | EOF_SED | |
762 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
763 | rm -f conftestsed | |
cafe096b | 764 | fi |
13c22933 | 765 | test "$program_prefix" != NONE && |
093e61a6 | 766 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
13c22933 JJ |
767 | # Use a double $ so make ignores it. |
768 | test "$program_suffix" != NONE && | |
093e61a6 RS |
769 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
770 | ||
771 | # sed with no file args requires a program. | |
772 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
13c22933 JJ |
773 | |
774 | ||
34a86c2b NN |
775 | # Check for bogus environment variables. |
776 | # Test if LIBRARY_PATH contains the notation for the current directory | |
777 | # since this would lead to problems installing/building glibc. | |
778 | # LIBRARY_PATH contains the current directory if one of the following | |
779 | # is true: | |
780 | # - one of the terminals (":" and ";") is the first or last sign | |
781 | # - two terminals occur directly after each other | |
782 | # - the path contains an element with a dot in it | |
093e61a6 | 783 | echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6 |
4665e56c | 784 | echo "configure:785: checking LIBRARY_PATH variable" >&5 |
34a86c2b NN |
785 | case ${LIBRARY_PATH} in |
786 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
787 | library_path_setting="contains current directory" | |
788 | ;; | |
789 | *) | |
790 | library_path_setting="ok" | |
791 | ;; | |
792 | esac | |
093e61a6 | 793 | echo "$ac_t""$library_path_setting" 1>&6 |
34a86c2b | 794 | if test "$library_path_setting" != "ok"; then |
093e61a6 | 795 | { echo "configure: error: |
34a86c2b NN |
796 | *** LIBRARY_PATH shouldn't contain the current directory when |
797 | *** building gcc. Please change the environment variable | |
093e61a6 | 798 | *** and run configure again." 1>&2; exit 1; } |
e9a25f70 JL |
799 | fi |
800 | ||
34a86c2b NN |
801 | # Test if GCC_EXEC_PREFIX contains the notation for the current directory |
802 | # since this would lead to problems installing/building glibc. | |
803 | # GCC_EXEC_PREFIX contains the current directory if one of the following | |
804 | # is true: | |
805 | # - one of the terminals (":" and ";") is the first or last sign | |
806 | # - two terminals occur directly after each other | |
807 | # - the path contains an element with a dot in it | |
093e61a6 | 808 | echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6 |
4665e56c | 809 | echo "configure:810: checking GCC_EXEC_PREFIX variable" >&5 |
34a86c2b NN |
810 | case ${GCC_EXEC_PREFIX} in |
811 | [:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* ) | |
812 | gcc_exec_prefix_setting="contains current directory" | |
813 | ;; | |
814 | *) | |
815 | gcc_exec_prefix_setting="ok" | |
816 | ;; | |
817 | esac | |
093e61a6 | 818 | echo "$ac_t""$gcc_exec_prefix_setting" 1>&6 |
34a86c2b | 819 | if test "$gcc_exec_prefix_setting" != "ok"; then |
093e61a6 | 820 | { echo "configure: error: |
cafe096b EC |
821 | *** GCC_EXEC_PREFIX shouldn't contain the current directory when |
822 | *** building gcc. Please change the environment variable | |
093e61a6 | 823 | *** and run configure again." 1>&2; exit 1; } |
34a86c2b NN |
824 | fi |
825 | ||
826 | # ----------- | |
827 | # Directories | |
828 | # ----------- | |
829 | ||
830 | # Specify the local prefix | |
831 | local_prefix= | |
832 | # Check whether --with-local-prefix or --without-local-prefix was given. | |
833 | if test "${with_local_prefix+set}" = set; then | |
834 | withval="$with_local_prefix" | |
835 | case "${withval}" in | |
093e61a6 | 836 | yes) { echo "configure: error: bad value ${withval} given for local include directory prefix" 1>&2; exit 1; } ;; |
34a86c2b NN |
837 | no) ;; |
838 | *) local_prefix=$with_local_prefix ;; | |
839 | esac | |
093e61a6 RS |
840 | fi |
841 | ||
34a86c2b NN |
842 | |
843 | # Default local prefix if it is empty | |
844 | if test x$local_prefix = x; then | |
845 | local_prefix=/usr/local | |
846 | fi | |
847 | ||
848 | # Don't set gcc_gxx_include_dir to gxx_include_dir since that's only | |
849 | # passed in by the toplevel make and thus we'd get different behavior | |
850 | # depending on where we built the sources. | |
851 | gcc_gxx_include_dir= | |
852 | # Specify the g++ header file directory | |
853 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
854 | if test "${with_gxx_include_dir+set}" = set; then | |
855 | withval="$with_gxx_include_dir" | |
856 | case "${withval}" in | |
093e61a6 | 857 | yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;; |
34a86c2b NN |
858 | no) ;; |
859 | *) gcc_gxx_include_dir=$with_gxx_include_dir ;; | |
860 | esac | |
093e61a6 RS |
861 | fi |
862 | ||
34a86c2b NN |
863 | |
864 | if test x${gcc_gxx_include_dir} = x; then | |
865 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
866 | gcc_gxx_include_dir='${libsubdir}/include/c++' | |
867 | else | |
868 | topsrcdir=${srcdir}/.. . ${srcdir}/../config.if | |
869 | gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir} | |
870 | fi | |
871 | fi | |
872 | ||
873 | # Check whether --with-cpp_install_dir or --without-cpp_install_dir was given. | |
874 | if test "${with_cpp_install_dir+set}" = set; then | |
875 | withval="$with_cpp_install_dir" | |
876 | if test x$withval = xyes; then | |
093e61a6 | 877 | { echo "configure: error: option --with-cpp-install-dir requires an argument" 1>&2; exit 1; } |
34a86c2b NN |
878 | elif test x$withval != xno; then |
879 | cpp_install_dir=$withval | |
880 | fi | |
093e61a6 RS |
881 | fi |
882 | ||
34a86c2b NN |
883 | |
884 | # ------------------- | |
885 | # Find default linker | |
886 | # ------------------- | |
887 | ||
888 | # With GNU ld | |
889 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
890 | if test "${with_gnu_ld+set}" = set; then | |
891 | withval="$with_gnu_ld" | |
892 | gnu_ld_flag="$with_gnu_ld" | |
893 | else | |
894 | gnu_ld_flag=no | |
093e61a6 | 895 | fi |
34a86c2b | 896 | |
cafe096b | 897 | |
093e61a6 | 898 | # With pre-defined ld |
34a86c2b NN |
899 | # Check whether --with-ld or --without-ld was given. |
900 | if test "${with_ld+set}" = set; then | |
901 | withval="$with_ld" | |
902 | DEFAULT_LINKER="$with_ld" | |
093e61a6 RS |
903 | fi |
904 | ||
34a86c2b NN |
905 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
906 | if test ! -x "$DEFAULT_LINKER"; then | |
093e61a6 | 907 | echo "configure: warning: cannot execute: $DEFAULT_LINKER: check --with-ld or env. var. DEFAULT_LINKER" 1>&2 |
34a86c2b NN |
908 | elif $DEFAULT_LINKER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
909 | gnu_ld_flag=yes | |
910 | fi | |
093e61a6 | 911 | cat >> confdefs.h <<EOF |
34a86c2b | 912 | #define DEFAULT_LINKER "$DEFAULT_LINKER" |
093e61a6 | 913 | EOF |
34a86c2b NN |
914 | |
915 | fi | |
916 | ||
093e61a6 | 917 | echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6 |
4665e56c | 918 | echo "configure:919: checking whether a default linker was specified" >&5 |
34a86c2b NN |
919 | if test x"${DEFAULT_LINKER+set}" = x"set"; then |
920 | if test x"$gnu_ld_flag" = x"no"; then | |
093e61a6 | 921 | echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6 |
34a86c2b | 922 | else |
093e61a6 | 923 | echo "$ac_t""yes ($DEFAULT_LINKER - GNU ld)" 1>&6 |
34a86c2b NN |
924 | fi |
925 | else | |
093e61a6 | 926 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
927 | fi |
928 | ||
929 | # ---------------------- | |
930 | # Find default assembler | |
931 | # ---------------------- | |
932 | ||
933 | # With GNU as | |
934 | # Check whether --with-gnu-as or --without-gnu-as was given. | |
935 | if test "${with_gnu_as+set}" = set; then | |
936 | withval="$with_gnu_as" | |
937 | gas_flag="$with_gnu_as" | |
938 | else | |
939 | gas_flag=no | |
093e61a6 | 940 | fi |
34a86c2b NN |
941 | |
942 | ||
943 | # Check whether --with-as or --without-as was given. | |
944 | if test "${with_as+set}" = set; then | |
945 | withval="$with_as" | |
946 | DEFAULT_ASSEMBLER="$with_as" | |
093e61a6 RS |
947 | fi |
948 | ||
34a86c2b NN |
949 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
950 | if test ! -x "$DEFAULT_ASSEMBLER"; then | |
093e61a6 | 951 | echo "configure: warning: cannot execute: $DEFAULT_ASSEMBLER: check --with-as or env. var. DEFAULT_ASSEMBLER" 1>&2 |
34a86c2b NN |
952 | elif $DEFAULT_ASSEMBLER -v < /dev/null 2>&1 | grep GNU > /dev/null; then |
953 | gas_flag=yes | |
954 | fi | |
093e61a6 | 955 | cat >> confdefs.h <<EOF |
34a86c2b | 956 | #define DEFAULT_ASSEMBLER "$DEFAULT_ASSEMBLER" |
093e61a6 | 957 | EOF |
34a86c2b NN |
958 | |
959 | fi | |
960 | ||
093e61a6 | 961 | echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6 |
4665e56c | 962 | echo "configure:963: checking whether a default assembler was specified" >&5 |
34a86c2b NN |
963 | if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then |
964 | if test x"$gas_flag" = x"no"; then | |
093e61a6 | 965 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6 |
34a86c2b | 966 | else |
093e61a6 | 967 | echo "$ac_t""yes ($DEFAULT_ASSEMBLER - GNU as)" 1>&6 |
34a86c2b NN |
968 | fi |
969 | else | |
093e61a6 | 970 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
971 | fi |
972 | ||
973 | # --------------- | |
974 | # Find C compiler | |
975 | # --------------- | |
976 | ||
977 | # Find the native compiler | |
093e61a6 | 978 | # Extract the first word of "gcc", so it can be a program name with args. |
34a86c2b | 979 | set dummy gcc; ac_word=$2 |
093e61a6 | 980 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 981 | echo "configure:982: checking for $ac_word" >&5 |
093e61a6 RS |
982 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
983 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
984 | else |
985 | if test -n "$CC"; then | |
986 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
987 | else | |
093e61a6 RS |
988 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
989 | ac_dummy="$PATH" | |
990 | for ac_dir in $ac_dummy; do | |
991 | test -z "$ac_dir" && ac_dir=. | |
992 | if test -f $ac_dir/$ac_word; then | |
993 | ac_cv_prog_CC="gcc" | |
994 | break | |
995 | fi | |
996 | done | |
997 | IFS="$ac_save_ifs" | |
34a86c2b NN |
998 | fi |
999 | fi | |
093e61a6 | 1000 | CC="$ac_cv_prog_CC" |
34a86c2b | 1001 | if test -n "$CC"; then |
093e61a6 | 1002 | echo "$ac_t""$CC" 1>&6 |
cafe096b | 1003 | else |
093e61a6 | 1004 | echo "$ac_t""no" 1>&6 |
cafe096b | 1005 | fi |
cafe096b | 1006 | |
34a86c2b NN |
1007 | if test -z "$CC"; then |
1008 | # Extract the first word of "cc", so it can be a program name with args. | |
1009 | set dummy cc; ac_word=$2 | |
093e61a6 | 1010 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
4665e56c | 1011 | echo "configure:1012: checking for $ac_word" >&5 |
093e61a6 RS |
1012 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 JL |
1014 | else |
1015 | if test -n "$CC"; then | |
1016 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1017 | else | |
093e61a6 | 1018 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
e9a25f70 | 1019 | ac_prog_rejected=no |
093e61a6 RS |
1020 | ac_dummy="$PATH" |
1021 | for ac_dir in $ac_dummy; do | |
1022 | test -z "$ac_dir" && ac_dir=. | |
1023 | if test -f $ac_dir/$ac_word; then | |
1024 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1025 | ac_prog_rejected=yes | |
1026 | continue | |
1027 | fi | |
1028 | ac_cv_prog_CC="cc" | |
1029 | break | |
1030 | fi | |
1031 | done | |
1032 | IFS="$ac_save_ifs" | |
e9a25f70 JL |
1033 | if test $ac_prog_rejected = yes; then |
1034 | # We found a bogon in the path, so make sure we never use it. | |
1035 | set dummy $ac_cv_prog_CC | |
1036 | shift | |
093e61a6 | 1037 | if test $# -gt 0; then |
e9a25f70 JL |
1038 | # We chose a different compiler from the bogus one. |
1039 | # However, it has the same basename, so the bogon will be chosen | |
1040 | # first if we set CC to just the basename; use the full file name. | |
1041 | shift | |
093e61a6 RS |
1042 | set dummy "$ac_dir/$ac_word" "$@" |
1043 | shift | |
1044 | ac_cv_prog_CC="$@" | |
e9a25f70 JL |
1045 | fi |
1046 | fi | |
1047 | fi | |
1048 | fi | |
093e61a6 | 1049 | CC="$ac_cv_prog_CC" |
e9a25f70 | 1050 | if test -n "$CC"; then |
093e61a6 | 1051 | echo "$ac_t""$CC" 1>&6 |
e9a25f70 | 1052 | else |
093e61a6 | 1053 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
1054 | fi |
1055 | ||
093e61a6 RS |
1056 | if test -z "$CC"; then |
1057 | case "`uname -s`" in | |
1058 | *win32* | *WIN32*) | |
1059 | # Extract the first word of "cl", so it can be a program name with args. | |
1060 | set dummy cl; ac_word=$2 | |
1061 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
4665e56c | 1062 | echo "configure:1063: checking for $ac_word" >&5 |
093e61a6 RS |
1063 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
1064 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cd9e5e7c MK |
1065 | else |
1066 | if test -n "$CC"; then | |
1067 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1068 | else | |
093e61a6 RS |
1069 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1070 | ac_dummy="$PATH" | |
1071 | for ac_dir in $ac_dummy; do | |
1072 | test -z "$ac_dir" && ac_dir=. | |
1073 | if test -f $ac_dir/$ac_word; then | |
1074 | ac_cv_prog_CC="cl" | |
1075 | break | |
1076 | fi | |
1077 | done | |
1078 | IFS="$ac_save_ifs" | |
cd9e5e7c MK |
1079 | fi |
1080 | fi | |
093e61a6 | 1081 | CC="$ac_cv_prog_CC" |
cd9e5e7c | 1082 | if test -n "$CC"; then |
093e61a6 | 1083 | echo "$ac_t""$CC" 1>&6 |
cd9e5e7c | 1084 | else |
093e61a6 | 1085 | echo "$ac_t""no" 1>&6 |
e9a25f70 | 1086 | fi |
093e61a6 RS |
1087 | ;; |
1088 | esac | |
cafe096b | 1089 | fi |
093e61a6 | 1090 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
cafe096b | 1091 | fi |
e9a25f70 | 1092 | |
093e61a6 | 1093 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
4665e56c | 1094 | echo "configure:1095: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
e9a25f70 | 1095 | |
093e61a6 RS |
1096 | ac_ext=c |
1097 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1098 | ac_cpp='$CPP $CPPFLAGS' | |
1099 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1100 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1101 | cross_compiling=$ac_cv_prog_cc_cross | |
b27d2bd5 | 1102 | |
093e61a6 | 1103 | cat > conftest.$ac_ext << EOF |
b27d2bd5 | 1104 | |
4665e56c | 1105 | #line 1106 "configure" |
093e61a6 RS |
1106 | #include "confdefs.h" |
1107 | ||
1108 | main(){return(0);} | |
1109 | EOF | |
4665e56c | 1110 | if { (eval echo configure:1111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
1111 | ac_cv_prog_cc_works=yes |
1112 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1113 | if (./conftest; exit) 2>/dev/null; then | |
1114 | ac_cv_prog_cc_cross=no | |
e9a25f70 | 1115 | else |
093e61a6 | 1116 | ac_cv_prog_cc_cross=yes |
e9a25f70 | 1117 | fi |
e9a25f70 | 1118 | else |
093e61a6 RS |
1119 | echo "configure: failed program was:" >&5 |
1120 | cat conftest.$ac_ext >&5 | |
1121 | ac_cv_prog_cc_works=no | |
e9a25f70 | 1122 | fi |
093e61a6 RS |
1123 | rm -fr conftest* |
1124 | ac_ext=c | |
1125 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1126 | ac_cpp='$CPP $CPPFLAGS' | |
1127 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1128 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1129 | cross_compiling=$ac_cv_prog_cc_cross | |
cafe096b | 1130 | |
093e61a6 RS |
1131 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
1132 | if test $ac_cv_prog_cc_works = no; then | |
1133 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
e9a25f70 | 1134 | fi |
093e61a6 | 1135 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
4665e56c | 1136 | echo "configure:1137: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
093e61a6 RS |
1137 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1138 | cross_compiling=$ac_cv_prog_cc_cross | |
e9a25f70 | 1139 | |
093e61a6 | 1140 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
4665e56c | 1141 | echo "configure:1142: checking whether we are using GNU C" >&5 |
093e61a6 RS |
1142 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
1143 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1144 | else | |
1145 | cat > conftest.c <<EOF | |
1146 | #ifdef __GNUC__ | |
1147 | yes; | |
cafe096b | 1148 | #endif |
093e61a6 | 1149 | EOF |
4665e56c | 1150 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
093e61a6 RS |
1151 | ac_cv_prog_gcc=yes |
1152 | else | |
1153 | ac_cv_prog_gcc=no | |
1154 | fi | |
1155 | fi | |
e9a25f70 | 1156 | |
093e61a6 | 1157 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
cd9e5e7c | 1158 | |
093e61a6 RS |
1159 | if test $ac_cv_prog_gcc = yes; then |
1160 | GCC=yes | |
1161 | else | |
1162 | GCC= | |
1163 | fi | |
cafe096b | 1164 | |
093e61a6 RS |
1165 | ac_test_CFLAGS="${CFLAGS+set}" |
1166 | ac_save_CFLAGS="$CFLAGS" | |
1167 | CFLAGS= | |
1168 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
4665e56c | 1169 | echo "configure:1170: checking whether ${CC-cc} accepts -g" >&5 |
093e61a6 RS |
1170 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
1171 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1172 | else | |
1173 | echo 'void f(){}' > conftest.c | |
1174 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
e9a25f70 JL |
1175 | ac_cv_prog_cc_g=yes |
1176 | else | |
093e61a6 | 1177 | ac_cv_prog_cc_g=no |
e9a25f70 | 1178 | fi |
093e61a6 RS |
1179 | rm -f conftest* |
1180 | ||
cafe096b | 1181 | fi |
093e61a6 RS |
1182 | |
1183 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
cd9e5e7c | 1184 | if test "$ac_test_CFLAGS" = set; then |
093e61a6 | 1185 | CFLAGS="$ac_save_CFLAGS" |
cd9e5e7c MK |
1186 | elif test $ac_cv_prog_cc_g = yes; then |
1187 | if test "$GCC" = yes; then | |
e9a25f70 JL |
1188 | CFLAGS="-g -O2" |
1189 | else | |
cd9e5e7c | 1190 | CFLAGS="-g" |
81814e35 | 1191 | fi |
3723cad9 | 1192 | else |
cd9e5e7c MK |
1193 | if test "$GCC" = yes; then |
1194 | CFLAGS="-O2" | |
1195 | else | |
1196 | CFLAGS= | |
1197 | fi | |
e9a25f70 JL |
1198 | fi |
1199 | ||
3ec83fc2 | 1200 | if test "x$CC" != xcc; then |
093e61a6 | 1201 | echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 |
4665e56c | 1202 | echo "configure:1203: checking whether $CC and cc understand -c and -o together" >&5 |
3ec83fc2 | 1203 | else |
093e61a6 | 1204 | echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 |
4665e56c | 1205 | echo "configure:1206: checking whether cc understands -c and -o together" >&5 |
3ec83fc2 | 1206 | fi |
093e61a6 RS |
1207 | set dummy $CC; ac_cc="`echo $2 | |
1208 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" | |
1209 | if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then | |
1210 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3ec83fc2 | 1211 | else |
093e61a6 | 1212 | echo 'foo(){}' > conftest.c |
3ec83fc2 RH |
1213 | # Make sure it works both with $CC and with simple cc. |
1214 | # We do the test twice because some compilers refuse to overwrite an | |
1215 | # existing .o file with -o, though they will create one. | |
093e61a6 | 1216 | ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' |
4665e56c NN |
1217 | if { (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1218 | test -f conftest.o && { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1219 | then |
1220 | eval ac_cv_prog_cc_${ac_cc}_c_o=yes | |
1221 | if test "x$CC" != xcc; then | |
1222 | # Test first that cc exists at all. | |
4665e56c | 1223 | if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then |
093e61a6 | 1224 | ac_try='cc -c conftest.c -o conftest.o 1>&5' |
4665e56c NN |
1225 | if { (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && |
1226 | test -f conftest.o && { (eval echo configure:1227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; | |
3ec83fc2 RH |
1227 | then |
1228 | # cc works too. | |
1229 | : | |
1230 | else | |
1231 | # cc exists but doesn't like -o. | |
1232 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1233 | fi | |
1234 | fi | |
1235 | fi | |
1236 | else | |
1237 | eval ac_cv_prog_cc_${ac_cc}_c_o=no | |
1238 | fi | |
1239 | rm -f conftest* | |
1240 | ||
1241 | fi | |
1242 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then | |
093e61a6 | 1243 | echo "$ac_t""yes" 1>&6 |
3ec83fc2 | 1244 | else |
093e61a6 RS |
1245 | echo "$ac_t""no" 1>&6 |
1246 | cat >> confdefs.h <<\EOF | |
3ec83fc2 | 1247 | #define NO_MINUS_C_MINUS_O 1 |
093e61a6 | 1248 | EOF |
3ec83fc2 RH |
1249 | |
1250 | fi | |
1251 | ||
414d23ae HPN |
1252 | # autoconf is lame and doesn't give us any substitution variable for this. |
1253 | if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then | |
1254 | NO_MINUS_C_MINUS_O=yes | |
1255 | else | |
1256 | OUTPUT_OPTION='-o $@' | |
1257 | fi | |
1258 | ||
1259 | ||
1260 | ||
73458fb7 NN |
1261 | # ------------------------- |
1262 | # Check C compiler features | |
1263 | # ------------------------- | |
1264 | ||
093e61a6 | 1265 | echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6 |
4665e56c | 1266 | echo "configure:1267: checking whether ${CC-cc} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1267 | if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then |
1268 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
1269 | else |
1270 | save_CFLAGS="$CFLAGS" | |
1271 | CFLAGS="-Wno-long-long" | |
093e61a6 | 1272 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1273 | #line 1274 "configure" |
093e61a6 | 1274 | #include "confdefs.h" |
75e93faa | 1275 | |
093e61a6 | 1276 | int main() { |
75e93faa | 1277 | |
093e61a6 RS |
1278 | ; return 0; } |
1279 | EOF | |
4665e56c | 1280 | if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1281 | rm -rf conftest* |
34a86c2b | 1282 | ac_cv_prog_cc_no_long_long=yes |
200ef634 | 1283 | else |
093e61a6 RS |
1284 | echo "configure: failed program was:" >&5 |
1285 | cat conftest.$ac_ext >&5 | |
1286 | rm -rf conftest* | |
1287 | ac_cv_prog_cc_no_long_long=no | |
200ef634 | 1288 | fi |
093e61a6 | 1289 | rm -f conftest* |
34a86c2b | 1290 | CFLAGS="$save_CFLAGS" |
75e93faa ZW |
1291 | fi |
1292 | ||
093e61a6 RS |
1293 | echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6 |
1294 | ||
1295 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
4665e56c | 1296 | echo "configure:1297: checking how to run the C preprocessor" >&5 |
84c041a1 ZW |
1297 | # On Suns, sometimes $CPP names a directory. |
1298 | if test -n "$CPP" && test -d "$CPP"; then | |
1299 | CPP= | |
1300 | fi | |
1301 | if test -z "$CPP"; then | |
093e61a6 RS |
1302 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
1303 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 1304 | else |
093e61a6 RS |
1305 | # This must be in double quotes, not single quotes, because CPP may get |
1306 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
1307 | CPP="${CC-cc} -E" | |
84c041a1 | 1308 | # On the NeXT, cc -E runs the code through the compiler's parser, |
093e61a6 RS |
1309 | # not just through cpp. |
1310 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1311 | #line 1312 "configure" |
093e61a6 RS |
1312 | #include "confdefs.h" |
1313 | #include <assert.h> | |
1314 | Syntax Error | |
1315 | EOF | |
1316 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1317 | { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1318 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1319 | if test -z "$ac_err"; then | |
84c041a1 ZW |
1320 | : |
1321 | else | |
093e61a6 RS |
1322 | echo "$ac_err" >&5 |
1323 | echo "configure: failed program was:" >&5 | |
1324 | cat conftest.$ac_ext >&5 | |
1325 | rm -rf conftest* | |
1326 | CPP="${CC-cc} -E -traditional-cpp" | |
1327 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1328 | #line 1329 "configure" |
093e61a6 RS |
1329 | #include "confdefs.h" |
1330 | #include <assert.h> | |
1331 | Syntax Error | |
1332 | EOF | |
1333 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1334 | { (eval echo configure:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1335 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1336 | if test -z "$ac_err"; then | |
1337 | : | |
cafe096b | 1338 | else |
093e61a6 RS |
1339 | echo "$ac_err" >&5 |
1340 | echo "configure: failed program was:" >&5 | |
1341 | cat conftest.$ac_ext >&5 | |
1342 | rm -rf conftest* | |
1343 | CPP="${CC-cc} -nologo -E" | |
1344 | cat > conftest.$ac_ext <<EOF | |
4665e56c | 1345 | #line 1346 "configure" |
093e61a6 RS |
1346 | #include "confdefs.h" |
1347 | #include <assert.h> | |
1348 | Syntax Error | |
1349 | EOF | |
1350 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4665e56c | 1351 | { (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1352 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1353 | if test -z "$ac_err"; then | |
1354 | : | |
cafe096b | 1355 | else |
093e61a6 RS |
1356 | echo "$ac_err" >&5 |
1357 | echo "configure: failed program was:" >&5 | |
1358 | cat conftest.$ac_ext >&5 | |
1359 | rm -rf conftest* | |
1360 | CPP=/lib/cpp | |
cafe096b | 1361 | fi |
093e61a6 | 1362 | rm -f conftest* |
cafe096b | 1363 | fi |
093e61a6 | 1364 | rm -f conftest* |
cafe096b | 1365 | fi |
093e61a6 RS |
1366 | rm -f conftest* |
1367 | ac_cv_prog_CPP="$CPP" | |
414d23ae | 1368 | fi |
093e61a6 | 1369 | CPP="$ac_cv_prog_CPP" |
414d23ae | 1370 | else |
093e61a6 | 1371 | ac_cv_prog_CPP="$CPP" |
414d23ae | 1372 | fi |
093e61a6 | 1373 | echo "$ac_t""$CPP" 1>&6 |
414d23ae | 1374 | |
093e61a6 | 1375 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
4665e56c | 1376 | echo "configure:1377: checking for inline" >&5 |
093e61a6 RS |
1377 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
1378 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
1379 | else |
1380 | ac_cv_c_inline=no | |
1381 | for ac_kw in inline __inline__ __inline; do | |
093e61a6 | 1382 | cat > conftest.$ac_ext <<EOF |
4665e56c | 1383 | #line 1384 "configure" |
093e61a6 | 1384 | #include "confdefs.h" |
414d23ae | 1385 | |
093e61a6 RS |
1386 | int main() { |
1387 | } $ac_kw foo() { | |
1388 | ; return 0; } | |
1389 | EOF | |
4665e56c | 1390 | if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1391 | rm -rf conftest* |
414d23ae HPN |
1392 | ac_cv_c_inline=$ac_kw; break |
1393 | else | |
093e61a6 RS |
1394 | echo "configure: failed program was:" >&5 |
1395 | cat conftest.$ac_ext >&5 | |
414d23ae | 1396 | fi |
093e61a6 | 1397 | rm -f conftest* |
414d23ae HPN |
1398 | done |
1399 | ||
1400 | fi | |
093e61a6 RS |
1401 | |
1402 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
1403 | case "$ac_cv_c_inline" in | |
414d23ae | 1404 | inline | yes) ;; |
093e61a6 RS |
1405 | no) cat >> confdefs.h <<\EOF |
1406 | #define inline | |
1407 | EOF | |
414d23ae | 1408 | ;; |
093e61a6 | 1409 | *) cat >> confdefs.h <<EOF |
414d23ae | 1410 | #define inline $ac_cv_c_inline |
093e61a6 | 1411 | EOF |
414d23ae HPN |
1412 | ;; |
1413 | esac | |
1414 | ||
414d23ae | 1415 | |
093e61a6 | 1416 | echo $ac_n "checking for long long int""... $ac_c" 1>&6 |
a54928c9 | 1417 | echo "configure:1418: checking for long long int" >&5 |
093e61a6 RS |
1418 | if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then |
1419 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1420 | else |
093e61a6 | 1421 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1422 | #line 1423 "configure" |
093e61a6 | 1423 | #include "confdefs.h" |
414d23ae | 1424 | |
093e61a6 | 1425 | int main() { |
414d23ae | 1426 | long long int i; |
093e61a6 RS |
1427 | ; return 0; } |
1428 | EOF | |
a54928c9 | 1429 | if { (eval echo configure:1430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1430 | rm -rf conftest* |
414d23ae HPN |
1431 | ac_cv_c_long_long=yes |
1432 | else | |
093e61a6 RS |
1433 | echo "configure: failed program was:" >&5 |
1434 | cat conftest.$ac_ext >&5 | |
1435 | rm -rf conftest* | |
1436 | ac_cv_c_long_long=no | |
414d23ae | 1437 | fi |
093e61a6 | 1438 | rm -f conftest* |
414d23ae | 1439 | fi |
cafe096b | 1440 | |
093e61a6 RS |
1441 | echo "$ac_t""$ac_cv_c_long_long" 1>&6 |
1442 | if test $ac_cv_c_long_long = yes; then | |
1443 | cat >> confdefs.h <<\EOF | |
414d23ae | 1444 | #define HAVE_LONG_LONG 1 |
093e61a6 | 1445 | EOF |
414d23ae HPN |
1446 | |
1447 | fi | |
093e61a6 | 1448 | echo $ac_n "checking for __int64""... $ac_c" 1>&6 |
a54928c9 | 1449 | echo "configure:1450: checking for __int64" >&5 |
093e61a6 RS |
1450 | if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then |
1451 | echo $ac_n "(cached) $ac_c" 1>&6 | |
1452 | else | |
1453 | cat > conftest.$ac_ext <<EOF | |
a54928c9 | 1454 | #line 1455 "configure" |
093e61a6 | 1455 | #include "confdefs.h" |
414d23ae | 1456 | |
093e61a6 | 1457 | int main() { |
414d23ae | 1458 | __int64 i; |
093e61a6 RS |
1459 | ; return 0; } |
1460 | EOF | |
a54928c9 | 1461 | if { (eval echo configure:1462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1462 | rm -rf conftest* |
414d23ae HPN |
1463 | ac_cv_c___int64=yes |
1464 | else | |
093e61a6 RS |
1465 | echo "configure: failed program was:" >&5 |
1466 | cat conftest.$ac_ext >&5 | |
1467 | rm -rf conftest* | |
1468 | ac_cv_c___int64=no | |
414d23ae | 1469 | fi |
093e61a6 | 1470 | rm -f conftest* |
414d23ae | 1471 | fi |
cafe096b | 1472 | |
093e61a6 RS |
1473 | echo "$ac_t""$ac_cv_c___int64" 1>&6 |
1474 | if test $ac_cv_c___int64 = yes; then | |
1475 | cat >> confdefs.h <<\EOF | |
414d23ae | 1476 | #define HAVE___INT64 1 |
093e61a6 | 1477 | EOF |
414d23ae HPN |
1478 | |
1479 | fi | |
1480 | ||
093e61a6 | 1481 | echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6 |
a54928c9 | 1482 | echo "configure:1483: checking for built-in _Bool" >&5 |
093e61a6 RS |
1483 | if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then |
1484 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1485 | else |
093e61a6 | 1486 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1487 | #line 1488 "configure" |
093e61a6 | 1488 | #include "confdefs.h" |
414d23ae | 1489 | |
093e61a6 | 1490 | int main() { |
414d23ae | 1491 | _Bool foo; |
093e61a6 RS |
1492 | ; return 0; } |
1493 | EOF | |
a54928c9 | 1494 | if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1495 | rm -rf conftest* |
414d23ae HPN |
1496 | gcc_cv_c__bool=yes |
1497 | else | |
093e61a6 RS |
1498 | echo "configure: failed program was:" >&5 |
1499 | cat conftest.$ac_ext >&5 | |
1500 | rm -rf conftest* | |
1501 | gcc_cv_c__bool=no | |
414d23ae | 1502 | fi |
093e61a6 | 1503 | rm -f conftest* |
414d23ae | 1504 | |
cafe096b | 1505 | fi |
cafe096b | 1506 | |
093e61a6 RS |
1507 | echo "$ac_t""$gcc_cv_c__bool" 1>&6 |
1508 | if test $gcc_cv_c__bool = yes; then | |
1509 | cat >> confdefs.h <<\EOF | |
414d23ae | 1510 | #define HAVE__BOOL 1 |
093e61a6 | 1511 | EOF |
414d23ae HPN |
1512 | |
1513 | fi | |
1514 | ||
1515 | ||
1516 | # sizeof(char) is 1 by definition. | |
093e61a6 | 1517 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
a54928c9 | 1518 | echo "configure:1519: checking size of short" >&5 |
093e61a6 RS |
1519 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
1520 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae | 1521 | else |
4977bab6 | 1522 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1523 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1524 | #line 1525 "configure" |
093e61a6 | 1525 | #include "confdefs.h" |
414d23ae HPN |
1526 | #include "confdefs.h" |
1527 | #include <sys/types.h> | |
1528 | ||
1529 | ||
093e61a6 | 1530 | int main() { |
414d23ae | 1531 | switch (0) case 0: case (sizeof (short) == $ac_size):; |
093e61a6 RS |
1532 | ; return 0; } |
1533 | EOF | |
a54928c9 | 1534 | if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1535 | rm -rf conftest* |
414d23ae HPN |
1536 | ac_cv_sizeof_short=$ac_size |
1537 | else | |
093e61a6 RS |
1538 | echo "configure: failed program was:" >&5 |
1539 | cat conftest.$ac_ext >&5 | |
84c041a1 | 1540 | fi |
093e61a6 | 1541 | rm -f conftest* |
414d23ae HPN |
1542 | if test x$ac_cv_sizeof_short != x ; then break; fi |
1543 | done | |
1544 | ||
84c041a1 | 1545 | fi |
414d23ae HPN |
1546 | |
1547 | if test x$ac_cv_sizeof_short = x ; then | |
093e61a6 | 1548 | { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } |
84c041a1 | 1549 | fi |
093e61a6 RS |
1550 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
1551 | cat >> confdefs.h <<EOF | |
414d23ae | 1552 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
093e61a6 | 1553 | EOF |
84c041a1 | 1554 | |
414d23ae | 1555 | |
093e61a6 | 1556 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
a54928c9 | 1557 | echo "configure:1558: checking size of int" >&5 |
093e61a6 RS |
1558 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
1559 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1560 | else |
4977bab6 | 1561 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1562 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1563 | #line 1564 "configure" |
093e61a6 | 1564 | #include "confdefs.h" |
414d23ae HPN |
1565 | #include "confdefs.h" |
1566 | #include <sys/types.h> | |
1567 | ||
75e93faa | 1568 | |
093e61a6 | 1569 | int main() { |
414d23ae | 1570 | switch (0) case 0: case (sizeof (int) == $ac_size):; |
093e61a6 RS |
1571 | ; return 0; } |
1572 | EOF | |
a54928c9 | 1573 | if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1574 | rm -rf conftest* |
414d23ae | 1575 | ac_cv_sizeof_int=$ac_size |
75e93faa | 1576 | else |
093e61a6 RS |
1577 | echo "configure: failed program was:" >&5 |
1578 | cat conftest.$ac_ext >&5 | |
75e93faa | 1579 | fi |
093e61a6 | 1580 | rm -f conftest* |
414d23ae | 1581 | if test x$ac_cv_sizeof_int != x ; then break; fi |
75e93faa ZW |
1582 | done |
1583 | ||
1584 | fi | |
1585 | ||
414d23ae | 1586 | if test x$ac_cv_sizeof_int = x ; then |
093e61a6 | 1587 | { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } |
414d23ae | 1588 | fi |
093e61a6 RS |
1589 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
1590 | cat >> confdefs.h <<EOF | |
414d23ae | 1591 | #define SIZEOF_INT $ac_cv_sizeof_int |
093e61a6 | 1592 | EOF |
75e93faa | 1593 | |
414d23ae | 1594 | |
093e61a6 | 1595 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
a54928c9 | 1596 | echo "configure:1597: checking size of long" >&5 |
093e61a6 RS |
1597 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
1598 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1599 | else |
4977bab6 | 1600 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1601 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1602 | #line 1603 "configure" |
093e61a6 | 1603 | #include "confdefs.h" |
75e93faa | 1604 | #include "confdefs.h" |
414d23ae HPN |
1605 | #include <sys/types.h> |
1606 | ||
75e93faa | 1607 | |
093e61a6 | 1608 | int main() { |
414d23ae | 1609 | switch (0) case 0: case (sizeof (long) == $ac_size):; |
093e61a6 RS |
1610 | ; return 0; } |
1611 | EOF | |
a54928c9 | 1612 | if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1613 | rm -rf conftest* |
414d23ae | 1614 | ac_cv_sizeof_long=$ac_size |
75e93faa | 1615 | else |
093e61a6 RS |
1616 | echo "configure: failed program was:" >&5 |
1617 | cat conftest.$ac_ext >&5 | |
75e93faa | 1618 | fi |
093e61a6 | 1619 | rm -f conftest* |
414d23ae HPN |
1620 | if test x$ac_cv_sizeof_long != x ; then break; fi |
1621 | done | |
75e93faa | 1622 | |
414d23ae | 1623 | fi |
75e93faa | 1624 | |
414d23ae | 1625 | if test x$ac_cv_sizeof_long = x ; then |
093e61a6 | 1626 | { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } |
75e93faa | 1627 | fi |
093e61a6 RS |
1628 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
1629 | cat >> confdefs.h <<EOF | |
414d23ae | 1630 | #define SIZEOF_LONG $ac_cv_sizeof_long |
093e61a6 | 1631 | EOF |
75e93faa ZW |
1632 | |
1633 | ||
414d23ae | 1634 | if test $ac_cv_c_long_long = yes; then |
093e61a6 | 1635 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
a54928c9 | 1636 | echo "configure:1637: checking size of long long" >&5 |
093e61a6 RS |
1637 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
1638 | echo $ac_n "(cached) $ac_c" 1>&6 | |
04cabffc | 1639 | else |
4977bab6 | 1640 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1641 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1642 | #line 1643 "configure" |
093e61a6 | 1643 | #include "confdefs.h" |
414d23ae HPN |
1644 | #include "confdefs.h" |
1645 | #include <sys/types.h> | |
1646 | ||
04cabffc | 1647 | |
093e61a6 | 1648 | int main() { |
414d23ae | 1649 | switch (0) case 0: case (sizeof (long long) == $ac_size):; |
093e61a6 RS |
1650 | ; return 0; } |
1651 | EOF | |
a54928c9 | 1652 | if { (eval echo configure:1653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1653 | rm -rf conftest* |
414d23ae | 1654 | ac_cv_sizeof_long_long=$ac_size |
04cabffc | 1655 | else |
093e61a6 RS |
1656 | echo "configure: failed program was:" >&5 |
1657 | cat conftest.$ac_ext >&5 | |
04cabffc | 1658 | fi |
093e61a6 | 1659 | rm -f conftest* |
414d23ae HPN |
1660 | if test x$ac_cv_sizeof_long_long != x ; then break; fi |
1661 | done | |
1662 | ||
04cabffc KG |
1663 | fi |
1664 | ||
414d23ae | 1665 | if test x$ac_cv_sizeof_long_long = x ; then |
093e61a6 | 1666 | { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; } |
414d23ae | 1667 | fi |
093e61a6 RS |
1668 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
1669 | cat >> confdefs.h <<EOF | |
414d23ae | 1670 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
093e61a6 | 1671 | EOF |
04cabffc | 1672 | |
04cabffc | 1673 | |
414d23ae HPN |
1674 | fi |
1675 | if test $ac_cv_c___int64 = yes; then | |
093e61a6 | 1676 | echo $ac_n "checking size of __int64""... $ac_c" 1>&6 |
a54928c9 | 1677 | echo "configure:1678: checking size of __int64" >&5 |
093e61a6 RS |
1678 | if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then |
1679 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa | 1680 | else |
4977bab6 | 1681 | for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. |
093e61a6 | 1682 | cat > conftest.$ac_ext <<EOF |
a54928c9 | 1683 | #line 1684 "configure" |
093e61a6 | 1684 | #include "confdefs.h" |
414d23ae HPN |
1685 | #include "confdefs.h" |
1686 | #include <sys/types.h> | |
1687 | ||
61842080 | 1688 | |
093e61a6 | 1689 | int main() { |
414d23ae | 1690 | switch (0) case 0: case (sizeof (__int64) == $ac_size):; |
093e61a6 RS |
1691 | ; return 0; } |
1692 | EOF | |
a54928c9 | 1693 | if { (eval echo configure:1694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 1694 | rm -rf conftest* |
414d23ae | 1695 | ac_cv_sizeof___int64=$ac_size |
75e93faa | 1696 | else |
093e61a6 RS |
1697 | echo "configure: failed program was:" >&5 |
1698 | cat conftest.$ac_ext >&5 | |
75e93faa | 1699 | fi |
093e61a6 | 1700 | rm -f conftest* |
414d23ae HPN |
1701 | if test x$ac_cv_sizeof___int64 != x ; then break; fi |
1702 | done | |
1703 | ||
75e93faa ZW |
1704 | fi |
1705 | ||
414d23ae | 1706 | if test x$ac_cv_sizeof___int64 = x ; then |
093e61a6 | 1707 | { echo "configure: error: cannot determine a size for __int64" 1>&2; exit 1; } |
414d23ae | 1708 | fi |
093e61a6 RS |
1709 | echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 |
1710 | cat >> confdefs.h <<EOF | |
414d23ae | 1711 | #define SIZEOF___INT64 $ac_cv_sizeof___int64 |
093e61a6 | 1712 | EOF |
414d23ae | 1713 | |
cafe096b | 1714 | |
414d23ae HPN |
1715 | fi |
1716 | ||
34a86c2b NN |
1717 | # ----------------- |
1718 | # Find Ada compiler | |
1719 | # ----------------- | |
1720 | ||
1721 | # See if GNAT has been installed | |
093e61a6 RS |
1722 | if test $host != $build; then |
1723 | ac_tool_prefix=${host_alias}- | |
1724 | else | |
1725 | ac_tool_prefix= | |
1726 | fi | |
34a86c2b NN |
1727 | |
1728 | ||
093e61a6 | 1729 | # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args. |
34a86c2b | 1730 | set dummy ${ac_tool_prefix}gnatbind; ac_word=$2 |
093e61a6 | 1731 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 1732 | echo "configure:1733: checking for $ac_word" >&5 |
093e61a6 RS |
1733 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1734 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1735 | else |
1736 | if test -n "$GNATBIND"; then | |
1737 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
1738 | else | |
093e61a6 RS |
1739 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1740 | ac_dummy="$PATH" | |
1741 | for ac_dir in $ac_dummy; do | |
1742 | test -z "$ac_dir" && ac_dir=. | |
1743 | if test -f $ac_dir/$ac_word; then | |
1744 | ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind" | |
1745 | break | |
1746 | fi | |
1747 | done | |
1748 | IFS="$ac_save_ifs" | |
34a86c2b NN |
1749 | fi |
1750 | fi | |
093e61a6 | 1751 | GNATBIND="$ac_cv_prog_GNATBIND" |
34a86c2b | 1752 | if test -n "$GNATBIND"; then |
093e61a6 | 1753 | echo "$ac_t""$GNATBIND" 1>&6 |
34a86c2b | 1754 | else |
093e61a6 | 1755 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1756 | fi |
1757 | ||
093e61a6 | 1758 | |
34a86c2b | 1759 | if test -z "$ac_cv_prog_GNATBIND"; then |
093e61a6 | 1760 | if test -n "$ac_tool_prefix"; then |
34a86c2b NN |
1761 | # Extract the first word of "gnatbind", so it can be a program name with args. |
1762 | set dummy gnatbind; ac_word=$2 | |
093e61a6 | 1763 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 1764 | echo "configure:1765: checking for $ac_word" >&5 |
093e61a6 RS |
1765 | if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then |
1766 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b | 1767 | else |
093e61a6 RS |
1768 | if test -n "$GNATBIND"; then |
1769 | ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test. | |
34a86c2b | 1770 | else |
093e61a6 RS |
1771 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
1772 | ac_dummy="$PATH" | |
1773 | for ac_dir in $ac_dummy; do | |
1774 | test -z "$ac_dir" && ac_dir=. | |
1775 | if test -f $ac_dir/$ac_word; then | |
1776 | ac_cv_prog_GNATBIND="gnatbind" | |
1777 | break | |
1778 | fi | |
1779 | done | |
1780 | IFS="$ac_save_ifs" | |
1781 | test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no" | |
34a86c2b NN |
1782 | fi |
1783 | fi | |
093e61a6 RS |
1784 | GNATBIND="$ac_cv_prog_GNATBIND" |
1785 | if test -n "$GNATBIND"; then | |
1786 | echo "$ac_t""$GNATBIND" 1>&6 | |
34a86c2b | 1787 | else |
093e61a6 | 1788 | echo "$ac_t""no" 1>&6 |
34a86c2b NN |
1789 | fi |
1790 | ||
1791 | else | |
093e61a6 RS |
1792 | GNATBIND="no" |
1793 | fi | |
34a86c2b NN |
1794 | fi |
1795 | ||
093e61a6 | 1796 | echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6 |
7468e0b5 | 1797 | echo "configure:1798: checking for compiler driver that understands Ada" >&5 |
093e61a6 RS |
1798 | if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then |
1799 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1800 | else |
1801 | cat >conftest.adb <<EOF | |
1802 | procedure conftest is begin null; end conftest; | |
1803 | EOF | |
1804 | gcc_cv_prog_adac=no | |
1805 | # Have to do ac_tool_prefix and user overrides by hand. | |
1806 | for cand in ${ADAC+"$ADAC"} ${CC+"$CC"} \ | |
1807 | ${ac_tool_prefix}gcc gcc \ | |
1808 | ${ac_tool_prefix}cc cc \ | |
1809 | ${ac_tool_prefix}gnatgcc gnatgcc \ | |
1810 | ${ac_tool_prefix}gnatcc gnatcc \ | |
1811 | ${ac_tool_prefix}adagcc adagcc \ | |
1812 | ${ac_tool_prefix}adacc adacc ; do | |
1813 | # There is a bug in all released versions of GCC which causes the | |
1814 | # driver to exit successfully when the appropriate language module | |
1815 | # has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1. | |
1816 | # Therefore we must check for the error message as well as an | |
1817 | # unsuccessful exit. | |
1818 | errors=`($cand -c conftest.adb) 2>&1 || echo failure` | |
1819 | if test x"$errors" = x; then | |
1820 | gcc_cv_prog_adac=$cand | |
1821 | break | |
1822 | fi | |
1823 | done | |
1824 | rm -f conftest.* | |
1825 | fi | |
093e61a6 RS |
1826 | |
1827 | echo "$ac_t""$gcc_cv_prog_adac" 1>&6 | |
34a86c2b NN |
1828 | ADAC=$gcc_cv_prog_adac |
1829 | ||
1830 | ||
1831 | if test x$GNATBIND != xno && test x$ADAC != xno; then | |
1832 | have_gnat=yes | |
1833 | else | |
1834 | have_gnat=no | |
1835 | fi | |
1836 | ||
1837 | ||
093e61a6 RS |
1838 | if test x$have_gnat != xno ; then |
1839 | echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6 | |
7468e0b5 | 1840 | echo "configure:1841: checking whether ${ADAC} accepts -Wno-long-long" >&5 |
093e61a6 RS |
1841 | if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then |
1842 | echo $ac_n "(cached) $ac_c" 1>&6 | |
34a86c2b NN |
1843 | else |
1844 | cat >conftest.adb <<EOF | |
1845 | procedure conftest is begin null; end conftest; | |
1846 | EOF | |
1847 | if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then | |
1848 | ac_cv_prog_adac_no_long_long=yes | |
1849 | else | |
1850 | ac_cv_prog_adac_no_long_long=no | |
1851 | fi | |
1852 | rm -f conftest* | |
1853 | fi | |
093e61a6 RS |
1854 | |
1855 | echo "$ac_t""$ac_cv_prog_adac_no_long_long" 1>&6 | |
34a86c2b NN |
1856 | else |
1857 | ac_cv_prog_adac_no_long_long=yes | |
1858 | fi | |
1859 | ||
1860 | # --------------------- | |
1861 | # Warnings and checking | |
1862 | # --------------------- | |
1863 | ||
1864 | strict1_warn= | |
1865 | if test $ac_cv_prog_cc_no_long_long = yes && \ | |
1866 | test $ac_cv_prog_adac_no_long_long = yes ; then | |
1867 | strict1_warn="-pedantic -Wno-long-long" | |
1868 | fi | |
1869 | ||
1870 | ||
093e61a6 | 1871 | # If the native compiler is GCC, we can enable warnings even in stage1. |
414d23ae HPN |
1872 | # That's useful for people building cross-compilers, or just running a |
1873 | # quick `make'. | |
1874 | warn_cflags= | |
1875 | if test "x$GCC" = "xyes"; then | |
1876 | warn_cflags='$(GCC_WARN_CFLAGS)' | |
1877 | fi | |
1878 | ||
1879 | ||
dd859b8a KG |
1880 | # Enable -Werror in bootstrap stage2 and later. |
1881 | # Change the default to "no" on release branches. | |
1882 | # Check whether --enable-werror or --disable-werror was given. | |
1883 | if test "${enable_werror+set}" = set; then | |
1884 | enableval="$enable_werror" | |
093e61a6 | 1885 | : |
dd859b8a KG |
1886 | else |
1887 | enable_werror=yes | |
093e61a6 RS |
1888 | fi |
1889 | ||
dd859b8a KG |
1890 | if test x$enable_werror = xyes ; then |
1891 | WERROR=-Werror | |
1892 | fi | |
1893 | ||
1894 | ||
414d23ae HPN |
1895 | # Enable expensive internal checks |
1896 | # Check whether --enable-checking or --disable-checking was given. | |
1897 | if test "${enable_checking+set}" = set; then | |
1898 | enableval="$enable_checking" | |
1899 | ac_checking= | |
1900 | ac_tree_checking= | |
1901 | ac_rtl_checking= | |
1902 | ac_rtlflag_checking= | |
1903 | ac_gc_checking= | |
1904 | ac_gc_always_collect= | |
1905 | case "${enableval}" in | |
1906 | yes) ac_checking=1 ; ac_tree_checking=1 ; ac_gc_checking=1 ; | |
1907 | ac_rtlflag_checking=1 ;; | |
1908 | no) ;; | |
1909 | *) IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS," | |
1910 | set fnord $enableval; shift | |
1911 | IFS="$ac_save_IFS" | |
1912 | for check | |
1913 | do | |
1914 | case $check in | |
1915 | misc) ac_checking=1 ;; | |
1916 | tree) ac_tree_checking=1 ;; | |
1917 | rtlflag) ac_rtlflag_checking=1 ;; | |
1918 | rtl) ac_rtl_checking=1 ;; | |
1919 | gc) ac_gc_checking=1 ;; | |
1920 | gcac) ac_gc_always_collect=1 ;; | |
1921 | valgrind) ac_checking_valgrind=1 ;; | |
093e61a6 | 1922 | *) { echo "configure: error: unknown check category $check" 1>&2; exit 1; } ;; |
414d23ae HPN |
1923 | esac |
1924 | done | |
1925 | ;; | |
1926 | esac | |
1927 | ||
75e93faa | 1928 | else |
414d23ae HPN |
1929 | # Enable some checks by default for development versions of GCC |
1930 | ac_checking=1; ac_tree_checking=1; ac_gc_checking=1; ac_rtlflag_checking=1; | |
093e61a6 RS |
1931 | fi |
1932 | ||
414d23ae HPN |
1933 | nocommon_flag="" |
1934 | if test x$ac_checking != x ; then | |
093e61a6 | 1935 | cat >> confdefs.h <<\EOF |
414d23ae | 1936 | #define ENABLE_CHECKING 1 |
093e61a6 | 1937 | EOF |
75e93faa | 1938 | |
414d23ae HPN |
1939 | nocommon_flag=-fno-common |
1940 | fi | |
827ae6cf | 1941 | |
414d23ae | 1942 | if test x$ac_tree_checking != x ; then |
093e61a6 | 1943 | cat >> confdefs.h <<\EOF |
414d23ae | 1944 | #define ENABLE_TREE_CHECKING 1 |
093e61a6 | 1945 | EOF |
827ae6cf RO |
1946 | |
1947 | fi | |
414d23ae | 1948 | if test x$ac_rtl_checking != x ; then |
093e61a6 | 1949 | cat >> confdefs.h <<\EOF |
414d23ae | 1950 | #define ENABLE_RTL_CHECKING 1 |
093e61a6 | 1951 | EOF |
827ae6cf | 1952 | |
414d23ae HPN |
1953 | fi |
1954 | if test x$ac_rtlflag_checking != x ; then | |
093e61a6 | 1955 | cat >> confdefs.h <<\EOF |
414d23ae | 1956 | #define ENABLE_RTL_FLAG_CHECKING 1 |
093e61a6 | 1957 | EOF |
827ae6cf RO |
1958 | |
1959 | fi | |
414d23ae | 1960 | if test x$ac_gc_checking != x ; then |
093e61a6 | 1961 | cat >> confdefs.h <<\EOF |
414d23ae | 1962 | #define ENABLE_GC_CHECKING 1 |
093e61a6 | 1963 | EOF |
827ae6cf | 1964 | |
414d23ae HPN |
1965 | fi |
1966 | if test x$ac_gc_always_collect != x ; then | |
093e61a6 | 1967 | cat >> confdefs.h <<\EOF |
414d23ae | 1968 | #define ENABLE_GC_ALWAYS_COLLECT 1 |
093e61a6 | 1969 | EOF |
75e93faa | 1970 | |
414d23ae HPN |
1971 | fi |
1972 | valgrind_path_defines= | |
1973 | valgrind_command= | |
1974 | if test x$ac_checking_valgrind != x ; then | |
1975 | # It is certainly possible that there's valgrind but no valgrind.h. | |
1976 | # GCC relies on making annotations so we must have both. | |
093e61a6 | 1977 | echo $ac_n "checking for VALGRIND_DISCARD in <memcheck.h>""... $ac_c" 1>&6 |
7468e0b5 | 1978 | echo "configure:1979: checking for VALGRIND_DISCARD in <memcheck.h>" >&5 |
093e61a6 | 1979 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 1980 | #line 1981 "configure" |
093e61a6 | 1981 | #include "confdefs.h" |
14011ca4 AJ |
1982 | #include <memcheck.h> |
1983 | #ifndef VALGRIND_DISCARD | |
1984 | #error VALGRIND_DISCARD not defined | |
1985 | #endif | |
093e61a6 RS |
1986 | EOF |
1987 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 1988 | { (eval echo configure:1989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
1989 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1990 | if test -z "$ac_err"; then | |
1991 | rm -rf conftest* | |
14011ca4 AJ |
1992 | gcc_cv_header_memcheck_h=yes |
1993 | else | |
093e61a6 RS |
1994 | echo "$ac_err" >&5 |
1995 | echo "configure: failed program was:" >&5 | |
1996 | cat conftest.$ac_ext >&5 | |
1997 | rm -rf conftest* | |
cafe096b EC |
1998 | gcc_cv_header_memcheck_h=no |
1999 | fi | |
cafe096b | 2000 | rm -f conftest* |
093e61a6 RS |
2001 | echo "$ac_t""$gcc_cv_header_memcheck_h" 1>&6 |
2002 | ac_safe=`echo "valgrind.h" | sed 'y%./+-%__p_%'` | |
2003 | echo $ac_n "checking for valgrind.h""... $ac_c" 1>&6 | |
7468e0b5 | 2004 | echo "configure:2005: checking for valgrind.h" >&5 |
093e61a6 RS |
2005 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2006 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2007 | else | |
2008 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 2009 | #line 2010 "configure" |
093e61a6 RS |
2010 | #include "confdefs.h" |
2011 | #include <valgrind.h> | |
2012 | EOF | |
2013 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 2014 | { (eval echo configure:2015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2015 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2016 | if test -z "$ac_err"; then | |
2017 | rm -rf conftest* | |
2018 | eval "ac_cv_header_$ac_safe=yes" | |
2019 | else | |
2020 | echo "$ac_err" >&5 | |
2021 | echo "configure: failed program was:" >&5 | |
2022 | cat conftest.$ac_ext >&5 | |
2023 | rm -rf conftest* | |
2024 | eval "ac_cv_header_$ac_safe=no" | |
75e93faa | 2025 | fi |
093e61a6 | 2026 | rm -f conftest* |
414d23ae | 2027 | fi |
093e61a6 RS |
2028 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2029 | echo "$ac_t""yes" 1>&6 | |
414d23ae HPN |
2030 | have_valgrind_h=yes |
2031 | else | |
093e61a6 RS |
2032 | echo "$ac_t""no" 1>&6 |
2033 | have_valgrind_h=no | |
75e93faa ZW |
2034 | fi |
2035 | ||
414d23ae HPN |
2036 | # Extract the first word of "valgrind", so it can be a program name with args. |
2037 | set dummy valgrind; ac_word=$2 | |
093e61a6 | 2038 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2039 | echo "configure:2040: checking for $ac_word" >&5 |
093e61a6 RS |
2040 | if eval "test \"`echo '$''{'ac_cv_path_valgrind_path'+set}'`\" = set"; then |
2041 | echo $ac_n "(cached) $ac_c" 1>&6 | |
414d23ae HPN |
2042 | else |
2043 | case "$valgrind_path" in | |
2044 | /*) | |
2045 | ac_cv_path_valgrind_path="$valgrind_path" # Let the user override the test with a path. | |
2046 | ;; | |
2047 | *) | |
2048 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
2049 | for ac_dir in $PATH; do | |
2050 | test -z "$ac_dir" && ac_dir=. | |
2051 | if test -f $ac_dir/$ac_word; then | |
2052 | if $ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1; then | |
2053 | ac_cv_path_valgrind_path="$ac_dir/$ac_word" | |
2054 | break | |
2055 | fi | |
2056 | fi | |
2057 | done | |
2058 | IFS="$ac_save_ifs" | |
2059 | ;; | |
2060 | esac | |
75e93faa | 2061 | fi |
414d23ae HPN |
2062 | valgrind_path="$ac_cv_path_valgrind_path" |
2063 | if test -n "$valgrind_path"; then | |
093e61a6 | 2064 | echo "$ac_t""$valgrind_path" 1>&6 |
414d23ae | 2065 | else |
093e61a6 | 2066 | echo "$ac_t""no" 1>&6 |
414d23ae HPN |
2067 | fi |
2068 | ||
72bd67f9 | 2069 | if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then |
093e61a6 | 2070 | { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; } |
414d23ae HPN |
2071 | fi |
2072 | valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"' | |
2073 | valgrind_command="$valgrind_path -q" | |
093e61a6 | 2074 | cat >> confdefs.h <<\EOF |
414d23ae | 2075 | #define ENABLE_VALGRIND_CHECKING 1 |
093e61a6 | 2076 | EOF |
75e93faa | 2077 | |
14011ca4 | 2078 | if test $gcc_cv_header_memcheck_h = yes; then |
093e61a6 | 2079 | cat >> confdefs.h <<\EOF |
14011ca4 | 2080 | #define HAVE_MEMCHECK_H 1 |
093e61a6 | 2081 | EOF |
14011ca4 AJ |
2082 | |
2083 | fi | |
414d23ae | 2084 | fi |
75e93faa | 2085 | |
75e93faa ZW |
2086 | |
2087 | ||
414d23ae HPN |
2088 | # Enable code coverage collection |
2089 | # Check whether --enable-coverage or --disable-coverage was given. | |
2090 | if test "${enable_coverage+set}" = set; then | |
2091 | enableval="$enable_coverage" | |
2092 | case "${enableval}" in | |
2093 | yes|noopt) | |
eb70d86d | 2094 | coverage_flags="-fprofile-arcs -ftest-coverage -O0 -DSELF_COVERAGE=1" |
414d23ae HPN |
2095 | ;; |
2096 | opt) | |
eb70d86d | 2097 | coverage_flags="-fprofile-arcs -ftest-coverage -O2 -DSELF_COVERAGE=2" |
414d23ae HPN |
2098 | ;; |
2099 | *) | |
093e61a6 | 2100 | { echo "configure: error: unknown coverage setting $enableval" 1>&2; exit 1; } |
414d23ae HPN |
2101 | ;; |
2102 | esac | |
75e93faa | 2103 | else |
414d23ae | 2104 | coverage_flags="" |
093e61a6 RS |
2105 | fi |
2106 | ||
5c3bc9fb | 2107 | |
414d23ae | 2108 | |
73458fb7 NN |
2109 | # ------------------------------- |
2110 | # Miscenalleous configure options | |
2111 | # ------------------------------- | |
34a86c2b NN |
2112 | |
2113 | # With stabs | |
2114 | # Check whether --with-stabs or --without-stabs was given. | |
2115 | if test "${with_stabs+set}" = set; then | |
2116 | withval="$with_stabs" | |
2117 | stabs="$with_stabs" | |
2118 | else | |
2119 | stabs=no | |
093e61a6 | 2120 | fi |
34a86c2b | 2121 | |
cafe096b | 2122 | |
093e61a6 | 2123 | # With ELF |
34a86c2b NN |
2124 | # Check whether --with-elf or --without-elf was given. |
2125 | if test "${with_elf+set}" = set; then | |
2126 | withval="$with_elf" | |
2127 | elf="$with_elf" | |
2128 | else | |
2129 | elf=no | |
093e61a6 RS |
2130 | fi |
2131 | ||
34a86c2b NN |
2132 | |
2133 | # Determine whether or not multilibs are enabled. | |
2134 | # Check whether --enable-multilib or --disable-multilib was given. | |
2135 | if test "${enable_multilib+set}" = set; then | |
2136 | enableval="$enable_multilib" | |
093e61a6 | 2137 | : |
34a86c2b NN |
2138 | else |
2139 | enable_multilib=yes | |
093e61a6 RS |
2140 | fi |
2141 | ||
75e93faa | 2142 | |
34a86c2b | 2143 | |
414d23ae HPN |
2144 | # Enable __cxa_atexit for C++. |
2145 | # Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given. | |
2146 | if test "${enable___cxa_atexit+set}" = set; then | |
2147 | enableval="$enable___cxa_atexit" | |
093e61a6 RS |
2148 | : |
2149 | fi | |
75e93faa ZW |
2150 | |
2151 | ||
414d23ae HPN |
2152 | # Enable Multibyte Characters for C/C++ |
2153 | # Check whether --enable-c-mbchar or --disable-c-mbchar was given. | |
2154 | if test "${enable_c_mbchar+set}" = set; then | |
2155 | enableval="$enable_c_mbchar" | |
2156 | if test x$enable_c_mbchar != xno; then | |
093e61a6 | 2157 | cat >> confdefs.h <<\EOF |
414d23ae | 2158 | #define MULTIBYTE_CHARS 1 |
093e61a6 | 2159 | EOF |
414d23ae HPN |
2160 | |
2161 | fi | |
093e61a6 | 2162 | fi |
75e93faa | 2163 | |
093e61a6 | 2164 | |
414d23ae HPN |
2165 | # Enable threads |
2166 | # Pass with no value to take the default | |
2167 | # Pass with a value to specify a thread package | |
2168 | # Check whether --enable-threads or --disable-threads was given. | |
2169 | if test "${enable_threads+set}" = set; then | |
2170 | enableval="$enable_threads" | |
093e61a6 | 2171 | : |
414d23ae HPN |
2172 | else |
2173 | enable_threads='' | |
093e61a6 RS |
2174 | fi |
2175 | ||
414d23ae HPN |
2176 | |
2177 | enable_threads_flag=$enable_threads | |
2178 | # Check if a valid thread package | |
2179 | case x${enable_threads_flag} in | |
2180 | x | xno) | |
2181 | # No threads | |
2182 | target_thread_file='single' | |
2183 | ;; | |
2184 | xyes) | |
2185 | # default | |
2186 | target_thread_file='' | |
2187 | ;; | |
2188 | xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \ | |
6d412a7b | 2189 | xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix | xgnat) |
414d23ae HPN |
2190 | target_thread_file=$enable_threads_flag |
2191 | ;; | |
2192 | *) | |
2193 | echo "$enable_threads is an unknown thread package" 1>&2 | |
2194 | exit 1 | |
2195 | ;; | |
2196 | esac | |
2197 | ||
2198 | # Check whether --enable-objc-gc or --disable-objc-gc was given. | |
2199 | if test "${enable_objc_gc+set}" = set; then | |
2200 | enableval="$enable_objc_gc" | |
2201 | if test x$enable_objc_gc = xno; then | |
2202 | objc_boehm_gc='' | |
2203 | else | |
2204 | objc_boehm_gc=1 | |
2205 | fi | |
2206 | else | |
2207 | objc_boehm_gc='' | |
093e61a6 | 2208 | fi |
75e93faa ZW |
2209 | |
2210 | ||
414d23ae HPN |
2211 | # Check whether --with-dwarf2 or --without-dwarf2 was given. |
2212 | if test "${with_dwarf2+set}" = set; then | |
2213 | withval="$with_dwarf2" | |
2214 | dwarf2="$with_dwarf2" | |
75e93faa | 2215 | else |
414d23ae | 2216 | dwarf2=no |
093e61a6 RS |
2217 | fi |
2218 | ||
75e93faa | 2219 | |
414d23ae HPN |
2220 | # Check whether --enable-shared or --disable-shared was given. |
2221 | if test "${enable_shared+set}" = set; then | |
2222 | enableval="$enable_shared" | |
093e61a6 | 2223 | |
414d23ae HPN |
2224 | case $enable_shared in |
2225 | yes | no) ;; | |
2226 | *) | |
2227 | enable_shared=no | |
2228 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
2229 | for pkg in $enableval; do | |
2230 | if test "X$pkg" = "Xgcc" || test "X$pkg" = "Xlibgcc"; then | |
2231 | enable_shared=yes | |
2232 | fi | |
2233 | done | |
2234 | IFS="$ac_save_ifs" | |
2235 | ;; | |
2236 | esac | |
2237 | ||
75e93faa | 2238 | else |
414d23ae | 2239 | enable_shared=yes |
093e61a6 | 2240 | fi |
75e93faa | 2241 | |
75e93faa | 2242 | |
75e93faa | 2243 | |
4977bab6 ZW |
2244 | # Check whether --with-sysroot or --without-sysroot was given. |
2245 | if test "${with_sysroot+set}" = set; then | |
2246 | withval="$with_sysroot" | |
093e61a6 | 2247 | |
4977bab6 | 2248 | case ${with_sysroot} in |
91710e62 | 2249 | yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;; |
4977bab6 ZW |
2250 | *) TARGET_SYSTEM_ROOT=$with_sysroot ;; |
2251 | esac | |
093e61a6 | 2252 | |
4977bab6 ZW |
2253 | TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |
2254 | CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)' | |
2255 | ||
047d636f DJ |
2256 | if test "x$exec_prefix" = xNONE; then |
2257 | if test "x$prefix" = xNONE; then | |
2258 | test_prefix=/usr/local | |
2259 | else | |
2260 | test_prefix=$prefix | |
2261 | fi | |
2262 | else | |
2263 | test_prefix=$exec_prefix | |
2264 | fi | |
2265 | case ${TARGET_SYSTEM_ROOT} in | |
91710e62 AO |
2266 | "${test_prefix}"|"${test_prefix}/"*|\ |
2267 | '${exec_prefix}'|'${exec_prefix}/'*) | |
047d636f DJ |
2268 | t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE" |
2269 | TARGET_SYSTEM_ROOT_DEFINE="$t" | |
2270 | ;; | |
2271 | esac | |
2272 | ||
4977bab6 | 2273 | else |
093e61a6 | 2274 | |
4977bab6 | 2275 | TARGET_SYSTEM_ROOT= |
db720d9a | 2276 | TARGET_SYSTEM_ROOT_DEFINE= |
4977bab6 ZW |
2277 | CROSS_SYSTEM_HEADER_DIR='$(gcc_tooldir)/sys-include' |
2278 | ||
093e61a6 RS |
2279 | fi |
2280 | ||
4977bab6 ZW |
2281 | |
2282 | ||
2283 | ||
2284 | ||
73458fb7 NN |
2285 | # ------------------------- |
2286 | # Checks for other programs | |
2287 | # ------------------------- | |
5b67ad6f | 2288 | |
093e61a6 | 2289 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 |
7468e0b5 | 2290 | echo "configure:2291: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
093e61a6 RS |
2291 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
2292 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then | |
2293 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9a25f70 | 2294 | else |
093e61a6 | 2295 | cat > conftestmake <<\EOF |
e9a25f70 | 2296 | all: |
093e61a6 RS |
2297 | @echo 'ac_maketemp="${MAKE}"' |
2298 | EOF | |
e9a25f70 | 2299 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. |
093e61a6 | 2300 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` |
e9a25f70 JL |
2301 | if test -n "$ac_maketemp"; then |
2302 | eval ac_cv_prog_make_${ac_make}_set=yes | |
2303 | else | |
2304 | eval ac_cv_prog_make_${ac_make}_set=no | |
2305 | fi | |
093e61a6 | 2306 | rm -f conftestmake |
e9a25f70 JL |
2307 | fi |
2308 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
093e61a6 | 2309 | echo "$ac_t""yes" 1>&6 |
e9a25f70 JL |
2310 | SET_MAKE= |
2311 | else | |
093e61a6 | 2312 | echo "$ac_t""no" 1>&6 |
e9a25f70 JL |
2313 | SET_MAKE="MAKE=${MAKE-make}" |
2314 | fi | |
2315 | ||
2316 | ||
861bb6c1 | 2317 | # Find some useful tools |
7468e0b5 | 2318 | for ac_prog in gawk mawk nawk awk |
861bb6c1 | 2319 | do |
093e61a6 | 2320 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
861bb6c1 | 2321 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 2322 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2323 | echo "configure:2324: checking for $ac_word" >&5 |
093e61a6 RS |
2324 | if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then |
2325 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2326 | else |
2327 | if test -n "$AWK"; then | |
2328 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | |
2329 | else | |
093e61a6 RS |
2330 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2331 | ac_dummy="$PATH" | |
2332 | for ac_dir in $ac_dummy; do | |
2333 | test -z "$ac_dir" && ac_dir=. | |
2334 | if test -f $ac_dir/$ac_word; then | |
2335 | ac_cv_prog_AWK="$ac_prog" | |
2336 | break | |
2337 | fi | |
2338 | done | |
2339 | IFS="$ac_save_ifs" | |
861bb6c1 JL |
2340 | fi |
2341 | fi | |
093e61a6 | 2342 | AWK="$ac_cv_prog_AWK" |
861bb6c1 | 2343 | if test -n "$AWK"; then |
093e61a6 | 2344 | echo "$ac_t""$AWK" 1>&6 |
861bb6c1 | 2345 | else |
093e61a6 | 2346 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2347 | fi |
2348 | ||
093e61a6 | 2349 | test -n "$AWK" && break |
861bb6c1 JL |
2350 | done |
2351 | ||
093e61a6 | 2352 | echo $ac_n "checking whether ln works""... $ac_c" 1>&6 |
7468e0b5 | 2353 | echo "configure:2354: checking whether ln works" >&5 |
093e61a6 RS |
2354 | if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then |
2355 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2356 | else |
2357 | rm -f conftestdata_t | |
2358 | echo >conftestdata_f | |
2359 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2360 | then | |
2361 | gcc_cv_prog_LN="ln" | |
2362 | else | |
2363 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2364 | then | |
2365 | gcc_cv_prog_LN="ln -s" | |
2366 | else | |
2367 | gcc_cv_prog_LN=cp | |
2368 | fi | |
2369 | fi | |
2370 | rm -f conftestdata_f conftestdata_t | |
2371 | ||
2372 | fi | |
2373 | LN="$gcc_cv_prog_LN" | |
2374 | if test "$gcc_cv_prog_LN" = "ln"; then | |
093e61a6 | 2375 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2376 | else |
2377 | if test "$gcc_cv_prog_LN" = "ln -s"; then | |
093e61a6 | 2378 | echo "$ac_t""no, using ln -s" 1>&6 |
0a4b6309 | 2379 | else |
093e61a6 | 2380 | echo "$ac_t""no, and neither does ln -s, so using cp" 1>&6 |
0a4b6309 RL |
2381 | fi |
2382 | fi | |
2383 | ||
093e61a6 | 2384 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
7468e0b5 | 2385 | echo "configure:2386: checking whether ln -s works" >&5 |
093e61a6 RS |
2386 | if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then |
2387 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2388 | else |
2389 | rm -f conftestdata_t | |
2390 | echo >conftestdata_f | |
2391 | if ln -s conftestdata_f conftestdata_t 2>/dev/null | |
2392 | then | |
2393 | gcc_cv_prog_LN_S="ln -s" | |
2394 | else | |
2395 | if ln conftestdata_f conftestdata_t 2>/dev/null | |
2396 | then | |
2397 | gcc_cv_prog_LN_S=ln | |
2398 | else | |
2399 | gcc_cv_prog_LN_S=cp | |
2400 | fi | |
2401 | fi | |
2402 | rm -f conftestdata_f conftestdata_t | |
2403 | ||
2404 | fi | |
2405 | LN_S="$gcc_cv_prog_LN_S" | |
2406 | if test "$gcc_cv_prog_LN_S" = "ln -s"; then | |
093e61a6 | 2407 | echo "$ac_t""yes" 1>&6 |
0a4b6309 RL |
2408 | else |
2409 | if test "$gcc_cv_prog_LN_S" = "ln"; then | |
093e61a6 | 2410 | echo "$ac_t""no, using ln" 1>&6 |
0a4b6309 | 2411 | else |
093e61a6 | 2412 | echo "$ac_t""no, and neither does ln, so using cp" 1>&6 |
0a4b6309 RL |
2413 | fi |
2414 | fi | |
2415 | ||
093e61a6 RS |
2416 | # Extract the first word of "ranlib", so it can be a program name with args. |
2417 | set dummy ranlib; ac_word=$2 | |
2418 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
7468e0b5 | 2419 | echo "configure:2420: checking for $ac_word" >&5 |
093e61a6 RS |
2420 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
2421 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 JL |
2422 | else |
2423 | if test -n "$RANLIB"; then | |
2424 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
2425 | else | |
093e61a6 RS |
2426 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2427 | ac_dummy="$PATH" | |
2428 | for ac_dir in $ac_dummy; do | |
2429 | test -z "$ac_dir" && ac_dir=. | |
2430 | if test -f $ac_dir/$ac_word; then | |
2431 | ac_cv_prog_RANLIB="ranlib" | |
2432 | break | |
2433 | fi | |
2434 | done | |
2435 | IFS="$ac_save_ifs" | |
2436 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
861bb6c1 JL |
2437 | fi |
2438 | fi | |
093e61a6 | 2439 | RANLIB="$ac_cv_prog_RANLIB" |
861bb6c1 | 2440 | if test -n "$RANLIB"; then |
093e61a6 | 2441 | echo "$ac_t""$RANLIB" 1>&6 |
cafe096b | 2442 | else |
093e61a6 | 2443 | echo "$ac_t""no" 1>&6 |
861bb6c1 JL |
2444 | fi |
2445 | ||
0a4b6309 RL |
2446 | # Find a good install program. We prefer a C program (faster), |
2447 | # so one script is as good as another. But avoid the broken or | |
2448 | # incompatible versions: | |
2449 | # SysV /etc/install, /usr/sbin/install | |
2450 | # SunOS /usr/etc/install | |
2451 | # IRIX /sbin/install | |
2452 | # AIX /bin/install | |
2453 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
2454 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
2455 | # ./install, which can be erroneously created by make from ./install.sh. | |
093e61a6 | 2456 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
7468e0b5 | 2457 | echo "configure:2458: checking for a BSD compatible install" >&5 |
0a4b6309 | 2458 | if test -z "$INSTALL"; then |
093e61a6 RS |
2459 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
2460 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
2461 | else |
2462 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" | |
2463 | for ac_dir in $PATH; do | |
2464 | # Account for people who put trailing slashes in PATH elements. | |
2465 | case "$ac_dir/" in | |
2466 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
2467 | *) | |
2468 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
2469 | for ac_prog in ginstall scoinst install; do | |
2470 | if test -f $ac_dir/$ac_prog; then | |
2471 | if test $ac_prog = install && | |
2472 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
2473 | # AIX install. It has an incompatible calling convention. | |
2474 | # OSF/1 installbsd also uses dspmsg, but is usable. | |
2475 | : | |
2476 | else | |
2477 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
2478 | break 2 | |
2479 | fi | |
2480 | fi | |
2481 | done | |
2482 | ;; | |
2483 | esac | |
2484 | done | |
2485 | IFS="$ac_save_IFS" | |
2486 | ||
2487 | fi | |
2488 | if test "${ac_cv_path_install+set}" = set; then | |
2489 | INSTALL="$ac_cv_path_install" | |
2490 | else | |
2491 | # As a last resort, use the slow shell script. We don't cache a | |
2492 | # path for INSTALL within a source directory, because that will | |
2493 | # break other packages using the cache if that directory is | |
2494 | # removed, or if the path is relative. | |
2495 | INSTALL="$ac_install_sh" | |
2496 | fi | |
2497 | fi | |
093e61a6 | 2498 | echo "$ac_t""$INSTALL" 1>&6 |
0a4b6309 RL |
2499 | |
2500 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
2501 | # It thinks the first close brace ends the variable substitution. | |
2502 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
2503 | ||
2504 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
2505 | ||
861bb6c1 | 2506 | |
73458fb7 NN |
2507 | # See if we have the mktemp command. |
2508 | # Extract the first word of "mktemp", so it can be a program name with args. | |
2509 | set dummy mktemp; ac_word=$2 | |
093e61a6 | 2510 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2511 | echo "configure:2512: checking for $ac_word" >&5 |
093e61a6 RS |
2512 | if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then |
2513 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2514 | else |
2515 | if test -n "$have_mktemp_command"; then | |
2516 | ac_cv_prog_have_mktemp_command="$have_mktemp_command" # Let the user override the test. | |
2517 | else | |
093e61a6 RS |
2518 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2519 | ac_dummy="$PATH" | |
2520 | for ac_dir in $ac_dummy; do | |
2521 | test -z "$ac_dir" && ac_dir=. | |
2522 | if test -f $ac_dir/$ac_word; then | |
2523 | ac_cv_prog_have_mktemp_command="yes" | |
2524 | break | |
2525 | fi | |
2526 | done | |
2527 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2528 | test -z "$ac_cv_prog_have_mktemp_command" && ac_cv_prog_have_mktemp_command="no" |
2529 | fi | |
2530 | fi | |
093e61a6 | 2531 | have_mktemp_command="$ac_cv_prog_have_mktemp_command" |
73458fb7 | 2532 | if test -n "$have_mktemp_command"; then |
093e61a6 | 2533 | echo "$ac_t""$have_mktemp_command" 1>&6 |
73458fb7 | 2534 | else |
093e61a6 | 2535 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2536 | fi |
2537 | ||
2538 | ||
2539 | # Do we have a single-tree copy of texinfo? | |
2540 | if test -f $srcdir/../texinfo/Makefile.in; then | |
2541 | MAKEINFO='$(objdir)/../texinfo/makeinfo/makeinfo' | |
2542 | gcc_cv_prog_makeinfo_modern=yes | |
093e61a6 | 2543 | echo "$ac_t""Using makeinfo from the unified source tree." 1>&6 |
73458fb7 NN |
2544 | else |
2545 | # See if makeinfo has been installed and is modern enough | |
2546 | # that we can use it. | |
2547 | # Extract the first word of "makeinfo", so it can be a program name with args. | |
2548 | set dummy makeinfo; ac_word=$2 | |
093e61a6 | 2549 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2550 | echo "configure:2551: checking for $ac_word" >&5 |
093e61a6 RS |
2551 | if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then |
2552 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2553 | else |
2554 | if test -n "$MAKEINFO"; then | |
2555 | ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. | |
2556 | else | |
093e61a6 RS |
2557 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2558 | ac_dummy="$PATH" | |
2559 | for ac_dir in $ac_dummy; do | |
2560 | test -z "$ac_dir" && ac_dir=. | |
2561 | if test -f $ac_dir/$ac_word; then | |
2562 | ac_cv_prog_MAKEINFO="makeinfo" | |
2563 | break | |
2564 | fi | |
2565 | done | |
2566 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2567 | fi |
2568 | fi | |
093e61a6 | 2569 | MAKEINFO="$ac_cv_prog_MAKEINFO" |
73458fb7 | 2570 | if test -n "$MAKEINFO"; then |
093e61a6 | 2571 | echo "$ac_t""$MAKEINFO" 1>&6 |
73458fb7 | 2572 | else |
093e61a6 | 2573 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2574 | fi |
2575 | ||
2576 | if test -n "$MAKEINFO"; then | |
2577 | # Found it, now check the version. | |
093e61a6 | 2578 | echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6 |
7468e0b5 | 2579 | echo "configure:2580: checking for modern makeinfo" >&5 |
093e61a6 RS |
2580 | if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then |
2581 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2582 | else |
2583 | ac_prog_version=`$MAKEINFO --version 2>&1 | | |
2584 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` | |
7468e0b5 | 2585 | echo "configure:2586: version of makeinfo is $ac_prog_version" >&5 |
73458fb7 NN |
2586 | case $ac_prog_version in |
2587 | '') gcc_cv_prog_makeinfo_modern=no;; | |
2588 | 4.[2-9]*) | |
2589 | gcc_cv_prog_makeinfo_modern=yes;; | |
2590 | *) gcc_cv_prog_makeinfo_modern=no;; | |
2591 | esac | |
2592 | ||
2593 | fi | |
093e61a6 RS |
2594 | |
2595 | echo "$ac_t""$gcc_cv_prog_makeinfo_modern" 1>&6 | |
73458fb7 NN |
2596 | else |
2597 | gcc_cv_prog_makeinfo_modern=no | |
2598 | fi | |
2599 | ||
2600 | fi | |
2601 | ||
2602 | if test $gcc_cv_prog_makeinfo_modern = no; then | |
093e61a6 | 2603 | echo "configure: warning: |
cafe096b | 2604 | *** Makeinfo is missing or too old. |
093e61a6 | 2605 | *** Info documentation will not be built." 1>&2 |
73458fb7 NN |
2606 | BUILD_INFO= |
2607 | else | |
093e61a6 | 2608 | BUILD_INFO=info |
73458fb7 NN |
2609 | fi |
2610 | ||
2611 | # Is pod2man recent enough to regenerate manpages? | |
093e61a6 | 2612 | echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6 |
7468e0b5 | 2613 | echo "configure:2614: checking for recent Pod::Man" >&5 |
73458fb7 | 2614 | if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then |
093e61a6 RS |
2615 | echo "$ac_t""yes" 1>&6 |
2616 | GENERATED_MANPAGES=generated-manpages | |
73458fb7 | 2617 | else |
093e61a6 | 2618 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2619 | GENERATED_MANPAGES= |
2620 | fi | |
2621 | ||
baade80b PE |
2622 | # 'make compare' can be significantly faster, if cmp itself can |
2623 | # skip bytes instead of using tail. The test being performed is | |
2624 | # "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" | |
2625 | # but we need to sink errors and handle broken shells. | |
093e61a6 | 2626 | echo $ac_n "checking for cmp's capabilities""... $ac_c" 1>&6 |
7468e0b5 | 2627 | echo "configure:2628: checking for cmp's capabilities" >&5 |
baade80b PE |
2628 | echo abfoo >t1 |
2629 | echo cdfoo >t2 | |
2630 | if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then | |
2631 | if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then | |
2632 | make_compare_target=slowcompare | |
2633 | else | |
2634 | make_compare_target=gnucompare | |
2635 | fi | |
c7a5cf61 PE |
2636 | else |
2637 | make_compare_target=slowcompare | |
2638 | fi | |
baade80b | 2639 | rm t1 t2 |
c7a5cf61 | 2640 | |
093e61a6 | 2641 | echo "$ac_t""$make_compare_target" 1>&6 |
c7a5cf61 | 2642 | |
73458fb7 NN |
2643 | # How about lex? |
2644 | if test -f $srcdir/../flex/skel.c; then | |
2645 | FLEX='$(objdir)/../flex/flex' | |
2646 | else | |
2647 | # Extract the first word of "flex", so it can be a program name with args. | |
2648 | set dummy flex; ac_word=$2 | |
093e61a6 | 2649 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2650 | echo "configure:2651: checking for $ac_word" >&5 |
093e61a6 RS |
2651 | if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then |
2652 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2653 | else |
2654 | if test -n "$FLEX"; then | |
2655 | ac_cv_prog_FLEX="$FLEX" # Let the user override the test. | |
2656 | else | |
093e61a6 RS |
2657 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2658 | ac_dummy="$PATH" | |
2659 | for ac_dir in $ac_dummy; do | |
2660 | test -z "$ac_dir" && ac_dir=. | |
2661 | if test -f $ac_dir/$ac_word; then | |
2662 | ac_cv_prog_FLEX="flex" | |
2663 | break | |
2664 | fi | |
2665 | done | |
2666 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2667 | test -z "$ac_cv_prog_FLEX" && ac_cv_prog_FLEX="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing flex" |
2668 | fi | |
2669 | fi | |
093e61a6 | 2670 | FLEX="$ac_cv_prog_FLEX" |
73458fb7 | 2671 | if test -n "$FLEX"; then |
093e61a6 | 2672 | echo "$ac_t""$FLEX" 1>&6 |
73458fb7 | 2673 | else |
093e61a6 | 2674 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2675 | fi |
2676 | ||
2677 | fi | |
2678 | ||
2679 | # Bison? | |
2680 | # The -L switch is so bison can find its skeleton file. | |
2681 | if test -f $srcdir/../bison/bison.simple; then | |
2682 | BISON='$(objdir)/../bison/bison -L $(srcdir)/../bison/' | |
2683 | else | |
2684 | # Extract the first word of "bison", so it can be a program name with args. | |
2685 | set dummy bison; ac_word=$2 | |
093e61a6 | 2686 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 2687 | echo "configure:2688: checking for $ac_word" >&5 |
093e61a6 RS |
2688 | if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then |
2689 | echo $ac_n "(cached) $ac_c" 1>&6 | |
73458fb7 NN |
2690 | else |
2691 | if test -n "$BISON"; then | |
2692 | ac_cv_prog_BISON="$BISON" # Let the user override the test. | |
2693 | else | |
093e61a6 RS |
2694 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
2695 | ac_dummy="$PATH" | |
2696 | for ac_dir in $ac_dummy; do | |
2697 | test -z "$ac_dir" && ac_dir=. | |
2698 | if test -f $ac_dir/$ac_word; then | |
2699 | ac_cv_prog_BISON="bison" | |
2700 | break | |
2701 | fi | |
2702 | done | |
2703 | IFS="$ac_save_ifs" | |
73458fb7 NN |
2704 | test -z "$ac_cv_prog_BISON" && ac_cv_prog_BISON="${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing bison" |
2705 | fi | |
2706 | fi | |
093e61a6 | 2707 | BISON="$ac_cv_prog_BISON" |
73458fb7 | 2708 | if test -n "$BISON"; then |
093e61a6 | 2709 | echo "$ac_t""$BISON" 1>&6 |
73458fb7 | 2710 | else |
093e61a6 | 2711 | echo "$ac_t""no" 1>&6 |
73458fb7 NN |
2712 | fi |
2713 | ||
2714 | fi | |
2715 | ||
2716 | # -------------------- | |
2717 | # Checks for C headers | |
2718 | # -------------------- | |
2719 | ||
093e61a6 | 2720 | echo $ac_n "checking for GNU C library""... $ac_c" 1>&6 |
7468e0b5 | 2721 | echo "configure:2722: checking for GNU C library" >&5 |
093e61a6 RS |
2722 | if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then |
2723 | echo $ac_n "(cached) $ac_c" 1>&6 | |
2724 | else | |
2725 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 2726 | #line 2727 "configure" |
093e61a6 | 2727 | #include "confdefs.h" |
73458fb7 | 2728 | #include <features.h> |
093e61a6 | 2729 | int main() { |
73458fb7 NN |
2730 | |
2731 | #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__) | |
2732 | #error Not a GNU C library system | |
2733 | #endif | |
093e61a6 RS |
2734 | ; return 0; } |
2735 | EOF | |
7468e0b5 | 2736 | if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2737 | rm -rf conftest* |
73458fb7 NN |
2738 | gcc_cv_glibc=yes |
2739 | else | |
093e61a6 RS |
2740 | echo "configure: failed program was:" >&5 |
2741 | cat conftest.$ac_ext >&5 | |
2742 | rm -rf conftest* | |
2743 | gcc_cv_glibc=no | |
73458fb7 | 2744 | fi |
093e61a6 | 2745 | rm -f conftest* |
73458fb7 NN |
2746 | fi |
2747 | ||
093e61a6 | 2748 | echo "$ac_t""$gcc_cv_glibc" 1>&6 |
73458fb7 | 2749 | if test $gcc_cv_glibc = yes; then |
093e61a6 | 2750 | cat >> confdefs.h <<\EOF |
73458fb7 | 2751 | #define _GNU_SOURCE 1 |
093e61a6 | 2752 | EOF |
73458fb7 NN |
2753 | |
2754 | fi | |
2755 | ||
093e61a6 | 2756 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
7468e0b5 | 2757 | echo "configure:2758: checking for ANSI C header files" >&5 |
093e61a6 RS |
2758 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2759 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2760 | else |
093e61a6 | 2761 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2762 | #line 2763 "configure" |
093e61a6 | 2763 | #include "confdefs.h" |
956d6950 JL |
2764 | #include <stdlib.h> |
2765 | #include <stdarg.h> | |
2766 | #include <string.h> | |
2767 | #include <float.h> | |
093e61a6 RS |
2768 | EOF |
2769 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 2770 | { (eval echo configure:2771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
2771 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2772 | if test -z "$ac_err"; then | |
2773 | rm -rf conftest* | |
956d6950 JL |
2774 | ac_cv_header_stdc=yes |
2775 | else | |
093e61a6 RS |
2776 | echo "$ac_err" >&5 |
2777 | echo "configure: failed program was:" >&5 | |
2778 | cat conftest.$ac_ext >&5 | |
2779 | rm -rf conftest* | |
2780 | ac_cv_header_stdc=no | |
956d6950 | 2781 | fi |
093e61a6 | 2782 | rm -f conftest* |
956d6950 JL |
2783 | |
2784 | if test $ac_cv_header_stdc = yes; then | |
2785 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
093e61a6 | 2786 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2787 | #line 2788 "configure" |
093e61a6 | 2788 | #include "confdefs.h" |
956d6950 | 2789 | #include <string.h> |
093e61a6 | 2790 | EOF |
956d6950 | 2791 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2792 | egrep "memchr" >/dev/null 2>&1; then |
956d6950 JL |
2793 | : |
2794 | else | |
093e61a6 | 2795 | rm -rf conftest* |
956d6950 JL |
2796 | ac_cv_header_stdc=no |
2797 | fi | |
2798 | rm -f conftest* | |
2799 | ||
2800 | fi | |
2801 | ||
2802 | if test $ac_cv_header_stdc = yes; then | |
2803 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
093e61a6 | 2804 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2805 | #line 2806 "configure" |
093e61a6 | 2806 | #include "confdefs.h" |
956d6950 | 2807 | #include <stdlib.h> |
093e61a6 | 2808 | EOF |
956d6950 | 2809 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 | 2810 | egrep "free" >/dev/null 2>&1; then |
956d6950 JL |
2811 | : |
2812 | else | |
093e61a6 | 2813 | rm -rf conftest* |
956d6950 JL |
2814 | ac_cv_header_stdc=no |
2815 | fi | |
2816 | rm -f conftest* | |
2817 | ||
2818 | fi | |
2819 | ||
2820 | if test $ac_cv_header_stdc = yes; then | |
2821 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
093e61a6 | 2822 | if test "$cross_compiling" = yes; then |
956d6950 JL |
2823 | : |
2824 | else | |
093e61a6 | 2825 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2826 | #line 2827 "configure" |
093e61a6 | 2827 | #include "confdefs.h" |
956d6950 | 2828 | #include <ctype.h> |
093e61a6 RS |
2829 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2830 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
cafe096b | 2831 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
093e61a6 RS |
2832 | int main () { int i; for (i = 0; i < 256; i++) |
2833 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
2834 | exit (0); } | |
2835 | ||
2836 | EOF | |
7468e0b5 | 2837 | if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 2838 | then |
956d6950 JL |
2839 | : |
2840 | else | |
093e61a6 RS |
2841 | echo "configure: failed program was:" >&5 |
2842 | cat conftest.$ac_ext >&5 | |
2843 | rm -fr conftest* | |
2844 | ac_cv_header_stdc=no | |
956d6950 | 2845 | fi |
093e61a6 | 2846 | rm -fr conftest* |
956d6950 | 2847 | fi |
093e61a6 | 2848 | |
956d6950 JL |
2849 | fi |
2850 | fi | |
cafe096b | 2851 | |
093e61a6 RS |
2852 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
2853 | if test $ac_cv_header_stdc = yes; then | |
2854 | cat >> confdefs.h <<\EOF | |
956d6950 | 2855 | #define STDC_HEADERS 1 |
093e61a6 | 2856 | EOF |
956d6950 JL |
2857 | |
2858 | fi | |
2859 | ||
093e61a6 | 2860 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
7468e0b5 | 2861 | echo "configure:2862: checking whether time.h and sys/time.h may both be included" >&5 |
093e61a6 RS |
2862 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
2863 | echo $ac_n "(cached) $ac_c" 1>&6 | |
956d6950 | 2864 | else |
093e61a6 | 2865 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2866 | #line 2867 "configure" |
093e61a6 | 2867 | #include "confdefs.h" |
956d6950 JL |
2868 | #include <sys/types.h> |
2869 | #include <sys/time.h> | |
2870 | #include <time.h> | |
093e61a6 RS |
2871 | int main() { |
2872 | struct tm *tp; | |
2873 | ; return 0; } | |
2874 | EOF | |
7468e0b5 | 2875 | if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2876 | rm -rf conftest* |
956d6950 JL |
2877 | ac_cv_header_time=yes |
2878 | else | |
093e61a6 RS |
2879 | echo "configure: failed program was:" >&5 |
2880 | cat conftest.$ac_ext >&5 | |
2881 | rm -rf conftest* | |
2882 | ac_cv_header_time=no | |
956d6950 | 2883 | fi |
093e61a6 | 2884 | rm -f conftest* |
956d6950 | 2885 | fi |
cafe096b | 2886 | |
093e61a6 RS |
2887 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
2888 | if test $ac_cv_header_time = yes; then | |
2889 | cat >> confdefs.h <<\EOF | |
956d6950 | 2890 | #define TIME_WITH_SYS_TIME 1 |
093e61a6 | 2891 | EOF |
956d6950 JL |
2892 | |
2893 | fi | |
2894 | ||
093e61a6 | 2895 | echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6 |
7468e0b5 | 2896 | echo "configure:2897: checking for working stdbool.h" >&5 |
093e61a6 RS |
2897 | if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then |
2898 | echo $ac_n "(cached) $ac_c" 1>&6 | |
827ae6cf | 2899 | else |
093e61a6 | 2900 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2901 | #line 2902 "configure" |
093e61a6 | 2902 | #include "confdefs.h" |
827ae6cf | 2903 | #include <stdbool.h> |
093e61a6 | 2904 | int main() { |
827ae6cf | 2905 | bool foo = false; |
093e61a6 RS |
2906 | ; return 0; } |
2907 | EOF | |
7468e0b5 | 2908 | if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2909 | rm -rf conftest* |
827ae6cf RO |
2910 | ac_cv_header_stdbool_h=yes |
2911 | else | |
093e61a6 RS |
2912 | echo "configure: failed program was:" >&5 |
2913 | cat conftest.$ac_ext >&5 | |
2914 | rm -rf conftest* | |
2915 | ac_cv_header_stdbool_h=no | |
827ae6cf | 2916 | fi |
093e61a6 | 2917 | rm -f conftest* |
827ae6cf | 2918 | fi |
cafe096b | 2919 | |
093e61a6 RS |
2920 | echo "$ac_t""$ac_cv_header_stdbool_h" 1>&6 |
2921 | if test $ac_cv_header_stdbool_h = yes; then | |
2922 | cat >> confdefs.h <<\EOF | |
827ae6cf | 2923 | #define HAVE_STDBOOL_H 1 |
093e61a6 | 2924 | EOF |
827ae6cf RO |
2925 | |
2926 | fi | |
2927 | ||
093e61a6 | 2928 | echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6 |
7468e0b5 | 2929 | echo "configure:2930: checking whether string.h and strings.h may both be included" >&5 |
093e61a6 RS |
2930 | if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then |
2931 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 | 2932 | else |
093e61a6 | 2933 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2934 | #line 2935 "configure" |
093e61a6 | 2935 | #include "confdefs.h" |
0a4b6309 RL |
2936 | #include <string.h> |
2937 | #include <strings.h> | |
093e61a6 | 2938 | int main() { |
0a4b6309 | 2939 | |
093e61a6 RS |
2940 | ; return 0; } |
2941 | EOF | |
7468e0b5 | 2942 | if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2943 | rm -rf conftest* |
0a4b6309 RL |
2944 | gcc_cv_header_string=yes |
2945 | else | |
093e61a6 RS |
2946 | echo "configure: failed program was:" >&5 |
2947 | cat conftest.$ac_ext >&5 | |
2948 | rm -rf conftest* | |
2949 | gcc_cv_header_string=no | |
0a4b6309 | 2950 | fi |
093e61a6 | 2951 | rm -f conftest* |
0a4b6309 | 2952 | fi |
cafe096b | 2953 | |
093e61a6 RS |
2954 | echo "$ac_t""$gcc_cv_header_string" 1>&6 |
2955 | if test $gcc_cv_header_string = yes; then | |
2956 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 2957 | #define STRING_WITH_STRINGS 1 |
093e61a6 | 2958 | EOF |
0a4b6309 RL |
2959 | |
2960 | fi | |
2961 | ||
093e61a6 | 2962 | echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
7468e0b5 | 2963 | echo "configure:2964: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
093e61a6 RS |
2964 | if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
2965 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e9831ca0 | 2966 | else |
093e61a6 | 2967 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 2968 | #line 2969 "configure" |
093e61a6 | 2969 | #include "confdefs.h" |
e9831ca0 KG |
2970 | #include <sys/types.h> |
2971 | #include <sys/wait.h> | |
2972 | #ifndef WEXITSTATUS | |
093e61a6 | 2973 | #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
e9831ca0 KG |
2974 | #endif |
2975 | #ifndef WIFEXITED | |
093e61a6 | 2976 | #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
e9831ca0 | 2977 | #endif |
093e61a6 RS |
2978 | int main() { |
2979 | int s; | |
2980 | wait (&s); | |
2981 | s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; | |
2982 | ; return 0; } | |
2983 | EOF | |
7468e0b5 | 2984 | if { (eval echo configure:2985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 2985 | rm -rf conftest* |
e9831ca0 KG |
2986 | ac_cv_header_sys_wait_h=yes |
2987 | else | |
093e61a6 RS |
2988 | echo "configure: failed program was:" >&5 |
2989 | cat conftest.$ac_ext >&5 | |
2990 | rm -rf conftest* | |
2991 | ac_cv_header_sys_wait_h=no | |
e9831ca0 | 2992 | fi |
093e61a6 | 2993 | rm -f conftest* |
e9831ca0 | 2994 | fi |
cafe096b | 2995 | |
093e61a6 RS |
2996 | echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 |
2997 | if test $ac_cv_header_sys_wait_h = yes; then | |
2998 | cat >> confdefs.h <<\EOF | |
e9831ca0 | 2999 | #define HAVE_SYS_WAIT_H 1 |
093e61a6 | 3000 | EOF |
e9831ca0 KG |
3001 | |
3002 | fi | |
3003 | ||
093e61a6 | 3004 | for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \ |
1072ec3f | 3005 | fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \ |
03c41c05 | 3006 | sys/resource.h sys/param.h sys/times.h sys/stat.h \ |
2bd02043 | 3007 | direct.h malloc.h langinfo.h ldfcn.h wchar.h |
861bb6c1 | 3008 | do |
093e61a6 RS |
3009 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
3010 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7468e0b5 | 3011 | echo "configure:3012: checking for $ac_hdr" >&5 |
093e61a6 RS |
3012 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3013 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3014 | else | |
3015 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3016 | #line 3017 "configure" |
093e61a6 RS |
3017 | #include "confdefs.h" |
3018 | #include <$ac_hdr> | |
3019 | EOF | |
3020 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 3021 | { (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3022 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3023 | if test -z "$ac_err"; then | |
3024 | rm -rf conftest* | |
3025 | eval "ac_cv_header_$ac_safe=yes" | |
3026 | else | |
3027 | echo "$ac_err" >&5 | |
3028 | echo "configure: failed program was:" >&5 | |
3029 | cat conftest.$ac_ext >&5 | |
3030 | rm -rf conftest* | |
3031 | eval "ac_cv_header_$ac_safe=no" | |
956d6950 | 3032 | fi |
093e61a6 | 3033 | rm -f conftest* |
956d6950 | 3034 | fi |
093e61a6 RS |
3035 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3036 | echo "$ac_t""yes" 1>&6 | |
3037 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3038 | cat >> confdefs.h <<EOF | |
3039 | #define $ac_tr_hdr 1 | |
3040 | EOF | |
3041 | ||
3042 | else | |
3043 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3044 | fi |
3045 | done | |
3046 | ||
3047 | ||
f24af81b | 3048 | # Check for thread headers. |
093e61a6 RS |
3049 | ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'` |
3050 | echo $ac_n "checking for thread.h""... $ac_c" 1>&6 | |
7468e0b5 | 3051 | echo "configure:3052: checking for thread.h" >&5 |
093e61a6 RS |
3052 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3053 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3054 | else | |
3055 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3056 | #line 3057 "configure" |
093e61a6 | 3057 | #include "confdefs.h" |
cafe096b | 3058 | #include <thread.h> |
093e61a6 RS |
3059 | EOF |
3060 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 3061 | { (eval echo configure:3062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3062 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3063 | if test -z "$ac_err"; then | |
3064 | rm -rf conftest* | |
3065 | eval "ac_cv_header_$ac_safe=yes" | |
3066 | else | |
3067 | echo "$ac_err" >&5 | |
3068 | echo "configure: failed program was:" >&5 | |
3069 | cat conftest.$ac_ext >&5 | |
3070 | rm -rf conftest* | |
3071 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3072 | fi |
093e61a6 | 3073 | rm -f conftest* |
f24af81b | 3074 | fi |
093e61a6 RS |
3075 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3076 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3077 | have_thread_h=yes |
3078 | else | |
093e61a6 RS |
3079 | echo "$ac_t""no" 1>&6 |
3080 | have_thread_h= | |
f24af81b TT |
3081 | fi |
3082 | ||
093e61a6 RS |
3083 | ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'` |
3084 | echo $ac_n "checking for pthread.h""... $ac_c" 1>&6 | |
7468e0b5 | 3085 | echo "configure:3086: checking for pthread.h" >&5 |
093e61a6 RS |
3086 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
3087 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f24af81b | 3088 | else |
093e61a6 | 3089 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3090 | #line 3091 "configure" |
093e61a6 | 3091 | #include "confdefs.h" |
cafe096b | 3092 | #include <pthread.h> |
093e61a6 RS |
3093 | EOF |
3094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 3095 | { (eval echo configure:3096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
3096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3097 | if test -z "$ac_err"; then | |
3098 | rm -rf conftest* | |
3099 | eval "ac_cv_header_$ac_safe=yes" | |
3100 | else | |
3101 | echo "$ac_err" >&5 | |
3102 | echo "configure: failed program was:" >&5 | |
3103 | cat conftest.$ac_ext >&5 | |
3104 | rm -rf conftest* | |
3105 | eval "ac_cv_header_$ac_safe=no" | |
f24af81b | 3106 | fi |
093e61a6 | 3107 | rm -f conftest* |
f24af81b | 3108 | fi |
093e61a6 RS |
3109 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
3110 | echo "$ac_t""yes" 1>&6 | |
f24af81b TT |
3111 | have_pthread_h=yes |
3112 | else | |
093e61a6 RS |
3113 | echo "$ac_t""no" 1>&6 |
3114 | have_pthread_h= | |
f24af81b TT |
3115 | fi |
3116 | ||
3117 | ||
84c041a1 | 3118 | # These tests can't be done till we know if we have limits.h. |
093e61a6 | 3119 | echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6 |
7468e0b5 | 3120 | echo "configure:3121: checking for CHAR_BIT" >&5 |
093e61a6 RS |
3121 | if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then |
3122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3123 | else | |
3124 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3125 | #line 3126 "configure" |
093e61a6 | 3126 | #include "confdefs.h" |
75e93faa ZW |
3127 | #ifdef HAVE_LIMITS_H |
3128 | #include <limits.h> | |
3129 | #endif | |
3130 | #ifdef CHAR_BIT | |
3131 | found | |
3132 | #endif | |
093e61a6 | 3133 | EOF |
75e93faa | 3134 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3135 | egrep "found" >/dev/null 2>&1; then |
3136 | rm -rf conftest* | |
75e93faa ZW |
3137 | gcc_cv_decl_char_bit=yes |
3138 | else | |
093e61a6 | 3139 | rm -rf conftest* |
75e93faa ZW |
3140 | gcc_cv_decl_char_bit=no |
3141 | fi | |
3142 | rm -f conftest* | |
3143 | ||
3144 | ||
3145 | fi | |
093e61a6 RS |
3146 | |
3147 | echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6 | |
75e93faa | 3148 | if test $gcc_cv_decl_char_bit = no; then |
093e61a6 | 3149 | echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6 |
7468e0b5 | 3150 | echo "configure:3151: checking number of bits in a byte" >&5 |
093e61a6 RS |
3151 | if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then |
3152 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75e93faa ZW |
3153 | else |
3154 | i=8 | |
3155 | gcc_cv_c_nbby= | |
3156 | while test $i -lt 65; do | |
093e61a6 | 3157 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3158 | #line 3159 "configure" |
093e61a6 | 3159 | #include "confdefs.h" |
75e93faa | 3160 | |
093e61a6 | 3161 | int main() { |
4e70264f ZW |
3162 | switch(0) { |
3163 | case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i): | |
3164 | case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)): | |
3165 | ; } | |
093e61a6 RS |
3166 | ; return 0; } |
3167 | EOF | |
7468e0b5 | 3168 | if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3169 | rm -rf conftest* |
4e70264f | 3170 | gcc_cv_c_nbby=$i; break |
75e93faa | 3171 | else |
093e61a6 RS |
3172 | echo "configure: failed program was:" >&5 |
3173 | cat conftest.$ac_ext >&5 | |
75e93faa | 3174 | fi |
093e61a6 | 3175 | rm -f conftest* |
75e93faa ZW |
3176 | i=`expr $i + 1` |
3177 | done | |
3178 | test -z "$gcc_cv_c_nbby" && gcc_cv_c_nbby=failed | |
3179 | ||
3180 | fi | |
093e61a6 RS |
3181 | |
3182 | echo "$ac_t""$gcc_cv_c_nbby" 1>&6 | |
75e93faa | 3183 | if test $gcc_cv_c_nbby = failed; then |
093e61a6 | 3184 | { echo "configure: error: cannot determine number of bits in a byte" 1>&2; exit 1; } |
75e93faa | 3185 | else |
093e61a6 | 3186 | cat >> confdefs.h <<EOF |
75e93faa | 3187 | #define CHAR_BIT $gcc_cv_c_nbby |
093e61a6 | 3188 | EOF |
75e93faa ZW |
3189 | |
3190 | fi | |
3191 | fi | |
093e61a6 | 3192 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
7468e0b5 | 3193 | echo "configure:3194: checking whether byte ordering is bigendian" >&5 |
093e61a6 RS |
3194 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
3195 | echo $ac_n "(cached) $ac_c" 1>&6 | |
84c041a1 | 3196 | else |
4977bab6 ZW |
3197 | ac_cv_c_bigendian=unknown |
3198 | # See if sys/param.h defines the BYTE_ORDER macro. | |
093e61a6 | 3199 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3200 | #line 3201 "configure" |
093e61a6 | 3201 | #include "confdefs.h" |
4977bab6 ZW |
3202 | #include <sys/types.h> |
3203 | #include <sys/param.h> | |
093e61a6 | 3204 | int main() { |
2d6eb5bf | 3205 | |
4977bab6 ZW |
3206 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
3207 | bogus endian macros | |
84c041a1 | 3208 | #endif |
093e61a6 RS |
3209 | ; return 0; } |
3210 | EOF | |
7468e0b5 | 3211 | if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3212 | rm -rf conftest* |
4977bab6 | 3213 | # It does; now see whether it defined to BIG_ENDIAN or not. |
093e61a6 | 3214 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3215 | #line 3216 "configure" |
093e61a6 | 3216 | #include "confdefs.h" |
4977bab6 ZW |
3217 | #include <sys/types.h> |
3218 | #include <sys/param.h> | |
093e61a6 | 3219 | int main() { |
4977bab6 ZW |
3220 | |
3221 | #if BYTE_ORDER != BIG_ENDIAN | |
3222 | not big endian | |
84c041a1 | 3223 | #endif |
093e61a6 RS |
3224 | ; return 0; } |
3225 | EOF | |
7468e0b5 | 3226 | if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3227 | rm -rf conftest* |
4977bab6 ZW |
3228 | ac_cv_c_bigendian=yes |
3229 | else | |
093e61a6 RS |
3230 | echo "configure: failed program was:" >&5 |
3231 | cat conftest.$ac_ext >&5 | |
3232 | rm -rf conftest* | |
3233 | ac_cv_c_bigendian=no | |
4977bab6 | 3234 | fi |
093e61a6 | 3235 | rm -f conftest* |
4977bab6 | 3236 | else |
093e61a6 RS |
3237 | echo "configure: failed program was:" >&5 |
3238 | cat conftest.$ac_ext >&5 | |
4977bab6 | 3239 | fi |
093e61a6 | 3240 | rm -f conftest* |
4977bab6 ZW |
3241 | if test $ac_cv_c_bigendian = unknown; then |
3242 | if test "$cross_compiling" = yes; then | |
093e61a6 RS |
3243 | echo $ac_n "cross-compiling... " 2>&6 |
3244 | else | |
3245 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3246 | #line 3247 "configure" |
093e61a6 | 3247 | #include "confdefs.h" |
4977bab6 ZW |
3248 | main () { |
3249 | /* Are we little or big endian? From Harbison&Steele. */ | |
3250 | union | |
3251 | { | |
3252 | long l; | |
3253 | char c[sizeof (long)]; | |
3254 | } u; | |
3255 | u.l = 1; | |
3256 | exit (u.c[sizeof (long) - 1] == 1); | |
3257 | } | |
093e61a6 | 3258 | EOF |
7468e0b5 | 3259 | if { (eval echo configure:3260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3260 | then |
4977bab6 ZW |
3261 | ac_cv_c_bigendian=no |
3262 | else | |
093e61a6 RS |
3263 | echo "configure: failed program was:" >&5 |
3264 | cat conftest.$ac_ext >&5 | |
3265 | rm -fr conftest* | |
3266 | ac_cv_c_bigendian=yes | |
4977bab6 | 3267 | fi |
093e61a6 | 3268 | rm -fr conftest* |
84c041a1 | 3269 | fi |
093e61a6 | 3270 | |
4977bab6 ZW |
3271 | fi |
3272 | fi | |
093e61a6 RS |
3273 | |
3274 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 | |
4977bab6 | 3275 | if test $ac_cv_c_bigendian = unknown; then |
093e61a6 | 3276 | echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 |
7468e0b5 | 3277 | echo "configure:3278: checking to probe for byte ordering" >&5 |
2d6eb5bf | 3278 | |
4977bab6 ZW |
3279 | cat >conftest.c <<EOF |
3280 | short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
3281 | short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
3282 | void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } | |
3283 | short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
3284 | short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
3285 | void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } | |
3286 | int main() { _ascii (); _ebcdic (); return 0; } | |
3287 | EOF | |
3288 | if test -f conftest.c ; then | |
3289 | if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then | |
3290 | if test `grep -l BIGenDianSyS conftest.o` ; then | |
3291 | echo $ac_n ' big endian probe OK, ' 1>&6 | |
3292 | ac_cv_c_bigendian=yes | |
3293 | fi | |
3294 | if test `grep -l LiTTleEnDian conftest.o` ; then | |
3295 | echo $ac_n ' little endian probe OK, ' 1>&6 | |
3296 | if test $ac_cv_c_bigendian = yes ; then | |
3297 | ac_cv_c_bigendian=unknown; | |
3298 | else | |
3299 | ac_cv_c_bigendian=no | |
3300 | fi | |
3301 | fi | |
3302 | echo $ac_n 'guessing bigendian ... ' >&6 | |
3303 | fi | |
3304 | fi | |
093e61a6 | 3305 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
84c041a1 | 3306 | fi |
4977bab6 | 3307 | if test $ac_cv_c_bigendian = yes; then |
093e61a6 | 3308 | cat >> confdefs.h <<\EOF |
4977bab6 | 3309 | #define WORDS_BIGENDIAN 1 |
093e61a6 | 3310 | EOF |
cafe096b | 3311 | |
093e61a6 | 3312 | cat >> confdefs.h <<\EOF |
84c041a1 | 3313 | #define HOST_WORDS_BIG_ENDIAN 1 |
093e61a6 | 3314 | EOF |
84c041a1 | 3315 | |
4977bab6 ZW |
3316 | BYTEORDER=4321 |
3317 | else | |
3318 | BYTEORDER=1234 | |
3319 | fi | |
093e61a6 | 3320 | cat >> confdefs.h <<EOF |
4977bab6 | 3321 | #define BYTEORDER $BYTEORDER |
093e61a6 | 3322 | EOF |
4977bab6 ZW |
3323 | |
3324 | if test $ac_cv_c_bigendian = unknown; then | |
093e61a6 | 3325 | { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; } |
84c041a1 ZW |
3326 | fi |
3327 | ||
75e93faa | 3328 | |
73458fb7 NN |
3329 | # -------- |
3330 | # UNSORTED | |
3331 | # -------- | |
1e608388 | 3332 | |
73458fb7 NN |
3333 | # Stage specific cflags for build. |
3334 | stage1_cflags= | |
3335 | case $build in | |
3336 | vax-*-*) | |
3337 | if test x$GCC = xyes | |
3338 | then | |
3339 | stage1_cflags="-Wa,-J" | |
3340 | else | |
3341 | stage1_cflags="-J" | |
3342 | fi | |
3343 | ;; | |
3344 | powerpc-*-darwin*) | |
3345 | # The spiffy cpp-precomp chokes on some legitimate constructs in GCC | |
3346 | # sources; use -no-cpp-precomp to get to GNU cpp. | |
3347 | # Apple's GCC has bugs in designated initializer handling, so disable | |
3348 | # that too. | |
3349 | stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" | |
3350 | ;; | |
3351 | esac | |
1e608388 | 3352 | |
1e608388 | 3353 | |
4e70264f ZW |
3354 | # These libraries may be used by collect2. |
3355 | # We may need a special search path to get them linked. | |
093e61a6 | 3356 | echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6 |
7468e0b5 | 3357 | echo "configure:3358: checking for collect2 libraries" >&5 |
093e61a6 RS |
3358 | if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then |
3359 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4e70264f ZW |
3360 | else |
3361 | save_LIBS="$LIBS" | |
7f2749d4 | 3362 | for libs in '' -lld -lmld \ |
4e70264f ZW |
3363 | '-L/usr/lib/cmplrs/cc2.11 -lmld' \ |
3364 | '-L/usr/lib/cmplrs/cc3.11 -lmld' | |
3365 | do | |
3366 | LIBS="$libs" | |
093e61a6 | 3367 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3368 | #line 3369 "configure" |
093e61a6 | 3369 | #include "confdefs.h" |
4e70264f ZW |
3370 | /* Override any gcc2 internal prototype to avoid an error. */ |
3371 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3372 | builtin and then its argument prototype would still apply. */ |
3373 | char ldopen(); | |
3374 | ||
3375 | int main() { | |
3376 | ldopen() | |
3377 | ; return 0; } | |
3378 | EOF | |
7468e0b5 | 3379 | if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3380 | rm -rf conftest* |
4e70264f ZW |
3381 | gcc_cv_collect2_libs="$libs"; break |
3382 | else | |
093e61a6 RS |
3383 | echo "configure: failed program was:" >&5 |
3384 | cat conftest.$ac_ext >&5 | |
4e70264f | 3385 | fi |
093e61a6 | 3386 | rm -f conftest* |
4e70264f ZW |
3387 | done |
3388 | LIBS="$save_LIBS" | |
3389 | test -z "$gcc_cv_collect2_libs" && gcc_cv_collect2_libs='none required' | |
3390 | fi | |
093e61a6 RS |
3391 | |
3392 | echo "$ac_t""$gcc_cv_collect2_libs" 1>&6 | |
4e70264f ZW |
3393 | case $gcc_cv_collect2_libs in |
3394 | "none required") ;; | |
3395 | *) COLLECT2_LIBS=$gcc_cv_collect2_libs ;; | |
3396 | esac | |
3397 | ||
3398 | ||
7f2749d4 RK |
3399 | # When building Ada code on Alpha, we need exc_resume which is usually in |
3400 | # -lexc. So test for it. | |
3401 | save_LIBS="$LIBS" | |
3402 | LIBS= | |
3403 | ||
093e61a6 | 3404 | echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6 |
7468e0b5 | 3405 | echo "configure:3406: checking for library containing exc_resume" >&5 |
093e61a6 RS |
3406 | if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then |
3407 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3408 | else | |
3409 | ac_func_search_save_LIBS="$LIBS" | |
3410 | ac_cv_search_exc_resume="no" | |
3411 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3412 | #line 3413 "configure" |
093e61a6 | 3413 | #include "confdefs.h" |
7f2749d4 RK |
3414 | /* Override any gcc2 internal prototype to avoid an error. */ |
3415 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3416 | builtin and then its argument prototype would still apply. */ |
3417 | char exc_resume(); | |
3418 | ||
3419 | int main() { | |
3420 | exc_resume() | |
3421 | ; return 0; } | |
3422 | EOF | |
7468e0b5 | 3423 | if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3424 | rm -rf conftest* |
7f2749d4 RK |
3425 | ac_cv_search_exc_resume="none required" |
3426 | else | |
093e61a6 RS |
3427 | echo "configure: failed program was:" >&5 |
3428 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3429 | fi |
093e61a6 RS |
3430 | rm -f conftest* |
3431 | test "$ac_cv_search_exc_resume" = "no" && for i in exc; do | |
3432 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3433 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3434 | #line 3435 "configure" |
093e61a6 | 3435 | #include "confdefs.h" |
7f2749d4 RK |
3436 | /* Override any gcc2 internal prototype to avoid an error. */ |
3437 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3438 | builtin and then its argument prototype would still apply. */ |
3439 | char exc_resume(); | |
3440 | ||
3441 | int main() { | |
3442 | exc_resume() | |
3443 | ; return 0; } | |
3444 | EOF | |
7468e0b5 | 3445 | if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3446 | rm -rf conftest* |
3447 | ac_cv_search_exc_resume="-l$i" | |
7f2749d4 RK |
3448 | break |
3449 | else | |
093e61a6 RS |
3450 | echo "configure: failed program was:" >&5 |
3451 | cat conftest.$ac_ext >&5 | |
7f2749d4 | 3452 | fi |
093e61a6 RS |
3453 | rm -f conftest* |
3454 | done | |
3455 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3456 | fi |
cafe096b | 3457 | |
093e61a6 RS |
3458 | echo "$ac_t""$ac_cv_search_exc_resume" 1>&6 |
3459 | if test "$ac_cv_search_exc_resume" != "no"; then | |
3460 | test "$ac_cv_search_exc_resume" = "none required" || LIBS="$ac_cv_search_exc_resume $LIBS" | |
3461 | ||
3462 | else : | |
3463 | ||
7f2749d4 RK |
3464 | fi |
3465 | GNAT_LIBEXC="$LIBS" | |
3466 | LIBS="$save_LIBS" | |
3467 | ||
3468 | ||
62c9aa5f ZW |
3469 | # Some systems put ldexp and frexp in libm instead of libc; assume |
3470 | # they're both in the same place. jcf-dump needs them. | |
3471 | save_LIBS="$LIBS" | |
3472 | LIBS= | |
3473 | ||
093e61a6 | 3474 | echo $ac_n "checking for library containing ldexp""... $ac_c" 1>&6 |
7468e0b5 | 3475 | echo "configure:3476: checking for library containing ldexp" >&5 |
093e61a6 RS |
3476 | if eval "test \"`echo '$''{'ac_cv_search_ldexp'+set}'`\" = set"; then |
3477 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3478 | else | |
3479 | ac_func_search_save_LIBS="$LIBS" | |
3480 | ac_cv_search_ldexp="no" | |
3481 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3482 | #line 3483 "configure" |
093e61a6 | 3483 | #include "confdefs.h" |
62c9aa5f ZW |
3484 | /* Override any gcc2 internal prototype to avoid an error. */ |
3485 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3486 | builtin and then its argument prototype would still apply. */ |
3487 | char ldexp(); | |
3488 | ||
3489 | int main() { | |
3490 | ldexp() | |
3491 | ; return 0; } | |
3492 | EOF | |
7468e0b5 | 3493 | if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 3494 | rm -rf conftest* |
62c9aa5f ZW |
3495 | ac_cv_search_ldexp="none required" |
3496 | else | |
093e61a6 RS |
3497 | echo "configure: failed program was:" >&5 |
3498 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3499 | fi |
093e61a6 RS |
3500 | rm -f conftest* |
3501 | test "$ac_cv_search_ldexp" = "no" && for i in m; do | |
3502 | LIBS="-l$i $ac_func_search_save_LIBS" | |
3503 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3504 | #line 3505 "configure" |
093e61a6 | 3505 | #include "confdefs.h" |
62c9aa5f ZW |
3506 | /* Override any gcc2 internal prototype to avoid an error. */ |
3507 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3508 | builtin and then its argument prototype would still apply. */ |
3509 | char ldexp(); | |
3510 | ||
3511 | int main() { | |
3512 | ldexp() | |
3513 | ; return 0; } | |
3514 | EOF | |
7468e0b5 | 3515 | if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3516 | rm -rf conftest* |
3517 | ac_cv_search_ldexp="-l$i" | |
62c9aa5f ZW |
3518 | break |
3519 | else | |
093e61a6 RS |
3520 | echo "configure: failed program was:" >&5 |
3521 | cat conftest.$ac_ext >&5 | |
62c9aa5f | 3522 | fi |
093e61a6 RS |
3523 | rm -f conftest* |
3524 | done | |
3525 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 3526 | fi |
cafe096b | 3527 | |
093e61a6 RS |
3528 | echo "$ac_t""$ac_cv_search_ldexp" 1>&6 |
3529 | if test "$ac_cv_search_ldexp" != "no"; then | |
3530 | test "$ac_cv_search_ldexp" = "none required" || LIBS="$ac_cv_search_ldexp $LIBS" | |
3531 | ||
3532 | else : | |
3533 | ||
62c9aa5f ZW |
3534 | fi |
3535 | LDEXP_LIB="$LIBS" | |
3536 | LIBS="$save_LIBS" | |
3537 | ||
3538 | ||
956d6950 JL |
3539 | # Use <inttypes.h> only if it exists, |
3540 | # doesn't clash with <sys/types.h>, and declares intmax_t. | |
093e61a6 | 3541 | echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6 |
7468e0b5 | 3542 | echo "configure:3543: checking for inttypes.h" >&5 |
093e61a6 RS |
3543 | if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then |
3544 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3545 | else | |
3546 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3547 | #line 3548 "configure" |
093e61a6 | 3548 | #include "confdefs.h" |
956d6950 JL |
3549 | #include <sys/types.h> |
3550 | #include <inttypes.h> | |
093e61a6 | 3551 | int main() { |
956d6950 | 3552 | intmax_t i = -1; |
093e61a6 RS |
3553 | ; return 0; } |
3554 | EOF | |
7468e0b5 | 3555 | if { (eval echo configure:3556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 3556 | rm -rf conftest* |
0056a9b5 | 3557 | gcc_cv_header_inttypes_h=yes |
956d6950 | 3558 | else |
093e61a6 RS |
3559 | echo "configure: failed program was:" >&5 |
3560 | cat conftest.$ac_ext >&5 | |
3561 | rm -rf conftest* | |
3562 | gcc_cv_header_inttypes_h=no | |
956d6950 | 3563 | fi |
093e61a6 | 3564 | rm -f conftest* |
956d6950 JL |
3565 | fi |
3566 | ||
093e61a6 | 3567 | echo "$ac_t""$gcc_cv_header_inttypes_h" 1>&6 |
0056a9b5 | 3568 | if test $gcc_cv_header_inttypes_h = yes; then |
093e61a6 | 3569 | cat >> confdefs.h <<\EOF |
0056a9b5 | 3570 | #define HAVE_INTTYPES_H 1 |
093e61a6 | 3571 | EOF |
0056a9b5 KG |
3572 | |
3573 | fi | |
956d6950 | 3574 | |
c149cc37 | 3575 | |
6af8c740 KG |
3576 | for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \ |
3577 | sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \ | |
a15135c9 | 3578 | fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat \ |
8eb6a092 | 3579 | scandir alphasort gettimeofday mbstowcs wcswidth mmap mincore |
956d6950 | 3580 | do |
093e61a6 | 3581 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
7468e0b5 | 3582 | echo "configure:3583: checking for $ac_func" >&5 |
093e61a6 RS |
3583 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
3584 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3585 | else | |
3586 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3587 | #line 3588 "configure" |
093e61a6 | 3588 | #include "confdefs.h" |
956d6950 | 3589 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
3590 | which can conflict with char $ac_func(); below. */ |
3591 | #include <assert.h> | |
956d6950 JL |
3592 | /* Override any gcc2 internal prototype to avoid an error. */ |
3593 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
3594 | builtin and then its argument prototype would still apply. */ |
3595 | char $ac_func(); | |
3596 | ||
3597 | int main() { | |
3598 | ||
956d6950 JL |
3599 | /* The GNU C library defines this for functions which it implements |
3600 | to always fail with ENOSYS. Some functions are actually named | |
3601 | something starting with __ and the normal name is an alias. */ | |
3602 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3603 | choke me | |
3604 | #else | |
093e61a6 | 3605 | $ac_func(); |
956d6950 JL |
3606 | #endif |
3607 | ||
093e61a6 RS |
3608 | ; return 0; } |
3609 | EOF | |
7468e0b5 | 3610 | if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
3611 | rm -rf conftest* |
3612 | eval "ac_cv_func_$ac_func=yes" | |
3613 | else | |
3614 | echo "configure: failed program was:" >&5 | |
3615 | cat conftest.$ac_ext >&5 | |
3616 | rm -rf conftest* | |
3617 | eval "ac_cv_func_$ac_func=no" | |
3618 | fi | |
3619 | rm -f conftest* | |
3620 | fi | |
956d6950 | 3621 | |
093e61a6 RS |
3622 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
3623 | echo "$ac_t""yes" 1>&6 | |
3624 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3625 | cat >> confdefs.h <<EOF | |
3626 | #define $ac_tr_func 1 | |
3627 | EOF | |
3628 | ||
3629 | else | |
3630 | echo "$ac_t""no" 1>&6 | |
956d6950 JL |
3631 | fi |
3632 | done | |
3633 | ||
6885fc87 | 3634 | |
39f6c4c8 | 3635 | if test x$ac_cv_func_mbstowcs = xyes; then |
093e61a6 | 3636 | echo $ac_n "checking whether mbstowcs works""... $ac_c" 1>&6 |
7468e0b5 | 3637 | echo "configure:3638: checking whether mbstowcs works" >&5 |
093e61a6 RS |
3638 | if eval "test \"`echo '$''{'gcc_cv_func_mbstowcs_works'+set}'`\" = set"; then |
3639 | echo $ac_n "(cached) $ac_c" 1>&6 | |
39f6c4c8 KW |
3640 | else |
3641 | if test "$cross_compiling" = yes; then | |
3642 | gcc_cv_func_mbstowcs_works=yes | |
3643 | else | |
093e61a6 | 3644 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3645 | #line 3646 "configure" |
093e61a6 | 3646 | #include "confdefs.h" |
39f6c4c8 KW |
3647 | #include <stdlib.h> |
3648 | int main() | |
3649 | { | |
3650 | mbstowcs(0, "", 0); | |
3651 | return 0; | |
3652 | } | |
093e61a6 | 3653 | EOF |
7468e0b5 | 3654 | if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3655 | then |
39f6c4c8 KW |
3656 | gcc_cv_func_mbstowcs_works=yes |
3657 | else | |
093e61a6 RS |
3658 | echo "configure: failed program was:" >&5 |
3659 | cat conftest.$ac_ext >&5 | |
3660 | rm -fr conftest* | |
3661 | gcc_cv_func_mbstowcs_works=no | |
39f6c4c8 | 3662 | fi |
093e61a6 | 3663 | rm -fr conftest* |
39f6c4c8 | 3664 | fi |
093e61a6 | 3665 | |
39f6c4c8 | 3666 | fi |
cafe096b | 3667 | |
093e61a6 RS |
3668 | echo "$ac_t""$gcc_cv_func_mbstowcs_works" 1>&6 |
3669 | if test x$gcc_cv_func_mbstowcs_works = xyes; then | |
3670 | cat >> confdefs.h <<\EOF | |
39f6c4c8 | 3671 | #define HAVE_WORKING_MBSTOWCS 1 |
093e61a6 | 3672 | EOF |
39f6c4c8 KW |
3673 | |
3674 | fi | |
3675 | fi | |
3676 | ||
093e61a6 | 3677 | echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 |
7468e0b5 | 3678 | echo "configure:3679: checking for ssize_t" >&5 |
093e61a6 RS |
3679 | if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then |
3680 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f12bc141 | 3681 | else |
093e61a6 | 3682 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3683 | #line 3684 "configure" |
093e61a6 RS |
3684 | #include "confdefs.h" |
3685 | #include <sys/types.h> | |
3686 | #if STDC_HEADERS | |
3687 | #include <stdlib.h> | |
3688 | #include <stddef.h> | |
3689 | #endif | |
3690 | EOF | |
3691 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3692 | egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3693 | rm -rf conftest* | |
cb65112a | 3694 | ac_cv_type_ssize_t=yes |
f12bc141 | 3695 | else |
093e61a6 RS |
3696 | rm -rf conftest* |
3697 | ac_cv_type_ssize_t=no | |
f12bc141 | 3698 | fi |
093e61a6 | 3699 | rm -f conftest* |
cafe096b | 3700 | |
093e61a6 RS |
3701 | fi |
3702 | echo "$ac_t""$ac_cv_type_ssize_t" 1>&6 | |
3703 | if test $ac_cv_type_ssize_t = no; then | |
3704 | cat >> confdefs.h <<\EOF | |
f12bc141 | 3705 | #define ssize_t int |
093e61a6 | 3706 | EOF |
f12bc141 ZW |
3707 | |
3708 | fi | |
3709 | ||
0b9d02c6 | 3710 | |
e256b8b6 DA |
3711 | # Try to determine the array type of the second argument of getgroups |
3712 | # for the target system (int or gid_t). | |
093e61a6 | 3713 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
7468e0b5 | 3714 | echo "configure:3715: checking for uid_t in sys/types.h" >&5 |
093e61a6 RS |
3715 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
3716 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3717 | else | |
3718 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3719 | #line 3720 "configure" |
093e61a6 | 3720 | #include "confdefs.h" |
e256b8b6 | 3721 | #include <sys/types.h> |
093e61a6 | 3722 | EOF |
e256b8b6 | 3723 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3724 | egrep "uid_t" >/dev/null 2>&1; then |
3725 | rm -rf conftest* | |
e256b8b6 DA |
3726 | ac_cv_type_uid_t=yes |
3727 | else | |
093e61a6 | 3728 | rm -rf conftest* |
e256b8b6 DA |
3729 | ac_cv_type_uid_t=no |
3730 | fi | |
3731 | rm -f conftest* | |
3732 | ||
3733 | fi | |
cafe096b | 3734 | |
093e61a6 RS |
3735 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
3736 | if test $ac_cv_type_uid_t = no; then | |
3737 | cat >> confdefs.h <<\EOF | |
e256b8b6 | 3738 | #define uid_t int |
093e61a6 | 3739 | EOF |
cafe096b | 3740 | |
093e61a6 | 3741 | cat >> confdefs.h <<\EOF |
e256b8b6 | 3742 | #define gid_t int |
093e61a6 | 3743 | EOF |
e256b8b6 DA |
3744 | |
3745 | fi | |
3746 | ||
093e61a6 | 3747 | echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 |
7468e0b5 | 3748 | echo "configure:3749: checking type of array argument to getgroups" >&5 |
093e61a6 RS |
3749 | if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then |
3750 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e256b8b6 DA |
3751 | else |
3752 | if test "$cross_compiling" = yes; then | |
3753 | ac_cv_type_getgroups=cross | |
3754 | else | |
093e61a6 | 3755 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3756 | #line 3757 "configure" |
093e61a6 RS |
3757 | #include "confdefs.h" |
3758 | ||
e256b8b6 DA |
3759 | /* Thanks to Mike Rendell for this test. */ |
3760 | #include <sys/types.h> | |
3761 | #define NGID 256 | |
3762 | #undef MAX | |
3763 | #define MAX(x, y) ((x) > (y) ? (x) : (y)) | |
093e61a6 | 3764 | main() |
e256b8b6 DA |
3765 | { |
3766 | gid_t gidset[NGID]; | |
3767 | int i, n; | |
3768 | union { gid_t gval; long lval; } val; | |
3769 | ||
3770 | val.lval = -1; | |
3771 | for (i = 0; i < NGID; i++) | |
3772 | gidset[i] = val.gval; | |
3773 | n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, | |
3774 | gidset); | |
3775 | /* Exit non-zero if getgroups seems to require an array of ints. This | |
3776 | happens when gid_t is short but getgroups modifies an array of ints. */ | |
3777 | exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); | |
3778 | } | |
cafe096b | 3779 | |
093e61a6 | 3780 | EOF |
7468e0b5 | 3781 | if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 RS |
3782 | then |
3783 | ac_cv_type_getgroups=gid_t | |
3784 | else | |
3785 | echo "configure: failed program was:" >&5 | |
3786 | cat conftest.$ac_ext >&5 | |
3787 | rm -fr conftest* | |
3788 | ac_cv_type_getgroups=int | |
e256b8b6 | 3789 | fi |
093e61a6 | 3790 | rm -fr conftest* |
e256b8b6 | 3791 | fi |
093e61a6 | 3792 | |
e256b8b6 | 3793 | if test $ac_cv_type_getgroups = cross; then |
093e61a6 | 3794 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3795 | #line 3796 "configure" |
093e61a6 | 3796 | #include "confdefs.h" |
e256b8b6 | 3797 | #include <unistd.h> |
093e61a6 | 3798 | EOF |
e256b8b6 | 3799 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
3800 | egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then |
3801 | rm -rf conftest* | |
e256b8b6 DA |
3802 | ac_cv_type_getgroups=gid_t |
3803 | else | |
093e61a6 | 3804 | rm -rf conftest* |
e256b8b6 DA |
3805 | ac_cv_type_getgroups=int |
3806 | fi | |
3807 | rm -f conftest* | |
3808 | ||
3809 | fi | |
3810 | fi | |
3811 | ||
093e61a6 RS |
3812 | echo "$ac_t""$ac_cv_type_getgroups" 1>&6 |
3813 | cat >> confdefs.h <<EOF | |
e256b8b6 | 3814 | #define GETGROUPS_T $ac_cv_type_getgroups |
093e61a6 | 3815 | EOF |
e256b8b6 DA |
3816 | |
3817 | ||
3818 | if test "${target}" = "${build}"; then | |
3819 | TARGET_GETGROUPS_T=$ac_cv_type_getgroups | |
3820 | else | |
3821 | case "${target}" in | |
3822 | # This condition may need some tweaking. It should include all | |
3823 | # targets where the array type of the second argument of getgroups | |
3824 | # is int and the type of gid_t is not equivalent to int. | |
3825 | *-*-sunos* | *-*-ultrix*) | |
3826 | TARGET_GETGROUPS_T=int | |
3827 | ;; | |
3828 | *) | |
3829 | TARGET_GETGROUPS_T=gid_t | |
3830 | ;; | |
3831 | esac | |
3832 | fi | |
3833 | ||
3834 | ||
093e61a6 | 3835 | echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6 |
7468e0b5 | 3836 | echo "configure:3837: checking whether the printf functions support %p" >&5 |
093e61a6 RS |
3837 | if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then |
3838 | echo $ac_n "(cached) $ac_c" 1>&6 | |
0a4b6309 RL |
3839 | else |
3840 | if test "$cross_compiling" = yes; then | |
3841 | gcc_cv_func_printf_ptr=no | |
3842 | else | |
093e61a6 | 3843 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 3844 | #line 3845 "configure" |
093e61a6 | 3845 | #include "confdefs.h" |
0a4b6309 RL |
3846 | #include <stdio.h> |
3847 | ||
86cf1cbd | 3848 | int main() |
0a4b6309 RL |
3849 | { |
3850 | char buf[64]; | |
3851 | char *p = buf, *q = NULL; | |
3852 | sprintf(buf, "%p", p); | |
3853 | sscanf(buf, "%p", &q); | |
86cf1cbd | 3854 | return (p != q); |
0a4b6309 | 3855 | } |
093e61a6 | 3856 | EOF |
7468e0b5 | 3857 | if { (eval echo configure:3858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 3858 | then |
0a4b6309 RL |
3859 | gcc_cv_func_printf_ptr=yes |
3860 | else | |
093e61a6 RS |
3861 | echo "configure: failed program was:" >&5 |
3862 | cat conftest.$ac_ext >&5 | |
3863 | rm -fr conftest* | |
3864 | gcc_cv_func_printf_ptr=no | |
0a4b6309 | 3865 | fi |
093e61a6 | 3866 | rm -fr conftest* |
0a4b6309 | 3867 | fi |
093e61a6 | 3868 | |
0a4b6309 RL |
3869 | rm -f core core.* *.core |
3870 | fi | |
cafe096b | 3871 | |
093e61a6 RS |
3872 | echo "$ac_t""$gcc_cv_func_printf_ptr" 1>&6 |
3873 | if test $gcc_cv_func_printf_ptr = yes ; then | |
3874 | cat >> confdefs.h <<\EOF | |
0a4b6309 | 3875 | #define HAVE_PRINTF_PTR 1 |
093e61a6 | 3876 | EOF |
0a4b6309 RL |
3877 | |
3878 | fi | |
3879 | ||
1072ec3f ZW |
3880 | if test $ac_cv_header_sys_mman_h != yes \ |
3881 | || test $ac_cv_func_mmap != yes; then | |
3882 | gcc_cv_func_mmap_file=no | |
3883 | gcc_cv_func_mmap_dev_zero=no | |
3884 | gcc_cv_func_mmap_anon=no | |
3885 | else | |
3886 | echo $ac_n "checking whether read-only mmap of a plain file works""... $ac_c" 1>&6 | |
7468e0b5 | 3887 | echo "configure:3888: checking whether read-only mmap of a plain file works" >&5 |
1072ec3f ZW |
3888 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_file'+set}'`\" = set"; then |
3889 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3890 | else | |
3891 | # Add a system to this blacklist if | |
3892 | # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a | |
3893 | # memory area containing the same data that you'd get if you applied | |
3894 | # read() to the same fd. The only system known to have a problem here | |
3895 | # is VMS, where text files have record structure. | |
3896 | case "$host_os" in | |
3897 | vms*) | |
3898 | gcc_cv_func_mmap_file=no ;; | |
3899 | *) | |
3900 | gcc_cv_func_mmap_file=yes;; | |
3901 | esac | |
3902 | fi | |
3903 | ||
3904 | echo "$ac_t""$gcc_cv_func_mmap_file" 1>&6 | |
3905 | echo $ac_n "checking whether mmap from /dev/zero works""... $ac_c" 1>&6 | |
7468e0b5 | 3906 | echo "configure:3907: checking whether mmap from /dev/zero works" >&5 |
1072ec3f ZW |
3907 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_dev_zero'+set}'`\" = set"; then |
3908 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3909 | else | |
3910 | # Add a system to this blacklist if it has mmap() but /dev/zero | |
3911 | # does not exist, or if mmapping /dev/zero does not give anonymous | |
3912 | # zeroed pages with both the following properties: | |
3913 | # 1. If you map N consecutive pages in with one call, and then | |
3914 | # unmap any subset of those pages, the pages that were not | |
3915 | # explicitly unmapped remain accessible. | |
3916 | # 2. If you map two adjacent blocks of memory and then unmap them | |
3917 | # both at once, they must both go away. | |
3918 | # Systems known to be in this category are Windows (all variants), | |
3919 | # VMS, and Darwin. | |
3920 | case "$host_os" in | |
3921 | vms* | cygwin* | pe | mingw* | darwin*) | |
3922 | gcc_cv_func_mmap_dev_zero=no ;; | |
3923 | *) | |
3924 | gcc_cv_func_mmap_dev_zero=yes;; | |
3925 | esac | |
3926 | fi | |
3927 | ||
3928 | echo "$ac_t""$gcc_cv_func_mmap_dev_zero" 1>&6 | |
3929 | ||
3930 | # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. | |
3931 | echo $ac_n "checking for MAP_ANON(YMOUS)""... $ac_c" 1>&6 | |
7468e0b5 | 3932 | echo "configure:3933: checking for MAP_ANON(YMOUS)" >&5 |
1072ec3f ZW |
3933 | if eval "test \"`echo '$''{'gcc_cv_decl_map_anon'+set}'`\" = set"; then |
3934 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3935 | else | |
3936 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 3937 | #line 3938 "configure" |
1072ec3f ZW |
3938 | #include "confdefs.h" |
3939 | #include <sys/types.h> | |
3940 | #include <sys/mman.h> | |
3941 | #include <unistd.h> | |
3942 | ||
3943 | #ifndef MAP_ANONYMOUS | |
3944 | #define MAP_ANONYMOUS MAP_ANON | |
3945 | #endif | |
3946 | ||
3947 | int main() { | |
3948 | int n = MAP_ANONYMOUS; | |
3949 | ; return 0; } | |
3950 | EOF | |
7468e0b5 | 3951 | if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1072ec3f ZW |
3952 | rm -rf conftest* |
3953 | gcc_cv_decl_map_anon=yes | |
3954 | else | |
3955 | echo "configure: failed program was:" >&5 | |
3956 | cat conftest.$ac_ext >&5 | |
3957 | rm -rf conftest* | |
3958 | gcc_cv_decl_map_anon=no | |
3959 | fi | |
3960 | rm -f conftest* | |
3961 | fi | |
3962 | ||
3963 | echo "$ac_t""$gcc_cv_decl_map_anon" 1>&6 | |
3964 | ||
3965 | if test $gcc_cv_decl_map_anon = no; then | |
3966 | gcc_cv_func_mmap_anon=no | |
3967 | else | |
3968 | echo $ac_n "checking whether mmap with MAP_ANON(YMOUS) works""... $ac_c" 1>&6 | |
7468e0b5 | 3969 | echo "configure:3970: checking whether mmap with MAP_ANON(YMOUS) works" >&5 |
1072ec3f ZW |
3970 | if eval "test \"`echo '$''{'gcc_cv_func_mmap_anon'+set}'`\" = set"; then |
3971 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3972 | else | |
3973 | # Add a system to this blacklist if it has mmap() and MAP_ANON or | |
3974 | # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) | |
3975 | # doesn't give anonymous zeroed pages with the same properties listed | |
3976 | # above for use of /dev/zero. | |
3977 | # Systems known to be in this category are Windows, VMS, and SCO Unix. | |
3978 | case "$host_os" in | |
3979 | vms* | cygwin* | pe | mingw* | sco* | udk* ) | |
3980 | gcc_cv_func_mmap_anon=no ;; | |
3981 | *) | |
3982 | gcc_cv_func_mmap_anon=yes;; | |
3983 | esac | |
3984 | fi | |
3985 | ||
3986 | echo "$ac_t""$gcc_cv_func_mmap_anon" 1>&6 | |
3987 | fi | |
3988 | fi | |
3989 | ||
3990 | if test $gcc_cv_func_mmap_file = yes; then | |
3991 | cat >> confdefs.h <<\EOF | |
3992 | #define HAVE_MMAP_FILE 1 | |
3993 | EOF | |
3994 | ||
3995 | fi | |
3996 | if test $gcc_cv_func_mmap_dev_zero = yes; then | |
3997 | cat >> confdefs.h <<\EOF | |
3998 | #define HAVE_MMAP_DEV_ZERO 1 | |
3999 | EOF | |
4000 | ||
4001 | fi | |
4002 | if test $gcc_cv_func_mmap_anon = yes; then | |
4003 | cat >> confdefs.h <<\EOF | |
4004 | #define HAVE_MMAP_ANON 1 | |
4005 | EOF | |
4006 | ||
4007 | fi | |
4008 | ||
b27d2bd5 MK |
4009 | |
4010 | case "${host}" in | |
4011 | *-*-uwin*) | |
093e61a6 | 4012 | { echo "configure: error: |
cafe096b | 4013 | *** UWIN may not be used as a host platform because |
093e61a6 | 4014 | *** linking with posix.dll is not allowed by the GNU GPL" 1>&2; exit 1; } |
b27d2bd5 | 4015 | ;; |
ee262b6f | 4016 | *-*-*vms*) |
093e61a6 | 4017 | # Under VMS, vfork works very different than on Unix. The standard test |
ee262b6f DR |
4018 | # won't work, and it isn't easily adaptable. It makes more sense to |
4019 | # just force it. | |
4020 | ac_cv_func_vfork_works=yes | |
4021 | ;; | |
b27d2bd5 | 4022 | esac |
093e61a6 | 4023 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
7468e0b5 | 4024 | echo "configure:4025: checking for pid_t" >&5 |
093e61a6 RS |
4025 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
4026 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4027 | else | |
4028 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4029 | #line 4030 "configure" |
093e61a6 RS |
4030 | #include "confdefs.h" |
4031 | #include <sys/types.h> | |
4032 | #if STDC_HEADERS | |
4033 | #include <stdlib.h> | |
4034 | #include <stddef.h> | |
4035 | #endif | |
4036 | EOF | |
4037 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4038 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
4039 | rm -rf conftest* | |
cb65112a | 4040 | ac_cv_type_pid_t=yes |
c375c43b | 4041 | else |
093e61a6 RS |
4042 | rm -rf conftest* |
4043 | ac_cv_type_pid_t=no | |
c375c43b | 4044 | fi |
093e61a6 | 4045 | rm -f conftest* |
cafe096b | 4046 | |
093e61a6 RS |
4047 | fi |
4048 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 | |
4049 | if test $ac_cv_type_pid_t = no; then | |
4050 | cat >> confdefs.h <<\EOF | |
c375c43b | 4051 | #define pid_t int |
093e61a6 | 4052 | EOF |
c375c43b KG |
4053 | |
4054 | fi | |
4055 | ||
093e61a6 RS |
4056 | ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
4057 | echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 | |
7468e0b5 | 4058 | echo "configure:4059: checking for vfork.h" >&5 |
093e61a6 RS |
4059 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
4060 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cafe096b | 4061 | else |
093e61a6 | 4062 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4063 | #line 4064 "configure" |
093e61a6 RS |
4064 | #include "confdefs.h" |
4065 | #include <vfork.h> | |
4066 | EOF | |
4067 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 4068 | { (eval echo configure:4069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
4069 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4070 | if test -z "$ac_err"; then | |
4071 | rm -rf conftest* | |
4072 | eval "ac_cv_header_$ac_safe=yes" | |
4073 | else | |
4074 | echo "$ac_err" >&5 | |
4075 | echo "configure: failed program was:" >&5 | |
4076 | cat conftest.$ac_ext >&5 | |
4077 | rm -rf conftest* | |
4078 | eval "ac_cv_header_$ac_safe=no" | |
c375c43b | 4079 | fi |
093e61a6 | 4080 | rm -f conftest* |
c375c43b | 4081 | fi |
093e61a6 RS |
4082 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
4083 | echo "$ac_t""yes" 1>&6 | |
4084 | cat >> confdefs.h <<\EOF | |
4085 | #define HAVE_VFORK_H 1 | |
4086 | EOF | |
c375c43b | 4087 | |
093e61a6 RS |
4088 | else |
4089 | echo "$ac_t""no" 1>&6 | |
c375c43b KG |
4090 | fi |
4091 | ||
093e61a6 | 4092 | echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
7468e0b5 | 4093 | echo "configure:4094: checking for working vfork" >&5 |
093e61a6 RS |
4094 | if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
4095 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4096 | else | |
4097 | if test "$cross_compiling" = yes; then | |
4098 | echo $ac_n "checking for vfork""... $ac_c" 1>&6 | |
7468e0b5 | 4099 | echo "configure:4100: checking for vfork" >&5 |
093e61a6 RS |
4100 | if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
4101 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4102 | else | |
4103 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4104 | #line 4105 "configure" |
093e61a6 | 4105 | #include "confdefs.h" |
c375c43b | 4106 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
4107 | which can conflict with char vfork(); below. */ |
4108 | #include <assert.h> | |
c375c43b KG |
4109 | /* Override any gcc2 internal prototype to avoid an error. */ |
4110 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
4111 | builtin and then its argument prototype would still apply. */ |
4112 | char vfork(); | |
4113 | ||
4114 | int main() { | |
4115 | ||
c375c43b KG |
4116 | /* The GNU C library defines this for functions which it implements |
4117 | to always fail with ENOSYS. Some functions are actually named | |
4118 | something starting with __ and the normal name is an alias. */ | |
093e61a6 | 4119 | #if defined (__stub_vfork) || defined (__stub___vfork) |
c375c43b KG |
4120 | choke me |
4121 | #else | |
093e61a6 | 4122 | vfork(); |
c375c43b KG |
4123 | #endif |
4124 | ||
093e61a6 RS |
4125 | ; return 0; } |
4126 | EOF | |
7468e0b5 | 4127 | if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4128 | rm -rf conftest* |
4129 | eval "ac_cv_func_vfork=yes" | |
4130 | else | |
4131 | echo "configure: failed program was:" >&5 | |
4132 | cat conftest.$ac_ext >&5 | |
4133 | rm -rf conftest* | |
4134 | eval "ac_cv_func_vfork=no" | |
4135 | fi | |
4136 | rm -f conftest* | |
c375c43b KG |
4137 | fi |
4138 | ||
093e61a6 RS |
4139 | if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then |
4140 | echo "$ac_t""yes" 1>&6 | |
4141 | : | |
c375c43b | 4142 | else |
093e61a6 | 4143 | echo "$ac_t""no" 1>&6 |
c375c43b | 4144 | fi |
093e61a6 | 4145 | |
c375c43b KG |
4146 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
4147 | else | |
093e61a6 | 4148 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4149 | #line 4150 "configure" |
093e61a6 | 4150 | #include "confdefs.h" |
c375c43b KG |
4151 | /* Thanks to Paul Eggert for this test. */ |
4152 | #include <stdio.h> | |
4153 | #include <sys/types.h> | |
4154 | #include <sys/stat.h> | |
093e61a6 RS |
4155 | #ifdef HAVE_UNISTD_H |
4156 | #include <unistd.h> | |
c375c43b | 4157 | #endif |
093e61a6 RS |
4158 | #ifdef HAVE_VFORK_H |
4159 | #include <vfork.h> | |
c375c43b KG |
4160 | #endif |
4161 | /* On some sparc systems, changes by the child to local and incoming | |
093e61a6 RS |
4162 | argument registers are propagated back to the parent. |
4163 | The compiler is told about this with #include <vfork.h>, | |
4164 | but some compilers (e.g. gcc -O) don't grok <vfork.h>. | |
4165 | Test for this by using a static variable whose address | |
4166 | is put into a register that is clobbered by the vfork. */ | |
4167 | static | |
c375c43b KG |
4168 | #ifdef __cplusplus |
4169 | sparc_address_test (int arg) | |
093e61a6 | 4170 | #else |
c375c43b KG |
4171 | sparc_address_test (arg) int arg; |
4172 | #endif | |
4173 | { | |
4174 | static pid_t child; | |
4175 | if (!child) { | |
4176 | child = vfork (); | |
4177 | if (child < 0) { | |
4178 | perror ("vfork"); | |
4179 | _exit(2); | |
4180 | } | |
4181 | if (!child) { | |
4182 | arg = getpid(); | |
4183 | write(-1, "", 0); | |
4184 | _exit (arg); | |
4185 | } | |
4186 | } | |
4187 | } | |
093e61a6 | 4188 | main() { |
c375c43b KG |
4189 | pid_t parent = getpid (); |
4190 | pid_t child; | |
4191 | ||
093e61a6 | 4192 | sparc_address_test (); |
c375c43b KG |
4193 | |
4194 | child = vfork (); | |
4195 | ||
4196 | if (child == 0) { | |
093e61a6 RS |
4197 | /* Here is another test for sparc vfork register problems. |
4198 | This test uses lots of local variables, at least | |
4199 | as many local variables as main has allocated so far | |
4200 | including compiler temporaries. 4 locals are enough for | |
4201 | gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. | |
4202 | A buggy compiler should reuse the register of parent | |
4203 | for one of the local variables, since it will think that | |
4204 | parent can't possibly be used any more in this routine. | |
4205 | Assigning to the local variable will thus munge parent | |
4206 | in the parent process. */ | |
c375c43b KG |
4207 | pid_t |
4208 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), | |
4209 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); | |
4210 | /* Convince the compiler that p..p7 are live; otherwise, it might | |
4211 | use the same hardware register for all 8 local variables. */ | |
4212 | if (p != p1 || p != p2 || p != p3 || p != p4 | |
4213 | || p != p5 || p != p6 || p != p7) | |
4214 | _exit(1); | |
4215 | ||
093e61a6 RS |
4216 | /* On some systems (e.g. IRIX 3.3), |
4217 | vfork doesn't separate parent from child file descriptors. | |
4218 | If the child closes a descriptor before it execs or exits, | |
4219 | this munges the parent's descriptor as well. | |
4220 | Test for this by closing stdout in the child. */ | |
c375c43b KG |
4221 | _exit(close(fileno(stdout)) != 0); |
4222 | } else { | |
4223 | int status; | |
4224 | struct stat st; | |
4225 | ||
4226 | while (wait(&status) != child) | |
4227 | ; | |
4228 | exit( | |
4229 | /* Was there some problem with vforking? */ | |
4230 | child < 0 | |
4231 | ||
4232 | /* Did the child fail? (This shouldn't happen.) */ | |
4233 | || status | |
4234 | ||
4235 | /* Did the vfork/compiler bug occur? */ | |
4236 | || parent != getpid() | |
4237 | ||
4238 | /* Did the file descriptor bug occur? */ | |
4239 | || fstat(fileno(stdout), &st) != 0 | |
4240 | ); | |
4241 | } | |
4242 | } | |
093e61a6 | 4243 | EOF |
7468e0b5 | 4244 | if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4245 | then |
c375c43b KG |
4246 | ac_cv_func_vfork_works=yes |
4247 | else | |
093e61a6 RS |
4248 | echo "configure: failed program was:" >&5 |
4249 | cat conftest.$ac_ext >&5 | |
4250 | rm -fr conftest* | |
4251 | ac_cv_func_vfork_works=no | |
c375c43b | 4252 | fi |
093e61a6 | 4253 | rm -fr conftest* |
cafe096b | 4254 | fi |
c375c43b KG |
4255 | |
4256 | fi | |
4257 | ||
093e61a6 RS |
4258 | echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 |
4259 | if test $ac_cv_func_vfork_works = no; then | |
4260 | cat >> confdefs.h <<\EOF | |
c375c43b | 4261 | #define vfork fork |
093e61a6 | 4262 | EOF |
c375c43b KG |
4263 | |
4264 | fi | |
4265 | ||
81bf3d9e | 4266 | |
f91abfce | 4267 | |
093e61a6 | 4268 | |
b7f2fb96 | 4269 | am_cv_lib_iconv_ldpath= |
093e61a6 | 4270 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
f91abfce TT |
4271 | if test "${with_libiconv_prefix+set}" = set; then |
4272 | withval="$with_libiconv_prefix" | |
093e61a6 | 4273 | |
f91abfce TT |
4274 | for dir in `echo "$withval" | tr : ' '`; do |
4275 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 4276 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
f91abfce | 4277 | done |
093e61a6 RS |
4278 | |
4279 | fi | |
f91abfce TT |
4280 | |
4281 | ||
093e61a6 | 4282 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
7468e0b5 | 4283 | echo "configure:4284: checking for iconv" >&5 |
093e61a6 RS |
4284 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
4285 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4286 | else |
093e61a6 | 4287 | |
f91abfce TT |
4288 | am_cv_func_iconv="no, consider installing GNU libiconv" |
4289 | am_cv_lib_iconv=no | |
093e61a6 | 4290 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4291 | #line 4292 "configure" |
093e61a6 | 4292 | #include "confdefs.h" |
f91abfce TT |
4293 | #include <stdlib.h> |
4294 | #include <iconv.h> | |
093e61a6 | 4295 | int main() { |
f91abfce TT |
4296 | iconv_t cd = iconv_open("",""); |
4297 | iconv(cd,NULL,NULL,NULL,NULL); | |
4298 | iconv_close(cd); | |
093e61a6 RS |
4299 | ; return 0; } |
4300 | EOF | |
7468e0b5 | 4301 | if { (eval echo configure:4302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4302 | rm -rf conftest* |
f91abfce TT |
4303 | am_cv_func_iconv=yes |
4304 | else | |
093e61a6 RS |
4305 | echo "configure: failed program was:" >&5 |
4306 | cat conftest.$ac_ext >&5 | |
f91abfce | 4307 | fi |
093e61a6 | 4308 | rm -f conftest* |
f91abfce TT |
4309 | if test "$am_cv_func_iconv" != yes; then |
4310 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 4311 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 4312 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4313 | #line 4314 "configure" |
093e61a6 | 4314 | #include "confdefs.h" |
f91abfce TT |
4315 | #include <stdlib.h> |
4316 | #include <iconv.h> | |
093e61a6 | 4317 | int main() { |
f91abfce TT |
4318 | iconv_t cd = iconv_open("",""); |
4319 | iconv(cd,NULL,NULL,NULL,NULL); | |
4320 | iconv_close(cd); | |
093e61a6 RS |
4321 | ; return 0; } |
4322 | EOF | |
7468e0b5 | 4323 | if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 4324 | rm -rf conftest* |
f91abfce TT |
4325 | am_cv_lib_iconv=yes |
4326 | am_cv_func_iconv=yes | |
4327 | else | |
093e61a6 RS |
4328 | echo "configure: failed program was:" >&5 |
4329 | cat conftest.$ac_ext >&5 | |
f91abfce | 4330 | fi |
093e61a6 | 4331 | rm -f conftest* |
f91abfce TT |
4332 | LIBS="$am_save_LIBS" |
4333 | fi | |
093e61a6 | 4334 | |
cafe096b | 4335 | fi |
cafe096b | 4336 | |
093e61a6 RS |
4337 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
4338 | if test "$am_cv_func_iconv" = yes; then | |
4339 | cat >> confdefs.h <<\EOF | |
f91abfce | 4340 | #define HAVE_ICONV 1 |
093e61a6 | 4341 | EOF |
f91abfce | 4342 | |
093e61a6 | 4343 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
7468e0b5 | 4344 | echo "configure:4345: checking for iconv declaration" >&5 |
093e61a6 RS |
4345 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
4346 | echo $ac_n "(cached) $ac_c" 1>&6 | |
f91abfce | 4347 | else |
093e61a6 RS |
4348 | |
4349 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4350 | #line 4351 "configure" |
093e61a6 | 4351 | #include "confdefs.h" |
f91abfce TT |
4352 | |
4353 | #include <stdlib.h> | |
4354 | #include <iconv.h> | |
4355 | extern | |
4356 | #ifdef __cplusplus | |
4357 | "C" | |
4358 | #endif | |
4359 | #if defined(__STDC__) || defined(__cplusplus) | |
4360 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
4361 | #else | |
4362 | size_t iconv(); | |
4363 | #endif | |
4364 | ||
093e61a6 | 4365 | int main() { |
f91abfce | 4366 | |
093e61a6 RS |
4367 | ; return 0; } |
4368 | EOF | |
7468e0b5 | 4369 | if { (eval echo configure:4370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4370 | rm -rf conftest* |
f91abfce TT |
4371 | am_cv_proto_iconv_arg1="" |
4372 | else | |
093e61a6 RS |
4373 | echo "configure: failed program was:" >&5 |
4374 | cat conftest.$ac_ext >&5 | |
4375 | rm -rf conftest* | |
4376 | am_cv_proto_iconv_arg1="const" | |
f91abfce | 4377 | fi |
093e61a6 | 4378 | rm -f conftest* |
f91abfce TT |
4379 | 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);" |
4380 | fi | |
4381 | ||
4382 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
4383 | echo "$ac_t""${ac_t:- |
4384 | }$am_cv_proto_iconv" 1>&6 | |
4385 | cat >> confdefs.h <<EOF | |
f91abfce | 4386 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 4387 | EOF |
f91abfce TT |
4388 | |
4389 | fi | |
4390 | LIBICONV= | |
4391 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 4392 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
f91abfce | 4393 | fi |
093e61a6 | 4394 | |
f91abfce TT |
4395 | |
4396 | ||
86cf1cbd KG |
4397 | # We will need to find libiberty.h and ansidecl.h |
4398 | saved_CFLAGS="$CFLAGS" | |
4399 | CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" | |
8e944909 | 4400 | for ac_func in getenv atol sbrk abort atof getcwd getwd \ |
3b681e9d | 4401 | strsignal putc_unlocked fputs_unlocked fwrite_unlocked \ |
a7475ab1 | 4402 | fprintf_unlocked strstr errno vasprintf \ |
c1800ec8 | 4403 | malloc realloc calloc free basename getopt clock |
81bf3d9e | 4404 | do |
f31e826b | 4405 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4406 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
7468e0b5 | 4407 | echo "configure:4408: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4408 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4409 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4410 | else | |
4411 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4412 | #line 4413 "configure" |
093e61a6 | 4413 | #include "confdefs.h" |
7afe8c41 KG |
4414 | #undef $ac_tr_decl |
4415 | #define $ac_tr_decl 1 | |
093e61a6 | 4416 | |
d02af173 | 4417 | #include "ansidecl.h" |
86cf1cbd | 4418 | #include "system.h" |
f31e826b | 4419 | |
093e61a6 | 4420 | int main() { |
86cf1cbd KG |
4421 | #ifndef $ac_func |
4422 | char *(*pfn) = (char *(*)) $ac_func ; | |
4423 | #endif | |
093e61a6 RS |
4424 | ; return 0; } |
4425 | EOF | |
7468e0b5 | 4426 | if { (eval echo configure:4427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4427 | rm -rf conftest* |
f31e826b | 4428 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4429 | else |
093e61a6 RS |
4430 | echo "configure: failed program was:" >&5 |
4431 | cat conftest.$ac_ext >&5 | |
4432 | rm -rf conftest* | |
4433 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4434 | fi |
093e61a6 | 4435 | rm -f conftest* |
81bf3d9e RH |
4436 | fi |
4437 | ||
f31e826b | 4438 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4439 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4440 | #define $ac_tr_decl 1 |
093e61a6 RS |
4441 | EOF |
4442 | ||
81bf3d9e | 4443 | else |
093e61a6 | 4444 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4445 | #define $ac_tr_decl 0 |
093e61a6 RS |
4446 | EOF |
4447 | ||
81bf3d9e RH |
4448 | fi |
4449 | ||
4450 | done | |
86cf1cbd | 4451 | if test x = y ; then |
093e61a6 | 4452 | cat >> confdefs.h <<\EOF |
f31e826b | 4453 | #define HAVE_DECL_GETENV 1 |
093e61a6 RS |
4454 | EOF |
4455 | cat >> confdefs.h <<\EOF | |
f31e826b | 4456 | #define HAVE_DECL_ATOL 1 |
093e61a6 RS |
4457 | EOF |
4458 | cat >> confdefs.h <<\EOF | |
f31e826b | 4459 | #define HAVE_DECL_SBRK 1 |
093e61a6 RS |
4460 | EOF |
4461 | cat >> confdefs.h <<\EOF | |
f31e826b | 4462 | #define HAVE_DECL_ABORT 1 |
093e61a6 RS |
4463 | EOF |
4464 | cat >> confdefs.h <<\EOF | |
f31e826b | 4465 | #define HAVE_DECL_ATOF 1 |
093e61a6 RS |
4466 | EOF |
4467 | cat >> confdefs.h <<\EOF | |
f31e826b | 4468 | #define HAVE_DECL_GETCWD 1 |
093e61a6 RS |
4469 | EOF |
4470 | cat >> confdefs.h <<\EOF | |
f31e826b | 4471 | #define HAVE_DECL_GETWD 1 |
093e61a6 | 4472 | EOF |
86cf1cbd | 4473 | \ |
093e61a6 | 4474 | cat >> confdefs.h <<\EOF |
f31e826b | 4475 | #define HAVE_DECL_STRSIGNAL 1 |
093e61a6 RS |
4476 | EOF |
4477 | cat >> confdefs.h <<\EOF | |
f31e826b | 4478 | #define HAVE_DECL_PUTC_UNLOCKED 1 |
093e61a6 RS |
4479 | EOF |
4480 | cat >> confdefs.h <<\EOF | |
f31e826b | 4481 | #define HAVE_DECL_FPUTS_UNLOCKED 1 |
093e61a6 RS |
4482 | EOF |
4483 | cat >> confdefs.h <<\EOF | |
3b681e9d | 4484 | #define HAVE_DECL_FWRITE_UNLOCKED 1 |
093e61a6 | 4485 | EOF |
3b681e9d | 4486 | \ |
093e61a6 | 4487 | cat >> confdefs.h <<\EOF |
3b681e9d | 4488 | #define HAVE_DECL_FPRINTF_UNLOCKED 1 |
093e61a6 RS |
4489 | EOF |
4490 | cat >> confdefs.h <<\EOF | |
f31e826b | 4491 | #define HAVE_DECL_STRSTR 1 |
093e61a6 RS |
4492 | EOF |
4493 | cat >> confdefs.h <<\EOF | |
6c889b67 | 4494 | #define HAVE_DECL_ERRNO 1 |
093e61a6 RS |
4495 | EOF |
4496 | cat >> confdefs.h <<\EOF | |
a7475ab1 | 4497 | #define HAVE_DECL_VASPRINTF 1 |
093e61a6 | 4498 | EOF |
86cf1cbd | 4499 | \ |
093e61a6 | 4500 | cat >> confdefs.h <<\EOF |
f31e826b | 4501 | #define HAVE_DECL_MALLOC 1 |
093e61a6 RS |
4502 | EOF |
4503 | cat >> confdefs.h <<\EOF | |
f31e826b | 4504 | #define HAVE_DECL_REALLOC 1 |
093e61a6 RS |
4505 | EOF |
4506 | cat >> confdefs.h <<\EOF | |
f31e826b | 4507 | #define HAVE_DECL_CALLOC 1 |
093e61a6 RS |
4508 | EOF |
4509 | cat >> confdefs.h <<\EOF | |
f31e826b | 4510 | #define HAVE_DECL_FREE 1 |
093e61a6 RS |
4511 | EOF |
4512 | cat >> confdefs.h <<\EOF | |
f31e826b | 4513 | #define HAVE_DECL_BASENAME 1 |
093e61a6 RS |
4514 | EOF |
4515 | cat >> confdefs.h <<\EOF | |
f31e826b | 4516 | #define HAVE_DECL_GETOPT 1 |
093e61a6 RS |
4517 | EOF |
4518 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4519 | #define HAVE_DECL_CLOCK 1 |
093e61a6 | 4520 | EOF |
81bf3d9e RH |
4521 | fi |
4522 | ||
81bf3d9e RH |
4523 | |
4524 | for ac_func in getrlimit setrlimit getrusage | |
4525 | do | |
f31e826b | 4526 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
093e61a6 | 4527 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
7468e0b5 | 4528 | echo "configure:4529: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4529 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4530 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4531 | else | |
4532 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4533 | #line 4534 "configure" |
093e61a6 | 4534 | #include "confdefs.h" |
7afe8c41 KG |
4535 | #undef $ac_tr_decl |
4536 | #define $ac_tr_decl 1 | |
093e61a6 | 4537 | |
d02af173 | 4538 | #include "ansidecl.h" |
86cf1cbd | 4539 | #include "system.h" |
81bf3d9e RH |
4540 | #ifdef HAVE_SYS_RESOURCE_H |
4541 | #include <sys/resource.h> | |
4542 | #endif | |
4543 | ||
f31e826b | 4544 | |
093e61a6 | 4545 | int main() { |
86cf1cbd KG |
4546 | #ifndef $ac_func |
4547 | char *(*pfn) = (char *(*)) $ac_func ; | |
4548 | #endif | |
093e61a6 RS |
4549 | ; return 0; } |
4550 | EOF | |
7468e0b5 | 4551 | if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4552 | rm -rf conftest* |
f31e826b | 4553 | eval "gcc_cv_have_decl_$ac_func=yes" |
81bf3d9e | 4554 | else |
093e61a6 RS |
4555 | echo "configure: failed program was:" >&5 |
4556 | cat conftest.$ac_ext >&5 | |
4557 | rm -rf conftest* | |
4558 | eval "gcc_cv_have_decl_$ac_func=no" | |
81bf3d9e | 4559 | fi |
093e61a6 | 4560 | rm -f conftest* |
81bf3d9e RH |
4561 | fi |
4562 | ||
f31e826b | 4563 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then |
093e61a6 | 4564 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
86cf1cbd | 4565 | #define $ac_tr_decl 1 |
093e61a6 RS |
4566 | EOF |
4567 | ||
81bf3d9e | 4568 | else |
093e61a6 | 4569 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
f31e826b | 4570 | #define $ac_tr_decl 0 |
093e61a6 RS |
4571 | EOF |
4572 | ||
81bf3d9e RH |
4573 | fi |
4574 | ||
4575 | done | |
86cf1cbd | 4576 | if test x = y ; then |
093e61a6 | 4577 | cat >> confdefs.h <<\EOF |
f31e826b | 4578 | #define HAVE_DECL_GETRLIMIT 1 |
093e61a6 RS |
4579 | EOF |
4580 | cat >> confdefs.h <<\EOF | |
f31e826b | 4581 | #define HAVE_DECL_SETRLIMIT 1 |
093e61a6 RS |
4582 | EOF |
4583 | cat >> confdefs.h <<\EOF | |
f31e826b | 4584 | #define HAVE_DECL_GETRUSAGE 1 |
093e61a6 | 4585 | EOF |
86cf1cbd KG |
4586 | fi |
4587 | ||
81bf3d9e | 4588 | |
093e61a6 | 4589 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4590 | #line 4591 "configure" |
093e61a6 | 4591 | #include "confdefs.h" |
b2522d2b HPN |
4592 | |
4593 | #include "ansidecl.h" | |
4594 | #include "system.h" | |
4595 | #ifdef HAVE_SYS_RESOURCE_H | |
4596 | #include <sys/resource.h> | |
4597 | #endif | |
4598 | ||
093e61a6 | 4599 | int main() { |
b2522d2b | 4600 | rlim_t l = 0; |
093e61a6 RS |
4601 | ; return 0; } |
4602 | EOF | |
7468e0b5 | 4603 | if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
b2522d2b HPN |
4604 | : |
4605 | else | |
093e61a6 RS |
4606 | echo "configure: failed program was:" >&5 |
4607 | cat conftest.$ac_ext >&5 | |
4608 | rm -rf conftest* | |
4609 | cat >> confdefs.h <<\EOF | |
b2522d2b | 4610 | #define rlim_t long |
093e61a6 | 4611 | EOF |
b2522d2b HPN |
4612 | |
4613 | fi | |
093e61a6 | 4614 | rm -f conftest* |
b2522d2b | 4615 | |
351df804 | 4616 | for ac_func in ldgetname |
c1800ec8 ZW |
4617 | do |
4618 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4619 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
7468e0b5 | 4620 | echo "configure:4621: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4621 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4622 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4623 | else | |
4624 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4625 | #line 4626 "configure" |
093e61a6 | 4626 | #include "confdefs.h" |
c1800ec8 ZW |
4627 | #undef $ac_tr_decl |
4628 | #define $ac_tr_decl 1 | |
093e61a6 | 4629 | |
351df804 KG |
4630 | #include "ansidecl.h" |
4631 | #include "system.h" | |
4632 | #ifdef HAVE_LDFCN_H | |
4633 | #include <ldfcn.h> | |
4634 | #endif | |
4635 | ||
4636 | ||
093e61a6 | 4637 | int main() { |
351df804 KG |
4638 | #ifndef $ac_func |
4639 | char *(*pfn) = (char *(*)) $ac_func ; | |
4640 | #endif | |
093e61a6 RS |
4641 | ; return 0; } |
4642 | EOF | |
7468e0b5 | 4643 | if { (eval echo configure:4644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4644 | rm -rf conftest* |
351df804 KG |
4645 | eval "gcc_cv_have_decl_$ac_func=yes" |
4646 | else | |
093e61a6 RS |
4647 | echo "configure: failed program was:" >&5 |
4648 | cat conftest.$ac_ext >&5 | |
4649 | rm -rf conftest* | |
4650 | eval "gcc_cv_have_decl_$ac_func=no" | |
351df804 | 4651 | fi |
093e61a6 | 4652 | rm -f conftest* |
351df804 KG |
4653 | fi |
4654 | ||
4655 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4656 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4657 | #define $ac_tr_decl 1 |
093e61a6 RS |
4658 | EOF |
4659 | ||
351df804 | 4660 | else |
093e61a6 | 4661 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
351df804 | 4662 | #define $ac_tr_decl 0 |
093e61a6 RS |
4663 | EOF |
4664 | ||
351df804 KG |
4665 | fi |
4666 | ||
4667 | done | |
4668 | if test x = y ; then | |
093e61a6 | 4669 | cat >> confdefs.h <<\EOF |
351df804 | 4670 | #define HAVE_DECL_LDGETNAME 1 |
093e61a6 | 4671 | EOF |
351df804 KG |
4672 | fi |
4673 | ||
4674 | ||
4675 | for ac_func in times | |
4676 | do | |
4677 | ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
093e61a6 | 4678 | echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6 |
7468e0b5 | 4679 | echo "configure:4680: checking whether $ac_func is declared" >&5 |
093e61a6 RS |
4680 | if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then |
4681 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4682 | else | |
4683 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4684 | #line 4685 "configure" |
093e61a6 | 4685 | #include "confdefs.h" |
351df804 KG |
4686 | #undef $ac_tr_decl |
4687 | #define $ac_tr_decl 1 | |
093e61a6 | 4688 | |
c1800ec8 ZW |
4689 | #include "ansidecl.h" |
4690 | #include "system.h" | |
4691 | #ifdef HAVE_SYS_TIMES_H | |
4692 | #include <sys/times.h> | |
4693 | #endif | |
4694 | ||
4695 | ||
093e61a6 | 4696 | int main() { |
c1800ec8 ZW |
4697 | #ifndef $ac_func |
4698 | char *(*pfn) = (char *(*)) $ac_func ; | |
4699 | #endif | |
093e61a6 RS |
4700 | ; return 0; } |
4701 | EOF | |
7468e0b5 | 4702 | if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4703 | rm -rf conftest* |
c1800ec8 ZW |
4704 | eval "gcc_cv_have_decl_$ac_func=yes" |
4705 | else | |
093e61a6 RS |
4706 | echo "configure: failed program was:" >&5 |
4707 | cat conftest.$ac_ext >&5 | |
4708 | rm -rf conftest* | |
4709 | eval "gcc_cv_have_decl_$ac_func=no" | |
c1800ec8 | 4710 | fi |
093e61a6 | 4711 | rm -f conftest* |
c1800ec8 ZW |
4712 | fi |
4713 | ||
4714 | if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then | |
093e61a6 | 4715 | echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4716 | #define $ac_tr_decl 1 |
093e61a6 RS |
4717 | EOF |
4718 | ||
c1800ec8 | 4719 | else |
093e61a6 | 4720 | echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF |
c1800ec8 | 4721 | #define $ac_tr_decl 0 |
093e61a6 RS |
4722 | EOF |
4723 | ||
c1800ec8 ZW |
4724 | fi |
4725 | ||
4726 | done | |
4727 | if test x = y ; then | |
093e61a6 | 4728 | cat >> confdefs.h <<\EOF |
c1800ec8 | 4729 | #define HAVE_DECL_TIMES 1 |
093e61a6 | 4730 | EOF |
c1800ec8 ZW |
4731 | fi |
4732 | ||
4733 | ||
4734 | # More time-related stuff. | |
093e61a6 | 4735 | echo $ac_n "checking for struct tms""... $ac_c" 1>&6 |
7468e0b5 | 4736 | echo "configure:4737: checking for struct tms" >&5 |
093e61a6 RS |
4737 | if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then |
4738 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4739 | else | |
4740 | ||
4741 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4742 | #line 4743 "configure" |
093e61a6 | 4743 | #include "confdefs.h" |
c1800ec8 ZW |
4744 | |
4745 | #include "ansidecl.h" | |
4746 | #include "system.h" | |
4747 | #ifdef HAVE_SYS_TIMES_H | |
4748 | #include <sys/times.h> | |
4749 | #endif | |
4750 | ||
093e61a6 | 4751 | int main() { |
c1800ec8 | 4752 | struct tms tms; |
093e61a6 RS |
4753 | ; return 0; } |
4754 | EOF | |
7468e0b5 | 4755 | if { (eval echo configure:4756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4756 | rm -rf conftest* |
c1800ec8 ZW |
4757 | ac_cv_struct_tms=yes |
4758 | else | |
093e61a6 RS |
4759 | echo "configure: failed program was:" >&5 |
4760 | cat conftest.$ac_ext >&5 | |
4761 | rm -rf conftest* | |
4762 | ac_cv_struct_tms=no | |
c1800ec8 | 4763 | fi |
093e61a6 | 4764 | rm -f conftest* |
c1800ec8 | 4765 | fi |
cafe096b | 4766 | |
093e61a6 RS |
4767 | echo "$ac_t""$ac_cv_struct_tms" 1>&6 |
4768 | if test $ac_cv_struct_tms = yes; then | |
4769 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4770 | #define HAVE_STRUCT_TMS 1 |
093e61a6 | 4771 | EOF |
c1800ec8 ZW |
4772 | |
4773 | fi | |
4774 | ||
4775 | # use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE. | |
4776 | # revisit after autoconf 2.50. | |
093e61a6 | 4777 | echo $ac_n "checking for clock_t""... $ac_c" 1>&6 |
7468e0b5 | 4778 | echo "configure:4779: checking for clock_t" >&5 |
093e61a6 RS |
4779 | if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then |
4780 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4781 | else | |
4782 | ||
4783 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 4784 | #line 4785 "configure" |
093e61a6 | 4785 | #include "confdefs.h" |
c1800ec8 ZW |
4786 | |
4787 | #include "ansidecl.h" | |
4788 | #include "system.h" | |
4789 | ||
093e61a6 | 4790 | int main() { |
c1800ec8 | 4791 | clock_t x; |
093e61a6 RS |
4792 | ; return 0; } |
4793 | EOF | |
7468e0b5 | 4794 | if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4795 | rm -rf conftest* |
c1800ec8 ZW |
4796 | gcc_cv_type_clock_t=yes |
4797 | else | |
093e61a6 RS |
4798 | echo "configure: failed program was:" >&5 |
4799 | cat conftest.$ac_ext >&5 | |
4800 | rm -rf conftest* | |
4801 | gcc_cv_type_clock_t=no | |
c1800ec8 | 4802 | fi |
093e61a6 | 4803 | rm -f conftest* |
c1800ec8 | 4804 | fi |
cafe096b | 4805 | |
093e61a6 RS |
4806 | echo "$ac_t""$gcc_cv_type_clock_t" 1>&6 |
4807 | if test $gcc_cv_type_clock_t = yes; then | |
4808 | cat >> confdefs.h <<\EOF | |
c1800ec8 | 4809 | #define HAVE_CLOCK_T 1 |
093e61a6 | 4810 | EOF |
c1800ec8 ZW |
4811 | |
4812 | fi | |
4813 | ||
093e61a6 | 4814 | echo $ac_n "checking for uchar""... $ac_c" 1>&6 |
7468e0b5 | 4815 | echo "configure:4816: checking for uchar" >&5 |
093e61a6 RS |
4816 | if eval "test \"`echo '$''{'gcc_cv_type_uchar'+set}'`\" = set"; then |
4817 | echo $ac_n "(cached) $ac_c" 1>&6 | |
a12b5bd9 | 4818 | else |
093e61a6 | 4819 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4820 | #line 4821 "configure" |
093e61a6 | 4821 | #include "confdefs.h" |
a12b5bd9 ZW |
4822 | |
4823 | #include "ansidecl.h" | |
4824 | #include "system.h" | |
4825 | ||
093e61a6 | 4826 | int main() { |
a12b5bd9 ZW |
4827 | if ((uchar *)0) return 0; |
4828 | if (sizeof(uchar)) return 0; | |
093e61a6 RS |
4829 | ; return 0; } |
4830 | EOF | |
7468e0b5 | 4831 | if { (eval echo configure:4832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4832 | rm -rf conftest* |
a12b5bd9 ZW |
4833 | ac_cv_type_uchar=yes |
4834 | else | |
093e61a6 RS |
4835 | echo "configure: failed program was:" >&5 |
4836 | cat conftest.$ac_ext >&5 | |
4837 | rm -rf conftest* | |
4838 | ac_cv_type_uchar=no | |
a12b5bd9 | 4839 | fi |
093e61a6 | 4840 | rm -f conftest* |
a12b5bd9 | 4841 | fi |
cafe096b | 4842 | |
093e61a6 RS |
4843 | echo "$ac_t""$gcc_cv_type_uchar" 1>&6 |
4844 | if test $ac_cv_type_uchar = yes; then | |
4845 | cat >> confdefs.h <<\EOF | |
a12b5bd9 | 4846 | #define HAVE_UCHAR 1 |
093e61a6 | 4847 | EOF |
a12b5bd9 ZW |
4848 | |
4849 | fi | |
4850 | ||
eb70d86d AS |
4851 | # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests. |
4852 | CFLAGS="$saved_CFLAGS" | |
4853 | ||
07cf4226 DM |
4854 | # Check whether --enable-initfini-array or --disable-initfini-array was given. |
4855 | if test "${enable_initfini_array+set}" = set; then | |
4856 | enableval="$enable_initfini_array" | |
093e61a6 | 4857 | : |
07cf4226 | 4858 | else |
093e61a6 RS |
4859 | |
4860 | echo $ac_n "checking for .preinit_array/.init_array/.fini_array support""... $ac_c" 1>&6 | |
7468e0b5 | 4861 | echo "configure:4862: checking for .preinit_array/.init_array/.fini_array support" >&5 |
093e61a6 RS |
4862 | if eval "test \"`echo '$''{'gcc_cv_initfini_array'+set}'`\" = set"; then |
4863 | echo $ac_n "(cached) $ac_c" 1>&6 | |
07cf4226 | 4864 | else |
eb70d86d | 4865 | if test "$cross_compiling" = yes; then |
918c4fe4 | 4866 | gcc_cv_initfini_array=no |
eb70d86d | 4867 | else |
093e61a6 | 4868 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4869 | #line 4870 "configure" |
093e61a6 | 4870 | #include "confdefs.h" |
eb70d86d | 4871 | |
07cf4226 DM |
4872 | static int x = -1; |
4873 | int main (void) { return x; } | |
4874 | int foo (void) { x = 0; } | |
4875 | int (*fp) (void) __attribute__ ((section (".init_array"))) = foo; | |
093e61a6 | 4876 | EOF |
7468e0b5 | 4877 | if { (eval echo configure:4878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 4878 | then |
918c4fe4 | 4879 | gcc_cv_initfini_array=yes |
eb70d86d | 4880 | else |
093e61a6 RS |
4881 | echo "configure: failed program was:" >&5 |
4882 | cat conftest.$ac_ext >&5 | |
4883 | rm -fr conftest* | |
4884 | gcc_cv_initfini_array=no | |
eb70d86d | 4885 | fi |
093e61a6 | 4886 | rm -fr conftest* |
eb70d86d | 4887 | fi |
093e61a6 | 4888 | |
07cf4226 | 4889 | fi |
093e61a6 RS |
4890 | |
4891 | echo "$ac_t""$gcc_cv_initfini_array" 1>&6 | |
eb70d86d | 4892 | enable_initfini_array=$gcc_cv_initfini_array |
07cf4226 | 4893 | |
093e61a6 | 4894 | fi |
cafe096b | 4895 | |
093e61a6 RS |
4896 | if test $enable_initfini_array = yes; then |
4897 | cat >> confdefs.h <<\EOF | |
eb70d86d | 4898 | #define HAVE_INITFINI_ARRAY 1 |
093e61a6 | 4899 | EOF |
07cf4226 | 4900 | |
eb70d86d | 4901 | fi |
81bf3d9e | 4902 | |
093e61a6 RS |
4903 | # mkdir takes a single argument on some systems. |
4904 | echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6 | |
7468e0b5 | 4905 | echo "configure:4906: checking if mkdir takes one argument" >&5 |
093e61a6 RS |
4906 | if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then |
4907 | echo $ac_n "(cached) $ac_c" 1>&6 | |
75923b2f | 4908 | else |
093e61a6 | 4909 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4910 | #line 4911 "configure" |
093e61a6 | 4911 | #include "confdefs.h" |
75923b2f MK |
4912 | |
4913 | #include <sys/types.h> | |
4914 | #ifdef HAVE_SYS_STAT_H | |
4915 | # include <sys/stat.h> | |
4916 | #endif | |
4917 | #ifdef HAVE_UNISTD_H | |
4918 | # include <unistd.h> | |
4919 | #endif | |
4920 | #ifdef HAVE_DIRECT_H | |
4921 | # include <direct.h> | |
4922 | #endif | |
093e61a6 | 4923 | int main() { |
75923b2f | 4924 | mkdir ("foo", 0); |
093e61a6 RS |
4925 | ; return 0; } |
4926 | EOF | |
7468e0b5 | 4927 | if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 4928 | rm -rf conftest* |
75923b2f MK |
4929 | gcc_cv_mkdir_takes_one_arg=no |
4930 | else | |
093e61a6 RS |
4931 | echo "configure: failed program was:" >&5 |
4932 | cat conftest.$ac_ext >&5 | |
4933 | rm -rf conftest* | |
4934 | gcc_cv_mkdir_takes_one_arg=yes | |
75923b2f | 4935 | fi |
093e61a6 | 4936 | rm -f conftest* |
75923b2f | 4937 | fi |
cafe096b | 4938 | |
093e61a6 RS |
4939 | echo "$ac_t""$gcc_cv_mkdir_takes_one_arg" 1>&6 |
4940 | if test $gcc_cv_mkdir_takes_one_arg = yes ; then | |
4941 | cat >> confdefs.h <<\EOF | |
75923b2f | 4942 | #define MKDIR_TAKES_ONE_ARG 1 |
093e61a6 | 4943 | EOF |
75923b2f MK |
4944 | |
4945 | fi | |
4946 | ||
4947 | ||
861bb6c1 JL |
4948 | # File extensions |
4949 | manext='.1' | |
4950 | objext='.o' | |
4951 | ||
4952 | ||
4953 | ||
4977bab6 ZW |
4954 | # With Setjmp/Longjmp based exception handling. |
4955 | # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given. | |
4956 | if test "${enable_sjlj_exceptions+set}" = set; then | |
4957 | enableval="$enable_sjlj_exceptions" | |
4958 | sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi` | |
093e61a6 | 4959 | cat >> confdefs.h <<EOF |
cafe096b | 4960 | #define CONFIG_SJLJ_EXCEPTIONS $sjlj |
093e61a6 RS |
4961 | EOF |
4962 | ||
4963 | fi | |
4977bab6 ZW |
4964 | |
4965 | ||
093e61a6 | 4966 | echo $ac_n "checking for main in -lunwind""... $ac_c" 1>&6 |
7468e0b5 | 4967 | echo "configure:4968: checking for main in -lunwind" >&5 |
093e61a6 RS |
4968 | ac_lib_var=`echo unwind'_'main | sed 'y%./+-%__p_%'` |
4969 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4970 | echo $ac_n "(cached) $ac_c" 1>&6 | |
4977bab6 | 4971 | else |
093e61a6 | 4972 | ac_save_LIBS="$LIBS" |
4977bab6 | 4973 | LIBS="-lunwind $LIBS" |
093e61a6 | 4974 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 4975 | #line 4976 "configure" |
093e61a6 | 4976 | #include "confdefs.h" |
4977bab6 | 4977 | |
093e61a6 RS |
4978 | int main() { |
4979 | main() | |
4980 | ; return 0; } | |
4981 | EOF | |
7468e0b5 | 4982 | if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
4983 | rm -rf conftest* |
4984 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4985 | else | |
4986 | echo "configure: failed program was:" >&5 | |
4987 | cat conftest.$ac_ext >&5 | |
4988 | rm -rf conftest* | |
4989 | eval "ac_cv_lib_$ac_lib_var=no" | |
4990 | fi | |
4991 | rm -f conftest* | |
4992 | LIBS="$ac_save_LIBS" | |
4977bab6 | 4993 | |
093e61a6 RS |
4994 | fi |
4995 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4996 | echo "$ac_t""yes" 1>&6 | |
4977bab6 ZW |
4997 | use_libunwind_default=yes |
4998 | else | |
093e61a6 RS |
4999 | echo "$ac_t""no" 1>&6 |
5000 | use_libunwind_default=no | |
4977bab6 ZW |
5001 | fi |
5002 | ||
5003 | # Use libunwind based exception handling. | |
5004 | # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given. | |
5005 | if test "${enable_libunwind_exceptions+set}" = set; then | |
5006 | enableval="$enable_libunwind_exceptions" | |
5007 | use_libunwind_exceptions=$enableval | |
5008 | else | |
5009 | use_libunwind_exceptions=$use_libunwind_default | |
093e61a6 | 5010 | fi |
cafe096b | 5011 | |
093e61a6 RS |
5012 | if test x"$use_libunwind_exceptions" = xyes; then |
5013 | cat >> confdefs.h <<\EOF | |
4977bab6 | 5014 | #define USE_LIBUNWIND_EXCEPTIONS 1 |
093e61a6 | 5015 | EOF |
4977bab6 ZW |
5016 | |
5017 | fi | |
5018 | ||
34a86c2b NN |
5019 | # -------------------------------------------------------- |
5020 | # Build, host, and target specific configuration fragments | |
5021 | # -------------------------------------------------------- | |
5022 | ||
ef69da62 | 5023 | target_gtfiles= |
861bb6c1 | 5024 | build_xm_file= |
f6cb0e63 | 5025 | build_xm_defines= |
861bb6c1 JL |
5026 | build_install_headers_dir=install-headers-tar |
5027 | build_exeext= | |
5028 | host_xm_file= | |
f6cb0e63 | 5029 | host_xm_defines= |
861bb6c1 | 5030 | host_xmake_file= |
6e26218f | 5031 | host_exeext= |
861bb6c1 JL |
5032 | |
5033 | # Decode the host machine, then the target machine. | |
5034 | # For the host machine, we save the xm_file variable as host_xm_file; | |
5035 | # then we decode the target machine and forget everything else | |
5036 | # that came from the host machine. | |
5037 | for machine in $build $host $target; do | |
61ed06c3 | 5038 | . ${srcdir}/config.gcc |
861bb6c1 JL |
5039 | done |
5040 | ||
5041 | extra_objs="${host_extra_objs} ${extra_objs}" | |
5042 | ||
5043 | # Default the target-machine variables that were not explicitly set. | |
75bffa71 | 5044 | if test x"$tm_file" = x |
861bb6c1 JL |
5045 | then tm_file=$cpu_type/$cpu_type.h; fi |
5046 | ||
6b2adea9 | 5047 | if test x"$extra_headers" = x |
861bb6c1 JL |
5048 | then extra_headers=; fi |
5049 | ||
75bffa71 | 5050 | if test x$md_file = x |
e98e406f | 5051 | then md_file=$cpu_type/$cpu_type.md; fi |
861bb6c1 | 5052 | |
75bffa71 | 5053 | if test x$out_file = x |
861bb6c1 JL |
5054 | then out_file=$cpu_type/$cpu_type.c; fi |
5055 | ||
75bffa71 | 5056 | if test x"$tmake_file" = x |
861bb6c1 JL |
5057 | then tmake_file=$cpu_type/t-$cpu_type |
5058 | fi | |
5059 | ||
90e6a802 | 5060 | if test x"$dwarf2" = xyes |
756ee602 | 5061 | then tm_file="$tm_file tm-dwarf2.h" |
90e6a802 RL |
5062 | fi |
5063 | ||
861bb6c1 | 5064 | # Say what files are being used for the output code and MD file. |
11642c3a | 5065 | echo "Using \`$srcdir/config/$out_file' for machine-specific logic." |
861bb6c1 JL |
5066 | echo "Using \`$srcdir/config/$md_file' as machine description file." |
5067 | ||
11642c3a | 5068 | # If any of the xm_file variables contain nonexistent files, warn |
4dc0535b ZW |
5069 | # about them and drop them. |
5070 | ||
11642c3a ZW |
5071 | bx= |
5072 | for x in $build_xm_file; do | |
5073 | if test -f $srcdir/config/$x | |
5074 | then bx="$bx $x" | |
093e61a6 | 5075 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5076 | fi |
5077 | done | |
5078 | build_xm_file="$bx" | |
5079 | ||
5080 | hx= | |
5081 | for x in $host_xm_file; do | |
5082 | if test -f $srcdir/config/$x | |
5083 | then hx="$hx $x" | |
093e61a6 | 5084 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5085 | fi |
5086 | done | |
5087 | host_xm_file="$hx" | |
5088 | ||
5089 | tx= | |
5090 | for x in $xm_file; do | |
5091 | if test -f $srcdir/config/$x | |
5092 | then tx="$tx $x" | |
093e61a6 | 5093 | else echo "configure: warning: $srcdir/config/$x does not exist." 1>&2 |
11642c3a ZW |
5094 | fi |
5095 | done | |
5096 | xm_file="$tx" | |
5097 | ||
861bb6c1 JL |
5098 | count=a |
5099 | for f in $tm_file; do | |
5100 | count=${count}x | |
5101 | done | |
75bffa71 | 5102 | if test $count = ax; then |
861bb6c1 JL |
5103 | echo "Using \`$srcdir/config/$tm_file' as target machine macro file." |
5104 | else | |
5105 | echo "Using the following target machine macro files:" | |
5106 | for f in $tm_file; do | |
5107 | echo " $srcdir/config/$f" | |
5108 | done | |
5109 | fi | |
5110 | ||
4977bab6 | 5111 | if test x$need_64bit_hwint = xyes; then |
093e61a6 | 5112 | cat >> confdefs.h <<\EOF |
4977bab6 | 5113 | #define NEED_64BIT_HOST_WIDE_INT 1 |
093e61a6 | 5114 | EOF |
4977bab6 ZW |
5115 | |
5116 | fi | |
5117 | ||
861bb6c1 JL |
5118 | count=a |
5119 | for f in $host_xm_file; do | |
5120 | count=${count}x | |
5121 | done | |
11642c3a ZW |
5122 | if test $count = a; then |
5123 | : | |
5124 | elif test $count = ax; then | |
861bb6c1 JL |
5125 | echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file." |
5126 | else | |
5127 | echo "Using the following host machine macro files:" | |
5128 | for f in $host_xm_file; do | |
5129 | echo " $srcdir/config/$f" | |
5130 | done | |
5131 | fi | |
476d9098 | 5132 | echo "Using ${out_host_hook_obj} for host machine hooks." |
861bb6c1 | 5133 | |
75bffa71 | 5134 | if test "$host_xm_file" != "$build_xm_file"; then |
861bb6c1 JL |
5135 | count=a |
5136 | for f in $build_xm_file; do | |
5137 | count=${count}x | |
5138 | done | |
11642c3a ZW |
5139 | if test $count = a; then |
5140 | : | |
5141 | elif test $count = ax; then | |
861bb6c1 JL |
5142 | echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file." |
5143 | else | |
5144 | echo "Using the following build machine macro files:" | |
5145 | for f in $build_xm_file; do | |
5146 | echo " $srcdir/config/$f" | |
5147 | done | |
5148 | fi | |
5149 | fi | |
5150 | ||
75bffa71 ILT |
5151 | if test x$thread_file = x; then |
5152 | if test x$target_thread_file != x; then | |
a851212a JW |
5153 | thread_file=$target_thread_file |
5154 | else | |
5155 | thread_file='single' | |
5156 | fi | |
861bb6c1 JL |
5157 | fi |
5158 | ||
2121a768 JT |
5159 | if test x$enable___cxa_atexit = xyes || \ |
5160 | test x$enable___cxa_atexit = x -a x$default_use_cxa_atexit = xyes; then | |
5161 | cat >> confdefs.h <<\EOF | |
5162 | #define DEFAULT_USE_CXA_ATEXIT 1 | |
5163 | EOF | |
5164 | ||
5165 | fi | |
5166 | ||
a5381466 | 5167 | # Look for a file containing extra machine modes. |
1c0ca89d ZW |
5168 | if test -n "$extra_modes" && test -f $srcdir/config/$extra_modes; then |
5169 | extra_modes_file='$(srcdir)'/config/${extra_modes} | |
093e61a6 RS |
5170 | |
5171 | cat >> confdefs.h <<EOF | |
1c0ca89d | 5172 | #define EXTRA_MODES_FILE "$extra_modes" |
093e61a6 | 5173 | EOF |
cafe096b | 5174 | |
093e61a6 | 5175 | cat >> confdefs.h <<\EOF |
a5381466 | 5176 | #define EXTRA_CC_MODES 1 |
093e61a6 | 5177 | EOF |
a5381466 ZW |
5178 | |
5179 | fi | |
5180 | ||
b7cb92ad | 5181 | # auto-host.h is the file containing items generated by autoconf and is |
e9a25f70 | 5182 | # the first file included by config.h. |
4977bab6 | 5183 | # If host=build, it is correct to have bconfig include auto-host.h |
093e61a6 | 5184 | # as well. If host!=build, we are in error and need to do more |
db81d74a | 5185 | # work to find out the build config parameters. |
75bffa71 | 5186 | if test x$host = x$build |
db81d74a | 5187 | then |
eaf4e618 | 5188 | build_auto=auto-host.h |
06f0b04c | 5189 | FORBUILD=.. |
b7cb92ad JL |
5190 | else |
5191 | # We create a subdir, then run autoconf in the subdir. | |
5192 | # To prevent recursion we set host and build for the new | |
5193 | # invocation of configure to the build for this invocation | |
093e61a6 | 5194 | # of configure. |
b7cb92ad JL |
5195 | tempdir=build.$$ |
5196 | rm -rf $tempdir | |
5197 | mkdir $tempdir | |
5198 | cd $tempdir | |
5199 | case ${srcdir} in | |
255b8a49 | 5200 | /* | A-Za-z:\\/* ) realsrcdir=${srcdir};; |
b7cb92ad JL |
5201 | *) realsrcdir=../${srcdir};; |
5202 | esac | |
d920e825 L |
5203 | saved_CFLAGS="${CFLAGS}" |
5204 | CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ | |
5205 | ${realsrcdir}/configure \ | |
534d0cc0 | 5206 | --target=$target_alias --host=$build_alias --build=$build_alias |
d920e825 | 5207 | CFLAGS="${saved_CFLAGS}" |
b7cb92ad JL |
5208 | |
5209 | # We just finished tests for the build machine, so rename | |
5210 | # the file auto-build.h in the gcc directory. | |
5211 | mv auto-host.h ../auto-build.h | |
5212 | cd .. | |
5213 | rm -rf $tempdir | |
eaf4e618 | 5214 | build_auto=auto-build.h |
3b1b059c | 5215 | FORBUILD=../${build_subdir} |
db81d74a RH |
5216 | fi |
5217 | ||
06f0b04c | 5218 | |
eaf4e618 | 5219 | tm_file="${tm_file} defaults.h" |
4977bab6 ZW |
5220 | tm_p_file="${tm_p_file} tm-preds.h" |
5221 | host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" | |
5222 | build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" | |
49691411 | 5223 | # We don't want ansidecl.h in target files, write code there in ISO/GNU C. |
b4862477 KG |
5224 | # put this back in temporarily. |
5225 | xm_file="ansidecl.h ${xm_file}" | |
0056a9b5 | 5226 | |
34a86c2b NN |
5227 | # -------- |
5228 | # UNSORTED | |
5229 | # -------- | |
5230 | ||
f1943b77 | 5231 | # Get the version trigger filename from the toplevel |
75bffa71 | 5232 | if test "${with_gcc_version_trigger+set}" = set; then |
f1943b77 MH |
5233 | gcc_version_trigger=$with_gcc_version_trigger |
5234 | else | |
5235 | gcc_version_trigger=${srcdir}/version.c | |
5236 | fi | |
022dae81 | 5237 | gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'` |
8763704d | 5238 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` |
861bb6c1 | 5239 | |
cc1e60ea | 5240 | # Compile in configure arguments. |
8105825d | 5241 | if test -f configargs.h ; then |
cc1e60ea | 5242 | # Being re-configured. |
022dae81 | 5243 | gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'` |
cc1e60ea JM |
5244 | gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" |
5245 | else | |
5246 | gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS" | |
5247 | fi | |
5248 | cat > configargs.h <<EOF | |
5249 | /* Generated automatically. */ | |
5250 | static const char configuration_arguments[] = "$gcc_config_arguments"; | |
a6687d2b | 5251 | static const char thread_model[] = "$thread_file"; |
7816bea0 DJ |
5252 | |
5253 | static const struct { | |
5254 | const char *name, *value; | |
5255 | } configure_default_options[] = $configure_default_options; | |
cc1e60ea JM |
5256 | EOF |
5257 | ||
ab87f8c8 JL |
5258 | # Internationalization |
5259 | PACKAGE=gcc | |
5260 | VERSION="$gcc_version" | |
861bb6c1 | 5261 | |
ab87f8c8 JL |
5262 | |
5263 | ||
dc6746e7 | 5264 | # Enable NLS support by default |
ab87f8c8 JL |
5265 | # Check whether --enable-nls or --disable-nls was given. |
5266 | if test "${enable_nls+set}" = set; then | |
5267 | enableval="$enable_nls" | |
093e61a6 | 5268 | : |
861bb6c1 | 5269 | else |
dc6746e7 | 5270 | enable_nls=yes |
093e61a6 RS |
5271 | fi |
5272 | ||
861bb6c1 | 5273 | |
dc6746e7 PT |
5274 | # if cross compiling, disable NLS support. |
5275 | # It's not worth the trouble, at least for now. | |
5276 | ||
063a4b85 | 5277 | if test "${build}" != "${host}" && test "x$enable_nls" = "xyes"; then |
093e61a6 | 5278 | echo "configure: warning: Disabling NLS support for canadian cross compiler." 1>&2 |
dc6746e7 PT |
5279 | enable_nls=no |
5280 | fi | |
5281 | ||
861bb6c1 | 5282 | |
093e61a6 RS |
5283 | |
5284 | echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6 | |
7468e0b5 | 5285 | echo "configure:5286: checking for library containing strerror" >&5 |
093e61a6 RS |
5286 | if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then |
5287 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5288 | else |
093e61a6 RS |
5289 | ac_func_search_save_LIBS="$LIBS" |
5290 | ac_cv_search_strerror="no" | |
5291 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5292 | #line 5293 "configure" |
093e61a6 | 5293 | #include "confdefs.h" |
ab87f8c8 JL |
5294 | /* Override any gcc2 internal prototype to avoid an error. */ |
5295 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5296 | builtin and then its argument prototype would still apply. */ |
5297 | char strerror(); | |
5298 | ||
5299 | int main() { | |
5300 | strerror() | |
5301 | ; return 0; } | |
5302 | EOF | |
7468e0b5 | 5303 | if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5304 | rm -rf conftest* |
71a94577 | 5305 | ac_cv_search_strerror="none required" |
ab87f8c8 | 5306 | else |
093e61a6 RS |
5307 | echo "configure: failed program was:" >&5 |
5308 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5309 | fi |
093e61a6 RS |
5310 | rm -f conftest* |
5311 | test "$ac_cv_search_strerror" = "no" && for i in cposix; do | |
5312 | LIBS="-l$i $ac_func_search_save_LIBS" | |
5313 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5314 | #line 5315 "configure" |
093e61a6 | 5315 | #include "confdefs.h" |
71a94577 ZW |
5316 | /* Override any gcc2 internal prototype to avoid an error. */ |
5317 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5318 | builtin and then its argument prototype would still apply. */ |
5319 | char strerror(); | |
5320 | ||
5321 | int main() { | |
5322 | strerror() | |
5323 | ; return 0; } | |
5324 | EOF | |
7468e0b5 | 5325 | if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5326 | rm -rf conftest* |
5327 | ac_cv_search_strerror="-l$i" | |
71a94577 | 5328 | break |
861bb6c1 | 5329 | else |
093e61a6 RS |
5330 | echo "configure: failed program was:" >&5 |
5331 | cat conftest.$ac_ext >&5 | |
861bb6c1 | 5332 | fi |
093e61a6 RS |
5333 | rm -f conftest* |
5334 | done | |
5335 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 5336 | fi |
cafe096b | 5337 | |
093e61a6 RS |
5338 | echo "$ac_t""$ac_cv_search_strerror" 1>&6 |
5339 | if test "$ac_cv_search_strerror" != "no"; then | |
5340 | test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" | |
5341 | ||
5342 | else : | |
5343 | ||
71a94577 | 5344 | fi |
093e61a6 | 5345 | |
2ce3c6c6 | 5346 | |
093e61a6 | 5347 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
7468e0b5 | 5348 | echo "configure:5349: checking for working const" >&5 |
093e61a6 RS |
5349 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
5350 | echo $ac_n "(cached) $ac_c" 1>&6 | |
861bb6c1 | 5351 | else |
093e61a6 | 5352 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5353 | #line 5354 "configure" |
093e61a6 | 5354 | #include "confdefs.h" |
ab87f8c8 | 5355 | |
093e61a6 RS |
5356 | int main() { |
5357 | ||
5358 | /* Ultrix mips cc rejects this. */ | |
5359 | typedef int charset[2]; const charset x; | |
5360 | /* SunOS 4.1.1 cc rejects this. */ | |
5361 | char const *const *ccp; | |
5362 | char **p; | |
5363 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
5364 | struct point {int x, y;}; | |
5365 | static struct point const zero = {0,0}; | |
5366 | /* AIX XL C 1.02.0.0 rejects this. | |
5367 | It does not let you subtract one const X* pointer from another in an arm | |
5368 | of an if-expression whose if-part is not a constant expression */ | |
5369 | const char *g = "string"; | |
5370 | ccp = &g + (g ? g-g : 0); | |
5371 | /* HPUX 7.0 cc rejects these. */ | |
5372 | ++ccp; | |
5373 | p = (char**) ccp; | |
5374 | ccp = (char const *const *) p; | |
5375 | { /* SCO 3.2v4 cc rejects this. */ | |
5376 | char *t; | |
5377 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
5378 | ||
5379 | *t++ = 0; | |
5380 | } | |
5381 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
5382 | int x[] = {25, 17}; | |
5383 | const int *foo = &x[0]; | |
5384 | ++foo; | |
5385 | } | |
5386 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
5387 | typedef const int *iptr; | |
5388 | iptr p = 0; | |
5389 | ++p; | |
cafe096b | 5390 | } |
093e61a6 RS |
5391 | { /* AIX XL C 1.02.0.0 rejects this saying |
5392 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
5393 | struct s { int j; const int *ap[3]; }; | |
5394 | struct s *b; b->j = 5; | |
5395 | } | |
5396 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
5397 | const int foo = 10; | |
5398 | } | |
5399 | ||
5400 | ; return 0; } | |
5401 | EOF | |
7468e0b5 | 5402 | if { (eval echo configure:5403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5403 | rm -rf conftest* |
ab87f8c8 | 5404 | ac_cv_c_const=yes |
861bb6c1 | 5405 | else |
093e61a6 RS |
5406 | echo "configure: failed program was:" >&5 |
5407 | cat conftest.$ac_ext >&5 | |
5408 | rm -rf conftest* | |
5409 | ac_cv_c_const=no | |
861bb6c1 | 5410 | fi |
093e61a6 | 5411 | rm -f conftest* |
861bb6c1 JL |
5412 | fi |
5413 | ||
093e61a6 RS |
5414 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
5415 | if test $ac_cv_c_const = no; then | |
5416 | cat >> confdefs.h <<\EOF | |
5417 | #define const | |
5418 | EOF | |
ab87f8c8 JL |
5419 | |
5420 | fi | |
093e61a6 RS |
5421 | |
5422 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
7468e0b5 | 5423 | echo "configure:5424: checking for off_t" >&5 |
093e61a6 RS |
5424 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
5425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5426 | else | |
5427 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5428 | #line 5429 "configure" |
093e61a6 RS |
5429 | #include "confdefs.h" |
5430 | #include <sys/types.h> | |
5431 | #if STDC_HEADERS | |
5432 | #include <stdlib.h> | |
5433 | #include <stddef.h> | |
5434 | #endif | |
5435 | EOF | |
5436 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5437 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5438 | rm -rf conftest* | |
5439 | ac_cv_type_off_t=yes | |
cafe096b | 5440 | else |
093e61a6 RS |
5441 | rm -rf conftest* |
5442 | ac_cv_type_off_t=no | |
5443 | fi | |
5444 | rm -f conftest* | |
cafe096b | 5445 | |
093e61a6 RS |
5446 | fi |
5447 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 | |
5448 | if test $ac_cv_type_off_t = no; then | |
5449 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5450 | #define off_t long |
093e61a6 | 5451 | EOF |
ab87f8c8 JL |
5452 | |
5453 | fi | |
5454 | ||
093e61a6 | 5455 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
7468e0b5 | 5456 | echo "configure:5457: checking for size_t" >&5 |
093e61a6 RS |
5457 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
5458 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5459 | else |
093e61a6 | 5460 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5461 | #line 5462 "configure" |
093e61a6 RS |
5462 | #include "confdefs.h" |
5463 | #include <sys/types.h> | |
5464 | #if STDC_HEADERS | |
5465 | #include <stdlib.h> | |
5466 | #include <stddef.h> | |
5467 | #endif | |
5468 | EOF | |
5469 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
5470 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
5471 | rm -rf conftest* | |
cb65112a | 5472 | ac_cv_type_size_t=yes |
ab87f8c8 | 5473 | else |
093e61a6 RS |
5474 | rm -rf conftest* |
5475 | ac_cv_type_size_t=no | |
ab87f8c8 | 5476 | fi |
093e61a6 | 5477 | rm -f conftest* |
cafe096b | 5478 | |
093e61a6 RS |
5479 | fi |
5480 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 | |
5481 | if test $ac_cv_type_size_t = no; then | |
5482 | cat >> confdefs.h <<\EOF | |
ab87f8c8 | 5483 | #define size_t unsigned |
093e61a6 | 5484 | EOF |
ab87f8c8 JL |
5485 | |
5486 | fi | |
5487 | ||
71a94577 ZW |
5488 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
5489 | # for constant arguments. Useless! | |
093e61a6 | 5490 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
7468e0b5 | 5491 | echo "configure:5492: checking for working alloca.h" >&5 |
093e61a6 RS |
5492 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
5493 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5494 | else | |
5495 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5496 | #line 5497 "configure" |
093e61a6 | 5497 | #include "confdefs.h" |
71a94577 | 5498 | #include <alloca.h> |
093e61a6 RS |
5499 | int main() { |
5500 | char *p = alloca(2 * sizeof(int)); | |
5501 | ; return 0; } | |
5502 | EOF | |
7468e0b5 | 5503 | if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5504 | rm -rf conftest* |
5505 | ac_cv_header_alloca_h=yes | |
5506 | else | |
5507 | echo "configure: failed program was:" >&5 | |
5508 | cat conftest.$ac_ext >&5 | |
5509 | rm -rf conftest* | |
5510 | ac_cv_header_alloca_h=no | |
5511 | fi | |
5512 | rm -f conftest* | |
5513 | fi | |
5514 | ||
5515 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
5516 | if test $ac_cv_header_alloca_h = yes; then | |
5517 | cat >> confdefs.h <<\EOF | |
71a94577 | 5518 | #define HAVE_ALLOCA_H 1 |
093e61a6 | 5519 | EOF |
71a94577 | 5520 | |
ab87f8c8 | 5521 | fi |
ab87f8c8 | 5522 | |
093e61a6 | 5523 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
7468e0b5 | 5524 | echo "configure:5525: checking for alloca" >&5 |
093e61a6 RS |
5525 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
5526 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5527 | else |
093e61a6 | 5528 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5529 | #line 5530 "configure" |
093e61a6 RS |
5530 | #include "confdefs.h" |
5531 | ||
71a94577 ZW |
5532 | #ifdef __GNUC__ |
5533 | # define alloca __builtin_alloca | |
ab87f8c8 | 5534 | #else |
71a94577 ZW |
5535 | # ifdef _MSC_VER |
5536 | # include <malloc.h> | |
5537 | # define alloca _alloca | |
5538 | # else | |
5539 | # if HAVE_ALLOCA_H | |
5540 | # include <alloca.h> | |
5541 | # else | |
5542 | # ifdef _AIX | |
5543 | #pragma alloca | |
5544 | # else | |
5545 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
5546 | char *alloca (); | |
5547 | # endif | |
5548 | # endif | |
5549 | # endif | |
5550 | # endif | |
ab87f8c8 JL |
5551 | #endif |
5552 | ||
093e61a6 RS |
5553 | int main() { |
5554 | char *p = (char *) alloca(1); | |
5555 | ; return 0; } | |
5556 | EOF | |
7468e0b5 | 5557 | if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5558 | rm -rf conftest* |
71a94577 | 5559 | ac_cv_func_alloca_works=yes |
ab87f8c8 | 5560 | else |
093e61a6 RS |
5561 | echo "configure: failed program was:" >&5 |
5562 | cat conftest.$ac_ext >&5 | |
5563 | rm -rf conftest* | |
5564 | ac_cv_func_alloca_works=no | |
ab87f8c8 | 5565 | fi |
093e61a6 | 5566 | rm -f conftest* |
ab87f8c8 JL |
5567 | fi |
5568 | ||
093e61a6 | 5569 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 |
71a94577 | 5570 | if test $ac_cv_func_alloca_works = yes; then |
093e61a6 | 5571 | cat >> confdefs.h <<\EOF |
cafe096b | 5572 | #define HAVE_ALLOCA 1 |
093e61a6 | 5573 | EOF |
cafe096b | 5574 | |
093e61a6 | 5575 | fi |
cafe096b | 5576 | |
093e61a6 RS |
5577 | if test $ac_cv_func_alloca_works = no; then |
5578 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
5579 | # that cause trouble. Some versions do not even contain alloca or | |
5580 | # contain a buggy version. If you still want to use their alloca, | |
5581 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
5582 | ALLOCA=alloca.${ac_objext} | |
5583 | cat >> confdefs.h <<\EOF | |
71a94577 | 5584 | #define C_ALLOCA 1 |
093e61a6 | 5585 | EOF |
71a94577 ZW |
5586 | |
5587 | ||
093e61a6 | 5588 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
7468e0b5 | 5589 | echo "configure:5590: checking whether alloca needs Cray hooks" >&5 |
093e61a6 RS |
5590 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
5591 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5592 | else |
093e61a6 | 5593 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5594 | #line 5595 "configure" |
093e61a6 | 5595 | #include "confdefs.h" |
71a94577 ZW |
5596 | #if defined(CRAY) && ! defined(CRAY2) |
5597 | webecray | |
5598 | #else | |
5599 | wenotbecray | |
5600 | #endif | |
5601 | ||
093e61a6 | 5602 | EOF |
71a94577 | 5603 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5604 | egrep "webecray" >/dev/null 2>&1; then |
5605 | rm -rf conftest* | |
71a94577 ZW |
5606 | ac_cv_os_cray=yes |
5607 | else | |
093e61a6 | 5608 | rm -rf conftest* |
71a94577 | 5609 | ac_cv_os_cray=no |
ab87f8c8 | 5610 | fi |
71a94577 | 5611 | rm -f conftest* |
ab87f8c8 | 5612 | |
71a94577 | 5613 | fi |
093e61a6 RS |
5614 | |
5615 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
71a94577 | 5616 | if test $ac_cv_os_cray = yes; then |
093e61a6 RS |
5617 | for ac_func in _getb67 GETB67 getb67; do |
5618 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
7468e0b5 | 5619 | echo "configure:5620: checking for $ac_func" >&5 |
093e61a6 RS |
5620 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5621 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5622 | else | |
5623 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5624 | #line 5625 "configure" |
093e61a6 | 5625 | #include "confdefs.h" |
ab87f8c8 | 5626 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5627 | which can conflict with char $ac_func(); below. */ |
5628 | #include <assert.h> | |
ab87f8c8 JL |
5629 | /* Override any gcc2 internal prototype to avoid an error. */ |
5630 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5631 | builtin and then its argument prototype would still apply. */ |
5632 | char $ac_func(); | |
5633 | ||
5634 | int main() { | |
5635 | ||
ab87f8c8 JL |
5636 | /* The GNU C library defines this for functions which it implements |
5637 | to always fail with ENOSYS. Some functions are actually named | |
5638 | something starting with __ and the normal name is an alias. */ | |
5639 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5640 | choke me | |
5641 | #else | |
093e61a6 | 5642 | $ac_func(); |
ab87f8c8 JL |
5643 | #endif |
5644 | ||
093e61a6 RS |
5645 | ; return 0; } |
5646 | EOF | |
7468e0b5 | 5647 | if { (eval echo configure:5648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5648 | rm -rf conftest* |
5649 | eval "ac_cv_func_$ac_func=yes" | |
5650 | else | |
5651 | echo "configure: failed program was:" >&5 | |
5652 | cat conftest.$ac_ext >&5 | |
5653 | rm -rf conftest* | |
5654 | eval "ac_cv_func_$ac_func=no" | |
5655 | fi | |
5656 | rm -f conftest* | |
5657 | fi | |
5658 | ||
5659 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5660 | echo "$ac_t""yes" 1>&6 | |
5661 | cat >> confdefs.h <<EOF | |
71a94577 | 5662 | #define CRAY_STACKSEG_END $ac_func |
093e61a6 | 5663 | EOF |
71a94577 | 5664 | |
093e61a6 RS |
5665 | break |
5666 | else | |
5667 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5668 | fi |
ab87f8c8 | 5669 | |
093e61a6 | 5670 | done |
71a94577 | 5671 | fi |
ab87f8c8 | 5672 | |
093e61a6 | 5673 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
7468e0b5 | 5674 | echo "configure:5675: checking stack direction for C alloca" >&5 |
093e61a6 RS |
5675 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
5676 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
5677 | else |
5678 | if test "$cross_compiling" = yes; then | |
5679 | ac_cv_c_stack_direction=0 | |
ab87f8c8 | 5680 | else |
093e61a6 | 5681 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5682 | #line 5683 "configure" |
093e61a6 | 5683 | #include "confdefs.h" |
71a94577 ZW |
5684 | find_stack_direction () |
5685 | { | |
5686 | static char *addr = 0; | |
5687 | auto char dummy; | |
5688 | if (addr == 0) | |
5689 | { | |
5690 | addr = &dummy; | |
5691 | return find_stack_direction (); | |
5692 | } | |
5693 | else | |
5694 | return (&dummy > addr) ? 1 : -1; | |
5695 | } | |
5696 | main () | |
5697 | { | |
093e61a6 | 5698 | exit (find_stack_direction() < 0); |
71a94577 | 5699 | } |
093e61a6 | 5700 | EOF |
7468e0b5 | 5701 | if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
093e61a6 | 5702 | then |
71a94577 | 5703 | ac_cv_c_stack_direction=1 |
ab87f8c8 | 5704 | else |
093e61a6 RS |
5705 | echo "configure: failed program was:" >&5 |
5706 | cat conftest.$ac_ext >&5 | |
5707 | rm -fr conftest* | |
5708 | ac_cv_c_stack_direction=-1 | |
ab87f8c8 | 5709 | fi |
093e61a6 | 5710 | rm -fr conftest* |
ab87f8c8 | 5711 | fi |
093e61a6 | 5712 | |
71a94577 ZW |
5713 | fi |
5714 | ||
093e61a6 RS |
5715 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 |
5716 | cat >> confdefs.h <<EOF | |
71a94577 | 5717 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
093e61a6 | 5718 | EOF |
ab87f8c8 | 5719 | |
ab87f8c8 JL |
5720 | fi |
5721 | ||
ab87f8c8 | 5722 | |
093e61a6 | 5723 | echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6 |
7468e0b5 | 5724 | echo "configure:5725: checking whether we are using the GNU C Library 2.1 or newer" >&5 |
093e61a6 RS |
5725 | if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then |
5726 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 5727 | else |
093e61a6 | 5728 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5729 | #line 5730 "configure" |
093e61a6 | 5730 | #include "confdefs.h" |
ab87f8c8 | 5731 | |
71a94577 ZW |
5732 | #include <features.h> |
5733 | #ifdef __GNU_LIBRARY__ | |
5734 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | |
5735 | Lucky GNU user | |
5736 | #endif | |
5737 | #endif | |
093e61a6 RS |
5738 | |
5739 | EOF | |
71a94577 | 5740 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
093e61a6 RS |
5741 | egrep "Lucky GNU user" >/dev/null 2>&1; then |
5742 | rm -rf conftest* | |
71a94577 | 5743 | ac_cv_gnu_library_2_1=yes |
ab87f8c8 | 5744 | else |
093e61a6 | 5745 | rm -rf conftest* |
71a94577 | 5746 | ac_cv_gnu_library_2_1=no |
ab87f8c8 | 5747 | fi |
71a94577 | 5748 | rm -f conftest* |
ab87f8c8 | 5749 | |
093e61a6 RS |
5750 | |
5751 | ||
71a94577 | 5752 | fi |
ab87f8c8 | 5753 | |
093e61a6 RS |
5754 | echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6 |
5755 | ||
71a94577 | 5756 | GLIBC21="$ac_cv_gnu_library_2_1" |
093e61a6 | 5757 | |
ab87f8c8 | 5758 | |
093e61a6 RS |
5759 | |
5760 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | |
71a94577 ZW |
5761 | stdlib.h string.h unistd.h sys/param.h |
5762 | do | |
093e61a6 RS |
5763 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
5764 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
7468e0b5 | 5765 | echo "configure:5766: checking for $ac_hdr" >&5 |
093e61a6 RS |
5766 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
5767 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5768 | else | |
5769 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5770 | #line 5771 "configure" |
093e61a6 RS |
5771 | #include "confdefs.h" |
5772 | #include <$ac_hdr> | |
5773 | EOF | |
5774 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 5775 | { (eval echo configure:5776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
5776 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
5777 | if test -z "$ac_err"; then | |
5778 | rm -rf conftest* | |
5779 | eval "ac_cv_header_$ac_safe=yes" | |
5780 | else | |
5781 | echo "$ac_err" >&5 | |
5782 | echo "configure: failed program was:" >&5 | |
5783 | cat conftest.$ac_ext >&5 | |
5784 | rm -rf conftest* | |
5785 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 5786 | fi |
093e61a6 | 5787 | rm -f conftest* |
ab87f8c8 | 5788 | fi |
093e61a6 RS |
5789 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
5790 | echo "$ac_t""yes" 1>&6 | |
5791 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5792 | cat >> confdefs.h <<EOF | |
5793 | #define $ac_tr_hdr 1 | |
5794 | EOF | |
5795 | ||
5796 | else | |
5797 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 | 5798 | fi |
71a94577 | 5799 | done |
ab87f8c8 | 5800 | |
093e61a6 | 5801 | for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ |
71a94577 ZW |
5802 | getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ |
5803 | strdup strtoul tsearch __argz_count __argz_stringify __argz_next | |
5804 | do | |
093e61a6 | 5805 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
7468e0b5 | 5806 | echo "configure:5807: checking for $ac_func" >&5 |
093e61a6 RS |
5807 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
5808 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5809 | else | |
5810 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5811 | #line 5812 "configure" |
093e61a6 | 5812 | #include "confdefs.h" |
71a94577 | 5813 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
5814 | which can conflict with char $ac_func(); below. */ |
5815 | #include <assert.h> | |
ab87f8c8 JL |
5816 | /* Override any gcc2 internal prototype to avoid an error. */ |
5817 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
5818 | builtin and then its argument prototype would still apply. */ |
5819 | char $ac_func(); | |
5820 | ||
5821 | int main() { | |
5822 | ||
71a94577 ZW |
5823 | /* The GNU C library defines this for functions which it implements |
5824 | to always fail with ENOSYS. Some functions are actually named | |
5825 | something starting with __ and the normal name is an alias. */ | |
5826 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5827 | choke me | |
5828 | #else | |
093e61a6 | 5829 | $ac_func(); |
71a94577 ZW |
5830 | #endif |
5831 | ||
093e61a6 RS |
5832 | ; return 0; } |
5833 | EOF | |
7468e0b5 | 5834 | if { (eval echo configure:5835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
5835 | rm -rf conftest* |
5836 | eval "ac_cv_func_$ac_func=yes" | |
5837 | else | |
5838 | echo "configure: failed program was:" >&5 | |
5839 | cat conftest.$ac_ext >&5 | |
5840 | rm -rf conftest* | |
5841 | eval "ac_cv_func_$ac_func=no" | |
5842 | fi | |
5843 | rm -f conftest* | |
5844 | fi | |
71a94577 | 5845 | |
093e61a6 RS |
5846 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
5847 | echo "$ac_t""yes" 1>&6 | |
5848 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5849 | cat >> confdefs.h <<EOF | |
5850 | #define $ac_tr_func 1 | |
5851 | EOF | |
5852 | ||
5853 | else | |
5854 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
5855 | fi |
5856 | done | |
5857 | ||
5858 | ||
093e61a6 RS |
5859 | |
5860 | ||
b7f2fb96 | 5861 | am_cv_lib_iconv_ldpath= |
093e61a6 | 5862 | # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. |
71a94577 ZW |
5863 | if test "${with_libiconv_prefix+set}" = set; then |
5864 | withval="$with_libiconv_prefix" | |
093e61a6 | 5865 | |
71a94577 ZW |
5866 | for dir in `echo "$withval" | tr : ' '`; do |
5867 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi | |
b7f2fb96 | 5868 | if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi |
71a94577 | 5869 | done |
093e61a6 RS |
5870 | |
5871 | fi | |
ab87f8c8 | 5872 | |
71a94577 | 5873 | |
093e61a6 | 5874 | echo $ac_n "checking for iconv""... $ac_c" 1>&6 |
7468e0b5 | 5875 | echo "configure:5876: checking for iconv" >&5 |
093e61a6 RS |
5876 | if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then |
5877 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 | 5878 | else |
093e61a6 | 5879 | |
71a94577 ZW |
5880 | am_cv_func_iconv="no, consider installing GNU libiconv" |
5881 | am_cv_lib_iconv=no | |
093e61a6 | 5882 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5883 | #line 5884 "configure" |
093e61a6 | 5884 | #include "confdefs.h" |
71a94577 ZW |
5885 | #include <stdlib.h> |
5886 | #include <iconv.h> | |
093e61a6 | 5887 | int main() { |
71a94577 ZW |
5888 | iconv_t cd = iconv_open("",""); |
5889 | iconv(cd,NULL,NULL,NULL,NULL); | |
5890 | iconv_close(cd); | |
093e61a6 RS |
5891 | ; return 0; } |
5892 | EOF | |
7468e0b5 | 5893 | if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5894 | rm -rf conftest* |
71a94577 | 5895 | am_cv_func_iconv=yes |
ab87f8c8 | 5896 | else |
093e61a6 RS |
5897 | echo "configure: failed program was:" >&5 |
5898 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 5899 | fi |
093e61a6 | 5900 | rm -f conftest* |
71a94577 ZW |
5901 | if test "$am_cv_func_iconv" != yes; then |
5902 | am_save_LIBS="$LIBS" | |
b7f2fb96 | 5903 | LIBS="$LIBS $am_cv_libiconv_ldpath -liconv" |
093e61a6 | 5904 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5905 | #line 5906 "configure" |
093e61a6 | 5906 | #include "confdefs.h" |
71a94577 ZW |
5907 | #include <stdlib.h> |
5908 | #include <iconv.h> | |
093e61a6 | 5909 | int main() { |
71a94577 ZW |
5910 | iconv_t cd = iconv_open("",""); |
5911 | iconv(cd,NULL,NULL,NULL,NULL); | |
5912 | iconv_close(cd); | |
093e61a6 RS |
5913 | ; return 0; } |
5914 | EOF | |
7468e0b5 | 5915 | if { (eval echo configure:5916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 5916 | rm -rf conftest* |
71a94577 ZW |
5917 | am_cv_lib_iconv=yes |
5918 | am_cv_func_iconv=yes | |
ab87f8c8 | 5919 | else |
093e61a6 RS |
5920 | echo "configure: failed program was:" >&5 |
5921 | cat conftest.$ac_ext >&5 | |
ab87f8c8 | 5922 | fi |
093e61a6 | 5923 | rm -f conftest* |
71a94577 ZW |
5924 | LIBS="$am_save_LIBS" |
5925 | fi | |
093e61a6 | 5926 | |
cafe096b | 5927 | fi |
cafe096b | 5928 | |
093e61a6 RS |
5929 | echo "$ac_t""$am_cv_func_iconv" 1>&6 |
5930 | if test "$am_cv_func_iconv" = yes; then | |
5931 | cat >> confdefs.h <<\EOF | |
71a94577 | 5932 | #define HAVE_ICONV 1 |
093e61a6 | 5933 | EOF |
71a94577 | 5934 | |
093e61a6 | 5935 | echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6 |
7468e0b5 | 5936 | echo "configure:5937: checking for iconv declaration" >&5 |
093e61a6 RS |
5937 | if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then |
5938 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5939 | else |
093e61a6 RS |
5940 | |
5941 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 5942 | #line 5943 "configure" |
093e61a6 | 5943 | #include "confdefs.h" |
ab87f8c8 | 5944 | |
71a94577 ZW |
5945 | #include <stdlib.h> |
5946 | #include <iconv.h> | |
5947 | extern | |
5948 | #ifdef __cplusplus | |
5949 | "C" | |
5950 | #endif | |
5951 | #if defined(__STDC__) || defined(__cplusplus) | |
5952 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
5953 | #else | |
5954 | size_t iconv(); | |
5955 | #endif | |
ab87f8c8 | 5956 | |
093e61a6 | 5957 | int main() { |
380a627a | 5958 | |
093e61a6 RS |
5959 | ; return 0; } |
5960 | EOF | |
7468e0b5 | 5961 | if { (eval echo configure:5962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
093e61a6 | 5962 | rm -rf conftest* |
71a94577 | 5963 | am_cv_proto_iconv_arg1="" |
ab87f8c8 | 5964 | else |
093e61a6 RS |
5965 | echo "configure: failed program was:" >&5 |
5966 | cat conftest.$ac_ext >&5 | |
5967 | rm -rf conftest* | |
5968 | am_cv_proto_iconv_arg1="const" | |
ab87f8c8 | 5969 | fi |
093e61a6 | 5970 | rm -f conftest* |
71a94577 | 5971 | 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 | 5972 | fi |
71a94577 ZW |
5973 | |
5974 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | |
093e61a6 RS |
5975 | echo "$ac_t""${ac_t:- |
5976 | }$am_cv_proto_iconv" 1>&6 | |
5977 | cat >> confdefs.h <<EOF | |
71a94577 | 5978 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
093e61a6 | 5979 | EOF |
71a94577 ZW |
5980 | |
5981 | fi | |
5982 | LIBICONV= | |
5983 | if test "$am_cv_lib_iconv" = yes; then | |
b7f2fb96 | 5984 | LIBICONV="$am_cv_lib_iconv_ldpath -liconv" |
71a94577 | 5985 | fi |
093e61a6 | 5986 | |
71a94577 | 5987 | |
093e61a6 RS |
5988 | |
5989 | echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6 | |
7468e0b5 | 5990 | echo "configure:5991: checking for nl_langinfo and CODESET" >&5 |
093e61a6 RS |
5991 | if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then |
5992 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 5993 | else |
093e61a6 | 5994 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 5995 | #line 5996 "configure" |
093e61a6 | 5996 | #include "confdefs.h" |
71a94577 | 5997 | #include <langinfo.h> |
093e61a6 | 5998 | int main() { |
71a94577 | 5999 | char* cs = nl_langinfo(CODESET); |
093e61a6 RS |
6000 | ; return 0; } |
6001 | EOF | |
7468e0b5 | 6002 | if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6003 | rm -rf conftest* |
71a94577 | 6004 | am_cv_langinfo_codeset=yes |
ab87f8c8 | 6005 | else |
093e61a6 RS |
6006 | echo "configure: failed program was:" >&5 |
6007 | cat conftest.$ac_ext >&5 | |
6008 | rm -rf conftest* | |
6009 | am_cv_langinfo_codeset=no | |
ab87f8c8 | 6010 | fi |
093e61a6 RS |
6011 | rm -f conftest* |
6012 | ||
cafe096b | 6013 | fi |
cafe096b | 6014 | |
093e61a6 RS |
6015 | echo "$ac_t""$am_cv_langinfo_codeset" 1>&6 |
6016 | if test $am_cv_langinfo_codeset = yes; then | |
6017 | cat >> confdefs.h <<\EOF | |
71a94577 | 6018 | #define HAVE_LANGINFO_CODESET 1 |
093e61a6 | 6019 | EOF |
ab87f8c8 | 6020 | |
71a94577 ZW |
6021 | fi |
6022 | ||
6023 | if test $ac_cv_header_locale_h = yes; then | |
093e61a6 | 6024 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 |
7468e0b5 | 6025 | echo "configure:6026: checking for LC_MESSAGES" >&5 |
093e61a6 RS |
6026 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
6027 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6028 | else | |
6029 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 6030 | #line 6031 "configure" |
093e61a6 | 6031 | #include "confdefs.h" |
71a94577 | 6032 | #include <locale.h> |
093e61a6 | 6033 | int main() { |
71a94577 | 6034 | return LC_MESSAGES |
093e61a6 RS |
6035 | ; return 0; } |
6036 | EOF | |
7468e0b5 | 6037 | if { (eval echo configure:6038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6038 | rm -rf conftest* |
71a94577 ZW |
6039 | am_cv_val_LC_MESSAGES=yes |
6040 | else | |
093e61a6 RS |
6041 | echo "configure: failed program was:" >&5 |
6042 | cat conftest.$ac_ext >&5 | |
6043 | rm -rf conftest* | |
6044 | am_cv_val_LC_MESSAGES=no | |
71a94577 | 6045 | fi |
093e61a6 | 6046 | rm -f conftest* |
71a94577 | 6047 | fi |
cafe096b | 6048 | |
093e61a6 RS |
6049 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 |
6050 | if test $am_cv_val_LC_MESSAGES = yes; then | |
6051 | cat >> confdefs.h <<\EOF | |
71a94577 | 6052 | #define HAVE_LC_MESSAGES 1 |
093e61a6 | 6053 | EOF |
71a94577 | 6054 | |
ab87f8c8 | 6055 | fi |
71a94577 | 6056 | fi |
093e61a6 | 6057 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 |
7468e0b5 | 6058 | echo "configure:6059: checking whether NLS is requested" >&5 |
71a94577 ZW |
6059 | # Check whether --enable-nls or --disable-nls was given. |
6060 | if test "${enable_nls+set}" = set; then | |
6061 | enableval="$enable_nls" | |
6062 | USE_NLS=$enableval | |
6063 | else | |
6064 | USE_NLS=yes | |
093e61a6 | 6065 | fi |
71a94577 | 6066 | |
093e61a6 RS |
6067 | echo "$ac_t""$USE_NLS" 1>&6 |
6068 | ||
71a94577 ZW |
6069 | |
6070 | BUILD_INCLUDED_LIBINTL=no | |
6071 | USE_INCLUDED_LIBINTL=no | |
6072 | INTLLIBS= | |
77c06844 | 6073 | INTLDEPS= |
71a94577 ZW |
6074 | |
6075 | if test "$USE_NLS" = "yes"; then | |
093e61a6 | 6076 | cat >> confdefs.h <<\EOF |
71a94577 | 6077 | #define ENABLE_NLS 1 |
093e61a6 | 6078 | EOF |
71a94577 | 6079 | |
093e61a6 | 6080 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 |
7468e0b5 | 6081 | echo "configure:6082: checking whether included gettext is requested" >&5 |
093e61a6 | 6082 | # Check whether --with-included-gettext or --without-included-gettext was given. |
71a94577 ZW |
6083 | if test "${with_included_gettext+set}" = set; then |
6084 | withval="$with_included_gettext" | |
6085 | nls_cv_force_use_gnu_gettext=$withval | |
ab87f8c8 | 6086 | else |
71a94577 | 6087 | nls_cv_force_use_gnu_gettext=no |
093e61a6 RS |
6088 | fi |
6089 | ||
6090 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
71a94577 ZW |
6091 | |
6092 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
6093 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
6094 | CATOBJEXT=NONE | |
6095 | ||
093e61a6 RS |
6096 | |
6097 | ||
71a94577 | 6098 | |
093e61a6 RS |
6099 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` |
6100 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
7468e0b5 | 6101 | echo "configure:6102: checking for libintl.h" >&5 |
093e61a6 RS |
6102 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
6103 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6104 | else |
093e61a6 | 6105 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 6106 | #line 6107 "configure" |
093e61a6 | 6107 | #include "confdefs.h" |
cafe096b | 6108 | #include <libintl.h> |
093e61a6 RS |
6109 | EOF |
6110 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
7468e0b5 | 6111 | { (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
093e61a6 RS |
6112 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
6113 | if test -z "$ac_err"; then | |
6114 | rm -rf conftest* | |
6115 | eval "ac_cv_header_$ac_safe=yes" | |
6116 | else | |
6117 | echo "$ac_err" >&5 | |
6118 | echo "configure: failed program was:" >&5 | |
6119 | cat conftest.$ac_ext >&5 | |
6120 | rm -rf conftest* | |
6121 | eval "ac_cv_header_$ac_safe=no" | |
ab87f8c8 | 6122 | fi |
093e61a6 | 6123 | rm -f conftest* |
71a94577 | 6124 | fi |
093e61a6 RS |
6125 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
6126 | echo "$ac_t""yes" 1>&6 | |
6127 | cat >> confdefs.h <<\EOF | |
cafe096b | 6128 | #define HAVE_LIBINTL_H 1 |
093e61a6 RS |
6129 | EOF |
6130 | ||
6131 | echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6 | |
7468e0b5 | 6132 | echo "configure:6133: checking for GNU gettext in libc" >&5 |
093e61a6 RS |
6133 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then |
6134 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6135 | else | |
6136 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 6137 | #line 6138 "configure" |
093e61a6 | 6138 | #include "confdefs.h" |
71a94577 | 6139 | #include <libintl.h> |
ab87f8c8 | 6140 | extern int _nl_msg_cat_cntr; |
093e61a6 | 6141 | int main() { |
71a94577 ZW |
6142 | bindtextdomain ("", ""); |
6143 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6144 | ; return 0; } |
6145 | EOF | |
7468e0b5 | 6146 | if { (eval echo configure:6147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6147 | rm -rf conftest* |
71a94577 | 6148 | gt_cv_func_gnugettext1_libc=yes |
ab87f8c8 | 6149 | else |
093e61a6 RS |
6150 | echo "configure: failed program was:" >&5 |
6151 | cat conftest.$ac_ext >&5 | |
6152 | rm -rf conftest* | |
6153 | gt_cv_func_gnugettext1_libc=no | |
ab87f8c8 | 6154 | fi |
093e61a6 | 6155 | rm -f conftest* |
ab87f8c8 | 6156 | fi |
093e61a6 RS |
6157 | |
6158 | echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6 | |
ab87f8c8 | 6159 | |
71a94577 | 6160 | if test "$gt_cv_func_gnugettext1_libc" != "yes"; then |
093e61a6 | 6161 | echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6 |
7468e0b5 | 6162 | echo "configure:6163: checking for GNU gettext in libintl" >&5 |
093e61a6 RS |
6163 | if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then |
6164 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6165 | else |
71a94577 ZW |
6166 | gt_save_LIBS="$LIBS" |
6167 | LIBS="$LIBS -lintl $LIBICONV" | |
093e61a6 | 6168 | cat > conftest.$ac_ext <<EOF |
7468e0b5 | 6169 | #line 6170 "configure" |
093e61a6 | 6170 | #include "confdefs.h" |
71a94577 ZW |
6171 | #include <libintl.h> |
6172 | extern int _nl_msg_cat_cntr; | |
093e61a6 | 6173 | int main() { |
71a94577 ZW |
6174 | bindtextdomain ("", ""); |
6175 | return (int) gettext ("") + _nl_msg_cat_cntr | |
093e61a6 RS |
6176 | ; return 0; } |
6177 | EOF | |
7468e0b5 | 6178 | if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6179 | rm -rf conftest* |
71a94577 | 6180 | gt_cv_func_gnugettext1_libintl=yes |
ab87f8c8 | 6181 | else |
093e61a6 RS |
6182 | echo "configure: failed program was:" >&5 |
6183 | cat conftest.$ac_ext >&5 | |
6184 | rm -rf conftest* | |
6185 | gt_cv_func_gnugettext1_libintl=no | |
ab87f8c8 | 6186 | fi |
093e61a6 | 6187 | rm -f conftest* |
71a94577 | 6188 | LIBS="$gt_save_LIBS" |
ab87f8c8 | 6189 | fi |
093e61a6 RS |
6190 | |
6191 | echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6 | |
71a94577 ZW |
6192 | fi |
6193 | ||
6194 | if test "$gt_cv_func_gnugettext1_libc" = "yes" \ | |
6195 | || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ | |
6196 | && test "$PACKAGE" != gettext; }; then | |
093e61a6 | 6197 | cat >> confdefs.h <<\EOF |
71a94577 | 6198 | #define HAVE_GETTEXT 1 |
093e61a6 | 6199 | EOF |
ab87f8c8 | 6200 | |
ab87f8c8 | 6201 | |
71a94577 ZW |
6202 | if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then |
6203 | INTLLIBS="-lintl $LIBICONV" | |
6204 | fi | |
ab87f8c8 | 6205 | |
71a94577 ZW |
6206 | gt_save_LIBS="$LIBS" |
6207 | LIBS="$LIBS $INTLLIBS" | |
093e61a6 | 6208 | for ac_func in dcgettext |
71a94577 | 6209 | do |
093e61a6 | 6210 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
7468e0b5 | 6211 | echo "configure:6212: checking for $ac_func" >&5 |
093e61a6 RS |
6212 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
6213 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6214 | else | |
6215 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 6216 | #line 6217 "configure" |
093e61a6 | 6217 | #include "confdefs.h" |
ab87f8c8 | 6218 | /* System header to define __stub macros and hopefully few prototypes, |
093e61a6 RS |
6219 | which can conflict with char $ac_func(); below. */ |
6220 | #include <assert.h> | |
ab87f8c8 JL |
6221 | /* Override any gcc2 internal prototype to avoid an error. */ |
6222 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6223 | builtin and then its argument prototype would still apply. */ |
6224 | char $ac_func(); | |
6225 | ||
6226 | int main() { | |
6227 | ||
ab87f8c8 JL |
6228 | /* The GNU C library defines this for functions which it implements |
6229 | to always fail with ENOSYS. Some functions are actually named | |
6230 | something starting with __ and the normal name is an alias. */ | |
71a94577 | 6231 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
ab87f8c8 JL |
6232 | choke me |
6233 | #else | |
093e61a6 | 6234 | $ac_func(); |
ab87f8c8 JL |
6235 | #endif |
6236 | ||
093e61a6 RS |
6237 | ; return 0; } |
6238 | EOF | |
7468e0b5 | 6239 | if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6240 | rm -rf conftest* |
6241 | eval "ac_cv_func_$ac_func=yes" | |
6242 | else | |
6243 | echo "configure: failed program was:" >&5 | |
6244 | cat conftest.$ac_ext >&5 | |
6245 | rm -rf conftest* | |
6246 | eval "ac_cv_func_$ac_func=no" | |
6247 | fi | |
6248 | rm -f conftest* | |
6249 | fi | |
ab87f8c8 | 6250 | |
093e61a6 RS |
6251 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
6252 | echo "$ac_t""yes" 1>&6 | |
6253 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6254 | cat >> confdefs.h <<EOF | |
6255 | #define $ac_tr_func 1 | |
6256 | EOF | |
6257 | ||
6258 | else | |
6259 | echo "$ac_t""no" 1>&6 | |
71a94577 ZW |
6260 | fi |
6261 | done | |
ab87f8c8 | 6262 | |
71a94577 ZW |
6263 | LIBS="$gt_save_LIBS" |
6264 | ||
6265 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6266 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6267 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6268 | echo "configure:6269: checking for $ac_word" >&5 |
093e61a6 RS |
6269 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6270 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6271 | else |
71a94577 | 6272 | case "$MSGFMT" in |
ab87f8c8 | 6273 | /*) |
71a94577 | 6274 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6275 | ;; |
6276 | *) | |
71a94577 ZW |
6277 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
6278 | for ac_dir in $PATH; do | |
ab87f8c8 JL |
6279 | test -z "$ac_dir" && ac_dir=. |
6280 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6281 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6282 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
6283 | break | |
6284 | fi | |
ab87f8c8 JL |
6285 | fi |
6286 | done | |
6287 | IFS="$ac_save_ifs" | |
71a94577 | 6288 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6289 | ;; |
6290 | esac | |
6291 | fi | |
71a94577 ZW |
6292 | MSGFMT="$ac_cv_path_MSGFMT" |
6293 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6294 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6295 | else |
093e61a6 | 6296 | echo "$ac_t""no" 1>&6 |
ab87f8c8 | 6297 | fi |
71a94577 ZW |
6298 | |
6299 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
ab87f8c8 | 6300 | set dummy gmsgfmt; ac_word=$2 |
093e61a6 | 6301 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6302 | echo "configure:6303: checking for $ac_word" >&5 |
093e61a6 RS |
6303 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6304 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6305 | else |
093e61a6 RS |
6306 | case "$GMSGFMT" in |
6307 | /*) | |
71a94577 | 6308 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6309 | ;; |
093e61a6 RS |
6310 | ?:/*) |
6311 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6312 | ;; | |
ab87f8c8 | 6313 | *) |
093e61a6 RS |
6314 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6315 | ac_dummy="$PATH" | |
6316 | for ac_dir in $ac_dummy; do | |
6317 | test -z "$ac_dir" && ac_dir=. | |
6318 | if test -f $ac_dir/$ac_word; then | |
6319 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6320 | break | |
6321 | fi | |
6322 | done | |
6323 | IFS="$ac_save_ifs" | |
71a94577 | 6324 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6325 | ;; |
6326 | esac | |
6327 | fi | |
093e61a6 | 6328 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6329 | if test -n "$GMSGFMT"; then |
093e61a6 | 6330 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6331 | else |
093e61a6 | 6332 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6333 | fi |
6334 | ||
ab87f8c8 | 6335 | |
71a94577 | 6336 | # Extract the first word of "xgettext", so it can be a program name with args. |
ab87f8c8 | 6337 | set dummy xgettext; ac_word=$2 |
093e61a6 | 6338 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6339 | echo "configure:6340: checking for $ac_word" >&5 |
093e61a6 RS |
6340 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6341 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6342 | else |
6343 | case "$XGETTEXT" in | |
6344 | /*) | |
71a94577 | 6345 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6346 | ;; |
6347 | *) | |
6348 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6349 | for ac_dir in $PATH; do | |
6350 | test -z "$ac_dir" && ac_dir=. | |
6351 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6352 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6353 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6354 | break |
6355 | fi | |
6356 | fi | |
6357 | done | |
6358 | IFS="$ac_save_ifs" | |
71a94577 | 6359 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6360 | ;; |
6361 | esac | |
6362 | fi | |
71a94577 ZW |
6363 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6364 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6365 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6366 | else |
093e61a6 | 6367 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6368 | fi |
6369 | ||
71a94577 ZW |
6370 | |
6371 | CATOBJEXT=.gmo | |
6372 | fi | |
093e61a6 RS |
6373 | |
6374 | else | |
6375 | echo "$ac_t""no" 1>&6 | |
ab87f8c8 JL |
6376 | fi |
6377 | ||
ab87f8c8 JL |
6378 | |
6379 | if test "$CATOBJEXT" = "NONE"; then | |
6380 | nls_cv_use_gnu_gettext=yes | |
6381 | fi | |
6382 | fi | |
6383 | ||
6384 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
6385 | INTLOBJS="\$(GETTOBJS)" | |
6386 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
6387 | set dummy msgfmt; ac_word=$2 | |
093e61a6 | 6388 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6389 | echo "configure:6390: checking for $ac_word" >&5 |
093e61a6 RS |
6390 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
6391 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6392 | else |
6393 | case "$MSGFMT" in | |
6394 | /*) | |
71a94577 | 6395 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. |
ab87f8c8 JL |
6396 | ;; |
6397 | *) | |
6398 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6399 | for ac_dir in $PATH; do | |
6400 | test -z "$ac_dir" && ac_dir=. | |
6401 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6402 | if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then |
6403 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6404 | break |
6405 | fi | |
6406 | fi | |
6407 | done | |
6408 | IFS="$ac_save_ifs" | |
71a94577 | 6409 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" |
ab87f8c8 JL |
6410 | ;; |
6411 | esac | |
6412 | fi | |
71a94577 ZW |
6413 | MSGFMT="$ac_cv_path_MSGFMT" |
6414 | if test "$MSGFMT" != ":"; then | |
093e61a6 | 6415 | echo "$ac_t""$MSGFMT" 1>&6 |
ab87f8c8 | 6416 | else |
093e61a6 | 6417 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6418 | fi |
6419 | ||
6420 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
6421 | set dummy gmsgfmt; ac_word=$2 | |
093e61a6 | 6422 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6423 | echo "configure:6424: checking for $ac_word" >&5 |
093e61a6 RS |
6424 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
6425 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 | 6426 | else |
093e61a6 RS |
6427 | case "$GMSGFMT" in |
6428 | /*) | |
71a94577 | 6429 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. |
ab87f8c8 | 6430 | ;; |
093e61a6 RS |
6431 | ?:/*) |
6432 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
6433 | ;; | |
ab87f8c8 | 6434 | *) |
093e61a6 RS |
6435 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6436 | ac_dummy="$PATH" | |
6437 | for ac_dir in $ac_dummy; do | |
6438 | test -z "$ac_dir" && ac_dir=. | |
6439 | if test -f $ac_dir/$ac_word; then | |
6440 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
6441 | break | |
6442 | fi | |
6443 | done | |
6444 | IFS="$ac_save_ifs" | |
71a94577 | 6445 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" |
ab87f8c8 JL |
6446 | ;; |
6447 | esac | |
6448 | fi | |
093e61a6 | 6449 | GMSGFMT="$ac_cv_path_GMSGFMT" |
ab87f8c8 | 6450 | if test -n "$GMSGFMT"; then |
093e61a6 | 6451 | echo "$ac_t""$GMSGFMT" 1>&6 |
ab87f8c8 | 6452 | else |
093e61a6 | 6453 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6454 | fi |
6455 | ||
6456 | # Extract the first word of "xgettext", so it can be a program name with args. | |
6457 | set dummy xgettext; ac_word=$2 | |
093e61a6 | 6458 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6459 | echo "configure:6460: checking for $ac_word" >&5 |
093e61a6 RS |
6460 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
6461 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ab87f8c8 JL |
6462 | else |
6463 | case "$XGETTEXT" in | |
6464 | /*) | |
71a94577 | 6465 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. |
ab87f8c8 JL |
6466 | ;; |
6467 | *) | |
6468 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
6469 | for ac_dir in $PATH; do | |
6470 | test -z "$ac_dir" && ac_dir=. | |
6471 | if test -f $ac_dir/$ac_word; then | |
71a94577 ZW |
6472 | if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then |
6473 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
ab87f8c8 JL |
6474 | break |
6475 | fi | |
6476 | fi | |
6477 | done | |
6478 | IFS="$ac_save_ifs" | |
71a94577 | 6479 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" |
ab87f8c8 JL |
6480 | ;; |
6481 | esac | |
6482 | fi | |
71a94577 ZW |
6483 | XGETTEXT="$ac_cv_path_XGETTEXT" |
6484 | if test "$XGETTEXT" != ":"; then | |
093e61a6 | 6485 | echo "$ac_t""$XGETTEXT" 1>&6 |
ab87f8c8 | 6486 | else |
093e61a6 | 6487 | echo "$ac_t""no" 1>&6 |
ab87f8c8 JL |
6488 | fi |
6489 | ||
093e61a6 | 6490 | |
71a94577 | 6491 | BUILD_INCLUDED_LIBINTL=yes |
ab87f8c8 JL |
6492 | USE_INCLUDED_LIBINTL=yes |
6493 | CATOBJEXT=.gmo | |
71a94577 | 6494 | INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" |
77c06844 | 6495 | INTLDEPS="\$(top_builddir)/intl/libintl.a" |
71a94577 ZW |
6496 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` |
6497 | fi | |
6498 | ||
6499 | if test "$GMSGFMT" != ":"; then | |
6500 | if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then | |
6501 | : ; | |
6502 | else | |
093e61a6 | 6503 | echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6 |
71a94577 ZW |
6504 | GMSGFMT=":" |
6505 | fi | |
ab87f8c8 JL |
6506 | fi |
6507 | ||
71a94577 ZW |
6508 | if test "$XGETTEXT" != ":"; then |
6509 | if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then | |
ab87f8c8 JL |
6510 | : ; |
6511 | else | |
093e61a6 | 6512 | echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 |
ab87f8c8 JL |
6513 | XGETTEXT=":" |
6514 | fi | |
6515 | fi | |
6516 | ||
71a94577 ZW |
6517 | POSUB=po |
6518 | fi | |
093e61a6 | 6519 | |
17297c41 PT |
6520 | |
6521 | ||
71a94577 ZW |
6522 | if test "$PACKAGE" = gettext; then |
6523 | BUILD_INCLUDED_LIBINTL=yes | |
ab87f8c8 | 6524 | fi |
ab87f8c8 | 6525 | |
71a94577 ZW |
6526 | for ac_prog in bison |
6527 | do | |
093e61a6 | 6528 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
71a94577 | 6529 | set dummy $ac_prog; ac_word=$2 |
093e61a6 | 6530 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
7468e0b5 | 6531 | echo "configure:6532: checking for $ac_word" >&5 |
093e61a6 RS |
6532 | if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then |
6533 | echo $ac_n "(cached) $ac_c" 1>&6 | |
71a94577 ZW |
6534 | else |
6535 | if test -n "$INTLBISON"; then | |
6536 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
6537 | else | |
093e61a6 RS |
6538 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
6539 | ac_dummy="$PATH" | |
6540 | for ac_dir in $ac_dummy; do | |
6541 | test -z "$ac_dir" && ac_dir=. | |
6542 | if test -f $ac_dir/$ac_word; then | |
6543 | ac_cv_prog_INTLBISON="$ac_prog" | |
6544 | break | |
6545 | fi | |
6546 | done | |
6547 | IFS="$ac_save_ifs" | |
71a94577 ZW |
6548 | fi |
6549 | fi | |
093e61a6 | 6550 | INTLBISON="$ac_cv_prog_INTLBISON" |
71a94577 | 6551 | if test -n "$INTLBISON"; then |
093e61a6 | 6552 | echo "$ac_t""$INTLBISON" 1>&6 |
71a94577 | 6553 | else |
093e61a6 | 6554 | echo "$ac_t""no" 1>&6 |
71a94577 ZW |
6555 | fi |
6556 | ||
093e61a6 | 6557 | test -n "$INTLBISON" && break |
71a94577 | 6558 | done |
ab87f8c8 | 6559 | |
71a94577 ZW |
6560 | if test -z "$INTLBISON"; then |
6561 | ac_verc_fail=yes | |
6562 | else | |
093e61a6 | 6563 | echo $ac_n "checking version of bison""... $ac_c" 1>&6 |
7468e0b5 | 6564 | echo "configure:6565: checking version of bison" >&5 |
71a94577 ZW |
6565 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` |
6566 | case $ac_prog_version in | |
6567 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | |
6568 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | |
6569 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | |
6570 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | |
6571 | esac | |
093e61a6 | 6572 | echo "$ac_t""$ac_prog_version" 1>&6 |
71a94577 ZW |
6573 | fi |
6574 | if test $ac_verc_fail = yes; then | |
6575 | INTLBISON=: | |
ab87f8c8 JL |
6576 | fi |
6577 | ||
093e61a6 RS |
6578 | |
6579 | ||
6580 | ||
6581 | ||
6582 | ||
6583 | ||
6584 | ||
6585 | ||
6586 | ||
191bf464 | 6587 | if test $USE_INCLUDED_LIBINTL = yes; then |
093e61a6 | 6588 | cat >> confdefs.h <<\EOF |
191bf464 | 6589 | #define USE_INCLUDED_LIBINTL 1 |
093e61a6 | 6590 | EOF |
191bf464 ZW |
6591 | |
6592 | fi | |
71a94577 ZW |
6593 | |
6594 | nls_cv_header_intl= | |
6595 | nls_cv_header_libgt= | |
6596 | ||
6597 | DATADIRNAME=share | |
093e61a6 | 6598 | |
71a94577 ZW |
6599 | |
6600 | INSTOBJEXT=.mo | |
093e61a6 | 6601 | |
ab87f8c8 | 6602 | |
71a94577 | 6603 | GENCAT=gencat |
093e61a6 RS |
6604 | |
6605 | ||
9fdf713f | 6606 | |
9f6682b7 | 6607 | if test "x$CATOBJEXT" != x; then |
093e61a6 | 6608 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 |
7468e0b5 | 6609 | echo "configure:6610: checking for catalogs to be installed" >&5 |
9f6682b7 ZW |
6610 | # Look for .po and .gmo files in the source directory. |
6611 | CATALOGS= | |
6612 | XLINGUAS= | |
6613 | for cat in $srcdir/po/*$CATOBJEXT $srcdir/po/*.po; do | |
6614 | # If there aren't any .gmo files the shell will give us the | |
6615 | # literal string "../path/to/srcdir/po/*.gmo" which has to be | |
6616 | # weeded out. | |
6617 | case "$cat" in *\**) | |
6618 | continue;; | |
6619 | esac | |
6620 | # The quadruple backslash is collapsed to a double backslash | |
6621 | # by the backticks, then collapsed again by the double quotes, | |
6622 | # leaving us with one backslash in the sed expression (right | |
6623 | # before the dot that mustn't act as a wildcard). The dot to | |
6624 | # be escaped in the second expression is hiding inside CATOBJEXT. | |
6625 | cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!$CATOBJEXT!"` | |
6626 | lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\$CATOBJEXT!!"` | |
6627 | # The user is allowed to set LINGUAS to a list of languages to | |
6628 | # install catalogs for. If it's empty that means "all of them." | |
6629 | if test "x$LINGUAS" = x; then | |
6630 | CATALOGS="$CATALOGS $cat" | |
6631 | XLINGUAS="$XLINGUAS $lang" | |
6632 | else | |
6633 | case "$LINGUAS" in *$lang*) | |
6634 | CATALOGS="$CATALOGS $cat" | |
6635 | XLINGUAS="$XLINGUAS $lang" | |
6636 | ;; | |
6637 | esac | |
6638 | fi | |
6639 | done | |
6640 | LINGUAS="$XLINGUAS" | |
093e61a6 | 6641 | echo "$ac_t""$LINGUAS" 1>&6 |
ab87f8c8 JL |
6642 | fi |
6643 | ||
ab87f8c8 JL |
6644 | MKINSTALLDIRS= |
6645 | if test -n "$ac_aux_dir"; then | |
6646 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | |
6647 | fi | |
6648 | if test -z "$MKINSTALLDIRS"; then | |
6649 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | |
6650 | fi | |
093e61a6 | 6651 | |
ab87f8c8 | 6652 | |
71a94577 | 6653 | INTL_LIBTOOL_SUFFIX_PREFIX= |
093e61a6 RS |
6654 | |
6655 | ||
ab87f8c8 | 6656 | |
f4ab28e3 MK |
6657 | # Windows32 Registry support for specifying GCC installation paths. |
6658 | # Check whether --enable-win32-registry or --disable-win32-registry was given. | |
6659 | if test "${enable_win32_registry+set}" = set; then | |
6660 | enableval="$enable_win32_registry" | |
093e61a6 RS |
6661 | : |
6662 | fi | |
f4ab28e3 | 6663 | |
4e70264f ZW |
6664 | case $host_os in |
6665 | win32 | pe | cygwin* | mingw32* | uwin*) | |
093e61a6 | 6666 | echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6 |
7468e0b5 | 6667 | echo "configure:6668: checking whether windows registry support is requested" >&5 |
9dd53f2c | 6668 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6669 | cat >> confdefs.h <<\EOF |
f4ab28e3 | 6670 | #define ENABLE_WIN32_REGISTRY 1 |
093e61a6 | 6671 | EOF |
f4ab28e3 | 6672 | |
093e61a6 RS |
6673 | echo "$ac_t""yes" 1>&6 |
6674 | ||
6675 | echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6 | |
7468e0b5 | 6676 | echo "configure:6677: checking for library containing RegOpenKeyExA" >&5 |
093e61a6 RS |
6677 | if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then |
6678 | echo $ac_n "(cached) $ac_c" 1>&6 | |
6679 | else | |
6680 | ac_func_search_save_LIBS="$LIBS" | |
6681 | ac_cv_search_RegOpenKeyExA="no" | |
6682 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 6683 | #line 6684 "configure" |
093e61a6 | 6684 | #include "confdefs.h" |
4e70264f ZW |
6685 | /* Override any gcc2 internal prototype to avoid an error. */ |
6686 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6687 | builtin and then its argument prototype would still apply. */ |
6688 | char RegOpenKeyExA(); | |
6689 | ||
6690 | int main() { | |
6691 | RegOpenKeyExA() | |
6692 | ; return 0; } | |
6693 | EOF | |
7468e0b5 | 6694 | if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 | 6695 | rm -rf conftest* |
4e70264f ZW |
6696 | ac_cv_search_RegOpenKeyExA="none required" |
6697 | else | |
093e61a6 RS |
6698 | echo "configure: failed program was:" >&5 |
6699 | cat conftest.$ac_ext >&5 | |
4e70264f | 6700 | fi |
093e61a6 RS |
6701 | rm -f conftest* |
6702 | test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do | |
6703 | LIBS="-l$i $ac_func_search_save_LIBS" | |
6704 | cat > conftest.$ac_ext <<EOF | |
7468e0b5 | 6705 | #line 6706 "configure" |
093e61a6 | 6706 | #include "confdefs.h" |
4e70264f ZW |
6707 | /* Override any gcc2 internal prototype to avoid an error. */ |
6708 | /* We use char because int might match the return type of a gcc2 | |
093e61a6 RS |
6709 | builtin and then its argument prototype would still apply. */ |
6710 | char RegOpenKeyExA(); | |
6711 | ||
6712 | int main() { | |
6713 | RegOpenKeyExA() | |
6714 | ; return 0; } | |
6715 | EOF | |
7468e0b5 | 6716 | if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
093e61a6 RS |
6717 | rm -rf conftest* |
6718 | ac_cv_search_RegOpenKeyExA="-l$i" | |
4e70264f ZW |
6719 | break |
6720 | else | |
093e61a6 RS |
6721 | echo "configure: failed program was:" >&5 |
6722 | cat conftest.$ac_ext >&5 | |
4e70264f | 6723 | fi |
093e61a6 RS |
6724 | rm -f conftest* |
6725 | done | |
6726 | LIBS="$ac_func_search_save_LIBS" | |
cafe096b | 6727 | fi |
cafe096b | 6728 | |
093e61a6 RS |
6729 | echo "$ac_t""$ac_cv_search_RegOpenKeyExA" 1>&6 |
6730 | if test "$ac_cv_search_RegOpenKeyExA" != "no"; then | |
6731 | test "$ac_cv_search_RegOpenKeyExA" = "none required" || LIBS="$ac_cv_search_RegOpenKeyExA $LIBS" | |
6732 | ||
6733 | else : | |
6734 | ||
4e70264f | 6735 | fi |
f4ab28e3 | 6736 | else |
093e61a6 | 6737 | echo "$ac_t""no" 1>&6 |
f4ab28e3 MK |
6738 | fi |
6739 | ||
6740 | # Check if user specified a different registry key. | |
9dd53f2c | 6741 | case "x${enable_win32_registry}" in |
f4ab28e3 MK |
6742 | x | xyes) |
6743 | # default. | |
6744 | gcc_cv_win32_registry_key="$VERSION" | |
6745 | ;; | |
6746 | xno) | |
6747 | # no registry lookup. | |
6748 | gcc_cv_win32_registry_key='' | |
6749 | ;; | |
6750 | *) | |
6751 | # user-specified key. | |
6752 | gcc_cv_win32_registry_key="$enable_win32_registry" | |
6753 | ;; | |
6754 | esac | |
6755 | ||
9dd53f2c | 6756 | if test "x$enable_win32_registry" != xno; then |
093e61a6 | 6757 | echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6 |
7468e0b5 | 6758 | echo "configure:6759: checking registry key on windows hosts" >&5 |
093e61a6 | 6759 | cat >> confdefs.h <<EOF |
f4ab28e3 | 6760 | #define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key" |
093e61a6 | 6761 | EOF |
f4ab28e3 | 6762 | |
093e61a6 | 6763 | echo "$ac_t""$gcc_cv_win32_registry_key" 1>&6 |
f4ab28e3 | 6764 | fi |
4e70264f ZW |
6765 | ;; |
6766 | esac | |
f4ab28e3 | 6767 | |
ab87f8c8 | 6768 | # Get an absolute path to the GCC top-level source directory |
1e6347d8 | 6769 | holddir=`${PWDCMD-pwd}` |
ab87f8c8 | 6770 | cd $srcdir |
1e6347d8 | 6771 | topdir=`${PWDCMD-pwd}` |
ab87f8c8 JL |
6772 | cd $holddir |
6773 | ||
6774 | # Conditionalize the makefile for this host machine. | |
6775 | # Make-host contains the concatenation of all host makefile fragments | |
6776 | # [there can be more than one]. This file is built by configure.frag. | |
6777 | host_overrides=Make-host | |
6778 | dep_host_xmake_file= | |
6779 | for f in .. ${host_xmake_file} | |
6780 | do | |
6781 | if test -f ${srcdir}/config/$f | |
6782 | then | |
6783 | dep_host_xmake_file="${dep_host_xmake_file} ${srcdir}/config/$f" | |
6784 | fi | |
6785 | done | |
6786 | ||
6787 | # Conditionalize the makefile for this target machine. | |
6788 | # Make-target contains the concatenation of all host makefile fragments | |
6789 | # [there can be more than one]. This file is built by configure.frag. | |
6790 | target_overrides=Make-target | |
6791 | dep_tmake_file= | |
6792 | for f in .. ${tmake_file} | |
6793 | do | |
6794 | if test -f ${srcdir}/config/$f | |
6795 | then | |
6796 | dep_tmake_file="${dep_tmake_file} ${srcdir}/config/$f" | |
6797 | fi | |
6798 | done | |
6799 | ||
34a86c2b NN |
6800 | symbolic_link='ln -s' |
6801 | ||
ab87f8c8 JL |
6802 | # If the host doesn't support symlinks, modify CC in |
6803 | # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works. | |
6804 | # Otherwise, we can use "CC=$(CC)". | |
6805 | rm -f symtest.tem | |
6806 | if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null | |
6807 | then | |
6808 | cc_set_by_configure="\$(CC)" | |
5aa82ace | 6809 | quoted_cc_set_by_configure="\$(CC)" |
ab87f8c8 | 6810 | stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
596151e1 | 6811 | quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)" |
ab87f8c8 JL |
6812 | else |
6813 | rm -f symtest.tem | |
6814 | if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null | |
6815 | then | |
6816 | symbolic_link="cp -p" | |
6817 | else | |
6818 | symbolic_link="cp" | |
6819 | fi | |
6820 | cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`" | |
5aa82ace | 6821 | quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`" |
ab87f8c8 | 6822 | stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`" |
596151e1 | 6823 | 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 |
6824 | fi |
6825 | rm -f symtest.tem | |
6826 | ||
6827 | out_object_file=`basename $out_file .c`.o | |
6828 | ||
6829 | tm_file_list= | |
6830 | for f in $tm_file; do | |
64ccbc99 | 6831 | case $f in |
d02af173 ZW |
6832 | ansidecl.h ) |
6833 | tm_file_list="${tm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
6834 | defaults.h ) | |
e2500fed | 6835 | tm_file_list="${tm_file_list} \$(srcdir)/$f" ;; |
64ccbc99 KG |
6836 | *) tm_file_list="${tm_file_list} \$(srcdir)/config/$f" ;; |
6837 | esac | |
ab87f8c8 JL |
6838 | done |
6839 | ||
11642c3a ZW |
6840 | tm_p_file_list= |
6841 | for f in $tm_p_file; do | |
4977bab6 ZW |
6842 | case $f in |
6843 | tm-preds.h ) | |
6844 | tm_p_file_list="${tm_p_file_list} $f" ;; | |
6845 | *) tm_p_file_list="${tm_p_file_list} \$(srcdir)/config/$f" ;; | |
6846 | esac | |
11642c3a ZW |
6847 | done |
6848 | ||
ab87f8c8 JL |
6849 | host_xm_file_list= |
6850 | for f in $host_xm_file; do | |
64ccbc99 | 6851 | case $f in |
d02af173 ZW |
6852 | ansidecl.h ) |
6853 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 6854 | auto-host.h ) |
64ccbc99 | 6855 | host_xm_file_list="${host_xm_file_list} $f" ;; |
e2500fed GK |
6856 | defaults.h ) |
6857 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
6858 | *) host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f" ;; |
6859 | esac | |
ab87f8c8 JL |
6860 | done |
6861 | ||
6862 | build_xm_file_list= | |
6863 | for f in $build_xm_file; do | |
64ccbc99 | 6864 | case $f in |
d02af173 ZW |
6865 | ansidecl.h ) |
6866 | build_xm_file_list="${build_xm_file_list} \$(srcdir)/../include/ansidecl.h" ;; | |
e2500fed | 6867 | auto-build.h | auto-host.h ) |
64ccbc99 | 6868 | build_xm_file_list="${build_xm_file_list} $f" ;; |
e2500fed GK |
6869 | defaults.h ) |
6870 | host_xm_file_list="${host_xm_file_list} \$(srcdir)/$f" ;; | |
64ccbc99 KG |
6871 | *) build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f" ;; |
6872 | esac | |
ab87f8c8 JL |
6873 | done |
6874 | ||
a078a589 ZW |
6875 | # Define macro CROSS_COMPILE in compilation if this is a cross-compiler. |
6876 | # Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR. | |
093e61a6 RS |
6877 | CROSS= |
6878 | ALL=all.internal | |
6879 | SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
6880 | if test x$host != x$target |
6881 | then | |
a078a589 ZW |
6882 | CROSS="-DCROSS_COMPILE" |
6883 | ALL=all.cross | |
6884 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
343f59d9 AM |
6885 | case "$host","$target" in |
6886 | i?86-*-*,x86_64-*-* \ | |
6887 | | powerpc*-*-*,powerpc64*-*-*) | |
6888 | CROSS="$CROSS -DNATIVE_CROSS" ;; | |
6889 | esac | |
7a615b25 AO |
6890 | elif test "x$TARGET_SYSTEM_ROOT" != x; then |
6891 | # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR) | |
6892 | SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)' | |
ab87f8c8 JL |
6893 | fi |
6894 | ||
b39d221a EC |
6895 | # If this is a cross-compiler that does not |
6896 | # have its own set of headers then define | |
6897 | # inhibit_libc | |
6898 | ||
dc06db20 R |
6899 | # If this is using newlib, without having the headers available now, |
6900 | # then define inhibit_libc in LIBGCC2_CFLAGS. | |
fecd6201 ZW |
6901 | # This prevents libgcc2 from containing any code which requires libc |
6902 | # support. | |
b39d221a | 6903 | inhibit_libc= |
dc06db20 R |
6904 | if { { test x$host != x$target && test "x$with_sysroot" = x ; } || |
6905 | test x$with_newlib = xyes ; } && | |
6906 | test "x$with_headers" = x ; then | |
b39d221a | 6907 | inhibit_libc=-Dinhibit_libc |
b39d221a EC |
6908 | fi |
6909 | ||
6910 | ||
a078a589 ZW |
6911 | # When building gcc with a cross-compiler, we need to adjust things so |
6912 | # that the generator programs are still built with the native compiler. | |
6913 | # Also, we cannot run fixincludes or fix-header. | |
a078a589 ZW |
6914 | |
6915 | # These are the normal (build=host) settings: | |
093e61a6 RS |
6916 | BUILD_PREFIX= |
6917 | BUILD_PREFIX_1=ignore- | |
eaf9f3b2 | 6918 | CC_FOR_BUILD='$(CC)' |
093e61a6 | 6919 | BUILD_CFLAGS='$(ALL_CFLAGS)' |
a078a589 | 6920 | |
093e61a6 RS |
6921 | STMP_FIXINC=stmp-fixinc |
6922 | STMP_FIXPROTO=stmp-fixproto | |
a078a589 ZW |
6923 | |
6924 | # And these apply if build != host. | |
ab87f8c8 JL |
6925 | if test x$build != x$host |
6926 | then | |
5c35940c NN |
6927 | BUILD_PREFIX=build- |
6928 | BUILD_PREFIX_1=build- | |
4977bab6 | 6929 | BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)' |
a078a589 | 6930 | |
7a615b25 AO |
6931 | if test "x$TARGET_SYSTEM_ROOT" = x; then |
6932 | STMP_FIXINC= | |
6933 | STMP_FIXPROTO= | |
6934 | fi | |
ab87f8c8 JL |
6935 | fi |
6936 | ||
6937 | # Expand extra_headers to include complete path. | |
6938 | # This substitutes for lots of t-* files. | |
6939 | extra_headers_list= | |
6940 | if test "x$extra_headers" = x | |
6941 | then true | |
6942 | else | |
29f7a208 | 6943 | # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers. |
ab87f8c8 JL |
6944 | for file in $extra_headers; |
6945 | do | |
29f7a208 | 6946 | extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}" |
ab87f8c8 JL |
6947 | done |
6948 | fi | |
6949 | ||
ab87f8c8 | 6950 | # Add a definition of USE_COLLECT2 if system wants one. |
34a86c2b NN |
6951 | case $use_collect2 in |
6952 | no) use_collect2= ;; | |
6953 | "") ;; | |
093e61a6 | 6954 | *) |
34a86c2b NN |
6955 | host_xm_defines="${host_xm_defines} USE_COLLECT2" |
6956 | xm_defines="${xm_defines} USE_COLLECT2" | |
6957 | ;; | |
6958 | esac | |
ab87f8c8 | 6959 | |
d869a8c4 NN |
6960 | # Identify the assembler which will work hand-in-glove with the newly |
6961 | # built GCC, so that we can examine its features. This is the assembler | |
6962 | # which will be driven by the driver program. | |
6963 | # | |
6964 | # If build != host, and we aren't building gas in-tree, we identify a | |
6965 | # build->target assembler and hope that it will have the same features | |
6966 | # as the host->target assembler we'll be using. | |
093e61a6 | 6967 | echo $ac_n "checking what assembler to use""... $ac_c" 1>&6 |
7468e0b5 | 6968 | echo "configure:6969: checking what assembler to use" >&5 |
34a86c2b | 6969 | in_tree_gas=no |
ab87f8c8 | 6970 | gcc_cv_as= |
981d4858 JM |
6971 | gcc_cv_gas_major_version= |
6972 | gcc_cv_gas_minor_version= | |
ab87f8c8 JL |
6973 | gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas |
6974 | if test -x "$DEFAULT_ASSEMBLER"; then | |
6975 | gcc_cv_as="$DEFAULT_ASSEMBLER" | |
6976 | elif test -x "$AS"; then | |
6977 | gcc_cv_as="$AS" | |
6978 | elif test -x as$host_exeext; then | |
6979 | # Build using assembler in the current directory. | |
6980 | gcc_cv_as=./as$host_exeext | |
34a86c2b NN |
6981 | elif test -f $gcc_cv_as_gas_srcdir/configure.in \ |
6982 | && test -f ../gas/Makefile; then | |
ad9c4d9f NN |
6983 | # Single tree build which includes gas. |
6984 | in_tree_gas=yes | |
6985 | gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
6986 | for f in $gcc_cv_as_bfd_srcdir/configure \ | |
6987 | $gcc_cv_as_gas_srcdir/configure \ | |
6988 | $gcc_cv_as_gas_srcdir/configure.in \ | |
6989 | $gcc_cv_as_gas_srcdir/Makefile.in ; do | |
6990 | gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
6991 | if test x$gcc_cv_gas_version != x; then | |
6992 | break | |
6993 | fi | |
6994 | done | |
6995 | gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"` | |
6996 | gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
6997 | gcc_cv_gas_patch_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.[0-9]*\.\([0-9]*\)"` | |
6998 | ||
f9c1196a ZW |
6999 | rm -f as$host_exeext |
7000 | $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null | |
981d4858 | 7001 | fi |
9e423e6d | 7002 | |
534d0cc0 | 7003 | if test "x$gcc_cv_as" = x; then |
779243f7 JL |
7004 | # Search the same directories that the installed compiler will |
7005 | # search. Else we may find the wrong assembler and lose. If we | |
7006 | # do not find a suitable assembler binary, then try the user's | |
7007 | # path. | |
7008 | # | |
7009 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7010 | # user's path. Unfortunately, there is no good way to get at the | |
7011 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7012 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7013 | # to be fixed as part of the make/configure rewrite too. | |
7014 | ||
7015 | if test "x$exec_prefix" = xNONE; then | |
7016 | if test "x$prefix" = xNONE; then | |
7017 | test_prefix=/usr/local | |
7018 | else | |
7019 | test_prefix=$prefix | |
7020 | fi | |
7021 | else | |
7022 | test_prefix=$exec_prefix | |
7023 | fi | |
7024 | ||
7025 | # If the loop below does not find an assembler, then use whatever | |
7026 | # one we can find in the users's path. | |
7027 | # user's path. | |
55a2ea2a AM |
7028 | if test "x$program_prefix" != xNONE; then |
7029 | gcc_cv_as=${program_prefix}as$host_exeext | |
7030 | else | |
7031 | gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext | |
7032 | fi | |
7033 | ||
7034 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7035 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7036 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7037 | /usr/lib/gcc/$target_alias \ | |
7038 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7039 | $test_prefix/$target_alias/bin" | |
7040 | ||
7041 | if test x$host = x$target; then | |
7042 | test_dirs="$test_dirs \ | |
779243f7 JL |
7043 | /usr/libexec \ |
7044 | /usr/ccs/gcc \ | |
7045 | /usr/ccs/bin \ | |
7046 | /udk/usr/ccs/bin \ | |
7047 | /bsd43/usr/lib/cmplrs/cc \ | |
7048 | /usr/cross64/usr/bin \ | |
7049 | /usr/lib/cmplrs/cc \ | |
7050 | /sysv/usr/lib/cmplrs/cc \ | |
7051 | /svr4/usr/lib/cmplrs/cc \ | |
7052 | /usr/bin" | |
55a2ea2a | 7053 | fi |
779243f7 JL |
7054 | |
7055 | for dir in $test_dirs; do | |
55a2ea2a | 7056 | if test -x $dir/as$host_exeext; then |
779243f7 JL |
7057 | gcc_cv_as=$dir/as$host_exeext |
7058 | break; | |
7059 | fi | |
7060 | done | |
9e423e6d | 7061 | fi |
34a86c2b NN |
7062 | case $in_tree_gas in |
7063 | yes) | |
093e61a6 | 7064 | echo "$ac_t"""newly built gas"" 1>&6 |
34a86c2b NN |
7065 | ;; |
7066 | no) | |
093e61a6 | 7067 | echo "$ac_t""$gcc_cv_as" 1>&6 |
34a86c2b NN |
7068 | ;; |
7069 | esac | |
981d4858 | 7070 | |
d869a8c4 NN |
7071 | # Identify the linker which will work hand-in-glove with the newly |
7072 | # built GCC, so that we can examine its features. This is the linker | |
7073 | # which will be driven by the driver program. | |
7074 | # | |
7075 | # If build != host, and we aren't building gas in-tree, we identify a | |
7076 | # build->target linker and hope that it will have the same features | |
7077 | # as the host->target linker we'll be using. | |
093e61a6 | 7078 | echo $ac_n "checking what linker to use""... $ac_c" 1>&6 |
7468e0b5 | 7079 | echo "configure:7080: checking what linker to use" >&5 |
34a86c2b | 7080 | in_tree_ld=no |
275b60d6 JJ |
7081 | gcc_cv_ld= |
7082 | gcc_cv_gld_major_version= | |
7083 | gcc_cv_gld_minor_version= | |
7084 | gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld | |
7085 | gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd | |
7086 | if test -x "$DEFAULT_LINKER"; then | |
7087 | gcc_cv_ld="$DEFAULT_LINKER" | |
7088 | elif test -x "$LD"; then | |
7089 | gcc_cv_ld="$LD" | |
f9c1196a | 7090 | elif test -x collect-ld$host_exeext; then |
275b60d6 | 7091 | # Build using linker in the current directory. |
f9c1196a | 7092 | gcc_cv_ld=./collect-ld$host_exeext |
34a86c2b NN |
7093 | elif test -f $gcc_cv_ld_gld_srcdir/configure.in \ |
7094 | && test -f ../ld/Makefile; then | |
275b60d6 | 7095 | # Single tree build which includes ld. |
34a86c2b | 7096 | in_tree_ld=yes |
275b60d6 JJ |
7097 | 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 |
7098 | do | |
7099 | gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f` | |
7100 | if test x$gcc_cv_gld_version != x; then | |
7101 | break | |
7102 | fi | |
7103 | done | |
7104 | gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"` | |
7105 | gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"` | |
f9c1196a ZW |
7106 | rm -f collect-ld$host_exeext |
7107 | $symbolic_link ../ld/ld-new$host_exeext collect-ld$host_exeext \ | |
7108 | 2>/dev/null | |
275b60d6 JJ |
7109 | fi |
7110 | ||
534d0cc0 | 7111 | if test "x$gcc_cv_ld" = x; then |
275b60d6 JJ |
7112 | # Search the same directories that the installed compiler will |
7113 | # search. Else we may find the wrong linker and lose. If we | |
7114 | # do not find a suitable linker binary, then try the user's | |
7115 | # path. | |
7116 | # | |
7117 | # Also note we have to check MD_EXEC_PREFIX before checking the | |
7118 | # user's path. Unfortunately, there is no good way to get at the | |
7119 | # value of MD_EXEC_PREFIX here. So we do a brute force search | |
7120 | # through all the known MD_EXEC_PREFIX values. Ugh. This needs | |
7121 | # to be fixed as part of the make/configure rewrite too. | |
7122 | ||
7123 | if test "x$exec_prefix" = xNONE; then | |
7124 | if test "x$prefix" = xNONE; then | |
7125 | test_prefix=/usr/local | |
7126 | else | |
7127 | test_prefix=$prefix | |
7128 | fi | |
7129 | else | |
7130 | test_prefix=$exec_prefix | |
7131 | fi | |
7132 | ||
7133 | # If the loop below does not find an linker, then use whatever | |
7134 | # one we can find in the users's path. | |
7135 | # user's path. | |
55a2ea2a AM |
7136 | if test "x$program_prefix" != xNONE; then |
7137 | gcc_cv_ld=${program_prefix}ld$host_exeext | |
7138 | else | |
7139 | gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext | |
7140 | fi | |
7141 | ||
7142 | test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \ | |
7143 | $test_prefix/lib/gcc-lib/$target_alias \ | |
7144 | /usr/lib/gcc/$target_alias/$gcc_version \ | |
7145 | /usr/lib/gcc/$target_alias \ | |
7146 | $test_prefix/$target_alias/bin/$target_alias/$gcc_version \ | |
7147 | $test_prefix/$target_alias/bin" | |
7148 | ||
7149 | if test x$host = x$target; then | |
7150 | test_dirs="$test_dirs \ | |
275b60d6 JJ |
7151 | /usr/libexec \ |
7152 | /usr/ccs/gcc \ | |
7153 | /usr/ccs/bin \ | |
7154 | /udk/usr/ccs/bin \ | |
7155 | /bsd43/usr/lib/cmplrs/cc \ | |
7156 | /usr/cross64/usr/bin \ | |
7157 | /usr/lib/cmplrs/cc \ | |
7158 | /sysv/usr/lib/cmplrs/cc \ | |
7159 | /svr4/usr/lib/cmplrs/cc \ | |
7160 | /usr/bin" | |
55a2ea2a | 7161 | fi |
275b60d6 JJ |
7162 | |
7163 | for dir in $test_dirs; do | |
55a2ea2a | 7164 | if test -x $dir/ld$host_exeext; then |
275b60d6 JJ |
7165 | gcc_cv_ld=$dir/ld$host_exeext |
7166 | break; | |
7167 | fi | |
7168 | done | |
7169 | fi | |
34a86c2b NN |
7170 | case $in_tree_ld in |
7171 | yes) | |
093e61a6 | 7172 | echo "$ac_t"""newly built ld"" 1>&6 |
34a86c2b NN |
7173 | ;; |
7174 | no) | |
093e61a6 | 7175 | echo "$ac_t""$gcc_cv_ld" 1>&6 |
34a86c2b NN |
7176 | ;; |
7177 | esac | |
275b60d6 | 7178 | |
981d4858 | 7179 | # Figure out what nm we will be using. |
f9c1196a | 7180 | gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils |
093e61a6 | 7181 | echo $ac_n "checking what nm to use""... $ac_c" 1>&6 |
7468e0b5 | 7182 | echo "configure:7183: checking what nm to use" >&5 |
f9c1196a | 7183 | in_tree_nm=no |
981d4858 JM |
7184 | if test -x nm$host_exeext; then |
7185 | gcc_cv_nm=./nm$host_exeext | |
f9c1196a ZW |
7186 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7187 | && test -f ../binutils/Makefile; then | |
7188 | # Single tree build which includes binutils. | |
7189 | in_tree_nm=yes | |
7190 | gcc_cv_nm=./nm$host_exeext | |
7191 | rm -f nm$host_exeext | |
7192 | $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null | |
534d0cc0 AM |
7193 | elif test "x$program_prefix" != xNONE; then |
7194 | gcc_cv_nm=${program_prefix}nm$host_exeext | |
7195 | else | |
7196 | gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext | |
981d4858 | 7197 | fi |
f9c1196a | 7198 | case $in_tree_nm in |
093e61a6 RS |
7199 | yes) echo "$ac_t"""newly built nm"" 1>&6 ;; |
7200 | no) echo "$ac_t""$gcc_cv_nm" 1>&6 ;; | |
f9c1196a | 7201 | esac |
981d4858 | 7202 | |
3cae5780 | 7203 | # Figure out what objdump we will be using. |
093e61a6 | 7204 | echo $ac_n "checking what objdump to use""... $ac_c" 1>&6 |
7468e0b5 | 7205 | echo "configure:7206: checking what objdump to use" >&5 |
f9c1196a | 7206 | in_tree_objdump=no |
3cae5780 AS |
7207 | if test -x objdump$host_exeext; then |
7208 | gcc_cv_objdump=./objdump$host_exeext | |
f9c1196a ZW |
7209 | elif test -f $gcc_cv_binutils_srcdir/configure.in \ |
7210 | && test -f ../binutils/Makefile; then | |
7211 | # Single tree build which includes binutils. | |
7212 | in_tree_objdump=yes | |
7213 | gcc_cv_objdump=./objdump$host_exeext | |
7214 | rm -f objdump$host_exeext | |
7215 | $symbolic_link ../binutils/objdump$host_exeext \ | |
7216 | objdump$host_exeext 2>/dev/null | |
534d0cc0 AM |
7217 | elif test "x$program_prefix" != xNONE; then |
7218 | gcc_cv_objdump=${program_prefix}objdump$host_exeext | |
7219 | else | |
f9c1196a ZW |
7220 | gcc_cv_objdump=`echo objdump | \ |
7221 | sed ${program_transform_name}`$host_exeext | |
3cae5780 | 7222 | fi |
f9c1196a | 7223 | case $in_tree_objdump in |
093e61a6 RS |
7224 | yes) echo "$ac_t"""newly built objdump"" 1>&6 ;; |
7225 | no) echo "$ac_t""$gcc_cv_objdump" 1>&6 ;; | |
f9c1196a | 7226 | esac |
3cae5780 | 7227 | |
981d4858 | 7228 | # Figure out what assembler alignment features are present. |
093e61a6 | 7229 | echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6 |
7468e0b5 | 7230 | echo "configure:7231: checking assembler alignment features" >&5 |
9d147085 | 7231 | gcc_cv_as_alignment_features=none |
34a86c2b | 7232 | if test $in_tree_gas = yes; then |
ad9c4d9f NN |
7233 | # Gas version 2.6 and later support for .balign and .p2align. |
7234 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7235 | && test $gcc_cv_gas_minor_version -ge 6 \ | |
7236 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7237 | ||
7238 | ||
7239 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7240 | cat >> confdefs.h <<\EOF |
981d4858 | 7241 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7242 | EOF |
981d4858 | 7243 | |
093e61a6 | 7244 | |
ad9c4d9f NN |
7245 | |
7246 | fi | |
7247 | ||
7248 | # Gas version 2.8 and later support specifying the maximum | |
7249 | # bytes to skip when using .p2align. | |
7250 | if test $gcc_cv_gas_major_version -eq 2 \ | |
7251 | && test $gcc_cv_gas_minor_version -ge 8 \ | |
7252 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7253 | ||
7254 | ||
7255 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7256 | cat >> confdefs.h <<\EOF |
981d4858 | 7257 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7258 | EOF |
981d4858 | 7259 | |
093e61a6 | 7260 | |
ad9c4d9f NN |
7261 | |
7262 | fi | |
7263 | ||
981d4858 | 7264 | elif test x$gcc_cv_as != x; then |
00ccc16d JL |
7265 | # Check if we have .balign and .p2align |
7266 | echo ".balign 4" > conftest.s | |
7267 | echo ".p2align 2" >> conftest.s | |
7268 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7269 | gcc_cv_as_alignment_features=".balign and .p2align" | |
093e61a6 | 7270 | cat >> confdefs.h <<\EOF |
00ccc16d | 7271 | #define HAVE_GAS_BALIGN_AND_P2ALIGN 1 |
093e61a6 | 7272 | EOF |
00ccc16d JL |
7273 | |
7274 | fi | |
7275 | rm -f conftest.s conftest.o | |
9e423e6d JW |
7276 | # Check if specifying the maximum bytes to skip when |
7277 | # using .p2align is supported. | |
7278 | echo ".p2align 4,,7" > conftest.s | |
7279 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7280 | gcc_cv_as_alignment_features=".p2align including maximum skip" | |
093e61a6 | 7281 | cat >> confdefs.h <<\EOF |
9e423e6d | 7282 | #define HAVE_GAS_MAX_SKIP_P2ALIGN 1 |
093e61a6 | 7283 | EOF |
9e423e6d JW |
7284 | |
7285 | fi | |
7286 | rm -f conftest.s conftest.o | |
7287 | fi | |
093e61a6 | 7288 | echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6 |
9e423e6d | 7289 | |
093e61a6 | 7290 | echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6 |
7468e0b5 | 7291 | echo "configure:7292: checking assembler subsection support" >&5 |
9d147085 | 7292 | gcc_cv_as_subsections=no |
34a86c2b | 7293 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7294 | if test $gcc_cv_gas_major_version -eq 2 \ |
7295 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
7296 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7297 | ||
7298 | ||
7299 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7300 | gcc_cv_as_subsections="working .subsection -1" | |
7301 | fi | |
093e61a6 | 7302 | |
ad9c4d9f NN |
7303 | |
7304 | fi | |
7305 | ||
981d4858 | 7306 | elif test x$gcc_cv_as != x; then |
d1accaa3 JJ |
7307 | # Check if we have .subsection |
7308 | echo ".subsection 1" > conftest.s | |
7309 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7310 | gcc_cv_as_subsections=".subsection" | |
d1accaa3 JJ |
7311 | if test x$gcc_cv_nm != x; then |
7312 | cat > conftest.s <<EOF | |
7313 | conftest_label1: .word 0 | |
7314 | .subsection -1 | |
7315 | conftest_label2: .word 0 | |
7316 | .previous | |
7317 | EOF | |
7318 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7319 | $gcc_cv_nm conftest.o | grep conftest_label1 > conftest.nm1 | |
7320 | $gcc_cv_nm conftest.o | grep conftest_label2 | sed -e 's/label2/label1/' > conftest.nm2 | |
1b015bec AO |
7321 | if cmp conftest.nm1 conftest.nm2 > /dev/null 2>&1; then |
7322 | : | |
7323 | else | |
d1accaa3 | 7324 | gcc_cv_as_subsections="working .subsection -1" |
d1accaa3 JJ |
7325 | fi |
7326 | fi | |
7327 | fi | |
7328 | fi | |
7329 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7330 | fi |
7331 | if test x"$gcc_cv_as_subsections" = x"working .subsection -1"; then | |
093e61a6 | 7332 | cat >> confdefs.h <<\EOF |
981d4858 | 7333 | #define HAVE_GAS_SUBSECTION_ORDERING 1 |
093e61a6 | 7334 | EOF |
981d4858 | 7335 | |
d1accaa3 | 7336 | fi |
093e61a6 | 7337 | echo "$ac_t""$gcc_cv_as_subsections" 1>&6 |
d1accaa3 | 7338 | |
093e61a6 | 7339 | echo $ac_n "checking assembler weak support""... $ac_c" 1>&6 |
7468e0b5 | 7340 | echo "configure:7341: checking assembler weak support" >&5 |
9d147085 | 7341 | gcc_cv_as_weak=no |
34a86c2b | 7342 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7343 | if test $gcc_cv_gas_major_version -eq 2 \ |
7344 | && test $gcc_cv_gas_minor_version -ge 2 \ | |
7345 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7346 | ||
7347 | ||
981d4858 | 7348 | gcc_cv_as_weak="yes" |
093e61a6 | 7349 | |
ad9c4d9f NN |
7350 | |
7351 | fi | |
7352 | ||
981d4858 | 7353 | elif test x$gcc_cv_as != x; then |
12822146 JL |
7354 | # Check if we have .weak |
7355 | echo " .weak foobar" > conftest.s | |
7356 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
12822146 JL |
7357 | gcc_cv_as_weak="yes" |
7358 | fi | |
7359 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
981d4858 JM |
7360 | fi |
7361 | if test x"$gcc_cv_as_weak" = xyes; then | |
093e61a6 | 7362 | cat >> confdefs.h <<\EOF |
981d4858 | 7363 | #define HAVE_GAS_WEAK 1 |
093e61a6 | 7364 | EOF |
981d4858 | 7365 | |
12822146 | 7366 | fi |
093e61a6 | 7367 | echo "$ac_t""$gcc_cv_as_weak" 1>&6 |
12822146 | 7368 | |
093e61a6 | 7369 | echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6 |
7468e0b5 | 7370 | echo "configure:7371: checking assembler hidden support" >&5 |
9d147085 | 7371 | gcc_cv_as_hidden=no |
34a86c2b | 7372 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7373 | if test $gcc_cv_gas_major_version -eq 2 \ |
7374 | && (test $gcc_cv_gas_minor_version -gt 12 \ | |
7375 | || (test $gcc_cv_gas_minor_version -eq 12 \ | |
7376 | && test $gcc_cv_gas_patch_version -ge 1 )) \ | |
7377 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7378 | ||
7379 | ||
7380 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7381 | gcc_cv_as_hidden="yes" | |
7382 | fi | |
093e61a6 | 7383 | |
ad9c4d9f NN |
7384 | |
7385 | fi | |
7386 | ||
981d4858 | 7387 | elif test x$gcc_cv_as != x; then |
6a9c5260 UD |
7388 | # Check if we have .hidden |
7389 | echo " .hidden foobar" > conftest.s | |
7390 | echo "foobar:" >> conftest.s | |
7391 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
6a9c5260 UD |
7392 | gcc_cv_as_hidden="yes" |
7393 | fi | |
7394 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
c72931a6 RH |
7395 | |
7396 | # GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
093e61a6 | 7397 | # This is irritatingly difficult to feature test for. Look for |
c72931a6 RH |
7398 | # the date string after the version number. |
7399 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1` | |
7400 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
96ef4bdc MM |
7401 | 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'` |
7402 | 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 | 7403 | if test 0"$ld_date" -lt 20020404; then |
4832c9e1 JJ |
7404 | if test -n "$ld_date"; then |
7405 | # If there was date string, but was earlier than 2002-04-04, fail | |
7406 | gcc_cv_as_hidden="no" | |
7407 | elif test -z "$ld_vers"; then | |
7408 | # If there was no date string nor ld version number, something is wrong | |
7409 | gcc_cv_as_hidden="no" | |
7410 | else | |
7411 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
7412 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
7413 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
7414 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
7415 | if test "$ld_vers_major" -lt 2; then | |
7416 | gcc_cv_as_hidden="no" | |
7417 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
7418 | gcc_cv_as_hidden="no" | |
7419 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \ | |
7420 | -a "$ld_vers_patch" -eq 0; then | |
7421 | gcc_cv_as_hidden="no" | |
7422 | fi | |
7423 | fi | |
c72931a6 RH |
7424 | fi |
7425 | fi | |
981d4858 | 7426 | fi |
789b7de5 | 7427 | case "$target" in |
027faee7 | 7428 | mips-sgi-irix6*) |
789b7de5 RO |
7429 | if test x"$gnu_ld_flag" = x"no"; then |
7430 | # Even if using gas with .hidden support, the resulting object files | |
027faee7 AO |
7431 | # cannot be linked with the IRIX 6 O32 linker. With the N32 and |
7432 | # N64 linkers, the problem is that the linker refuses to accept | |
7433 | # -call_shared (passed by default to the linker) and -r (used to | |
7434 | # link the object file generated without .hidden directives with | |
7435 | # one that hides symbols), so we also lose. | |
6d07784a | 7436 | gcc_cv_as_hidden=no |
789b7de5 RO |
7437 | fi |
7438 | ;; | |
7439 | esac | |
6d07784a RO |
7440 | if test x"$gcc_cv_as_hidden" = xyes; then |
7441 | cat >> confdefs.h <<\EOF | |
7442 | #define HAVE_GAS_HIDDEN 1 | |
7443 | EOF | |
7444 | ||
7445 | fi | |
7446 | echo "$ac_t""$gcc_cv_as_hidden" 1>&6 | |
7447 | libgcc_visibility=$gcc_cv_as_hidden | |
9e944a16 | 7448 | |
6a9c5260 | 7449 | |
093e61a6 | 7450 | echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6 |
7468e0b5 | 7451 | echo "configure:7452: checking assembler leb128 support" >&5 |
fbe42b1b | 7452 | gcc_cv_as_leb128=no |
34a86c2b | 7453 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7454 | if test $gcc_cv_gas_major_version -eq 2 \ |
7455 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
7456 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7457 | ||
7458 | ||
7459 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7460 | gcc_cv_as_leb128="yes" | |
7461 | fi | |
093e61a6 | 7462 | |
ad9c4d9f NN |
7463 | |
7464 | fi | |
7465 | ||
b7460f24 RH |
7466 | elif test x$gcc_cv_as != x; then |
7467 | # Check if we have .[us]leb128, and support symbol arithmetic with it. | |
7468 | cat > conftest.s <<EOF | |
7469 | .data | |
7470 | .uleb128 L2 - L1 | |
7471 | L1: | |
7472 | .uleb128 1280 | |
7473 | .sleb128 -1010 | |
7474 | L2: | |
7475 | EOF | |
7476 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
78e766a0 RH |
7477 | gcc_cv_as_leb128="yes" |
7478 | ||
7479 | # GAS versions before 2.11 do not support uleb128, | |
7480 | # despite appearing to. | |
7481 | # ??? There exists an elf-specific test that will crash | |
7482 | # the assembler. Perhaps it's better to figure out whether | |
7483 | # arbitrary sections are supported and try the test. | |
7484 | as_ver=`$gcc_cv_as --version 2>/dev/null | head -1` | |
7485 | if echo "$as_ver" | grep GNU > /dev/null; then | |
5fed851d | 7486 | as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` |
78e766a0 | 7487 | as_major=`echo $as_ver | sed 's/\..*//'` |
3d399d67 | 7488 | as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` |
78e766a0 RH |
7489 | if test $as_major -eq 2 -a $as_minor -lt 11; then |
7490 | gcc_cv_as_leb128="no" | |
7491 | fi | |
fbe42b1b | 7492 | fi |
b7460f24 RH |
7493 | fi |
7494 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
7495 | fi | |
7496 | if test x"$gcc_cv_as_leb128" = xyes; then | |
093e61a6 | 7497 | cat >> confdefs.h <<\EOF |
b7460f24 | 7498 | #define HAVE_AS_LEB128 1 |
093e61a6 | 7499 | EOF |
b7460f24 RH |
7500 | |
7501 | fi | |
093e61a6 | 7502 | echo "$ac_t""$gcc_cv_as_leb128" 1>&6 |
b7460f24 | 7503 | |
093e61a6 | 7504 | echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6 |
7468e0b5 | 7505 | echo "configure:7506: checking assembler eh_frame optimization" >&5 |
c64688ae | 7506 | gcc_cv_as_eh_frame=no |
34a86c2b | 7507 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7508 | if test $gcc_cv_gas_major_version -eq 2 \ |
7509 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7510 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7511 | ||
7512 | ||
7513 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7514 | gcc_cv_as_eh_frame="yes" | |
7515 | fi | |
093e61a6 | 7516 | |
ad9c4d9f NN |
7517 | |
7518 | fi | |
7519 | ||
c64688ae RH |
7520 | elif test x$gcc_cv_as != x; then |
7521 | # Check if this is GAS. | |
41948db5 SS |
7522 | as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1` |
7523 | rm -f a.out 2> /dev/null | |
c64688ae RH |
7524 | if echo "$as_ver" | grep GNU > /dev/null; then |
7525 | # Versions up to and including 2.11.0 may mis-optimize | |
7526 | # .eh_frame data. Try something. | |
7527 | cat > conftest.s <<EOF | |
7528 | .text | |
7529 | .LFB1: | |
7530 | .4byte 0 | |
7531 | .L1: | |
7532 | .4byte 0 | |
7533 | .LFE1: | |
7534 | .section .eh_frame,"aw",@progbits | |
7535 | __FRAME_BEGIN__: | |
7536 | .4byte .LECIE1-.LSCIE1 | |
7537 | .LSCIE1: | |
7538 | .4byte 0x0 | |
7539 | .byte 0x1 | |
7540 | .ascii "z\0" | |
7541 | .byte 0x1 | |
7542 | .byte 0x78 | |
7543 | .byte 0x1a | |
7544 | .byte 0x0 | |
7545 | .byte 0x4 | |
7546 | .4byte 1 | |
7547 | .p2align 1 | |
7548 | .LECIE1: | |
7549 | .LSFDE1: | |
7550 | .4byte .LEFDE1-.LASFDE1 | |
7551 | .LASFDE1: | |
7552 | .4byte .LASFDE1-__FRAME_BEGIN__ | |
7553 | .4byte .LFB1 | |
7554 | .4byte .LFE1-.LFB1 | |
7555 | .byte 0x4 | |
7556 | .4byte .LFE1-.LFB1 | |
7557 | .byte 0x4 | |
7558 | .4byte .L1-.LFB1 | |
7559 | .LEFDE1: | |
7560 | EOF | |
01efb963 | 7561 | cat > conftest.lit <<EOF |
c64688ae RH |
7562 | 0000 10000000 00000000 017a0001 781a0004 .........z..x... |
7563 | 0010 01000000 12000000 18000000 00000000 ................ | |
093e61a6 | 7564 | 0020 08000000 04080000 0044 .........D |
01efb963 AS |
7565 | EOF |
7566 | cat > conftest.big <<EOF | |
7567 | 0000 00000010 00000000 017a0001 781a0004 .........z..x... | |
7568 | 0010 00000001 00000012 00000018 00000000 ................ | |
093e61a6 | 7569 | 0020 00000008 04000000 0844 .........D |
c64688ae RH |
7570 | EOF |
7571 | # If the assembler didn't choke, and we can objdump, | |
7572 | # and we got the correct data, then succeed. | |
7573 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ | |
3cae5780 | 7574 | && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \ |
c64688ae | 7575 | | tail -3 > conftest.got \ |
01efb963 AS |
7576 | && { cmp conftest.lit conftest.got > /dev/null 2>&1 \ |
7577 | || cmp conftest.big conftest.got > /dev/null 2>&1; } | |
c64688ae RH |
7578 | then |
7579 | gcc_cv_as_eh_frame="yes" | |
7580 | else | |
7581 | gcc_cv_as_eh_frame="bad" | |
7582 | if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then | |
093e61a6 | 7583 | cat >> confdefs.h <<\EOF |
c64688ae | 7584 | #define USE_AS_TRADITIONAL_FORMAT 1 |
093e61a6 | 7585 | EOF |
c64688ae RH |
7586 | |
7587 | fi | |
7588 | fi | |
7589 | fi | |
7590 | rm -f conftest.* | |
7591 | fi | |
093e61a6 | 7592 | echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6 |
c64688ae | 7593 | |
093e61a6 | 7594 | echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6 |
7468e0b5 | 7595 | echo "configure:7596: checking assembler section merging support" >&5 |
201556f0 | 7596 | gcc_cv_as_shf_merge=no |
34a86c2b | 7597 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7598 | if test $gcc_cv_gas_major_version -eq 2 \ |
7599 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7600 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7601 | ||
7602 | ||
7603 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null; then | |
7604 | gcc_cv_as_shf_merge=yes | |
7605 | fi | |
093e61a6 | 7606 | |
ad9c4d9f NN |
7607 | |
7608 | fi | |
7609 | ||
201556f0 JJ |
7610 | elif test x$gcc_cv_as != x; then |
7611 | # Check if we support SHF_MERGE sections | |
7612 | echo '.section .rodata.str, "aMS", @progbits, 1' > conftest.s | |
a8b7afb9 | 7613 | if $gcc_cv_as --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1; then |
201556f0 JJ |
7614 | gcc_cv_as_shf_merge=yes |
7615 | fi | |
7616 | rm -f conftest.s conftest.o | |
7617 | fi | |
7618 | if test x"$gcc_cv_as_shf_merge" = xyes; then | |
093e61a6 | 7619 | cat >> confdefs.h <<\EOF |
201556f0 | 7620 | #define HAVE_GAS_SHF_MERGE 1 |
093e61a6 | 7621 | EOF |
201556f0 JJ |
7622 | |
7623 | fi | |
093e61a6 | 7624 | echo "$ac_t""$gcc_cv_as_shf_merge" 1>&6 |
201556f0 | 7625 | |
093e61a6 | 7626 | echo $ac_n "checking assembler thread-local storage support""... $ac_c" 1>&6 |
7468e0b5 | 7627 | echo "configure:7628: checking assembler thread-local storage support" >&5 |
f996902d RH |
7628 | gcc_cv_as_tls=no |
7629 | conftest_s= | |
7630 | tls_first_major= | |
7631 | tls_first_minor= | |
9739c90c | 7632 | tls_as_opt= |
f996902d | 7633 | case "$target" in |
6f9b006d RH |
7634 | alpha*-*-*) |
7635 | conftest_s=' | |
7636 | .section ".tdata","awT",@progbits | |
7637 | foo: .long 25 | |
7638 | .text | |
7639 | ldq $27,__tls_get_addr($29) !literal!1 | |
7640 | lda $16,foo($29) !tlsgd!1 | |
7641 | jsr $26,($27),__tls_get_addr !lituse_tlsgd!1 | |
7642 | ldq $27,__tls_get_addr($29) !literal!2 | |
7643 | lda $16,foo($29) !tlsldm!2 | |
7644 | jsr $26,($27),__tls_get_addr !lituse_tlsldm!2 | |
7645 | ldq $1,foo($29) !gotdtprel | |
7646 | ldah $2,foo($29) !dtprelhi | |
7647 | lda $3,foo($2) !dtprello | |
7648 | lda $4,foo($29) !dtprel | |
7649 | ldq $1,foo($29) !gottprel | |
7650 | ldah $2,foo($29) !tprelhi | |
7651 | lda $3,foo($2) !tprello | |
7652 | lda $4,foo($29) !tprel' | |
7653 | tls_first_major=2 | |
7654 | tls_first_minor=13 | |
7655 | ;; | |
f996902d RH |
7656 | i[34567]86-*-*) |
7657 | conftest_s=' | |
7658 | .section ".tdata","awT",@progbits | |
7659 | foo: .long 25 | |
7660 | .text | |
7661 | movl %gs:0, %eax | |
7662 | leal foo@TLSGD(,%ebx,1), %eax | |
7663 | leal foo@TLSLDM(%ebx), %eax | |
7664 | leal foo@DTPOFF(%eax), %edx | |
7665 | movl foo@GOTTPOFF(%ebx), %eax | |
7666 | subl foo@GOTTPOFF(%ebx), %eax | |
75d38379 JJ |
7667 | addl foo@GOTNTPOFF(%ebx), %eax |
7668 | movl foo@INDNTPOFF, %eax | |
f996902d RH |
7669 | movl $foo@TPOFF, %eax |
7670 | subl $foo@TPOFF, %eax | |
7671 | leal foo@NTPOFF(%ecx), %eax' | |
7672 | tls_first_major=2 | |
75d38379 JJ |
7673 | tls_first_minor=14 |
7674 | ;; | |
7675 | x86_64-*-*) | |
7676 | conftest_s=' | |
7677 | .section ".tdata","awT",@progbits | |
7678 | foo: .long 25 | |
7679 | .text | |
7680 | movq %fs:0, %rax | |
7681 | leaq foo@TLSGD(%rip), %rdi | |
7682 | leaq foo@TLSLD(%rip), %rdi | |
7683 | leaq foo@DTPOFF(%rax), %rdx | |
7684 | movq foo@GOTTPOFF(%rip), %rax | |
7685 | movq $foo@TPOFF, %rax' | |
7686 | tls_first_major=2 | |
7687 | tls_first_minor=14 | |
f996902d | 7688 | ;; |
7b6e506e RH |
7689 | ia64-*-*) |
7690 | conftest_s=' | |
7691 | .section ".tdata","awT",@progbits | |
7692 | foo: data8 25 | |
7693 | .text | |
7694 | addl r16 = @ltoff(@dtpmod(foo#)), gp | |
7695 | addl r17 = @ltoff(@dtprel(foo#)), gp | |
7696 | addl r18 = @ltoff(@tprel(foo#)), gp | |
7697 | addl r19 = @dtprel(foo#), gp | |
7698 | adds r21 = @dtprel(foo#), r13 | |
7699 | movl r23 = @dtprel(foo#) | |
7700 | addl r20 = @tprel(foo#), gp | |
7701 | adds r22 = @tprel(foo#), r13 | |
7702 | movl r24 = @tprel(foo#)' | |
7703 | tls_first_major=2 | |
7704 | tls_first_minor=13 | |
7705 | ;; | |
c4501e62 JJ |
7706 | powerpc-*-*) |
7707 | conftest_s=' | |
7708 | .section ".tdata","awT",@progbits | |
7709 | .align 2 | |
7710 | ld0: .space 4 | |
7711 | ld1: .space 4 | |
7712 | x1: .space 4 | |
7713 | x2: .space 4 | |
7714 | x3: .space 4 | |
7715 | .text | |
7716 | addi 3,31,ld0@got@tlsgd | |
7717 | bl __tls_get_addr | |
7718 | addi 3,31,x1@got@tlsld | |
7719 | bl __tls_get_addr | |
7720 | addi 9,3,x1@dtprel | |
7721 | addis 9,3,x2@dtprel@ha | |
7722 | addi 9,9,x2@dtprel@l | |
7723 | lwz 9,x3@got@tprel(31) | |
7724 | add 9,9,x@tls | |
7725 | addi 9,2,x1@tprel | |
7726 | addis 9,2,x2@tprel@ha | |
7727 | addi 9,9,x2@tprel@l' | |
7728 | tls_first_major=2 | |
7729 | tls_first_minor=14 | |
9739c90c | 7730 | tls_as_opt=-a32 |
c4501e62 JJ |
7731 | ;; |
7732 | powerpc64-*-*) | |
7733 | conftest_s=' | |
7734 | .section ".tdata","awT",@progbits | |
7735 | .align 3 | |
7736 | ld0: .space 8 | |
7737 | ld1: .space 8 | |
7738 | x1: .space 8 | |
7739 | x2: .space 8 | |
7740 | x3: .space 8 | |
7741 | .text | |
7742 | addi 3,2,ld0@got@tlsgd | |
7743 | bl .__tls_get_addr | |
7744 | nop | |
7745 | addi 3,2,ld1@toc | |
7746 | bl .__tls_get_addr | |
7747 | nop | |
7748 | addi 3,2,x1@got@tlsld | |
7749 | bl .__tls_get_addr | |
7750 | nop | |
7751 | addi 9,3,x1@dtprel | |
7752 | bl .__tls_get_addr | |
7753 | nop | |
7754 | addis 9,3,x2@dtprel@ha | |
7755 | addi 9,9,x2@dtprel@l | |
7756 | bl .__tls_get_addr | |
7757 | nop | |
7758 | ld 9,x3@got@dtprel(2) | |
7759 | add 9,9,3 | |
7760 | bl .__tls_get_addr | |
7761 | nop' | |
7762 | tls_first_major=2 | |
7763 | tls_first_minor=14 | |
9739c90c | 7764 | tls_as_opt=-a64 |
c4501e62 | 7765 | ;; |
fd3cd001 UW |
7766 | s390-*-*) |
7767 | conftest_s=' | |
7768 | .section ".tdata","awT",@progbits | |
7769 | foo: .long 25 | |
7770 | .text | |
7771 | .long foo@TLSGD | |
7772 | .long foo@TLSLDM | |
7773 | .long foo@DTPOFF | |
7774 | .long foo@NTPOFF | |
7775 | .long foo@GOTNTPOFF | |
7776 | .long foo@INDNTPOFF | |
7777 | l %r1,foo@GOTNTPOFF(%r12) | |
7778 | l %r1,0(%r1):tls_load:foo | |
7779 | bas %r14,0(%r1,%r13):tls_gdcall:foo | |
7780 | bas %r14,0(%r1,%r13):tls_ldcall:foo' | |
7781 | tls_first_major=2 | |
7782 | tls_first_minor=14 | |
9739c90c | 7783 | tls_as_opt=-m31 |
fd3cd001 UW |
7784 | ;; |
7785 | s390x-*-*) | |
7786 | conftest_s=' | |
7787 | .section ".tdata","awT",@progbits | |
7788 | foo: .long 25 | |
7789 | .text | |
7790 | .quad foo@TLSGD | |
7791 | .quad foo@TLSLDM | |
7792 | .quad foo@DTPOFF | |
7793 | .quad foo@NTPOFF | |
7794 | .quad foo@GOTNTPOFF | |
7795 | lg %r1,foo@GOTNTPOFF(%r12) | |
7796 | larl %r1,foo@INDNTPOFF | |
7797 | brasl %r14,__tls_get_offset@PLT:tls_gdcall:foo | |
7798 | brasl %r14,__tls_get_offset@PLT:tls_ldcall:foo' | |
7799 | tls_first_major=2 | |
7800 | tls_first_minor=14 | |
9739c90c | 7801 | tls_as_opt="-m64 -Aesame" |
fd3cd001 | 7802 | ;; |
f996902d RH |
7803 | esac |
7804 | if test -z "$tls_first_major"; then | |
7805 | : | |
34a86c2b | 7806 | elif test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7807 | if test $gcc_cv_gas_major_version -eq $tls_first_major \ |
7808 | && test $gcc_cv_gas_minor_version -ge $tls_first_minor \ | |
7809 | || test $gcc_cv_gas_major_version -gt $tls_first_major ; then | |
7810 | ||
7811 | ||
f996902d | 7812 | gcc_cv_as_tls=yes |
093e61a6 | 7813 | |
ad9c4d9f NN |
7814 | |
7815 | fi | |
7816 | ||
f996902d RH |
7817 | elif test x$gcc_cv_as != x; then |
7818 | echo "$conftest_s" > conftest.s | |
9739c90c | 7819 | if $gcc_cv_as $tls_as_opt --fatal-warnings -o conftest.o conftest.s > /dev/null 2>&1 |
f996902d RH |
7820 | then |
7821 | gcc_cv_as_tls=yes | |
7822 | fi | |
7823 | rm -f conftest.s conftest.o | |
7824 | fi | |
7825 | if test "$gcc_cv_as_tls" = yes; then | |
093e61a6 | 7826 | cat >> confdefs.h <<\EOF |
f996902d | 7827 | #define HAVE_AS_TLS 1 |
093e61a6 | 7828 | EOF |
f996902d RH |
7829 | |
7830 | fi | |
093e61a6 | 7831 | echo "$ac_t""$gcc_cv_as_tls" 1>&6 |
f996902d | 7832 | |
3a37b08e RH |
7833 | case "$target" in |
7834 | # All TARGET_ABI_OSF targets. | |
7835 | alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*) | |
093e61a6 | 7836 | echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6 |
7468e0b5 | 7837 | echo "configure:7838: checking assembler supports explicit relocations" >&5 |
093e61a6 RS |
7838 | if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then |
7839 | echo $ac_n "(cached) $ac_c" 1>&6 | |
3a37b08e | 7840 | else |
093e61a6 | 7841 | |
3a37b08e | 7842 | gcc_cv_as_explicit_relocs=unknown |
34a86c2b | 7843 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
7844 | if test $gcc_cv_gas_major_version -eq 2 \ |
7845 | && test $gcc_cv_gas_minor_version -ge 12 \ | |
7846 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
7847 | ||
7848 | ||
3a37b08e | 7849 | gcc_cv_as_explicit_relocs=yes |
093e61a6 | 7850 | |
ad9c4d9f NN |
7851 | |
7852 | fi | |
7853 | ||
3a37b08e RH |
7854 | elif test x$gcc_cv_as != x; then |
7855 | cat > conftest.s << 'EOF' | |
7856 | .set nomacro | |
7857 | .text | |
7858 | extbl $3, $2, $3 !lituse_bytoff!1 | |
7859 | ldq $2, a($29) !literal!1 | |
7860 | ldq $4, b($29) !literal!2 | |
7861 | ldq_u $3, 0($2) !lituse_base!1 | |
7862 | ldq $27, f($29) !literal!5 | |
7863 | jsr $26, ($27), f !lituse_jsr!5 | |
7864 | ldah $29, 0($26) !gpdisp!3 | |
7865 | lda $0, c($29) !gprel | |
7866 | ldah $1, d($29) !gprelhigh | |
7867 | lda $1, d($1) !gprellow | |
7868 | lda $29, 0($29) !gpdisp!3 | |
7869 | EOF | |
7870 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
7871 | gcc_cv_as_explicit_relocs=yes | |
7872 | else | |
7873 | gcc_cv_as_explicit_relocs=no | |
7874 | fi | |
7875 | rm -f conftest.s conftest.o | |
7876 | fi | |
093e61a6 | 7877 | |
cafe096b | 7878 | fi |
cafe096b | 7879 | |
093e61a6 RS |
7880 | echo "$ac_t""$gcc_cv_as_explicit_relocs" 1>&6 |
7881 | if test "x$gcc_cv_as_explicit_relocs" = xyes; then | |
7882 | cat >> confdefs.h <<\EOF | |
3a37b08e | 7883 | #define HAVE_AS_EXPLICIT_RELOCS 1 |
093e61a6 | 7884 | EOF |
3a37b08e RH |
7885 | |
7886 | fi | |
7887 | ;; | |
1cb36a98 | 7888 | sparc*-*-*) |
093e61a6 | 7889 | echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 |
7468e0b5 | 7890 | echo "configure:7891: checking assembler .register pseudo-op support" >&5 |
093e61a6 RS |
7891 | if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then |
7892 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 7893 | else |
093e61a6 | 7894 | |
5b68c389 AO |
7895 | gcc_cv_as_register_pseudo_op=unknown |
7896 | if test x$gcc_cv_as != x; then | |
7897 | # Check if we have .register | |
7898 | echo ".register %g2, #scratch" > conftest.s | |
7899 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
1cb36a98 | 7900 | gcc_cv_as_register_pseudo_op=yes |
5b68c389 AO |
7901 | else |
7902 | gcc_cv_as_register_pseudo_op=no | |
7903 | fi | |
7904 | rm -f conftest.s conftest.o | |
7905 | fi | |
093e61a6 | 7906 | |
cafe096b | 7907 | fi |
cafe096b | 7908 | |
093e61a6 RS |
7909 | echo "$ac_t""$gcc_cv_as_register_pseudo_op" 1>&6 |
7910 | if test "x$gcc_cv_as_register_pseudo_op" = xyes; then | |
7911 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 7912 | #define HAVE_AS_REGISTER_PSEUDO_OP 1 |
093e61a6 | 7913 | EOF |
1cb36a98 | 7914 | |
1cb36a98 | 7915 | fi |
1cb36a98 | 7916 | |
093e61a6 | 7917 | echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6 |
7468e0b5 | 7918 | echo "configure:7919: checking assembler supports -relax" >&5 |
093e61a6 RS |
7919 | if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then |
7920 | echo $ac_n "(cached) $ac_c" 1>&6 | |
e95b1e6a | 7921 | else |
093e61a6 | 7922 | |
e95b1e6a JJ |
7923 | gcc_cv_as_relax_opt=unknown |
7924 | if test x$gcc_cv_as != x; then | |
7925 | # Check if gas supports -relax | |
7926 | echo ".text" > conftest.s | |
7927 | if $gcc_cv_as -relax -o conftest.o conftest.s > /dev/null 2>&1; then | |
7928 | gcc_cv_as_relax_opt=yes | |
7929 | else | |
7930 | gcc_cv_as_relax_opt=no | |
7931 | fi | |
7932 | rm -f conftest.s conftest.o | |
7933 | fi | |
093e61a6 | 7934 | |
cafe096b | 7935 | fi |
cafe096b | 7936 | |
093e61a6 RS |
7937 | echo "$ac_t""$gcc_cv_as_relax_opt" 1>&6 |
7938 | if test "x$gcc_cv_as_relax_opt" = xyes; then | |
7939 | cat >> confdefs.h <<\EOF | |
e95b1e6a | 7940 | #define HAVE_AS_RELAX_OPTION 1 |
093e61a6 | 7941 | EOF |
e95b1e6a JJ |
7942 | |
7943 | fi | |
7944 | ||
093e61a6 | 7945 | echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 |
7468e0b5 | 7946 | echo "configure:7947: checking assembler and linker support unaligned pc related relocs" >&5 |
093e61a6 RS |
7947 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then |
7948 | echo $ac_n "(cached) $ac_c" 1>&6 | |
17e9e88c | 7949 | else |
093e61a6 | 7950 | |
17e9e88c JJ |
7951 | gcc_cv_as_sparc_ua_pcrel=unknown |
7952 | if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then | |
7953 | gcc_cv_as_sparc_ua_pcrel=no | |
7954 | echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s | |
cf7b8b0d JJ |
7955 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ |
7956 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then | |
7957 | gcc_cv_as_sparc_ua_pcrel=yes | |
17e9e88c JJ |
7958 | fi |
7959 | rm -f conftest.s conftest.o conftest | |
7960 | fi | |
093e61a6 | 7961 | |
cafe096b | 7962 | fi |
cafe096b | 7963 | |
093e61a6 RS |
7964 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel" 1>&6 |
7965 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then | |
7966 | cat >> confdefs.h <<\EOF | |
17e9e88c | 7967 | #define HAVE_AS_SPARC_UA_PCREL 1 |
093e61a6 | 7968 | EOF |
17e9e88c JJ |
7969 | |
7970 | fi | |
7971 | ||
093e61a6 | 7972 | echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6 |
7468e0b5 | 7973 | echo "configure:7974: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5 |
093e61a6 RS |
7974 | if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then |
7975 | echo $ac_n "(cached) $ac_c" 1>&6 | |
cf7b8b0d | 7976 | else |
093e61a6 | 7977 | |
cf7b8b0d JJ |
7978 | if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then |
7979 | gcc_cv_as_sparc_ua_pcrel_hidden=unknown | |
7980 | if test x$gcc_cv_objdump != x; then | |
7981 | gcc_cv_as_sparc_ua_pcrel_hidden=no | |
7982 | echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s | |
7983 | echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s | |
7984 | echo "foo: .skip 4" >> conftest.s | |
7985 | if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \ | |
7986 | && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \ | |
7987 | && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \ | |
7988 | | grep ' 31000000 07323334' > /dev/null 2>&1; then | |
7989 | if $gcc_cv_objdump -R conftest 2> /dev/null \ | |
7990 | | grep 'DISP32' > /dev/null 2>&1; then | |
7991 | : | |
7992 | else | |
7993 | gcc_cv_as_sparc_ua_pcrel_hidden=yes | |
7994 | fi | |
7995 | fi | |
7996 | fi | |
7997 | rm -f conftest.s conftest.o conftest | |
7998 | else | |
7999 | gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel" | |
8000 | fi | |
093e61a6 | 8001 | |
cafe096b | 8002 | fi |
cafe096b | 8003 | |
093e61a6 RS |
8004 | echo "$ac_t""$gcc_cv_as_sparc_ua_pcrel_hidden" 1>&6 |
8005 | if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then | |
8006 | cat >> confdefs.h <<\EOF | |
cf7b8b0d | 8007 | #define HAVE_AS_SPARC_UA_PCREL_HIDDEN 1 |
093e61a6 | 8008 | EOF |
cf7b8b0d JJ |
8009 | |
8010 | fi | |
8011 | ||
093e61a6 | 8012 | echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6 |
7468e0b5 | 8013 | echo "configure:8014: checking for assembler offsetable %lo() support" >&5 |
093e61a6 RS |
8014 | if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then |
8015 | echo $ac_n "(cached) $ac_c" 1>&6 | |
5b68c389 | 8016 | else |
093e61a6 | 8017 | |
22252625 JJ |
8018 | gcc_cv_as_offsetable_lo10=unknown |
8019 | if test "x$gcc_cv_as" != x; then | |
8020 | # Check if assembler has offsetable %lo() | |
8021 | echo "or %g1, %lo(ab) + 12, %g1" > conftest.s | |
8022 | echo "or %g1, %lo(ab + 12), %g1" > conftest1.s | |
8023 | if $gcc_cv_as -xarch=v9 -o conftest.o conftest.s \ | |
8024 | > /dev/null 2>&1 && | |
8025 | $gcc_cv_as -xarch=v9 -o conftest1.o conftest1.s \ | |
8026 | > /dev/null 2>&1; then | |
8027 | if cmp conftest.o conftest1.o > /dev/null 2>&1; then | |
5b68c389 | 8028 | gcc_cv_as_offsetable_lo10=no |
22252625 JJ |
8029 | else |
8030 | gcc_cv_as_offsetable_lo10=yes | |
5b68c389 | 8031 | fi |
22252625 JJ |
8032 | else |
8033 | gcc_cv_as_offsetable_lo10=no | |
5b68c389 | 8034 | fi |
22252625 JJ |
8035 | rm -f conftest.s conftest.o conftest1.s conftest1.o |
8036 | fi | |
093e61a6 | 8037 | |
cafe096b | 8038 | fi |
cafe096b | 8039 | |
093e61a6 RS |
8040 | echo "$ac_t""$gcc_cv_as_offsetable_lo10" 1>&6 |
8041 | if test "x$gcc_cv_as_offsetable_lo10" = xyes; then | |
8042 | cat >> confdefs.h <<\EOF | |
1cb36a98 | 8043 | #define HAVE_AS_OFFSETABLE_LO10 1 |
093e61a6 | 8044 | EOF |
1cb36a98 | 8045 | |
1cb36a98 | 8046 | fi |
43160d01 | 8047 | |
1cb36a98 RH |
8048 | ;; |
8049 | ||
c307e6dd | 8050 | i[34567]86-*-* | x86_64-*-*) |
093e61a6 | 8051 | echo $ac_n "checking assembler instructions""... $ac_c" 1>&6 |
7468e0b5 | 8052 | echo "configure:8053: checking assembler instructions" >&5 |
1cb36a98 | 8053 | gcc_cv_as_instructions= |
093e61a6 | 8054 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8055 | if test $gcc_cv_gas_major_version -eq 2 \ |
8056 | && test $gcc_cv_gas_minor_version -ge 9 \ | |
8057 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8058 | ||
8059 | ||
981d4858 | 8060 | gcc_cv_as_instructions="filds fists" |
093e61a6 | 8061 | |
ad9c4d9f NN |
8062 | |
8063 | fi | |
8064 | ||
981d4858 | 8065 | elif test x$gcc_cv_as != x; then |
53b5ce19 JW |
8066 | set "filds fists" "filds mem; fists mem" |
8067 | while test $# -gt 0 | |
8068 | do | |
8069 | echo "$2" > conftest.s | |
8070 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8071 | gcc_cv_as_instructions=${gcc_cv_as_instructions}$1" " | |
53b5ce19 JW |
8072 | fi |
8073 | shift 2 | |
8074 | done | |
8075 | rm -f conftest.s conftest.o | |
1cb36a98 | 8076 | fi |
981d4858 | 8077 | if test x"$gcc_cv_as_instructions" != x; then |
093e61a6 | 8078 | cat >> confdefs.h <<EOF |
ee7692d2 | 8079 | #define HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr 'a-z ' 'A-Z_'` 1 |
093e61a6 | 8080 | EOF |
981d4858 JM |
8081 | |
8082 | fi | |
093e61a6 | 8083 | echo "$ac_t""$gcc_cv_as_instructions" 1>&6 |
f88c65f7 | 8084 | |
093e61a6 | 8085 | echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6 |
7468e0b5 | 8086 | echo "configure:8087: checking assembler GOTOFF in data directives" >&5 |
f88c65f7 | 8087 | gcc_cv_as_gotoff_in_data=no |
34a86c2b | 8088 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8089 | if test $gcc_cv_gas_major_version -eq 2 \ |
8090 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8091 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8092 | ||
8093 | ||
f88c65f7 | 8094 | gcc_cv_as_gotoff_in_data=yes |
093e61a6 | 8095 | |
ad9c4d9f NN |
8096 | |
8097 | fi | |
8098 | ||
f88c65f7 RH |
8099 | elif test x$gcc_cv_as != x; then |
8100 | cat > conftest.s <<EOF | |
8101 | .text | |
8102 | .L0: | |
8103 | nop | |
8104 | .data | |
8105 | .long .L0@GOTOFF | |
8106 | EOF | |
8107 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8108 | gcc_cv_as_gotoff_in_data=yes | |
8109 | fi | |
8110 | fi | |
093e61a6 | 8111 | cat >> confdefs.h <<EOF |
f88c65f7 | 8112 | #define HAVE_AS_GOTOFF_IN_DATA `if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi` |
093e61a6 | 8113 | EOF |
f88c65f7 | 8114 | |
093e61a6 | 8115 | echo "$ac_t""$gcc_cv_as_gotoff_in_data" 1>&6 |
1cb36a98 | 8116 | ;; |
ef1ecf87 RH |
8117 | |
8118 | ia64*-*-*) | |
093e61a6 | 8119 | echo $ac_n "checking assembler supports ltoffx and ldxmov""... $ac_c" 1>&6 |
7468e0b5 | 8120 | echo "configure:8121: checking assembler supports ltoffx and ldxmov" >&5 |
093e61a6 RS |
8121 | if eval "test \"`echo '$''{'gcc_cv_as_ltoffx_ldxmov_relocs'+set}'`\" = set"; then |
8122 | echo $ac_n "(cached) $ac_c" 1>&6 | |
ef1ecf87 | 8123 | else |
093e61a6 | 8124 | |
ef1ecf87 | 8125 | gcc_cv_as_ltoffx_ldxmov_relocs=unknown |
ad9c4d9f NN |
8126 | if test $in_tree_gas = yes ; then |
8127 | if test $gcc_cv_gas_major_version -eq 2 \ | |
8128 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8129 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8130 | ||
8131 | ||
8132 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
093e61a6 | 8133 | |
ad9c4d9f NN |
8134 | |
8135 | fi | |
8136 | ||
ef1ecf87 RH |
8137 | elif test x$gcc_cv_as != x; then |
8138 | cat > conftest.s << 'EOF' | |
8139 | .text | |
8140 | addl r15 = @ltoffx(x#), gp | |
8141 | ;; | |
8142 | ld8.mov r16 = [r15], x# | |
8143 | EOF | |
8144 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then | |
8145 | gcc_cv_as_ltoffx_ldxmov_relocs=yes | |
8146 | else | |
8147 | gcc_cv_as_ltoffx_ldxmov_relocs=no | |
8148 | fi | |
8149 | rm -f conftest.s conftest.o | |
8150 | fi | |
093e61a6 | 8151 | |
cafe096b | 8152 | fi |
cafe096b | 8153 | |
093e61a6 RS |
8154 | echo "$ac_t""$gcc_cv_as_ltoffx_ldxmov_relocs" 1>&6 |
8155 | if test "x$gcc_cv_as_ltoffx_ldxmov_relocs" = xyes; then | |
8156 | cat >> confdefs.h <<\EOF | |
ef1ecf87 | 8157 | #define HAVE_AS_LTOFFX_LDXMOV_RELOCS 1 |
093e61a6 | 8158 | EOF |
ef1ecf87 RH |
8159 | |
8160 | fi | |
8161 | ;; | |
1cb36a98 | 8162 | esac |
53b5ce19 | 8163 | |
093e61a6 | 8164 | echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6 |
7468e0b5 | 8165 | echo "configure:8166: checking assembler dwarf2 debug_line support" >&5 |
9d147085 RH |
8166 | gcc_cv_as_dwarf2_debug_line=no |
8167 | # ??? Not all targets support dwarf2 debug_line, even within a version | |
8168 | # of gas. Moreover, we need to emit a valid instruction to trigger any | |
8169 | # info to the output file. So, as supported targets are added to gas 2.11, | |
8170 | # add some instruction here to (also) show we expect this might work. | |
8171 | # ??? Once 2.11 is released, probably need to add first known working | |
8172 | # version to the per-target configury. | |
8173 | case "$target" in | |
80486e06 | 8174 | i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \ |
2853bc5a HPN |
8175 | | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \ |
8176 | | xstormy16*-*-* | cris-*-*) | |
9d147085 RH |
8177 | insn="nop" |
8178 | ;; | |
8179 | ia64*-*-*) | |
8180 | insn="nop 0" | |
8181 | ;; | |
2853bc5a HPN |
8182 | mmix-*-*) |
8183 | insn="swym 0" | |
8184 | ;; | |
9d147085 | 8185 | esac |
34a86c2b | 8186 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8187 | if test $gcc_cv_gas_major_version -eq 2 \ |
8188 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8189 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8190 | ||
8191 | ||
8192 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8193 | && test x"$insn" != x ; then | |
8194 | gcc_cv_as_dwarf2_debug_line="yes" | |
8195 | fi | |
093e61a6 | 8196 | |
ad9c4d9f NN |
8197 | |
8198 | fi | |
8199 | ||
9d147085 | 8200 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
acc187f5 RH |
8201 | echo ' .file 1 "conftest.s"' > conftest.s |
8202 | echo ' .loc 1 3 0' >> conftest.s | |
9d147085 | 8203 | echo " $insn" >> conftest.s |
981975b6 | 8204 | # ??? This fails with non-gnu grep. |
9d147085 RH |
8205 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \ |
8206 | && grep debug_line conftest.o > /dev/null 2>&1 ; then | |
981975b6 | 8207 | # The .debug_line file table must be in the exact order that |
eaec9b3d | 8208 | # we specified the files, since these indices are also used |
981975b6 RH |
8209 | # by DW_AT_decl_file. Approximate this test by testing if |
8210 | # the assembler bitches if the same index is assigned twice. | |
8211 | echo ' .file 1 "foo.s"' > conftest.s | |
8212 | echo ' .file 1 "bar.s"' >> conftest.s | |
8213 | if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 | |
8214 | then | |
8215 | gcc_cv_as_dwarf2_debug_line="no" | |
8216 | else | |
8217 | gcc_cv_as_dwarf2_debug_line="yes" | |
8218 | fi | |
9d147085 RH |
8219 | fi |
8220 | rm -f conftest.s conftest.o conftest.nm1 conftest.nm2 | |
8221 | fi | |
8222 | if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then | |
093e61a6 | 8223 | cat >> confdefs.h <<\EOF |
9d147085 | 8224 | #define HAVE_AS_DWARF2_DEBUG_LINE 1 |
093e61a6 | 8225 | EOF |
9d147085 RH |
8226 | |
8227 | fi | |
093e61a6 | 8228 | echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 |
9d147085 | 8229 | |
093e61a6 | 8230 | echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6 |
7468e0b5 | 8231 | echo "configure:8232: checking assembler --gdwarf2 support" >&5 |
5f0e9ea2 | 8232 | gcc_cv_as_gdwarf2_flag=no |
34a86c2b | 8233 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8234 | if test $gcc_cv_gas_major_version -eq 2 \ |
8235 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8236 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8237 | ||
8238 | ||
8239 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8240 | && test x"$insn" != x ; then | |
8241 | gcc_cv_as_gdwarf2_flag="yes" | |
8242 | fi | |
093e61a6 | 8243 | |
ad9c4d9f NN |
8244 | |
8245 | fi | |
8246 | ||
5f0e9ea2 GK |
8247 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8248 | echo '' > conftest.s | |
8249 | # ??? This fails with non-gnu grep. | |
8250 | if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1 | |
8251 | then | |
8252 | gcc_cv_as_gdwarf2_flag="yes" | |
8253 | fi | |
8254 | rm -f conftest.s conftest.o | |
8255 | fi | |
8256 | if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then | |
093e61a6 | 8257 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8258 | #define HAVE_AS_GDWARF2_DEBUG_FLAG 1 |
093e61a6 | 8259 | EOF |
5f0e9ea2 GK |
8260 | |
8261 | fi | |
093e61a6 | 8262 | echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6 |
5f0e9ea2 | 8263 | |
093e61a6 | 8264 | echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6 |
7468e0b5 | 8265 | echo "configure:8266: checking assembler --gstabs support" >&5 |
5f0e9ea2 | 8266 | gcc_cv_as_gstabs_flag=no |
34a86c2b | 8267 | if test $in_tree_gas = yes ; then |
ad9c4d9f NN |
8268 | if test $gcc_cv_gas_major_version -eq 2 \ |
8269 | && test $gcc_cv_gas_minor_version -ge 11 \ | |
8270 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8271 | ||
8272 | ||
8273 | if grep 'obj_format = elf' ../gas/Makefile > /dev/null \ | |
8274 | && test x"$insn" != x ; then | |
8275 | gcc_cv_as_gstabs_flag="yes" | |
8276 | fi | |
093e61a6 | 8277 | |
ad9c4d9f NN |
8278 | |
8279 | fi | |
8280 | ||
5f0e9ea2 GK |
8281 | elif test x$gcc_cv_as != x -a x"$insn" != x ; then |
8282 | echo '' > conftest.s | |
8283 | # ??? This fails with non-gnu grep. | |
8284 | if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then | |
8285 | gcc_cv_as_gstabs_flag="yes" | |
807ca3d4 RO |
8286 | # The native Solaris 9/Intel assembler doesn't understand --gstabs |
8287 | # and warns about it, but still exits successfully. So check for | |
8288 | # this. | |
8289 | if $gcc_cv_as --gstabs -o conftest.o conftest.s 2>&1 | \ | |
8290 | grep -i warning > /dev/null ; then | |
8291 | gcc_cv_as_gstabs_flag="no" | |
8292 | fi | |
5f0e9ea2 GK |
8293 | fi |
8294 | rm -f conftest.s conftest.o | |
8295 | fi | |
8296 | if test x"$gcc_cv_as_gstabs_flag" = xyes; then | |
093e61a6 | 8297 | cat >> confdefs.h <<\EOF |
5f0e9ea2 | 8298 | #define HAVE_AS_GSTABS_DEBUG_FLAG 1 |
093e61a6 | 8299 | EOF |
5f0e9ea2 GK |
8300 | |
8301 | fi | |
093e61a6 | 8302 | echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6 |
5f0e9ea2 | 8303 | |
093e61a6 | 8304 | echo $ac_n "checking linker read-only and read-write section mixing""... $ac_c" 1>&6 |
7468e0b5 | 8305 | echo "configure:8306: checking linker read-only and read-write section mixing" >&5 |
96d0f4dc | 8306 | gcc_cv_ld_ro_rw_mix=unknown |
34a86c2b | 8307 | if test $in_tree_ld = yes ; then |
96d0f4dc JJ |
8308 | 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 |
8309 | gcc_cv_ld_ro_rw_mix=read-write | |
8310 | fi | |
8311 | elif test x$gcc_cv_as != x -a x$gcc_cv_ld != x -a x$gcc_cv_objdump != x ; then | |
90e145da KC |
8312 | echo '.section myfoosect, "a"' > conftest1.s |
8313 | echo '.section myfoosect, "aw"' > conftest2.s | |
96d0f4dc | 8314 | echo '.byte 1' >> conftest2.s |
90e145da | 8315 | echo '.section myfoosect, "a"' > conftest3.s |
96d0f4dc | 8316 | echo '.byte 0' >> conftest3.s |
6cd656d0 KC |
8317 | if $gcc_cv_as -o conftest1.o conftest1.s > /dev/null 2>&1 \ |
8318 | && $gcc_cv_as -o conftest2.o conftest2.s > /dev/null 2>&1 \ | |
8319 | && $gcc_cv_as -o conftest3.o conftest3.s > /dev/null 2>&1 \ | |
96d0f4dc | 8320 | && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ |
c6cc7e13 | 8321 | conftest2.o conftest3.o > /dev/null 2>&1; then |
96d0f4dc | 8322 | gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ |
c6cc7e13 | 8323 | | sed -e '/myfoosect/!d' -e N` |
96d0f4dc JJ |
8324 | if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then |
8325 | if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then | |
8326 | gcc_cv_ld_ro_rw_mix=read-only | |
8327 | else | |
8328 | gcc_cv_ld_ro_rw_mix=read-write | |
8329 | fi | |
8330 | fi | |
8331 | fi | |
8332 | rm -f conftest.* conftest[123].* | |
8333 | fi | |
8334 | if test x$gcc_cv_ld_ro_rw_mix = xread-write; then | |
093e61a6 | 8335 | cat >> confdefs.h <<\EOF |
96d0f4dc | 8336 | #define HAVE_LD_RO_RW_SECTION_MIXING 1 |
093e61a6 | 8337 | EOF |
96d0f4dc JJ |
8338 | |
8339 | fi | |
093e61a6 | 8340 | echo "$ac_t""$gcc_cv_ld_ro_rw_mix" 1>&6 |
96d0f4dc | 8341 | |
093e61a6 | 8342 | echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6 |
7468e0b5 | 8343 | echo "configure:8344: checking linker PT_GNU_EH_FRAME support" >&5 |
275b60d6 | 8344 | gcc_cv_ld_eh_frame_hdr=no |
34a86c2b | 8345 | if test $in_tree_ld = yes ; then |
275b60d6 JJ |
8346 | 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 |
8347 | gcc_cv_ld_eh_frame_hdr=yes | |
8348 | fi | |
8349 | elif test x$gcc_cv_ld != x; then | |
8350 | # Check if linker supports --eh-frame-hdr option | |
8351 | if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then | |
8352 | gcc_cv_ld_eh_frame_hdr=yes | |
8353 | fi | |
8354 | fi | |
8355 | if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then | |
093e61a6 | 8356 | cat >> confdefs.h <<\EOF |
275b60d6 | 8357 | #define HAVE_LD_EH_FRAME_HDR 1 |
093e61a6 | 8358 | EOF |
275b60d6 JJ |
8359 | |
8360 | fi | |
093e61a6 | 8361 | echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6 |
275b60d6 | 8362 | |
24a4dd31 | 8363 | echo $ac_n "checking linker position independent executable support""... $ac_c" 1>&6 |
7468e0b5 | 8364 | echo "configure:8365: checking linker position independent executable support" >&5 |
24a4dd31 JJ |
8365 | gcc_cv_ld_pie=no |
8366 | if test $in_tree_ld = yes ; then | |
8367 | 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 | |
8368 | gcc_cv_ld_pie=yes | |
8369 | fi | |
8370 | elif test x$gcc_cv_ld != x; then | |
8371 | # Check if linker supports -pie option | |
8372 | if $gcc_cv_ld --help 2>/dev/null | grep -- -pie > /dev/null; then | |
8373 | gcc_cv_ld_pie=yes | |
8374 | fi | |
8375 | fi | |
8376 | if test x"$gcc_cv_ld_pie" = xyes; then | |
8377 | cat >> confdefs.h <<\EOF | |
8378 | #define HAVE_LD_PIE 1 | |
8379 | EOF | |
8380 | ||
8381 | fi | |
8382 | echo "$ac_t""$gcc_cv_ld_pie" 1>&6 | |
8383 | ||
4357a6c3 CD |
8384 | # Miscellaneous target-specific checks. |
8385 | case "$target" in | |
8386 | mips*-*-*) | |
093e61a6 | 8387 | echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6 |
7468e0b5 | 8388 | echo "configure:8389: checking whether libgloss uses STARTUP directives consistently" >&5 |
4357a6c3 CD |
8389 | gcc_cv_mips_libgloss_startup=no |
8390 | gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss | |
8391 | if test "x$exec_prefix" = xNONE; then | |
8392 | if test "x$prefix" = xNONE; then | |
8393 | test_prefix=/usr/local | |
8394 | else | |
8395 | test_prefix=$prefix | |
8396 | fi | |
8397 | else | |
8398 | test_prefix=$exec_prefix | |
8399 | fi | |
8400 | for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld | |
8401 | do | |
8402 | if grep '^STARTUP' $f > /dev/null 2>&1; then | |
8403 | gcc_cv_mips_libgloss_startup=yes | |
8404 | break | |
8405 | fi | |
8406 | done | |
8407 | if test x"$gcc_cv_mips_libgloss_startup" = xyes; then | |
093e61a6 | 8408 | cat >> confdefs.h <<\EOF |
4357a6c3 | 8409 | #define HAVE_MIPS_LIBGLOSS_STARTUP_DIRECTIVES 1 |
093e61a6 | 8410 | EOF |
4357a6c3 CD |
8411 | |
8412 | fi | |
093e61a6 | 8413 | echo "$ac_t""$gcc_cv_mips_libgloss_startup" 1>&6 |
cafe096b | 8414 | |
093e61a6 | 8415 | echo $ac_n "checking whether the assembler has explicit relocation support""... $ac_c" 1>&6 |
7468e0b5 | 8416 | echo "configure:8417: checking whether the assembler has explicit relocation support" >&5 |
cafe096b EC |
8417 | if test x$gcc_cv_mips_explicit_relocs = x; then |
8418 | gcc_cv_mips_explicit_relocs=no | |
4665e56c | 8419 | if test $in_tree_gas = yes; then |
4dd03b27 RS |
8420 | if test $gcc_cv_gas_major_version -eq 2 \ |
8421 | && test $gcc_cv_gas_minor_version -ge 14 \ | |
8422 | || test $gcc_cv_gas_major_version -gt 2 ; then | |
8423 | ||
8424 | ||
8425 | gcc_cv_mips_explicit_relocs=yes | |
8426 | ||
8427 | ||
8428 | fi | |
8429 | ||
8430 | elif test x$gcc_cv_as != x; then | |
cafe096b EC |
8431 | echo ' lw $4,%gp_rel(foo)($4)' > conftest.s |
8432 | if $gcc_cv_as conftest.s -o conftest.o > /dev/null 2>&1; then | |
8433 | gcc_cv_mips_explicit_relocs=yes | |
8434 | fi | |
8435 | rm -f conftest.s conftest.o | |
8436 | fi | |
8437 | fi | |
8438 | if test $gcc_cv_mips_explicit_relocs = yes; then | |
8439 | test x$target_cpu_default != x || target_cpu_default=0 | |
8440 | target_cpu_default="(${target_cpu_default}|MASK_EXPLICIT_RELOCS)" | |
8441 | fi | |
093e61a6 | 8442 | echo "$ac_t""$gcc_cv_mips_explicit_relocs" 1>&6 |
4357a6c3 CD |
8443 | ;; |
8444 | esac | |
8445 | ||
9fb28a67 | 8446 | if test x$with_sysroot = x && test x$host = x$target \ |
047d636f | 8447 | && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then |
093e61a6 | 8448 | cat >> confdefs.h <<EOF |
793e9558 | 8449 | #define PREFIX_INCLUDE_DIR "$prefix/include" |
093e61a6 | 8450 | EOF |
793e9558 PB |
8451 | |
8452 | fi | |
8453 | ||
861bb6c1 | 8454 | # Figure out what language subdirectories are present. |
71205e0b MH |
8455 | # Look if the user specified --enable-languages="..."; if not, use |
8456 | # the environment variable $LANGUAGES if defined. $LANGUAGES might | |
8457 | # go away some day. | |
cc9a08e0 | 8458 | # NB: embedded tabs in this IF block -- do not untabify |
71205e0b MH |
8459 | if test x"${enable_languages+set}" != xset; then |
8460 | if test x"${LANGUAGES+set}" = xset; then | |
cc9a08e0 | 8461 | enable_languages="${LANGUAGES}" |
093e61a6 | 8462 | echo "configure: warning: setting LANGUAGES is deprecated, use --enable-languages instead" 1>&2 |
cc9a08e0 | 8463 | |
71205e0b MH |
8464 | else |
8465 | enable_languages=all | |
8466 | fi | |
d6c6b553 | 8467 | else |
015089dd TJ |
8468 | if test x"${enable_languages}" = x \ |
8469 | || test x"${enable_languages}" = xyes; | |
cc9a08e0 | 8470 | then |
093e61a6 | 8471 | { echo "configure: error: --enable-languages needs at least one language argument" 1>&2; exit 1; } |
d6c6b553 | 8472 | fi |
71205e0b | 8473 | fi |
cc9a08e0 | 8474 | enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` |
75382c6d TT |
8475 | |
8476 | # First scan to see if an enabled language requires some other language. | |
8477 | # We assume that a given config-lang.in will list all the language | |
8478 | # front ends it requires, even if some are required indirectly. | |
8479 | for lang in ${srcdir}/*/config-lang.in .. | |
8480 | do | |
8481 | case $lang in | |
8482 | ..) | |
8483 | ;; | |
8484 | # The odd quoting in the next line works around | |
8485 | # an apparent bug in bash 1.12 on linux. | |
8486 | ${srcdir}/[*]/config-lang.in) | |
8487 | ;; | |
8488 | *) | |
8489 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
8490 | this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang` | |
8491 | for other in $this_lang_requires | |
8492 | do | |
8493 | case ,${enable_languages}, in | |
8494 | *,$other,*) | |
8495 | ;; | |
8496 | *,all,*) | |
8497 | ;; | |
1bf17cc4 | 8498 | *,$lang_alias,*) |
75382c6d TT |
8499 | enable_languages="$enable_languages,$other" |
8500 | ;; | |
8501 | esac | |
8502 | done | |
8503 | ;; | |
8504 | esac | |
8505 | done | |
8506 | ||
015089dd TJ |
8507 | expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'` |
8508 | found_languages= | |
861bb6c1 JL |
8509 | subdirs= |
8510 | for lang in ${srcdir}/*/config-lang.in .. | |
8511 | do | |
8512 | case $lang in | |
8513 | ..) ;; | |
8514 | # The odd quoting in the next line works around | |
8515 | # an apparent bug in bash 1.12 on linux. | |
8516 | ${srcdir}/[*]/config-lang.in) ;; | |
71205e0b MH |
8517 | *) |
8518 | lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` | |
2b60b2cb AO |
8519 | this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` |
8520 | build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` | |
71205e0b MH |
8521 | if test "x$lang_alias" = x |
8522 | then | |
8523 | echo "$lang doesn't set \$language." 1>&2 | |
8524 | exit 1 | |
8525 | fi | |
2b60b2cb AO |
8526 | case ${build_by_default},${enable_languages}, in |
8527 | *,$lang_alias,*) add_this_lang=yes ;; | |
8528 | no,*) add_this_lang=no ;; | |
8529 | *,all,*) add_this_lang=yes ;; | |
8530 | *) add_this_lang=no ;; | |
8531 | esac | |
015089dd | 8532 | found_languages="${found_languages} ${lang_alias}" |
71205e0b MH |
8533 | if test x"${add_this_lang}" = xyes; then |
8534 | case $lang in | |
8535 | ${srcdir}/ada/config-lang.in) | |
1ffc5c6e | 8536 | if test x$have_gnat = xyes ; then |
71205e0b MH |
8537 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" |
8538 | fi | |
8539 | ;; | |
8540 | *) | |
8541 | subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" | |
8542 | ;; | |
8543 | esac | |
8544 | fi | |
8545 | ;; | |
861bb6c1 JL |
8546 | esac |
8547 | done | |
8548 | ||
015089dd TJ |
8549 | missing_languages= |
8550 | for expected_language in ${expected_languages} .. | |
093e61a6 | 8551 | do |
015089dd TJ |
8552 | if test "${expected_language}" != ..; then |
8553 | missing_language="${expected_language}" | |
8554 | if test "${expected_language}" = "c" \ | |
8555 | || test "${expected_language}" = "all"; then | |
8556 | missing_language= | |
8557 | fi | |
8558 | for found_language in ${found_languages} .. | |
093e61a6 | 8559 | do |
015089dd TJ |
8560 | if test "${found_language}" != ..; then |
8561 | if test "${expected_language}" = "${found_language}"; then | |
8562 | missing_language= | |
8563 | fi | |
8564 | fi | |
8565 | done | |
8566 | if test "x${missing_language}" != x; then | |
8567 | missing_languages="${missing_languages} ${missing_language}" | |
8568 | fi | |
8569 | fi | |
8570 | done | |
8571 | ||
8572 | if test "x$missing_languages" != x; then | |
093e61a6 | 8573 | { echo "configure: error: |
015089dd | 8574 | The following requested languages were not found:${missing_languages} |
093e61a6 | 8575 | The following languages were available: c${found_languages}" 1>&2; exit 1; } |
02ef40d9 TJ |
8576 | fi |
8577 | ||
f24af81b TT |
8578 | # Make gthr-default.h if we have a thread file. |
8579 | gthread_flags= | |
75bffa71 | 8580 | if test $thread_file != single; then |
f24af81b | 8581 | rm -f gthr-default.h |
db0d1ed9 | 8582 | echo "#include \"gthr-${thread_file}.h\"" > gthr-default.h |
f24af81b TT |
8583 | gthread_flags=-DHAVE_GTHR_DEFAULT |
8584 | fi | |
8585 | ||
8586 | ||
81bf3d9e RH |
8587 | # Find out what GC implementation we want, or may, use. |
8588 | # Check whether --with-gc or --without-gc was given. | |
8589 | if test "${with_gc+set}" = set; then | |
8590 | withval="$with_gc" | |
8591 | case "$withval" in | |
8592 | simple | page) | |
8593 | GGC=ggc-$withval | |
8594 | ;; | |
8595 | *) | |
093e61a6 | 8596 | { echo "configure: error: $withval is an invalid option to --with-gc" 1>&2; exit 1; } |
81bf3d9e RH |
8597 | ;; |
8598 | esac | |
8599 | else | |
005537df | 8600 | GGC=ggc-page |
093e61a6 RS |
8601 | fi |
8602 | ||
81bf3d9e RH |
8603 | |
8604 | echo "Using $GGC for garbage collection." | |
8605 | ||
3c809ba4 | 8606 | # Use the system's zlib library. |
b8dad04b ZW |
8607 | zlibdir=-L../zlib |
8608 | zlibinc="-I\$(srcdir)/../zlib" | |
3c809ba4 AG |
8609 | # Check whether --with-system-zlib or --without-system-zlib was given. |
8610 | if test "${with_system_zlib+set}" = set; then | |
8611 | withval="$with_system_zlib" | |
8612 | zlibdir= | |
8613 | zlibinc= | |
8614 | ||
093e61a6 RS |
8615 | fi |
8616 | ||
3c809ba4 AG |
8617 | |
8618 | ||
8619 | ||
dc6746e7 | 8620 | |
093e61a6 | 8621 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 |
7468e0b5 | 8622 | echo "configure:8623: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
dc6746e7 PT |
8623 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
8624 | if test "${enable_maintainer_mode+set}" = set; then | |
8625 | enableval="$enable_maintainer_mode" | |
8626 | maintainer_mode=$enableval | |
8627 | else | |
8628 | maintainer_mode=no | |
093e61a6 RS |
8629 | fi |
8630 | ||
dc6746e7 | 8631 | |
093e61a6 | 8632 | echo "$ac_t""$maintainer_mode" 1>&6 |
dc6746e7 PT |
8633 | |
8634 | if test "$maintainer_mode" = "yes"; then | |
8635 | MAINT='' | |
8636 | else | |
8637 | MAINT='#' | |
8638 | fi | |
8639 | ||
861bb6c1 JL |
8640 | # Make empty files to contain the specs and options for each language. |
8641 | # Then add #include lines to for a compiler that has specs and/or options. | |
8642 | ||
d7b42618 | 8643 | lang_opt_files= |
861bb6c1 JL |
8644 | lang_specs_files= |
8645 | lang_options_files= | |
3103b7db | 8646 | lang_tree_files= |
861bb6c1 JL |
8647 | for subdir in . $subdirs |
8648 | do | |
d7b42618 NB |
8649 | if test -f $srcdir/$subdir/lang.opt; then |
8650 | lang_opt_files="$lang_opt_files $srcdir/$subdir/lang.opt" | |
8651 | fi | |
75bffa71 | 8652 | if test -f $srcdir/$subdir/lang-specs.h; then |
0d24f4d1 | 8653 | lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h" |
861bb6c1 | 8654 | fi |
75bffa71 | 8655 | if test -f $srcdir/$subdir/lang-options.h; then |
0d24f4d1 | 8656 | lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h" |
861bb6c1 | 8657 | fi |
3103b7db | 8658 | if test -f $srcdir/$subdir/$subdir-tree.def; then |
0d24f4d1 | 8659 | lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def" |
3103b7db | 8660 | fi |
861bb6c1 JL |
8661 | done |
8662 | ||
8663 | # These (without "all_") are set in each config-lang.in. | |
8664 | # `language' must be a single word so is spelled singularly. | |
8665 | all_languages= | |
8666 | all_boot_languages= | |
8667 | all_compilers= | |
8668 | all_stagestuff= | |
e34a3d31 | 8669 | all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc mkheaders' |
861bb6c1 JL |
8670 | # List of language makefile fragments. |
8671 | all_lang_makefiles= | |
e2500fed | 8672 | # Files for gengtype |
ef69da62 | 8673 | all_gtfiles="$target_gtfiles" |
8ac9d31f TJ |
8674 | # Files for gengtype with language |
8675 | all_gtfiles_files_langs= | |
8676 | all_gtfiles_files_files= | |
861bb6c1 JL |
8677 | |
8678 | # Add the language fragments. | |
8679 | # Languages are added via two mechanisms. Some information must be | |
8680 | # recorded in makefile variables, these are defined in config-lang.in. | |
8681 | # We accumulate them and plug them into the main Makefile. | |
8682 | # The other mechanism is a set of hooks for each of the main targets | |
8683 | # like `clean', `install', etc. | |
8684 | ||
8685 | language_fragments="Make-lang" | |
8686 | language_hooks="Make-hooks" | |
861bb6c1 JL |
8687 | |
8688 | for s in .. $subdirs | |
8689 | do | |
75bffa71 | 8690 | if test $s != ".." |
861bb6c1 JL |
8691 | then |
8692 | language= | |
8693 | boot_language= | |
8694 | compilers= | |
8695 | stagestuff= | |
861bb6c1 | 8696 | outputs= |
e2500fed | 8697 | gtfiles= |
861bb6c1 | 8698 | . ${srcdir}/$s/config-lang.in |
75bffa71 | 8699 | if test "x$language" = x |
861bb6c1 JL |
8700 | then |
8701 | echo "${srcdir}/$s/config-lang.in doesn't set \$language." 1>&2 | |
8702 | exit 1 | |
8703 | fi | |
72aaffbd ZW |
8704 | all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Make-lang.in" |
8705 | if test -f ${srcdir}/$s/Makefile.in | |
8706 | then all_lang_makefiles="$all_lang_makefiles ${srcdir}/$s/Makefile.in" | |
8707 | fi | |
861bb6c1 | 8708 | all_languages="$all_languages $language" |
75bffa71 | 8709 | if test "x$boot_language" = xyes |
861bb6c1 JL |
8710 | then |
8711 | all_boot_languages="$all_boot_languages $language" | |
8712 | fi | |
8713 | all_compilers="$all_compilers $compilers" | |
8714 | all_stagestuff="$all_stagestuff $stagestuff" | |
861bb6c1 | 8715 | all_outputs="$all_outputs $outputs" |
e2500fed | 8716 | all_gtfiles="$all_gtfiles $gtfiles" |
8ac9d31f TJ |
8717 | for f in .. $gtfiles |
8718 | do | |
8719 | if test $f != ".." | |
8720 | then | |
8721 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8722 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8723 | fi | |
8724 | done | |
861bb6c1 JL |
8725 | fi |
8726 | done | |
8727 | ||
8ac9d31f TJ |
8728 | # Pick up gtfiles for c |
8729 | gtfiles= | |
8730 | s="c" | |
8731 | . ${srcdir}/c-config-lang.in | |
8732 | all_gtfiles="$all_gtfiles $gtfiles" | |
8733 | for f in .. $gtfiles | |
8734 | do | |
8735 | if test $f != ".." | |
8736 | then | |
8737 | all_gtfiles_files_langs="$all_gtfiles_files_langs ${s} " | |
8738 | all_gtfiles_files_files="$all_gtfiles_files_files ${f} " | |
8739 | fi | |
8740 | done | |
8741 | ||
cbc59f01 DD |
8742 | check_languages= |
8743 | for language in .. $all_languages | |
8744 | do | |
8745 | if test $language != ".." | |
8746 | then | |
8747 | check_languages="$check_languages check-$language" | |
8748 | fi | |
8749 | done | |
8750 | ||
861bb6c1 JL |
8751 | # Since we can't use `::' targets, we link each language in |
8752 | # with a set of hooks, reached indirectly via lang.${target}. | |
8753 | ||
8754 | rm -f Make-hooks | |
8755 | touch Make-hooks | |
65ebbf81 | 8756 | target_list="all.build all.cross start.encap rest.encap tags \ |
d3945f0a | 8757 | info dvi generated-manpages \ |
861bb6c1 | 8758 | install-normal install-common install-info install-man \ |
436a88a6 | 8759 | uninstall \ |
861bb6c1 | 8760 | mostlyclean clean distclean extraclean maintainer-clean \ |
8f231b5d | 8761 | stage1 stage2 stage3 stage4 stageprofile stagefeedback" |
861bb6c1 JL |
8762 | for t in $target_list |
8763 | do | |
8764 | x= | |
ab87f8c8 | 8765 | for lang in .. $all_languages |
861bb6c1 | 8766 | do |
ab87f8c8 JL |
8767 | if test $lang != ".."; then |
8768 | x="$x $lang.$t" | |
861bb6c1 JL |
8769 | fi |
8770 | done | |
8771 | echo "lang.$t: $x" >> Make-hooks | |
8772 | done | |
8773 | ||
cc06d68c | 8774 | # Create .gdbinit. |
861bb6c1 | 8775 | |
cc06d68c GP |
8776 | echo "dir ." > .gdbinit |
8777 | echo "dir ${srcdir}" >> .gdbinit | |
8778 | if test x$gdb_needs_out_file_path = xyes | |
8779 | then | |
8780 | echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit | |
8781 | fi | |
8782 | if test "x$subdirs" != x; then | |
8783 | for s in $subdirs | |
8784 | do | |
8785 | echo "dir ${srcdir}/$s" >> .gdbinit | |
8786 | done | |
861bb6c1 | 8787 | fi |
cc06d68c | 8788 | echo "source ${srcdir}/gdbinit.in" >> .gdbinit |
861bb6c1 | 8789 | |
8f8d3278 NC |
8790 | # If $(exec_prefix) exists and is not the same as $(prefix), then compute an |
8791 | # absolute path for gcc_tooldir based on inserting the number of up-directory | |
8792 | # movements required to get from $(exec_prefix) to $(prefix) into the basic | |
8793 | # $(libsubdir)/@(unlibsubdir) based path. | |
82cbf8f7 JL |
8794 | # Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel |
8795 | # make and thus we'd get different behavior depending on where we built the | |
8796 | # sources. | |
5949a9fc | 8797 | if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then |
d062c304 JL |
8798 | gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)' |
8799 | else | |
8f8d3278 NC |
8800 | # An explanation of the sed strings: |
8801 | # -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix' | |
8802 | # -e 's|/$||' match a trailing forward slash and eliminates it | |
8803 | # -e 's|^[^/]|/|' forces the string to start with a forward slash (*) | |
ff7cc307 | 8804 | # -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../ |
8f8d3278 NC |
8805 | # |
8806 | # (*) Note this pattern overwrites the first character of the string | |
8807 | # with a forward slash if one is not already present. This is not a | |
8808 | # problem because the exact names of the sub-directories concerned is | |
8809 | # unimportant, just the number of them matters. | |
8810 | # | |
8811 | # The practical upshot of these patterns is like this: | |
8812 | # | |
8813 | # prefix exec_prefix result | |
8814 | # ------ ----------- ------ | |
8815 | # /foo /foo/bar ../ | |
8816 | # /foo/ /foo/bar ../ | |
8817 | # /foo /foo/bar/ ../ | |
8818 | # /foo/ /foo/bar/ ../ | |
8819 | # /foo /foo/bar/ugg ../../ | |
8820 | # | |
4c112cda NC |
8821 | dollar='$$' |
8822 | gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_alias)" | |
d062c304 JL |
8823 | fi |
8824 | ||
8825 | ||
2ce3c6c6 | 8826 | |
2bbea3a6 RH |
8827 | # Find a directory in which to install a shared libgcc. |
8828 | ||
8829 | # Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given. | |
8830 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
8831 | enableval="$enable_version_specific_runtime_libs" | |
093e61a6 RS |
8832 | : |
8833 | fi | |
2bbea3a6 RH |
8834 | |
8835 | ||
5b15f277 RH |
8836 | # Check whether --with-slibdir or --without-slibdir was given. |
8837 | if test "${with_slibdir+set}" = set; then | |
8838 | withval="$with_slibdir" | |
8839 | slibdir="$with_slibdir" | |
8840 | else | |
8841 | if test "${enable_version_specific_runtime_libs+set}" = set; then | |
2bbea3a6 | 8842 | slibdir='$(libsubdir)' |
5b15f277 | 8843 | elif test "$host" != "$target"; then |
2bbea3a6 RH |
8844 | slibdir='$(build_tooldir)/lib' |
8845 | else | |
5b15f277 | 8846 | slibdir='$(libdir)' |
2bbea3a6 | 8847 | fi |
093e61a6 RS |
8848 | fi |
8849 | ||
2bbea3a6 RH |
8850 | |
8851 | ||
1e6347d8 | 8852 | objdir=`${PWDCMD-pwd}` |
7e717196 JL |
8853 | |
8854 | ||
861bb6c1 JL |
8855 | # Process the language and host/target makefile fragments. |
8856 | ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file" | |
8857 | ||
8858 | # Substitute configuration variables | |
8859 | ||
8860 | ||
8861 | ||
8862 | ||
8863 | ||
8864 | ||
8865 | ||
8866 | ||
8867 | ||
8868 | ||
8869 | ||
8870 | ||
8871 | ||
8872 | ||
8873 | ||
8874 | ||
8875 | ||
8876 | ||
8877 | ||
8878 | ||
8879 | ||
8880 | ||
8881 | ||
8882 | ||
8883 | ||
8884 | ||
8885 | ||
8886 | ||
8887 | ||
8888 | ||
8889 | ||
8890 | ||
8891 | ||
8892 | ||
8893 | ||
8894 | ||
8895 | ||
8896 | ||
8897 | ||
8898 | ||
8899 | ||
8900 | ||
8901 | ||
8902 | ||
8903 | ||
8904 | ||
9b16d2c4 | 8905 | |
e9a25f70 | 8906 | |
6e26218f | 8907 | |
c8724862 | 8908 | |
e061d1ce | 8909 | |
d8bb17c8 | 8910 | |
11642c3a ZW |
8911 | |
8912 | ||
8913 | ||
8914 | ||
8915 | ||
8916 | ||
8917 | ||
3d9d2476 | 8918 | |
596151e1 | 8919 | |
8ac9d31f TJ |
8920 | |
8921 | ||
8922 | ||
e2500fed | 8923 | |
d5355cb2 | 8924 | |
476d9098 | 8925 | |
d7b42618 | 8926 | |
861bb6c1 JL |
8927 | |
8928 | ||
8929 | # Echo that links are built | |
75bffa71 | 8930 | if test x$host = x$target |
861bb6c1 JL |
8931 | then |
8932 | str1="native " | |
8933 | else | |
8934 | str1="cross-" | |
8935 | str2=" from $host" | |
8936 | fi | |
8937 | ||
75bffa71 | 8938 | if test x$host != x$build |
861bb6c1 JL |
8939 | then |
8940 | str3=" on a $build system" | |
8941 | fi | |
8942 | ||
75bffa71 | 8943 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8944 | then |
8945 | str4= | |
8946 | fi | |
8947 | ||
8948 | echo "Links are now set up to build a ${str1}compiler for ${target}$str4" 1>&2 | |
8949 | ||
75bffa71 | 8950 | if test "x$str2" != x || test "x$str3" != x |
861bb6c1 JL |
8951 | then |
8952 | echo " ${str2}${str3}." 1>&2 | |
8953 | fi | |
8954 | ||
8955 | # Configure the subdirectories | |
8956 | # AC_CONFIG_SUBDIRS($subdirs) | |
8957 | ||
8958 | # Create the Makefile | |
8959 | # and configure language subdirectories | |
093e61a6 RS |
8960 | trap '' 1 2 15 |
8961 | cat > confcache <<\EOF | |
861bb6c1 JL |
8962 | # This file is a shell script that caches the results of configure |
8963 | # tests run on this system so they can be shared between configure | |
093e61a6 RS |
8964 | # scripts and configure runs. It is not useful on other systems. |
8965 | # If it contains results you don't want to keep, you may remove or edit it. | |
861bb6c1 | 8966 | # |
093e61a6 RS |
8967 | # By default, configure uses ./config.cache as the cache file, |
8968 | # creating it if it does not exist already. You can give configure | |
8969 | # the --cache-file=FILE option to use a different cache file; that is | |
8970 | # what configure does when it calls configure scripts in | |
8971 | # subdirectories, so they share the cache. | |
8972 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
8973 | # config.status only pays attention to the cache file if you give it the | |
8974 | # --recheck option to rerun configure. | |
861bb6c1 | 8975 | # |
093e61a6 | 8976 | EOF |
861bb6c1 JL |
8977 | # The following way of writing the cache mishandles newlines in values, |
8978 | # but we know of no workaround that is simple, portable, and efficient. | |
8979 | # So, don't put newlines in cache variables' values. | |
8980 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
8981 | # and sets the high bit in the cache file unless we assign to the vars. | |
093e61a6 RS |
8982 | (set) 2>&1 | |
8983 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
8984 | *ac_space=\ *) | |
8985 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
8986 | # turns \\\\ into \\, and sed turns \\ into \). | |
8987 | sed -n \ | |
8988 | -e "s/'/'\\\\''/g" \ | |
8989 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
8990 | ;; | |
8991 | *) | |
8992 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
8993 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
8994 | ;; | |
8995 | esac >> confcache | |
8996 | if cmp -s $cache_file confcache; then | |
8997 | : | |
8998 | else | |
861bb6c1 | 8999 | if test -w $cache_file; then |
093e61a6 RS |
9000 | echo "updating cache $cache_file" |
9001 | cat confcache > $cache_file | |
861bb6c1 JL |
9002 | else |
9003 | echo "not updating unwritable cache $cache_file" | |
9004 | fi | |
9005 | fi | |
9006 | rm -f confcache | |
9007 | ||
093e61a6 RS |
9008 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
9009 | ||
861bb6c1 JL |
9010 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
9011 | # Let make expand exec_prefix. | |
9012 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
9013 | ||
093e61a6 RS |
9014 | # Any assignment to VPATH causes Sun make to only execute |
9015 | # the first set of double-colon rules, so remove it if not needed. | |
9016 | # If there is a colon in the path, we need to keep it. | |
861bb6c1 | 9017 | if test "x$srcdir" = x.; then |
093e61a6 | 9018 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
861bb6c1 JL |
9019 | fi |
9020 | ||
093e61a6 | 9021 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
cafe096b | 9022 | |
093e61a6 | 9023 | DEFS=-DHAVE_CONFIG_H |
cafe096b | 9024 | |
093e61a6 | 9025 | # Without the "./", some shells look in PATH for config.status. |
cafe096b | 9026 | : ${CONFIG_STATUS=./config.status} |
cafe096b | 9027 | |
093e61a6 RS |
9028 | echo creating $CONFIG_STATUS |
9029 | rm -f $CONFIG_STATUS | |
9030 | cat > $CONFIG_STATUS <<EOF | |
9031 | #! /bin/sh | |
9032 | # Generated automatically by configure. | |
9033 | # Run this file to recreate the current configuration. | |
9034 | # This directory was configured as follows, | |
9035 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
cafe096b | 9036 | # |
093e61a6 | 9037 | # $0 $ac_configure_args |
cafe096b | 9038 | # |
093e61a6 RS |
9039 | # Compiler output produced by configure, useful for debugging |
9040 | # configure, is in ./config.log if it exists. | |
cafe096b | 9041 | |
093e61a6 RS |
9042 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
9043 | for ac_option | |
cafe096b | 9044 | do |
093e61a6 RS |
9045 | case "\$ac_option" in |
9046 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
9047 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
9048 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
9049 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
9050 | echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
9051 | exit 0 ;; | |
9052 | -help | --help | --hel | --he | --h) | |
9053 | echo "\$ac_cs_usage"; exit 0 ;; | |
9054 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
cafe096b EC |
9055 | esac |
9056 | done | |
9057 | ||
093e61a6 | 9058 | ac_given_srcdir=$srcdir |
cafe096b | 9059 | |
093e61a6 RS |
9060 | trap 'rm -fr `echo "$all_outputs auto-host.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
9061 | EOF | |
9062 | cat >> $CONFIG_STATUS <<EOF | |
cafe096b | 9063 | |
093e61a6 RS |
9064 | # Protect against being on the right side of a sed subst in config.status. |
9065 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
9066 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
9067 | $ac_vpsub | |
9068 | $extrasub | |
9069 | s%@SHELL@%$SHELL%g | |
9070 | s%@CFLAGS@%$CFLAGS%g | |
9071 | s%@CPPFLAGS@%$CPPFLAGS%g | |
9072 | s%@CXXFLAGS@%$CXXFLAGS%g | |
9073 | s%@FFLAGS@%$FFLAGS%g | |
9074 | s%@DEFS@%$DEFS%g | |
9075 | s%@LDFLAGS@%$LDFLAGS%g | |
9076 | s%@LIBS@%$LIBS%g | |
9077 | s%@exec_prefix@%$exec_prefix%g | |
9078 | s%@prefix@%$prefix%g | |
9079 | s%@program_transform_name@%$program_transform_name%g | |
9080 | s%@bindir@%$bindir%g | |
9081 | s%@sbindir@%$sbindir%g | |
9082 | s%@libexecdir@%$libexecdir%g | |
9083 | s%@datadir@%$datadir%g | |
9084 | s%@sysconfdir@%$sysconfdir%g | |
9085 | s%@sharedstatedir@%$sharedstatedir%g | |
9086 | s%@localstatedir@%$localstatedir%g | |
9087 | s%@libdir@%$libdir%g | |
9088 | s%@includedir@%$includedir%g | |
9089 | s%@oldincludedir@%$oldincludedir%g | |
9090 | s%@infodir@%$infodir%g | |
9091 | s%@mandir@%$mandir%g | |
9092 | s%@host@%$host%g | |
9093 | s%@host_alias@%$host_alias%g | |
9094 | s%@host_cpu@%$host_cpu%g | |
9095 | s%@host_vendor@%$host_vendor%g | |
9096 | s%@host_os@%$host_os%g | |
9097 | s%@target@%$target%g | |
9098 | s%@target_alias@%$target_alias%g | |
9099 | s%@target_cpu@%$target_cpu%g | |
9100 | s%@target_vendor@%$target_vendor%g | |
9101 | s%@target_os@%$target_os%g | |
9102 | s%@build@%$build%g | |
9103 | s%@build_alias@%$build_alias%g | |
9104 | s%@build_cpu@%$build_cpu%g | |
9105 | s%@build_vendor@%$build_vendor%g | |
9106 | s%@build_os@%$build_os%g | |
4665e56c NN |
9107 | s%@build_subdir@%$build_subdir%g |
9108 | s%@host_subdir@%$host_subdir%g | |
093e61a6 RS |
9109 | s%@target_subdir@%$target_subdir%g |
9110 | s%@CC@%$CC%g | |
9111 | s%@NO_MINUS_C_MINUS_O@%$NO_MINUS_C_MINUS_O%g | |
9112 | s%@OUTPUT_OPTION@%$OUTPUT_OPTION%g | |
9113 | s%@CPP@%$CPP%g | |
9114 | s%@GNATBIND@%$GNATBIND%g | |
9115 | s%@ADAC@%$ADAC%g | |
9116 | s%@strict1_warn@%$strict1_warn%g | |
9117 | s%@warn_cflags@%$warn_cflags%g | |
9118 | s%@WERROR@%$WERROR%g | |
9119 | s%@nocommon_flag@%$nocommon_flag%g | |
9120 | s%@valgrind_path@%$valgrind_path%g | |
9121 | s%@valgrind_path_defines@%$valgrind_path_defines%g | |
9122 | s%@valgrind_command@%$valgrind_command%g | |
9123 | s%@coverage_flags@%$coverage_flags%g | |
9124 | s%@enable_multilib@%$enable_multilib%g | |
9125 | s%@enable_shared@%$enable_shared%g | |
9126 | s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g | |
9127 | s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g | |
9128 | s%@CROSS_SYSTEM_HEADER_DIR@%$CROSS_SYSTEM_HEADER_DIR%g | |
9129 | s%@SET_MAKE@%$SET_MAKE%g | |
9130 | s%@AWK@%$AWK%g | |
9131 | s%@LN@%$LN%g | |
9132 | s%@LN_S@%$LN_S%g | |
9133 | s%@RANLIB@%$RANLIB%g | |
9134 | s%@INSTALL@%$INSTALL%g | |
9135 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
9136 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
9137 | s%@have_mktemp_command@%$have_mktemp_command%g | |
9138 | s%@MAKEINFO@%$MAKEINFO%g | |
9139 | s%@BUILD_INFO@%$BUILD_INFO%g | |
9140 | s%@GENERATED_MANPAGES@%$GENERATED_MANPAGES%g | |
9141 | s%@make_compare_target@%$make_compare_target%g | |
9142 | s%@FLEX@%$FLEX%g | |
9143 | s%@BISON@%$BISON%g | |
9144 | s%@stage1_cflags@%$stage1_cflags%g | |
9145 | s%@COLLECT2_LIBS@%$COLLECT2_LIBS%g | |
9146 | s%@GNAT_LIBEXC@%$GNAT_LIBEXC%g | |
9147 | s%@LDEXP_LIB@%$LDEXP_LIB%g | |
9148 | s%@TARGET_GETGROUPS_T@%$TARGET_GETGROUPS_T%g | |
9149 | s%@LIBICONV@%$LIBICONV%g | |
9150 | s%@manext@%$manext%g | |
9151 | s%@objext@%$objext%g | |
9152 | s%@extra_modes_file@%$extra_modes_file%g | |
9153 | s%@FORBUILD@%$FORBUILD%g | |
9154 | s%@PACKAGE@%$PACKAGE%g | |
9155 | s%@VERSION@%$VERSION%g | |
9156 | s%@ALLOCA@%$ALLOCA%g | |
9157 | s%@GLIBC21@%$GLIBC21%g | |
9158 | s%@USE_NLS@%$USE_NLS%g | |
9159 | s%@MSGFMT@%$MSGFMT%g | |
9160 | s%@GMSGFMT@%$GMSGFMT%g | |
9161 | s%@XGETTEXT@%$XGETTEXT%g | |
9162 | s%@INTLBISON@%$INTLBISON%g | |
9163 | s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g | |
9164 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
9165 | s%@CATALOGS@%$CATALOGS%g | |
9166 | s%@CATOBJEXT@%$CATOBJEXT%g | |
9167 | s%@INTLLIBS@%$INTLLIBS%g | |
9168 | s%@INTLDEPS@%$INTLDEPS%g | |
9169 | s%@INTLOBJS@%$INTLOBJS%g | |
9170 | s%@POSUB@%$POSUB%g | |
9171 | s%@DATADIRNAME@%$DATADIRNAME%g | |
9172 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
9173 | s%@GENCAT@%$GENCAT%g | |
9174 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
9175 | s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g | |
9176 | s%@CROSS@%$CROSS%g | |
9177 | s%@ALL@%$ALL%g | |
9178 | s%@SYSTEM_HEADER_DIR@%$SYSTEM_HEADER_DIR%g | |
9179 | s%@inhibit_libc@%$inhibit_libc%g | |
9180 | s%@BUILD_PREFIX@%$BUILD_PREFIX%g | |
9181 | s%@BUILD_PREFIX_1@%$BUILD_PREFIX_1%g | |
eaf9f3b2 | 9182 | s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g |
093e61a6 RS |
9183 | s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g |
9184 | s%@STMP_FIXINC@%$STMP_FIXINC%g | |
9185 | s%@STMP_FIXPROTO@%$STMP_FIXPROTO%g | |
9186 | s%@libgcc_visibility@%$libgcc_visibility%g | |
9187 | s%@gthread_flags@%$gthread_flags%g | |
9188 | s%@GGC@%$GGC%g | |
9189 | s%@zlibdir@%$zlibdir%g | |
9190 | s%@zlibinc@%$zlibinc%g | |
9191 | s%@MAINT@%$MAINT%g | |
9192 | s%@gcc_tooldir@%$gcc_tooldir%g | |
9193 | s%@dollar@%$dollar%g | |
9194 | s%@slibdir@%$slibdir%g | |
9195 | s%@objdir@%$objdir%g | |
9196 | s%@subdirs@%$subdirs%g | |
9197 | s%@srcdir@%$srcdir%g | |
9198 | s%@all_boot_languages@%$all_boot_languages%g | |
9199 | s%@all_compilers@%$all_compilers%g | |
9200 | s%@all_gtfiles@%$all_gtfiles%g | |
9201 | s%@all_gtfiles_files_langs@%$all_gtfiles_files_langs%g | |
9202 | s%@all_gtfiles_files_files@%$all_gtfiles_files_files%g | |
9203 | s%@all_lang_makefiles@%$all_lang_makefiles%g | |
9204 | s%@all_languages@%$all_languages%g | |
9205 | s%@all_stagestuff@%$all_stagestuff%g | |
9206 | s%@build_exeext@%$build_exeext%g | |
9207 | s%@build_install_headers_dir@%$build_install_headers_dir%g | |
9208 | s%@build_xm_file_list@%$build_xm_file_list%g | |
9209 | s%@build_xm_file@%$build_xm_file%g | |
9210 | s%@build_xm_defines@%$build_xm_defines%g | |
9211 | s%@check_languages@%$check_languages%g | |
9212 | s%@cc_set_by_configure@%$cc_set_by_configure%g | |
9213 | s%@quoted_cc_set_by_configure@%$quoted_cc_set_by_configure%g | |
9214 | s%@cpp_install_dir@%$cpp_install_dir%g | |
9215 | s%@dep_host_xmake_file@%$dep_host_xmake_file%g | |
9216 | s%@dep_tmake_file@%$dep_tmake_file%g | |
9217 | s%@extra_headers_list@%$extra_headers_list%g | |
9218 | s%@extra_objs@%$extra_objs%g | |
9219 | s%@extra_parts@%$extra_parts%g | |
9220 | s%@extra_passes@%$extra_passes%g | |
9221 | s%@extra_programs@%$extra_programs%g | |
9222 | s%@float_h_file@%$float_h_file%g | |
9223 | s%@gcc_config_arguments@%$gcc_config_arguments%g | |
9224 | s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g | |
9225 | s%@libstdcxx_incdir@%$libstdcxx_incdir%g | |
9226 | s%@gcc_version@%$gcc_version%g | |
9227 | s%@gcc_version_full@%$gcc_version_full%g | |
9228 | s%@gcc_version_trigger@%$gcc_version_trigger%g | |
9229 | s%@host_exeext@%$host_exeext%g | |
9230 | s%@host_extra_gcc_objs@%$host_extra_gcc_objs%g | |
9231 | s%@host_xm_file_list@%$host_xm_file_list%g | |
9232 | s%@host_xm_file@%$host_xm_file%g | |
9233 | s%@host_xm_defines@%$host_xm_defines%g | |
9234 | s%@out_host_hook_obj@%$out_host_hook_obj%g | |
9235 | s%@install@%$install%g | |
d7b42618 | 9236 | s%@lang_opt_files@%$lang_opt_files%g |
093e61a6 RS |
9237 | s%@lang_options_files@%$lang_options_files%g |
9238 | s%@lang_specs_files@%$lang_specs_files%g | |
9239 | s%@lang_tree_files@%$lang_tree_files%g | |
9240 | s%@local_prefix@%$local_prefix%g | |
9241 | s%@md_file@%$md_file%g | |
9242 | s%@objc_boehm_gc@%$objc_boehm_gc%g | |
9243 | s%@out_file@%$out_file%g | |
9244 | s%@out_object_file@%$out_object_file%g | |
9245 | s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g | |
9246 | s%@quoted_stage_prefix_set_by_configure@%$quoted_stage_prefix_set_by_configure%g | |
9247 | s%@symbolic_link@%$symbolic_link%g | |
9248 | s%@thread_file@%$thread_file%g | |
9249 | s%@tm_file_list@%$tm_file_list%g | |
9250 | s%@tm_file@%$tm_file%g | |
9251 | s%@tm_defines@%$tm_defines%g | |
9252 | s%@tm_p_file_list@%$tm_p_file_list%g | |
9253 | s%@tm_p_file@%$tm_p_file%g | |
9254 | s%@xm_file@%$xm_file%g | |
9255 | s%@xm_defines@%$xm_defines%g | |
9256 | s%@c_target_objs@%$c_target_objs%g | |
9257 | s%@cxx_target_objs@%$cxx_target_objs%g | |
9258 | s%@target_cpu_default@%$target_cpu_default%g | |
861bb6c1 | 9259 | /@target_overrides@/r $target_overrides |
093e61a6 | 9260 | s%@target_overrides@%%g |
861bb6c1 | 9261 | /@host_overrides@/r $host_overrides |
093e61a6 | 9262 | s%@host_overrides@%%g |
861bb6c1 | 9263 | /@language_fragments@/r $language_fragments |
093e61a6 | 9264 | s%@language_fragments@%%g |
861bb6c1 | 9265 | /@language_hooks@/r $language_hooks |
093e61a6 RS |
9266 | s%@language_hooks@%%g |
9267 | ||
861bb6c1 | 9268 | CEOF |
093e61a6 | 9269 | EOF |
861bb6c1 | 9270 | |
093e61a6 RS |
9271 | cat >> $CONFIG_STATUS <<\EOF |
9272 | ||
9273 | # Split the substitutions into bite-sized pieces for seds with | |
9274 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
9275 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
9276 | ac_file=1 # Number of current file. | |
9277 | ac_beg=1 # First line for current file. | |
9278 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
9279 | ac_more_lines=: | |
9280 | ac_sed_cmds="" | |
9281 | while $ac_more_lines; do | |
9282 | if test $ac_beg -gt 1; then | |
9283 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
9284 | else | |
9285 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
9286 | fi | |
9287 | if test ! -s conftest.s$ac_file; then | |
9288 | ac_more_lines=false | |
9289 | rm -f conftest.s$ac_file | |
9290 | else | |
9291 | if test -z "$ac_sed_cmds"; then | |
9292 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
861bb6c1 | 9293 | else |
093e61a6 | 9294 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
861bb6c1 | 9295 | fi |
093e61a6 RS |
9296 | ac_file=`expr $ac_file + 1` |
9297 | ac_beg=$ac_end | |
9298 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
861bb6c1 | 9299 | fi |
093e61a6 RS |
9300 | done |
9301 | if test -z "$ac_sed_cmds"; then | |
9302 | ac_sed_cmds=cat | |
9303 | fi | |
9304 | EOF | |
861bb6c1 | 9305 | |
093e61a6 RS |
9306 | cat >> $CONFIG_STATUS <<EOF |
9307 | ||
9308 | CONFIG_FILES=\${CONFIG_FILES-"$all_outputs"} | |
9309 | EOF | |
9310 | cat >> $CONFIG_STATUS <<\EOF | |
9311 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9312 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9313 | case "$ac_file" in |
9314 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9315 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9316 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9317 | esac |
9318 | ||
093e61a6 | 9319 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
cafe096b | 9320 | |
093e61a6 RS |
9321 | # Remove last slash and all that follows it. Not all systems have dirname. |
9322 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9323 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9324 | # The file is in a subdirectory. | |
9325 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
9326 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
9327 | # A "../" for each directory in $ac_dir_suffix. | |
9328 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
9329 | else | |
9330 | ac_dir_suffix= ac_dots= | |
9331 | fi | |
cafe096b | 9332 | |
093e61a6 RS |
9333 | case "$ac_given_srcdir" in |
9334 | .) srcdir=. | |
9335 | if test -z "$ac_dots"; then top_srcdir=. | |
9336 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
9337 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
861bb6c1 | 9338 | *) # Relative path. |
093e61a6 RS |
9339 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
9340 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9341 | esac | |
861bb6c1 | 9342 | |
cafe096b | 9343 | |
093e61a6 RS |
9344 | echo creating "$ac_file" |
9345 | rm -f "$ac_file" | |
9346 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
9347 | case "$ac_file" in | |
9348 | *Makefile*) ac_comsub="1i\\ | |
9349 | # $configure_input" ;; | |
9350 | *) ac_comsub= ;; | |
9351 | esac | |
cafe096b | 9352 | |
093e61a6 RS |
9353 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
9354 | sed -e "$ac_comsub | |
9355 | s%@configure_input@%$configure_input%g | |
9356 | s%@srcdir@%$srcdir%g | |
9357 | s%@top_srcdir@%$top_srcdir%g | |
9358 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
9359 | fi; done | |
9360 | rm -f conftest.s* | |
861bb6c1 JL |
9361 | |
9362 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
9363 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
9364 | # | |
9365 | # ac_d sets the value in "#define NAME VALUE" lines. | |
093e61a6 RS |
9366 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
9367 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
9368 | ac_dC='\3' | |
9369 | ac_dD='%g' | |
9370 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
9371 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9372 | ac_uB='\([ ]\)%\1#\2define\3' | |
861bb6c1 | 9373 | ac_uC=' ' |
093e61a6 RS |
9374 | ac_uD='\4%g' |
9375 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
9376 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
9377 | ac_eB='$%\1#\2define\3' | |
9378 | ac_eC=' ' | |
9379 | ac_eD='%g' | |
9380 | ||
9381 | if test "${CONFIG_HEADERS+set}" != set; then | |
9382 | EOF | |
9383 | cat >> $CONFIG_STATUS <<EOF | |
9384 | CONFIG_HEADERS="auto-host.h:config.in" | |
9385 | EOF | |
9386 | cat >> $CONFIG_STATUS <<\EOF | |
9387 | fi | |
9388 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
861bb6c1 | 9389 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
093e61a6 RS |
9390 | case "$ac_file" in |
9391 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
9392 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9393 | *) ac_file_in="${ac_file}.in" ;; | |
861bb6c1 JL |
9394 | esac |
9395 | ||
093e61a6 RS |
9396 | echo creating $ac_file |
9397 | ||
9398 | rm -f conftest.frag conftest.in conftest.out | |
9399 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
9400 | cat $ac_file_inputs > conftest.in | |
9401 | ||
9402 | EOF | |
9403 | ||
9404 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
9405 | # the proper values into config.h.in to produce config.h. And first: | |
9406 | # Protect against being on the right side of a sed subst in config.status. | |
9407 | # Protect against being in an unquoted here document in config.status. | |
9408 | rm -f conftest.vals | |
9409 | cat > conftest.hdr <<\EOF | |
9410 | s/[\\&%]/\\&/g | |
9411 | s%[\\$`]%\\&%g | |
9412 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
9413 | s%ac_d%ac_u%gp | |
9414 | s%ac_u%ac_e%gp | |
9415 | EOF | |
9416 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
9417 | rm -f conftest.hdr | |
861bb6c1 JL |
9418 | |
9419 | # This sed command replaces #undef with comments. This is necessary, for | |
9420 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
9421 | # on some systems where configure will not decide to define it. | |
093e61a6 RS |
9422 | cat >> conftest.vals <<\EOF |
9423 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
9424 | EOF | |
9425 | ||
9426 | # Break up conftest.vals because some shells have a limit on | |
9427 | # the size of here documents, and old seds have small limits too. | |
861bb6c1 JL |
9428 | |
9429 | rm -f conftest.tail | |
093e61a6 | 9430 | while : |
861bb6c1 | 9431 | do |
093e61a6 RS |
9432 | ac_lines=`grep -c . conftest.vals` |
9433 | # grep -c gives empty output for an empty file on some AIX systems. | |
9434 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
9435 | # Write a limited-size here document to conftest.frag. | |
9436 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
9437 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
861bb6c1 | 9438 | echo 'CEOF |
093e61a6 RS |
9439 | sed -f conftest.frag conftest.in > conftest.out |
9440 | rm -f conftest.in | |
9441 | mv conftest.out conftest.in | |
9442 | ' >> $CONFIG_STATUS | |
9443 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
9444 | rm -f conftest.vals | |
9445 | mv conftest.tail conftest.vals | |
861bb6c1 | 9446 | done |
093e61a6 RS |
9447 | rm -f conftest.vals |
9448 | ||
9449 | cat >> $CONFIG_STATUS <<\EOF | |
9450 | rm -f conftest.frag conftest.h | |
9451 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
9452 | cat conftest.in >> conftest.h | |
9453 | rm -f conftest.in | |
9454 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
9455 | echo "$ac_file is unchanged" | |
9456 | rm -f conftest.h | |
cafe096b | 9457 | else |
093e61a6 RS |
9458 | # Remove last slash and all that follows it. Not all systems have dirname. |
9459 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
9460 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
9461 | # The file is in a subdirectory. | |
9462 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
cafe096b | 9463 | fi |
093e61a6 RS |
9464 | rm -f $ac_file |
9465 | mv conftest.h $ac_file | |
cafe096b | 9466 | fi |
093e61a6 | 9467 | fi; done |
861bb6c1 | 9468 | |
093e61a6 RS |
9469 | EOF |
9470 | cat >> $CONFIG_STATUS <<EOF | |
9471 | ||
9472 | subdirs='$subdirs' | |
9473 | symbolic_link='$symbolic_link' | |
9474 | ||
9475 | EOF | |
9476 | cat >> $CONFIG_STATUS <<\EOF | |
9477 | for ac_file in $CONFIG_FILES; do | |
71a94577 ZW |
9478 | # Support "outfile[:infile[:infile...]]" |
9479 | case "$ac_file" in | |
9480 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
9481 | esac | |
9482 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
9483 | case "$ac_file" in */Makefile.in) | |
9484 | # Adjust a relative srcdir. | |
9485 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
9486 | ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | |
9487 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
9488 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
9489 | # In autoconf-2.50 it is called $srcdir. | |
9490 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
9491 | case "$ac_given_srcdir" in | |
9492 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
9493 | /*) top_srcdir="$ac_given_srcdir" ;; | |
9494 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
9495 | esac | |
9496 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
9497 | rm -f "$ac_dir/POTFILES" | |
9498 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
9499 | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" | |
9500 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
9501 | sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | |
9502 | fi | |
9503 | ;; | |
9504 | esac | |
093e61a6 RS |
9505 | done |
9506 | ||
861bb6c1 | 9507 | case x$CONFIG_HEADERS in |
b7cb92ad | 9508 | xauto-host.h:config.in) |
861bb6c1 JL |
9509 | echo > cstamp-h ;; |
9510 | esac | |
93cf819d BK |
9511 | # If the host supports symlinks, point stage[1234] at ../stage[1234] so |
9512 | # bootstrapping and the installation procedure can still use | |
9513 | # CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks, | |
9514 | # FLAGS_TO_PASS has been modified to solve the problem there. | |
9515 | # This is virtually a duplicate of what happens in configure.lang; we do | |
9516 | # an extra check to make sure this only happens if ln -s can be used. | |
75bffa71 | 9517 | if test "$symbolic_link" = "ln -s"; then |
d8140df6 | 9518 | for d in .. ${subdirs} fixinc ; do |
75bffa71 | 9519 | if test $d != ..; then |
1e6347d8 | 9520 | STARTDIR=`${PWDCMD-pwd}` |
4e8a434e | 9521 | cd $d |
6a1b7268 | 9522 | for t in stage1 stage2 stage3 stage4 stageprofile stagefeedback include |
4e8a434e BK |
9523 | do |
9524 | rm -f $t | |
9525 | $symbolic_link ../$t $t 2>/dev/null | |
9526 | done | |
9527 | cd $STARTDIR | |
93cf819d BK |
9528 | fi |
9529 | done | |
9530 | else true ; fi | |
ab87f8c8 JL |
9531 | # Avoid having to add intl to our include paths. |
9532 | if test -f intl/libintl.h; then | |
9533 | echo creating libintl.h | |
9534 | echo '#include "intl/libintl.h"' >libintl.h | |
9535 | fi | |
cafe096b | 9536 | |
093e61a6 RS |
9537 | exit 0 |
9538 | EOF | |
861bb6c1 | 9539 | chmod +x $CONFIG_STATUS |
093e61a6 RS |
9540 | rm -fr confdefs* $ac_clean_files |
9541 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
861bb6c1 | 9542 |